Skip to content

Commit b455738

Browse files
committed
fix(templates): adhere to strict type checking rules
1 parent 269c831 commit b455738

4 files changed

+8
-8
lines changed

templates/components/argument.ts.sapphire

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{ "category": "arguments" }
22
---
33
import { ApplyOptions } from '@sapphire/decorators';
4-
import { Argument, ArgumentOptions } from '@sapphire/framework';
4+
import { Argument } from '@sapphire/framework';
55

6-
@ApplyOptions<ArgumentOptions>({})
6+
@ApplyOptions<Argument.Options>({})
77
export class UserArgument extends Argument<string> {
8-
async run(parameter: string) {
8+
public override run(parameter: string) {
99
return this.ok(parameter);
1010
}
1111
}

templates/components/contextmenucommand.ts.sapphire

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class UserCommand extends Command {
1616
);
1717
}
1818

19-
public async contextMenuRun(interaction: Command.ContextMenuCommandInteraction) {
19+
public override async contextMenuRun(interaction: Command.ContextMenuCommandInteraction) {
2020
return interaction.reply({ content: 'Hello world!' });
2121
}
2222
}
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{ "category": "listeners" }
22
---
33
import { ApplyOptions } from '@sapphire/decorators';
4-
import { Listener, ListenerOptions } from '@sapphire/framework';
4+
import { Listener } from '@sapphire/framework';
55

6-
@ApplyOptions<ListenerOptions>({})
6+
@ApplyOptions<Listener.Options>({})
77
export class UserEvent extends Listener {
8-
public run() {}
8+
public override run() {}
99
}

templates/components/messagecommand.ts.sapphire

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Message } from 'discord.js';
88
description: 'A basic command'
99
})
1010
export class UserCommand extends Command {
11-
public async messageRun(message: Message) {
11+
public override async messageRun(message: Message) {
1212
return message.channel.send('Hello world!');
1313
}
1414
}

0 commit comments

Comments
 (0)