lock stable diffusion down to a role called stable-diffuser
This commit is contained in:
parent
3690d60b03
commit
b3936f69bb
@ -66,6 +66,7 @@ class ActualUtils(commands.Cog):
|
|||||||
questions.open_ai(query),
|
questions.open_ai(query),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@commands.has_role("stable-diffuser")
|
||||||
@commands.command(name="sd")
|
@commands.command(name="sd")
|
||||||
async def sd(self, ctx: commands.Context, *, prompt):
|
async def sd(self, ctx: commands.Context, *, prompt):
|
||||||
import socket
|
import socket
|
||||||
@ -111,13 +112,9 @@ class ActualUtils(commands.Cog):
|
|||||||
"Stable diffusion isnt running right now, sorry.\n%s" % e,
|
"Stable diffusion isnt running right now, sorry.\n%s" % e,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@commands.has_role("Track day gamers")
|
||||||
@commands.command(name="trackdays")
|
@commands.command(name="trackdays")
|
||||||
async def trackdays(self, ctx: commands.Context):
|
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
|
import trackdays
|
||||||
|
|
||||||
for track, events in trackdays.get_msreg().items():
|
for track, events in trackdays.get_msreg().items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user