aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/mod/sticky.js18
-rw-r--r--commands/mod/ticket.js2
-rw-r--r--commands/util/emote.js2
-rw-r--r--commands/util/help.js2
4 files changed, 14 insertions, 10 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){
diff --git a/commands/util/emote.js b/commands/util/emote.js
index c88f0b4..a6f4430 100644
--- a/commands/util/emote.js
+++ b/commands/util/emote.js
@@ -20,7 +20,7 @@ module.exports = {
{type:"user",name:"user",desc:"user to emote to (may be optional)",required:false,autocomplete:false}],
async s_main (client,Discord,interaction){
let emote = interaction.options.getString("emote");
- if(Object.keys(config.avaliable_multi).includes(emote)||Object.keys(config.avaliable_solo).includes(emote))
+ if(Object.keys(config.avaliable_multi.value).includes(emote)||Object.keys(config.avaliable_solo.value).includes(emote))
this.exec(client,{message:interaction,emote:emote,mentioned:interaction.options.getUser("user")})
else
interaction.reply({content:"invalid emote!", ephemeral: true})
diff --git a/commands/util/help.js b/commands/util/help.js
index b52ee12..a8d5cb4 100644
--- a/commands/util/help.js
+++ b/commands/util/help.js
@@ -30,7 +30,7 @@ module.exports = {
async main (client,Discord,message,args){
this.exec(client,{message:message,specify:args[0]})
},
- s_options:[{type:"string",name:"command",desc:"command to be specified",required:false,autocomplete:command_names}],
+ s_options:[{type:"string",name:"command",desc:"command to be specified",required:false,autocomplete:false,choices:command_names}],
async s_main(client,Discord,interaction){
this.exec(client,{message:interaction,specify:interaction.options.getString("command")})
},