Compare commits
No commits in common. "7e5ebcaf043edb5f73c3d19c681cb87277c8294b" and "02ffd07d72ed828e8528aa0d18ae5dc98fb224ed" have entirely different histories.
7e5ebcaf04
...
02ffd07d72
|
@ -65,9 +65,6 @@
|
||||||
"sentences": ["you're breathtaking"],
|
"sentences": ["you're breathtaking"],
|
||||||
"calm_rate": 100
|
"calm_rate": 100
|
||||||
},
|
},
|
||||||
"doupsland": {
|
|
||||||
"commands": ["doupsland"]
|
|
||||||
},
|
|
||||||
"horoscope": {
|
"horoscope": {
|
||||||
"commands": ["horoscope"],
|
"commands": ["horoscope"],
|
||||||
"meditation": "/me looks at the stars",
|
"meditation": "/me looks at the stars",
|
||||||
|
@ -147,7 +144,7 @@
|
||||||
"positive": ["I like it."],
|
"positive": ["I like it."],
|
||||||
"negative": ["I don't like it."]
|
"negative": ["I don't like it."]
|
||||||
},
|
},
|
||||||
"randomchoice": {
|
"random": {
|
||||||
"commands": ["choose"],
|
"commands": ["choose"],
|
||||||
"separator": "or",
|
"separator": "or",
|
||||||
"not_enough": "Not enough choices!"
|
"not_enough": "Not enough choices!"
|
||||||
|
|
|
@ -26,12 +26,9 @@ class CapturePlugin(Plugin):
|
||||||
return False
|
return False
|
||||||
if self.current_thing is not None:
|
if self.current_thing is not None:
|
||||||
message = event.arguments[0]
|
message = event.arguments[0]
|
||||||
capture_sentence = self.config["capture_sentence"]
|
if message == self.config["capture_sentence"]:
|
||||||
if message == capture_sentence:
|
|
||||||
self.capture(event.source.nick, event.target)
|
self.capture(event.source.nick, event.target)
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
self.bot.log_d(f"Capture: “{message}” != “{capture_sentence}”")
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if proc(self.config["rate"]):
|
if proc(self.config["rate"]):
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
import random
|
|
||||||
|
|
||||||
from edmond.plugin import Plugin
|
|
||||||
|
|
||||||
|
|
||||||
P_TIME = [
|
|
||||||
"ce matin", "hier soir", "aujourd'hui", "tout à l'heure", "au réveil", "",
|
|
||||||
]
|
|
||||||
P_ACTION = [
|
|
||||||
"j'ai aperçu", "j'ai caressé", "j'ai nadenade", "j'ai passé du temps avec",
|
|
||||||
"je me suis arrêté vers", "je me suis promené avec", "j'ai salué",
|
|
||||||
"j'ai approché", "j'ai suivi", "je me suis assis devant", "j'ai regardé",
|
|
||||||
"j'ai parlé avec",
|
|
||||||
]
|
|
||||||
P_SUBJ = [
|
|
||||||
"le chat", "le chat calico", "le chat noir", "le chaton",
|
|
||||||
"le chat blanc", "le chat tigré", "le chat gris", "le chat avec le cœur",
|
|
||||||
"le chat errant", "le vieux chat", "le gros chat", "le petit chat",
|
|
||||||
"le chat doux", "le beau chat",
|
|
||||||
]
|
|
||||||
P_PLACE = [
|
|
||||||
"en ville", "au port de pêche", "sur l'île", "sous l'arbre",
|
|
||||||
"au monument de pierre", "sur la plage", "sur le chemin", "dans l'herbe",
|
|
||||||
"devant l'école", "dans la petite cour",
|
|
||||||
"qui miaulait", "qui dormait", "qui était devant la boutique",
|
|
||||||
"qui voulait manger", "qui demandait le nadenade",
|
|
||||||
"sur le quai",
|
|
||||||
]
|
|
||||||
P_COORD = [
|
|
||||||
"et", "et donc", "et puis", "après quoi",
|
|
||||||
]
|
|
||||||
P_ACTION2 = [
|
|
||||||
"il a miaulé", "il s'est endormi", "il m'a remercié",
|
|
||||||
"il est resté avec moi",
|
|
||||||
"il m'a suivi", "il a reclamé un nadenade", "il est monté sur le toît",
|
|
||||||
"il s'est roulé en boule",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def get_title():
|
|
||||||
return " ".join((
|
|
||||||
random.choice(P_TIME),
|
|
||||||
random.choice(P_ACTION),
|
|
||||||
random.choice(P_SUBJ),
|
|
||||||
random.choice(P_PLACE),
|
|
||||||
random.choice(P_COORD),
|
|
||||||
random.choice(P_ACTION2),
|
|
||||||
)).strip().capitalize()
|
|
||||||
|
|
||||||
|
|
||||||
class DoupslandPlugin(Plugin):
|
|
||||||
|
|
||||||
REQUIRED_CONFIGS = ["commands"]
|
|
||||||
|
|
||||||
def __init__(self, bot):
|
|
||||||
super().__init__(bot)
|
|
||||||
|
|
||||||
def on_pubmsg(self, event):
|
|
||||||
if not self.should_handle_command(event.arguments[0]):
|
|
||||||
return False
|
|
||||||
|
|
||||||
reply = get_title()
|
|
||||||
self.bot.say(event.target, reply)
|
|
||||||
return True
|
|
|
@ -3,7 +3,7 @@ import random
|
||||||
from edmond.plugin import Plugin
|
from edmond.plugin import Plugin
|
||||||
|
|
||||||
|
|
||||||
class RandomChoicePlugin(Plugin):
|
class RandomPlugin(Plugin):
|
||||||
|
|
||||||
REQUIRED_CONFIGS = ["commands", "separator", "not_enough"]
|
REQUIRED_CONFIGS = ["commands", "separator", "not_enough"]
|
||||||
|
|
Loading…
Reference in a new issue