Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(quoi-feur): quoi-feur feat in threads #133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AbdelMN
Copy link

@AbdelMN AbdelMN commented Feb 6, 2024

Add the quoi-feur feature in threads and allow thread owners to enable/disable the quoi-feur feature in their channels.

renovate bot and others added 3 commits January 5, 2024 13:13
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;
}
Copy link
Contributor

@luca-montaigut luca-montaigut Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (!memberPermissions || !channel || !channel.isTextBased() || (channel.type !== ChannelType.GuildText && channel.type !== ChannelType.PublicThread)) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

@AbdelMN AbdelMN changed the title feat(quoi-feur) : quoi-feur feat in threads feat(quoi-feur): quoi-feur feat in threads Feb 8, 2024
@AbdelMN AbdelMN closed this Feb 8, 2024
@AbdelMN AbdelMN reopened this Feb 8, 2024
@@ -1,11 +0,0 @@
# SETUP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is delete ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants