mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
* style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit988d7fa6d2. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * chore: Updated Prettier formatter tab width * docs(readme): Improved Readme readability * docs(README): Fixed installation box * style(README.md): Improved readability * chore: Added CONTRIBUTING.md * docs(README.md): Removed old repo link and it's line * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Updated README example to djs v14 * docs: Formatted README examples * Update README.md * docs: Updated organization description * docs(README): Rename 'fixed' to 'patched' * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(PRETTIER): Re-updated the tab width * chore(SECURITY): Updated security.md file * docs(README): Improved readability * fix(README): Fixed typo * style: Updated license boilerplate * style(*): Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated license boilerplate * style: Updated License boilerplate * style: Updated License boilerplate * docs(README): Added stats * docs(README): Temporarily or permanently removed stats * refactor: DRY Principles * feat: finished interactionCreate.ts handling? (need test) * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * chore: Updated LICENSE boilerplate * style: Improved comments * style: Updated comments * fix: Non-exhaustiveness led to commands not registering readyEvent.ts * feat: Add DefinetlyDefined type, more todo statements * feat: Aliases optional * feat: Optional plugins to reduce bloat * feat: better looking typings for modules * refactor: Simplify sernModule handler signature * refactor: make ApplicationCommandOptions optional * refactor: make description optional * refactor: Bring CommandType and PluginType to top level * fix: Fix return type of sernModule * refactor: Why is that not assignable bruh * revert: Re-add plugins overload * fix(CODE_OF_CONDUCT): Removed unusual dot * Update package.json * fix: Resolve conflicts * fix: Resolve conflicts * feat: should be able to register other nodejs event emitters * fix: Standard for of does not resolve promises. Switched to for await * feat: Adding sern event listeners, overriding and typing methods * feat: Edited event names for more conciseness, finished basic event emitters * style: Run prettier * fix: didn't run prettier, now i am * fix: linting issue in markup.ts * fix: prettier wants lf line ending * fix: prettier changes again * feat: add .prettierignore and ignore README.md * feat: add externallyUsed.ts and support BothCommands again * feat: remove comments about prev commit * style: change prettier print width and reformat * feat: adding modal and autocomplete support * feat: Finishing up autocomplete, need to test * feat: Making name required in auto cmp interactions * feat: move name and description out of OptionsData[] * feat: finishing optionData for autocomplete changes, adding class for builder * feat: finishing autocomplete!! * refactor: Simplifying logic of message filter * feat: Adding docs to some data structures, moving to default from export files * refactor: cleaning up code, removing unuseds * feat: adding refactoring for repetitive event plugin processing * feat: adding better typings, refactoring * refactor: remove unnecessary nullish short circuit * refactor: remove unnecessary nullish short circuit * feat: add docs/ to npmignore * style: Formatted 17 files & changes messageHelper util * style: Formatted HTML and CSS files * Revert "style: Formatted 17 files & changes messageHelper util" This reverts commit988d7fa6d2. * style(style.css): Formatted main style file with tabwidth 2 * chore: Added docs maintainer * chore: Changed typedoc configration * chore(README.md): Removed coming soon from links * docs(readme): Improved Readme readability * chore: Added CONTRIBUTING.md * docs(README): Fixed installation box * style(README.md): Improved readability * docs(README.md): Removed old repo link and it's line * docs: Updated README example to djs v14 * docs(README): Updated Intents to djs v14 Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> * docs: Formatted README examples * Update README.md * chore: Updated LICENSE * chore: Updated LICNESE * chore: Changed license to MIT * Delete LICENSE.md * chore: Recreated LICENSE * chore: First License boilerplate preview * style(index.ts): Added a space * chore(index.ts): First license boilerplate preview * chore(SECURITY): Updated security.md file * style: Updated license boilerplate * docs(README): Added stats * chore: Updated CONTRIBUTING.md file * chore: Updated credits * chore(NPM): Prepared package.json for release * revert: Some changes * revert: Revert back to MIT LICENSE (#50) * fix(CODE_OF_CONDUCT): Removed unusual dot * fix: Resolve conflicts * fix: Resolve conflicts Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com> Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
84 lines
2.1 KiB
Markdown
84 lines
2.1 KiB
Markdown
# SernHandler
|
|
|
|
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/v/@sern/handler?maxAge=3600" alt="NPM version" /></a>
|
|
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/dt/@sern/handler?maxAge=3600" alt="NPM downloads" /></a>
|
|
[](https://opensource.org/licenses/MIT)
|
|
|
|
A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development.
|
|
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
npm install @sern/handler
|
|
```
|
|
|
|
```sh
|
|
yarn add @sern/handler
|
|
```
|
|
|
|
```sh
|
|
pnpm add @sern/handler
|
|
```
|
|
|
|
## Basic Usage
|
|
|
|
#### ` index.js (CommonJS)`
|
|
|
|
```js
|
|
const { Client, GatewayIntentBits } = require('discord.js');
|
|
const { Sern } = require('sern-handler');
|
|
const { defaultPrefix, token } = require('./config.json');
|
|
|
|
const client = new Client({
|
|
intents: [
|
|
GatewayIntentBits.Guilds,
|
|
GatewayIntentBits.GuildMembers,
|
|
GatewayIntentBits.GuildMessages
|
|
]
|
|
});
|
|
|
|
Sern.init({
|
|
client,
|
|
defaultPrefix,
|
|
commands : 'src/commands',
|
|
});
|
|
|
|
client.login(token);
|
|
```
|
|
|
|
#### ` ping.js (CommonJS)`
|
|
|
|
```js
|
|
const { Sern, CommandType } = require('@sern/handler');
|
|
|
|
exports.default = {
|
|
description: 'A ping pong command',
|
|
type: CommandType.Slash,
|
|
execute(ctx) {
|
|
ctx.reply('pong!');
|
|
}
|
|
};
|
|
```
|
|
|
|
See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more
|
|
|
|
## CLI
|
|
|
|
We are providing a [command line interface](https://github.com/sern-handler/cli) for better & easier bot developement. Don't forget to view it.
|
|
|
|
## Links
|
|
|
|
- [Official Documentation](https://sern-handler.js.org)
|
|
- [Support Server](https://discord.com/invite/Yvb7DnqjXX)
|
|
|
|
## Contribute
|
|
|
|
- Read our contribution [guidelines](https://github.com/sern-handler/handler) carefully
|
|
- Pull up on [issues](https://github.com/sern-handler/handler/issues) and report bugs
|
|
- All kinds of contributions are welcomed.
|
|
|
|
## Roadmap
|
|
|
|
You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future.
|