Код:
@bot.command(aliases = ['clandelete','кланудалить'])
async def __clandelete(ctx, b: str):
test = cursor.execute(f"SELECT clanid FROM clani WHERE clans = {b}")
for row in cursor.execute(f"SELECT admin FROM {test} WHERE userid={ctx.author.id}"):
if row[0] =='Да':
for row in cursor.execute(f"SELECT clanid FROM clani WHERE clans = {b}"):
await ctx.send(f"Удаляем клан {row[0]}")
cursor.execute(f"DROP TABLE IF EXISTS {row[0]}")
cursor.execute(f"DELETE FROM clani WHERE clans = {b}")
conn.commit()
else:
await ctx.send("Вы не являетесь администратором клана")
Ошибка:
for row in cursor.execute(f"SELECT admin FROM {test} WHERE userid={ctx.author.id}"):
sqlite3.OperationalError: near "<": syntax error