Skip to content

Commit

Permalink
revert: rm autothreader
Browse files Browse the repository at this point in the history
This was removed in favour of discord.js new forum channels
  • Loading branch information
Ki-er committed Sep 19, 2022
1 parent 6d46f83 commit f0cb734
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/events/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit f0cb734

Please sign in to comment.