Skip to content
Extraits de code Groupes Projets
Valider eb84eea7 rédigé par Loris TICHADOU's avatar Loris TICHADOU
Parcourir les fichiers

FIZZY

parent b7ee7031
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -214,6 +214,17 @@ class Boooob(ircbot.SingleServerIRCBot):
last_args = args
last_cmd = cmd
cmds = ['help', 'ffs', 'thanos', 'chuck', 'roll', 'rateau', 'viieux', 'kohlanta', 'new', 'del', 'get', 'debat', 'pipo', 'np', 'commit', 'zertyy', 'getsub', 'sub', 'delsub', 'addsub', 'reddit']
most_likely = (cmd, 0)
for f in cmds :
ratio = fuzz.ratio(cmd, f)
if ratio > 60 and ratio > most_likely[1] :
most_likely = (f, ratio)
cmd = most_likely[0]
if cmd == "help":
if len(message.split(" ")) > 1:
if "reddit" in message.split(" ")[1]:
......@@ -417,7 +428,7 @@ class Boooob(ircbot.SingleServerIRCBot):
else:
serv.privmsg(canal, "Subreddit deja dans la bd...")
elif fuzz.ratio(cmd, "reddit") > 80 :
elif cmd === "reddit" :
full = False
if len(args) > 1 :
sub = args[1]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter