mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: better typing
This commit is contained in:
1 parent
774d6dc9f5
commit
ab88be7c94
10 files changed
+39
-24
No files matched your search
@@ -11,6 +11,8 @@ import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
||||
import getBlitzStarsAccount from '../utilities/getBlitzStarsAccount.js';
|
||||
import poweredByBlitzStars from '../utilities/poweredByBlitzStars.js';
|
||||
|
||||
export const inDev = true;
|
||||
|
||||
export const CLANS = {
|
||||
sklld: {
|
||||
name: 'Skilled',
|
||||
|
||||
@@ -6,14 +6,14 @@ import {
|
||||
} from 'discord.js';
|
||||
import fetch from 'node-fetch';
|
||||
import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
||||
import { AccountInfo } from '../types/accountInfo.js';
|
||||
import { ClanInfo } from '../types/clanInfo.js';
|
||||
import { ClanDetails } from '../types/clanDetails.js';
|
||||
import { PlayerPersonalData } from '../types/playerPersonalData.js';
|
||||
import { CLANS } from './eligible.js';
|
||||
|
||||
const DEFAULT_THRESHOLD = 7;
|
||||
|
||||
export const inDev = true;
|
||||
|
||||
const DEFAULT_THRESHOLD = 7;
|
||||
|
||||
export async function execute(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
@@ -25,7 +25,7 @@ export async function execute(
|
||||
await fetch(
|
||||
`https://api.wotblitz.com/wotb/clans/info/?application_id=${process.env.WARGAMING_APPLICATION_ID}&clan_id=${CLANS[clanName].id}`,
|
||||
)
|
||||
).json()) as ClanInfo;
|
||||
).json()) as ClanDetails;
|
||||
const clan = clanData.data[CLANS[clanName].id];
|
||||
const memberIds = clan.members_ids;
|
||||
const accountInfo = (await (
|
||||
@@ -34,7 +34,7 @@ export async function execute(
|
||||
process.env.WARGAMING_APPLICATION_ID
|
||||
}&account_id=${memberIds.join(',')}`,
|
||||
)
|
||||
).json()) as AccountInfo;
|
||||
).json()) as PlayerPersonalData;
|
||||
|
||||
const inactiveInfo = memberIds
|
||||
.map((memberId) => {
|
||||
|
||||
@@ -11,6 +11,8 @@ import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
||||
import getBlitzStarsAccount from '../utilities/getBlitzStarsAccount.js';
|
||||
import poweredByBlitzStars from '../utilities/poweredByBlitzStars.js';
|
||||
|
||||
export const inDev = true;
|
||||
|
||||
export async function execute(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
|
||||
@@ -10,6 +10,8 @@ import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
||||
import { SERVERS } from '../constants/servers.js';
|
||||
import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
||||
|
||||
export const inDev = true;
|
||||
|
||||
export async function execute(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user