diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index f545d355a..63022472a 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -277,6 +277,21 @@ class Core: except: pass await ctx.bot.shutdown() + + @commands.command(name="restart") + @checks.is_owner() + async def _restart(self, ctx, silently: bool=False): + """Attempts to restart Red + + Makes Red quit with exit code 26 + The restart is not guaranteed: it must be dealt + with by the process manager in use""" + try: + if not silently: + await ctx.send(_("Restarting...")) + except: + pass + await ctx.bot.shutdown(restart=True) def cleanup_and_refresh_modules(self, module_name: str): """Interally reloads modules so that changes are detected""" diff --git a/redbot/core/locales/messages.pot b/redbot/core/locales/messages.pot index 6d1a1e30c..e8fbc9f9d 100644 --- a/redbot/core/locales/messages.pot +++ b/redbot/core/locales/messages.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2017-08-26 18:11+EDT\n" +"POT-Creation-Date: 2018-01-28 15:46+AKST\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,209 +15,265 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: ../cog_manager.py:196 +#: ../cog_manager.py:308 msgid "" "Install Path: {}\n" "\n" msgstr "" -#: ../cog_manager.py:212 +#: ../cog_manager.py:324 msgid "That path is does not exist or does not point to a valid directory." msgstr "" -#: ../cog_manager.py:221 +#: ../cog_manager.py:333 msgid "Path successfully added." msgstr "" -#: ../cog_manager.py:234 +#: ../cog_manager.py:346 msgid "That is an invalid path number." msgstr "" -#: ../cog_manager.py:238 +#: ../cog_manager.py:350 msgid "Path successfully removed." msgstr "" -#: ../cog_manager.py:254 +#: ../cog_manager.py:366 msgid "Invalid 'from' index." msgstr "" -#: ../cog_manager.py:260 +#: ../cog_manager.py:372 msgid "Invalid 'to' index." msgstr "" -#: ../cog_manager.py:264 +#: ../cog_manager.py:376 msgid "Paths reordered." msgstr "" -#: ../cog_manager.py:282 +#: ../cog_manager.py:394 msgid "That path does not exist." msgstr "" -#: ../cog_manager.py:286 +#: ../cog_manager.py:398 msgid "The bot will install new cogs to the `{}` directory." msgstr "" -#: ../core_commands.py:35 +#: ../core_commands.py:189 ../core_commands.py:223 msgid "No module by that name was found in any cog path." msgstr "" -#: ../core_commands.py:43 +#: ../core_commands.py:197 msgid "Failed to load package. Check your console or logs for details." msgstr "" -#: ../core_commands.py:47 ../core_commands.py:56 ../core_commands.py:76 -#: ../core_commands.py:151 ../core_commands.py:212 ../core_commands.py:226 +#: ../core_commands.py:201 ../core_commands.py:210 ../core_commands.py:235 +#: ../core_commands.py:324 ../core_commands.py:388 ../core_commands.py:402 msgid "Done." msgstr "" -#: ../core_commands.py:58 +#: ../core_commands.py:212 msgid "That extension is not loaded." msgstr "" -#: ../core_commands.py:71 +#: ../core_commands.py:232 msgid "Failed to reload package. Check your console or logs for details." msgstr "" -#: ../core_commands.py:86 +#: ../core_commands.py:245 msgid "Shutting down... " msgstr "" -#: ../core_commands.py:123 +#: ../core_commands.py:260 +msgid "Restarting..." +msgstr "" + +#: ../core_commands.py:297 msgid "The admin role for this guild has been set." msgstr "" -#: ../core_commands.py:131 +#: ../core_commands.py:305 msgid "The mod role for this guild has been set." msgstr "" -#: ../core_commands.py:145 +#: ../core_commands.py:318 msgid "Failed. Remember that you can edit my avatar up to two times a hour. The URL must be a direct link to a JPG / PNG." msgstr "" -#: ../core_commands.py:149 +#: ../core_commands.py:322 msgid "JPG / PNG format only." msgstr "" -#: ../core_commands.py:161 +#: ../core_commands.py:337 msgid "Game set." msgstr "" -#: ../core_commands.py:190 +#: ../core_commands.py:366 msgid "Status changed to %s." msgstr "" -#: ../core_commands.py:221 +#: ../core_commands.py:397 msgid "Failed to change name. Remember that you can only do it up to 2 times an hour. Use nicknames if you need frequent changes. `{}set nickname`" msgstr "" -#: ../core_commands.py:236 +#: ../core_commands.py:412 msgid "I lack the permissions to change my own nickname." msgstr "" -#: ../core_commands.py:250 ../core_commands.py:263 +#: ../core_commands.py:426 ../core_commands.py:439 msgid "Prefix set." msgstr "" -#: ../core_commands.py:259 +#: ../core_commands.py:435 msgid "Guild prefixes have been reset." msgstr "" -#: ../core_commands.py:282 +#: ../core_commands.py:458 msgid "" "\n" "Verification token:" msgstr "" -#: ../core_commands.py:285 +#: ../core_commands.py:461 msgid "" "Remember:\n" msgstr "" -#: ../core_commands.py:288 +#: ../core_commands.py:464 msgid "I have printed a one-time token in the console. Copy and paste it here to confirm you are the owner." msgstr "" -#: ../core_commands.py:296 +#: ../core_commands.py:472 msgid "The set owner request has timed out." msgstr "" -#: ../core_commands.py:302 +#: ../core_commands.py:478 msgid "You have been set as owner." msgstr "" -#: ../core_commands.py:304 +#: ../core_commands.py:480 msgid "Invalid token." msgstr "" -#: ../core_commands.py:313 +#: ../core_commands.py:492 msgid "Locale has been set." msgstr "" -#: ../core_commands.py:323 +#: ../core_commands.py:506 +msgid "Done. Sentry logging is now enabled." +msgstr "" + +#: ../core_commands.py:509 +msgid "Done. Sentry logging is now disabled." +msgstr "" + +#: ../core_commands.py:519 msgid "User ID: %s" msgstr "" -#: ../core_commands.py:326 +#: ../core_commands.py:522 msgid "through DM" msgstr "" -#: ../core_commands.py:328 +#: ../core_commands.py:524 msgid "from {}" msgstr "" -#: ../core_commands.py:329 +#: ../core_commands.py:525 msgid " | Server ID: %s" msgstr "" -#: ../core_commands.py:337 +#: ../core_commands.py:534 msgid "Use `{}dm {} ` to reply to this user" msgstr "" -#: ../core_commands.py:345 +#: ../core_commands.py:542 msgid "Sent by {} {}" msgstr "" -#: ../core_commands.py:357 +#: ../core_commands.py:554 msgid "I cannot send your message, I'm unable to find my owner... *sigh*" msgstr "" -#: ../core_commands.py:360 +#: ../core_commands.py:557 msgid "I'm unable to deliver your message. Sorry." msgstr "" -#: ../core_commands.py:362 +#: ../core_commands.py:559 msgid "Your message has been sent." msgstr "" -#: ../core_commands.py:376 +#: ../core_commands.py:573 msgid "Invalid ID or user not found. You can only send messages to people I share a server with." msgstr "" -#: ../core_commands.py:382 +#: ../core_commands.py:579 msgid "Owner of %s" msgstr "" -#: ../core_commands.py:385 +#: ../core_commands.py:583 msgid "You can reply to this message with %scontact" msgstr "" -#: ../core_commands.py:395 +#: ../core_commands.py:593 msgid "Sorry, I couldn't deliver your message to %s" msgstr "" -#: ../core_commands.py:398 +#: ../core_commands.py:596 msgid "Message delivered to %s" msgstr "" -#: ../dev_commands.py:165 +#: ../core_commands.py:616 +msgid "User added to whitelist." +msgstr "" + +#: ../core_commands.py:625 +msgid "Whitelisted Users:" +msgstr "" + +#: ../core_commands.py:645 +msgid "User has been removed from whitelist." +msgstr "" + +#: ../core_commands.py:647 +msgid "User was not in the whitelist." +msgstr "" + +#: ../core_commands.py:655 +msgid "Whitelist has been cleared." +msgstr "" + +#: ../core_commands.py:672 +msgid "You cannot blacklist an owner!" +msgstr "" + +#: ../core_commands.py:679 +msgid "User added to blacklist." +msgstr "" + +#: ../core_commands.py:688 +msgid "blacklisted Users:" +msgstr "" + +#: ../core_commands.py:708 +msgid "User has been removed from blacklist." +msgstr "" + +#: ../core_commands.py:710 +msgid "User was not in the blacklist." +msgstr "" + +#: ../core_commands.py:718 +msgid "blacklist has been cleared." +msgstr "" + +#: ../dev_commands.py:213 msgid "Already running a REPL session in this channel. Exit it with `quit`." msgstr "" -#: ../dev_commands.py:169 +#: ../dev_commands.py:218 msgid "Enter code to execute or evaluate. `exit()` or `quit` to exit." msgstr "" -#: ../dev_commands.py:234 +#: ../dev_commands.py:281 msgid "Unexpected error: `{}`" msgstr ""