diff --git a/server/bot/index.ts b/server/bot/index.ts index e3a5fb8..7a6fce8 100644 --- a/server/bot/index.ts +++ b/server/bot/index.ts @@ -28,8 +28,8 @@ export const guildMemberAdd = (client: Client, db: Db, tempDB: DB) => async ( const roleName = role.startsWith('bot-') ? role.substr(4) : role const roleObj = member.guild.roles.find(element => element.name === roleName) if (!role || !roleObj) return - if (role.startsWith('bot-') && member.user.bot) member.addRole(roleObj.id) - else if (!role.startsWith('bot-') && !member.user.bot) member.addRole(roleObj.id) + if (role.startsWith('bot-') && member.user.bot) await member.addRole(roleObj.id) + else if (!role.startsWith('bot-') && !member.user.bot) await member.addRole(roleObj.id) } catch (e) {} }) }