feat(bot): ✨ Improve the startup script.
This commit is contained in:
+2
-2
@@ -64,7 +64,7 @@ class Payphone(commands.AutoShardedBot):
|
||||
shard_id=shard_id,
|
||||
)
|
||||
|
||||
print(f"Shard is ready! Shard ID: {shard_id}")
|
||||
print(f"Shard {shard_id} is ready!")
|
||||
|
||||
async def on_shard_resumed(self, shard_id: int) -> None:
|
||||
"""Sets the activity for the shard.
|
||||
@@ -81,7 +81,7 @@ class Payphone(commands.AutoShardedBot):
|
||||
shard_id=shard_id,
|
||||
)
|
||||
|
||||
print(f"Shard was resumed! Shard ID: {shard_id}")
|
||||
print(f"Shard {shard_id} was resumed!")
|
||||
|
||||
async def get_or_fetch_channel(
|
||||
self, channel_id: int
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import tortoise
|
||||
|
||||
from payphone.db import models
|
||||
from payphone.core import config
|
||||
|
||||
|
||||
@@ -10,8 +7,3 @@ async def init() -> None:
|
||||
"""Initialize the database and it's connections."""
|
||||
|
||||
await tortoise.Tortoise.init(config.TORTOISE_ORM, use_tz=True)
|
||||
|
||||
await tortoise.Tortoise.generate_schemas(safe=True)
|
||||
|
||||
await models.Call.filter(ended_at=None).update(ended_at=datetime.now(timezone.utc))
|
||||
await models.Channel.exclude(call_id=None).update(call_id=None)
|
||||
|
||||
Reference in New Issue
Block a user