@dreamingkills/oceanic
TypeScript icon, indicating that this package has built-in type declarations

1.8.1 • Public • Published


const { Client } = require("oceanic.js");
const client = new Client({ auth: "Bot [TOKEN]" });

client.on("ready", async() => {
    console.log("Ready as", client.user.tag);
});

// if you do not add a listener for the error event, any errors will cause an UncaughtError to be thrown,
// and your process may be killed as a result.
client.on("error", (err) => {
    console.error("Something Broke!", err);
});

client.connect();

For more examples, see the examples folder on GitHub.


Installation

NodeJS 16.16.0 or higher is required.

See Development Builds if you wish to install in-dev versions.

npm i oceanic.js --omit=optional

If you need voice support, add --include=optional. Voice support is currently provided by @discordjs/voice.

See the examples folder on GitHub for some examples, and visit this site for documentation.

Development Builds

npm i oceanic.js@dev

The documentation under dev is always for the latest commit. If something isn't working that's in the documentation, you're likely looking at the wrong documentation.


Optional Dependencies

  • pako - Compression (gateway)
  • zlib-sync - Compression (gateway, faster than pako)
  • erlpack - Encoding (gateway, alternative to JSON)

Links

Package Sidebar

Install

npm i @dreamingkills/oceanic

Weekly Downloads

1

Version

1.8.1

License

MIT

Unpacked Size

2.17 MB

Total Files

203

Last publish

Collaborators

  • dreamingkills