feat(quoi-feur): quoi-feur feat in threads#133
Open
AbdelMN wants to merge 4 commits intocodinglab-io:masterfrom
Open
feat(quoi-feur): quoi-feur feat in threads#133AbdelMN wants to merge 4 commits intocodinglab-io:masterfrom
AbdelMN wants to merge 4 commits intocodinglab-io:masterfrom
Conversation
Co-authored-by: Peïo Thibault <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Peïo Thibault <[email protected]>
Comment on lines
68
to
73
| const isOwner = (channel : Channel, user : User) => { | ||
| if(channel.type == ChannelType.PublicThread){ | ||
| if(user.id == channel.ownerId) return true; | ||
| } | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| const isOwner = (channel : Channel, user : User) => { | |
| if(channel.type == ChannelType.PublicThread){ | |
| if(user.id == channel.ownerId) return true; | |
| } | |
| return; | |
| } | |
| const isThreadOwner = (channel : Channel, user : User) => channel.type === ChannelType.PublicThread && user.id === channel.ownerId |
Contributor
There was a problem hiding this comment.
- I think it has to be moved in role.ts
| export const addQuoiFeurToChannel = async (interaction: ChatInputCommandInteraction) => { | ||
| const { channel, memberPermissions, user } = interaction; | ||
|
|
||
| if (!memberPermissions || !channel || !channel.isTextBased() || (channel.type !== ChannelType.GuildText && channel.type !== ChannelType.PublicThread)) return; |
Contributor
There was a problem hiding this comment.
Suggested change
| if (!memberPermissions || !channel || !channel.isTextBased() || (channel.type !== ChannelType.GuildText && channel.type !== ChannelType.PublicThread)) return; | |
| if (!memberPermissions || !channel || !channel.isTextBased() || ![ChannelType.GuildText, ChannelType.PublicThread].includes(channel.type)) return; |
| if (!channel || !channel.isTextBased() || channel.type !== ChannelType.GuildText) return; | ||
| const { channel, memberPermissions, user } = interaction; | ||
|
|
||
| if (!memberPermissions || !channel || !channel.isTextBased() || (channel.type !== ChannelType.GuildText && channel.type !== ChannelType.PublicThread)) return; |
| @@ -1,11 +0,0 @@ | |||
| # SETUP | |||
Contributor
There was a problem hiding this comment.
why this is delete ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the quoi-feur feature in threads and allow thread owners to enable/disable the quoi-feur feature in their channels.