slack: dirty fix

This commit is contained in:
Flummi 2023-04-23 18:00:44 +02:00
parent eaa81f2480
commit f7ac8ae5cd

View File

@ -35,8 +35,8 @@ export default class slack extends EventEmitter {
if (!res.ok)
return this.emit("data", [ "error", res.description ]); // more infos
res.channels.forEach(channel => this.server.channel.set(channel.id, channel.name));
res.users.forEach(user => this.server.user.set(user.id, {
res.channels?.forEach(channel => this.server.channel.set(channel.id, channel.name));
res.users?.forEach(user => this.server.user.set(user.id, {
account: user.name,
nickname: user.real_name
}));