diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..206ca57 --- /dev/null +++ b/index.ts @@ -0,0 +1,17 @@ +import { Discord } from "./src/modules/eu/src/index" +import path from "path" +import config from "./src/utils/config" +import { Intents } from "./src/modules/eu/src/misc/imports" +// @ts-ignore +import modulus from "./src/utils/modulus" + + +const Bot = new Discord.Client({ + // @ts-ignore + token: config.tokens.discord, + commands: path.join(__dirname, "src", "discord", "commands"), + events: path.join(__dirname, "src", "discord", "events"), + options: { + intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES] + } +}) \ No newline at end of file diff --git a/shard.ts b/shard.ts new file mode 100644 index 0000000..39139b8 --- /dev/null +++ b/shard.ts @@ -0,0 +1,19 @@ +require("module-alias/register") + +import { Discord } from "./src/modules/eu/src/index" +import config from "./src/utils/config" + +let Sharder = new Discord.ShardingManager('./build/index.js', + { + // @ts-ignore + token: config.tokens.discord, + respawn: true, + totalShards: "auto" + }) + + +Sharder.on("shardCreate", async (shard) => { + console.log(`Launched Shard #${shard.id}`) +}) + +Sharder.spawn() \ No newline at end of file