Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Dec 16, 2020
1 parent 8e9eda7 commit 199b64f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run linter
name: ESLint
on:
push:
branches:
Expand Down
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ 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.0.0] - 2020-12-16
### Removed:
- **[BREAKING]** `Context.initialResponseDeleted`
- **[BREAKING]** `treq` parameter from `SlashCreator#ping` event - The event no longer emits any parameters
### Changed:
- **[BREAKING]** `treq` parameter in `SlashCreator#unknownInteraction` event is now `interaction`
### Added:
- More documentation
- `Context.edit(messageID, content, options)`
- `Context.editOriginal(messageID, content, options)`
- `Context.expired` and internal handlers using this
- `Context.sendFollowUp(content, options)`
- `Message` and `User` class
- `GatewayServer` - Support for gateway events
- `SlashCreatorAPI.interactionCallback(id, token, body)`
- `Server.isWebserver`
- `Server.handleInteraction()`
### Fixed:
- Default error messages
- Exports for Constants and CommandOptionType
## [0.2.0] - 2020-12-16
### Removed:
- **[BREAKING]** `Context.acknowledge` now returns a promise
Expand All @@ -13,12 +33,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Errors will be thrown if a Server without its installed package is instantiated
### Fixed:
- RespondFunction is now a promise
- Context.send erroring
- `Context.send` erroring
- Added/Updated debug emit lines
- ExpressServer for TypeScript
## [0.1.0] - 2020-12-15
- Initial release.

[Unreleased]: https://github.com/Snazzah/slash-create/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/Snazzah/slash-create/compare/v1.0.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
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<div align="center">

# /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).

You can create commands similar to Discord.JS [Commando](https://github.com/discordjs/Commando).

> This package is indev and may not work properly.

</div>

Expand Down Expand Up @@ -84,6 +85,26 @@ creator
})
)
);

client.login('BOT_TOKEN_HERE');
```

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

module.exports = class HelloCommand extends Command {
constructor(creator) {
super(creator, {
name: 'hello',
description: 'Says hello to you.'
});
}

async run(ctx) {
return `Hello, ${ctx.member.displayName}!`;
}
}
```

##### Resources & References
Expand Down
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": "0.2.0",
"version": "1.0.0",
"description": "Creator and handler for Discord's slash commands",
"main": "./lib/index",
"author": "Snazzah",
Expand Down
2 changes: 2 additions & 0 deletions scripts/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ arr[1] =
## [${currentVersion}] - ${new Date().toISOString().slice(0, 10)}
### Removed:
- **[BREAKING]** description
### Changed:
-
### Added:
-
### Fixed:
Expand Down

0 comments on commit 199b64f

Please sign in to comment.