Skip to content

Commit f897118

Browse files
fix: update messagecommand to v3 and use Command (#152)
1 parent e711a71 commit f897118

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/components/messagecommand.js.sapphire

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ "category": "commands" }
22
---
3-
const { SubCommandPluginCommand } = require('@sapphire/plugin-subcommands');
3+
const { Command } = require('@sapphire/framework');
44

5-
class UserCommand extends SubCommandPluginCommand {
5+
class UserCommand extends Command {
66
constructor(context, options) {
77
super(context, {
88
...options

templates/components/messagecommand.ts.sapphire

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{ "category": "commands" }
22
---
33
import { ApplyOptions } from '@sapphire/decorators';
4-
import { SubCommandPluginCommand, SubCommandPluginCommandOptions } from '@sapphire/plugin-subcommands';
4+
import { Command } from '@sapphire/framework';
55
import type { Message } from 'discord.js';
66

7-
@ApplyOptions<SubCommandPluginCommandOptions>({
7+
@ApplyOptions<Command.Options>({
88
description: 'A basic command'
99
})
10-
export class UserCommand extends SubCommandPluginCommand {
10+
export class UserCommand extends Command {
1111
public async messageRun(message: Message) {
1212
return message.channel.send('Hello world!');
1313
}

0 commit comments

Comments
 (0)