diff --git a/src/commands/AboutCommand.ts b/src/commands/AboutCommand.ts index f26bb92..d4d21b1 100644 --- a/src/commands/AboutCommand.ts +++ b/src/commands/AboutCommand.ts @@ -19,7 +19,7 @@ import { CommandInteraction, MessageAttachment, MessageEmbed } from 'discord.js'; import { Command } from '../base/Command'; -import { ANBOT_DEV, ANBOT_HASH, ANBOT_REPOSITORY, ANBOT_VERSION } from '../version'; +import { LEGIBOT_DEV, LEGIBOT_HASH, LEGIBOT_REPOSITORY, LEGIBOT_VERSION } from '../version'; export class AboutCommand extends Command { constructor() { @@ -42,12 +42,12 @@ export class AboutCommand extends Command { return interaction.reply({ embeds: [ new MessageEmbed() - .setTitle(`**LegiBot ${ANBOT_VERSION}${ANBOT_DEV ? '-dev' : ''} (${ANBOT_HASH})**\n`) - .setURL(ANBOT_REPOSITORY) + .setTitle(`**LegiBot ${LEGIBOT_VERSION}${LEGIBOT_DEV ? '-dev' : ''} (${LEGIBOT_HASH})**\n`) + .setURL(LEGIBOT_REPOSITORY) .setThumbnail('attachment://logo.png') .setDescription("Bot Discord pour interragir avec l'asseblée nationale.") .addField("Licence", "LegiBot est distribué sous licence [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html).") - ], files: [new MessageAttachment(`doc/logo/logo-transparent${ANBOT_DEV ? '-dev' : ''}.png`, 'logo.png')], ephemeral: true + ], files: [new MessageAttachment(`doc/logo/logo-transparent${LEGIBOT_DEV ? '-dev' : ''}.png`, 'logo.png')], ephemeral: true }); } } diff --git a/src/consolecommands/GenVersionConsoleCommand.ts b/src/consolecommands/GenVersionConsoleCommand.ts index 4ee7e8d..d325501 100644 --- a/src/consolecommands/GenVersionConsoleCommand.ts +++ b/src/consolecommands/GenVersionConsoleCommand.ts @@ -34,10 +34,10 @@ export class GenVersionConsoleCommand extends ConsoleCommand { this.logger = Logger.getLogger("Refresh"); const pkg = JSON.parse(readFileSync("./package.json").toString("utf-8")); this.values = { - ANBOT_HASH: execSync('git rev-parse HEAD').toString().trim().slice(0,7), - ANBOT_VERSION: pkg.version, - ANBOT_DEV: execSync('git tag --contains HEAD').toString().trim() === "", - ANBOT_REPOSITORY: pkg.repository + LEGIBOT_HASH: execSync('git rev-parse HEAD').toString().trim().slice(0,7), + LEGIBOT_VERSION: pkg.version, + LEGIBOT_DEV: execSync('git tag --contains HEAD').toString().trim() === "", + LEGIBOT_REPOSITORY: pkg.repository } } diff --git a/src/main.ts b/src/main.ts index 3d44b08..c6b73cb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,11 +22,11 @@ import { HardConfig } from './config/HardConfig'; import { SoftConfig } from './config/SoftConfig'; import { UptimeRobot } from './UptimeRobot'; import { Logger } from './utils/Logger'; -import { ANBOT_DEV, ANBOT_HASH, ANBOT_VERSION } from './version'; +import { LEGIBOT_DEV, LEGIBOT_HASH, LEGIBOT_VERSION } from './version'; export const main = async () => { - Logger.getLogger('Main').info(`Starting LegiBot ${ANBOT_VERSION}${ANBOT_DEV ? '-dev' : ''} (${ANBOT_HASH})`); - if (ANBOT_DEV) + Logger.getLogger('Main').info(`Starting LegiBot ${LEGIBOT_VERSION}${LEGIBOT_DEV ? '-dev' : ''} (${LEGIBOT_HASH})`); + if (LEGIBOT_DEV) Logger.getLogger('Main').warn("This is a developpement build of LegiBot!"); SoftConfig.load();