mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90e012319a | ||
|
|
18de9cbaab | ||
|
|
42a76cbd38 | ||
|
|
eb95634801 | ||
|
|
de8bfff47f | ||
|
|
07c18911df | ||
|
|
cc769cc330 | ||
|
|
9794f58936 | ||
|
|
a44fcff3b1 | ||
|
|
7e4a3e88b9 |
No files matched your search
@@ -22,11 +22,11 @@ jobs:
|
|||||||
- name: Download release assets
|
- name: Download release assets
|
||||||
run: |
|
run: |
|
||||||
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkrieg/releases/latest \
|
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/tresabhi/blitzkrieg/releases/latest \
|
||||||
| grep "browser_download_url.*dist.zip" \
|
| grep "browser_download_url.*bot.zip" \
|
||||||
| cut -d : -f 2,3 \
|
| cut -d : -f 2,3 \
|
||||||
| tr -d \")
|
| tr -d \")
|
||||||
curl -L -o dist.zip $DOWNLOAD_URL
|
curl -L -o bot.zip $DOWNLOAD_URL
|
||||||
unzip dist.zip
|
unzip bot.zip
|
||||||
|
|
||||||
- name: Run bot
|
- name: Run bot
|
||||||
run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} node --enable-source-maps --trace-warnings bot.cjs
|
run: NODE_ENV=production GH_TOKEN=${{ secrets.GH_TOKEN }} DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} node --enable-source-maps --trace-warnings bot/index.cjs
|
||||||
@@ -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
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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}...`);
|
||||||
|
|
||||||
|
|||||||
@@ -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
@@ -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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user