Update give

Moved kekse to separate file kekse.py
Changed command from 'givedrink' to 'give' (according to function)
Fixed Typos, changed messages to match type of item given to user
This commit is contained in:
ThomasWeis
2022-04-21 09:19:00 +02:00
committed by BaerbelBox
parent 820f8f3fe2
commit 672aa6a839
2 changed files with 10 additions and 15 deletions

View File

@@ -2,10 +2,7 @@ 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']
from kekse import kekse
class GiveCookieObserver(PrivMsgObserverPrototype):
@@ -15,7 +12,7 @@ class GiveCookieObserver(PrivMsgObserverPrototype):
@staticmethod
def help():
return ".cookie - verteilt kekse; oder auch nicht"
return ".cookie - verteilt Kekse; oder auch nicht"
def update_on_priv_msg(self, data: dict, connection: Connection):
if data['message'].find('.cookie') == -1: