revolt.io
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Revolt.io NPM version

Overview

A JS/TS library to interacting with Revolt API

Features

  • Follow discord.js philosophy
  • Works on both nodejs and deno
  • Lightweight
  • Voice Support (work in progress..)

Revolt.io vs Revolt.js

Type Revolt.io Revolt.js winner
Performance unknown unknown missing benchmark
Size 286KB 470KB Revolt.io
Packages 3 12 Revolt.io
Deno Support Yes No Revolt.io
Browser Support No Yes Revolt.js
JS Guidelines Follow doesn't care Revolt.io

Installation (NodeJS Only)

Node.js v16.x or newer is required.

$ npm i revolt.io

Example Usage

// for Deno runtime use this
// import { Client } from 'https://deno.land/x/revoltio/mod.ts'
import { Client } from 'revolt.io'

const client = new Client()

client.on('ready', () => {
    console.log('Connected')
    console.log(client.user.username)
})

client.on('message', msg => {
    if (msg.content === '!ping') {
        msg.reply('Pong!')
    }
})

// Connect to Revolt API
client.login('revolt-token-here')

// for user accounts add this extra parameter
// client.login('revolt-token-here', 'user')

Links

License

Refer to the LICENSE file.

Package Sidebar

Install

npm i revolt.io

Weekly Downloads

2

Version

1.0.0

License

Apache-2

Unpacked Size

288 kB

Total Files

156

Last publish

Collaborators

  • themaestroo