Skip to content

revolt-io/revolt.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.