Skip to content

leaderboard function#9

Open
Harlemzino wants to merge 6 commits into
pblca:mainfrom
Harlemzino:v1.2
Open

leaderboard function#9
Harlemzino wants to merge 6 commits into
pblca:mainfrom
Harlemzino:v1.2

Conversation

@Harlemzino

Copy link
Copy Markdown
Collaborator

No description provided.

@pblca pblca added the enhancement New feature or request label Jun 20, 2023
@pblca pblca self-requested a review June 20, 2023 18:32
@pblca pblca assigned pblca and Harlemzino and unassigned pblca Jun 20, 2023
Comment thread bot/match.py
# Check if the user invoking the command has the 'Serenader' role
admin = discord.utils.get(interaction.guild.roles, name='Serenader')
if admin not in interaction.user.roles:
await interaction.response.send_message('You are not a Serenader')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This should be an ephemeral response. Should probably make an error response class.

Additionally, we should make the role required guild configurable (store this configuration in mongo), or otherwise have the bot check for and make a role if its missing on start up.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@Harlemzino Actually, that whole admin check should be elevated to its own class somewhere so we can reuse this in any command that we want gated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants