added more strings
This commit is contained in:
20
dist/queue.js
vendored
20
dist/queue.js
vendored
@@ -55,11 +55,7 @@ async function checkQueue(channel) {
|
||||
return;
|
||||
if (info.players.length >= info.teamsize) {
|
||||
const team = info.players.splice(0, info.teamsize).map(m => m.toString());
|
||||
//TODO add embeds to lang.ts
|
||||
const embed = new discord_js_1.MessageEmbed()
|
||||
.setTitle('Team')
|
||||
.setDescription(team.join('\n'));
|
||||
await channel.send({ embeds: [embed] });
|
||||
await channel.send(Lang.getEmbed('discord.team', { team: team.join('\n') }));
|
||||
}
|
||||
}
|
||||
function queueCreate(channelId, teamsize) {
|
||||
@@ -80,7 +76,7 @@ SaveQueue();
|
||||
async function discordInit(client) {
|
||||
for (const channelId of QUEUE.keys()) {
|
||||
const info = QUEUE.get(channelId), channel = await client.channels.fetch(channelId);
|
||||
if (!info) { //no idea what could cause this but TS complains
|
||||
if (!info) {
|
||||
queueRemove(channelId);
|
||||
continue;
|
||||
}
|
||||
@@ -166,12 +162,12 @@ async function close(interaction) {
|
||||
*/
|
||||
async function queue(interaction) {
|
||||
const info = getInfo(interaction);
|
||||
const embed = new discord_js_1.MessageEmbed()
|
||||
.setTitle('Active Queue')
|
||||
.addField('Team Size', info.teamsize.toString(), true)
|
||||
.addField('Players Joined', info.players.length.toString(), true)
|
||||
.setFooter({ text: 'type /join' }); //TODO
|
||||
await interaction.reply({ embeds: [embed], ephemeral: true });
|
||||
await interaction.reply(Lang.getEmbed('discord.queue', {
|
||||
teamsize: info.teamsize.toString(),
|
||||
playercount: info.players.length.toString(),
|
||||
}, {
|
||||
ephemeral: true
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* joins a queue
|
||||
|
||||
Reference in New Issue
Block a user