diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-06 18:03:38 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-06 18:03:38 -0400 |
commit | 68e9ef50105bbbc02a36999db742f42426389ff0 (patch) | |
tree | 27a6d23daa3b3dfdd9a6194701ff79667048b39f /src/listeners/guild | |
parent | 87438fe1f2e3658ed81ca62eba14b538f1ed7ccc (diff) | |
download | tanzanite-68e9ef50105bbbc02a36999db742f42426389ff0.tar.gz tanzanite-68e9ef50105bbbc02a36999db742f42426389ff0.tar.bz2 tanzanite-68e9ef50105bbbc02a36999db742f42426389ff0.zip |
bruh moment
Diffstat (limited to 'src/listeners/guild')
-rw-r--r-- | src/listeners/guild/guildMemberAdd.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/listeners/guild/guildMemberAdd.ts b/src/listeners/guild/guildMemberAdd.ts index 631eb5d..db014a8 100644 --- a/src/listeners/guild/guildMemberAdd.ts +++ b/src/listeners/guild/guildMemberAdd.ts @@ -84,22 +84,22 @@ export default class GuildMemberAddListener extends BushListener { } } } + } else { + const joinRoles = await member.guild.getSetting('joinRoles'); + if (!joinRoles || !joinRoles.length) return; + await member.roles + .add(joinRoles, 'Join roles.') + .then(() => + client.console.info('guildMemberAdd', `Assigned join roles to <<${member.user.tag}>> in <<${member.guild.name}>>.`) + ) + .catch( + () => + void client.console.warn( + 'guildMemberAdd', + `Failed to assign join roles to <<${member.user.tag}>>, in <<${member.guild.name}>>.` + ) + ); } - } else { - const joinRoles = await member.guild.getSetting('joinRoles'); - if (!joinRoles || !joinRoles.length) return; - await member.roles - .add(joinRoles, 'Join roles.') - .then(() => - client.console.info('guildMemberAdd', `Assigned join roles to <<${member.user.tag}>> in <<${member.guild.name}>>.`) - ) - .catch( - () => - void client.console.warn( - 'guildMemberAdd', - `Failed to assign join roles to <<${member.user.tag}>>, in <<${member.guild.name}>>.` - ) - ); } } } |