-
Can I replace the get_prefix method in my own way in custom bot class? My idea is to download a set of prefixes and then update them whenever there is a change in the file and the variable. I want to do this to have the fastest access to the data. For example, the dict type allows this because it uses hashes.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can do this and it is indeed the intended method of doing so, we even have an entire example explaining it for custom Contexts. |
Beta Was this translation helpful? Give feedback.
-
Although what you want is possible but you don't need to override async def custom_prefix(bot: commands.Bot, message: discord.Message):
...
return "!"
commands.Bot(command_prefix=custom_prefix, ...)
... |
Beta Was this translation helpful? Give feedback.
-
That is all, thank you |
Beta Was this translation helpful? Give feedback.
You can do this and it is indeed the intended method of doing so, we even have an entire example explaining it for custom Contexts.