Closed xaxa-0x3F closed 3 years ago
it seems like it has nothing to do with package
Why you using await and then at the same time while defining test variable..Either use await or then...here's a quick example that might work:
const test = await animeapi.search(name);
And now you can test as the fetched data from anime scraper..
And uh if you wanne use then instead of await, then don't put it in a variable and await it, you can simply do:
animeapi.search(name).then(data => {
//your code here, you can use "data" as the fetched data from anime scraper
});
Hope it helps.
Why you using await and then at the same time while defining test variable..Either use await or then...here's a quick example that might work:
const test = await animeapi.search(name);
And now you can test as the fetched data from anime scraper..
And uh if you wanne use then instead of await, then don't put it in a variable and await it, you can simply do:
animeapi.search(name).then(data => { //your code here, you can use "data" as the fetched data from anime scraper });
Hope it helps.
thank you so much for this didn't realize.
Hello, I am running this if statement to find the number in a message and no matter what I change (i've tried lots of different options,) when the
else
statement is triggered there's nothing returning from the api search, however the conosle.log does return which confuses me if you can help I would appreciate it.