mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix that
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = class YearsCommand extends Command {
|
||||
az.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'az.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class BeautifulCommand extends Command {
|
||||
grunkle.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'beautiful.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ module.exports = class BobRossCommand extends Command {
|
||||
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'bobross.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = class GreyscaleCommand extends Command {
|
||||
avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'greyscale.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = class InvertCommand extends Command {
|
||||
avatar.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'invert.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class RIPCommand extends Command {
|
||||
grave.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'rip.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'steamcard.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class TriggeredCommand extends Command {
|
||||
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'triggered.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class WantedCommand extends Command {
|
||||
wanted.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.channel.send({ files: [{ attachment: buff, name: 'wanted.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,6 +42,6 @@ module.exports = class MemeCommand extends Command {
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
const { type, top, bottom } = args;
|
||||
return msg.channel.send({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,6 +15,6 @@ module.exports = class SpamCommand extends Command {
|
||||
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
return msg.channel.send({ files: ['https://i.imgur.com/2JFu5xE.jpg'] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class CatCommand extends Command {
|
||||
const { body } = await request
|
||||
.get('http://random.cat/meow');
|
||||
return msg.channel.send({ files: [body.file] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class DogCommand extends Command {
|
||||
const { body } = await request
|
||||
.get('https://random.dog/woof.json');
|
||||
return msg.channel.send({ files: [body.url] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ module.exports = class XiaoCommand extends Command {
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
|
||||
return msg.channel.send({ files: [xiao] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ module.exports = class MapCommand extends Command {
|
||||
const { body } = await request
|
||||
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${query}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
|
||||
return msg.channel.send({ files: [{ attachment: body, name: 'map.png' }] })
|
||||
.catch (err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ class Database {
|
||||
.then(() => console.log('[Database] Synchronizing...'))
|
||||
.then(() => database.sync()
|
||||
.then(() => console.log('[Database] Synchronizing complete!'))
|
||||
.catch (err => console.error(`[Database] Error synchronizing: ${err}`))
|
||||
.catch(err => console.error(`[Database] Error synchronizing: ${err}`))
|
||||
)
|
||||
.then(() => console.log('[Database] Ready!'))
|
||||
.catch (err => console.error(`[Database] Unable to connect: ${err}`));
|
||||
.catch(err => console.error(`[Database] Unable to connect: ${err}`));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user