Open saethlin opened 6 years ago
Sounds good to me. I can see the flow going something like
run bot->
on_message event handler called->
redirects to command handler in bot core->
bot core either connects to something that links languages in core,
or a module that links to other language on its own ->
function called and returned, and answer posted by bot
The on_message event handler definitely works with discord.py. I think Mathbot does it, so someone can take some inspiration from there if needed.
I like it, can we finalize on what the directory should look like?
All the basic stuff at the top level, and put all the commands in a directory. Now add something already.
How do we wanna call the bot in the server? !bot <cmd>
is what it was and I was thinking -ab <cmd>
for new version?
Sounds good to me. I would prefer something more specific that just calling it bot
Prefix can be dynamic, we can pick a placeholder for now and make awesomebot fetch prefix from the config.
We want to serve a large programming community with varying competency. For this reason I would like to have a core bot built in Python using discord.py, and very quickly dispatch in a generic way into modules that can be written in any language. The onus is on the contributor to integrate whatever language they're using.
I think the core bot should look something like this:
Where we pull in everything with a
modules
directory, which will contain the entry point for every command, regardless of what language it is written in. We define a dictionary or config file that maps bot string commands such as!bot weather
onto a Python function that takes the contents of the message, and returns the contents of a reply message. The primary job of the core bot is to dispatch to handlers, and to avoid making this overcomplicated so that people unfamiliar with Python have little difficulty integrating their work.