mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Fix
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = class MockingCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { text }) {
|
||||
const canEmoji = msg.channel.type === 'text'
|
||||
const canEmoji = msg.guild
|
||||
? msg.channel.permissionsFor(this.client.user).has('USE_EXTERNAL_EMOJIS')
|
||||
: true;
|
||||
const letters = text.split('');
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class SayCommand extends Command {
|
||||
|
||||
async run(msg, { text }) {
|
||||
try {
|
||||
if (msg.channel.type === 'text' && msg.deletable) await msg.delete();
|
||||
if (msg.guild && msg.deletable) await msg.delete();
|
||||
return msg.say(text);
|
||||
} catch {
|
||||
return msg.say(text);
|
||||
|
||||
@@ -23,7 +23,7 @@ module.exports = class WebhookCommand extends Command {
|
||||
|
||||
async run(msg, { content }) {
|
||||
try {
|
||||
if (msg.channel.type === 'text' && msg.deletable) await msg.delete();
|
||||
if (msg.guild && msg.deletable) await msg.delete();
|
||||
await this.client.webhook.send(content);
|
||||
return null;
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user