Slightly improved hardcoded messages

This commit is contained in:
2025-04-29 01:04:50 +02:00
parent 2e9ed41a2c
commit 112387115f
4 changed files with 13 additions and 8 deletions

View File

@@ -199,7 +199,9 @@ class CogEvent(Cog):
start_date = start_date.replace(tzinfo=guild_timezone) start_date = start_date.replace(tzinfo=guild_timezone)
except ValueError: except ValueError:
# TODO Make a nice message # TODO Make a nice message
await ctx.respond("Could not parse the start date.") await ctx.respond(
"Could not parse the start date. Please, make sure it is provided in `DD.MM.YYYY HH:MM` format."
)
return return
try: try:
@@ -209,7 +211,9 @@ class CogEvent(Cog):
end_date = end_date.replace(tzinfo=guild_timezone) end_date = end_date.replace(tzinfo=guild_timezone)
except ValueError: except ValueError:
# TODO Make a nice message # TODO Make a nice message
await ctx.respond("Could not parse the end date.") await ctx.respond(
"Could not parse the end date. Please, make sure it is provided in `DD.MM.YYYY HH:MM` format."
)
return return
if not await validate_event_validity(ctx, name, start_date, end_date, guild_timezone): if not await validate_event_validity(ctx, name, start_date, end_date, guild_timezone):

View File

@@ -43,7 +43,9 @@ class CogGuess(Cog):
if user.current_event_id is None or user.current_stage_id is None: if user.current_event_id is None or user.current_stage_id is None:
# TODO Make a nice message # TODO Make a nice message
await ctx.respond("You have no ongoing events.") await ctx.respond(
"You have no ongoing events. You can register for events using the `/register` command."
)
return return
try: try:
@@ -51,9 +53,7 @@ class CogGuess(Cog):
stage: PycordEventStage = await self.bot.find_event_stage(user.current_stage_id) stage: PycordEventStage = await self.bot.find_event_stage(user.current_stage_id)
except (InvalidId, RuntimeError): except (InvalidId, RuntimeError):
# TODO Make a nice message # TODO Make a nice message
await ctx.respond( await ctx.respond("Your event could not be found. Please, contact the administrator.")
"Your event could not be found. Please, report this issue to the event's management."
)
return return
if ctx.channel_id != user.event_channels[str(event._id)]: if ctx.channel_id != user.event_channels[str(event._id)]:
@@ -90,6 +90,7 @@ class CogGuess(Cog):
guild, guild,
f"User **{ctx.author.display_name}** ({ctx.author.mention}) has completed the event", f"User **{ctx.author.display_name}** ({ctx.author.mention}) has completed the event",
) )
return return
next_stage: PycordEventStage = await self.bot.find_event_stage(next_stage_id) next_stage: PycordEventStage = await self.bot.find_event_stage(next_stage_id)

View File

@@ -294,7 +294,7 @@ class CogStage(Cog):
await event_stage.purge(cache=self.bot.cache) await event_stage.purge(cache=self.bot.cache)
# TODO Make a nice message # TODO Make a nice message
await ctx.respond("Okay.") await ctx.respond("Event stage has been deleted.")
def setup(bot: PycordBot) -> None: def setup(bot: PycordBot) -> None:

View File

@@ -70,7 +70,7 @@ class CogUnregister(Cog):
# TODO Text channel must be locked and updated # TODO Text channel must be locked and updated
await ctx.respond("Ok.") await ctx.respond("You are no longer registered for this event.")
def setup(bot: PycordBot) -> None: def setup(bot: PycordBot) -> None: