chore: handle no prefix case

This commit is contained in:
EvolutionX
2022-04-20 10:02:44 +05:30
committed by Jacob Nguyen
parent f6b88dcdc8
commit 4d06009635

View File

@@ -12,6 +12,7 @@ import { filterCorrectModule, ignoreNonBot } from './observableHandling';
export const onMessageCreate = (wrapper : Wrapper) => {
const { client, defaultPrefix } = wrapper;
if (!defaultPrefix) return;
const messageEvent$ = (<Observable<Message>> fromEvent( client, 'messageCreate'));
const processMessage$ = messageEvent$.pipe(
ignoreNonBot(defaultPrefix),