summary refs log tree commit diff
path: root/slowcord/bot/src
diff options
context:
space:
mode:
Diffstat (limited to 'slowcord/bot/src')
-rw-r--r--slowcord/bot/src/Bot.ts25
-rw-r--r--slowcord/bot/src/index.ts21
2 files changed, 46 insertions, 0 deletions
diff --git a/slowcord/bot/src/Bot.ts b/slowcord/bot/src/Bot.ts
new file mode 100644

index 00000000..6e0d8360 --- /dev/null +++ b/slowcord/bot/src/Bot.ts
@@ -0,0 +1,25 @@ +import { Message } from "discord.js"; +import { Client } from "fosscord-gopnik/build/lib"; // huh? oh well. some bugs in my lib Ig + +export default class Bot { + client: Client; + + constructor(client: Client) { + this.client = client; + } + + onReady = () => { + console.log(`Logged in as ${this.client.user!.tag}`); + + this.client.user!.setPresence({ + activities: [{ + name: "EVERYTHING", + type: "WATCHING", + }] + }) + }; + + onMessageCreate = (msg: Message) => { + + }; +} \ No newline at end of file diff --git a/slowcord/bot/src/index.ts b/slowcord/bot/src/index.ts new file mode 100644
index 00000000..07a6aa7c --- /dev/null +++ b/slowcord/bot/src/index.ts
@@ -0,0 +1,21 @@ +import "dotenv/config"; +import Fosscord from "fosscord-gopnik"; +import Bot from "./Bot"; + +const client = new Fosscord.Client({ + intents: ["GUILD_MESSAGES"], + + http: { + api: process.env.ENDPOINT_API, + cdn: process.env.ENDPOINT_CDN, + invite: process.env.ENDPOINT_INV, + }, +}); + +const bot = new Bot(client); + +client.on("ready", bot.onReady); + +client.on("messageCreate", bot.onMessageCreate); + +client.login(process.env.TOKEN); \ No newline at end of file