mood: add get_pissed method (unused)

master
dece 4 years ago
parent 29258a13b4
commit d85d5e054f

@ -43,7 +43,8 @@
"calm": "Fine!",
"pissed": "Pissed off..."
},
"calmed_message": "I'm calm now."
"calmed_message": "I'm calm now.",
"pissed_message": "I'm pissed off now..."
},
"notes": {
"commands": ["note down", "notes"],

@ -15,6 +15,9 @@ class MoodPlugin(Plugin):
This plugin exposes the runtime value `mood` (Mood) which can be
used to act differently upon some actions according to the bot
current mood.
There is only one question available: what's the bot mood? Multiple
questions in the `questions` list is equivalent to using aliases.
"""
REQUIRED_CONFIGS = [
@ -55,6 +58,12 @@ class MoodPlugin(Plugin):
self.set_runtime_value("mood", Mood.CALM)
self.bot.say(target, self.config["calmed_message"])
def get_pissed(self, target):
if self.mood == Mood.PISSED:
return
self.set_runtime_value("mood", Mood.PISSED)
self.bot.say(target, self.config["pissed_message"])
def say_mood(self, target):
answer = self.config["answer"].get(self.mood.value)
if answer:

Loading…
Cancel
Save