1.1.0 • Published 2 years ago

riche v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

About

riche /ʀiʃ/ (fr. rich) is a powerful Node.js module that allows you to interact with Discord Rich Presence.

  • :hammer_and_wrench: Made with TypeScript
  • :comet: Object-oriented
  • :package: No dependencies
  • :fire: Fast and secure

Installation

Use your favourite package manager to install riche:

# npm
npm install riche

# yarn
yarn add riche

# pnpm
pnpm add riche

Example usage

To use Rich Presence Discord requires for you to create a new Discord application. After that navigate to OAuth2 tab and copy Client ID. Alternatively, you can use riche's internal id for testing: 1006301974075035679.

const riche = require('riche');

const activity = {
  state: 'Signed in',
  details: 'Using Discord',
  timestamps: {
    start: Date.now(),
  },
  assets: {
    large_image: 'https://discord.com/assets/9f6f9cd156ce35e2d94c0e62e3eff462.png',
    large_text: 'Discord',
  },
};

const client = riche.create('your-client-id');

client.connect()
  .then(() => client.setActivity(activity))
  .then(() => console.log('Activity has been set! Check your Discord profile'));

See more examples here.

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago