mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +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
|
Some patch up work
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ Some patch up work
|
|||||||
|
|
||||||
- `/clan-event` now is more legible and comes with an approximation warning
|
- `/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
|
- `/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
|
- 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",
|
"name": "blitzkrieg",
|
||||||
"version": "1.12.1",
|
"version": "1.12.6",
|
||||||
"description": "🎉 All-in-one Discord bot for everything World of Tanks Blitz",
|
"description": "🎉 All-in-one Discord bot for everything World of Tanks Blitz",
|
||||||
"main": "src/server.ts",
|
"main": "src/server.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
+3
-1
@@ -26,7 +26,9 @@ files.forEach(async (file) => {
|
|||||||
|
|
||||||
bundle: true,
|
bundle: true,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
minify: true,
|
minifyIdentifiers: false, // cause goofy errors
|
||||||
|
minifySyntax: true,
|
||||||
|
minifyWhitespace: true,
|
||||||
|
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder } from 'discord.js';
|
|||||||
import markdownEscape from 'markdown-escape';
|
import markdownEscape from 'markdown-escape';
|
||||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||||
import { PlayerHistoriesRaw } from '../core/blitzstars/getPlayerHistories';
|
import { PlayerHistoriesRaw } from '../core/blitzstars/getPlayerHistories';
|
||||||
|
import getTimeDaysAgo from '../core/blitzstars/getTimeDaysAgo';
|
||||||
import addClanChoices from '../core/discord/addClanChoices';
|
import addClanChoices from '../core/discord/addClanChoices';
|
||||||
import autocompleteClan from '../core/discord/autocompleteClan';
|
import autocompleteClan from '../core/discord/autocompleteClan';
|
||||||
import embedWarning from '../core/discord/embedWarning';
|
import embedWarning from '../core/discord/embedWarning';
|
||||||
@@ -16,7 +17,6 @@ const DEFAULT_THRESHOLD = 7;
|
|||||||
|
|
||||||
export const clanEventCommand: CommandRegistry = {
|
export const clanEventCommand: CommandRegistry = {
|
||||||
inProduction: true,
|
inProduction: true,
|
||||||
inDevelopment: true,
|
|
||||||
inPublic: true,
|
inPublic: true,
|
||||||
|
|
||||||
command: new SlashCommandBuilder()
|
command: new SlashCommandBuilder()
|
||||||
@@ -63,10 +63,12 @@ export const clanEventCommand: CommandRegistry = {
|
|||||||
const jointVictories = clan.members_ids.map((id) => ({
|
const jointVictories = clan.members_ids.map((id) => ({
|
||||||
id,
|
id,
|
||||||
joinVictory:
|
joinVictory:
|
||||||
previousJointVictories[id] === undefined
|
players[id].last_battle_time > getTimeDaysAgo(region, 1)
|
||||||
? 0
|
? previousJointVictories[id] === undefined
|
||||||
: achievements[id].max_series.jointVictory -
|
? 0
|
||||||
previousJointVictories[id]!,
|
: achievements[id].max_series.jointVictory -
|
||||||
|
previousJointVictories[id]!
|
||||||
|
: 0,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -76,6 +78,7 @@ export const clanEventCommand: CommandRegistry = {
|
|||||||
0,
|
0,
|
||||||
) / 2
|
) / 2
|
||||||
).toFixed(0)}\n${jointVictories
|
).toFixed(0)}\n${jointVictories
|
||||||
|
.filter(({ joinVictory }) => joinVictory)
|
||||||
.sort((a, b) => b.joinVictory - a.joinVictory)
|
.sort((a, b) => b.joinVictory - a.joinVictory)
|
||||||
.map(
|
.map(
|
||||||
({ id, joinVictory }) =>
|
({ id, joinVictory }) =>
|
||||||
@@ -85,7 +88,7 @@ export const clanEventCommand: CommandRegistry = {
|
|||||||
|
|
||||||
embedWarning(
|
embedWarning(
|
||||||
'This is an approximation!',
|
'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