We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c9f905 commit e5efae7Copy full SHA for e5efae7
tux/main.py
@@ -1,6 +1,7 @@
1
import asyncio
2
import concurrent.futures
3
import os
4
+import sys
5
from typing import Any
6
7
import discord
@@ -71,6 +72,8 @@ async def change_activity(self) -> None:
71
72
# coroutine for console commands
73
# loops user input and executes commands
74
async def console(self) -> None:
75
+ if not os.isatty(sys.stdin.fileno()):
76
+ logger.info("Running in a non-interactive mode. Skipping console input.")
77
logger.info("Console is ready. Type 'help' for a list of commands.")
78
while True:
79
# Use asyncio.run_in_executor to run input in a separate thread
0 commit comments