mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Change to process.env
This commit is contained in:
@@ -4,7 +4,7 @@ const snekfetch = require('snekfetch');
|
||||
const { cleanXML } = require('../../structures/Util');
|
||||
const { promisifyAll } = require('tsubaki');
|
||||
const xml = promisifyAll(require('xml2js'));
|
||||
const { animelistLogin } = require('../../config');
|
||||
const { ANIMELIST_LOGIN } = process.env;
|
||||
|
||||
module.exports = class AnimeCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -28,7 +28,7 @@ module.exports = class AnimeCommand extends Command {
|
||||
const { query } = args;
|
||||
try {
|
||||
const { text } = await snekfetch
|
||||
.get(`https://${animelistLogin}@myanimelist.net/api/anime/search.xml`)
|
||||
.get(`https://${ANIMELIST_LOGIN}@myanimelist.net/api/anime/search.xml`)
|
||||
.query({ q: query });
|
||||
const { anime } = await xml.parseStringAsync(text);
|
||||
const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2048));
|
||||
|
||||
Reference in New Issue
Block a user