JSPM

discord.js-selfbot-rpc

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38
  • Score
    100M100P100Q64066F
  • License Apache-2.0

A simple package to create a Discord Rich Presence for selfbot

Package Exports

  • discord.js-selfbot-rpc
  • discord.js-selfbot-rpc/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discord.js-selfbot-rpc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

discord.js-selfbot-rpc

A simple package to create a Discord Rich Presence for selfbot using discord.js-selfbot-v13 library

npm:discord.js-selfbot-rpc

Installation

npm install discord.js-selfbot-rpc

Example (Rich Presence)

Simple:

const { Client } = require('discord.js-selfbot-v13');
const client = new Client();

const { RichPresence } = require('discord.js-selfbot-rpc');

client.on('ready', () => {
    const presence = new RichPresence()
        .setStatus('dnd') // Must be one of (online, idle, dnd) default is online
        .setName('Discord')
        .setTimestamp();

    client.user.setPresence(presence.toData());
    console.log('Rich Presence has running...');

    console.log(`Login as ${client.user.tag}`);
});

client.login('token');

example-rpc:simple

With customization + image:

const { Client } = require('discord.js-selfbot-v13');
const client = new Client();

const { RichPresence, Util } = require('discord.js-selfbot-rpc');

client.on('ready', async() => { // Using async-await to perform util get application assets
    const applicationId = '984373297644961894'; // Your Application ID

    // This is example for get image assets data from application
    const chromeImage = await Util.getAssets(applicationId, 'chrome'); // Get image assets by name (chrome) from application assets
    const googleImage = await Util.getAssets(applicationId, 'google'); // Get image assets by name (google) from application assets

    const presence = new RichPresence()
        .setStatus('dnd') // Must be one of (online, idle, dnd) default is online
        .setType('PLAYING') // Must be one of (PLAYING, STREAMING, LISTENING, WATCHING) default is PLAYING
        .setApplicationId(applicationId)
        .setName('Chrome')
        .setDetails('View Homepage')
        .setState('Searching anime...')
        .setAssetsLargeImage(chromeImage.id)
        .setAssetsLargeText('Chrome')
        .setAssetsSmallImage(googleImage.id)
        .setAssetsSmallText('Google')
        .setTimestamp();

    client.user.setPresence(presence.toData());
    console.log('Rich Presence has running...');

    console.log(`Login as ${client.user.tag}`);
});

client.login('token');

example-rpc:chrome

Example (Custom Status)

Simple:

const { Client } = require('discord.js-selfbot-v13');
const client = new Client();

const { CustomStatus } = require('discord.js-selfbot-rpc');

client.on('ready', () => {
    const customStatus = new CustomStatus()
        .setStatus('dnd') // Must be one of (online, idle, dnd) default is online
        .setState('Powered by discord.js-selfbot-rpc');

    client.user.setPresence(customStatus.toData());
    console.log('Custom Status has running...');

    console.log(`Login as ${client.user.tag}`);
});

client.login('token');

example-cs:simple

With custom emoji:

Important! Using discord custom emoji only applies to nitro users!

const { Client } = require('discord.js-selfbot-v13');
const client = new Client();

const { CustomStatus } = require('discord.js-selfbot-rpc');

client.on('ready', () => {
    const customStatus = new CustomStatus()
        .setStatus('dnd') // Must be one of (online, idle, dnd) default is online
        .setState('Powered by discord.js-selfbot-rpc')
        .setEmoji('🔥');

    client.user.setPresence(customStatus.toData());
    console.log('Custom Status has running...');

    console.log(`Login as ${client.user.tag}`);
});

client.login('token');

example-cs:with_emoji

Example (Util)

Here are some examples of using Util from this package that you can use

const { Util } = require('discord.js-selfbot-rpc');
const applicationId = '984373297644961894'; // Your Application ID 

// Fetch available assets data from application
Util.fetchAssets(applicationId).then(result => {
    console.log(result); // JSON { data: Array, statusCode: Number }
})
.catch(console.error);

// Find image assets by name from application
Util.getAssets(applicationId, 'assets text name').then(result => 
    console.log(result); // return raw object, but undefined is result not available
})
.catch(console.error);