Updated readme, check if bot has permissions to send messages

This commit is contained in:
TheEssem 2019-12-16 17:14:29 -06:00
parent 3a02efef70
commit 1e8c7a6497
5 changed files with 8 additions and 5 deletions

View file

@ -28,7 +28,6 @@ exports.run = async (message, args) => {
}
});
}
//if (embeds.length === 0) return `${message.author.mention}, I couldn't find any results!`;
return paginator(message, embeds);
};

View file

@ -1,7 +1,7 @@
const client = require("../utils/client.js");
exports.run = async (message, args) => {
if (!message.member.permission.has("manageMessages")) return `${message.author.mention}, you need to have the \`Manage Messages\` permission on this server to ban people!`;
if (!message.member.permission.has("manageMessages")) return `${message.author.mention}, you need to have the \`Manage Messages\` permission on this server to purge messages!`;
if (!message.channel.guild.members.get(client.user.id).permission.has("manageMessages") && !message.channel.permissionsOf(client.user.id).has("manageMessages")) return `${message.author.mention}, I don't have the \`Manage Messages\` permission!`;
if (args.length === 0 || !args[0].match(/^\d+$/)) return `${message.author.mention}, you need to provide the number of messages to purge!`;
const numberOfMessages = parseInt(args[0]) + 1;

View file

@ -10,7 +10,6 @@ exports.run = async (message) => {
gm(image.data).size(async (error, size) => {
if (error) throw error;
const data = gm(image.data).resize(`${(size.width * 19) / 2}x${size.height / 2}!`);
//.gravity("Center").extent(size.width, size.height)
const resultBuffer = await gmToBuffer(data);
return message.channel.createMessage("", {
file: resultBuffer,