Socket
Socket
Sign inDemoInstall

@koemi.moe!/revolt.js

Package Overview
Dependencies
13
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @koemi.moe!/revolt.js

**revolt.js** is a direct implementation of the entire Revolt API and provides a way to authenticate and start communicating with Revolt servers.


Version published
Maintainers
1
Created

Readme

Source

This is a fork of revolt.js which is used on koemi.moe

revolt.js is a direct implementation of the entire Revolt API and provides a way to authenticate and start communicating with Revolt servers.

Example Usage

let client = new Client();

client.on('ready', async () =>
    console.info(`Logged in as ${client.user!.username}!`)
);

client.on('message', async message => {
    if (message.content === 'sus') {
        message.channel!.sendMessage('sus!');
    }
});

// To login as a bot:
client.loginBot('..');

// To login as a user,
// either create a new session:
client.login({ email: '..', password: '..' });

// Or use an existing session:
client.useExistingSession({ token: '..' });

MobX

MobX is used behind the scenes so you can subscribe to any change as you normally would, e.g. with mobx-react(-lite) or mobx's utility functions.

import { autorun } from 'mobx';

[..]

client.once('ready', () => {
    autorun(() => {
        console.log(`Current username is ${client.user!.username}!`);
    });
});

FAQs

Last updated on 26 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc