mirror of
https://git.sdf.org/tamservo/robottas.git
synced 2025-11-08 07:03:47 -05:00
Changed permission filter for race commands because discord changed the name to remove the #<number> portion of the id name.
This commit is contained in:
15
robottas.py
15
robottas.py
@@ -429,6 +429,8 @@ class Robottas(commands.Bot):
|
||||
async def process_message(self, message):
|
||||
try:
|
||||
if isinstance(message, collections.abc.Sequence):
|
||||
logging.debug(message)
|
||||
|
||||
if message[0] == 'Heartbeat':
|
||||
return
|
||||
|
||||
@@ -1125,19 +1127,22 @@ class Robottas(commands.Bot):
|
||||
|
||||
@self.command()
|
||||
async def race(ctx):
|
||||
if str(ctx.author) == "tamservo#0" or ctx.author.guild_permissions.administrator:
|
||||
if ctx.author.id == 581960756271251457 or \
|
||||
ctx.author.guild_permissions.administrator:
|
||||
await ctx.send(":robot::peach: Ready to report for the race!")
|
||||
await self._race_report(ctx)
|
||||
|
||||
@self.command()
|
||||
async def quali(ctx):
|
||||
if str(ctx.author) == "tamservo#0" or ctx.author.guild_permissions.administrator:
|
||||
if ctx.author.id == 581960756271251457 or \
|
||||
ctx.author.guild_permissions.administrator:
|
||||
await ctx.send(":robot::peach: Ready to report on quali!")
|
||||
await self._quali_report(ctx)
|
||||
|
||||
@self.command()
|
||||
async def practice(ctx):
|
||||
if str(ctx.author) == "tamservo#0" or ctx.author.guild_permissions.administrator:
|
||||
if ctx.author.id == 581960756271251457 or \
|
||||
ctx.author.guild_permissions.administrator:
|
||||
await ctx.send(":robot::peach: Ready to report on practice!")
|
||||
await self._practice_report(ctx)
|
||||
|
||||
@@ -1156,7 +1161,9 @@ class Robottas(commands.Bot):
|
||||
|
||||
@self.command()
|
||||
async def start_collect(ctx):
|
||||
if str(ctx.author) == "tamservo#0" or ctx.author.guild_permissions.administrator:
|
||||
# Check id for tamservo or admin on channel
|
||||
if ctx.author.id == 581960756271251457 or \
|
||||
ctx.author.guild_permissions.administrator:
|
||||
# if an authorized user, start the collection script that
|
||||
# puts records into the database
|
||||
await self.start_collect()
|
||||
|
||||
Reference in New Issue
Block a user