diff --git a/aurora/common/resident.ts b/aurora/common/resident.ts index dc72618c..f2fbad56 100644 --- a/aurora/common/resident.ts +++ b/aurora/common/resident.ts @@ -67,7 +67,7 @@ class ResidentHelper extends BaseHelper { let resident: V3Player try { - const players = await OfficialAPI.V3.players() + const players = await OfficialAPI.V3.players(arg1) resident = players[0] as V3Player } catch(e: any) { console.error(e) diff --git a/aurora/slashcommands/town.ts b/aurora/slashcommands/town.ts index 5284cba5..a5fd1900 100644 --- a/aurora/slashcommands/town.ts +++ b/aurora/slashcommands/town.ts @@ -52,7 +52,6 @@ export default { .then(m => setTimeout(() => m.delete(), 10000)) const townEmbed = new EmbedBuilder() - const nameArg = interaction.options.getString("name", true) const subCmdName = interaction.options.getSubcommand().toLowerCase() if (subCmdName == "list") { @@ -132,6 +131,8 @@ export default { } } else if (subCmdName == "activity") { + const nameArg = interaction.options.getString("name", true) + const town = towns.find(t => t.name.toLowerCase() == nameArg.toLowerCase()) if (!town) return interaction.editReply({embeds: [new EmbedBuilder() .setTitle("Invalid town name!") @@ -177,6 +178,8 @@ export default { .editInteraction(interaction) } else if (subCmdName == "lookup") { // /t + const nameArg = interaction.options.getString("name", true) + const town = towns.find(t => t.name.toLowerCase() == nameArg.toLowerCase()) if (!town) return await interaction.editReply({embeds: [new EmbedBuilder() .setTitle("Invalid Town!") diff --git a/bot/utils/fn.ts b/bot/utils/fn.ts index 955882fe..53281a5d 100644 --- a/bot/utils/fn.ts +++ b/bot/utils/fn.ts @@ -141,6 +141,7 @@ export const paginator = async( msg: Message, embeds: EmbedBuilder[], currentPage: number, + // TODO: Implement this _forwardCallback?: ( interaction: ButtonInteraction, msg: Message, embeds: EmbedBuilder[]