mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
.cookie f-string + startswith
This commit is contained in:
@@ -15,6 +15,7 @@ class GiveCookieObserver(PrivMsgObserverPrototype):
|
||||
return ".cookie - verteilt Kekse; oder auch nicht"
|
||||
|
||||
def update_on_priv_msg(self, data: dict, connection: Connection):
|
||||
if data['message'].find('.cookie') == -1:
|
||||
return
|
||||
connection.send_back('\001ACTION schenkt ' + data['nick'] + ' ' + random.choice(kekse) + '.\001', data)
|
||||
if data["message"].startswith(".cookie"):
|
||||
connection.send_back(
|
||||
f"\001ACTION schenkt {data['nick']} {random.choice(kekse)}.\001", data
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user