4 help: "Display help for a commands or show list of available commands",
5 func: (msg, [cmd], {commands}) => {
7 let def = commands[cmd]
10 msg.reply(`!${cmd}${def.params ? " " + def.params : ""}: ${def.help || "No description given"}`)
12 msg.reply(`Invalid command: ${cmd}`)
14 msg.reply("Available commands:\n\t" + Object.keys(commands).join("\n\t"))
19 help: "Accept a request",
20 func: (msg, _, {requests}) => {
21 const id = msg.author.id
22 const req = requests[id]
26 req.func(msg, req.origin)
28 msg.reply("Nothing to accept")
33 help: "Deny a request",
34 func: (msg, _, {requests}) => {
35 const id = msg.author.id
36 const req = requests[id]
40 msg.reply(`Denied request from <@!${req.origin}>`)
42 msg.reply("Nothing to deny")