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

Remove hardcoded role ids #601

Open
github-actions bot opened this issue Oct 5, 2024 · 0 comments
Open

Remove hardcoded role ids #601

github-actions bot opened this issue Oct 5, 2024 · 0 comments

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2024

# TODO: Remove hardcoded role ids

            The name and content of the snippet.
        """

        # TODO: Remove hardcoded role ids

        # If user does not have any of the access level roles, return
        access_level_role_ids = [1290368656441872535, 1290368813627346995]

        assert ctx.guild

        if isinstance(ctx.author, discord.Member) and all(
            role.id not in access_level_role_ids for role in ctx.author.roles
        ):
            await ctx.send("You do not have the permission to use this command.")
            return

        if await self.is_snippetbanned(ctx.guild.id, ctx.author.id):
            await ctx.send("You are banned from using snippets.")
            return
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

No branches or pull requests

0 participants