From 4813c68185887ae718ccddcc3f02742a84587629 Mon Sep 17 00:00:00 2001 From: Vexed Date: Sat, 3 Apr 2021 19:38:57 +0100 Subject: [PATCH] Add note about updating cogs to update message and docs (#4910) * Add update note to the docs * And now the DM * consistent wording * Clarify the command should be ran in Discord * apply docs suggestions Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * apply events.py review Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- docs/update_red.rst | 4 ++++ redbot/core/events.py | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/update_red.rst b/docs/update_red.rst index fdbf5b693..0781e11d0 100644 --- a/docs/update_red.rst +++ b/docs/update_red.rst @@ -54,6 +54,8 @@ If you have Red 3.2.0 or newer, you can upgrade by following these 4 easy steps: 4. Start your bot. +5. If you have any 3rd-party cogs installed, we highly recommend you update them with this command in Discord: ``[p]cog update`` (``[p]`` is considered as your prefix) + Linux & Mac ----------- @@ -88,6 +90,8 @@ If you have Red 3.2.0 or newer, you can upgrade by following these 4 easy steps: 4. Start your bot. +5. If you have any 3rd-party cogs installed, we highly recommend you update them with this command in Discord: ``[p]cog update`` (``[p]`` is considered as your prefix) + Red 3.1.X ********* diff --git a/redbot/core/events.py b/redbot/core/events.py index 00d6434f3..98b55e644 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -29,6 +29,7 @@ from .utils._internal_utils import ( format_fuzzy_results, expected_version, fetch_latest_red_version_info, + send_to_owners_with_prefix_replaced, ) from .utils.chat_formatting import inline, bordered, format_perms_list, humanize_timedelta @@ -156,6 +157,11 @@ def init_events(bot, cli_flags): python=sys.executable, package_extras=package_extras ) ) + extra_update += _( + "\nOnce you've started up your bot again, if you have any 3rd-party cogs" + " installed we then highly recommend you update them with this command" + " in Discord: `[p]cog update`" + ) else: extra_update += _( @@ -201,7 +207,7 @@ def init_events(bot, cli_flags): bot._color = discord.Colour(await bot._config.color()) bot._red_ready.set() if outdated_red_message: - await bot.send_to_owners(outdated_red_message) + await send_to_owners_with_prefix_replaced(bot, outdated_red_message) @bot.event async def on_command_completion(ctx: commands.Context):