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/events/messageCreate.js
-26
Original file line number
Diff line number
Diff line change
@@ -3,32 +3,6 @@ require("dotenv").config();
3
3
constdiscord=require('discord.js');
4
4
5
5
client.on("messageCreate",async(message)=>{
6
-
if(message.channel.id=="427867128847138816")
7
-
{
8
-
constrow=newdiscord.MessageActionRow()
9
-
.addComponents(
10
-
newdiscord.MessageButton()
11
-
.setCustomId('CloseThread')
12
-
.setEmoji('<:archive:937932140014866492> ')
13
-
.setLabel('Archive Thread')
14
-
.setStyle('SUCCESS')
15
-
)
16
-
17
-
constthread=message.startThread({
18
-
name: `${message.author.tag} - ${message}`,
19
-
autoArchiveDuration: 60,
20
-
type: 'GUILD_PUBLIC_THREAD'
21
-
});
22
-
23
-
(awaitthread).send({
24
-
content: `Hey <@${message.author.id}>! I've automatically created this thread from your message to keep the channel clean and keep messages condensed.
25
-
\nIt is recommended that you change the Notification Settings for this thread to All Messages so that you get a notification when someone has responded to your query.
26
-
\nFeel free to ping '@Coursework Help' if you would like a hand!`,
0 commit comments