async def on_ready():
cursor.execute("""CREATE TABLE IF NOT EXISTS stats(
name TEXT,
id INT,
warn INT,
rep INT
)""")
connection.commit()
for guild in client.guilds:
for member in guild.members:
if cursor.execute(f"SELECT id FROM stats WHERE id = {member.id}").fetchone() is None:
try:
cursor.execute(f"INSERT INTO stats VALUES ('{member}', {member.id}, 0, 0)") #Кричит на эту строку
connection.commit()
except Exception:
print('Ошибка')
print(sys.exc_info()[1])
else:
pass
cursor.execute(f"INSERT INTO stats VALUES ('{member}', {member.id}, 0, 0)")
print(f"INSERT INTO stats VALUES ('{member}', {member.id}, 0, 0)")
cursor.execute("INSERT INTO stats VALUES (?,?,?,?)",(member,member.id,0,0))
print(f"INSERT INTO stats VALUES ('{member}', {member.id}, 0, 0)")