aboutsummaryrefslogtreecommitdiff
path: root/commands/mod
diff options
context:
space:
mode:
Diffstat (limited to 'commands/mod')
-rw-r--r--commands/mod/sticky.js18
-rw-r--r--commands/mod/ticket.js2
2 files changed, 12 insertions, 8 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)
diff --git a/commands/mod/ticket.js b/commands/mod/ticket.js
index e499dd8..ba3c99e 100644
--- a/commands/mod/ticket.js
+++ b/commands/mod/ticket.js
@@ -24,7 +24,7 @@ module.exports = {
this.exec(client,{att:matt,action:action,ticket_id:ticket_id,r_message:r_message,message:message})
},
s_options:[{type:"string",name:"ticket",desc:"ticket id",required:true,autocomplete: async function(){ let tik = await db.Tickets.findAll({attributes:['ticket'],where:{status:'open'}}); let out = []; for(let t of tik) out.push(t.ticket); return out; }},
- {type:"string",name:"action",desc:"operation to perform",required:true,autocomplete:["reply","close","dump"]},
+ {type:"string",name:"action",desc:"operation to perform",required:true,autocomplete:false,choices:["reply","close","dump"]},
{type:"string",name:"message",desc:"message to reply with",required:false,autocomplete:false},
{type:"attachment",name:"attachment",desc:"attachment to reply with",required:false,autocomplete:false}],
async s_main(client,Discord,interaction){