pub struct BotConfig {Show 20 fields
pub base_url: String,
pub redis_url: String,
pub discord_token: String,
pub link_code_ttl_secs: u64,
pub page_size: usize,
pub api_page_size: usize,
pub allow_direct_upload: bool,
pub max_upload_bytes: usize,
pub freeform_enabled: bool,
pub llm_enabled: bool,
pub ollama_url: String,
pub intent_model: String,
pub intent_timeout_secs: u64,
pub intent_cache_ttl: u64,
pub lemmy_enabled: bool,
pub lemmy_url: String,
pub lemmy_username: String,
pub lemmy_password: String,
pub lemmy_community: String,
pub lemmy_poll_secs: u64,
}Expand description
Bot configuration.
Loaded once at startup from env vars. base_url is the FicHub REST API
root (e.g. http://localhost:8000 or https://fichub.example.com).
Fields§
§base_url: StringFicHub REST API base URL (no trailing slash). Default http://localhost:8000.
redis_url: StringFicHub Redis URL for pagination cache. Default redis://localhost:6379.
discord_token: StringDiscord bot token (required to run the bot).
link_code_ttl_secs: u64The /link flow token TTL in seconds (how long a pending link code lives).
page_size: usizeMax results per page for Discord embeds (avoids exceeding embed field cap).
api_page_size: usizeMax results per page from the API (higher than page_size so pagination
has buffer when filtering client-side).
allow_direct_upload: boolWhether /download uploads the EPUB to Discord directly when < 25 MiB.
max_upload_bytes: usizeMax bytes for direct Discord upload (Discord’s limit is 25 MiB).
freeform_enabled: boolFree-form @mention handling (intent parsing). Disable to keep the bot strictly command-only. Default true.
llm_enabled: boolWhether any LLM features are enabled (intent classification, debug
diagnosis). All LLM features are OPTIONAL — set 0 to run the bot
without any Ollama dependency (free-form then degrades to a URL +
natural-language fallback ladder, no LLM calls). Default false.
ollama_url: StringOllama base URL (intent classification + debug diagnosis). Default
http://localhost:11434.
intent_model: StringModel for intent classification. Default lfm2.5:8b (FicHub’s resident
model on thinkcentre; reuse it instead of thrashing a second model).
intent_timeout_secs: u64Max seconds to wait for an intent classification before falling back.
intent_cache_ttl: u64Intent-cache TTL in seconds (repeated identical mentions skip the LLM).
lemmy_enabled: boolWhether the Lemmy/Reddthat community monitor runs. Default false.
lemmy_url: StringLemmy instance (e.g. https://reddthat.com). Default empty.
lemmy_username: StringLemmy bot account username (posting/reply identity).
lemmy_password: StringLemmy bot account password.
lemmy_community: StringCommunity to monitor, e.g. fanfiction.
lemmy_poll_secs: u64Poll interval for the Lemmy monitor, seconds.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BotConfig
impl RefUnwindSafe for BotConfig
impl Send for BotConfig
impl Sync for BotConfig
impl Unpin for BotConfig
impl UnsafeUnpin for BotConfig
impl UnwindSafe for BotConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more