mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2026-05-25 08:14:23 -04:00
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:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user