feat: log analysis

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
TheKodeToad 2023-12-09 16:54:35 +00:00 committed by seth
parent 026d4cb607
commit c6f4295d6a
18 changed files with 487 additions and 20 deletions

View file

@ -7,8 +7,8 @@ use regex::Regex;
static ETA_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"\beta\b").unwrap());
pub async fn handle(ctx: &Context, msg: &Message) -> Result<()> {
if !ETA_REGEX.is_match(&msg.content) {
pub async fn handle(ctx: &Context, message: &Message) -> Result<()> {
if !ETA_REGEX.is_match(&message.content) {
return Ok(());
}
@ -17,6 +17,6 @@ pub async fn handle(ctx: &Context, msg: &Message) -> Result<()> {
utils::random_choice(consts::ETA_MESSAGES)?
);
msg.reply(ctx, response).await?;
message.reply(ctx, response).await?;
Ok(())
}