mirror of
https://github.com/looching/cantonese_toot.git
synced 2026-04-06 03:15:02 +08:00
feat: 当数据库不存在时初始化数据
This commit is contained in:
parent
ad524a2864
commit
b0a937beab
5
send.py
5
send.py
@ -48,8 +48,9 @@ def get_random_toot():
|
||||
return random.choice(unsent_toots) if unsent_toots.exists() else None
|
||||
|
||||
def main():
|
||||
create_table()
|
||||
insert_toots()
|
||||
if not Toot.table_exists():
|
||||
create_table()
|
||||
insert_toots()
|
||||
|
||||
random_toot = get_random_toot()
|
||||
if random_toot:
|
||||
|
||||
0
toots123.db
Normal file
0
toots123.db
Normal file
Loading…
x
Reference in New Issue
Block a user