Adding a semi global var for my user ID and guild IDs

This commit is contained in:
Luke Robles 2022-10-13 08:28:14 -07:00
parent 31759cf76a
commit 7cadd3f2c8
5 changed files with 11 additions and 8 deletions

View File

@ -90,7 +90,7 @@ async def on_command_completion(ctx):
value="**(** [%s](%s) **)**" % (ctx.channel, ctx.message.jump_url), value="**(** [%s](%s) **)**" % (ctx.channel, ctx.message.jump_url),
) )
embed.add_field(name="Server:", value=f"{ctx.guild} **( <#{ctx.channel.id}> )**") embed.add_field(name="Server:", value=f"{ctx.guild} **( <#{ctx.channel.id}> )**")
if ctx.message.author.id != 144986109804412928: if ctx.message.author.id != core_utils.my_id:
await channel.send(embed=embed) await channel.send(embed=embed)

View File

@ -70,7 +70,7 @@ class ActualUtils(commands.Cog):
@commands.command(name="openai") @commands.command(name="openai")
async def openai(self, ctx: commands.Context, *, query): async def openai(self, ctx: commands.Context, *, query):
if ctx.message.author.id != 144986109804412928: if ctx.message.author.id != core_utils.my_id:
await ctx.send("Sorry, this is a paid dale-bot feature") await ctx.send("Sorry, this is a paid dale-bot feature")
return return
import questions import questions
@ -81,7 +81,7 @@ class ActualUtils(commands.Cog):
@commands.has_role("stable-diffuser") @commands.has_role("stable-diffuser")
@commands.slash_command( @commands.slash_command(
guild_ids=[826547484632678450, 152921472304676865], guild_ids=core_utils.my_guilds,
name="sd", name="sd",
description="Pass a prompt and optinal negative prompt to stable diffusion", description="Pass a prompt and optinal negative prompt to stable diffusion",
) )
@ -107,7 +107,7 @@ class ActualUtils(commands.Cog):
steps = 20 steps = 20
# Send my requests to my gaming computer with the 3080 (if its up) # Send my requests to my gaming computer with the 3080 (if its up)
if ctx.author.id == 144986109804412928: if ctx.author.id == core_utils.my_id:
ip = "192.168.1.188" ip = "192.168.1.188"
steps = 60 steps = 60
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ -145,7 +145,7 @@ class ActualUtils(commands.Cog):
@commands.has_role("Track day gamers") @commands.has_role("Track day gamers")
@commands.slash_command( @commands.slash_command(
guild_ids=None, guild_ids=core_utils.my_guilds,
name="trackdays", name="trackdays",
description="Query motorsportsreg.com for a list of trackdays going on at Buttonwillow and Thunderhill", description="Query motorsportsreg.com for a list of trackdays going on at Buttonwillow and Thunderhill",
) )

View File

@ -25,7 +25,7 @@ class Cheeky(commands.Cog):
@commands.command(name="coom", pass_context=True) @commands.command(name="coom", pass_context=True)
async def coom(self, ctx: commands.Context, id=None): async def coom(self, ctx: commands.Context, id=None):
if ctx.message.author.id != 144986109804412928: if ctx.message.author.id != core_utils.my_id:
return return
message = list(await ctx.message.channel.history(limit=2).flatten())[-1] message = list(await ctx.message.channel.history(limit=2).flatten())[-1]

View File

@ -186,7 +186,7 @@ class ServerUtils(commands.Cog):
@commands.command(name="shoo") @commands.command(name="shoo")
async def shoo(self, ctx: commands.Context): async def shoo(self, ctx: commands.Context):
if ctx.message.author.id != 144986109804412928: if ctx.message.author.id != core_utils.my_id:
return return
await ctx.message.delete() await ctx.message.delete()
await ctx.message.guild.leave() await ctx.message.guild.leave()
@ -243,7 +243,7 @@ class ServerUtils(commands.Cog):
@commands.command(name="topic") @commands.command(name="topic")
async def topic(self, ctx: commands.Context, *, new_channel_topic): async def topic(self, ctx: commands.Context, *, new_channel_topic):
if ctx.message.author.id != 144986109804412928: if ctx.message.author.id != core_utils.my_id:
return return
await ctx.message.delete() await ctx.message.delete()
await ctx.message.channel.edit(topic=new_channel_topic) await ctx.message.channel.edit(topic=new_channel_topic)

View File

@ -1,6 +1,9 @@
import requests import requests
import discord import discord
my_guilds = [826547484632678450, 152921472304676865]
my_id = 144986109804412928
def download_image(url, path=None): def download_image(url, path=None):