Updates to /globalbeatlist
This commit is contained in:
parent
24f437bedc
commit
d921eb7b3f
|
@ -9,11 +9,11 @@ module.exports = {
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|
||||||
const user = interaction.user;
|
|
||||||
|
|
||||||
const beatenGamesDatabaseEntries = await getAllBeatenGames();
|
const beatenGamesDatabaseEntries = await getAllBeatenGames();
|
||||||
let desc = '';
|
let desc = '';
|
||||||
|
|
||||||
|
desc = desc.concat('__Total: ', beatenGamesDatabaseEntries.length, '__\n');
|
||||||
|
|
||||||
if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) {
|
if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) {
|
||||||
desc = 'No games beaten yet.';
|
desc = 'No games beaten yet.';
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,9 +27,8 @@ module.exports = {
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(0x6441a5)
|
.setColor(0x6441a5)
|
||||||
.setAuthor({ name: `${user.displayName}`, iconURL: user.avatarURL() })
|
|
||||||
.setThumbnail(interaction.client.user.avatarURL())
|
.setThumbnail(interaction.client.user.avatarURL())
|
||||||
.setTitle('Global Beat List')
|
.setTitle('The 100 Games Challenge Global Beat List')
|
||||||
.setDescription(desc)
|
.setDescription(desc)
|
||||||
.setFooter({ text: 'The Ochulus • 100 Games Challenge', iconURL: interaction.client.user.avatarURL() })
|
.setFooter({ text: 'The Ochulus • 100 Games Challenge', iconURL: interaction.client.user.avatarURL() })
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
Loading…
Reference in New Issue