diff --git a/README.md b/README.md index 012da09..103ec52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Logogram Discord Bot - A FFXIV Eureka Utility Bot | V1.1.3 - 2025/09/14 +# Logogram Discord Bot - A FFXIV Eureka Utility Bot | V1.1.4 - 2025/09/14 A Discord bot for Eureka Logos Actions and their recipes. ## Commands diff --git a/config.example.ts b/config.example.ts index 0f5f04e..84345eb 100755 --- a/config.example.ts +++ b/config.example.ts @@ -1,6 +1,6 @@ export const config = { 'name': 'Logogram Bot', // Name of the bot - 'version': '1.1.3', // Version of the bot + 'version': '1.1.4', // Version of the bot 'token': 'the_bot_token', // Discord API Token for this bot 'localToken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token" 'prefix': 'l!', // Prefix for all commands diff --git a/mod.ts b/mod.ts index 7f68af4..dc7909b 100755 --- a/mod.ts +++ b/mod.ts @@ -138,6 +138,7 @@ startBot({ const query = rawQuery.toLowerCase(); if (data.ActionNames.includes(query)) { + log(LT.LOG, `in name matched '${query}'`); const singleAction: Array = [data.ActionNames.indexOf(query)]; message.send({ content: 'Showing single action:', @@ -145,7 +146,8 @@ startBot({ }).catch((e) => { log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); }); - } else if (data.ActionShortNames.includes(query)) { + } else if (query && data.ActionShortNames.includes(query)) { + log(LT.LOG, `in shorthand matched '${query}'`); const searchResults: Array = data.Actions.filter((action) => action.shorthand === query).map((action) => data.ActionNames.indexOf(action.name.toLowerCase())); message.send({ content: searchResults.length > 1 ? `Showing ${searchResults.length} actions:` : 'Showing single action:', @@ -154,6 +156,7 @@ startBot({ log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`); }); } else { + log(LT.LOG, `in general search '${query}'`); const initialSearchResults: Array = data.ActionNames.filter((action) => action.includes(query)).map((action) => data.ActionNames.indexOf(action)); const searchResults: Array = initialSearchResults.filter((actionIdx) => params.class ? (data.Actions[actionIdx].jobs.includes('all-nin') && !params.isNin) || data.Actions[actionIdx].jobs.includes('all') || data.Actions[actionIdx].jobs.includes(params.class) : true