Skip to content

Commit

Permalink
chore(docs): auto-update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Dec 17, 2020
1 parent 80e39bb commit 69a6487
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
24 changes: 23 additions & 1 deletion docs/general/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ 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.1.0] - 2020-12-17
This release features mostly completed documentation and changes to the packages typings. If you are using TypeScript for this package, consider this a **breaking change**.
### Changed:
- **[SEMI-BREAKING]** Index changes
- `Command` -> `SlashCommand`
- `Creator` -> `SlashCreator`
- `CommandContext` is aliased as `Context`
- `SlashCommand` is aliased as `Command`
- `SlashCreator` is aliased as `Creator`
- If you are using any of the changed classes for typings, you must use its class name.
- i.e. `{ Creator }` must be `{ SlashCreator }`
- (typings) Renamed `AllRequestData` to `AnyRequestData`
- (typings) Renamed `FastifyOpts` to `FastifyOptions`
- (typings) Renamed duplicate `LatencyRef` interface in SequentialBucket to `MinimalLatencyRef`
- (typings) Added CallbackFunction type for SequentialBucket
### Added:
- Fastify typings for `FastifyServer#createEndpoint`
### Fixed:
- Changed HTTP method in `SlashCommandAPI#updateCommand` from `PUT` to `PATCH`
- `User#flags` now actually uses `UserFlags`
- Renamed UserFlags class to the name "UserFlags"
## [1.0.0] - 2020-12-16
### Removed:
- **[BREAKING]** `Context.initialResponseDeleted`
Expand Down Expand Up @@ -39,7 +60,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.0] - 2020-12-15
- Initial release.

[Unreleased]: https://github.com/Snazzah/slash-create/compare/v1.0.0...HEAD
[Unreleased]: https://github.com/Snazzah/slash-create/compare/v1.1.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
[1.1.0]: https://github.com/Snazzah/slash-create/compare/v1.0.0...v1.1.0
14 changes: 8 additions & 6 deletions docs/general/welcome.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div align="center">

# /create
<img src="/static/textlogo.png" height="50">

[![NPM version](https://img.shields.io/npm/v/slash-create?maxAge=3600)](https://www.npmjs.com/package/slash-create) [![NPM downloads](https://img.shields.io/npm/dt/slash-create?maxAge=3600)](https://www.npmjs.com/package/slash-create) [![ESLint status](https://github.com/Snazzah/slash-create/workflows/ESLint/badge.svg)](https://github.com/Snazzah/slash-create/actions?query=workflow%3A%22ESLint%22) [![DeepScan grade](https://deepscan.io/api/teams/11596/projects/15103/branches/297399/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=11596&pid=15103&bid=297399)

Creator and handler for Discord's [slash commands](https://discord.com/developers/docs/interactions/slash-commands).
Expand All @@ -11,7 +12,8 @@ You can create commands similar to Discord.JS [Commando](https://github.com/disc
</div>

## Features
- Multiple server support (Express, Fastify, etc.)
- Multiple server support ([Express](http://expressjs.com/), [Fastify](https://fastify.io/), etc.)
- Hook into an existing Discord bot client
- Command syncing - Sync commands with your creator automatically.
- Load commands from a folder
- Command throttling/cooldowns
Expand All @@ -32,8 +34,8 @@ In order to use a specific webserver, you will need to install the dependency as

#### Creating a SlashCreator
```js
const { Creator } = require('slash-create');
const creator = new Creator({
const { SlashCreator } = require('slash-create');
const creator = new SlashCreator({
applicationID: '12345678901234567',
publicKey: 'CLIENT_PUBLIC_KEY',
token: 'BOT_TOKEN_HERE',
Expand Down Expand Up @@ -92,9 +94,9 @@ client.login('BOT_TOKEN_HERE');

#### Example Command
```js
const { Command } = require('slash-create');
const { SlashCommand } = require('slash-create');

module.exports = class HelloCommand extends Command {
module.exports = class HelloCommand extends SlashCommand {
constructor(creator) {
super(creator, {
name: 'hello',
Expand Down

0 comments on commit 69a6487

Please sign in to comment.