put common opts inside options function
@@ -36,7 +36,8 @@ func (c *Say) Type() discordgo.ApplicationCommandType {
return discordgo.ChatApplicationCommand
}
-var commonOpts = []*discordgo.ApplicationCommandOption{
+func (c *Say) Options() []*discordgo.ApplicationCommandOption {
+ commonOpts := []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionChannel,
Name: "channel",
@@ -49,7 +50,6 @@ var commonOpts = []*discordgo.ApplicationCommandOption{
},
}
-func (c *Say) Options() []*discordgo.ApplicationCommandOption {
return []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionSubCommand,
