Use `!status <name> <GAME,STREAMING,LISTENING,WATCHING,COMPETING> <ONLINE,DND,IDLE,INVISIBLE>`
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
//!status
let value = context.params.event.content.split(' ');
try {
await lib.discord.users['@0.1.1'].me.status.update({
activity_name: value[1],
activity_type: value[2].toUpperCase(),
status: value[3].toUpperCase(),
});
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: 'Done!',
});
} catch {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content:
'Look like you use it wrong. Try this!\n`!status `',
});
}