From ffcde710b1265e545b3c5f59cc51a4cb27f25b93 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Thu, 6 Oct 2022 08:37:04 -0700 Subject: [PATCH] lock stable diffusion down to a role called stable-diffuser --- app/cogs/actual_utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index 1aaaad33..27b2835e 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -66,6 +66,7 @@ class ActualUtils(commands.Cog): questions.open_ai(query), ) + @commands.has_role("stable-diffuser") @commands.command(name="sd") async def sd(self, ctx: commands.Context, *, prompt): import socket @@ -111,13 +112,9 @@ class ActualUtils(commands.Cog): "Stable diffusion isnt running right now, sorry.\n%s" % e, ) + @commands.has_role("Track day gamers") @commands.command(name="trackdays") async def trackdays(self, ctx: commands.Context): - role = discord.utils.find( - lambda r: r.name == "Track day gamers", ctx.message.guild.roles - ) - if role not in ctx.message.author.roles: - return await ctx.send("You cant do that") import trackdays for track, events in trackdays.get_msreg().items():