From f0cb73406e36de7bbc1237808877e644a38f62d3 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 19 Sep 2022 14:38:32 +0100 Subject: [PATCH] revert: rm autothreader This was removed in favour of discord.js new forum channels --- src/events/messageCreate.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/events/messageCreate.js b/src/events/messageCreate.js index dab6b09..d3e1e75 100644 --- a/src/events/messageCreate.js +++ b/src/events/messageCreate.js @@ -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 ||