Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Dexare/Voltare

⚡ Modular and extendable Revolt bot framework.
https://github.com/Dexare/Voltare

Last synced: about 1 month ago
JSON representation

⚡ Modular and extendable Revolt bot framework.

Awesome Lists containing this project

README

        

# Voltare

[![NPM version](https://img.shields.io/npm/v/voltare?maxAge=3600?&color=2ed573)](https://www.npmjs.com/package/voltare) [![NPM downloads](https://img.shields.io/npm/dt/voltare?maxAge=3600&color=2ed573)](https://www.npmjs.com/package/voltare) [![ESLint status](https://github.com/Dexare/Voltare/workflows/ESLint/badge.svg)](https://github.com/Dexare/Voltare/actions?query=workflow%3A%22ESLint%22)

Voltare is a version of the [Dexare](https://github.com/Dexare/Dexare) framework for [Revolt](https://revolt.chat). Easily make modules that depend on others or overwrite their functions.

Per [revolt.js's README](https://github.com/revoltchat/revolt.js#example-usage-javascript--es6), you must use the `--experimental-specifier-resolution=node` when running scripts.
Example: `node --experimental-specifier-resolution=node index.js`

> Note: This is still in development. As [revolt.js](https://github.com/revoltchat/revolt.js) is still in beta, this framework may have some bugs.

Documentation is unavailable at the moment, but some of the core features of Voltare is taken from the [Documentation for Dexare](https://github.com/Dexare/Dexare/wiki).

### Client Example
```js
import { VoltareClient } from 'voltare';
import { fileURLToPath } from 'url';
import { join } from 'path';

const client = new VoltareClient({
login: {
type: 'bot',
// Your bot's token
token: ''
},
// A prefix to use, can be a string or an array of strings
prefix: '!',
// Whether to include a mention as a prefix, defaults to false
mentionPrefix: true,
// Enter your ID here, can be a string or an array of strings
elevated: '01FE...'
});

// This logs important Revolt events to the `logger` event.
client.logRevoltEvents();

// Logs things from the `logger` event to console in the debug level, can be ither `debug`, `info`, `warn` or `error`.
client.logToConsole('info');

// Registers all commands in a folder (don't use with ts-node)
await client.commands.registerFromFolder(join(fileURLToPath(import.meta.url), '..', 'commands'));
// You can register a single command with `client.commands.register(HelloCommand)`.

// Registers default commands listed below, you can pass an array of strings to select commands to register,
// 'eval', 'help', 'ping', 'exec', 'kill', 'load', 'unload', 'reload';
client.commands.registerDefaults();

// Connect!
client.connect();
```