diff --git a/mumble-bot/bot.py b/mumble-bot/bot.py index a8bb93c..1287665 100644 --- a/mumble-bot/bot.py +++ b/mumble-bot/bot.py @@ -34,6 +34,7 @@ def get_parser(): parser.add_argument("--channel", help="Set channel", default="") parser.add_argument("--name", help="Set bot nickname", default="RadioRobbot") parser.add_argument("--server", help="Set server", default="mumble.esiliati.org") + parser.add_argument("--password", help="Set password", default="") parser.add_argument("--port", help="Set port", type=int, default=64738) parser.add_argument( "--stream", @@ -48,6 +49,11 @@ def get_parser(): parser.add_argument( "--max-silence-time", type=int, help="max silence time in seconds", default=30 ) + parser.add_argument( + "--tokens", + help="Set tokens list", + nargs="*" + ) return parser @@ -57,16 +63,17 @@ def main(): args = get_parser().parse_args() logging.basicConfig(level=logging.DEBUG) - pwd = "" # password + pwd = args.password server = args.server nick = args.name channel = args.channel port = args.port + tokens = args.tokens is_streaming = False stream_always = args.stream # Spin up a client and connect to mumble server - mumble = pymumble.Mumble(server, nick, password=pwd, port=port) + mumble = pymumble.Mumble(server, nick, password=pwd, port=port, tokens=tokens) mumble.callbacks.set_callback( PYMUMBLE_CLBK_TEXTMESSAGERECEIVED, partial(message_received, mumble)