mood: add get_pissed method (unused)
This commit is contained in:
parent
29258a13b4
commit
d85d5e054f
|
@ -43,7 +43,8 @@
|
||||||
"calm": "Fine!",
|
"calm": "Fine!",
|
||||||
"pissed": "Pissed off..."
|
"pissed": "Pissed off..."
|
||||||
},
|
},
|
||||||
"calmed_message": "I'm calm now."
|
"calmed_message": "I'm calm now.",
|
||||||
|
"pissed_message": "I'm pissed off now..."
|
||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
"commands": ["note down", "notes"],
|
"commands": ["note down", "notes"],
|
||||||
|
|
|
@ -15,6 +15,9 @@ class MoodPlugin(Plugin):
|
||||||
This plugin exposes the runtime value `mood` (Mood) which can be
|
This plugin exposes the runtime value `mood` (Mood) which can be
|
||||||
used to act differently upon some actions according to the bot
|
used to act differently upon some actions according to the bot
|
||||||
current mood.
|
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 = [
|
REQUIRED_CONFIGS = [
|
||||||
|
@ -55,6 +58,12 @@ class MoodPlugin(Plugin):
|
||||||
self.set_runtime_value("mood", Mood.CALM)
|
self.set_runtime_value("mood", Mood.CALM)
|
||||||
self.bot.say(target, self.config["calmed_message"])
|
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):
|
def say_mood(self, target):
|
||||||
answer = self.config["answer"].get(self.mood.value)
|
answer = self.config["answer"].get(self.mood.value)
|
||||||
if answer:
|
if answer:
|
||||||
|
|
Loading…
Reference in a new issue