diff --git a/cogs/cog_stage.py b/cogs/cog_stage.py index 482d098..d219bda 100644 --- a/cogs/cog_stage.py +++ b/cogs/cog_stage.py @@ -115,8 +115,7 @@ class CogStage(Cog): media=[] if media is None else processed_media, ) - # TODO Make a nice message - await ctx.respond("Event stage has been created.") + await ctx.respond(self.bot._("stage_created", "messages", locale=ctx.locale)) @command_group.command( name="edit", @@ -216,13 +215,11 @@ class CogStage(Cog): try: event_stage: PycordEventStage = await self.bot.find_event_stage(stage) except (InvalidId, EventStageNotFoundError): - # TODO Make a nice message - await ctx.respond("Event stage was not found.") + await ctx.respond(self.bot._("stage_not_found", "messages", locale=ctx.locale)) return if order is not None and order > len(pycord_event.stage_ids): - # TODO Make a nice message - await ctx.respond("Stage sequence out of range.") + await ctx.respond(self.bot._("stage_sequence_out_of_range", "messages", locale=ctx.locale)) return processed_media: List[Dict[str, Any]] = ( @@ -239,7 +236,7 @@ class CogStage(Cog): if order is not None and order - 1 != event_stage.sequence: await pycord_event.reorder_stage(self.bot, event_stage._id, order - 1, cache=self.bot.cache) - await ctx.respond("Event stage has been updated.") + await ctx.respond(self.bot._("stage_updated", "messages", locale=ctx.locale)) @command_group.command( name="delete", @@ -300,15 +297,13 @@ class CogStage(Cog): try: event_stage: PycordEventStage = await self.bot.find_event_stage(stage) except (InvalidId, EventStageNotFoundError): - # TODO Make a nice message - await ctx.respond("Event stage was not found.") + await ctx.respond(self.bot._("stage_not_found", "messages", locale=ctx.locale)) return await pycord_event.remove_stage(self.bot, event_stage._id, cache=self.bot.cache) await event_stage.purge(cache=self.bot.cache) - # TODO Make a nice message - await ctx.respond("Event stage has been deleted.") + await ctx.respond(self.bot._("stage_deleted", "messages", locale=ctx.locale)) def setup(bot: PycordBot) -> None: diff --git a/locale/en-US.json b/locale/en-US.json index 7c84b59..dfdcaa9 100644 --- a/locale/en-US.json +++ b/locale/en-US.json @@ -28,7 +28,12 @@ "register_already_registered": "You are already registered for this event.", "register_success_ongoing": "You are now registered for the event **{event_name}**.\n\nNew channel has been created for you and further instructions will are provided in it. Good luck!", "register_success_scheduled": "You are now registered for the event **{event_name}**.\n\nNew channel will be created for you and further instructions will be provided as soon as the event starts . Good luck!", + "stage_created": "Event stage has been created.", + "stage_deleted": "Event stage has been deleted.", "stage_entry": "**Stage {sequence}**\nAnswer: ||{answer}||", + "stage_not_found": "Event stage was not found.", + "stage_sequence_out_of_range": "Stage sequence out of range.", + "stage_updated": "Event stage has been updated.", "status": "**QuizBot** v{version}\n\nUptime: since ", "status_git": "**QuizBot** v{version} (`{commit}`)\n\nUptime: up since ", "timezone_invalid": "Timezone **{timezone}** was not found. Please, select one of the timezones provided by the autocompletion.",