Skip to content
Snippets Groups Projects
Commit e8c23ccb authored by Frederic Aust's avatar Frederic Aust
Browse files

New Feature: Kings Cup Rules

parent fc0803d8
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,16 @@ ...@@ -50,7 +50,16 @@
], ],
"Description": "True American Rules: How to play the game from New Girl", "Description": "True American Rules: How to play the game from New Girl",
"_Func": "echo" "_Func": "echo"
},
{
"Names": [
".kingscup"
],
"Description": "Kings Cup Rules",
"_Func": "echo"
} }
], ],
"APIs": [ "APIs": [
{ {
......
...@@ -195,6 +195,8 @@ def handle_action(timestamp, source, groupID, message, attachments): ...@@ -195,6 +195,8 @@ def handle_action(timestamp, source, groupID, message, attachments):
get_tex_formula(receiver, " ".join(str(x) for x in msg_splitted[1:])) get_tex_formula(receiver, " ".join(str(x) for x in msg_splitted[1:]))
elif action == "deepl" and (groupInfo is None or action in groupInfo["COMMANDS"]): elif action == "deepl" and (groupInfo is None or action in groupInfo["COMMANDS"]):
get_deepl_translation(receiver, " ".join(str(x) for x in msg_splitted[1:])) get_deepl_translation(receiver, " ".join(str(x) for x in msg_splitted[1:]))
elif action == "kingscup" and (groupInfo is None or action in groupInfo["COMMANDS"]):
get_kings_cup(receiver)
else: else:
unknown_command(receiver, message) # wenn nicht berechtigt, dann "ich seh nix, ich weiss nix, ich hör nix" => unbekannter befehl unknown_command(receiver, message) # wenn nicht berechtigt, dann "ich seh nix, ich weiss nix, ich hör nix" => unbekannter befehl
except Exception as ex: except Exception as ex:
...@@ -459,6 +461,9 @@ def get_deepl_translation(receiver, message): ...@@ -459,6 +461,9 @@ def get_deepl_translation(receiver, message):
send(answer,receiver ) send(answer,receiver )
def get_kings_cup(receiver):
send_a("Don't drink and derive!",receiver, "/home/pi/signalbot/kings_cup_regeln.png")
def on_mqtt_message(client, userdata, msg): def on_mqtt_message(client, userdata, msg):
print(msg.topic + " " + str(msg.payload)) print(msg.topic + " " + str(msg.payload))
send(msg.topic + " " + str(msg.payload), CONFIG['Admins']['Fred']) send(msg.topic + " " + str(msg.payload), CONFIG['Admins']['Fred'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment