some refactor

This commit is contained in:
jacob
2024-05-03 16:14:55 -05:00
parent d7ebdb2edc
commit 545105e45b
2 changed files with 4 additions and 12 deletions

View File

@@ -189,11 +189,7 @@ export function executeModule(
emitter: Emitter,
logger: Logging|undefined,
errHandler: ErrorHandling,
{
module,
task,
args
}: ExecutePayload,
{ module, task, args }: ExecutePayload,
) {
return of(module).pipe(
//converting the task into a promise so rxjs can resolve the Awaitable properly

View File

@@ -1,8 +1,6 @@
import { mergeMap, EMPTY, concatMap } from 'rxjs';
import { EMPTY } from 'rxjs';
import type { Message } from 'discord.js';
import { PayloadType } from '../core/structures/enums';
import { sharedEventStream, SernError, filterTap, resultPayload } from '../core/_internal';
import { createMessageHandler, executeModule, makeModuleExecutor } from './event-utils';
import { sharedEventStream } from '../core/_internal';
import type { DependencyList } from '../types/ioc';
/**
@@ -15,9 +13,7 @@ function isNonBot(prefix: string) {
function hasPrefix(prefix: string, content: string) {
const prefixInContent = content.slice(0, prefix.length);
return (prefixInContent.localeCompare(prefix, undefined, {
sensitivity: 'accent',
}) === 0);
return (prefixInContent.localeCompare(prefix, undefined, { sensitivity: 'accent', }) === 0);
}
export function messageHandler(