discord-rich-presence-typescript
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

Discord server NPM version NPM downloads Dependencies

NPM info

Discord Rich Presence Typescript

this is an fork from devsnek/discord-rich-presence just with typescript support

A simple wrapper around discord-rpc

Example

const client = require("discord-rich-presence-typescript")(
	"180984871685062656"
);

client.updatePresence({
	state: "slithering",
	details: "🐍",
	startTimestamp: Date.now(),
	endTimestamp: Date.now() + 1337,
	largeImageKey: "snek_large",
	smallImageKey: "snek_small",
	instance: true,
});

In browser you can import/require it as discord-rich-presence-typescript/browser. However, it should be noted that currently using rich presence in browser is a feature whitelisted by Discord, and you will most likely be unable to use it.

Package Sidebar

Install

npm i discord-rich-presence-typescript

Weekly Downloads

645

Version

0.0.8

License

MIT

Unpacked Size

36.9 kB

Total Files

9

Last publish

Collaborators

  • devsamuelv