Bug fixes

Fixed patch_current and added check for message listener in DM Channels
This commit is contained in:
Cal Corum 2023-05-15 10:17:59 -05:00
parent f9f94b93c5
commit ffae4e4018
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ class Players(commands.Cog):
# await message.channel.send( # await message.channel.send(
# 'https://cdn.discordapp.com/attachments/619600872782954539/682411826335711268/image0.jpg' # 'https://cdn.discordapp.com/attachments/619600872782954539/682411826335711268/image0.jpg'
# ) # )
if message.author.bot: if message.author.bot or isinstance(message.channel, discord.DMChannel):
return return
tm = message.content.lower() tm = message.content.lower()

View File

@ -203,7 +203,7 @@ async def patch_current(
if injury_count is not None: if injury_count is not None:
params.append(('injury_count', injury_count)) params.append(('injury_count', injury_count))
return db_patch('current', object_id=current['id'], params=params) return await db_patch('current', object_id=current['id'], params=params)
async def get_one_team(id_or_abbrev, season=None, is_pd=False, timeout=3): async def get_one_team(id_or_abbrev, season=None, is_pd=False, timeout=3):