Skip to main content
Deno 2 is finally here 🎉️
Learn more

Revolt.io NPM version

Overview

A JS/TS library to interact with Revolt API

Features

  • Built with TypeScript
  • Object-oriented
  • Lightweight
  • Voice Support (work in progress..)
  • Deno Support

Installation (NodeJS Only)

Node.js v16.x or newer is required.

$ npm i revolt.io

Usage

import { Client } from 'revolt.io'

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

const client = new Client()

// Login with bot account
client.login('revolt-token-here')

// Self bot
// client.login('revolt-token-here', 'user')

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

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

License

Refer to the LICENSE file.