Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- parameter userInputFile.
- function processInput {
- parameter input.
- if (input:startswith("!")) {
- if (input:startswith("!commands")) {
- print("Available commands: !F5 [name], !F9 [name], !reconnect, !craftlist [filter], !launchcraft <name>, !vessels [filter], !switchvessel <name>, !recover, !revert, !kerbal <gender> <job>, !kerbal, !crew join <name>, !crewtransfer, !camera <mode>, !camera <variable> <operator> <value>, !camera focus <target>, !mapfilter <category> [on|off|toggle], !mapfilter default, !upload <pastebin code>, !cpu <X>, !kspmods, !runscript <pastebin code>")
- } else {
- print("Twitch bot command detected: " + input)
- }
- } else if (input:startswith("/me")) {
- set input to input:substring(4)
- print("Executing command: " + input)
- run input.
- } else {
- print("Invalid command format. Please start your command with '/me' or '!'.")
- }
- }
- lock throttle to 0.
- set userFile to open(userInputFile).
- set command to userFile:readline().
- userFile:close().
- processInput(command).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement