Skip to main content

Crate babyrite

Crate babyrite 

Source
Expand description

Babyrite - A Discord bot for message link previews.

This bot automatically generates previews for Discord message links shared within the same guild, and expands GitHub permalinks into code blocks.

Re-exportsยง

pub(crate) use crate::config::BabyriteConfig; ๐Ÿ”’
pub(crate) use crate::config::EnvConfig; ๐Ÿ”’
pub(crate) use crate::config::LogFormat; ๐Ÿ”’
pub(crate) use crate::context::BotContext; ๐Ÿ”’
pub(crate) use twilight_gateway::ConfigBuilder; ๐Ÿ”’
pub(crate) use twilight_gateway::EventTypeFlags; ๐Ÿ”’
pub(crate) use twilight_gateway::Intents; ๐Ÿ”’
pub(crate) use twilight_gateway::Shard; ๐Ÿ”’
pub(crate) use twilight_gateway::ShardId; ๐Ÿ”’
pub(crate) use twilight_gateway::StreamExt as _; ๐Ÿ”’
pub(crate) use std::sync::Arc; ๐Ÿ”’
pub(crate) use std::time::Duration; ๐Ÿ”’
pub(crate) use tracing_subscriber::EnvFilter; ๐Ÿ”’
pub(crate) use ConfigBuilder; ๐Ÿ”’
pub(crate) use EventTypeFlags; ๐Ÿ”’
pub(crate) use Intents; ๐Ÿ”’
pub(crate) use Shard; ๐Ÿ”’
pub(crate) use ShardId; ๐Ÿ”’
pub(crate) use payload::outgoing::update_presence::UpdatePresencePayload; ๐Ÿ”’
pub(crate) use Activity; ๐Ÿ”’
pub(crate) use ActivityType; ๐Ÿ”’
pub(crate) use MinimalActivity; ๐Ÿ”’
pub(crate) use Status; ๐Ÿ”’

Modulesยง

cache ๐Ÿ”’
Cache module for guild channels.
config ๐Ÿ”’
Configuration module for Babyrite.
context ๐Ÿ”’
State shared by every event handler task.
event ๐Ÿ”’
Event handling module for Discord events.
expand ๐Ÿ”’
Link expansion module.
reply ๐Ÿ”’
Assembly of the messages Babyrite posts back to the requester.
utils ๐Ÿ”’
Utility functions for babyrite.

Constantsยง

WANTED_EVENTS ๐Ÿ”’
The gateway events event::handle acts on.

Functionsยง

main ๐Ÿ”’