A powerful and feature-rich discord library.
npm install neocord---
> NeoCord is currently in alpha, meaning it will probably be broken and might not work.
If you want to contribute, please join our support server - It would be greatly appreciated.
###### Table of Contents
- about
- installation
- optional packages
- basic usage
Neocord is a powerful and feature-rich discord library.
- Flexible: Gives you the ability to extend specific structures, customize caching to your needs.
- Coverage: Covers the Discord Gateway, API, CDN, and in the near future, Voice.
- Caching: Boasts the most powerful and flexible caching solution across most discord libraries.
As of 09/04/2020 (month/day/year), NeoCord can only be used with node.js v12 and up.
``shell script`
yarn add neocord
##### Optional Packages
These are some optional packages you can install.
- Install zlib-sync or pako for data compression and inflation
> - zlib-sync
> - pako
> - or the native zlib module (no installation)
- erlpack for significantly faster websocket (de)serialization.
- bufferutil for a much faster websocket connection.
> And utf-8-validate for faster websocket processing.
##### Basic Usage
(typescript) `ts
import { Client } from "neocord";
const client = new Client();
client
.on("ready", () => console.log("Now ready!"))
.on("messageCreate", (message) => {
if (message.author.bot) return;
const mentionPrefix = new RegExp(^<@!${client.user.id}>\s*);
let prefix;
if (message.content.startsWith("!")) prefix = "!"
else {
const mentioned = mentionPrefix.exec(message.content);
if (!mentioned) return;
prefix = mentioned[0];
}
const [cmd] = message.content.slice(prefix.length).split(/ /g);
if (cmd.toLowerCase() === "ping") {
message.channel.send("Pong!");
}
return;
});
client.connect("your token here");
``
- Support Server: discord.gg/5WD9KhF
- Github:
- NPM:
---
melike2d © 2020