Page MenuHomePhabricator

mwbot-rs: Allow bots to set and access extra config in mwbot.toml
Open, MediumPublic

Description

mwbot allows bots to be configured using a mwbot.toml file. We want bots to be able to extend it for their own configuration. For example:

[custom]
my_key = "foo"

[custom.even_more]
another_key = "bar"

We would store custom as Option<toml::Value>, and then add a function like Bot::get_custom_config<T: serde::de::DeserializeOwned>(&self) -> Result<T> to allow for getting the custom configuration while still being type-safe.


Also take a look at mwbot-rs's contributing instructions.

Event Timeline

Legoktm triaged this task as Medium priority.Oct 1 2022, 2:17 AM
Legoktm created this task.