(accountability): Small fixes.
Check whether guild exists on booked list. Remove some debugs.
This commit is contained in:
@@ -293,7 +293,6 @@ class TimeSlot:
|
|||||||
embed=self.open_embed
|
embed=self.open_embed
|
||||||
)
|
)
|
||||||
except discord.HTTPException as e:
|
except discord.HTTPException as e:
|
||||||
print(e)
|
|
||||||
GuildSettings(self.guild.id).event_log.log(
|
GuildSettings(self.guild.id).event_log.log(
|
||||||
"Failed to post the status message in the accountability lobby {}.\n"
|
"Failed to post the status message in the accountability lobby {}.\n"
|
||||||
"Skipping this session.".format(self.lobby.mention),
|
"Skipping this session.".format(self.lobby.mention),
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ async def cmd_rooms(ctx):
|
|||||||
|
|
||||||
slotids = [row['slotid'] for row in to_cancel]
|
slotids = [row['slotid'] for row in to_cancel]
|
||||||
async with room_lock:
|
async with room_lock:
|
||||||
|
# TODO: Use the return from this to calculate the cost!
|
||||||
accountability_members.delete_where(
|
accountability_members.delete_where(
|
||||||
userid=ctx.author.id,
|
userid=ctx.author.id,
|
||||||
slotid=slotids
|
slotid=slotids
|
||||||
@@ -505,7 +506,7 @@ async def cmd_rooms(ctx):
|
|||||||
time_format(start),
|
time_format(start),
|
||||||
"" if not show_guild else (
|
"" if not show_guild else (
|
||||||
"on this server" if guild == ctx.guild else "in **{}**".format(
|
"on this server" if guild == ctx.guild else "in **{}**".format(
|
||||||
guild.name
|
guild.name if guild else guild.id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) for start, (num, guild) in attendees.items()
|
) for start, (num, guild) in attendees.items()
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ async def open_next(start_time):
|
|||||||
slot_memberids = collections.defaultdict(list)
|
slot_memberids = collections.defaultdict(list)
|
||||||
for row in member_data:
|
for row in member_data:
|
||||||
slot_memberids[row.slotid].append(row.userid)
|
slot_memberids[row.slotid].append(row.userid)
|
||||||
print(room_data, member_data)
|
|
||||||
|
|
||||||
# Open a new slot in each accountability guild
|
# Open a new slot in each accountability guild
|
||||||
to_update = [] # Cache of slot update data to be applied at the end
|
to_update = [] # Cache of slot update data to be applied at the end
|
||||||
|
|||||||
Reference in New Issue
Block a user