diff --git a/src/config.ts b/src/config.ts index 24ab516..ffebb47 100644 --- a/src/config.ts +++ b/src/config.ts @@ -86,7 +86,9 @@ export const REACTION_ROLE_CHANNEL = DEV_MODE ? process.env.DEV_REACTION_ROLE_CHANNEL : '616210923354456064'; - -export const SOLVABLE_FORUMS = [DEV_MODE ? process.env.DEV_SUPPORT_FORUM_CHANNEL : '1047150269156294677']; +export const SUPPORT_FORUM = DEV_MODE + ? process.env.DEV_SUPPORT_FORUM_CHANNEL + : '1047150269156294677'; +export const SOLVABLE_FORUMS = [SUPPORT_FORUM]; export const UNSOLVED_TAG = 'unsolved'; export const SOLVED_TAG = 'solved'; diff --git a/src/events/messageCreateForum.ts b/src/events/messageCreateForum.ts index 11607cb..51a70d3 100644 --- a/src/events/messageCreateForum.ts +++ b/src/events/messageCreateForum.ts @@ -5,7 +5,7 @@ import { } from 'discord.js'; import { event } from 'jellycommands'; import { wrap_in_embed } from '../utils/embed_helpers'; -import { SOLVABLE_FORUMS, UNSOLVED_TAG, SOLVED_TAG, MESSAGE_READ } from '../config'; +import { SOLVABLE_FORUMS, UNSOLVED_TAG, SOLVED_TAG, MESSAGE_READ, SUPPORT_FORUM } from '../config'; export default event({ name: 'messageCreate', @@ -42,11 +42,11 @@ export default event({ const msg = await message.channel.send(wrap_in_embed( `Thank you for your message! - 1. Search the #support forum for existing posts + 1. Search the <#${SUPPORT_FORUM}> forum for existing posts 2. Search Github issues to see if this is a known issue 3. Send the output of \`tauri info\` 4. Provide reproduction steps for your issue - 5. Be polite and remember that we are all contributing our spare time, none of us are paid to be here + 5. Be polite and remember to follow the [Tauri Code of Conduct](https://github.com/tauri-apps/governance-and-guidance/blob/main/CODE_OF_CONDUCT.md) Once you've read this and taken the appropriate steps, react to this message` )) diff --git a/src/events/messageReactionAdd.ts b/src/events/messageReactionAdd.ts index e461b55..8295fad 100644 --- a/src/events/messageReactionAdd.ts +++ b/src/events/messageReactionAdd.ts @@ -1,6 +1,6 @@ import { ThreadChannel } from 'discord.js'; import { event } from 'jellycommands'; -import { MESSAGE_READ, REACTION_ROLE_CHANNEL } from '../config' +import { MESSAGE_READ, REACTION_ROLE_CHANNEL, SOLVABLE_FORUMS } from '../config' import { hasPermission } from '../utils/reactionHandler'; export default event({ @@ -8,7 +8,7 @@ export default event({ run: async (_, reaction, user) => { try { // The bot shouldn't react to its own reactions - if (user.bot) + if (user.bot || SOLVABLE_FORUMS.includes(reaction.message.channelId)) return // If this is a reaction in the role reaction channel if (reaction.message.channelId === REACTION_ROLE_CHANNEL) {