revert: rm autothreader
This was removed in favour of discord.js new forum channelsimgbot
parent
6d46f83296
commit
f0cb73406e
|
@ -3,32 +3,6 @@ require("dotenv").config();
|
|||
const discord = require('discord.js');
|
||||
|
||||
client.on("messageCreate", async (message) => {
|
||||
if(message.channel.id == "427867128847138816")
|
||||
{
|
||||
const row = new discord.MessageActionRow()
|
||||
.addComponents(
|
||||
new discord.MessageButton()
|
||||
.setCustomId('CloseThread')
|
||||
.setEmoji('<:archive:937932140014866492> ')
|
||||
.setLabel('Archive Thread')
|
||||
.setStyle('SUCCESS')
|
||||
)
|
||||
|
||||
const thread = message.startThread({
|
||||
name: `${message.author.tag} - ${message}`,
|
||||
autoArchiveDuration: 60,
|
||||
type: 'GUILD_PUBLIC_THREAD'
|
||||
});
|
||||
|
||||
(await thread).send({
|
||||
content: `Hey <@${message.author.id}>! I've automatically created this thread from your message to keep the channel clean and keep messages condensed.
|
||||
\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.
|
||||
\nFeel free to ping '@Coursework Help' if you would like a hand!`,
|
||||
components: [row]
|
||||
});
|
||||
|
||||
(await thread).leave();
|
||||
}
|
||||
|
||||
if (
|
||||
message.author.bot ||
|
||||
|
|
Loading…
Reference in New Issue