What Anime now supports up to 10MB images

This commit is contained in:
Dragon Fire
2019-09-24 13:40:51 -04:00
parent 2f18a692d4
commit a0621c28e8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ module.exports = class WhatAnimeCommand extends Command {
}
const { body } = await request.get(screenshot);
const result = await this.search(body, msg.channel.nsfw);
if (result === 'size') return msg.reply('Please do not send an image larger than 1MB.');
if (result === 'size') return msg.reply('Please do not send an image larger than 10MB.');
if (result.nsfw) return msg.reply('This is from a hentai, and this isn\'t an NSFW channel, pervert.');
return msg.reply(
`I'm ${result.prob}% sure this is from ${result.title}${result.episode
@@ -61,7 +61,7 @@ module.exports = class WhatAnimeCommand extends Command {
}
async search(file) {
if (Buffer.byteLength(file) > 1e+6) return 'size';
if (Buffer.byteLength(file) > 1e+7) return 'size';
const { body } = await request
.post('https://trace.moe/api/search')
.query({ token: WHATANIME_KEY })
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "107.7.1",
"version": "107.7.2",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {