Skip to content

Commit f0cb734

Browse files
committed
revert: rm autothreader
This was removed in favour of discord.js new forum channels
1 parent 6d46f83 commit f0cb734

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/events/messageCreate.js

-26
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,6 @@ require("dotenv").config();
33
const discord = require('discord.js');
44

55
client.on("messageCreate", async (message) => {
6-
if(message.channel.id == "427867128847138816")
7-
{
8-
const row = new discord.MessageActionRow()
9-
.addComponents(
10-
new discord.MessageButton()
11-
.setCustomId('CloseThread')
12-
.setEmoji('<:archive:937932140014866492> ')
13-
.setLabel('Archive Thread')
14-
.setStyle('SUCCESS')
15-
)
16-
17-
const thread = message.startThread({
18-
name: `${message.author.tag} - ${message}`,
19-
autoArchiveDuration: 60,
20-
type: 'GUILD_PUBLIC_THREAD'
21-
});
22-
23-
(await thread).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!`,
27-
components: [row]
28-
});
29-
30-
(await thread).leave();
31-
}
326

337
if (
348
message.author.bot ||

0 commit comments

Comments
 (0)