From 52b11452c20bc6caa5a9602d507e20fefd356705 Mon Sep 17 00:00:00 2001 From: BFlow Date: Wed, 29 Apr 2020 12:12:42 +0200 Subject: [PATCH] correction contrepetrie --- kabot/kabot/kabot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index bc444e3..e7d2742 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -137,7 +137,8 @@ class Mybot(commands.Cog): async def contrepeterie(self, ctx, *args): response = None path = here + '/ressources/contrepeteries.txt' - lines = open(path).read().splitlines() + with open(path) as file: + lines = file.read().splitlines() myline = random.choice(lines) try: