added partial userinstall support
This commit is contained in:
@@ -10,6 +10,15 @@ var cmd_dadjoke = Command{
|
||||
Definition: discord.SlashCommandCreate{
|
||||
Name: "dadjoke",
|
||||
Description: "Gives you a random joke that is as bad as your dad would tell them",
|
||||
Contexts: []discord.InteractionContextType{
|
||||
discord.InteractionContextTypeGuild,
|
||||
discord.InteractionContextTypePrivateChannel,
|
||||
discord.InteractionContextTypeBotDM,
|
||||
},
|
||||
IntegrationTypes: []discord.ApplicationIntegrationType{
|
||||
discord.ApplicationIntegrationTypeGuildInstall,
|
||||
discord.ApplicationIntegrationTypeUserInstall,
|
||||
},
|
||||
},
|
||||
Interact: func(e *events.ApplicationCommandInteractionCreate) {
|
||||
joke := simpleGetFromAPI("joke", "https://icanhazdadjoke.com/").(string)
|
||||
@@ -20,5 +29,4 @@ var cmd_dadjoke = Command{
|
||||
logrus.Error(err)
|
||||
}
|
||||
},
|
||||
AllowDM: true,
|
||||
}
|
||||
|
Reference in New Issue
Block a user