This commit is contained in:
2024-12-27 01:23:35 +01:00
parent 7d349a37d4
commit c06ac10d09
18 changed files with 543 additions and 0 deletions

8
src/lib/client.ts Normal file
View File

@@ -0,0 +1,8 @@
import config from "config";
import { Client, IntentsBitField } from "discord.js";
const client = new Client({ intents: [IntentsBitField.Flags.Guilds] });
await client.login(config.discord.token);
export default client;

5
src/lib/utils.ts Normal file
View File

@@ -0,0 +1,5 @@
export function getRandomInt(min: number, max: number) {
const nextMin = Math.ceil(min);
const nextMax = Math.floor(max);
return Math.floor(Math.random() * (nextMax - nextMin + 1)) + nextMin;
}