🚧 Highlight demo component

This commit is contained in:
Freeze455
2021-08-17 09:27:42 +02:00
parent b48b7d4072
commit a94f55eeb5
2 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
export const event = `
import { Event, BaseEvent } from '@discord-factory/core'
import { GuildMember } from 'discord.js'
@Event('guildMemberAdd')
export default class FooEvent implements BaseEvent {
public async run(member: GuildMember): Promise<void> {
// Your code here
}
}
`
export const command = `
import { BaseCommand, Command } from '@discord-factory/core'
import { Message } from 'discord.js'
@Command({
label: 'MyCommand',
description: 'MyCommand description',
tag: 'mycommand'
})
export default class FooCommand implements BaseCommand {
public async run(message: Message, args: string[]): Promise<void> {
// Your code here
}
}`
export const slashCommand = `
import { BaseSlashCommand, SlashCommand } from '@discord-factory/core'
import { Message, CommandInteraction } from 'discord.js'
@SlashCommand({
scope: ['guild id'], // or 'GLOBAL'
roles: ['role id'],
options: {
name: 'send-ticket',
description: 'SendEmbed ticket description',
options: [],
},
})
export default class FooSlashCommand implements BaseSlashCommand {
public async run(interaction: CommandInteraction): Promise<void> {
// Your code here
}
}`