mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
Portal Emoji
This commit is contained in:
@@ -18,6 +18,8 @@ MOCKING_EMOJI_ID=
|
||||
MOCKING_EMOJI_NAME=
|
||||
SILVER_FISH_EMOJI_ID=
|
||||
SILVER_FISH_EMOJI_NAME=
|
||||
PORTAL_EMOJI_ID=
|
||||
PORTAL_EMOJI_NAME=
|
||||
|
||||
# API Keys, IDs, and Secrets
|
||||
ALPHA_VANTAGE_KEY=
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { oneLine } = require('common-tags');
|
||||
const { PORTAL_EMOJI_ID, PORTAL_EMOJI_NAME } = process.env;
|
||||
|
||||
module.exports = class PortalSendCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -30,10 +32,17 @@ module.exports = class PortalSendCommand extends Command {
|
||||
if (!channels.size) return msg.reply('No channels have an open portal...');
|
||||
const channel = channels.random();
|
||||
try {
|
||||
await channel.send(`**${msg.author.tag} (${msg.channel.type === 'text' ? msg.guild.name : 'DM'}):** ${message}`);
|
||||
await channel.send(oneLine`
|
||||
**${this.portalEmoji} ${msg.author.tag} (${msg.channel.type === 'text' ? msg.guild.name : 'DM'}):**
|
||||
${message}
|
||||
`);
|
||||
return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`);
|
||||
} catch (err) {
|
||||
return msg.reply('Failed to send the message. Try again later!');
|
||||
}
|
||||
}
|
||||
|
||||
get portalEmoji() {
|
||||
return PORTAL_EMOJI_ID && PORTAL_EMOJI_NAME ? `<:${PORTAL_EMOJI_NAME}:${PORTAL_EMOJI_ID}>` : 'PORTAL';
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "111.1.0",
|
||||
"version": "111.1.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user