aboutsummaryrefslogtreecommitdiff
path: root/commands/mod/sticky.js
diff options
context:
space:
mode:
authorame <[email protected]>2023-10-31 22:33:02 -0500
committerame <[email protected]>2023-10-31 22:33:02 -0500
commit6e90cde57af865e585cf06d297eadb4424ebcdbb (patch)
treeb4bdfeec2cefb83c5f61027cbf0ebb890122d391 /commands/mod/sticky.js
parent53b4e132d593ac6a0d7cad6f0c988a97b68b8d2d (diff)
subcommands
Diffstat (limited to 'commands/mod/sticky.js')
-rw-r--r--commands/mod/sticky.js18
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)