mirror of
https://github.com/sern-handler/website
synced 2026-06-06 01:16:47 +00:00
fixed double quotes issue
This commit is contained in:
@@ -12,6 +12,7 @@ custom_edit_url: null
|
||||
<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://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blavk.svg" alt="MIT License" /></a>
|
||||
|
||||
|
||||
A customizable, batteries-included, powerful discord.js framework to automate and streamline your bot development.
|
||||
|
||||
## Installation
|
||||
@@ -33,22 +34,22 @@ pnpm add @sern/handler
|
||||
#### ` index.js (CommonJS)`
|
||||
|
||||
```js
|
||||
const { Client, GatewayIntentBits } = require("discord.js");
|
||||
const { Sern } = require("@sern/handler");
|
||||
const { defaultPrefix, token } = require("./config.json");
|
||||
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,
|
||||
],
|
||||
GatewayIntentBits.GuildMessages
|
||||
]
|
||||
});
|
||||
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix,
|
||||
commands: "src/commands",
|
||||
client,
|
||||
defaultPrefix,
|
||||
commands : 'src/commands',
|
||||
});
|
||||
|
||||
client.login(token);
|
||||
@@ -57,15 +58,15 @@ client.login(token);
|
||||
#### ` ping.js (CommonJS)`
|
||||
|
||||
```js
|
||||
const { Sern, CommandType } = require("@sern/handler");
|
||||
const { Sern, CommandType } = require('@sern/handler');
|
||||
|
||||
exports.default = {
|
||||
description: "A ping pong command",
|
||||
type: CommandType.Slash,
|
||||
execute(ctx) {
|
||||
ctx.reply("pong!");
|
||||
},
|
||||
};
|
||||
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
|
||||
@@ -87,4 +88,4 @@ It is **highly encouraged** to use the [command line interface](https://github.c
|
||||
|
||||
## 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.
|
||||
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