mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56:07 +00:00
fix: options resolver
This commit is contained in:
parent
d72d6c0844
commit
b5099a005e
@ -41,7 +41,7 @@ export async function onInteractionCreate(
|
||||
body.guild_id,
|
||||
body.data.resolved as ContextOptionsResolved,
|
||||
);
|
||||
const interaction = new AutocompleteInteraction(self, body, __reply);
|
||||
const interaction = new AutocompleteInteraction(self, body, optionsResolver, __reply);
|
||||
const command = optionsResolver.getAutocomplete();
|
||||
|
||||
// idc, is a YOU problem
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from './client/base';
|
||||
import type { ClientNameEvents, EventContext } from './events';
|
||||
import { isCloudfareWorker } from './common';
|
||||
export { Logger, PermissionStrings } from './common';
|
||||
export { Logger, PermissionStrings, Watcher } from './common';
|
||||
//
|
||||
export { Collection, LimitedCollection } from './collection';
|
||||
//
|
||||
|
@ -216,7 +216,7 @@ export class BaseInteraction<
|
||||
static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction) {
|
||||
switch (gateway.type) {
|
||||
case InteractionType.ApplicationCommandAutocomplete:
|
||||
return new AutocompleteInteraction(client, gateway, __reply);
|
||||
return new AutocompleteInteraction(client, gateway, undefined, __reply);
|
||||
// biome-ignore lint/suspicious/noFallthroughSwitchClause: bad interaction between biome and ts-server
|
||||
case InteractionType.ApplicationCommand:
|
||||
switch (gateway.data.type) {
|
||||
@ -299,16 +299,19 @@ export class AutocompleteInteraction<FromGuild extends boolean = boolean> extend
|
||||
constructor(
|
||||
client: UsingClient,
|
||||
interaction: APIApplicationCommandAutocompleteInteraction,
|
||||
resolver?: OptionResolver,
|
||||
protected __reply?: __InternalReplyFunction,
|
||||
) {
|
||||
super(client, interaction);
|
||||
this.options = new OptionResolver(
|
||||
client,
|
||||
interaction.data.options,
|
||||
undefined,
|
||||
interaction.guild_id,
|
||||
interaction.data.resolved as ContextOptionsResolved,
|
||||
);
|
||||
this.options =
|
||||
resolver ??
|
||||
new OptionResolver(
|
||||
client,
|
||||
interaction.data.options,
|
||||
undefined,
|
||||
interaction.guild_id,
|
||||
interaction.data.resolved as ContextOptionsResolved,
|
||||
);
|
||||
}
|
||||
|
||||
getInput() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user