from . import file # call explicitly others are ignored
package
| file.py
from aiotg.utils import handler
def other(): # does not have the decorator then it is ignored
pass
@handler(r'/game', action='command')
def game(chat, match):
chat.sent_text('hello world')
main.py
import package
from aiotg import Bot
from aiotg.utils import get_handlers
bot = Bot(api_token=')
for handler in get_handlers(package):
handler(bot)
bot.run()
package
| __init__.py
package | file.py
main.py