mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Updates
This commit is contained in:
@@ -7,7 +7,7 @@ module.exports = class BCommand extends Command {
|
||||
aliases: ['🅱'],
|
||||
group: 'text-edit',
|
||||
memberName: 'b',
|
||||
description: '🅱.',
|
||||
description: 'Replaces b with 🅱.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class CowSayCommand extends Command {
|
||||
name: 'cow-say',
|
||||
group: 'text-edit',
|
||||
memberName: 'cow-say',
|
||||
description: 'Converts text to cow-say.',
|
||||
description: 'Makes a cow say your text.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class DECTalkCommand extends Command {
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text do you want to convert to TTS?',
|
||||
prompt: 'What text do you want to say?',
|
||||
type: 'string',
|
||||
max: 1000
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class EmbedCommand extends Command {
|
||||
name: 'embed',
|
||||
group: 'text-edit',
|
||||
memberName: 'embed',
|
||||
description: 'Sends a message in an embed.',
|
||||
description: 'Sends text in an embed.',
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
args: [
|
||||
{
|
||||
|
||||
@@ -7,12 +7,12 @@ module.exports = class PortalSendCommand extends Command {
|
||||
aliases: ['send-portal-message', 'portal-message', 'send-portal-msg', 'portal-msg'],
|
||||
group: 'text-edit',
|
||||
memberName: 'portal-send',
|
||||
description: 'Send a message to a random channel with `<portal>` in the topic.',
|
||||
description: 'Send a message to a random channel with "<portal>" in the topic.',
|
||||
guildOnly: true,
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like to send?',
|
||||
key: 'message',
|
||||
prompt: 'What message would you like to send?',
|
||||
type: 'string',
|
||||
max: 1000
|
||||
}
|
||||
@@ -20,14 +20,14 @@ module.exports = class PortalSendCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { text }) {
|
||||
if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(text)) return msg.reply('Please do not send invites.');
|
||||
async run(msg, { message }) {
|
||||
if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(message)) return msg.reply('Please do not send invites.');
|
||||
const valid = this.client.channels.filter(channel => channel.type === 'text' && channel.guild.id !== msg.guild.id);
|
||||
const channels = valid.filter(channel => channel.topic && channel.topic.toLowerCase().includes('<portal>'));
|
||||
if (!channels.size) return msg.say('No channels have an open portal.');
|
||||
const channel = channels.random();
|
||||
try {
|
||||
await channel.send(`**${msg.author.tag} (${msg.guild.name})**: ${text}`);
|
||||
await channel.send(`**${msg.author.tag} (${msg.guild.name})**: ${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!');
|
||||
|
||||
@@ -12,11 +12,7 @@ module.exports = class SayCommand extends Command {
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like XiaoBot to say?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if (!text.includes('@everyone') && !text.includes('@here')) return true;
|
||||
return 'Invalid text, please do not say everyone or here mentions.';
|
||||
}
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -9,11 +9,11 @@ module.exports = class SuperscriptCommand extends Command {
|
||||
aliases: ['tiny-text', 'small-text'],
|
||||
group: 'text-edit',
|
||||
memberName: 'superscript',
|
||||
description: 'Makes text become tiny text.',
|
||||
description: 'Converts text to tiny text.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like to make tiny?',
|
||||
prompt: 'What text would you like to convert to tiny text?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = class TranslateCommand extends Command {
|
||||
aliases: ['yandex', 'yandex-translate'],
|
||||
group: 'text-edit',
|
||||
memberName: 'translate',
|
||||
description: 'Translates text to a specified language.',
|
||||
description: 'Translates text to a specific language.',
|
||||
details: `**Codes**: ${Object.keys(codes).join(', ')}`,
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
args: [
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = class WebhookCommand extends Command {
|
||||
clientPermissions: ['MANAGE_MESSAGES'],
|
||||
args: [
|
||||
{
|
||||
key: 'content',
|
||||
key: 'message',
|
||||
prompt: 'What text would you like the webhook to say?',
|
||||
type: 'string'
|
||||
}
|
||||
@@ -22,10 +22,10 @@ module.exports = class WebhookCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { content }) {
|
||||
async run(msg, { message }) {
|
||||
if (msg.channel.type === 'text') await msg.delete();
|
||||
try {
|
||||
await snekfetch.post(WEBHOOK_URL).send({ content });
|
||||
await snekfetch.post(WEBHOOK_URL).send({ content: message });
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
|
||||
@@ -13,7 +13,8 @@ module.exports = class YodaCommand extends Command {
|
||||
args: [
|
||||
{
|
||||
key: 'sentence',
|
||||
prompt: 'What sentence would you like to convert to Yoda speak?',
|
||||
label: 'text',
|
||||
prompt: 'What text would you like to convert to Yoda speak?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user