mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: defered messages
This commit is contained in:
1 parent
4ce07c8f0b
commit
0632dc7c2b
3 files changed
+7
-10
No files matched your search
@@ -8,14 +8,8 @@ import getBlitzStarsAccount from '../utilities/getBlitzStarsAccount.js';
|
||||
import poweredByBlitzStars from '../utilities/poweredByBlitzStars.js';
|
||||
|
||||
const CLANS = {
|
||||
sklld: {
|
||||
name: 'Skilled',
|
||||
id: 71559,
|
||||
},
|
||||
smri: {
|
||||
name: 'Samurai',
|
||||
id: 91244,
|
||||
},
|
||||
sklld: { id: 71559, name: 'Skilled' },
|
||||
smri: { id: 91244, name: 'Samurai' },
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -13,6 +13,8 @@ export default async function getBlitzStarsAccount(
|
||||
name: string,
|
||||
callback: (account: PlayerStatistics) => void,
|
||||
) {
|
||||
await interaction.deferReply();
|
||||
|
||||
async function notTracked() {
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
import fetch from 'node-fetch';
|
||||
import { WargamingResponse } from '../types/wargamingResponse.js';
|
||||
import wargamingError from './wargamingError.js';
|
||||
|
||||
export default function getWargamingResponse<Data extends object>(
|
||||
export default async function getWargamingResponse<Data extends object>(
|
||||
url: string,
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
callback: (data: Data) => void,
|
||||
) {
|
||||
await interaction.deferReply();
|
||||
|
||||
fetch(url)
|
||||
.then((response) => response.json() as Promise<WargamingResponse<Data>>)
|
||||
.then((response) => {
|
||||
|
||||
Reference in new issue
Block a user