mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
say, embed, and code
This commit is contained in:
@@ -16,6 +16,6 @@ module.exports = class CanYouNot extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
return message.channel.send('Can YOU not?');
|
||||
return message.say('Can YOU not?');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,6 +20,6 @@ module.exports = class GiveFlowerCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
return message.channel.send('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
return message.say('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,6 +16,6 @@ module.exports = class LennyCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
return message.channel.send('( ͡° ͜ʖ ͡°)');
|
||||
return message.say('( ͡° ͜ʖ ͡°)');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,6 +23,6 @@ module.exports = class NitroCommand extends commando.Command {
|
||||
.setColor(0x748BD9)
|
||||
.setURL("https://discordapp.com/nitro")
|
||||
.setDescription("This Message can only be viewed by members with Discord Nitro.\n\n\n[More Information](https://discordapp.com/nitro)");
|
||||
return message.channel.sendEmbed(embed);
|
||||
return message.embed(embed);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,14 +30,14 @@ module.exports = class RemindCommand extends commando.Command {
|
||||
try {
|
||||
let remindTime = sherlock.parse(remindMe);
|
||||
let time = remindTime.startDate.getTime() - Date.now();
|
||||
let preRemind = await message.channel.send(`I will remind you '${remindTime.eventTitle}' ${moment().add(time, 'ms').fromNow()}.`);
|
||||
let preRemind = await message.say(`I will remind you '${remindTime.eventTitle}' ${moment().add(time, 'ms').fromNow()}.`);
|
||||
const remindMessage = await new Promise(resolve => {
|
||||
setTimeout(() => resolve(message.channel.send(`${message.author} you wanted me to remind you of: '${remindTime.eventTitle}'`)), time);
|
||||
setTimeout(() => resolve(message.say(`${message.author} you wanted me to remind you of: '${remindTime.eventTitle}'`)), time);
|
||||
});
|
||||
return [preRemind, remindMessage];
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Something went wrong! Perhaps you didn't enter a valid time with your data?");
|
||||
return message.say(":x: Error! Something went wrong! Perhaps you didn't enter a valid time with your data?");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,6 +16,6 @@ module.exports = class SlowClapCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
return message.channel.send('*slow clap*');
|
||||
return message.say('*slow clap*');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -35,12 +35,12 @@ module.exports = class SoundBoardCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let voiceChannel = message.member.voiceChannel;
|
||||
if (!voiceChannel) return message.channel.send(`:x: Error! Please be in a voice channel first!`);
|
||||
if (!voiceChannel) return message.say(`:x: Error! Please be in a voice channel first!`);
|
||||
let soundToPlay = args.sound.toLowerCase();
|
||||
let alreadyConnected = await this.client.voiceConnections.get(voiceChannel.guild.id);
|
||||
if (alreadyConnected) {
|
||||
if (alreadyConnected.channel.id === voiceChannel.id) return message.channel.send(':x: Error! I am already playing a sound!');
|
||||
return message.channel.send(':x: Error! I am already playing a sound!');
|
||||
if (alreadyConnected.channel.id === voiceChannel.id) return message.say(':x: Error! I am already playing a sound!');
|
||||
return message.say(':x: Error! I am already playing a sound!');
|
||||
}
|
||||
let connection = await voiceChannel.join();
|
||||
let stream = sounds.paths[soundToPlay];
|
||||
|
||||
@@ -37,10 +37,10 @@ module.exports = class TodayCommand extends commando.Command {
|
||||
.setTitle(`On this day (${responseData.date})...`)
|
||||
.setTimestamp()
|
||||
.setDescription(`${responseData.data.Events[randomNumber].text} (${responseData.data.Events[randomNumber].year})`);
|
||||
return message.channel.sendEmbed(embed);
|
||||
return message.embed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.say(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user