We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3452f93 commit 4adf471Copy full SHA for 4adf471
1 file changed
util/discord.ts
@@ -458,9 +458,10 @@ export async function tryReact(
458
emoji: EmojiIdentifierResolvable,
459
): Promise<MessageReaction | undefined> {
460
const { channel } = message;
461
- if (channel.isDMBased()) return;
462
- const permissions = channel.permissionsFor(client.user);
463
- if (!permissions?.has(PermissionFlagsBits.AddReactions)) return;
+ const permissions =
+ channel.isDMBased()
+ || channel.permissionsFor(client.user)?.has(PermissionFlagsBits.AddReactions);
464
+ if (!permissions) return;
465
try {
466
return await message.react(emoji);
467
} catch (error) {
0 commit comments