Struct groupme_bot::BotBuilder
[−]
[src]
pub struct BotBuilder { /* fields omitted */ }
Builder to create Bots with configuration and add them to Groupme.
Examples
use groupme_bot::{Groupme, Bot}; let groupme: Groupme = Groupme::new(Some("Required API Token")); let bot: Bot = groupme .create_bot("My Bot", "a group id") .unwrap() .with_avatar_url("some url") .with_callback_url("some other url") .with_dm_notification(true) .create() .unwrap();
Methods
impl BotBuilder
[src]
pub fn with_avatar_url(self, avatar_url: &str) -> Self
[src]
Sets the avatar_url for a new Bot.
Groupme will only accept image urls from their Image Service.
pub fn with_callback_url(self, callback_url: &str) -> Self
[src]
Sets the callback_url for a new Bot.
pub fn with_dm_notification(self, dm_notification: bool) -> Self
[src]
Sets the dm_notificaion for a new Bot.
pub fn create(self) -> Result<Bot, GroupmeError>
[src]
Builds a Bot
with the set values and adds it to a group.