mirror of
https://github.com/sern-handler/handler
synced 2026-06-28 02:32:15 +00:00
fix: autocomplete
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@sern/handler",
|
||||
"packageManager": "pnpm@7.27.0",
|
||||
"version": "2.5.0",
|
||||
"version": "2.5.1",
|
||||
"description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.",
|
||||
"main": "dist/cjs/index.cjs",
|
||||
"module": "dist/esm/index.mjs",
|
||||
|
||||
@@ -54,7 +54,7 @@ export function dispatchAutocomplete(
|
||||
const option = treeSearch(interaction, module.options);
|
||||
if (option !== undefined) {
|
||||
return {
|
||||
module,
|
||||
module: option.command as Processed<Module>, //autocomplete is not a true "module" warning cast!
|
||||
args: [interaction],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { _const as i } from '../utilities/functions';
|
||||
import SernEmitter from '../sernEmitter';
|
||||
import { callPlugin, everyPluginOk, filterMapTo } from './operators';
|
||||
import type { Processed } from '../../types/handler';
|
||||
import type { VoidResult } from '../../types/plugin';
|
||||
import type { ControlPlugin, VoidResult } from '../../types/plugin';
|
||||
|
||||
/**
|
||||
* Ignores messages from any person / bot except itself
|
||||
@@ -94,7 +94,7 @@ export function executeModule(
|
||||
* @returns receiver function for flattening a stream of data
|
||||
*/
|
||||
export function createResultResolver<
|
||||
T extends Processed<Module>,
|
||||
T extends { execute: (...args: any[]) => any; onEvent : ControlPlugin[] },
|
||||
Args extends { module: T; [key: string]: unknown },
|
||||
Output,
|
||||
>(config: {
|
||||
|
||||
Reference in New Issue
Block a user