Compare commits

..

2 Commits

Author SHA1 Message Date
Logan Cusano
24296c2ae4 Update the prompt with the proper discord tag for the member ID
All checks were successful
release-tag / release-image (push) Successful in 3m3s
DRB Tests / drb_mocha_tests (push) Successful in 1m6s
2024-06-06 23:01:08 -04:00
Logan Cusano
db065c3ef0 Add a new event for server client joining new guild/server #1 2024-06-02 19:39:38 -04:00
2 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { DebugBuilder } from "../../modules/debugger.mjs";
const log = new DebugBuilder("server", "discordBot.events.guildCreate");
import { Events } from 'discord.js';
import { addEnabledCommands, addEnabledEventListeners } from "../discordBot.mjs";
export const name = Events.GuildMemberAdd;
export async function execute(nodeIo, guild) {
log.INFO("Bot has joined a new server", guild);
log.DEBUG("Refreshing commands enabled");
await addEnabledCommands(nodeIo.serverClient);
log.DEBUG("Refreshing events enabled");
await addEnabledEventListeners(nodeIo.serverClient);
}

View File

@@ -14,7 +14,7 @@ export async function execute(nodeIo, member) {
let conversation = [];
conversation.push({
role: 'system',
content: `There has been a new user that joined. Their name is '${member.id}'. Please welcome them to the server and remind them about the rules.`
content: `There has been a new user that joined. Their name is '<@${member.id}>'. Please welcome them to the server and remind them about the rules.`
})
const response = await gptHandler(conversation);