diff --git a/apps/bot/src/modules/sharding.ts b/apps/bot/src/modules/sharding.ts index 9dd170ab..8af39b6b 100644 --- a/apps/bot/src/modules/sharding.ts +++ b/apps/bot/src/modules/sharding.ts @@ -70,6 +70,13 @@ export default class ShardingModule extends DexareModule { } case 'setStatus': { if (message.d.status === 'default') this.client.bot.editStatus('online', this.client.config.status); + else if (message.d.status === 'custom' && message.d.message) + // @ts-ignore + this.client.bot.editStatus({ + type: 4, + name: 'craig', + state: message.d.message + }); else if (['online', 'idle', 'dnd'].includes(message.d.status) && message.d.message) this.client.bot.editStatus(message.d.status, { type: 0, diff --git a/apps/bot/src/textCommands/setstatus.ts b/apps/bot/src/textCommands/setstatus.ts index 7872bc3c..c6e35e81 100644 --- a/apps/bot/src/textCommands/setstatus.ts +++ b/apps/bot/src/textCommands/setstatus.ts @@ -4,8 +4,8 @@ import Eris from 'eris'; import ShardingModule from '../modules/sharding'; import TextCommand, { replyOrSend } from '../util'; -type AllowedType = Eris.SelfStatus & 'default'; -const ALLOWED_TYPES = ['online', 'idle', 'dnd', 'default'] as AllowedType[]; +type AllowedType = Eris.SelfStatus & 'default' & 'custom'; +const ALLOWED_TYPES = ['online', 'idle', 'dnd', 'default', 'custom'] as AllowedType[]; export default class SetStatusCommand extends TextCommand { constructor(client: DexareClient) { @@ -33,6 +33,13 @@ export default class SetStatusCommand extends TextCommand { if (sharding.on) sharding.send('setStatus', { status: ctx.args[0], message: ctx.args[1] }); else if (type === 'default') this.client.bot.editStatus('online', this.client.config.status); + else if (type === 'custom') + // @ts-ignore + this.client.bot.editStatus({ + type: 4, + name: 'craig', + state: ctx.args[1] + }); else this.client.bot.editStatus(type, { type: 0,