Skip to main content
Version: 1.4.1

ruvyrias

Installation

// Just import the class from Ruvyrias
const { Spotify } = require('ruvyrias');

Example usage basic bot

const { Client, GatewayIntentBits } = require('discord.js');
const { Spotify } = require('ruvyrias');

const spotify = new Spotify({
clientID: 'client-id-here',
clientSecret: 'client-secret-here',
});

const RuvyriasOptions = {
library: 'discord.js',
defaultPlatform: 'spsearch',
plugins: [spotify],
};

const nodes = [
{
name: 'local-node',
host: 'localhost',
port: 2333,
password: 'youshallnotpass',
},
];

// The entire code of a bot can be found at the main page, i'll not repeat all things here
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.MessageContent,
],
});

client.ruvyrias = new Ruvyrias(client, nodes, RuvyriasOptions);

/**
* You can use the source property to search by name or it will use the defaultPlatform to search by name
* Links will work directly, and it serves to any platform, but plugins has to be loaded before (unless you have lavaSrc)
*/
const res = await client.ruvyrias.resolve({ query: 'alan walker alone', source: 'spsearch', requester: message.author });

ruvyrias / Spotify

Class: Spotify

Defined in: plugins/spotify/Spotify.ts:249

Represents the Spotify class, extending the base Plugin class.

Extends

Constructors

Constructor

new Spotify(options): Spotify

Defined in: plugins/spotify/Spotify.ts:256

Parameters

options

Omit<SpotifyOptions, "authorization" | "interval" | "token">

Returns

Spotify

Overrides

Plugin.constructor

Properties

name

readonly name: string

Defined in: src/Plugin.ts:8

The name of the plugin.

Inherited from

Plugin.name


options

options: SpotifyOptions

Defined in: plugins/spotify/Spotify.ts:252


ruvyrias

ruvyrias: Ruvyrias

Defined in: plugins/spotify/Spotify.ts:251


spotifyManager

spotifyManager: SpotifyManager

Defined in: plugins/spotify/Spotify.ts:254

Methods

load()

load(ruvyrias): Promise<void>

Defined in: plugins/spotify/Spotify.ts:275

Loads the Spotify plugin into the Ruvyrias instance.

Parameters

ruvyrias

Ruvyrias

The Ruvyrias instance.

Returns

Promise<void>

Overrides

Plugin.load