added some extra logging

This commit is contained in:
jellywx 2021-05-12 14:07:09 +01:00
parent f237ad413d
commit 0c97baabb6
2 changed files with 8 additions and 3 deletions

View File

@ -287,8 +287,13 @@ impl Framework for RegexFramework {
let member = guild.member(&ctx, &msg.author).await.unwrap(); let member = guild.member(&ctx, &msg.author).await.unwrap();
info!(
"Starting permission check for {} ({})",
command.name, msg.content
);
if command.check_permissions(&ctx, &guild, &member).await { if command.check_permissions(&ctx, &guild, &member).await {
dbg!(command.name); info!("Check on {} ({}) passed", command.name, msg.content);
(command.func)( (command.func)(
&ctx, &ctx,
@ -305,6 +310,8 @@ impl Framework for RegexFramework {
.say(&ctx, "You must be an Admin to do this command") .say(&ctx, "You must be an Admin to do this command")
.await; .await;
} }
info!("Finished executing {} ({})", command.name, msg.content);
} }
PermissionCheck::None => { PermissionCheck::None => {

View File

@ -1,8 +1,6 @@
#[macro_use] #[macro_use]
extern crate lazy_static; extern crate lazy_static;
extern crate reqwest;
mod error; mod error;
mod event_handlers; mod event_handlers;
mod framework; mod framework;