diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-06 15:20:46 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-06 15:20:46 -0400 |
commit | 13306f17accea5d3653dd4b8670ba0d6ab69c7c5 (patch) | |
tree | 7075dcca19ed1164a166efac19c49311e93ffeee /src/listeners/guild | |
parent | a8386e756758f243b75e5df4886224d2bf9f241c (diff) | |
download | tanzanite-13306f17accea5d3653dd4b8670ba0d6ab69c7c5.tar.gz tanzanite-13306f17accea5d3653dd4b8670ba0d6ab69c7c5.tar.bz2 tanzanite-13306f17accea5d3653dd4b8670ba0d6ab69c7c5.zip |
evidence command and more logging
Diffstat (limited to 'src/listeners/guild')
-rw-r--r-- | src/listeners/guild/guildMemberRemove.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/listeners/guild/guildMemberRemove.ts b/src/listeners/guild/guildMemberRemove.ts index 74404a3..90634d6 100644 --- a/src/listeners/guild/guildMemberRemove.ts +++ b/src/listeners/guild/guildMemberRemove.ts @@ -42,7 +42,10 @@ export default class GuildMemberRemoveListener extends BushListener { public async stickyRoles(member: BushGuildMember | PartialBushGuildMember): Promise<void> { if (!(await member.guild.hasFeature('stickyRoles'))) return; - if (member.partial) throw new Error('Partial member, cannot save sticky roles.'); + if (member.partial) { + await member.guild.members.fetch(); // try to prevent in the future + throw new Error(`${member.id} is a partial member, cannot save sticky roles.`); + } const rolesArray = member.roles.cache.filter((role) => role.name !== '@everyone').map((role) => role.id); const nickname = member.nickname; if (rolesArray) { |