File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use reqwest::blocking::Client as HttpClient;
7
7
use serenity:: { model:: channel:: Message , prelude:: Context } ;
8
8
use std:: { collections:: HashMap , sync:: Arc } ;
9
9
10
- const PREFIX : & ' static str = "?" ;
10
+ pub ( crate ) const PREFIX : & ' static str = "?" ;
11
11
pub ( crate ) type Result < T > = std:: result:: Result < T , Box < dyn std:: error:: Error > > ;
12
12
pub ( crate ) type GuardFn = fn ( & Args ) -> Result < bool > ;
13
13
Original file line number Diff line number Diff line change @@ -266,11 +266,14 @@ impl EventHandler for Events {
266
266
. content ( ev. content . unwrap_or_else ( || String :: new ( ) ) ) ;
267
267
268
268
let msg = msg. build ( ) ;
269
- info ! (
270
- "sending edited message - {:?} {:?}" ,
271
- msg. content, msg. author
272
- ) ;
273
- self . cmds . execute ( cx, & msg) ;
269
+
270
+ if msg. content . starts_with ( commands:: PREFIX ) {
271
+ info ! (
272
+ "sending edited message - {:?} {:?}" ,
273
+ msg. content, msg. author
274
+ ) ;
275
+ self . cmds . execute ( cx, & msg) ;
276
+ }
274
277
}
275
278
}
276
279
You can’t perform that action at this time.
0 commit comments