summaryrefslogtreecommitdiff
path: root/bot.py
blob: d8603978c24d90c3adecf942dad0e6f7a939f2bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import config
from command_utils import Command, CommandClient


class Client(CommandClient):
    async def on_ready(self):
        print(f'the bot {config.NAME} is logged in as "{self.user}"')

    @Command.help_command
    @Command.names('help', 'hepl', 'h', '?')
    @Command.description('display this help message')
    async def help(self, ctx):
        await ctx.answer(config.HELP_TEXT)

    @Command.names('init', 'create', 'inti', 'craete', 'cretae', 'c', 'i', '+')
    @Command.description('create a new lobby')
    async def init(self, ctx):
        await ctx.answer(f'NIY')


if __name__ == '__main__':
    from os import getenv
    token = getenv(config.TOKEN_ENV_VAR)
    if token is None:
        print('error: no token was given')
        exit(1)
    bot = Client()
    bot.run(token)