upgrade to discord.js v14
This commit is contained in:
parent
35a64b4f25
commit
7c0b91e1be
12 changed files with 446 additions and 533 deletions
|
@ -1,14 +1,15 @@
|
|||
import { MessageEmbed } from 'discord.js';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { commands } from '.';
|
||||
import { Command } from '..';
|
||||
import type { Command } from '..';
|
||||
import { COLORS } from '../constants';
|
||||
|
||||
export const cmd: Command = {
|
||||
name: 'help',
|
||||
desc: 'Shows this menu.',
|
||||
exec: async (e) => {
|
||||
const embed = new MessageEmbed()
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle('Help Menu')
|
||||
.setColor('DARK_GREEN');
|
||||
.setColor(COLORS.green);
|
||||
|
||||
const comman = commands;
|
||||
comman.sort((x, y) => {
|
||||
|
@ -27,7 +28,7 @@ export const cmd: Command = {
|
|||
if (cmd.examples && cmd.examples[0]) {
|
||||
resp.push(`**Examples**: \n${cmd.examples.join('\n> ')}`);
|
||||
}
|
||||
embed.addField('!' + cmd.name, resp.join('\n'));
|
||||
embed.addFields({ name: '!' + cmd.name, value: resp.join('\n') });
|
||||
}
|
||||
|
||||
await e.reply({ embeds: [embed] });
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import type { Command } from '../index';
|
||||
import type { Command } from '..';
|
||||
import { COLORS } from '../constants';
|
||||
|
||||
export const cmd: Command = {
|
||||
name: 'members',
|
||||
|
@ -20,7 +21,7 @@ export const cmd: Command = {
|
|||
m.presence?.status === 'dnd'
|
||||
).length
|
||||
} online members`,
|
||||
color: 'GOLD',
|
||||
color: COLORS.blue,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { Command } from '../index';
|
||||
import type { Command } from '..';
|
||||
|
||||
export const cmd: Command = {
|
||||
name: 'ping',
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { COLORS } from '../constants';
|
||||
import type { Command } from '../index';
|
||||
|
||||
export const cmd: Command = {
|
||||
|
@ -12,7 +13,7 @@ export const cmd: Command = {
|
|||
embeds: [
|
||||
{
|
||||
title: `⭐ ${count} total stars!`,
|
||||
color: 'GOLD',
|
||||
color: COLORS.yellow,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { MessageEmbed } from 'discord.js';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { getTags, type Command } from '..';
|
||||
import { COLORS } from '../constants';
|
||||
|
||||
export const cmd: Command = {
|
||||
name: 'tags',
|
||||
desc: 'Lists the tags available',
|
||||
exec: async (e) => {
|
||||
const em = new MessageEmbed().setTitle('tags').setColor('DARK_GREEN');
|
||||
const em = new EmbedBuilder().setTitle('tags').setColor(COLORS.green);
|
||||
|
||||
const tags = await getTags();
|
||||
|
||||
|
@ -23,7 +24,7 @@ export const cmd: Command = {
|
|||
text += '\n[embedded message]';
|
||||
}
|
||||
|
||||
em.addField('?' + tag.name, text);
|
||||
em.addFields({ name: '?' + tag.name, value: text });
|
||||
}
|
||||
|
||||
await e.reply({ embeds: [em] });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue