mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: cleaned blitz
This commit is contained in:
1 parent
9dc48c9125
commit
c7821d03d2
15 files changed
+36
-68
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import getWN8 from '../core/blitz/getWN8.js';
|
||||
import calculateWN8 from '../core/blitz/calculateWN8.js';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
||||
import sumStats from '../core/blitz/sumStats.js';
|
||||
import { tankopedia } from '../core/blitz/tankopedia.js';
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
|
||||
// edge case where new tanks don't have averages
|
||||
if (tankAverages[tankId]) {
|
||||
const tankWN8 = getWN8(tankAverages[tankId].all, stats);
|
||||
const tankWN8 = calculateWN8(tankAverages[tankId].all, stats);
|
||||
|
||||
if (isNaN(tankWN8)) return accumulator;
|
||||
return accumulator + tankWN8 * stats.battles;
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
|
||||
async handler(interaction) {
|
||||
const clanName = interaction.options.getString('clan')!;
|
||||
const { server, id } = await getBlitzClan(interaction, clanName);
|
||||
const { server, id } = await getBlitzClan(clanName);
|
||||
const threshold =
|
||||
interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD;
|
||||
const time = new Date().getTime() / 1000;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
||||
import { usernamePattern } from '../core/blitz/listAccountsPanServer.js';
|
||||
import { usernamePattern } from '../core/blitz/listPlayers.js';
|
||||
import addServerChoices from '../core/discord/addServerChoices.js';
|
||||
import addUsernameOption from '../core/discord/addUsernameOption.js';
|
||||
import infoEmbed from '../core/discord/infoEmbed.js';
|
||||
|
||||
Reference in new issue
Block a user