Add better responses

This commit is contained in:
Max Isom 2020-03-17 17:59:26 -05:00
parent 1a1bdfd674
commit 15d4e251f2
17 changed files with 103 additions and 63 deletions

View file

@ -2,6 +2,7 @@ import {Message} from 'discord.js';
import {TYPES} from '../types';
import {inject, injectable} from 'inversify';
import QueueManager from '../managers/queue';
import errorMsg from '../utils/error-msg';
import Command from '.';
@injectable()
@ -21,12 +22,13 @@ export default class implements Command {
const queue = this.queueManager.get(msg.guild!.id).get();
if (queue.length <= 2) {
await msg.channel.send('error: not enough songs to shuffle');
await msg.channel.send(errorMsg('not enough songs to shuffle'));
return;
}
this.queueManager.get(msg.guild!.id).shuffle();
await msg.channel.send('`' + JSON.stringify(this.queueManager.get(msg.guild!.id).get().slice(0, 10)) + '`');
// TODO: better response
await msg.channel.send('shuffled');
}
}