diff --git a/ai_commands.py b/ai_commands.py index be196f1..5e4b2ba 100644 --- a/ai_commands.py +++ b/ai_commands.py @@ -16,6 +16,7 @@ from constants import ( INITIAL_TIME_WAIT, MASTER_TIMEOUT, OPENAICLIENT, + WORD_REACTIONS ) @@ -85,13 +86,13 @@ class Events(commands.Cog): await message.reply(DATA["fabryczka"]) if tdelta > INITIAL_TIME_WAIT: - for word in self.word_reactions: + for word in WORD_REACTIONS: if re.search(r"\b" + word + r"\b", message.content): - tdelta = datetime.now() - self.word_reactions[word][2] + tdelta = datetime.now() - WORD_REACTIONS[word][2] tdelta = tdelta.total_seconds() - security_clearance = self.word_reactions[word][4] - reaction = self.word_reactions[word][3] - if tdelta > self.word_reactions[word][1]: + security_clearance = WORD_REACTIONS[word][4] + reaction = WORD_REACTIONS[word][3] + if tdelta > WORD_REACTIONS[word][1]: # TODO: to zrobic reactiony self.logger.info("Ping z procedury reakcji") if reaction: diff --git a/conjurer_musician/radio_conjurer.liq b/conjurer_musician/radio_conjurer.liq index 198e94f..998401b 100644 --- a/conjurer_musician/radio_conjurer.liq +++ b/conjurer_musician/radio_conjurer.liq @@ -56,7 +56,7 @@ s = crossfade(fade_out=2., fade_in=2., duration=4., fallback(id="switcher", trac # Set up an interactive harbor for controlling the stream interactive.harbor(port = 9999) - +harbor.input(buffer=30.0) # Set up interactive controls for bass boost f = interactive.float("f", description="Frequency", min=0., max=1000., unit="Hz", 200.) g = interactive.float("g", description="Gain", min=0., max=20., unit="dB", 8.) @@ -82,8 +82,15 @@ s = amplify(a, s) s = blank.skip(max_blank=10., s)192 #Manual audition override -source_control = interactive.bool("Source control", true) -s = switch(track_sensitive=false, [(source_control,mic),({true},s)]) +live_enabled = interactive.bool("Going Live!", true) +s = switch(track_sensitive=false, + [({!live_enabled}, live), + ({true}, radio)]) + + +def fading_transition(a,b) + sequence([fade.out(a.source),fade.in(b.source)]) +end # Configure logging settings log_to_stdout = true diff --git a/music_commands.py b/music_commands.py index ecbf242..1aa37dc 100644 --- a/music_commands.py +++ b/music_commands.py @@ -612,6 +612,7 @@ class MusicModule(commands.Cog): self.logger.info(text) lines = text.split("\n") for link in lines: + self.logger.info(link) pat = r"^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$" if re.match(pat, link) and (re.match(".*youtube.*", link) or re.match(".*youtu.be.*", link)): self.logger.info("%s to link do jutuba", link)