mallusrgreat
mallusrgreat
Explore posts from servers
SIASapphire - Imagine a framework
Created by mallusrgreat on 8/9/2024 in #sapphire-support
Interaction handler parse never being called
import { ApplyOptions } from "@sapphire/decorators";
import {
InteractionHandler,
InteractionHandlerTypes,
} from "@sapphire/framework";
import type { AutocompleteInteraction } from "discord.js";
import config from "../config.js";
...
// logs correctly
console.log('fuse')
@ApplyOptions<InteractionHandler.Options>({
interactionHandlerType: InteractionHandlerTypes.Autocomplete,
})
export class AutocompleteHandler extends InteractionHandler {
...
public override async parse(interaction: AutocompleteInteraction) {
const focusedOption = interaction.options.getFocused(true);
// doesnt log
console.log(focusedOption.name);
switch (focusedOption.name) {
case "server_name": {
// doesnt log
console.log("test");
return this.some(
..
);
}
default:
return this.none();
}
}
}
import { ApplyOptions } from "@sapphire/decorators";
import {
InteractionHandler,
InteractionHandlerTypes,
} from "@sapphire/framework";
import type { AutocompleteInteraction } from "discord.js";
import config from "../config.js";
...
// logs correctly
console.log('fuse')
@ApplyOptions<InteractionHandler.Options>({
interactionHandlerType: InteractionHandlerTypes.Autocomplete,
})
export class AutocompleteHandler extends InteractionHandler {
...
public override async parse(interaction: AutocompleteInteraction) {
const focusedOption = interaction.options.getFocused(true);
// doesnt log
console.log(focusedOption.name);
switch (focusedOption.name) {
case "server_name": {
// doesnt log
console.log("test");
return this.some(
..
);
}
default:
return this.none();
}
}
}
5 replies
SIASapphire - Imagine a framework
Created by mallusrgreat on 8/2/2024 in #sapphire-support
Sentry with Sapphire?
Sapphire handles all errors for me so they don't go into Sentry, what should I do?
4 replies
SIASapphire - Imagine a framework
Created by mallusrgreat on 6/3/2024 in #sapphire-support
args provided but not found?
No description
10 replies
SIASapphire - Imagine a framework
Created by mallusrgreat on 4/22/2024 in #sapphire-support
Subcommand Aliases
How can I add aliases to subcommands? Is it not possible?
6 replies
SIASapphire - Imagine a framework
Created by mallusrgreat on 4/6/2024 in #sapphire-support
Sapphire with TypeScript & Bun
How does sapphire import files? Does it work fine with bun with typescript?
5 replies