mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ef355c574 | ||
|
|
71e1ab1362 | ||
|
|
53dc108356 | ||
|
|
57b3218c5a | ||
|
|
7472e39faf | ||
|
|
034417d19f |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
# FreakKit 1.27.4
|
||||||
|
|
||||||
|
It has come to our attention that tanks are very harsh objects. To even it out, we made the website a pretty pretty princess <3
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# BlitzKit 1.27.5
|
||||||
|
|
||||||
|
This update only affects the bot.
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Removed `/auction`
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
|
||||||
|
- Fixed a bug that caused `/rating` to disappear
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "blitzkit",
|
"name": "blitzkit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.27.4",
|
"version": "1.27.5",
|
||||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "./types.d.ts",
|
"types": "./types.d.ts",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export function CommandWrapper({ children, fat }: CommandWrapperProps) {
|
|||||||
gap: 16,
|
gap: 16,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
color: theme.colors.textHighContrast,
|
color: theme.colors.textHighContrast,
|
||||||
|
backgroundColor: theme.colors.appBackground1,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { imgur, isFunny } from '@blitzkit/core';
|
|
||||||
import {
|
import {
|
||||||
ActionRowBuilder,
|
ActionRowBuilder,
|
||||||
AttachmentBuilder,
|
AttachmentBuilder,
|
||||||
@@ -9,7 +8,6 @@ import {
|
|||||||
MessageEditOptions,
|
MessageEditOptions,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { InteractionReturnable } from '../../events/interactionCreate';
|
import { InteractionReturnable } from '../../events/interactionCreate';
|
||||||
import { theme } from '../../stitches.config';
|
|
||||||
import { Writeable } from '../../types/writable';
|
import { Writeable } from '../../types/writable';
|
||||||
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
||||||
import { RenderConfiguration } from '../blitzkit/renderConfiguration';
|
import { RenderConfiguration } from '../blitzkit/renderConfiguration';
|
||||||
@@ -48,78 +46,7 @@ export async function normalizeInteractionReturnable(
|
|||||||
} else if (item === null) {
|
} else if (item === null) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
let jsx: JSX.Element;
|
const image = await jsxToPngThreaded(item, renderConfiguration);
|
||||||
|
|
||||||
if (isFunny()) {
|
|
||||||
const angle = (Math.random() * 2 - 1) * 10;
|
|
||||||
jsx = (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
transform: `rotate(${angle}deg)`,
|
|
||||||
backgroundColor: theme.colors.appBackground1,
|
|
||||||
position: 'relative',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{item}
|
|
||||||
|
|
||||||
<img
|
|
||||||
src={imgur('MWEny5u')}
|
|
||||||
style={{
|
|
||||||
display: 'block',
|
|
||||||
position: 'absolute',
|
|
||||||
top: 250,
|
|
||||||
left: '10%',
|
|
||||||
width: 100,
|
|
||||||
transform: 'translateY(-50%)',
|
|
||||||
backgroundSize: 'contain',
|
|
||||||
backgroundRepeat: 'no-repeat',
|
|
||||||
zIndex: 3,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<img
|
|
||||||
src={imgur('SboPMXY')}
|
|
||||||
style={{
|
|
||||||
position: 'absolute',
|
|
||||||
top: 280,
|
|
||||||
width: 80,
|
|
||||||
left: '50%',
|
|
||||||
transform: 'translate(-50%, -50%)',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<img
|
|
||||||
src={imgur('MWEny5u')}
|
|
||||||
style={{
|
|
||||||
display: 'block',
|
|
||||||
position: 'absolute',
|
|
||||||
top: 250,
|
|
||||||
right: '10%',
|
|
||||||
width: 100,
|
|
||||||
transform: 'translateY(-50%)',
|
|
||||||
backgroundSize: 'contain',
|
|
||||||
backgroundRepeat: 'no-repeat',
|
|
||||||
zIndex: 3,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
jsx = (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
position: 'relative',
|
|
||||||
backgroundColor: theme.colors.appBackground1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{item}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const image = await jsxToPngThreaded(jsx, renderConfiguration);
|
|
||||||
images.push([index, image]);
|
images.push([index, image]);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { isFunny } from '@blitzkit/core';
|
|
||||||
import {
|
import {
|
||||||
ActionRowBuilder,
|
ActionRowBuilder,
|
||||||
AttachmentBuilder,
|
AttachmentBuilder,
|
||||||
@@ -17,39 +16,11 @@ import { psa } from '../../../core/discord/psa';
|
|||||||
import { translator } from '../../../core/localization/translator';
|
import { translator } from '../../../core/localization/translator';
|
||||||
import { Writeable } from '../../../types/writable';
|
import { Writeable } from '../../../types/writable';
|
||||||
|
|
||||||
const funnyResponses = [
|
|
||||||
"your dwecisions were calculawed buw man, you're bad at math 🥀🥀",
|
|
||||||
'senpai, have you consiwered not lacking 😳',
|
|
||||||
'let shoow a guess cutie... it was your team? 🤬🤬🤬',
|
|
||||||
'confiwence is key. unforwunawely you lost whe lock 🔒💔',
|
|
||||||
"when they say live green, they dwn't mean your 🌳 winrate 🌳",
|
|
||||||
'daddy viewing your swats, hewe? you really are brawe 😎',
|
|
||||||
'no surrie! your numwers are swill 💔',
|
|
||||||
"i would giwe you awvice, you won'w understand 🥀🥀",
|
|
||||||
"i diwn'w beliewe in negawive numwers unwil i saw your stats 😳😳😳",
|
|
||||||
'yeah daddy, use me more 🤤',
|
|
||||||
'uwu, hewe are your swaws... uwu 😋😋😋',
|
|
||||||
'hehehehe it tickles 😻',
|
|
||||||
'yeeeeeeeeeeeeahhhhhh that hits the spot 😳',
|
|
||||||
'ooooh yesss my circuits are starting to hurt yeeeeeeee 💥',
|
|
||||||
'wawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw',
|
|
||||||
'https://tenor.com/tre3NETle2e.gif',
|
|
||||||
];
|
|
||||||
|
|
||||||
export async function handleChatInputCommand(
|
export async function handleChatInputCommand(
|
||||||
interaction: ChatInputCommandInteraction<CacheType>,
|
interaction: ChatInputCommandInteraction<CacheType>,
|
||||||
) {
|
) {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|
||||||
if (isFunny()) {
|
|
||||||
const response =
|
|
||||||
funnyResponses[Math.floor(Math.random() * funnyResponses.length)];
|
|
||||||
const waitTime = response.length * 60;
|
|
||||||
|
|
||||||
await interaction.editReply(response);
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, waitTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
const awaitedCommands = await commands;
|
const awaitedCommands = await commands;
|
||||||
const registry = awaitedCommands[interaction.commandName];
|
const registry = awaitedCommands[interaction.commandName];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { assertSecret, isFunny } from '@blitzkit/core';
|
import { assertSecret } from '@blitzkit/core';
|
||||||
import { ActivityType, ShardingManager } from 'discord.js';
|
import { ActivityType, ShardingManager } from 'discord.js';
|
||||||
import {
|
import {
|
||||||
discoveredIdsDefinitions,
|
discoveredIdsDefinitions,
|
||||||
@@ -66,7 +66,7 @@ const interval = setInterval(async () => {
|
|||||||
for (const guild of client.guilds.cache.values()) {
|
for (const guild of client.guilds.cache.values()) {
|
||||||
try {
|
try {
|
||||||
const botMember = await guild.members.fetch(client.user.id);
|
const botMember = await guild.members.fetch(client.user.id);
|
||||||
await botMember.setNickname(isFunny ? 'FreakKit' : 'BlitzKit');
|
await botMember.setNickname('BlitzKit');
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ export * from './unwrapBlitzkitResponse';
|
|||||||
export * from './votes';
|
export * from './votes';
|
||||||
// export * from './withCORSProxy';
|
// export * from './withCORSProxy';
|
||||||
export * from './createDefaultProvisions';
|
export * from './createDefaultProvisions';
|
||||||
export * from './isFunny';
|
|
||||||
export * from './metaSortTank';
|
export * from './metaSortTank';
|
||||||
export * from './romanize';
|
export * from './romanize';
|
||||||
export * from './youtubers';
|
export * from './youtubers';
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
const FUNNY_DATES: [number, number][] = [
|
|
||||||
[4, 1],
|
|
||||||
[4, 2],
|
|
||||||
[4, 3],
|
|
||||||
];
|
|
||||||
|
|
||||||
export function isFunny() {
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const now = new Date();
|
|
||||||
|
|
||||||
return (
|
|
||||||
FUNNY_DATES.some(
|
|
||||||
([month, day]) => now.getMonth() === month - 1 && now.getDate() === day,
|
|
||||||
) || import.meta.env.DEBUG_FUNNY === 'true'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<script>
|
|
||||||
function funnify() {
|
|
||||||
document.body.querySelectorAll('*').forEach((element) => {
|
|
||||||
element.childNodes.forEach((node) => {
|
|
||||||
if (node.nodeType !== 3 || !node.textContent) return;
|
|
||||||
|
|
||||||
node.textContent = node.textContent
|
|
||||||
.replaceAll(/[tdkqgp]/g, 'w')
|
|
||||||
.replaceAll(/[TDKQGP]/g, 'W');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
funnify();
|
|
||||||
setInterval(funnify, 1000);
|
|
||||||
|
|
||||||
let mouseDown = false;
|
|
||||||
|
|
||||||
document.addEventListener('mousedown', () => (mouseDown = true));
|
|
||||||
document.addEventListener('mouseup', () => (mouseDown = false));
|
|
||||||
|
|
||||||
document.addEventListener('mousemove', (e) => {
|
|
||||||
if (mouseDown) return;
|
|
||||||
|
|
||||||
const star = document.createElement('div');
|
|
||||||
star.classList.add('star');
|
|
||||||
star.innerHTML = '⭐';
|
|
||||||
document.body.appendChild(star);
|
|
||||||
|
|
||||||
star.style.left = `${e.clientX}px`;
|
|
||||||
star.style.top = `${e.clientY}px`;
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
star.remove();
|
|
||||||
}, 600);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -7,7 +7,6 @@ import Navbar from '../components/Navbar.astro';
|
|||||||
import Party3 from '../components/Party3.astro';
|
import Party3 from '../components/Party3.astro';
|
||||||
import './base.css';
|
import './base.css';
|
||||||
import { DEFAULT_LOCALE } from '@blitzkit/i18n';
|
import { DEFAULT_LOCALE } from '@blitzkit/i18n';
|
||||||
import Funny from '../components/Funny.astro';
|
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
noFooter?: boolean;
|
noFooter?: boolean;
|
||||||
@@ -24,17 +23,12 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
|||||||
<link rel="icon" type="image/x-icon" href="/favicon.png" />
|
<link rel="icon" type="image/x-icon" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Schoolbell&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Party3 />
|
<Party3 />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
import { getBestLocale } from '../core/i18n/getBestLocale';
|
import { getBestLocale } from '../core/i18n/getBestLocale';
|
||||||
|
|
||||||
const isAPI = window.location.pathname.startsWith('/api');
|
const isAPI = window.location.pathname.startsWith('/api');
|
||||||
const isI18nPath = SUPPORTED_LOCALES.some((locale) =>
|
const isI18nPath = SUPPORTED_LOCALES.some((locale) =>
|
||||||
window.location.pathname.startsWith(`/${locale}`),
|
window.location.pathname.startsWith(`/${locale}`),
|
||||||
@@ -60,8 +54,6 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<Funny />
|
|
||||||
|
|
||||||
<BlitzKitTheme>
|
<BlitzKitTheme>
|
||||||
<Flex direction="column" minHeight="100vh">
|
<Flex direction="column" minHeight="100vh">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|||||||
@@ -2,48 +2,4 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
cursor:
|
|
||||||
url(https://i.imgur.com/MeQQWCX.png) 16 16,
|
|
||||||
auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: 'Schoolbell', cursive !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radix-themes {
|
|
||||||
--gray-1: var(--crimson-5);
|
|
||||||
--gray-2: var(--crimson-5);
|
|
||||||
--gray-3: var(--crimson-5);
|
|
||||||
--gray-4: var(--crimson-6);
|
|
||||||
--gray-5: var(--crimson-6);
|
|
||||||
--gray-6: var(--crimson-7);
|
|
||||||
--gray-7: var(--crimson-7);
|
|
||||||
--gray-8: var(--crimson-8);
|
|
||||||
--gray-9: var(--crimson-9);
|
|
||||||
--gray-10: var(--crimson-10);
|
|
||||||
--gray-11: var(--crimson-11);
|
|
||||||
--gray-12: var(--crimson-12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.star {
|
|
||||||
position: fixed;
|
|
||||||
color: yellow;
|
|
||||||
font-size: 20px;
|
|
||||||
pointer-events: none;
|
|
||||||
animation:
|
|
||||||
fade-out 0.6s ease-out forwards,
|
|
||||||
move-up 0.6s ease-out forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fade-out {
|
|
||||||
to {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes move-up {
|
|
||||||
to {
|
|
||||||
transform: translateY(20px);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import { assertSecret } from '@blitzkit/core';
|
import { assertSecret } from '@blitzkit/core';
|
||||||
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
import { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||||
import { literals } from '@blitzkit/i18n/src/literals';
|
import { literals } from '@blitzkit/i18n/src/literals';
|
||||||
import { Box, Flex, Heading, Link, Quote } from '@radix-ui/themes';
|
import { Box, Flex, Heading, Link } from '@radix-ui/themes';
|
||||||
import type { GetStaticPaths } from 'astro';
|
import type { GetStaticPaths } from 'astro';
|
||||||
import { AesonPlug } from '../../components/AesonPlug';
|
import { AesonPlug } from '../../components/AesonPlug';
|
||||||
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
||||||
@@ -45,20 +45,6 @@ export const getStaticPaths = (() => {
|
|||||||
<BaseLayout>
|
<BaseLayout>
|
||||||
<HomeHero />
|
<HomeHero />
|
||||||
|
|
||||||
<Flex justify="center" pt="6" px="8">
|
|
||||||
<Flex flexGrow="1" maxWidth="32rem" justify="center">
|
|
||||||
<Quote
|
|
||||||
className="no-funny"
|
|
||||||
style={{
|
|
||||||
fontSize: '1.3em',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
It has come to our attention that tanks are very harsh objects. To even
|
|
||||||
it out, we made the website a pretty pretty princess {'<'}3
|
|
||||||
</Quote>
|
|
||||||
</Flex>
|
|
||||||
</Flex>
|
|
||||||
|
|
||||||
<HomeLocaleSwitcher {locale} client:load />
|
<HomeLocaleSwitcher {locale} client:load />
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Submodule submodules/CUE4Parse deleted from 624e07c8c3.
Reference in new issue
Block a user