2024.01.31 - Latest Borrow Compile Err
This commit is contained in:
parent
8a93ef0469
commit
be2e967e40
2 changed files with 26 additions and 11 deletions
src/core
|
@ -154,6 +154,9 @@ impl BotManagers {
|
|||
identity : IdentityManager::init(),
|
||||
chat : Chat::init(ratelimiters,client),
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,7 +252,7 @@ impl BotInstance
|
|||
|
||||
let join_handle = tokio::spawn(async move {
|
||||
|
||||
while let Some(message) = self.incoming_messages.recv().await {
|
||||
while let Some(message) = &self.incoming_messages.recv().await {
|
||||
// Below can be used to debug if I want to capture all messages
|
||||
// println!("Received message: {:?}", message);
|
||||
|
||||
|
@ -258,7 +261,7 @@ impl BotInstance
|
|||
// if let Some(chnl) = msg.channel_login {
|
||||
// println!("NOTICE : (#{}) {}", chnl, msg.message_text);
|
||||
// }
|
||||
match msg.channel_login {
|
||||
match &msg.channel_login {
|
||||
Some(chnl) => println!("NOTICE : (#{}) {}", chnl, msg.message_text),
|
||||
None => println!("NOTICE : {}", msg.message_text),
|
||||
}
|
||||
|
@ -269,7 +272,7 @@ impl BotInstance
|
|||
println!("Privmsg section");
|
||||
|
||||
// b.listener_main_prvmsg(&msg);
|
||||
self.listener_main_prvmsg(msg).await;
|
||||
self.listener_main_prvmsg(&msg).await;
|
||||
// - BotCommand listener should likely need to be called within the above
|
||||
|
||||
|
||||
|
@ -301,7 +304,7 @@ impl BotInstance
|
|||
|
||||
|
||||
// async fn listener_main_prvmsg(&mut self,msg:PrivmsgMessage) -> () {
|
||||
async fn listener_main_prvmsg(&self,msg:PrivmsgMessage) -> () {
|
||||
async fn listener_main_prvmsg(self,msg:&PrivmsgMessage) -> () {
|
||||
|
||||
// println!("(#{}) {}: {}", msg.channel_login, msg.sender.name, msg.message_text);
|
||||
|
||||
|
@ -351,7 +354,9 @@ impl BotInstance
|
|||
// _ => (),
|
||||
// }
|
||||
|
||||
match self.botmgrs.identity.to_owned().can_user_run_PRVMSG(&msg, c.required_roles.clone()) {
|
||||
// match self.botmgrs.identity.to_owned().can_user_run_PRVMSG(&msg, c.required_roles.clone()) {
|
||||
// match self.botmgrs.identity.can_user_run_PRVMSG(&msg, c.required_roles.clone()) {
|
||||
match self.botmgrs.identity.can_user_run_PRVMSG(&msg, c.required_roles.clone()) {
|
||||
// Ok(Permissible::Allow) => (),
|
||||
Permissible::Allow => {
|
||||
println!("Executed as permissible");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue