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