mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-11 06:36:24 +02:00
Initalize repo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import random
|
||||
|
||||
from FaustBot.Communication import Connection
|
||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||
|
||||
kekse = ['einen Schokoladenkeks', 'einen Vanillekeks', 'einen Doppelkeks', 'keinen Keks',
|
||||
'einen Keks', 'einen Erdbeerkeks', 'einen Schokoladen-Cheesecake-Keks',
|
||||
'einen Glückskeks', 'einen Scherzkeks', 'einen Unglückskeks']
|
||||
|
||||
|
||||
class GiveCookieObserver(PrivMsgObserverPrototype):
|
||||
@staticmethod
|
||||
def cmd():
|
||||
return [".cookie"]
|
||||
|
||||
@staticmethod
|
||||
def help():
|
||||
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)
|
||||
Reference in New Issue
Block a user