def add_message(conn, user_id: int, name: str):
c = conn.cursor()
c.execute('SELECT * FROM user_message WHERE (user_id IS ? AND name IS ?)', (user_id, name))
row = c.fetchone()
if row is None:
c.execute('INSERT INTO user_message (user_id, name) VALUES (?,?)', (user_id, name))
conn.commit()