feat: Added DiscordConfig for future usage
- Added crate::error::Error::IsNotImplemented - Added Config::full_impl_path - Added Config::discord_impl for discord crate
This commit is contained in:
parent
1142fe6ad9
commit
b92eaa1241
4 changed files with 106 additions and 1 deletions
|
|
@ -357,4 +357,19 @@ impl Config {
|
|||
path.push(self.map.clone());
|
||||
path
|
||||
}
|
||||
|
||||
/// Returns full path to implementation config TOML, if defined
|
||||
/// This path will be relative to working directory
|
||||
/// Only makes sense if using inside binary crate,
|
||||
/// which provides implementation config
|
||||
pub fn full_impl_path(&self) -> Option<PathBuf> {
|
||||
match &self.impl_path {
|
||||
Some(impl_path) => {
|
||||
let mut path = self.path.clone();
|
||||
path.push(impl_path.clone());
|
||||
Some(path)
|
||||
},
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue