"minor" refactor
This commit is contained in:
parent
1bc5801d8a
commit
ef22044922
7 changed files with 48 additions and 36 deletions
|
@ -1,5 +1,5 @@
|
|||
import { MessageEmbed } from 'discord.js';
|
||||
import { commands } from '..';
|
||||
import { commands } from '.';
|
||||
import { Command } from '..';
|
||||
|
||||
export const cmd: Command = {
|
||||
|
|
7
src/commands/index.ts
Normal file
7
src/commands/index.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { cmd as help } from './help';
|
||||
import { cmd as members } from './members';
|
||||
import { cmd as ping } from './ping';
|
||||
import { cmd as stars } from './stars';
|
||||
import { cmd as tags } from './tags';
|
||||
|
||||
export const commands = [help, members, ping, stars, tags];
|
|
@ -1,6 +1,5 @@
|
|||
import { MessageEmbed } from 'discord.js';
|
||||
import type { Command } from '../index';
|
||||
import { tags } from '../index';
|
||||
import { getTags, type Command } from '..';
|
||||
|
||||
export const cmd: Command = {
|
||||
name: 'tags',
|
||||
|
@ -8,6 +7,8 @@ export const cmd: Command = {
|
|||
exec: async (e) => {
|
||||
const em = new MessageEmbed().setTitle('tags').setColor('DARK_GREEN');
|
||||
|
||||
const tags = await getTags();
|
||||
|
||||
for (const i in tags) {
|
||||
const tag = tags[i];
|
||||
let text = '';
|
||||
|
@ -22,6 +23,7 @@ export const cmd: Command = {
|
|||
}
|
||||
em.addField(tag.name, text);
|
||||
}
|
||||
|
||||
await e.reply({ embeds: [em] });
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue