Start of Slowcord bot
This commit is contained in:
@@ -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) => {
|
||||
|
||||
};
|
||||
}
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user