Add error logging for failed transaction notifications
This commit is contained in:
parent
f8716c69cb
commit
81933e8329
@ -429,12 +429,18 @@ class Transactions(commands.Cog):
|
|||||||
cancel_text = f'Your transaction containing {trans_data[0]["name"]} has been cancelled because some douche ' \
|
cancel_text = f'Your transaction containing {trans_data[0]["name"]} has been cancelled because some douche ' \
|
||||||
f'with a worse team wanted him, too.'
|
f'with a worse team wanted him, too.'
|
||||||
gm_one = guild.get_member(team['gmid'])
|
gm_one = guild.get_member(team['gmid'])
|
||||||
await gm_one.send(cancel_text)
|
try:
|
||||||
|
await gm_one.send(cancel_text)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f'Could not notify GM1 of {team["abbrev"]} ({team["gmid"]}) of move cancellation: {e}')
|
||||||
|
|
||||||
gm_two = None
|
gm_two = None
|
||||||
if team['gmid2'] is not None:
|
if team['gmid2'] is not None:
|
||||||
gm_two = guild.get_member(team['gmid2'])
|
gm_two = guild.get_member(team['gmid2'])
|
||||||
await gm_two.send(cancel_text)
|
try:
|
||||||
|
await gm_two.send(cancel_text)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f'Could not notifiy GM2 of {team["abbrev"]} ({team["gmid2"]})of move cancellation: {e}')
|
||||||
|
|
||||||
async def process_freeze_moves(self, current):
|
async def process_freeze_moves(self, current):
|
||||||
# all_moves = await get_transactions(
|
# all_moves = await get_transactions(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user