This commit is contained in:
2026-04-08 11:37:01 +02:00
parent e2cc63e6c9
commit 0218583d24
8 changed files with 58 additions and 41 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ module.exports = {
// Fetch birthday role
const bdayRoleColl = db.collection('config_roles');
const bdayRoleEntry = await bdayRoleColl.findOne({ guildID: guild.id });
const birthdayRoleID = bdayRoleEntry.roleID;
const birthdayRoleID = bdayRoleEntry?.roleID;
if (!birthdayRoleID) {
console.warn("No birthday role configured in DB");
@@ -54,7 +54,7 @@ module.exports = {
console.error(`Failed to add birthday role to ${member.user.tag}:`, err)
);
console.log(`Added birthday role to ${member.user.tag}`);
client.emit('Birthday', member);
//client.emit('Birthday', member);
} else {
// Default fallback: remove birthday role if present
if (member.roles.cache.has(birthdayRoleID)) {