diff --git a/database.py b/database.py index c18a096..3e5be74 100644 --- a/database.py +++ b/database.py @@ -147,4 +147,13 @@ class Data_table(Table): 'ON CONFLICT (username, time, content) DO NOTHING ' ';' ) - self.execute(query, val_dict) \ No newline at end of file + self.execute(query, val_dict) + +def insert(username, timestamp, content): + val_dict = { + 'username': username, + 'time': timestamp, + 'content': content + } + with Data_table() as dt: + dt.insert(val_dict) \ No newline at end of file