diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c8a6c8..804d0705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 47b46ba2..22ebe308 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@
-# /create + + [![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). @@ -11,7 +12,8 @@ You can create commands similar to Discord.JS [Commando](https://github.com/disc
## 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 @@ -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', @@ -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', diff --git a/docs/examples/basic.js b/docs/examples/basic.js index f9c553af..3456782e 100644 --- a/docs/examples/basic.js +++ b/docs/examples/basic.js @@ -1,6 +1,6 @@ -const { Creator } = require('slash-create'); +const { SlashCreator } = require('slash-create'); const path = require('path'); -const creator = new Creator({ +const creator = new SlashCreator({ applicationID: '12345678901234567', publicKey: 'CLIENT_PUBLIC_KEY', token: 'BOT_TOKEN_HERE', diff --git a/docs/examples/command.js b/docs/examples/command.js index f88dc7aa..62652a7b 100644 --- a/docs/examples/command.js +++ b/docs/examples/command.js @@ -1,6 +1,6 @@ -const { Command, CommandOptionType } = require('slash-create'); +const { SlashCommand, CommandOptionType } = require('slash-create'); -module.exports = class HelloCommand extends Command { +module.exports = class HelloCommand extends SlashCommand { constructor(creator) { super(creator, { name: 'hello', diff --git a/docs/examples/discord-bot.md b/docs/examples/discord-bot.md index 4635ae25..9936dab6 100644 --- a/docs/examples/discord-bot.md +++ b/docs/examples/discord-bot.md @@ -1,10 +1,10 @@ ### With [discord.js](https://github.com/discordjs/discord.js) ```js -const { Creator, GatewayServer } = require('slash-create'); +const { SlashCreator, GatewayServer } = require('slash-create'); const Discord = require('discord.js'); const client = new Discord.Client(); const path = require('path'); -const creator = new Creator({ +const creator = new SlashCreator({ applicationID: '12345678901234567', publicKey: 'CLIENT_PUBLIC_KEY', token: 'BOT_TOKEN_HERE', @@ -25,11 +25,11 @@ client.login('BOT_TOKEN_HERE'); ``` ### With [eris](https://github.com/abalabahaha/eris) ```js -const { Creator, GatewayServer } = require('slash-create'); +const { SlashCreator, GatewayServer } = require('slash-create'); const Eris = require('eris'); const client = new Eris('BOT_TOKEN_HERE'); const path = require('path'); -const creator = new Creator({ +const creator = new SlashCreator({ applicationID: '12345678901234567', publicKey: 'CLIENT_PUBLIC_KEY', token: 'BOT_TOKEN_HERE', diff --git a/package.json b/package.json index 7eb217b6..0b0b8cf5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slash-create", - "version": "1.0.0", + "version": "1.1.0", "description": "Creator and handler for Discord's slash commands", "main": "./lib/index", "author": "Snazzah", diff --git a/static/textlogo.png b/static/textlogo.png new file mode 100644 index 00000000..a1ab9f3a Binary files /dev/null and b/static/textlogo.png differ