This commit is contained in:
Logan Cusano
2024-08-11 20:14:36 -04:00
parent 94374b4d45
commit cf49ac414a
6 changed files with 187 additions and 97 deletions

View File

@@ -4,12 +4,20 @@ import dotenv from "dotenv";
dotenv.config();
import { Events } from "discord.js";
import { gptHandler } from "../modules/gptHandler.mjs";
import { getGuildConfig, setGuildConfig, getConfig, setConfig } from "../../modules/mongo-wrappers/mongoConfigWrappers.mjs";
import {
getGuildConfig,
setGuildConfig,
getConfig,
setConfig,
} from "../../modules/mongo-wrappers/mongoConfigWrappers.mjs";
export const name = Events.GuildMemberAdd;
export async function execute(nodeIo, member) {
const welcomeChannel = await getGuildConfig(message.guild.id, "welcomeChannelId");
export async function execute(nodeIo, member) {
const welcomeChannel = await getGuildConfig(
message.guild.id,
"welcomeChannelId",
);
log.INFO("New user joined the server", member);
let conversation = [];
conversation.push({