forked from cosmic/scythe
30 lines
674 B
TypeScript
30 lines
674 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,
|
|
],
|
|
silent: false,
|
|
});
|
|
|
|
client.on("error", console.error);
|
|
|
|
const run = async () => {
|
|
await importx(`${dirname(import.meta.url)}/{events,commands}/**/*.ts`);
|
|
client.login(Bun.env.TOKEN!);
|
|
};
|
|
|
|
run();
|