mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Fix Error
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = class YearsCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = class BeautifulCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = class BobRossCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module.exports = class RIPCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = class SteamCardCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const username = message.guild ? message.guild.member(user).displayName : user.username;
|
const username = message.guild ? message.guild.member(user).displayName : user.username;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module.exports = class MathGameCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { difficulty } = args;
|
const { difficulty } = args;
|
||||||
const operation = operations[Math.floor(Math.random() * operations.length)];
|
const operation = operations[Math.floor(Math.random() * operations.length)];
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ module.exports = class QuizCommand extends Command {
|
|||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
try {
|
try {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ module.exports = class TypingGameCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { difficulty } = args;
|
const { difficulty } = args;
|
||||||
const sentence = sentences[Math.floor(Math.random() * sentences.length)];
|
const sentence = sentences[Math.floor(Math.random() * sentences.length)];
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class GuildInfoCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setColor(0x00AE86)
|
.setColor(0x00AE86)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ module.exports = class MemeCommand extends Command {
|
|||||||
|
|
||||||
run(message, args) {
|
run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { type, toprow, bottomrow } = args;
|
const { type, toprow, bottomrow } = args;
|
||||||
return message.channel.send({files: [`https://memegen.link/${type}/${toprow}/${bottomrow}.jpg`]})
|
return message.channel.send({files: [`https://memegen.link/${type}/${toprow}/${bottomrow}.jpg`]})
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ module.exports = class BanCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('BAN_MEMBERS');
|
return msg.member.hasPermission('BAN_MEMBERS');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('BAN_MEMBERS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS'))
|
||||||
return message.say('This Command requires the `Ban Members` Permission.');
|
return message.say('This Command requires the `Ban Members` Permission.');
|
||||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||||
if (!modlogs)
|
if (!modlogs)
|
||||||
return message.say('This Command requires a channel named `mod_logs`.');
|
return message.say('This Command requires a channel named `mod_logs`.');
|
||||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { member, reason } = args;
|
const { member, reason } = args;
|
||||||
if (!member.bannable)
|
if (!member.bannable)
|
||||||
|
|||||||
@@ -28,16 +28,16 @@ module.exports = class KickCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('KICK_MEMBERS');
|
return msg.member.hasPermission('KICK_MEMBERS');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('KICK_MEMBERS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS'))
|
||||||
return message.say('This Command requires the `Kick Members` Permission.');
|
return message.say('This Command requires the `Kick Members` Permission.');
|
||||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||||
if (!modlogs)
|
if (!modlogs)
|
||||||
return message.say('This Command requires a channel named `mod_logs`.');
|
return message.say('This Command requires a channel named `mod_logs`.');
|
||||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { member, reason } = args;
|
const { member, reason } = args;
|
||||||
if (!member.kickable)
|
if (!member.kickable)
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ module.exports = class LockdownCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('ADMINISTRATOR');
|
return msg.member.hasPermission('ADMINISTRATOR');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ADMINISTRATOR'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ADMINISTRATOR'))
|
||||||
return message.say('This Command requires the `Administrator` Permission.');
|
return message.say('This Command requires the `Administrator` Permission.');
|
||||||
const { type } = args;
|
const { type } = args;
|
||||||
if (type === 'start') {
|
if (type === 'start') {
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ module.exports = class PruneCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('MANAGE_MESSAGES');
|
return msg.member.hasPermission('MANAGE_MESSAGES');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('READ_MESSAGE_HISTORY'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGE_HISTORY'))
|
||||||
return message.say('This Command requires the `Read Message History` Permission.');
|
return message.say('This Command requires the `Read Message History` Permission.');
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('MANAGE_MESSAGES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES'))
|
||||||
return message.say('This Command requires the `Manage Messages` Permission.');
|
return message.say('This Command requires the `Manage Messages` Permission.');
|
||||||
let { count } = args;
|
let { count } = args;
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
|
|||||||
@@ -35,16 +35,16 @@ module.exports = class UnbanCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('BAN_MEMBERS');
|
return msg.member.hasPermission('BAN_MEMBERS');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('BAN_MEMBERS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS'))
|
||||||
return message.say('This Command requires the `Ban Members` Permission.');
|
return message.say('This Command requires the `Ban Members` Permission.');
|
||||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||||
if (!modlogs)
|
if (!modlogs)
|
||||||
return message.say('This Command requires a channel named `mod_logs`.');
|
return message.say('This Command requires a channel named `mod_logs`.');
|
||||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { memberID, reason } = args;
|
const { memberID, reason } = args;
|
||||||
const bans = await message.guild.fetchBans();
|
const bans = await message.guild.fetchBans();
|
||||||
|
|||||||
@@ -27,14 +27,14 @@ module.exports = class WarnCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPermission(msg) {
|
hasPermission(msg) {
|
||||||
return msg.member.permissions.has('MANAGE_MESSAGES');
|
return msg.member.hasPermission('MANAGE_MESSAGES');
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
const modlogs = message.guild.channels.find('name', 'mod_logs');
|
||||||
if (!modlogs)
|
if (!modlogs)
|
||||||
return message.say('This Command requires a channel named `mod_logs`.');
|
return message.say('This Command requires a channel named `mod_logs`.');
|
||||||
if (!modlogs.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!modlogs.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { member, reason } = args;
|
const { member, reason } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module.exports = class NitroCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setAuthor('Discord Nitro')
|
.setAuthor('Discord Nitro')
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ module.exports = class SpamCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
return message.channel.send({files: ['./images/Spam.jpg']});
|
return message.channel.send({files: ['./images/Spam.jpg']});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ module.exports = class TodayCommand extends Command {
|
|||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
try {
|
try {
|
||||||
const { text } = await request
|
const { text } = await request
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ module.exports = class WouldYouRatherCommand extends Command {
|
|||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
try {
|
try {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module.exports = class CatCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const cat = cats[Math.floor(Math.random() * cats.length)];
|
const cat = cats[Math.floor(Math.random() * cats.length)];
|
||||||
return message.channel.send({files: [`./images/Cat${cat}`]});
|
return message.channel.send({files: [`./images/Cat${cat}`]});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module.exports = class PotatoCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const potato = potatoes[Math.floor(Math.random() * potatoes.length)];
|
const potato = potatoes[Math.floor(Math.random() * potatoes.length)];
|
||||||
return message.channel.send({files: [`./images/Potato${potato}`]});
|
return message.channel.send({files: [`./images/Potato${potato}`]});
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module.exports = class RandomPunCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const pun = puns[Math.floor(Math.random() * puns.length)];
|
const pun = puns[Math.floor(Math.random() * puns.length)];
|
||||||
return message.channel.send({files: [`./images/Pun${pun}`]});
|
return message.channel.send({files: [`./images/Pun${pun}`]});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module.exports = class XiaoCommand extends Command {
|
|||||||
|
|
||||||
run(message) {
|
run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
|
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
|
||||||
return message.channel.send({files: [`./images/Xiao${xiao}`]});
|
return message.channel.send({files: [`./images/Xiao${xiao}`]});
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = class BotSearchCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
let { bot } = args;
|
let { bot } = args;
|
||||||
bot = bot.id;
|
bot = bot.id;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class DefineCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { word } = args;
|
const { word } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ module.exports = class DiscrimCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { discrim } = args;
|
const { discrim } = args;
|
||||||
const users = await this.client.users.filter(u => u.discriminator === discrim).map(u => u.username).sort();
|
const users = await this.client.users.filter(u => u.discriminator === discrim).map(u => u.username).sort();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = class ForecastCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { location } = args;
|
const { location } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class IMDBCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { movie } = args;
|
const { movie } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ module.exports = class MapCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||||
return message.say('This Command requires the `Attach Files` Permission.');
|
return message.say('This Command requires the `Attach Files` Permission.');
|
||||||
const { zoom, location } = args;
|
const { zoom, location } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class OsuCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { username } = args;
|
const { username } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class SoundCloudCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { query } = args;
|
const { query } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class UrbanCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { word } = args;
|
const { word } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class WattpadCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { book } = args;
|
const { book } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = class WeatherCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { location } = args;
|
const { location } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class WikipediaCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { query } = args;
|
const { query } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class YouTubeCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { video } = args;
|
const { video } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class YuGiOhCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { card } = args;
|
const { card } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ module.exports = class EmbedCommand extends Command {
|
|||||||
|
|
||||||
run(message, args) {
|
run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { text } = args;
|
const { text } = args;
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module.exports = class SayCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(message, args) {
|
run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('MANAGE_MESSAGES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES'))
|
||||||
return message.say('This Command requires the `Manage Messages` Permission.');
|
return message.say('This Command requires the `Manage Messages` Permission.');
|
||||||
const { text } = args;
|
const { text } = args;
|
||||||
message.delete();
|
message.delete();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module.exports = class WebhookCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('MANAGE_MESSAGES'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES'))
|
||||||
return message.say('This Command requires the `Manage Messages` Permission.');
|
return message.say('This Command requires the `Manage Messages` Permission.');
|
||||||
const { text } = args;
|
const { text } = args;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module.exports = class UserInfoCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { user } = args;
|
const { user } = args;
|
||||||
const member = await message.guild.fetchMember(user);
|
const member = await message.guild.fetchMember(user);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = class InfoCommand extends Command {
|
|||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const guilds = await this.client.shard.fetchClientValues('guilds.size');
|
const guilds = await this.client.shard.fetchClientValues('guilds.size');
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = class ShardInfoCommand extends Command {
|
|||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
if (message.channel.type !== 'dm')
|
if (message.channel.type !== 'dm')
|
||||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('EMBED_LINKS'))
|
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS'))
|
||||||
return message.say('This Command requires the `Embed Links` Permission.');
|
return message.say('This Command requires the `Embed Links` Permission.');
|
||||||
const { shardID } = args;
|
const { shardID } = args;
|
||||||
if (shardID > this.client.options.shardCount - 1 || shardID < 0)
|
if (shardID > this.client.options.shardCount - 1 || shardID < 0)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "15.4.2",
|
"version": "15.4.3",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user