migrated
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user