Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
closes #4
  • Loading branch information
Snazzah committed Dec 19, 2020
1 parent db0c2f9 commit 910d44c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.2.0] - 2020-12-19
### Changed:
- `ctx.options` are a bit more consistent with sub-commands. Check the [last heading in the documetation](https://slash-create.js.org/#/docs/main/v1.2.0/general/context-options) for an example.
### Added:
- Support for registering/unregistering commands
- New `SlashCreator` event: `commandUnregister`
- New `SlashCreator` event: `commandReregister`
- `SlashCreator.reregisterCommand(command, oldCommand)`
- `SlashCreator.unregisterCommand(command)`
- `SlashCommand.reload()`
- `SlashCommand.unload()`
- Unknown Commands
- [Support for Google Cloud Functions](https://slash-create.js.org/#/docs/main/v1.2.0/examples/gcf). (`GCFServer`)
### Fixed:
- Some documentation
- Command finalization
- Command throttling
- Command options validation
## [1.1.6] - 2020-12-18
### Fixed:
- Sending options as the first argument in `Context#send` & `Context#sendFollowUp`
Expand Down Expand Up @@ -89,7 +107,7 @@ This release features mostly completed documentation and changes to the packages
## [0.1.0] - 2020-12-15
- Initial release.

[Unreleased]: https://github.com/Snazzah/slash-create/compare/v1.1.6...HEAD
[Unreleased]: https://github.com/Snazzah/slash-create/compare/v1.2.0...HEAD
[0.1.0]: https://github.com/Snazzah/slash-create/releases/tag/v0.1.0
[0.2.0]: https://github.com/Snazzah/slash-create/compare/v0.1.0...v0.2.0
[1.0.0]: https://github.com/Snazzah/slash-create/compare/v0.2.0...v1.0.0
Expand All @@ -100,3 +118,4 @@ This release features mostly completed documentation and changes to the packages
[1.1.4]: https://github.com/Snazzah/slash-create/compare/v1.1.3...v1.1.4
[1.1.5]: https://github.com/Snazzah/slash-create/compare/v1.1.4...v1.1.5
[1.1.6]: https://github.com/Snazzah/slash-create/compare/v1.1.5...v1.1.6
[1.2.0]: https://github.com/Snazzah/slash-create/compare/v1.1.6...v1.2.0
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ yarn add slash-create
In order to use a specific webserver, you will need to install the dependency associated with that server. The following server types require these dependencies:
- `ExpressServer`: `express`
- `FastifyServer`: `fastify`
- `GatewayServer`: none, see [example](#using-a-discord-bot-with-create)
- `GatewayServer`: none, see [example](https://slash-create.js.org/#/docs/main/latest/examples/discord-bot)
- `GCFServer`: none technically, meant for use with [`@google-cloud/functions-framework`](https://npm.im/@google-cloud/functions-framework), see [example](https://slash-create.js.org/#/docs/main/latest/examples/gcf)

## Example

Expand Down
11 changes: 11 additions & 0 deletions docs/examples/gcf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Before using the server, check out [how to use the functions module](https://www.npmjs.com/package/@google-cloud/functions-framework).

```js
const { GCFServer } = require('slash-create');

creator
// The first argument is required, but rhe second argument is the "target" or the name of the export.
// By default, the target is "interactions".
.withServer(new GCFServer(module.exports))
.registerCommandsIn(path.join(__dirname, 'commands'));
```
2 changes: 2 additions & 0 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
path: discord-bot.md
- name: Example Command
path: command.js
- name: Google Cloud Functions
path: gcf.md
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slash-create",
"version": "1.1.6",
"version": "1.2.0",
"description": "Creator and handler for Discord's slash commands",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down

0 comments on commit 910d44c

Please sign in to comment.