0.0.4 • Published 1 year ago
nuwa.js v0.0.4
Nuwa.js
A versatile and efficient library for interacting Discord API with rich functionality with Js/Ts.
Installation
You can install Nuwa.js via npm:
$ npm i nuwa.js
Getting Started
To use Nuwa.js, you first need to create a new instance of the Client class. Here is an example:
import { Client, Activity, Intents } from "nuwa.js";
const bot = new Client("YOUR_DISCORD_BOT_TOKEN", {
intents: [Intents.Common], // Intents
// Optionally: Change the presence
presence: {
activities: [
{
name: "with Nuwa.js",
type: Activity.Playing, // returns 0
},
],
status: "online",
afk: false, // false by default
},
});
bot.connect();
Once you have created a new instance of the Client class and connected to the Discord API, you can start interacting with the API by listening to events emitted by the client.