Added a message to admins when not stages are defined for the event to be started
This commit is contained in:
@@ -68,13 +68,20 @@ class PycordBot(LibPycordBot):
|
|||||||
|
|
||||||
# Process each event
|
# Process each event
|
||||||
for event in events:
|
for event in events:
|
||||||
|
guild: Guild = self.get_guild(event.guild_id)
|
||||||
|
pycord_guild: PycordGuild = await self.find_guild(guild)
|
||||||
|
|
||||||
if len(event.stage_ids) == 0:
|
if len(event.stage_ids) == 0:
|
||||||
# TODO Make a nice message for management
|
# TODO Make a nice message for management
|
||||||
logger.error("Could not start the event %s: no event stages are defined.", event._id)
|
logger.error("Could not start the event %s: no event stages are defined.", event._id)
|
||||||
continue
|
|
||||||
|
|
||||||
guild: Guild = self.get_guild(event.guild_id)
|
await self.notify_admins(
|
||||||
pycord_guild: PycordGuild = await self.find_guild(guild)
|
guild,
|
||||||
|
pycord_guild,
|
||||||
|
f"Could not start the event **{event.name}**: no event stages are defined.",
|
||||||
|
)
|
||||||
|
|
||||||
|
continue
|
||||||
first_stage: PycordEventStage = await self.find_event_stage(event.stage_ids[0])
|
first_stage: PycordEventStage = await self.find_event_stage(event.stage_ids[0])
|
||||||
|
|
||||||
# Get list of participants
|
# Get list of participants
|
||||||
|
Reference in New Issue
Block a user