Dodao frontende za vise servisa
- frontendi su u frontends.py fajlu - ima vise instanci da ne bi stalno slao na jednu, da nema centralizacije ;)
This commit is contained in:
parent
328329eb9a
commit
ea6ba7464c
@ -1,13 +1,16 @@
|
|||||||
import ollama
|
import ollama
|
||||||
import scraper_functions as sf
|
import scraper_functions as sf
|
||||||
|
import random
|
||||||
|
from frontends import FRONTENDS
|
||||||
|
|
||||||
def processmsg(msg, rcpt):
|
def processmsg(msg, rcpt):
|
||||||
if "youtube.com/watch" in msg:
|
if msg.startswith("!"):
|
||||||
return msg.replace("youtube.com", "iv.datura.network")
|
|
||||||
elif msg.startswith("!"):
|
|
||||||
return command(msg, "")
|
return command(msg, "")
|
||||||
elif "good bot" in msg:
|
elif "good bot" in msg:
|
||||||
return "^_^"
|
return "^_^"
|
||||||
|
for big_tech_site in FRONTENDS:
|
||||||
|
if big_tech_site in msg:
|
||||||
|
return "libre link: " + msg.replace(big_tech_site, random.choice(FRONTENDS[big_tech_site]))
|
||||||
|
|
||||||
def command(msg, rcpt):
|
def command(msg, rcpt):
|
||||||
if msg.startswith("!help"):
|
if msg.startswith("!help"):
|
||||||
|
Loading…
Reference in New Issue
Block a user