mirror of
https://git.arson.gg/lilith/discord-bot.git
synced 2025-12-05 03:34:49 +01:00
what the helk!?
This commit is contained in:
parent
7c210ee7a6
commit
bfb14f4b15
14 changed files with 771 additions and 3 deletions
11
src/index.js
11
src/index.js
|
|
@ -1,5 +1,6 @@
|
|||
const { REST, Routes, Client, Collection, GatewayIntentBits, Events, Partials, InteractionType, ActivityType } = require("discord.js");
|
||||
const { default: Groq } = require("groq-sdk");
|
||||
const server = require("./server");
|
||||
const { knex } = require("./db.js");
|
||||
const path = require("node:path");
|
||||
const fs = require("node:fs");
|
||||
|
|
@ -73,11 +74,15 @@ client.on(Events.InteractionCreate, async interaction => {
|
|||
|
||||
client.once(Events.ClientReady, async () => {
|
||||
console.log(`Ready! Logged in as ${client.user.displayName}`);
|
||||
|
||||
client.user.setActivity({
|
||||
name: "kissing my sister",
|
||||
type: ActivityType.Custom
|
||||
});
|
||||
|
||||
server.setClient(client);
|
||||
server.start();
|
||||
|
||||
if (!(await knex.schema.hasTable("blacklists")))
|
||||
await knex.schema.createTable("blacklists", function (table) {
|
||||
table.string("user").primary();
|
||||
|
|
@ -96,6 +101,12 @@ client.once(Events.ClientReady, async () => {
|
|||
table.string("data");
|
||||
});
|
||||
|
||||
if (!(await knex.schema.hasTable("pastes")))
|
||||
await knex.schema.createTable("pastes", function (table) {
|
||||
table.string("id").primary();
|
||||
table.string("data");
|
||||
});
|
||||
|
||||
var user = client.user.toJSON();
|
||||
|
||||
for (const prompt of fs.readdirSync(promptsDir)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue