diff --git a/modules/aoc/aocCommand.ts b/modules/aoc/aocCommand.ts index 586f3b2..5ebb145 100644 --- a/modules/aoc/aocCommand.ts +++ b/modules/aoc/aocCommand.ts @@ -25,7 +25,7 @@ export default { handler: async function(interaction: CommandInteraction) { const options = interaction.options as CommandInteractionOptionResolver; const requestedYear = options.getInteger("year", false); - const year = (requestedYear === undefined)? DateTime.now().setZone("Europe/Berlin").year : requestedYear; + const year = (requestedYear === null)? DateTime.now().setZone("Europe/Berlin").year : requestedYear; const embed = await embedLeaderboard(get("id", "aoc") as number, year); await interaction.reply({ embeds: [embed] }); }