mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: we don't talk about it
This commit is contained in:
1 parent
71e1ab1362
commit
8ef355c574
13 files changed
+20
-230
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",
|
||||
"private": true,
|
||||
"version": "1.27.4",
|
||||
"version": "1.27.5",
|
||||
"description": "🎉 Tools for everything World of Tanks Blitz",
|
||||
"type": "module",
|
||||
"types": "./types.d.ts",
|
||||
|
||||
@@ -16,6 +16,7 @@ export function CommandWrapper({ children, fat }: CommandWrapperProps) {
|
||||
gap: 16,
|
||||
width: '100%',
|
||||
color: theme.colors.textHighContrast,
|
||||
backgroundColor: theme.colors.appBackground1,
|
||||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { imgur, isFunny } from '@blitzkit/core';
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
AttachmentBuilder,
|
||||
@@ -9,7 +8,6 @@ import {
|
||||
MessageEditOptions,
|
||||
} from 'discord.js';
|
||||
import { InteractionReturnable } from '../../events/interactionCreate';
|
||||
import { theme } from '../../stitches.config';
|
||||
import { Writeable } from '../../types/writable';
|
||||
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
||||
import { RenderConfiguration } from '../blitzkit/renderConfiguration';
|
||||
@@ -48,78 +46,7 @@ export async function normalizeInteractionReturnable(
|
||||
} else if (item === null) {
|
||||
return;
|
||||
} else {
|
||||
let jsx: JSX.Element;
|
||||
|
||||
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);
|
||||
const image = await jsxToPngThreaded(item, renderConfiguration);
|
||||
images.push([index, image]);
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { isFunny } from '@blitzkit/core';
|
||||
import {
|
||||
ActionRowBuilder,
|
||||
AttachmentBuilder,
|
||||
@@ -17,41 +16,11 @@ import { psa } from '../../../core/discord/psa';
|
||||
import { translator } from '../../../core/localization/translator';
|
||||
import { Writeable } from '../../../types/writable';
|
||||
|
||||
const funnyResponses = [
|
||||
"your dwecisions were calculawed buw man, you're bad at math 🥀🥀",
|
||||
'have you consiwered not lacking 😳',
|
||||
'lemme guess... it was your team? 🤬🤬🤬',
|
||||
'confiwence is key. unforwunawely you lost whe lock 🔒💔',
|
||||
"when they say live green, they dwn't mean your 🌳 winrate 🌳",
|
||||
'viewing your swats, hewe? you really are brawe 😎',
|
||||
'no surrie! your numwers are still no bueno 💔💔💔',
|
||||
"i would giwe you awvice, you won'w understand 🥀🥀",
|
||||
"i diwn'w beliewe in negawive numwers unwil i saw your stats 😳😳😳",
|
||||
'wawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw',
|
||||
'https://tenor.com/tre3NETle2e.gif',
|
||||
'https://tenor.com/bVWoA.gif',
|
||||
'https://tenor.com/bARFp.gif',
|
||||
'https://tenor.com/jDFYXtzM27i.gif',
|
||||
'https://tenor.com/dZ6MB62R32r.gif',
|
||||
'https://tenor.com/bqOZf.gif',
|
||||
'https://tenor.com/tD2TjXsmGVx.gif',
|
||||
'https://tenor.com/bya9M.gif',
|
||||
];
|
||||
|
||||
export async function handleChatInputCommand(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
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 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 {
|
||||
discoveredIdsDefinitions,
|
||||
@@ -66,7 +66,7 @@ const interval = setInterval(async () => {
|
||||
for (const guild of client.guilds.cache.values()) {
|
||||
try {
|
||||
const botMember = await guild.members.fetch(client.user.id);
|
||||
await botMember.setNickname(isFunny ? 'FreakKit' : 'BlitzKit');
|
||||
await botMember.setNickname('BlitzKit');
|
||||
} catch {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -44,7 +44,6 @@ export * from './unwrapBlitzkitResponse';
|
||||
export * from './votes';
|
||||
// export * from './withCORSProxy';
|
||||
export * from './createDefaultProvisions';
|
||||
export * from './isFunny';
|
||||
export * from './metaSortTank';
|
||||
export * from './romanize';
|
||||
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 './base.css';
|
||||
import { DEFAULT_LOCALE } from '@blitzkit/i18n';
|
||||
import Funny from '../components/Funny.astro';
|
||||
|
||||
export interface Props {
|
||||
noFooter?: boolean;
|
||||
@@ -24,17 +23,12 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Schoolbell&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
|
||||
<Party3 />
|
||||
|
||||
<script>
|
||||
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||
import { getBestLocale } from '../core/i18n/getBestLocale';
|
||||
|
||||
const isAPI = window.location.pathname.startsWith('/api');
|
||||
const isI18nPath = SUPPORTED_LOCALES.some((locale) =>
|
||||
window.location.pathname.startsWith(`/${locale}`),
|
||||
@@ -60,8 +54,6 @@ const locale = Astro.params.locale ?? DEFAULT_LOCALE;
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<Funny />
|
||||
|
||||
<BlitzKitTheme>
|
||||
<Flex direction="column" minHeight="100vh">
|
||||
<Navbar />
|
||||
|
||||
@@ -2,48 +2,4 @@
|
||||
|
||||
body {
|
||||
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 { DEFAULT_LOCALE, SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||
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 { AesonPlug } from '../../components/AesonPlug';
|
||||
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
||||
@@ -45,20 +45,6 @@ export const getStaticPaths = (() => {
|
||||
<BaseLayout>
|
||||
<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 />
|
||||
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user