allthingslinux / tux

Tux is an all in one bot for the All Things Linux discord server.
https://discord.gg/linux
GNU General Public License v3.0
85 stars 25 forks source link

Figure out how to abstract ATL style check from being hardcoded here #599

Closed github-actions[bot] closed 1 month ago

github-actions[bot] commented 1 month ago

https://github.com/allthingslinux/tux/blob/b944f0b85c2669b0900d9ff34bcb615537af296a/tux/cogs/utility/snippets.py#L359


        assert ctx.guild

        # TODO: Figure out how to abstract ATL style check from being hardcoded here

        if isinstance(ctx.author, discord.Member) and self.level_15_role_id not in [
            role.id for role in ctx.author.roles
        ]:
            await ctx.send("You are not allowed to create snippets.")
            return

        if await self.is_snippetbanned(ctx.guild.id, ctx.author.id):
            await ctx.send("You are banned from using snippets.")
            return
github-actions[bot] commented 1 month ago

Closed in 28db45a8bfe00aa3f476fffe66474029878bbdbc.