Added status command to admin.

This commit is contained in:
Keanu Timmermans 2020-08-12 22:33:54 +02:00
parent 6744faa6e6
commit 9d0caaf976
No known key found for this signature in database
GPG key ID: A02B486C183D2147

View file

@ -67,6 +67,26 @@ export default new Command({
$.channel.send(`Couldn't find a verbosity level named \`${type}\`! The available types are \`[${Object.keys(logs)}]\`.`);
}
})
}),
status: new Command({
description: "Changes the bot's status.",
permission: Command.PERMISSIONS.BOT_SUPPORT,
async run($: CommonLibrary): Promise<any>
{
$.channel.send('Setting status to `online`...');
},
any: new Command({
description: `Select a status to set to. Available statuses: \`online\`, \`idle\`, \`dnd\`, \`invisible\``,
async run($: CommonLibrary): Promise<any>
{
let statuses = ['online', 'idle', 'dnd', 'invisible'];
if (!statuses.includes($.args[0])) return $.channel.send("That status doesn't exist!");
else {
$.client.user?.setStatus($.args[0]);
$.channel.send(`Setting status to \`${$.args[0]}\`...`);
}
}
})
})
}
});