14 | async run(message, args, level) { |
15 | const status = args[0]; |
16 | if (!status) return message.channel.send("A status type must be provided."); |
17 | |
18 | const statusType = args[0].toLowerCase(); |
19 | |
20 | if (statusType === "online" || statusType === "idle" || statusType === "dnd" || statusType === "invisible") { |
21 | this.client.user.setStatus(status); |
22 | message.channel.send(`Status successfully changed to **${statusType}**.\nPlease note that initially changing status may take up to a minute or two.`); |
23 | } else { |
24 | return message.channel.send(`"${statusType}" is not a valid status type.`); |
25 | } |
26 | } |