Skip to content

Commit

Permalink
✨ Log bot account on start
Browse files Browse the repository at this point in the history
  • Loading branch information
leon0399 committed Nov 7, 2023
1 parent 067ae60 commit 33b50af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Python: Bot",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/bot.py",
"module": "aicord",
"console": "integratedTerminal",
"justMyCode": true
}
Expand Down
5 changes: 5 additions & 0 deletions aicord/discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ def __init__(self, config: BotConfig) -> None:

self.config: BotConfig = config

async def on_ready(self):
print(f"Logged in as {self.user} (ID: {self.user.id})")
print("------")

def run(self) -> None:
raise NotImplementedError("Please use `.start()` instead.")

async def start(self) -> None:
print("Starting bot...")
await super().start(os.environ['DISCORD_TOKEN'])


Expand Down

0 comments on commit 33b50af

Please sign in to comment.