Add --enable-debug-events flag to CLI (#6660)

Co-authored-by: amazingakai <93782497+amazingakai@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
Evanroby
2026-05-23 05:51:24 +02:00
committed by GitHub
parent 3b8ecba975
commit aa499c5639
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -137,6 +137,12 @@ 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 raw socket events (on_socket_raw_receive and on_socket_raw_send)."
" This may reduce the bot's performance significantly.",
)
parser.add_argument(
"--list-instances",
action="store_true",
+3
View File
@@ -249,6 +249,9 @@ class Red(
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