updated lang strings
This commit is contained in:
@@ -3,6 +3,7 @@ import { Client, Intents } from 'discord.js';
|
||||
import * as fs from 'fs';
|
||||
import { getPlayerInteraction } from './api';
|
||||
import { registerCommands } from './discord';
|
||||
import { Lang } from './lang';
|
||||
import { discordInit, QueueCommands } from './queue';
|
||||
import { errorMessage } from './util';
|
||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||
@@ -13,14 +14,16 @@ console.log(new Date().toISOString()+'\n\n');
|
||||
//get token
|
||||
if (!fs.existsSync('./token.txt')) {
|
||||
fs.writeFileSync('./token.txt', '');
|
||||
console.error('Missing Discord Token, please enter the bot token into the token file');
|
||||
console.error(Lang.get('error.main.missingToken'));
|
||||
process.exit(1);
|
||||
}
|
||||
const TOKEN = fs.readFileSync('./token.txt').toString();
|
||||
|
||||
//discord connections
|
||||
CLIENT.on('ready', client => {
|
||||
console.log(`Logged in as ${client.user.tag}`);
|
||||
console.log(Lang.get('main.login', {
|
||||
user: client.user.tag
|
||||
}));
|
||||
client.guilds.fetch().then(guilds =>
|
||||
registerCommands(TOKEN, client.user.id, guilds.map(g => g.id)));
|
||||
discordInit(client);
|
||||
|
||||
Reference in New Issue
Block a user