refactor: clean up initialization code
This commit is contained in:
13
main.py
13
main.py
@@ -1,16 +1,7 @@
|
||||
import time
|
||||
|
||||
import constants
|
||||
import events
|
||||
from state import client, start_time
|
||||
|
||||
|
||||
@client.event
|
||||
async def on_ready():
|
||||
print(f"logged in as {client.user} in {round(time.time() - start_time, 1)}s")
|
||||
|
||||
await events.on_ready()
|
||||
|
||||
from state import client
|
||||
|
||||
if __name__ == "__main__":
|
||||
events.prepare()
|
||||
client.run(constants.SECRETS["TOKEN"])
|
||||
|
||||
Reference in New Issue
Block a user