mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
feat(*): Revamp Docs (#47)
* 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>
This commit is contained in:
99
README.md
99
README.md
@@ -1,96 +1,83 @@
|
||||
# Sern Handler
|
||||
# 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> <a href="https://www.npmjs.com/package/sern-handler"><img src="https://img.shields.io/badge/builds-stable" alt="Builds Passing"></a>
|
||||
<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)
|
||||
|
||||
Sern can automate and streamline development of your discord bot with new version compatibility and full customization.
|
||||
A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development.
|
||||
|
||||
- A reincarnation of [this old project](https://github.com/jacoobes/sern_handler)
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install sern-handler
|
||||
npm install @sern/handler
|
||||
```
|
||||
|
||||
```sh
|
||||
yarn add sern-handler
|
||||
yarn add @sern/handler
|
||||
```
|
||||
|
||||
```sh
|
||||
pnpm add sern-handler
|
||||
pnpm add @sern/handler
|
||||
```
|
||||
|
||||
## Basic Usage
|
||||
|
||||
#### ` index.js `
|
||||
#### ` index.js (CommonJS)`
|
||||
|
||||
```js
|
||||
import { Client, Intents } from 'discord.js';
|
||||
import { Sern } from 'sern-handler';
|
||||
import { prefix, token } from '../src/secrets.json';
|
||||
const { Client, GatewayIntentBits } = require('discord.js');
|
||||
const { Sern } = require('sern-handler');
|
||||
const { defaultPrefix, token } = require('./config.json');
|
||||
|
||||
const client = new Client({
|
||||
intents: [
|
||||
Intents.FLAGS.GUILDS,
|
||||
Intents.FLAGS.GUILD_MESSAGES,
|
||||
Intents.FLAGS.GUILD_MEMBERS
|
||||
]
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.GuildMessages
|
||||
]
|
||||
});
|
||||
|
||||
new Sern.Handler({
|
||||
client,
|
||||
prefix,
|
||||
commands: 'dist/commands',
|
||||
privateServers: [
|
||||
{
|
||||
test: true,
|
||||
id: 'server-id'
|
||||
}
|
||||
],
|
||||
init: async (handler) => {
|
||||
// Optional function to initialize anything else on bot startup
|
||||
},
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix,
|
||||
commands : 'src/commands',
|
||||
});
|
||||
|
||||
|
||||
client.login(token);
|
||||
```
|
||||
|
||||
#### ` ping.js `
|
||||
#### ` ping.js (CommonJS)`
|
||||
|
||||
```js
|
||||
import { Sern, Types } from 'sern-handler';
|
||||
import { Ok } from 'ts-results';
|
||||
const { Sern, CommandType } = require('@sern/handler');
|
||||
|
||||
export default {
|
||||
alias: [],
|
||||
desc: 'A ping pong command',
|
||||
visibility: 'private',
|
||||
test: false,
|
||||
type: Sern.CommandType.SLASH | Sern.CommandType.TEXT,
|
||||
execute: async ({ message, interaction }, args) => 'pong!'
|
||||
};
|
||||
exports.default = {
|
||||
description: 'A ping pong command',
|
||||
type: CommandType.Slash,
|
||||
execute(ctx) {
|
||||
ctx.reply('pong!');
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
See [documentation](https://sern-handler.js.org) for TypeScript examples and more
|
||||
See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more
|
||||
|
||||
## Links 
|
||||
## CLI
|
||||
|
||||
- [Official Documentation](https://tmp.com)
|
||||
- [Example Bot](https://tmp.com)
|
||||
- [Discord Server](https://google.com)
|
||||
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
|
||||
|
||||
- Pull up on [issues](https://github.com/sern-handler/Sern/issues) and tell us, if there are bugs
|
||||
- All kinds of contributions are welcomed!
|
||||
- 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.
|
||||
|
||||
## TODO
|
||||
## Roadmap
|
||||
|
||||
- Default commands
|
||||
- Categories
|
||||
- Ruling out all bugs in the command system
|
||||
- Better support for slash commands
|
||||
- More Build scripts
|
||||
- Logger
|
||||
You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future.
|
||||
|
||||
Reference in New Issue
Block a user