Fixed the error prevention in the neko command
This commit is contained in:
parent
927e306e9a
commit
98e47e3796
|
@ -15,7 +15,7 @@ export default new Command({
|
||||||
any: new Command({
|
any: new Command({
|
||||||
description: "Image type to send.",
|
description: "Image type to send.",
|
||||||
async run($: CommonLibrary): Promise<any> {
|
async run($: CommonLibrary): Promise<any> {
|
||||||
if (!$.args[0] in endpoints.sfw)
|
if (!($.args[0] in endpoints.sfw))
|
||||||
return $.channel.send("Couldn't find that endpoint!");
|
return $.channel.send("Couldn't find that endpoint!");
|
||||||
let baseURL = 'https://nekos.life/api/v2';
|
let baseURL = 'https://nekos.life/api/v2';
|
||||||
let url = new URL(`${baseURL}${endpoints.sfw[$.args[0]]}`);
|
let url = new URL(`${baseURL}${endpoints.sfw[$.args[0]]}`);
|
||||||
|
|
Loading…
Reference in New Issue