3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 15:15:02 +00:00

Fix crash on unknown channel when applying reaction roles

This commit is contained in:
Miikka 2019-06-11 10:24:50 +03:00 committed by GitHub
parent 876dd88b69
commit 81bfae3c33

View file

@ -121,6 +121,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<IReactionRolesPluginConf
*/
async applyReactionRoleReactionsToMessage(channelId: string, messageId: string, reactionRoles: ReactionRole[]) {
const channel = this.guild.channels.get(channelId) as TextChannel;
if (!channel) return;
let targetMessage;
try {