mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: deferred pre-check
This commit is contained in:
1 parent
dec54dbe6b
commit
d3c2c121dc
1 file changed
+1
-1
@@ -8,7 +8,7 @@ export default async function getWargamingResponse<Data extends object>(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
callback: (data: Data) => void,
|
||||
) {
|
||||
await interaction.deferReply();
|
||||
if (!interaction.deferred) await interaction.deferReply();
|
||||
|
||||
fetch(url)
|
||||
.then((response) => response.json() as Promise<WargamingResponse<Data>>)
|
||||
|
||||
Reference in new issue
Block a user