Files
ninachloe/FaustBot/Modules/GiveIceObserver.py
T
ThomasWeis 8479462955 Update help descriptions, fixed typos
Minor changes to messages returned by the help command
2022-04-21 09:12:06 +02:00

21 lines
618 B
Python

import random
from FaustBot.Communication.Connection import Connection
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
from icecreamlist import icecream
class GiveIceObserver(PrivMsgObserverPrototype):
@staticmethod
def cmd():
return [".ice"]
@staticmethod
def help():
return ".ice - serviert Eis"
def update_on_priv_msg(self, data: dict, connection: Connection):
if data['message'].find('.ice') == -1:
return
connection.send_back('\001ACTION serviert ' + data['nick'] + ' ' + random.choice(icecream) + '.\001', data)