-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the same approach for the help channel. We should bring this to a generic method so that we do not need to repeat ourselves for each channel with threads.
I do believe a generic function would be much more helpful, However my only predicament probably because my brain is having a laugh is that How should special channels be flagged with they need a thread. |
Yeah, it looks like we need to allow multiple special channels with the same label. I will come around to this. |
(await getSpecialChannel( | ||
message.guild?.id as string, | ||
"projects" | ||
)) as TextChannel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will crash
(await getSpecialChannel( | ||
message.guild?.id as string, | ||
"help" | ||
)) as TextChannel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will crash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dylhack Ok but like, I have an issue. It doesnt crash.
const id = uuid().split("-"); | ||
const thId = id[id.length - 1]; | ||
const threadName = `Thread #${thId}`; | ||
if (channel !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an impossible condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it impossible? Say a server doesnt have the special channel set in the config.
(await getSpecialChannel(
message.guild?.id as string,
"projects"
)) as TextChannel
would be passed through as null no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dylhack Actually, If you don't mind. Id like to postpone this until after the D.js v14 merge.
Ofc If that merge is actually happening.
waiting for #176 to merge |
This has been untouched for a couple months but I think it can be closed seeing as we use a forums channel for this stuff now? |
Up to @dylhack |
Automatically creates a Thread with a uuid when a message is sent in the special channel projects
closes #145