Rename deletegameentry to deletegame

This commit is contained in:
baz 2023-12-30 01:36:41 +00:00
parent 18491f9225
commit 13b0825627
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ const { getUserRegistration, deleteBeatenGameNum, checkGameStorageId } = require
module.exports = {
data: new SlashCommandBuilder()
.setName('deletegameentry')
.setName('deletegame')
.setDescription('Delete a game that you have beaten from the 100 game challenge!')
.addNumberOption(option => option.setName('beatgamenumber').setDescription('Index of the game to delete in the list of beaten games.').setMinValue(1).setMaxValue(100)),
async execute(interaction) {
@ -15,6 +15,9 @@ module.exports = {
if (beatGameNumber) {
result = await deleteBeatenGameNum(beatGameNumber, userDatabaseEntry);
}
else {
// TODO: Delete most recent game entry.
}
if (result) {
const game = await checkGameStorageId(result.gameId);