Skip to content

Commit

Permalink
[craft] Fixed version.tf variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
M4xi1m3 committed Jul 7, 2022
1 parent 2771221 commit 1c99c0a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/commands/AboutCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
});
}
}
8 changes: 4 additions & 4 deletions src/consolecommands/GenVersionConsoleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1c99c0a

Please sign in to comment.