Compare commits

...
12 Commits
Author SHA1 Message Date
TrèsAbhi 8c4afa73f8 Merge pull request #32 from tresabhi/1.12.8 2023-09-11 13:15:00 -05:00
TrèsAbhi 6db3ccdb40 feat: removed embed buttons 2023-09-11 13:14:05 -05:00
TrèsAbhi 90e012319a Merge pull request #30 from tresabhi/1.12.7 2023-09-08 21:35:46 -05:00
TresAbhi 18de9cbaab feat: upgraded dependencies 2023-09-09 02:35:14 +00:00
TresAbhi 42a76cbd38 feat: changelogs 2023-09-09 02:19:20 +00:00
TresAbhi eb95634801 fix: escaped markdown for clan event title 2023-09-09 02:11:32 +00:00
TresAbhi de8bfff47f feat: clearer statement about timezones 2023-09-09 02:10:54 +00:00
TresAbhi 07c18911df feat: clearer statement about public data 2023-09-09 02:06:09 +00:00
TresAbhi cc769cc330 fix: react is now defined 2023-09-09 02:04:36 +00:00
TrèsAbhi 9794f58936 Update cd-host.yml 2023-09-08 11:50:31 -05:00
TrèsAbhi a44fcff3b1 Update cd-host.yml 2023-09-08 11:48:41 -05:00
TrèsAbhi 7e4a3e88b9 Update cd-host.yml 2023-09-08 11:47:39 -05:00
10 changed files with 313 additions and 623 deletions

No files matched your search

+4 -4
View File
@@ -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
+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
+7
View File
@@ -0,0 +1,7 @@
# Blitzkrieg 1.12.8
Blitzkrieg is a completely free service and I earn no revenue from it. To keep it sustainable, I have to rely on free services. Unfortunately for embeds, seems like I have exceeded my limits. Before this service starts charging me, I have shut down embeds. They'll hopefully be back in 1.13 alongside the website! Only the future will tell...
## Changes
- Removed all embed buttons
+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)",
), ),
]; ];
}, },
+1 -1
View File
@@ -80,7 +80,7 @@ export const statsCommand = new Promise<CommandRegistryRaw>(async (resolve) => {
: null, : null,
), ),
primaryButton(path, 'Refresh'), primaryButton(path, 'Refresh'),
linkButton(`${CYCLIC_API}/${path}`, 'Embed'), // linkButton(`${CYCLIC_API}/${path}`, 'Embed'),
linkButton( linkButton(
`https://www.blitzstars.com/player/${player.region}/${nickname}`, `https://www.blitzstars.com/player/${player.region}/${nickname}`,
'BlitzStars', 'BlitzStars',
+1 -1
View File
@@ -66,7 +66,7 @@ export const todayCommand: CommandRegistry = {
return [ return [
await today(player, cutoff, maximized, showTotal, false), await today(player, cutoff, maximized, showTotal, false),
primaryButton(path, 'Refresh'), primaryButton(path, 'Refresh'),
linkButton(`${CYCLIC_API}/${path}`, 'Embed'), // linkButton(`${CYCLIC_API}/${path}`, 'Embed'),
linkButton( linkButton(
`https://www.blitzstars.com/player/${player.region}/${nickname}`, `https://www.blitzstars.com/player/${player.region}/${nickname}`,
'BlitzStars', 'BlitzStars',
+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