diff options
Diffstat (limited to 'commands/mod/sticky.js')
-rw-r--r-- | commands/mod/sticky.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/commands/mod/sticky.js b/commands/mod/sticky.js index f5034de..fc82758 100644 --- a/commands/mod/sticky.js +++ b/commands/mod/sticky.js @@ -31,17 +31,21 @@ module.exports = { } }, - s_options:[{type:"string",name:"action",desc:"what to do",required:true,autocomplete:["add","remove","dump"]}, - {type:"string",name:"message",desc:"(required for add) message to be sent",required:false,autocomplete:false}, - {type:"channel",name:"chan",desc:"(required for remove and add) channel to clear",required:false,autocomplete:false}, - {type:"bool",name:"embed",desc:"whether or not to use a embed",required:false,autocomplete:false}], + //s_options:[{type:"string",name:"action",desc:"what to do",required:true,autocomplete:false,choices:["add","remove","dump"]}, + // {type:"string",name:"message",desc:"(required for add) message to be sent",required:false,autocomplete:false}, + // {type:"channel",name:"chan",desc:"(required for remove and add) channel to clear",required:false,autocomplete:false}, + // {type:"bool",name:"embed",desc:"whether or not to use a embed",required:false,autocomplete:false}], + s_options:[{type:"sub",name:"add",options:[{type:"string",name:"message",desc:"message to be sent",required:true,autocomplete:false},{type:"channel",name:"chan",desc:"channel to use",required:true,autocomplete:false}]}, + {type:"sub",name:"remove",options:[{type:"channel",name:"chan",desc:"channel to clear",required:true,autocomplete:false}]}, + {type:"sub",name:"dump",options:[]} + ], async s_main(client,Discord,interaction){ - let action = interaction.options.getString("action") + let action = interaction.options.getSubcommand() let mess = interaction.options.getString("message") let chan = interaction.options.getChannel("chan") let embed = interaction.options.getBoolean("embed") - if(!options.includes(action)) - return interaction.reply({content:"please use the autocomplete, (valid values are add, remove, and dump)",ephemeral: true}) + //if(!options.includes(action)) + // return interaction.reply({content:"please use the autocomplete, (valid values are add, remove, and dump)",ephemeral: true}) if(action=="add") return this.p_add(client,Discord,interaction,chan.id,mess,embed) if(action=="remove") return this.p_rem(client,Discord,interaction,chan.id) if(action=="dump") return this.p_dump(client,Discord,interaction) |