Browse Source

titre ne doit pas suggérer invidious si le module invidious est activé

master
nemesis 2 years ago
parent
commit
cf751b26bc
  1. 4
      asmodee.py

4
asmodee.py

@ -2049,7 +2049,7 @@ def titre(room, event): # cherche le titre d'une page
msg(room,str(re.sub("</?title>", "", res.group())),event['sender'])
else:
msg(room,"Titre non trouvé",event['sender'])
if (re.search(r"youtu",url) is not None):
if (re.search(r"youtube",url) is not None and modules[room.room_id, 'invidious'] is False and not event['sender'] == bot.client.user_id):
res = re.sub(r"^.*\?v=([^&]*).*$", r"\1", url)
msg(room,str("https://invidio.us/watch?v=" + res),event['sender'])
except:
@ -2236,7 +2236,7 @@ def main():
# Invidious
if ('invidious' in liste_mod):
invidious_handler = MRegexHandler("youtu", invidious)
invidious_handler = MRegexHandler("youtube", invidious)
bot.add_handler(invidious_handler)
# Definition des moderateurs

Loading…
Cancel
Save