Compare commits

..

2 Commits

Author SHA1 Message Date
1af74e957d ignore unknown participant bye 2023-10-10 18:04:19 -05:00
8bfd16a41f fix useless error 2023-10-10 17:58:11 -05:00
2 changed files with 3 additions and 2 deletions

View File

@ -67,7 +67,7 @@ dClient.on("emojiDelete", async emoji => {
// allow anyone to pin a message via reaction
// todo need enable partials for it to work on old messages
dClient.on("messageReactionAdd", async (messageReaction) => {
if (messageReaction.guild.id != config.guildID) return;
if (messageReaction.guild?.id != config.guildID) return;
if (messageReaction.emoji.name == "📌" || messageReaction.emoji.name == "📍")
await messageReaction.message.pin();
});

View File

@ -127,6 +127,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) {
});
gClient.prependListener("bye", async msg => {
var participant = gClient.ppl[msg.p];
if (!participant) return;
d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** left the room.___`);
});
@ -196,4 +197,4 @@ dClient.once("ready", async function () {
handleError(error, JSON.stringify(bridge));
}
}
});
});