Start of Slowcord bot

This commit is contained in:
Madeline
2022-07-05 01:42:19 +10:00
parent 3877a404a1
commit ffc3811b1f
7 changed files with 12897 additions and 358 deletions
+25
View File
@@ -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) => {
};
}
+21
View File
@@ -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);