pub struct Bot { /* private fields */ }
Expand description
Main bot class
Implementations
sourceimpl Bot
impl Bot
sourcepub async fn from_default_config() -> Result<Self, ConfigError>
pub async fn from_default_config() -> Result<Self, ConfigError>
Load Bot configuration from a default location, first look at
mwbot.toml
in the current directory, otherwise look in the
platform’s config directory:
- Linux:
$XDG_CONFIG_HOME
or$HOME/.config
- macOS:
$HOME/Library/Application Support
- Windows:
{FOLDERID_RoamingAppData}
sourcepub async fn from_path(path: &Path) -> Result<Self, ConfigError>
pub async fn from_path(path: &Path) -> Result<Self, ConfigError>
Load Bot configuration from the specified path.
sourcepub fn api(&self) -> &ApiClient
pub fn api(&self) -> &ApiClient
Get a reference to the underlying mwapi::Client
to make arbitrary API requests
sourcepub fn parsoid(&self) -> &ParsoidClient
pub fn parsoid(&self) -> &ParsoidClient
Get a reference to the underlying parsoid::Client
to make arbitrary Parsoid API requests
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Bot
impl Send for Bot
impl Sync for Bot
impl Unpin for Bot
impl !UnwindSafe for Bot
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more