Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oceanicjs/oceanic
A NodeJS library for interfacing with Discord.
https://github.com/oceanicjs/oceanic
discord hacktoberfest javascript nodejs
Last synced: 5 days ago
JSON representation
A NodeJS library for interfacing with Discord.
- Host: GitHub
- URL: https://github.com/oceanicjs/oceanic
- Owner: OceanicJS
- License: mit
- Created: 2022-08-07T02:37:46.000Z (over 2 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-26T00:29:49.000Z (about 2 months ago)
- Last Synced: 2024-10-29T20:33:27.067Z (about 2 months ago)
- Topics: discord, hacktoberfest, javascript, nodejs
- Language: TypeScript
- Homepage: https://oceanic.ws
- Size: 12.9 MB
- Stars: 274
- Watchers: 2
- Forks: 25
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
```js
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](https://github.com/OceanicJS/Oceanic/tree/dev/examples) folder on GitHub.
## Installation
NodeJS **18.13.0** or higher is required.**See [Development Builds](#development-builds) if you wish to install in-dev versions.**
```sh
npm i oceanic.js --omit=optional
```If you need voice support, add `--include=optional`. Voice support is currently provided by [@discordjs/voice](https://discord.js.org/#/docs/voice/main/general/welcome).
See the [examples](https://github.com/OceanicJS/Oceanic/tree/dev/examples) folder on GitHub for some examples, and visit [this site](https://docs.oceanic.ws) for documentation.
### Development Builds
```sh
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
All compression options are mutually exclusive.
* `pako` - zlib Compression (gateway)
* `zlib-sync` - zlib Compression (gateway, faster than pako)
* `fzstd` - Zstandard Compression (gateway)
* `erlpack` - Encoding (gateway, alternative to JSON)## Links
* [Examples](https://github.com/OceanicJS/Oceanic/tree/dev/examples)
* [Latest Release Documentation](https://docs.oceanic.ws/latest)
* [Development Documentation](https://docs.oceanic.ws/dev)
* [Discord Server](https://discord.gg/xZ4AhdYrf9)
* [Source](https://github.com/OceanicJS/Oceanic)