foukoapi 0.1.1-alpha.1

Cross-platform bot framework in Rust. Write your handlers once, run the same bot on Telegram and Discord with shared accounts, embeds, keyboards and SQLite storage.
Documentation
//! # FoukoApi
//!
//! A Rust framework for building cross-platform bots. Write a command once,
//! run it on Telegram, Discord and anything you plug in next.
//!
//! ```no_run
//! use foukoapi::{Bot, Platform};
//!
//! # async fn run() -> foukoapi::Result<()> {
//! Bot::new()
//!     .add_platform(Platform::telegram(std::env::var("TG_TOKEN")?))
//!     .add_platform(Platform::discord(std::env::var("DISCORD_TOKEN")?))
//!     .command("/help", |ctx| async move {
//!         ctx.reply("hi! i work everywhere").await
//!     })
//!     .run()
//!     .await
//! # }
//! ```
//!
//! FoukoApi is in early development. Expect the API to evolve until `0.1` lands.

#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, rust_2018_idioms)]

mod accounts;
pub mod banner;
mod bot;
mod command;
pub mod config;
#[cfg(feature = "crypto")]
mod crypto;
mod ctx;
mod econ;
mod error;
mod i18n;
mod keyboard;
mod notifier;
mod platform;
mod ratelimit;
mod storage;
pub mod util;

pub mod adapters;

pub use accounts::Accounts;
pub use banner::{Banner, Palette, Tone};
pub use bot::{Bot, TextMatch};
pub use command::{Command, Handler};
pub use config::{bootstrap_env, DbUrl, EnvState};
#[cfg(feature = "crypto")]
pub use crypto::Secret;
pub use ctx::{ChatInfo, Ctx, ReplyFn};
pub use econ::{Economy, Metric, RankedPlayer, Wallet, XpGain, XP_PER_COIN};
pub use error::{Error, Result};
pub use i18n::{I18n, FALLBACK_LANG};
pub use keyboard::{Button, Embed, EmbedField, Keyboard, Reply};
pub use notifier::Notifier;
pub use platform::{Platform, PlatformKind};
pub use ratelimit::{Decision, RateLimit, RateLimiter};
#[cfg(feature = "sqlite")]
pub use storage::SqliteStorage;
pub use storage::{open_storage, open_storage_from, AnyStorage, MemoryStorage, Storage};