4 Commits

Author SHA1 Message Date
8be039da80 use "first recipient"'s name for DM log file
we were using the message author before, which made sense for incoming
messages, but then all the replies were getting dumped to a directory
for the bot, which doesn't make much sense. this will use the "first
recipient", which sounds kind of like a backwards-compat attribute but
does what we want for single-user DMs

if we ever care heavily about multi-user DMs we should maybe look at
channel.recipients, but that probably changes over time, so we'd need
to use channel.id?
2018-01-17 10:49:29 -06:00
7ec643afda use the config-based bot plugin loader 2018-01-09 15:37:53 -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
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