Updated bot.
Bugfix: player count on GM leaving Added /tcard command with audio Updated debug commands
This commit is contained in:
@ -71,8 +71,9 @@ class PitchListener(commands.Cog, name='Pitch Listener'):
|
||||
i = pitches[guildStr][timeslot]['indices'][role.id]
|
||||
element = pitches[guildStr][timeslot]['entries'][i]
|
||||
gm = await self.client.fetch_user(element['gm'])
|
||||
data[guildStr][timeslot][str(role.id)]['current_players'] -= 1
|
||||
element['current_players'] -= 1
|
||||
if ctx.author.id != lookup[guildStr][str(role.id)]['gm']:
|
||||
data[guildStr][timeslot][str(role.id)]['current_players'] -= 1
|
||||
element['current_players'] -= 1
|
||||
o = f'_ _\n***{element["game_title"]}*** (GM: {gm.mention})\n```\n'
|
||||
if element['system'] is not None: o = ''.join([o,f'System: {element["system"]}\n'])
|
||||
if element['min_players'] is not None: o = ''.join([o,f'Minimum Players: {str(element["min_players"])} '])
|
||||
@ -131,8 +132,10 @@ class PitchListener(commands.Cog, name='Pitch Listener'):
|
||||
await ctx.send(f'```Error: You are not in the game `{lookup[guildStr][str(role.id)]["game_title"]}`.```', hidden=True)
|
||||
else:
|
||||
await ctx.author.remove_roles(role,reason=f'/pitch interaction by {ctx.author.display_name}')
|
||||
data[guildStr][timeslot][str(role.id)]['current_players'] -= 1
|
||||
element = pitches[guildStr][timeslot]['entries'][index]
|
||||
if ctx.author.id != lookup[guildStr][str(role.id)]['gm']:
|
||||
data[guildStr][timeslot][str(role.id)]['current_players'] -= 1
|
||||
element['current_players'] -= 1
|
||||
gm = await self.client.fetch_user(element['gm'])
|
||||
o = f'_ _\n***{element["game_title"]}*** (GM: {gm.mention})\n```\n'
|
||||
if element['system'] is not None: o = ''.join([o,f'System: {element["system"]}\n'])
|
||||
|
Reference in New Issue
Block a user