diff --git a/.gitignore b/.gitignore index f208b31..2f0476a 100644 --- a/.gitignore +++ b/.gitignore @@ -82,5 +82,8 @@ dist # VisualStudio Config file .vs +# VSCode settings and cache +.vscode + # IntelliJ IDEA Config file .idea/ diff --git a/README.md b/README.md index a118454..fbec6b5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ -# SernHandler +
+ +
-NPM version -NPM downloads -[![License: MIT](https://img.shields.io/badge/License-MIT-blavk.svg)](https://opensource.org/licenses/MIT) +

Handlers. Redefined.

+

A customizable, batteries-included, powerful discord.js framework to streamline bot development.

-A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development. +
+ + NPM version + NPM downloads + License MIT + docs.rs + Lines of code +
-## Installation +## 📜 Installation ```sh npm install @sern/handler @@ -21,13 +29,26 @@ yarn add @sern/handler pnpm add @sern/handler ``` -## Basic Usage +## 👀 Quick Look + +* Support for discord.js v14 and all interactions +* Hybrid commands +* lightweight and customizable +* ESM, CommonJS and TypeScript support +* A powerful cli and awesome community-made plugins + +## 👶 Basic Usage #### ` index.js (CommonJS)` ```js +// Import the discord.js Client and GatewayIntentBits const { Client, GatewayIntentBits } = require('discord.js'); + +// Import Sern namespace const { Sern } = require('@sern/handler'); + +// Our configuration file const { defaultPrefix, token } = require('./config.json'); const client = new Client({ @@ -39,9 +60,9 @@ const client = new Client({ }); Sern.init({ - client, - defaultPrefix, - commands : 'src/commands', + client, + defaultPrefix, + commands : 'src/commands', }); client.login(token); @@ -50,6 +71,17 @@ client.login(token); #### ` ping.js (CommonJS)` ```js +const { CommandType } = require('@sern/handler'); + +exports.default = commandModule({ + name: 'ping', + description: 'A ping pong command', + type: CommandType.Slash, + execute(ctx) { + ctx.reply('pong!'); + } +}); + const { Sern, CommandType } = require('@sern/handler'); exports.default = commandModule({ @@ -63,21 +95,21 @@ exports.default = commandModule({ See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more -## CLI +## 💻 CLI It is **highly encouraged** to use the [command line interface](https://github.com/sern-handler/cli) for your project. Don't forget to view it. -## Links +## 🔗 Links -- [Official Documentation](https://sern-handler.js.org) +- [Official Documentation and Guide](https://sern-handler.js.org) - [Support Server](https://discord.com/invite/mmyCTnYtbF) -## Contribute +## 👋 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 +## 🚈 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.