Removed XP system, fixed a few more bugs
This commit is contained in:
parent
29cd75ac3d
commit
903f5eebf0
7 changed files with 5 additions and 67 deletions
|
@ -9,6 +9,7 @@ exports.run = async (message, args) => {
|
|||
const embeds = [];
|
||||
const request = await fetch(`https://www.googleapis.com/customsearch/v1?key=${process.env.GOOGLE}&cx=${process.env.CSE}&safe=active&searchType=image&q=${encodeURIComponent(args.join(" "))}`);
|
||||
const images = await request.json();
|
||||
if (!images.items) return `${message.author.mention}, I couldn't find any results!`;
|
||||
for (const [i, value] of images.items.entries()) {
|
||||
embeds.push({
|
||||
"embed": {
|
||||
|
@ -27,7 +28,7 @@ exports.run = async (message, args) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (embeds.length === 0) return `${message.author.mention}, I couldn't find any results!`;
|
||||
//if (embeds.length === 0) return `${message.author.mention}, I couldn't find any results!`;
|
||||
return paginator(message, embeds);
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ exports.run = async (message, args) => {
|
|||
const numberOfMessages = parseInt(args[0]) + 1;
|
||||
await message.channel.purge(numberOfMessages);
|
||||
const purgeMessage = await message.channel.createMessage(`Successfully purged ${args[0]} messages.`);
|
||||
await require("util").promisify(setTimeout)(10000);
|
||||
await require("util").promisify(setTimeout)(5000);
|
||||
await purgeMessage.delete();
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@ exports.run = async (message) => {
|
|||
message.channel.sendTyping();
|
||||
const rawData = await sharp(image.data).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
||||
const qrBuffer = jsqr(rawData.data, rawData.info.width, rawData.info.height);
|
||||
if (!qrBuffer) return `${message.author.mention}, I couldn't find a QR code!`;
|
||||
return `\`\`\`\n${qrBuffer.data}\n\`\`\``;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue