Commit Graph

7 Commits

Author SHA1 Message Date
Brian S. Stephan 00645e8d93 allow specifying port for the API to listen on 2018-01-10 12:47:47 -06:00
Brian S. Stephan 793fdb0e84 config option for loading bot "plugins"
as it turns out, i can't use a module __init__.py to load bot stuff, if
that code would refer to django models, because the django code will try
to do stuff before the apps are initialized, and then the entire house
of cards crumbles apart.

so, i will explicitly load these bot "plugins" separately, after the
modules proper are all initialized
2018-01-09 15:18:38 -06:00
Brian S. Stephan 6a5985b002 add on_message_handlers to Bot, by extending Bot
Bot is now extended as Hitomi, so that we can add on_message_handlers =
[], which will store functions to call when on_message happens. this is
necessary because i want to have two things react to on_message, but the
discord.py code only supports one coroutine for on_message. so, this is
a hook into it to do what i want

not sure if i'll end up needing this for on_message_edit or
on_message_delete, but i'm skeptical right now
2018-01-09 15:16:01 -06:00
Brian S. Stephan a226cfd020 use logging in bot startup 2018-01-09 10:24:37 -06:00
Brian S. Stephan c2da9d09a3 add HTTP API to the bot
we use aiohttp and directly grab the discord bot's asyncio handler to
create a shared loop. things seem to work?
2018-01-09 10:23:36 -06:00
Brian S. Stephan ef29f9f3e2 trivial whitespace change for pep stuff 2018-01-08 09:56:15 -06:00
Brian S. Stephan 1ef8318f67 start Django project, add basic Discord bot
doesn't do much other than connect, but the idea generally works, so
hooray?

now just to make sure i can actually use the decorator in other modules
properly
2018-01-08 09:30:31 -06:00