Skip to content

Commit

Permalink
Merge pull request #48 from underctrl-io/remove-guildonly
Browse files Browse the repository at this point in the history
Remove `guildOnly` from docs examples
  • Loading branch information
notunderctrl committed Dec 29, 2023
2 parents 4ffa56f + b512cd9 commit 3e16686
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ All notable changes to this project will be documented in this file.
### Added

- `ValidationProps` type definition.

## [0.1.10 - dev] - 2023-12-29

### Removed

- `guildOnly` from docs examples. Closes [#42](https://github.com/underctrl-io/commandkit/issues/42)
- `guildOnly` deprecation warning.
6 changes: 0 additions & 6 deletions apps/docs/pages/guide/command-file-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Here's an example `/ping` slash command which replies with "Pong!"

options: {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand All @@ -44,7 +43,6 @@ Here's an example `/ping` slash command which replies with "Pong!"
export const options = {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand All @@ -66,7 +64,6 @@ Here's an example `/ping` slash command which replies with "Pong!"
export const options: CommandOptions = {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand Down Expand Up @@ -97,7 +94,6 @@ Here's an example `content` command which replies with the content of the target
options: {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand All @@ -120,7 +116,6 @@ Here's an example `content` command which replies with the content of the target
export const options = {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand All @@ -143,7 +138,6 @@ Here's an example `content` command which replies with the content of the target
export const options: CommandOptions = {
devOnly: true,
guildOnly: true,
userPermissions: ['Administrator', 'AddReactions'],
botPermissions: ['Administrator', 'AddReactions'],
deleted: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ export class CommandHandler {
commandObj.category = commandCategory;
}

if (commandObj.options?.guildOnly) {
console.log(
colors.yellow(
`ℹ️ Deprecation warning: The command "${commandObj.data.name}" uses "options.guildOnly", which will be deprecated soon. Use "data.dm_permission" instead.`,
),
);
}

this.#data.commands.push(commandObj);
}
}
Expand Down

0 comments on commit 3e16686

Please sign in to comment.