- oooo o8o oooo o8o © 2020 Nekokatt, licensed under MIT
- `888 `"' `888 `"' Installed at: /home/hikari-py/code/hikari
- 888 .oo. oooo 888 oooo .oooo. oooo d8b oooo Support: https://discord.gg/Jx4cNGG
- 888P"Y88b `888 888 .8P' `P )88b `888""8P `888 Documentation: https://hikari-py.dev/hikari
- 888 888 888 888888. .oP"888 888 888
- 888 888 888 888 `88b. d8( 888 888 888 CPython 3.8.5
- o888o o888o o888o o888o o888o `Y888""8o d888b o888o compiled with GCC 10.1.0 (default May 17 2020 18:15:42)
-
- v2.0.0
+ oooo o8o oooo o8o 光 2.0.0.dev101 [HEAD]
+ `888 `"' `888 `"' © 2021 davfsa - MIT license /home/nekokatt/code/hikari
+ 888 .oo. oooo 888 oooo .oooo. oooo d8b oooo interpreter: CPython 3.8.10
+ 888P"Y88b `888 888 .8P' `P )88b `888""8P `888 running on: x86_64 Linux 5.8.0-59-generic
+ 888 888 888 888888. .oP"888 888 888 installed at: /home/nekokatt/code/hikari
+ 888 888 888 888 `88b. d8( 888 888 888 documentation: https://www.hikari-py.dev/hikari
+ o888o o888o o888o o888o o888o `Y888""8o d888b o888o support: https://discord.gg/Jx4cNGG
I 2020-07-15 16:45:11,476 hikari: single-sharded configuration -- you have started 29/1000 sessions prior to connecting (resets at 16/07/20 11:38:05 BST)
I 2020-07-15 16:45:11,779 hikari.gateway.0: received HELLO, heartbeat interval is 41.25s
@@ -37,7 +259,7 @@
^C
Terminated 13897
- [nekokatt@pc ~/hikari ] $ cat bot.py
+ [nekokatt@pc ~/hikari ] $ cat bot.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
@@ -54,7 +276,8 @@
def decorator(fn):
@functools.wraps(fn)
async def wrapper(event):
- if event.is_human and event.message.content.startswith(name):
+ content = event.message.content
+ if event.is_human and content is not None and content.startswith(name):
await fn(event)
return wrapper
@@ -75,6 +298,7 @@
return (
event.message.author == e.message.author
and event.message.channel_id == e.message.channel_id
+ and e.message.content
and e.message.content.isdigit()
)
@@ -99,63 +323,53 @@
bot.run()
-
-
-
-
- pip install
hikari
- A new, powerful, static-typed Python API for writing Discord bots.
-
- This API is still in a alpha state, and is a work in progress! Features may change
- or undergo improvements before the design is finalized. Until then, why not join our Discord? Feel free
- to drop in to ask questions, get updates on progress, and be able to provide valuable contributions and
- feedback.
-
-
- Tutorials, tips, and additional resources will come soon!
-
-
-
- Slide into our server
-
-
-
-
-