-
Notifications
You must be signed in to change notification settings - Fork 13
feat(quoi-feur): quoi-feur feat in threads #133
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Peïo Thibault <peio.thibault@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Peïo Thibault <peio.thibault@gmail.com>
const isOwner = (channel : Channel, user : User) => { | ||
if(channel.type == ChannelType.PublicThread){ | ||
if(user.id == channel.ownerId) return true; | ||
} | ||
return; | ||
} |
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.
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 |
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.
- 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; |
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.
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 (!memberPermissions || !channel || !channel.isTextBased() || (channel.type !== ChannelType.GuildText && channel.type !== ChannelType.PublicThread)) return; |
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.
same comment
@@ -1,11 +0,0 @@ | |||
# SETUP |
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 this is delete ?
Add the quoi-feur feature in threads and allow thread owners to enable/disable the quoi-feur feature in their channels.