started adding sticky messages
This commit is contained in:
@@ -15,7 +15,7 @@ type Command struct {
|
||||
ModalID string
|
||||
}
|
||||
|
||||
var commands []Command = []Command{tag_command, short_get_tag_command, dadjoke_command, ping_command, ask_command}
|
||||
var commands []Command = []Command{tag_command, short_get_tag_command, dadjoke_command, ping_command, sticky_command, ask_command}
|
||||
|
||||
func ready(s *discordgo.Session, event *discordgo.Ready) {
|
||||
for _, guild := range event.Guilds {
|
||||
@@ -40,7 +40,7 @@ func interactionCreate(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||
if command.Autocomplete != nil && i.ApplicationCommandData().Name == command.Definition.Name {
|
||||
command.Autocomplete(s, i)
|
||||
}
|
||||
case discordgo.InteractionModalSubmit: //g has no modal so it crashes
|
||||
case discordgo.InteractionModalSubmit:
|
||||
if command.ModalSubmit != nil && strings.HasPrefix(i.ModalSubmitData().CustomID, command.ModalID) {
|
||||
command.ModalSubmit(s, i)
|
||||
}
|
||||
|
Reference in New Issue
Block a user