You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://discord.com/channels/508357248330760243/508357683506708514/821851432235433984
^As @gencha#69 points out, once a channel has been claimed, there's
still a big 'ol embed just a little ways up that describes the channel
as available -- which might contribute to help-channel sniping.
This adds a new embed which marks the channel as occupied. It does not
use it anywhere yet; that'll come soon.
Copy file name to clipboardExpand all lines: src/modules/helpchan.ts
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,14 @@ import {
12
12
Guild,
13
13
TextChannel,
14
14
GuildMember,
15
+
User,
15
16
}from'discord.js';
16
17
import{HelpUser}from'../entities/HelpUser';
17
18
import{
18
19
categories,
19
20
TS_BLUE,
20
21
GREEN,
22
+
HOURGLASS_ORANGE,
21
23
askCooldownRoleId,
22
24
channelNames,
23
25
dormantChannelTimeout,
@@ -39,6 +41,19 @@ This channel will be dedicated to answering your question only. Others will try
39
41
For more tips, check out StackOverflow's guide on **[asking good questions](https://stackoverflow.com/help/how-to-ask)**.
40
42
`;
41
43
44
+
constoccupiedMessage=(tag: string)=>`
45
+
**This channel is claimed by @${tag}**
46
+
47
+
This channel is dedicated to answering their question only (and any of their follow-up questions). Others will try to answer and help solve the issue.
48
+
49
+
**To @${tag}, keep in mind:**
50
+
• It's always ok to just ask your question. You don't need permission.
51
+
• Explain what you expect to happen and what actually happens.
52
+
• Include a code sample and error message, if you got any.
53
+
54
+
For more tips, check out StackOverflow's guide on **[asking good questions](https://stackoverflow.com/help/how-to-ask)**.
55
+
`;
56
+
42
57
constDORMANT_MESSAGE=`
43
58
This help channel has been marked as **dormant**, and has been moved into the **Help: Dormant** category at the bottom of the channel list. It is no longer possible to send messages in this channel until it becomes available again.
44
59
@@ -62,6 +77,18 @@ export class HelpChanModule extends Module {
62
77
} hours of inactivity or when you send !close.`,
63
78
);
64
79
80
+
occupiedEmbed(asker: User){
81
+
returnnewMessageEmbed()
82
+
.setTitle('⌛ Occupied Help Channel')
83
+
.setColor(HOURGLASS_ORANGE)
84
+
.setDescription(occupiedMessage(asker.tag))
85
+
.setFooter(
86
+
`Closes after ${
87
+
dormantChannelTimeout/60/60/1000
88
+
} hours of inactivity or when ${asker.username} sends !close.`,
0 commit comments