Создаю тикеты, пытаюсь записать данные в базу данных, но выдаёт ошибку
Код:
@bot.listen("on_button_click")
async def help_listener(inter):
if inter.component.custom_id not in ["tic"]:
return
if inter.component.custom_id == "tic":
nom_de_salon = f'Ticket {inter.author}'
category = inter.guild.get_channel(1116698645585215538)
member = inter.author
admin_role = get(inter.guild.roles, name="Support")
overwrites = {
inter.guild.default_role: disnake.PermissionOverwrite(read_messages=False),
member: disnake.PermissionOverwrite(read_messages=True),
admin_role: disnake.PermissionOverwrite(read_messages=True)
}
channels = await category.create_text_channel(nom_de_salon,overwrites=overwrites)
cur.execute('INSERT INTO Tickets VALUES(?, ?, ?, ?)', (inter.author, inter.author.id, channels.id, 1))
db.commit()
await channels.send('Задай свой вопрос.')
Ошибка:
Ignoring exception in on_button_click
Traceback (most recent call last):
File "C:\Users\DNS\PycharmProjects\miller\venv\Lib\site-packages\disnake\client.py", line 705, in _run_event
await coro(*args, **kwargs)
File "C:\Users\DNS\PycharmProjects\miller\Miller.py", line 116, in help_listener
cur.execute('INSERT INTO Tickets VALUES(?, ?, ?, ?)', (inter.author, inter.author.id, channels.id, 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.ProgrammingError: Error binding parameter 1: type 'Member' is not supported
База данных: