Skip to content

Commit 0f3fa6b

Browse files
+ Added checking for bot token
1 parent 128c8af commit 0f3fa6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async def on_ready():
1616
print(f'Client [{client.user}] UP')
1717

1818
@client.event
19-
async def on_message(message: str):
19+
async def on_message(message):
2020
# Allow text to invoke comamnds
2121
await client.process_commands(message)
2222

@@ -33,6 +33,9 @@ async def load_cogs():
3333

3434
# Main runner
3535
async def main():
36+
if not Config.BOT_TOKEN:
37+
raise Exception('No bot token')
38+
3639
async with client:
3740
await load_cogs()
3841
await client.start(Config.BOT_TOKEN)

0 commit comments

Comments
 (0)