mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: type issues
This commit is contained in:
1 parent
7dd3913ae8
commit
abcb75f06e
4 files changed
+5
-5
No files matched your search
@@ -30,4 +30,4 @@ export default {
|
||||
const executionTime = Date.now() - executionStart;
|
||||
interaction.editReply(`Pong 🏓 - ${executionTime}ms`);
|
||||
},
|
||||
} satisfies CommandRegistry;
|
||||
} satisfies CommandRegistry<true>;
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
InteractionEditReplyOptions,
|
||||
} from 'discord.js';
|
||||
import { InteractionReturnable } from '../../events/interactionCreate/index.js';
|
||||
import render from '../ui/render.js';
|
||||
import jsxToPng from '../node/jsxToPng.js';
|
||||
|
||||
export default async function normalizeInteractionReturnable(
|
||||
returnable: InteractionReturnable,
|
||||
@@ -29,7 +29,7 @@ export default async function normalizeInteractionReturnable(
|
||||
item,
|
||||
);
|
||||
} else {
|
||||
const image = await render(item);
|
||||
const image = await jsxToPng(item);
|
||||
if (!reply.files) reply.files = [];
|
||||
reply.files.push(image);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import jsxToSvg from './jsxToSvg.js';
|
||||
import svgToPng from './svgToPng.js';
|
||||
|
||||
export default async function render(jsx: JSX.Element) {
|
||||
export default async function jsxToPng(jsx: JSX.Element) {
|
||||
const svg = await jsxToSvg(jsx);
|
||||
const png = svgToPng(svg);
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface Registry {
|
||||
inProduction: boolean;
|
||||
}
|
||||
|
||||
export interface CommandRegistry<HandlesInteraction extends boolean = false>
|
||||
export interface CommandRegistry<HandlesInteraction extends boolean = boolean>
|
||||
extends Registry {
|
||||
inPublic: boolean;
|
||||
handlesInteraction?: HandlesInteraction;
|
||||
|
||||
Reference in new issue
Block a user