mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Add safety net for unknown roles in guildMemberUpdate
This commit is contained in:
parent
c34532e348
commit
f5de7db971
1 changed files with 2 additions and 2 deletions
|
@ -317,11 +317,11 @@ export class LogsPlugin extends ZeppelinPlugin<ILogsPluginConfig> {
|
||||||
{
|
{
|
||||||
member,
|
member,
|
||||||
addedRoles: addedRoles
|
addedRoles: addedRoles
|
||||||
.map(roleId => this.guild.roles.get(roleId))
|
.map(roleId => this.guild.roles.get(roleId) || { id: roleId, name: `Unknown (${roleId})` })
|
||||||
.map(r => r.name)
|
.map(r => r.name)
|
||||||
.join(", "),
|
.join(", "),
|
||||||
removedRoles: removedRoles
|
removedRoles: removedRoles
|
||||||
.map(roleId => this.guild.roles.get(roleId))
|
.map(roleId => this.guild.roles.get(roleId) || { id: roleId, name: `Unknown (${roleId})` })
|
||||||
.map(r => r.name)
|
.map(r => r.name)
|
||||||
.join(", "),
|
.join(", "),
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
|
|
Loading…
Add table
Reference in a new issue