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;
77use serenity:: { model:: channel:: Message , prelude:: Context } ;
88use std:: { collections:: HashMap , sync:: Arc } ;
99
10- const PREFIX : & ' static str = "?" ;
10+ pub ( crate ) const PREFIX : & ' static str = "?" ;
1111pub ( crate ) type Result < T > = std:: result:: Result < T , Box < dyn std:: error:: Error > > ;
1212pub ( crate ) type GuardFn = fn ( & Args ) -> Result < bool > ;
1313
Original file line number Diff line number Diff line change @@ -266,11 +266,14 @@ impl EventHandler for Events {
266266 . content ( ev. content . unwrap_or_else ( || String :: new ( ) ) ) ;
267267
268268 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+ }
274277 }
275278 }
276279
You can’t perform that action at this time.
0 commit comments