Add commandManager and the first slash command
the command allows for summining the bot without sending an actual mention message that might hang in the chat log sent to openAi, consuming tokens
This commit is contained in:
parent
56a0e686b0
commit
8b4b35454b
6 changed files with 124 additions and 2 deletions
|
@ -4,6 +4,7 @@ import { PrismaClient } from "@prisma/client";
|
|||
|
||||
import config from "./config";
|
||||
import { queueRequest } from "./execution";
|
||||
import InteractionManager from "./interactionManager";
|
||||
|
||||
const discord = new DiscordApi.Client({
|
||||
intents: [
|
||||
|
@ -19,6 +20,9 @@ export const openai = new OpenAIApi(new OpenAIApiConfiguration({
|
|||
|
||||
export const database = new PrismaClient();
|
||||
|
||||
const interactionManager = new InteractionManager();
|
||||
interactionManager.bindClient(discord);
|
||||
|
||||
discord.on("ready", async event => {
|
||||
console.log(`Connected to Discord as ${event.user.tag} (${event.user.id})`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue