correction contrepetrie

This commit is contained in:
BFlow 2020-04-29 12:12:42 +02:00
parent f6e2efb0ca
commit 52b11452c2

View file

@ -137,7 +137,8 @@ class Mybot(commands.Cog):
async def contrepeterie(self, ctx, *args): async def contrepeterie(self, ctx, *args):
response = None response = None
path = here + '/ressources/contrepeteries.txt' path = here + '/ressources/contrepeteries.txt'
lines = open(path).read().splitlines() with open(path) as file:
lines = file.read().splitlines()
myline = random.choice(lines) myline = random.choice(lines)
try: try: