mirror of
https://github.com/DiscordFactory/website-documentation.git
synced 2026-01-22 21:10:26 +01:00
🚧 Work in progress
This commit is contained in:
@@ -33,8 +33,8 @@ import { Message, CommandInteraction } from 'discord.js'
|
||||
scope: ['guild id'], // or 'GLOBAL'
|
||||
roles: ['role id'],
|
||||
options: {
|
||||
name: 'send-ticket',
|
||||
description: 'SendEmbed ticket description',
|
||||
name: 'foo',
|
||||
description: 'Foo description',
|
||||
options: [],
|
||||
},
|
||||
})
|
||||
@@ -42,4 +42,19 @@ export default class FooSlashCommand implements BaseSlashCommand {
|
||||
public async run(interaction: CommandInteraction): Promise<void> {
|
||||
// Your code here
|
||||
}
|
||||
}`
|
||||
}`
|
||||
|
||||
export const middleware = `
|
||||
import {
|
||||
Middleware,
|
||||
BaseMiddleware,
|
||||
MiddlewareContext
|
||||
} from '@discord-factory/core'
|
||||
|
||||
@Middleware({ pattern: '(?<count>\\\\d+)-args')}
|
||||
export default class FooMiddleware implements BaseMiddleware {
|
||||
public async run(context: MiddlewareContext): Promise<void> {
|
||||
// Your code here
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user