30 Commits

Author SHA1 Message Date
80d0fd1263 Merge branch 'master' of git.incorporeal.org:bss/hitomi 2018-01-10 14:55:59 -06:00
46754d6979 serve up a blank / 2018-01-10 14:54:51 -06:00
00645e8d93 allow specifying port for the API to listen on 2018-01-10 12:47:47 -06:00
51edb54ed7 add markov module and irc plugin
just listens to servers right now, doesn't speak up (yet)
2018-01-10 09:38:12 -06:00
7ec643afda use the config-based bot plugin loader 2018-01-09 15:37:53 -06:00
8b7ee5ee19 .gitignore db.sqlite3 2018-01-09 15:20:29 -06:00
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
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
50a5c3d94a allow supplying max_messages to the discord bot 2018-01-09 13:30:21 -06:00
213b9ff400 add logger module, logs new/edit/delete msgs
this logs these messages to a file directory. more stuff may get added
eventually
2018-01-09 13:28:33 -06:00
9c551d37a0 weather: use ** for bold rather than irc codes 2018-01-09 11:01:49 -06:00
138a0cdc2a refine logging usage in weather module 2018-01-09 10:25:11 -06:00
a226cfd020 use logging in bot startup 2018-01-09 10:24:37 -06:00
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
fa18533667 document our requirements.in files 2018-01-09 09:41:03 -06:00
e8825cb763 add aiohttp explicitly, for an API server 2018-01-09 09:37:45 -06:00
2d25fbd468 .gitignore .log files 2018-01-08 16:33:21 -06:00
cc5dc94ea8 add the forecast command to weather module 2018-01-08 16:32:29 -06:00
114df6fd1b add weather module, for reporting the weather
stolen from dr.botzo
2018-01-08 16:30:20 -06:00
f3171e22a4 add requests to requirements, for wunderground 2018-01-08 16:26:34 -06:00
ca61d8ac04 roll simple and complicated dice
copy and paste of the dice module from dr.botzo, uses ply
2018-01-08 12:40:19 -06:00
c7fb3d11e0 add ply (lex and yacc), for the dice module 2018-01-08 11:42:24 -06:00
b41729bd06 .gitignore some lex/yacc stuff 2018-01-08 11:39:52 -06:00
3850595b14 add dice module, give it a !choose 2018-01-08 10:21:30 -06:00
ef29f9f3e2 trivial whitespace change for pep stuff 2018-01-08 09:56:15 -06:00
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
873476ad5d add Django to requirements 2018-01-08 09:20:56 -06:00
b123221323 add basic requirements for discord.py and dev stuff 2018-01-03 00:17:46 -06:00
3802360548 .gitignore - ignore .idea/ 2018-01-03 00:16:46 -06:00
909efcbb6a Add README.md 2018-01-02 22:49:12 -06:00