Update list commands formatting
This commit is contained in:
parent
537f5dab07
commit
adff39b758
|
@ -26,18 +26,20 @@ module.exports = {
|
||||||
if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) {
|
if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) {
|
||||||
desc = `${user.displayName} has not beaten any games yet.`;
|
desc = `${user.displayName} has not beaten any games yet.`;
|
||||||
} else {
|
} else {
|
||||||
|
desc = desc.concat('__Total: ', beatenGamesDatabaseEntries.length, '/100__\n\n');
|
||||||
|
|
||||||
for (let i = 0; i < beatenGamesDatabaseEntries.length; i++) {
|
for (let i = 0; i < beatenGamesDatabaseEntries.length; i++) {
|
||||||
const gameid = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
|
const gameid = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
|
||||||
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
||||||
const game = res[0];
|
const game = res[0];
|
||||||
desc = desc.concat('#', (i + 1), ' \t', game.name, '\n');
|
desc = desc.concat('**#', (i + 1), '** ', game.name, '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(0x6441a5)
|
.setColor(0x6441a5)
|
||||||
.setAuthor({ name: `${user.displayName}`, iconURL: user.avatarURL() })
|
.setThumbnail(user.avatarURL())
|
||||||
.setTitle(`${user.displayName}'s beaten games`)
|
.setTitle(`${user.displayName}'s Beaten Games`)
|
||||||
.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();
|
||||||
|
|
|
@ -26,18 +26,20 @@ module.exports = {
|
||||||
if (!databaseEntries || databaseEntries.length == 0) {
|
if (!databaseEntries || databaseEntries.length == 0) {
|
||||||
desc = `${user.displayName} is currently playing no games.`;
|
desc = `${user.displayName} is currently playing no games.`;
|
||||||
} else {
|
} else {
|
||||||
|
desc = desc.concat('__Total: ', databaseEntries.length, '__\n\n');
|
||||||
|
|
||||||
for (let i = 0; i < databaseEntries.length; i++) {
|
for (let i = 0; i < databaseEntries.length; i++) {
|
||||||
const gameid = await checkGameStorageId(databaseEntries[i].gameId);
|
const gameid = await checkGameStorageId(databaseEntries[i].gameId);
|
||||||
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
||||||
const game = res[0];
|
const game = res[0];
|
||||||
desc = desc.concat('#', (i + 1), ' \t', game.name, '\n');
|
desc = desc.concat('**#', (i + 1), '** ', game.name, '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(0x6441a5)
|
.setColor(0x6441a5)
|
||||||
.setAuthor({ name: `${user.displayName}`, iconURL: user.avatarURL() })
|
.setThumbnail(user.avatarURL())
|
||||||
.setTitle(`${user.displayName}'s currently playing games`)
|
.setTitle(`${user.displayName}'s Currently Playing Games`)
|
||||||
.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();
|
||||||
|
|
|
@ -26,18 +26,20 @@ module.exports = {
|
||||||
if (!databaseEntries || databaseEntries.length == 0) {
|
if (!databaseEntries || databaseEntries.length == 0) {
|
||||||
desc = `${user.displayName} currently has no planned games.`;
|
desc = `${user.displayName} currently has no planned games.`;
|
||||||
} else {
|
} else {
|
||||||
|
desc = desc.concat('__Total: ', databaseEntries.length, '__\n\n');
|
||||||
|
|
||||||
for (let i = 0; i < databaseEntries.length; i++) {
|
for (let i = 0; i < databaseEntries.length; i++) {
|
||||||
const gameid = await checkGameStorageId(databaseEntries[i].gameId);
|
const gameid = await checkGameStorageId(databaseEntries[i].gameId);
|
||||||
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
|
||||||
const game = res[0];
|
const game = res[0];
|
||||||
desc = desc.concat('#', (i + 1), ' \t', game.name, '\n');
|
desc = desc.concat('**#', (i + 1), '** ', game.name, '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(0x6441a5)
|
.setColor(0x6441a5)
|
||||||
.setAuthor({ name: `${user.displayName}`, iconURL: user.avatarURL() })
|
.setThumbnail(user.avatarURL())
|
||||||
.setTitle(`${user.displayName}'s planned games`)
|
.setTitle(`${user.displayName}'s Planned Games`)
|
||||||
.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