Compare commits

...

2 Commits

Author SHA1 Message Date
baz 313a43abc5 Remove datebeaten option 2023-12-27 21:34:10 +00:00
baz 7de1d065dd Add extra formatting for the leaderboard 2023-12-27 21:33:27 +00:00
2 changed files with 11 additions and 5 deletions

View File

@ -7,8 +7,7 @@ module.exports = {
.setName('beatgame')
.setDescription('Log a game that you have beat towards the 100 game challenge!')
.addStringOption(option => option.setName('gamename').setDescription('The name of the game.'))
.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).')),
.addNumberOption(option => option.setName('gameid').setDescription('The IGDB game id.').setMinValue(0)),
async execute(interaction) {
const userDatabaseEntry = await getUserRegistration(interaction.user);

View File

@ -15,9 +15,16 @@ module.exports = {
let desc = '';
for (let i = 0; i < leaderboard.length; i++) {
let newLine = '';
newLine = newLine.concat((i + 1), '. \t', leaderboard[i].username, ' - ', leaderboard[i].count, ' games\n');
desc = desc.concat(newLine);
let newLine = String.prototype.concat('#', (i + 1), ' \t', leaderboard[i].username, ' - ', leaderboard[i].count, ' games');
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()