Fix crash on unknown channel when applying reaction roles
This commit is contained in:
parent
0f1ee84c46
commit
8af4598b99
1 changed files with 1 additions and 0 deletions
|
@ -121,6 +121,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<IReactionRolesPluginConf
|
||||||
*/
|
*/
|
||||||
async applyReactionRoleReactionsToMessage(channelId: string, messageId: string, reactionRoles: ReactionRole[]) {
|
async applyReactionRoleReactionsToMessage(channelId: string, messageId: string, reactionRoles: ReactionRole[]) {
|
||||||
const channel = this.guild.channels.get(channelId) as TextChannel;
|
const channel = this.guild.channels.get(channelId) as TextChannel;
|
||||||
|
if (!channel) return;
|
||||||
|
|
||||||
let targetMessage;
|
let targetMessage;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue