slack: dirty fix
This commit is contained in:
parent
eaa81f2480
commit
f7ac8ae5cd
|
@ -35,8 +35,8 @@ export default class slack extends EventEmitter {
|
||||||
if (!res.ok)
|
if (!res.ok)
|
||||||
return this.emit("data", [ "error", res.description ]); // more infos
|
return this.emit("data", [ "error", res.description ]); // more infos
|
||||||
|
|
||||||
res.channels.forEach(channel => this.server.channel.set(channel.id, channel.name));
|
res.channels?.forEach(channel => this.server.channel.set(channel.id, channel.name));
|
||||||
res.users.forEach(user => this.server.user.set(user.id, {
|
res.users?.forEach(user => this.server.user.set(user.id, {
|
||||||
account: user.name,
|
account: user.name,
|
||||||
nickname: user.real_name
|
nickname: user.real_name
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user