accept menu with the buttons
await message.answer("Выберите действие:", reply_markup=nav.acceptMenu)
# Define the callback handler for the btnaccept button
@dp.callback_query_handler(lambda query: query.data == 'a1')
async def handle_btnaccept_callback(query: types.CallbackQuery):
# Connect to the SQLite3 database
conn = sqlite3.connect('users.db') # Replace with your database file path
try:
# Update the interest rate in the database
new_interest_rate = 0.05 # Change this to the desired interest rate
query = "UPDATE profile SET interest_rate = ?"
conn.execute(query, (new_interest_rate,))
# Commit the changes
conn.commit()
# Send a confirmation message
await query.message.answer("Interest rate has been updated successfully!")
finally:
# Close the database connection
conn.close()
тоже мимо(
Что мимо, красавец наш, логи давай
Обсуждают сегодня