@pikokr/command.ts 3.0.8-dev.745e02b → 3.0.8-dev.e5806ef

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ {
2
+ "files": [
3
+ "README.md"
4
+ ],
5
+ "imageSize": 100,
6
+ "contributorsPerLine": 7,
7
+ "contributorsSortAlphabetically": false,
8
+ "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
9
+ "contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
10
+ "types": {
11
+ "custom": {
12
+ "symbol": "🔭",
13
+ "description": "A custom contribution type.",
14
+ "link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
15
+ }
16
+ },
17
+ "skipCi": true,
18
+ "contributors": [
19
+ {
20
+ "login": "pikokr",
21
+ "name": "파링",
22
+ "avatar_url": "https://avatars.githubusercontent.com/u/68010770?v=4",
23
+ "profile": "https://pikokr.dev",
24
+ "contributions": [
25
+ "code"
26
+ ]
27
+ }
28
+ ],
29
+ "projectName": "command.ts",
30
+ "projectOwner": "pikokr",
31
+ "repoType": "github",
32
+ "repoHost": "https://github.com"
33
+ }
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Command.TS
2
2
 
3
+ [![.github/workflows/publish.yml](https://github.com/pikokr/command.ts/actions/workflows/publish.yml/badge.svg)](https://github.com/pikokr/command.ts/actions/workflows/publish.yml)
4
+
3
5
  ![cts](https://user-images.githubusercontent.com/68010770/145200458-b14c5e4e-6927-4516-8d48-c68a384d2a20.png)
4
6
 
5
7
  Command framework for discord.js
@@ -7,7 +7,7 @@ export declare class CommandCheckFailed extends Error {
7
7
  constructor(msg: Message, command: Command);
8
8
  }
9
9
  export declare class SlashCommandCheckFailed extends Error {
10
- msg: CommandInteraction;
10
+ interaction: CommandInteraction;
11
11
  command: SlashCommand;
12
- constructor(msg: CommandInteraction, command: SlashCommand);
12
+ constructor(interaction: CommandInteraction, command: SlashCommand);
13
13
  }
@@ -10,9 +10,9 @@ class CommandCheckFailed extends Error {
10
10
  }
11
11
  exports.CommandCheckFailed = CommandCheckFailed;
12
12
  class SlashCommandCheckFailed extends Error {
13
- constructor(msg, command) {
13
+ constructor(interaction, command) {
14
14
  super();
15
- this.msg = msg;
15
+ this.interaction = interaction;
16
16
  this.command = command;
17
17
  }
18
18
  }
@@ -51,6 +51,9 @@ class CommandClient {
51
51
  autoSync: true,
52
52
  },
53
53
  }, options);
54
+ if (this.options.owners !== 'auto') {
55
+ this.owners = this.options.owners;
56
+ }
54
57
  this.client.once('ready', () => this.ready());
55
58
  this.registry.registerModule(new builtinModules_1.CommandHandler(this.registry));
56
59
  this.registry.registerModule(new builtinModules_1.BuiltinCommandConverters(this));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pikokr/command.ts",
3
3
  "description": "Discord.js command framework for typescript.",
4
- "version": "3.0.8-dev.745e02b",
4
+ "version": "3.0.8-dev.e5806ef",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -9,7 +9,7 @@ export class CommandCheckFailed extends Error {
9
9
  }
10
10
 
11
11
  export class SlashCommandCheckFailed extends Error {
12
- constructor(public msg: CommandInteraction, public command: SlashCommand) {
12
+ constructor(public interaction: CommandInteraction, public command: SlashCommand) {
13
13
  super()
14
14
  }
15
15
  }
@@ -74,6 +74,11 @@ export class CommandClient {
74
74
  },
75
75
  options,
76
76
  )
77
+
78
+ if (this.options.owners !== 'auto') {
79
+ this.owners = this.options.owners
80
+ }
81
+
77
82
  this.client.once('ready', () => this.ready())
78
83
  this.registry.registerModule(new CommandHandler(this.registry))
79
84
  this.registry.registerModule(new BuiltinCommandConverters(this))
@@ -8,7 +8,7 @@ export class Dev extends BuiltInModule {
8
8
  }
9
9
 
10
10
  @listener('slashCommandError')
11
- async slashError(e: Error, i: CommandInteraction) {
11
+ slashError(e: Error, i: CommandInteraction) {
12
12
  if (e instanceof SlashCommandCheckFailed) {
13
13
  return i.reply({
14
14
  content: 'Command before-run check failed',