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/264/limiting channel praise access #452

Merged
merged 5 commits into from
Aug 15, 2022

Conversation

Vyvy-vi
Copy link
Collaborator

@Vyvy-vi Vyvy-vi commented Jun 6, 2022

Fixes #264

This Pr adds the following settings to the bot -

PRAISE_ALLOWED_IN_ALL_CHANNELS: boolean
PRAISE_ALLOWED_CHANNEL_IDS: List of channel ids
Empty: Praising is not allow in any channel.
Not empty: Praising is not allowed in this channel, only in channels xxx, xxx.

Praise is enabled by default in all channels of the server

@Vyvy-vi Vyvy-vi force-pushed the feat/264/limiting-channel-praise-access branch from ffdae2c to bb276ba Compare June 7, 2022 22:00
@kristoferlund kristoferlund self-requested a review June 8, 2022 09:08
Copy link
Member

@kristoferlund kristoferlund left a comment

Choose a reason for hiding this comment

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

Great, seems to be working as intended!

I merged #440 with main and then merged this branch and solved some small conflicts.

#440 moves all Praise Giver checking into the function assertPraiseGiver- Perhaps we should consider renaming praiseAllowedInChannel assertPraiseAllowedInChannel?

#440 also removes getSetting in favour of using the settingValue in api/dist/shared/settings.

Needs fixing:

  • 12_praise_allowed_channels_settings.ts should start with 14 to avoid conflict.

packages/discord-bot/src/commands/admin.ts Outdated Show resolved Hide resolved
packages/discord-bot/src/handlers/forward.ts Outdated Show resolved Hide resolved
packages/discord-bot/src/utils/praisePermissions.ts Outdated Show resolved Hide resolved
packages/discord-bot/src/utils/praisePermissions.ts Outdated Show resolved Hide resolved
packages/discord-bot/src/utils/praisePermissions.ts Outdated Show resolved Hide resolved
packages/discord-bot/src/utils/settings.ts Outdated Show resolved Hide resolved
@Vyvy-vi Vyvy-vi force-pushed the feat/264/limiting-channel-praise-access branch from f9cd5e2 to 6bb0349 Compare June 11, 2022 23:43
@kristoferlund
Copy link
Member

@Vyvy-vi I don't remember, are there more changes needed for this PR?

@Vyvy-vi
Copy link
Collaborator Author

Vyvy-vi commented Jun 19, 2022

This PR's good to go!

@Vyvy-vi Vyvy-vi requested a review from kristoferlund June 19, 2022 06:44
@Vyvy-vi Vyvy-vi dismissed kristoferlund’s stale review June 19, 2022 06:45

Outdated review

@Vyvy-vi
Copy link
Collaborator Author

Vyvy-vi commented Aug 2, 2022

dependent on #521 being merged before

@Vyvy-vi Vyvy-vi marked this pull request as draft August 2, 2022 12:13
@Vyvy-vi Vyvy-vi closed this Aug 2, 2022
@Vyvy-vi Vyvy-vi force-pushed the feat/264/limiting-channel-praise-access branch from 9200385 to 28e2f77 Compare August 2, 2022 13:13
@kristoferlund
Copy link
Member

@Vyvy-vi, this PR is confusing me a bit. It says it is merged but I find no trace of the functionality. What happened?

@Vyvy-vi Vyvy-vi reopened this Aug 12, 2022
@Vyvy-vi Vyvy-vi marked this pull request as ready for review August 12, 2022 22:21
Copy link
Member

@kristoferlund kristoferlund left a comment

Choose a reason for hiding this comment

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

Looks good! Merging.

Made one small text change.

@kristoferlund kristoferlund merged commit 36a5537 into main Aug 15, 2022
@kristoferlund kristoferlund deleted the feat/264/limiting-channel-praise-access branch August 15, 2022 12:15
@kristoferlund kristoferlund mentioned this pull request Aug 24, 2022
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.

Option to limit praising to a certain discord channel
2 participants