File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ export class CoreEvent extends Event<Events.PreMessageParsed> {
33
33
if ( parsed !== null ) prefix = parsed ;
34
34
}
35
35
36
- if ( prefix !== null ) client . emit ( Events . PrefixedMessage , message , prefix ) ;
36
+ if ( prefix === null ) client . emit ( Events . NonePrefixedMessage , message ) ;
37
+ else client . emit ( Events . PrefixedMessage , message , prefix ) ;
37
38
}
38
39
39
40
private async canRunInChannel ( message : Message ) : Promise < boolean > {
Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ export enum Events {
76
76
CommandSuccess = 'commandSuccess' ,
77
77
CommandFinish = 'commandFinish' ,
78
78
CommandError = 'commandError' ,
79
- PluginLoaded = 'pluginLoaded'
79
+ PluginLoaded = 'pluginLoaded' ,
80
+ NonePrefixedMessage = 'nonePrefixedMessage'
80
81
// #endregion Sapphire load cycle events
81
82
}
82
83
@@ -148,6 +149,7 @@ declare module 'discord.js' {
148
149
[ Events . CommandError ] : [ error : Error , payload : CommandErrorPayload ] ;
149
150
[ Events . CommandFinish ] : [ message : Message , command : Command , payload : CommandFinishPayload ] ;
150
151
[ Events . PluginLoaded ] : [ hook : PluginHook , name : string | undefined ] ;
152
+ [ Events . NonePrefixedMessage ] : [ message : Message ] ;
151
153
// #endregion Sapphire load cycle events
152
154
153
155
// #region Termination
You can’t perform that action at this time.
0 commit comments