Compare commits
No commits in common. "313a43abc5af5b073f706cec1cdb2cb889101932" and "c039f3e2e44c16317a94dc20aca6292eb71e3061" have entirely different histories.
313a43abc5
...
c039f3e2e4
@ -7,7 +7,8 @@ module.exports = {
|
|||||||
.setName('beatgame')
|
.setName('beatgame')
|
||||||
.setDescription('Log a game that you have beat towards the 100 game challenge!')
|
.setDescription('Log a game that you have beat towards the 100 game challenge!')
|
||||||
.addStringOption(option => option.setName('gamename').setDescription('The name of the game.'))
|
.addStringOption(option => option.setName('gamename').setDescription('The name of the game.'))
|
||||||
.addNumberOption(option => option.setName('gameid').setDescription('The IGDB game id.').setMinValue(0)),
|
.addNumberOption(option => option.setName('gameid').setDescription('The IGDB game id.').setMinValue(0))
|
||||||
|
.addStringOption(option => option.setName('datebeaten').setDescription('The date you beat the game (today if empty).')),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const userDatabaseEntry = await getUserRegistration(interaction.user);
|
const userDatabaseEntry = await getUserRegistration(interaction.user);
|
||||||
|
@ -15,16 +15,9 @@ module.exports = {
|
|||||||
let desc = '';
|
let desc = '';
|
||||||
|
|
||||||
for (let i = 0; i < leaderboard.length; i++) {
|
for (let i = 0; i < leaderboard.length; i++) {
|
||||||
|
let newLine = '';
|
||||||
let newLine = String.prototype.concat('#', (i + 1), ' \t', leaderboard[i].username, ' - ', leaderboard[i].count, ' games');
|
newLine = newLine.concat((i + 1), '. \t', leaderboard[i].username, ' - ', leaderboard[i].count, ' games\n');
|
||||||
|
desc = desc.concat(newLine);
|
||||||
if (i == 0) newLine = String.prototype.concat('**', newLine, '**');
|
|
||||||
|
|
||||||
if (leaderboard[i].username == interaction.user.username) newLine = String.prototype.concat('*', newLine, '*');
|
|
||||||
|
|
||||||
newLine = String.prototype.concat('\n', newLine);
|
|
||||||
|
|
||||||
desc = String.prototype.concat(desc, newLine);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user