This commit is contained in:
2024-11-10 19:48:47 +01:00
parent c225a3e252
commit 3d02d06862
3 changed files with 17 additions and 8 deletions
+6 -5
View File
@@ -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:
+10 -3
View File
@@ -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
+1
View File
@@ -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)