mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Fix Error
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = class BotSearchCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
let { bot } = args;
|
||||
bot = bot.id;
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class DefineCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { word } = args;
|
||||
try {
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class DiscrimCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { discrim } = args;
|
||||
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) {
|
||||
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.');
|
||||
const { location } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class IMDBCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { movie } = args;
|
||||
try {
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = class MapCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { zoom, location } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class OsuCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { username } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class SoundCloudCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { query } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class UrbanCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { word } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class WattpadCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { book } = args;
|
||||
try {
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class WeatherCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { location } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class WikipediaCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { query } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class YouTubeCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { video } = args;
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class YuGiOhCommand extends Command {
|
||||
|
||||
async run(message, args) {
|
||||
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.');
|
||||
const { card } = args;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user