Steam Command

This commit is contained in:
Daniel Odendahl Jr
2017-07-30 02:26:21 +00:00
parent a02d08ffef
commit 48e1775215
5 changed files with 52 additions and 2 deletions
+2 -1
View File
@@ -26,7 +26,8 @@ module.exports = class PortalSendCommand extends Command {
async run(msg, args) {
const { message } = args;
const channel = parseTopic(this.client.channels, 'portal', this.client.user).random();
const channels = this.client.channels.filter(c => c.guild.id !== msg.guild.id);
const channel = parseTopic(channels, 'portal', this.client.user).random();
if (!channel) return msg.say('Aww... No channel has an open portal...');
try {
await channel.send(`**${msg.author.tag} (${msg.guild.name}):** ${message}`);