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
Copy file name to clipboardExpand all lines: src/modules/helpchan.ts
+20-17Lines changed: 20 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,24 @@ import {
26
26
}from'../env';
27
27
import{isTrustedMember}from'../util/inhibitors';
28
28
29
+
constAVAILABLE_MESSAGE=`
30
+
✅ **Send your question here to claim the channel**
31
+
This channel will be dedicated to answering your question only. Others will try to answer and help you solve the issue.
32
+
33
+
**Keep in mind:**
34
+
• It's always ok to just ask your question. You don't need permission.
35
+
• Explain what you expect to happen and what actually happens.
36
+
• Include a code sample and error message, if you got any.
37
+
38
+
For more tips, check out StackOverflow's guide on **[asking good questions](https://stackoverflow.com/help/how-to-ask)**.
39
+
`;
40
+
41
+
constDORMANT_MESSAGE=`
42
+
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.
43
+
44
+
If your question wasn't answered yet, you can claim a new help channel from the **Help: Available** category by simply asking your question again. Consider rephrasing the question to maximize your chance of getting a good answer. If you're not sure how, have a look through [StackOverflow's guide on asking a good question](https://stackoverflow.com/help/how-to-ask)
45
+
`;
46
+
29
47
exportclassHelpChanModuleextendsModule{
30
48
constructor(client: CookiecordClient){
31
49
super(client);
@@ -35,26 +53,11 @@ export class HelpChanModule extends Module {
35
53
36
54
AVAILABLE_EMBED=newMessageEmbed()
37
55
.setColor(GREEN)
38
-
.setDescription(
39
-
'✅ **Send your question here to claim the channel**\n'+
40
-
'This channel will be dedicated to answering your question only. Others will try to answer and help you solve the issue.\n\n'+
41
-
'**Keep in mind:**\n'+
42
-
"• It's always ok to just ask your question. You don't need permission.\n"+
43
-
'• Explain what you expect to happen and what actually happens.\n'+
44
-
'• Include a code sample and error message, if you got any.\n\n'+
45
-
"For more tips, check out StackOverflow's guide on **[asking good questions](https://stackoverflow.com/help/how-to-ask)**.",
46
-
);
56
+
.setDescription(AVAILABLE_MESSAGE);
47
57
48
58
DORMANT_EMBED=newMessageEmbed()
49
59
.setColor(TS_BLUE)
50
-
.setDescription(
51
-
'This help channel has been marked as **dormant**, and has been moved into the **Help: Dormant** category at the '+
52
-
'bottom of the channel list. It is no longer possible to send messages in this channel until it becomes available again.\n\n'+
53
-
"If your question wasn't answered yet, you can claim a new help channel from the **Help: Available** category"+
54
-
' by simply asking your question again. Consider rephrasing the question to maximize your chance of getting '+
55
-
"a good answer. If you're not sure how, have a look through "+
56
-
"[StackOverflow's guide on asking a good question](https://stackoverflow.com/help/how-to-ask)",
57
-
);
60
+
.setDescription(DORMANT_MESSAGE);
58
61
59
62
busyChannels: Set<string>=newSet();// a lock to eliminate race conditions
0 commit comments