mirror of https://github.com/Nofated095/Q2TG.git
fix: event.prevParticipant 为 null 时报错
This commit is contained in:
parent
15a45eb85f
commit
7477979bd1
|
@ -95,7 +95,8 @@ export default class ConfigController {
|
|||
};
|
||||
|
||||
private handleChannelParticipant = async (event: Api.UpdateChannelParticipant) => {
|
||||
if ('userId' in event.prevParticipant && event.prevParticipant.userId.eq(this.tgBot.me.id) &&
|
||||
if (event.prevParticipant && 'userId' in event.prevParticipant &&
|
||||
event.prevParticipant.userId.eq(this.tgBot.me.id) &&
|
||||
!event.newParticipant) {
|
||||
this.log.warn(`群 ${event.channelId.toString()} 删除了`);
|
||||
const pair = this.instance.forwardPairs.find(event.channelId);
|
||||
|
|
Loading…
Reference in New Issue