feat: added more help commands

This commit is contained in:
TresAbhi committed 2023-07-10 19:14:16 +00:00
1 parent feeb850ca9
commit 463af106be
13 files changed
+174 -66

No files matched your search

+5 -2
View File
@@ -2,8 +2,11 @@ import { EmbedBuilder } from 'discord.js';
import { ACCENT_COLOR } from '../../constants/colors.js';
export default function embedInfo(title: string, description: string) {
return new EmbedBuilder()
const embed = new EmbedBuilder()
.setColor(ACCENT_COLOR)
.setTitle(title)
.setDescription(description);
if (title) embed.setTitle(title);
return embed;
}
@@ -19,7 +19,9 @@ export default async function normalizeInteractionReturnable(
await Promise.all(
normalizedReturnable.map(async (item) => {
if (item instanceof EmbedBuilder) {
if (typeof item === 'string') {
reply.content = item;
} else if (item instanceof EmbedBuilder) {
if (!reply.embeds) reply.embeds = [];
reply.embeds.push(item);
} else if (item instanceof ButtonBuilder) {