foukoapi 0.1.2-alpha.2

Cross-platform bot framework in Rust: one codebase, many platforms. Shared accounts, embeds, keyboards, economy, i18n and pluggable storage; Telegram and Discord adapters included.
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;
#[cfg(feature = "genai")]
#[cfg_attr(docsrs, doc(cfg(feature = "genai")))]
pub mod genai;
mod i18n;
mod keyboard;
mod notifier;
mod platform;
mod ratelimit;
mod storage;
#[cfg(feature = "tunnel")]
#[cfg_attr(docsrs, doc(cfg(feature = "tunnel")))]
pub mod tunnel;
pub mod util;
#[cfg(feature = "webapp")]
#[cfg_attr(docsrs, doc(cfg(feature = "webapp")))]
pub mod webapp;

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, env_file_error, env_file_path, 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, Presence, PresenceStatus};
pub use ratelimit::{Decision, RateLimit, RateLimiter};
#[cfg(feature = "sqlite")]
pub use storage::SqliteStorage;
pub use storage::{open_storage, open_storage_from, AnyStorage, MemoryStorage, Storage};