diff --git a/README.md b/README.md index 42cf82031..f8deacd39 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Executes specific tasks in the Skilled Discord server. +## Invite the Bot + +Join the [Skilled Discord server](https://discord.gg/ZPvcEG7DS8), click on the bot's profile, and click "Add to Server". + ## Using ### Installing dependencies @@ -10,12 +14,8 @@ Executes specific tasks in the Skilled Discord server. yarn ``` -### Configuring - -Add an `.env` file to the root of the project with your `DISCORD_TOKEN` and `WARGAMING_APPLICATION_ID` - ### Running ```bash -yarn start +yarn start discord-token= wargaming-application-id= ``` diff --git a/src/behaviors/error.ts b/src/behaviors/error.ts index bf20eea06..f48a0757a 100644 --- a/src/behaviors/error.ts +++ b/src/behaviors/error.ts @@ -17,7 +17,7 @@ function handleError(error: Error, client: Client) { ).send({ embeds: [ new EmbedBuilder() - .setTitle('Skilled Bot ran into a catastrophic error') + .setTitle(`${client.user?.username} ran into a catastrophic error`) .setColor(NEGATIVE_COLOR) .setDescription( `\`\`\`${error.name}\n${error.message}\n${error.stack}\n${error.cause}\`\`\``, diff --git a/src/commands/debug.ts b/src/commands/debug.ts index d22c4db68..c1a8da094 100644 --- a/src/commands/debug.ts +++ b/src/commands/debug.ts @@ -4,6 +4,7 @@ import { CommandRegistry } from '../behaviors/interactionCreate.js'; import { SKILLED_COLOR } from '../constants/colors.js'; import getClientId from '../utilities/getClientId.js'; import { tankopedia } from '../utilities/tankopedia.js'; +import { client } from '../index.js'; const executionStart = new Date().getTime(); @@ -23,7 +24,7 @@ export default { await interaction.reply({ embeds: [ new EmbedBuilder() - .setTitle('Skilled Bot debug information') + .setTitle(`${client.user?.username} debug information`) .setColor(SKILLED_COLOR) .setDescription( `**Version**: ${packageJSON.version}\n**Uptime**: ${Math.floor( diff --git a/src/commands/help.ts b/src/commands/help.ts index 20e654d55..5d1d8ac56 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -6,6 +6,7 @@ import { publicCommands, } from '../behaviors/interactionCreate.js'; import { SKILLED_COLOR } from '../constants/colors.js'; +import { client } from '../index.js'; export default { inProduction: true, @@ -20,10 +21,12 @@ export default { await interaction.reply({ embeds: [ new EmbedBuilder() - .setTitle('Skilled Bot help') + .setTitle(`${client.user?.username} help`) .setColor(SKILLED_COLOR) .setDescription( - `**About**\nSkilled Bot automates many mundane tasks and provide statistics in numerous flexible ways.\n\nMade by TresAbhi from the Skilled [SKLLD] clan.\nGitHub: https://github.com/sklld/bot\nSkilled: https://discord.gg/ZPvcEG7DS8\n\n**Commands**\n${(interaction.guildId === + `**About**\n${ + client.user?.username + } automates many mundane tasks and provide statistics in numerous flexible ways.\n\nMade by TresAbhi from the Skilled [SKLLD] clan.\nGitHub: https://github.com/sklld/bot\nSkilled: https://discord.gg/ZPvcEG7DS8\n\n**Commands**\n${(interaction.guildId === discord.guild_id ? [...guildCommands, ...publicCommands] : publicCommands diff --git a/src/utilities/wargamingError.ts b/src/utilities/wargamingError.ts index 722ad2f68..656574d64 100644 --- a/src/utilities/wargamingError.ts +++ b/src/utilities/wargamingError.ts @@ -4,6 +4,7 @@ import { EmbedBuilder, } from 'discord.js'; import { NEGATIVE_COLOR } from '../constants/colors.js'; +import { client } from '../index.js'; export default async function wargamingError( interaction: ChatInputCommandInteraction, @@ -12,7 +13,7 @@ export default async function wargamingError( embeds: [ new EmbedBuilder() .setColor(NEGATIVE_COLOR) - .setTitle('Skilled Bot ran into an issue') + .setTitle(`${client.user?.username} ran into an issue`) .setDescription('Wargaming returned an error. Please try again later.'), ], });