Merge pull request #30 from tresabhi/1.12.7

This commit is contained in:
TrèsAbhi authored and GitHub committed 2023-09-08 21:35:46 -05:00
commit 90e012319a
6 files changed
+300 -617

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
# Blitzkrieg 1.12.7
A few fixes and clarifications
## Changes
- `/clan-event`
- Made statement about the limited publicly available data
- Added a statement about reset times
## Fixes
- Commands with images now once again work
+9 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "blitzkrieg", "name": "blitzkrieg",
"version": "1.12.6", "version": "1.12.7",
"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",
@@ -42,22 +42,22 @@
"next": "^13.4.19", "next": "^13.4.19",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"satori": "^0.10.3", "satori": "^0.10.4",
"vite-node": "^0.34.2", "vite-node": "^0.34.4",
"vitepress-plugin-auto-sidebar": "^1.1.0" "vitepress-plugin-auto-sidebar": "^1.1.0"
}, },
"devDependencies": { "devDependencies": {
"@total-typescript/ts-reset": "^0.5.1", "@total-typescript/ts-reset": "^0.5.1",
"@types/escape-html": "^1.0.2", "@types/escape-html": "^1.0.2",
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"@types/lodash": "^4.14.197", "@types/lodash": "^4.14.198",
"@types/markdown-escape": "^1.1.0", "@types/markdown-escape": "^1.1.0",
"@types/node": "^20.5.3", "@types/node": "^20.6.0",
"@types/react": "^18.2.21", "@types/react": "^18.2.21",
"compare-versions": "^6.1.0", "compare-versions": "^6.1.0",
"knip": "^2.19.9", "knip": "^2.22.0",
"prettier": "^3.0.2", "prettier": "^3.0.3",
"typescript": "^5.0.4", "typescript": "^5.2.2",
"vitepress": "^1.0.0-rc.4" "vitepress": "^1.0.0-rc.10"
} }
} }
-4
View File
@@ -6,10 +6,6 @@ const targetFile = argv
?.split('=')[1]; ?.split('=')[1];
const files = targetFile ? [targetFile] : ['bot', 'server']; const files = targetFile ? [targetFile] : ['bot', 'server'];
// copyFile('package.dist.json', 'dist/package.json', () =>
// console.log('package.json copied'),
// );
files.forEach(async (file) => { files.forEach(async (file) => {
console.log(`Building ${file}...`); console.log(`Building ${file}...`);
+5 -5
View File
@@ -1,4 +1,4 @@
import { SlashCommandBuilder } from 'discord.js'; import { SlashCommandBuilder, escapeMarkdown } 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';
@@ -13,8 +13,6 @@ import { AccountAchievements } from '../types/accountAchievements';
import { AccountInfo } from '../types/accountInfo'; import { AccountInfo } from '../types/accountInfo';
import { ClanInfo } from '../types/clanInfo'; import { ClanInfo } from '../types/clanInfo';
const DEFAULT_THRESHOLD = 7;
export const clanEventCommand: CommandRegistry = { export const clanEventCommand: CommandRegistry = {
inProduction: true, inProduction: true,
inPublic: true, inPublic: true,
@@ -72,7 +70,9 @@ export const clanEventCommand: CommandRegistry = {
})); }));
return [ return [
`# ${clan.name} [${clan.tag}]'s platoon wins today: ${( `# ${escapeMarkdown(clan.name)} [${escapeMarkdown(
clan.tag,
)}]'s platoon wins today: ${(
jointVictories.reduce( jointVictories.reduce(
(accumulator, { joinVictory }) => accumulator + joinVictory, (accumulator, { joinVictory }) => accumulator + joinVictory,
0, 0,
@@ -88,7 +88,7 @@ export const clanEventCommand: CommandRegistry = {
embedWarning( embedWarning(
'This is an approximation!', 'This is an approximation!',
"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", "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 publicly share that data\n- This command is also subject to Blitzkrieg's reset times (use `/help timezones` for more info)",
), ),
]; ];
}, },
+4 -14
View File
@@ -9,12 +9,8 @@
"skipLibCheck": true, "skipLibCheck": true,
"noEmit": true, "noEmit": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"jsx": "preserve", "jsx": "react-jsx",
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"incremental": true, "incremental": true,
"isolatedModules": true, "isolatedModules": true,
@@ -24,12 +20,6 @@
} }
] ]
}, },
"include": [ "include": ["src/**/*", ".next/types/**/*.ts", "dist/website/types/**/*.ts"],
"src/**/*", "exclude": ["node_modules"]
".next/types/**/*.ts",
"dist/website/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }
+269 -585
View File
File diff suppressed because it is too large. Load diff