mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Fix lint
This commit is contained in:
@@ -80,7 +80,7 @@ module.exports = class AnimeCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { query }) {
|
async run(msg, { query }) {
|
||||||
try {
|
try {
|
||||||
const id = await this.search(query, msg.channel.nsfw);
|
const id = await this.search(query);
|
||||||
if (!id) return msg.say('Could not find any results.');
|
if (!id) return msg.say('Could not find any results.');
|
||||||
const anime = await this.fetchAnime(id);
|
const anime = await this.fetchAnime(id);
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
@@ -100,7 +100,7 @@ module.exports = class AnimeCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async search(query, nsfw) {
|
async search(query) {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.post('https://graphql.anilist.co/')
|
.post('https://graphql.anilist.co/')
|
||||||
.send({
|
.send({
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ module.exports = class MangaCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { query }) {
|
async run(msg, { query }) {
|
||||||
try {
|
try {
|
||||||
const id = await this.search(query, msg.channel.nsfw);
|
const id = await this.search(query);
|
||||||
if (!id) return msg.say('Could not find any results.');
|
if (!id) return msg.say('Could not find any results.');
|
||||||
const manga = await this.fetchAnime(id);
|
const manga = await this.fetchAnime(id);
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
@@ -85,7 +85,7 @@ module.exports = class MangaCommand extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async search(query, nsfw) {
|
async search(query) {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.post('https://graphql.anilist.co/')
|
.post('https://graphql.anilist.co/')
|
||||||
.send({
|
.send({
|
||||||
|
|||||||
Reference in New Issue
Block a user