Fixed the error prevention in the neko command

This commit is contained in:
WatDuhHekBro 2020-12-14 02:13:31 -06:00
parent 927e306e9a
commit 98e47e3796
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export default new Command({
any: new Command({
description: "Image type to send.",
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!");
let baseURL = 'https://nekos.life/api/v2';
let url = new URL(`${baseURL}${endpoints.sfw[$.args[0]]}`);