diff --git a/redbot/core/_cli.py b/redbot/core/_cli.py index 333e78fe700..e13820621ec 100644 --- a/redbot/core/_cli.py +++ b/redbot/core/_cli.py @@ -135,6 +135,9 @@ def parse_cli_flags(args): ) parser.add_argument("--version", "-V", action="store_true", help="Show Red's current version") parser.add_argument("--debuginfo", action="store_true", help="Show debug information.") + parser.add_argument( + "--enable-debug-events", action="store_true", help="Enable discord.py socket debug events." + ) parser.add_argument( "--list-instances", action="store_true", diff --git a/redbot/core/bot.py b/redbot/core/bot.py index 359b65e3657..e0fd95f7f0b 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -232,6 +232,9 @@ async def prefix_manager(bot, message) -> List[str]: kwargs["max_messages"] = message_cache_size self._max_messages = message_cache_size + if cli_flags.enable_debug_events: + kwargs["enable_debug_events"] = True + self._uptime = None self._checked_time_accuracy = None