Controller configs

This commit is contained in:
Joey Yakimowich-Payne 2025-05-16 09:22:03 -06:00
commit c43cb5e0ce
6 changed files with 1275 additions and 307 deletions

37
main.py
View file

@ -295,22 +295,28 @@ def main() -> None:
print("Keyboard/mouse control will be simulated but not actually perform any actions.")
print("Run 'pip install pynput' to enable actual keyboard/mouse control.")
game_controller: GameController = GameController(
bot,
mode=args.game_mode,
cooldown=args.cooldown,
input_type=args.input_type
)
if args.game_mode == "direct":
print(f"Commands will execute immediately with a {args.cooldown}s cooldown per user")
# Only initialize the GameController when NOT using queue mode
# When in queue mode, the controller is initialized in the queue consumer process
if not args.use_queue:
game_controller: GameController = GameController(
bot,
mode=args.game_mode,
cooldown=args.cooldown,
input_type=args.input_type
)
if args.game_mode == "direct":
print(f"Commands will execute immediately with a {args.cooldown}s cooldown per user")
else:
print("Commands will be collected through voting")
print("Streamer can start a vote with !startvote and end with !endvote")
print("Users vote with !vote [command]")
print("Use !gamehelp to see available game commands")
print("Check user stats with !gamestats [username]")
else:
print("Commands will be collected through voting")
print("Streamer can start a vote with !startvote and end with !endvote")
print("Users vote with !vote [command]")
print("Use !gamehelp to see available game commands")
print("Check user stats with !gamestats [username]")
print("Game control will be handled by the queue consumer process")
print("Use !gamehelp to see available game commands")
except ImportError as e:
print(f"Failed to import game control features: {e}")
@ -319,7 +325,6 @@ def main() -> None:
if args.input_type == 'controller':
print(" pip install vgamepad # For controller support")
print("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxinput type: ", args.input_type)
# Start the bot
print(f"Starting bot for channel #{channel}")
print("Basic commands: !hello, !dice [sides], !echo [message], !8ball")