Skip to content

Commit a4d9856

Browse files
committed
Resolving comments
1 parent 8152ce6 commit a4d9856

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ export const REACTION_ROLE_CHANNEL = DEV_MODE
8686
? process.env.DEV_REACTION_ROLE_CHANNEL
8787
: '616210923354456064';
8888

89-
90-
export const SOLVABLE_FORUMS = [DEV_MODE ? process.env.DEV_SUPPORT_FORUM_CHANNEL : '1047150269156294677'];
89+
export const SUPPORT_FORUM = DEV_MODE
90+
? process.env.DEV_SUPPORT_FORUM_CHANNEL
91+
: '1047150269156294677';
92+
export const SOLVABLE_FORUMS = [SUPPORT_FORUM];
9193
export const UNSOLVED_TAG = 'unsolved';
9294
export const SOLVED_TAG = 'solved';

src/events/messageCreateForum.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from 'discord.js';
66
import { event } from 'jellycommands';
77
import { wrap_in_embed } from '../utils/embed_helpers';
8-
import { SOLVABLE_FORUMS, UNSOLVED_TAG, SOLVED_TAG, MESSAGE_READ } from '../config';
8+
import { SOLVABLE_FORUMS, UNSOLVED_TAG, SOLVED_TAG, MESSAGE_READ, SUPPORT_FORUM } from '../config';
99

1010
export default event({
1111
name: 'messageCreate',
@@ -42,11 +42,11 @@ export default event({
4242
const msg = await message.channel.send(wrap_in_embed(
4343
`Thank you for your message!
4444
45-
1. Search the #support forum for existing posts
45+
1. Search the <#${SUPPORT_FORUM}> forum for existing posts
4646
2. Search Github issues to see if this is a known issue
4747
3. Send the output of \`tauri info\`
4848
4. Provide reproduction steps for your issue
49-
5. Be polite and remember that we are all contributing our spare time, none of us are paid to be here
49+
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)
5050
5151
Once you've read this and taken the appropriate steps, react to this message`
5252
))

src/events/messageReactionAdd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { ThreadChannel } from 'discord.js';
22
import { event } from 'jellycommands';
3-
import { MESSAGE_READ, REACTION_ROLE_CHANNEL } from '../config'
3+
import { MESSAGE_READ, REACTION_ROLE_CHANNEL, SOLVABLE_FORUMS } from '../config'
44
import { hasPermission } from '../utils/reactionHandler';
55

66
export default event({
77
name: 'messageReactionAdd',
88
run: async (_, reaction, user) => {
99
try {
1010
// The bot shouldn't react to its own reactions
11-
if (user.bot)
11+
if (user.bot || SOLVABLE_FORUMS.includes(reaction.message.channelId))
1212
return
1313
// If this is a reaction in the role reaction channel
1414
if (reaction.message.channelId === REACTION_ROLE_CHANNEL) {

0 commit comments

Comments
 (0)