Fixed wikihow classic command bug

This commit is contained in:
Essem 2022-04-22 09:42:11 -05:00 committed by GitHub
parent 6bf0537c29
commit c4e31ac409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import Command from "../../classes/command.js";
class WikihowCommand extends Command {
async run() {
if (!this.interaction.acknowledged) await this.acknowledge();
await this.acknowledge();
const request = await fetch("https://www.wikihow.com/api.php?action=query&generator=random&prop=imageinfo&format=json&iiprop=url&grnnamespace=6");
const json = await request.json();
const id = Object.keys(json.query.pages)[0];