mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 10:21:22 +00:00
Clarify Wiki
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
a4530489b6
commit
e0623dc183
3 changed files with 6 additions and 6 deletions
|
@ -56,7 +56,7 @@ func (m modReactionRole) Setup() error {
|
||||||
channelID := m.attrs.MustString("discord_channel_id", nil)
|
channelID := m.attrs.MustString("discord_channel_id", nil)
|
||||||
|
|
||||||
msgEmbed := &discordgo.MessageEmbed{
|
msgEmbed := &discordgo.MessageEmbed{
|
||||||
// @attr embed_color optional int64 "0x2ECC71" Integer representation of the hex color for the embed
|
// @attr embed_color optional int64 "0x2ECC71" Integer / HEX representation of the color for the embed
|
||||||
Color: int(m.attrs.MustInt64("embed_color", ptrInt64(streamScheduleDefaultColor))),
|
Color: int(m.attrs.MustInt64("embed_color", ptrInt64(streamScheduleDefaultColor))),
|
||||||
// @attr embed_description optional string "" Description for the embed block
|
// @attr embed_description optional string "" Description for the embed block
|
||||||
Description: strings.TrimSpace(m.attrs.MustString("embed_description", ptrStringEmpty)),
|
Description: strings.TrimSpace(m.attrs.MustString("embed_description", ptrStringEmpty)),
|
||||||
|
@ -147,7 +147,7 @@ func (m modReactionRole) Setup() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m modReactionRole) extractRoles() (map[string]string, error) {
|
func (m modReactionRole) extractRoles() (map[string]string, error) {
|
||||||
// @attr reaction_roles required []string "" List of strings in format `emote=role-id[:set]` (`✅=873653932478574632:set` = Emote ✅ to add role 873653932478574632 and prevent it to be removed again, `:thx:862322180896063489=873649098740342855` = Custom emote `:thx:` with corresponding ID to add role 873649098740342855)
|
// @attr reaction_roles required []string "" List of strings in format `emote=role-id[:set]` (`✅=873653932478574632:set` = Unicode-Emote ✅ to add role 873653932478574632 and prevent it to be removed again, `:thx:862322180896063489=873649098740342855` = Custom emote `:thx:` with corresponding ID to add role 873649098740342855)
|
||||||
list, err := m.attrs.StringSlice("reaction_roles")
|
list, err := m.attrs.StringSlice("reaction_roles")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "getting role list")
|
return nil, errors.Wrap(err, "getting role list")
|
||||||
|
|
|
@ -88,7 +88,7 @@ func (m modStreamSchedule) cronUpdateSchedule() {
|
||||||
channelID := m.attrs.MustString("discord_channel_id", nil)
|
channelID := m.attrs.MustString("discord_channel_id", nil)
|
||||||
|
|
||||||
msgEmbed := &discordgo.MessageEmbed{
|
msgEmbed := &discordgo.MessageEmbed{
|
||||||
// @attr embed_color optional int64 "0x2ECC71" Integer representation of the hex color for the embed
|
// @attr embed_color optional int64 "0x2ECC71" Integer / HEX representation of the color for the embed
|
||||||
Color: int(m.attrs.MustInt64("embed_color", ptrInt64(streamScheduleDefaultColor))),
|
Color: int(m.attrs.MustInt64("embed_color", ptrInt64(streamScheduleDefaultColor))),
|
||||||
// @attr embed_description optional string "" Description for the embed block
|
// @attr embed_description optional string "" Description for the embed block
|
||||||
Description: strings.TrimSpace(m.attrs.MustString("embed_description", ptrStringEmpty)),
|
Description: strings.TrimSpace(m.attrs.MustString("embed_description", ptrStringEmpty)),
|
||||||
|
|
|
@ -116,8 +116,8 @@ Creates a post with pre-set reactions and assigns roles on reaction
|
||||||
| --------- | :--: | ---- | ------------- | ----------- |
|
| --------- | :--: | ---- | ------------- | ----------- |
|
||||||
| `discord_channel_id` | ✅ | string | | ID of the Discord channel to post the message to |
|
| `discord_channel_id` | ✅ | string | | ID of the Discord channel to post the message to |
|
||||||
| `embed_title` | ✅ | string | | Title of the embed |
|
| `embed_title` | ✅ | string | | Title of the embed |
|
||||||
| `reaction_roles` | ✅ | []string | | List of strings in format `emote=role-id[:set]` (`✅=873653932478574632:set` = Emote ✅ to add role 873653932478574632 and prevent it to be removed again, `:thx:862322180896063489=873649098740342855` = Custom emote `:thx:` with corresponding ID to add role 873649098740342855) |
|
| `reaction_roles` | ✅ | []string | | List of strings in format `emote=role-id[:set]` (`✅=873653932478574632:set` = Unicode-Emote ✅ to add role 873653932478574632 and prevent it to be removed again, `:thx:862322180896063489=873649098740342855` = Custom emote `:thx:` with corresponding ID to add role 873649098740342855) |
|
||||||
| `embed_color` | | int64 | `0x2ECC71` | Integer representation of the hex color for the embed |
|
| `embed_color` | | int64 | `0x2ECC71` | Integer / HEX representation of the color for the embed |
|
||||||
| `embed_description` | | string | | Description for the embed block |
|
| `embed_description` | | string | | Description for the embed block |
|
||||||
| `embed_thumbnail_height` | | int64 | | Height of the thumbnail |
|
| `embed_thumbnail_height` | | int64 | | Height of the thumbnail |
|
||||||
| `embed_thumbnail_url` | | string | | Publically hosted image URL to use as thumbnail |
|
| `embed_thumbnail_url` | | string | | Publically hosted image URL to use as thumbnail |
|
||||||
|
@ -135,7 +135,7 @@ Posts stream schedule derived from Twitch schedule as embed in Discord channel
|
||||||
| `twitch_client_id` | ✅ | string | | Twitch client ID the token was issued for |
|
| `twitch_client_id` | ✅ | string | | Twitch client ID the token was issued for |
|
||||||
| `twitch_token` | ✅ | string | | Token for the user the `twitch_channel_id` belongs to |
|
| `twitch_token` | ✅ | string | | Token for the user the `twitch_channel_id` belongs to |
|
||||||
| `cron` | | string | `*/10 * * * *` | When to execute the schedule transfer |
|
| `cron` | | string | `*/10 * * * *` | When to execute the schedule transfer |
|
||||||
| `embed_color` | | int64 | `0x2ECC71` | Integer representation of the hex color for the embed |
|
| `embed_color` | | int64 | `0x2ECC71` | Integer / HEX representation of the color for the embed |
|
||||||
| `embed_description` | | string | | Description for the embed block |
|
| `embed_description` | | string | | Description for the embed block |
|
||||||
| `embed_thumbnail_height` | | int64 | | Height of the thumbnail |
|
| `embed_thumbnail_height` | | int64 | | Height of the thumbnail |
|
||||||
| `embed_thumbnail_url` | | string | | Publically hosted image URL to use as thumbnail |
|
| `embed_thumbnail_url` | | string | | Publically hosted image URL to use as thumbnail |
|
||||||
|
|
Loading…
Reference in a new issue