hardcoded and mentions

* added options to queries

* removed hard coded vals, added message options

* updated importing

* added check for message mentions

* fix missing botID

* updated token to uid

* added contributer

---------

Co-authored-by: JT2M0L3Y <jtsmoley@icloud.com>
This commit is contained in:
Kevin Dang
2024-01-29 12:49:04 -08:00
committed by Kevin Dang
parent 97acae3d08
commit 9247463480
8 changed files with 166 additions and 75 deletions

View File

@@ -5,6 +5,7 @@ import Events from "./events/index.js";
// Import keys/tokens
import Keys from "./keys.js";
// initialize the client with the following permissions when logging in
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
@@ -16,12 +17,19 @@ const client = new Client({
const messageHistory = [
{
role: 'assistant',
content: 'My name is Ollama GU.'
role: 'system',
content: 'Your name is Ollama GU'
}
]
registerEvents(client, Events, messageHistory)
/**
* register events for bot to listen to in discord
* @param messageHistory message history for the llm
* @param Events events to register
* @param client the bot reference
* @param Keys tokens from .env files
*/
registerEvents(client, Events, messageHistory, Keys)
// Try to log in the client
client.login(Keys.clientToken)