|
|
|
@ -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:
|
|
|
|
|