This repository has been archived on 2024-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
2022-08-07 04:45:35 -04:00
|
|
|
import config
|
2023-01-13 03:22:32 -05:00
|
|
|
from database import Member, Restriction
|
|
|
|
from database import db
|
|
|
|
|
2023-07-22 07:07:43 -04:00
|
|
|
|
2023-01-13 03:22:32 -05:00
|
|
|
def database_is_empty():
|
|
|
|
if not db.get_columns("members"):
|
|
|
|
db.create_tables([Member, Restriction])
|
|
|
|
return True
|
|
|
|
|
|
|
|
elif not Member.select().count():
|
2023-07-22 07:07:43 -04:00
|
|
|
return True
|
2023-01-13 03:22:32 -05:00
|
|
|
|
|
|
|
return False
|
2022-08-07 04:45:35 -04:00
|
|
|
|
2023-07-22 07:07:43 -04:00
|
|
|
|
2022-08-07 04:45:35 -04:00
|
|
|
async def notify_started_bot(bot):
|
2023-07-22 07:07:43 -04:00
|
|
|
await bot.send_message(config.second_group_id, "Bot successfully launched!")
|