Python
8
Вклад в тег
async def on_member_join(member):
if cursor.execute(f"SELECT id FROM users WHERE id = {member.id}").fetchone() is None:
cursor.execute(f"INSERT INTO users VALUES ('{member}', {member.id}, 0, 0, 1)")
connection.commit()
else:
pass
git status
from tkinter import *
from tkcalendar import DateEntry
root = Tk()
def handler(*args):
# set data in datetime.date format
variable = StringVar()
entry_1 = DateEntry(root, date_pattern='dd/mm/YYYY', textvariable = variable)
entry_2 = DateEntry(root, date_pattern='dd/mm/YYYY')
variable.trace_add("write", handler)
entry_1.pack()
entry_2.pack()
root.mainloop()