Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Dynamic guild specific prefixes #11

Open
mcdearman opened this issue Jul 20, 2020 · 2 comments
Open

Dynamic guild specific prefixes #11

mcdearman opened this issue Jul 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@mcdearman
Copy link

Not sure if you have support for this, but if not I would love to see it implemented. The idea arises in the following use case: suppose my bot is in many servers and there is a command to add and remove prefixes. Each guild has it's own list of prefixes stored in the database. These lists are subject to change. So one way to set the prefixes (the way discord.py does it) is to pass in a callable as the command prefix that takes a bot and a message as params. This way the prefixes are fetched using that callable inside the router's message handler. In the case of dgo I would assume you'd want to take in a session. Let me know if this is feasible or something you're interested in adding. Thanks.

@mcdearman
Copy link
Author

Actually, thinking about it more, if you want to be able to get the db from inside the callable, you wouldn't pass a session but an interface. This way someone can have custom types and logic (they don't have to be querying a db).

@lus
Copy link
Owner

lus commented Jul 20, 2020

Hey^^

Yeah, I'm currently busy working on another project, but I plan to rewrite the whole command routing, because it is pretty inefficient/buggy. I will think about your suggestion when I get to it!

@lus lus added the enhancement New feature or request label Jul 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants