34 lines
786 B
TypeScript
34 lines
786 B
TypeScript
import { Client } from "discordx";
|
|
import { IntentsBitField } from "discord.js";
|
|
import { dirname, importx } from "@discordx/importer";
|
|
|
|
interface Snipe {
|
|
content: string | null;
|
|
author: string | undefined;
|
|
}
|
|
|
|
export let snipeObject: Snipe = { content: null, author: undefined };
|
|
|
|
const client = new Client({
|
|
intents: [
|
|
IntentsBitField.Flags.Guilds,
|
|
IntentsBitField.Flags.GuildMessages,
|
|
IntentsBitField.Flags.GuildMembers,
|
|
IntentsBitField.Flags.MessageContent,
|
|
IntentsBitField.Flags.GuildMessageReactions,
|
|
IntentsBitField.Flags.DirectMessageReactions,
|
|
],
|
|
silent: false,
|
|
});
|
|
|
|
client.on("error", console.error);
|
|
|
|
const run = async () => {
|
|
await importx(
|
|
`${dirname(import.meta.url)}/{events,commands,components}/**/*.ts`,
|
|
);
|
|
client.login(Bun.env.TOKEN!);
|
|
};
|
|
|
|
run();
|