revert: rm autothreader

This was removed in favour of discord.js new forum channels
imgbot
Kieran 2022-09-19 14:38:32 +01:00
parent 6d46f83296
commit f0cb73406e
1 changed files with 0 additions and 26 deletions

View File

@ -3,32 +3,6 @@ require("dotenv").config();
const discord = require('discord.js'); const discord = require('discord.js');
client.on("messageCreate", async (message) => { 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 ( if (
message.author.bot || message.author.bot ||