Got rid of aiofiles as it seemed to make my command extremely slow

pull/8/head
sgoudham 4 years ago
parent 47a4b999bc
commit 17f806efd9

@ -23,7 +23,6 @@ from platform import python_version
from time import time from time import time
from typing import Optional from typing import Optional
import aiofiles
from discord import Embed, Role from discord import Embed, Role
from discord import Member, TextChannel from discord import Member, TextChannel
from discord import __version__ as discord_version from discord import __version__ as discord_version
@ -114,8 +113,8 @@ async def line_count():
if not name.endswith(".py") or ENV in file_dir: if not name.endswith(".py") or ENV in file_dir:
continue continue
file_amount += 1 file_amount += 1
async with aiofiles.open(file_dir, "r", encoding="utf-8") as file: with open(file_dir, "r", encoding="utf-8") as file:
async for line in file: for line in file:
if line.strip().startswith("#"): if line.strip().startswith("#"):
comments += 1 comments += 1
elif not line.strip(): elif not line.strip():

Loading…
Cancel
Save