From 79ef242f73ffc445a64dd75996ad10a16607f251 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 31 Jan 2021 12:32:30 -0500 Subject: [PATCH] Update what-anime with new features --- commands/analyze/what-anime.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/commands/analyze/what-anime.js b/commands/analyze/what-anime.js index 103d856d..1b38745d 100644 --- a/commands/analyze/what-anime.js +++ b/commands/analyze/what-anime.js @@ -46,7 +46,7 @@ module.exports = class WhatAnimeCommand extends Command { const title = `${result.title}${result.episode ? ` episode ${result.episode}` : ''}`; return msg.reply(stripIndents` I'm ${result.prob}% sure this is from ${title}. - ${result.prob < 87 ? '_This probablity is rather low, try using a higher quality image._' : ''} + ${result.prob < 90 ? '_This probablity is rather low, try using a higher quality image._' : ''} `, result.preview ? { files: [{ attachment: result.preview, name: 'preview.mp4' }] } : {}); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); @@ -56,7 +56,7 @@ module.exports = class WhatAnimeCommand extends Command { async fetchRateLimit() { try { const { body } = await request.get('https://trace.moe/api/me'); - return { status: body.quota > 0, refresh: body.quota_ttl }; + return { status: body.limit > 0, refresh: body.limit_ttl }; } catch { return { status: false, refresh: Infinity }; } @@ -83,7 +83,9 @@ module.exports = class WhatAnimeCommand extends Command { .get(`https://media.trace.moe/video/${data.anilist_id}/${encodeURIComponent(data.filename)}`) .query({ t: data.at, - token: data.tokenthumb + token: data.tokenthumb, + mute: true, + size: 's' }); return body; } catch { diff --git a/package.json b/package.json index b0e870a5..f6097cc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "128.3.0", + "version": "128.3.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {