mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
.hug f-string and hug-variations (added umarmt und drückt)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import random
|
||||||
|
|
||||||
from FaustBot.Communication import Connection
|
from FaustBot.Communication import Connection
|
||||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||||
|
|
||||||
@@ -12,6 +14,6 @@ class FreeHugsObserver(PrivMsgObserverPrototype):
|
|||||||
return ".hug - verteilt Umarmungen"
|
return ".hug - verteilt Umarmungen"
|
||||||
|
|
||||||
def update_on_priv_msg(self, data: dict, connection: Connection):
|
def update_on_priv_msg(self, data: dict, connection: Connection):
|
||||||
if data['message'].find('.hug') == -1:
|
if data["message"].startswith(".hug"):
|
||||||
return
|
hug_word = random.choice(["umarmt", "knuddelt", "drückt"])
|
||||||
connection.send_back('\001ACTION knuddelt ' + data['nick'] + '.\001', data)
|
connection.send_back(f"\001ACTION {hug_word} {data['nick']}.\001", data)
|
||||||
|
|||||||
Reference in New Issue
Block a user