This commit is contained in:
Daniel Odendahl Jr
2017-06-25 00:38:11 +00:00
parent 8c725c8d18
commit 7b740326dd
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -7,11 +7,16 @@ module.exports = class PortalSendCommand extends Command {
group: 'random',
memberName: 'portal-send',
description: 'Send a message to a random channel that has a portal open.',
guildOnly: true,
args: [
{
key: 'message',
prompt: 'What message do you want to send?',
type: 'string'
type: 'string',
validate: (message) => {
if (message.length < 1500) return true;
else return 'Message must be under 1500 characters.';
}
}
]
});
@@ -26,7 +31,7 @@ module.exports = class PortalSendCommand extends Command {
}).random();
if (!channel) return msg.say('Aww... No channel has an open portal...');
try {
await channel.send(message);
await channel.send(`**${msg.author} (${msg.guild.name}):** ${message}`);
return msg.say('Message sent!');
} catch (err) {
return msg.say('Failed to send message...');
+1
View File
@@ -8,6 +8,7 @@ module.exports = class SettingHelpCommand extends Command {
group: 'util',
memberName: 'setting-help',
description: 'View help on how to set up settings.',
guildOnly: true,
guarded: true
});
}