mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Merge pull request #29 from tresabhi/1.12.5
This commit is contained in:
5 files changed
+27
-10
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# Blitzkrieg 1.12.4
|
||||
# Blitzkrieg 1.12.5
|
||||
|
||||
Some patch up work
|
||||
|
||||
@@ -6,7 +6,7 @@ Some patch up work
|
||||
|
||||
- `/clan-event` now is more legible and comes with an approximation warning
|
||||
|
||||
## Fixed
|
||||
## Fixes
|
||||
|
||||
- `/clan-event` now uses a more optimized way of fetching large data
|
||||
- This should fix the issue where too many people using the command broke it
|
||||
@@ -0,0 +1,12 @@
|
||||
# Blitzkrieg 1.12.6
|
||||
|
||||
Stops making the bot lie!
|
||||
|
||||
## Changes
|
||||
|
||||
- The approximation warning for `/clan-event` has been made more concise
|
||||
- Players with `0` wins are now omitted
|
||||
|
||||
## Fixes
|
||||
|
||||
- Players who haven't player within the current day are now omitted
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blitzkrieg",
|
||||
"version": "1.12.1",
|
||||
"version": "1.12.6",
|
||||
"description": "🎉 All-in-one Discord bot for everything World of Tanks Blitz",
|
||||
"main": "src/server.ts",
|
||||
"type": "module",
|
||||
|
||||
+3
-1
@@ -26,7 +26,9 @@ files.forEach(async (file) => {
|
||||
|
||||
bundle: true,
|
||||
sourcemap: true,
|
||||
minify: true,
|
||||
minifyIdentifiers: false, // cause goofy errors
|
||||
minifySyntax: true,
|
||||
minifyWhitespace: true,
|
||||
|
||||
logLevel: 'info',
|
||||
});
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import { PlayerHistoriesRaw } from '../core/blitzstars/getPlayerHistories';
|
||||
import getTimeDaysAgo from '../core/blitzstars/getTimeDaysAgo';
|
||||
import addClanChoices from '../core/discord/addClanChoices';
|
||||
import autocompleteClan from '../core/discord/autocompleteClan';
|
||||
import embedWarning from '../core/discord/embedWarning';
|
||||
@@ -16,7 +17,6 @@ const DEFAULT_THRESHOLD = 7;
|
||||
|
||||
export const clanEventCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
@@ -63,10 +63,12 @@ export const clanEventCommand: CommandRegistry = {
|
||||
const jointVictories = clan.members_ids.map((id) => ({
|
||||
id,
|
||||
joinVictory:
|
||||
previousJointVictories[id] === undefined
|
||||
? 0
|
||||
: achievements[id].max_series.jointVictory -
|
||||
previousJointVictories[id]!,
|
||||
players[id].last_battle_time > getTimeDaysAgo(region, 1)
|
||||
? previousJointVictories[id] === undefined
|
||||
? 0
|
||||
: achievements[id].max_series.jointVictory -
|
||||
previousJointVictories[id]!
|
||||
: 0,
|
||||
}));
|
||||
|
||||
return [
|
||||
@@ -76,6 +78,7 @@ export const clanEventCommand: CommandRegistry = {
|
||||
0,
|
||||
) / 2
|
||||
).toFixed(0)}\n${jointVictories
|
||||
.filter(({ joinVictory }) => joinVictory)
|
||||
.sort((a, b) => b.joinVictory - a.joinVictory)
|
||||
.map(
|
||||
({ id, joinVictory }) =>
|
||||
@@ -85,7 +88,7 @@ export const clanEventCommand: CommandRegistry = {
|
||||
|
||||
embedWarning(
|
||||
'This is an approximation!',
|
||||
'Wargaming provides use with little to no information about platoons. Platooning with mixed clans may inflate the number and platooning in non-regular battles may deflate.',
|
||||
"Wargaming provides very little information about platoons publicly. Caveats:\n- Players in two different clans platooning artificially inflates the total count\n- Game-mode battles aren't counted since Wargaming doesn't track them",
|
||||
),
|
||||
];
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user