Compare commits
2 Commits
05ddddf145
...
2b6b86c8cc
Author | SHA1 | Date |
---|---|---|
Ean Milligan | 2b6b86c8cc | |
Ean Milligan | 73b958d076 |
|
@ -1,4 +1,4 @@
|
|||
# Logogram Discord Bot - A FFXIV Eureka Utility Bot | V1.1.2 - 2025/09/13
|
||||
# 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
|
||||
|
@ -14,6 +14,8 @@ A Discord bot for Eureka Logos Actions and their recipes.
|
|||
- Use to view more search results
|
||||
- `preset` or `p`
|
||||
- Shows a pre-made list of actions for convenient viewing
|
||||
- `flowchart` or `flow` or `f`
|
||||
- Shows a simple flowchart for best actions
|
||||
- `info` or `i`
|
||||
- Shows info about bot
|
||||
- `version` or `v`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export const config = {
|
||||
'name': 'Logogram Bot', // Name of the bot
|
||||
'version': '1.1.2', // 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
|
||||
|
|
11
mod.ts
11
mod.ts
|
@ -94,6 +94,12 @@ startBot({
|
|||
message.send(constantCmds.version).catch((e) => {
|
||||
log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`);
|
||||
});
|
||||
} else if (command === 'flowchart' || command === 'flow' || command === 'f') {
|
||||
// l!flowchart or l!flow or l!logos or l!f
|
||||
// Returns logos actions stuff
|
||||
message.send(constantCmds.flowchart).catch((e) => {
|
||||
log(LT.ERROR, `Failed to send message: ${JSON.stringify(message)} | ${JSON.stringify(e)}`);
|
||||
});
|
||||
} else if (command === 'logograms' || command === 'logogram' || command === 'logos' || command === 'logo' || command === 'l') {
|
||||
// l!logograms or l!logograms or l!logos or l!logo or l!l
|
||||
// Returns logos actions stuff
|
||||
|
@ -132,6 +138,7 @@ startBot({
|
|||
const query = rawQuery.toLowerCase();
|
||||
|
||||
if (data.ActionNames.includes(query)) {
|
||||
log(LT.LOG, `in name matched '${query}'`);
|
||||
const singleAction: Array<number> = [data.ActionNames.indexOf(query)];
|
||||
message.send({
|
||||
content: 'Showing single action:',
|
||||
|
@ -139,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<number> = 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:',
|
||||
|
@ -148,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<number> = data.ActionNames.filter((action) => action.includes(query)).map((action) => data.ActionNames.indexOf(action));
|
||||
const searchResults: Array<number> = 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
|
||||
|
|
|
@ -32,6 +32,11 @@ export const constantCmds = {
|
|||
value: 'Sends information about the requested preset list',
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `\`${config.prefix}flowchart]\` or \`${config.prefix}f\``,
|
||||
value: 'Shows a simple flowchart for best actions',
|
||||
inline: true,
|
||||
},
|
||||
],
|
||||
}],
|
||||
},
|
||||
|
@ -55,4 +60,5 @@ export const constantCmds = {
|
|||
description: `Please type something after the command, such as \`${config.prefix}logos wisdom\`.`,
|
||||
}],
|
||||
},
|
||||
flowchart: 'https://ffxiv.eanm.dev/eureka/Simple-Logos-Flowchart.png',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue