mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix occasional error when unknown roles are added or removed
This commit is contained in:
parent
ff8e7c6afc
commit
f45e745d54
1 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ export class LogsPlugin extends ZeppelinPlugin<ILogsPluginConfig> {
|
||||||
{
|
{
|
||||||
member,
|
member,
|
||||||
roles: addedRoles
|
roles: 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(", "),
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
|
@ -349,7 +349,7 @@ export class LogsPlugin extends ZeppelinPlugin<ILogsPluginConfig> {
|
||||||
{
|
{
|
||||||
member,
|
member,
|
||||||
roles: removedRoles
|
roles: 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