feat: return-based interaction reply edits

This commit is contained in:
TresAbhi committed 2023-06-16 02:01:06 +00:00
1 parent fbcd9e82e3
commit 4d9dc067af
19 files changed
+249 -306

No files matched your search

+9 -15
View File
@@ -13,7 +13,7 @@ import { AccountList } from '../types/accountList.js';
export default {
inProduction: true,
inDevelopment: false,
inDevelopment: true,
inPublic: true,
command: new SlashCommandBuilder()
@@ -44,19 +44,13 @@ export default {
)
: [];
await interaction.editReply({
embeds: [
infoEmbed(
`Player search for "${markdownEscape(name)}" in ${
BLITZ_SERVERS[server]
}`,
`\`\`\`${
players.length === 0
? 'No players found.'
: players.map((player) => player.nickname).join('\n')
}\`\`\``,
),
],
});
return infoEmbed(
`Player search for "${markdownEscape(name)}" in ${BLITZ_SERVERS[server]}`,
`\`\`\`${
players.length === 0
? 'No players found.'
: players.map((player) => player.nickname).join('\n')
}\`\`\``,
);
},
} satisfies CommandRegistry;