Skip to content

Commit

Permalink
Resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhyll committed May 11, 2023
1 parent 8152ce6 commit a4d9856
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
6 changes: 3 additions & 3 deletions src/events/messageCreateForum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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`
))
Expand Down
4 changes: 2 additions & 2 deletions src/events/messageReactionAdd.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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({
name: 'messageReactionAdd',
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) {
Expand Down

0 comments on commit a4d9856

Please sign in to comment.