add internal types

This commit is contained in:
ModulatingForce 2023-12-20 20:52:20 -05:00
parent f0028f6751
commit 09308a407a

View file

@ -30,6 +30,18 @@ pub enum ChType {
pub use ChType::Channel;
pub enum ModType {
BotModule(String),
}
pub use ModType::BotModule;
pub enum EnType {
Enabled(ChType),
}
pub use EnType::Enabled;
pub struct BotInstance {
prefix : char,
@ -37,7 +49,7 @@ pub struct BotInstance {
pub client : TwitchIRCClient<TCPTransport<TLS>,StaticLoginCredentials>,
pub incoming_messages : UnboundedReceiver<ServerMessage>,
pub ratelimiters : HashMap<ChType,RateLimiter>, // used to limit messages sent per channel
// botmodules : Hashmap<botmodule(String),Vec[Enabled(Channel(String)))]>,
// botmodules : HashMap<ModType,Vec<EnType>>,
twitch_oauth : String,
pub bot_channels : Vec<ChType>,
/*bot_commands : Vec[BotCommand],
@ -96,7 +108,7 @@ impl BotInstance {
incoming_messages : incoming_messages,
client : client,
ratelimiters : ratelimiters, // used to limit messages sent per channel
// botmodules : Hashmap<botmodule(String),Vec[Enabled(Channel(String)))]>,
// botmodules : HashMap::new(),
twitch_oauth : oauth_token,
bot_channels : botchannels,
/*bot_commands : Vec[BotCommand],