mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
reffactor
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
pipe,
|
||||
share,
|
||||
} from 'rxjs';
|
||||
import { Emitter, ErrorHandling, Logging } from './interfaces';
|
||||
import type { Emitter, ErrorHandling, Logging } from './interfaces';
|
||||
import util from 'node:util';
|
||||
import type { PluginResult } from '../types/core-plugin';
|
||||
import type { Result } from 'ts-results-es'
|
||||
|
||||
@@ -50,9 +50,8 @@ function contextArgs(wrappable: Message | BaseInteraction, messageArgs?: string[
|
||||
|
||||
|
||||
function intoPayload(module: Processed<Module>, ) {
|
||||
return pipe(
|
||||
arrayifySource,
|
||||
map(args => ({ module, args, })));
|
||||
return pipe(arrayifySource,
|
||||
map(args => ({ module, args })));
|
||||
}
|
||||
|
||||
const createResult = createResultResolver<
|
||||
|
||||
@@ -16,9 +16,8 @@ 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
|
||||
);
|
||||
sensitivity: 'accent',
|
||||
}) === 0);
|
||||
}
|
||||
|
||||
export function messageHandler(
|
||||
|
||||
Reference in New Issue
Block a user