feat: cleaned up directories

This commit is contained in:
TresAbhi committed 2023-05-13 22:01:58 +00:00
1 parent 473ebfa46c
commit 613527e78f
41 files changed
+116 -832

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import fetch from 'node-fetch';
import { PlayerStats } from '../../types/playerStats.js';
export default async function getPlayerStats(
interaction: ChatInputCommandInteraction<CacheType>,
command: string,
id: number,
callback: (playerStats: PlayerStats) => void,
) {
fetch(`https://www.blitzstars.com/api/playerstats/${id}`).then(
async (response) => {
callback((await response.json()) as PlayerStats);
},
);
}