generated from Nemesis/Exemple
éviter la boucle infinie dans invidious
This commit is contained in:
parent
15d267945b
commit
9fbf410ca8
1 changed files with 2 additions and 2 deletions
|
@ -2062,11 +2062,11 @@ def invidious(room, event): # convertit un lien youtube en lien invidious
|
|||
rmod = modules[room.room_id, 'invidious']
|
||||
except:
|
||||
modules[room.room_id, 'invidious'] = False
|
||||
if (modules[room.room_id, 'invidious']):
|
||||
if (modules[room.room_id, 'invidious']) and not event['sender'] == bot.client.user_id):
|
||||
url = event['content']['body']
|
||||
try:
|
||||
res = re.sub(r"^.*\?v=([^& ]*).*$", r"\1", url)
|
||||
msg(room,str("Une alternative à youtube pour cette video : https://invidio.us/watch?v=" + res),event['sender'])
|
||||
msg(room,str("Une alternative pour cette video : https://invidio.us/watch?v=" + res),event['sender'])
|
||||
except:
|
||||
msg(room,"URL invalide",event['sender'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue