mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
A
This commit is contained in:
@@ -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...');
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user