node-discord-presence

1.0.5 • Public • Published


🦀

Node Discord Presence


Simple Discord presence

Build status Version License Package Monthly Downloads Lanyard

This is a project for users that wants to use the Discord API to retrieve and display user information via the Lanyard API. The project is written in Node.js and includes all the necessary code to quickly get started with implementing the Lanyard API into your own site.


🌊 Getting Started

To get started with this project, follow these steps:

  1. Join Lanyard Discord

  2. Copy you Discord User ID to a .env file

  3. Go to your project and run:

    npm install node-discord-presence
    
  4. Use the API like the next example:

      import { fetchDiscordStatus } from "node-discord-presence";
    
      fetchDiscordStatus(process.env.DISCORD_USER_ID).then((response) => {
        console.log(response);
      });
    
    
      Result
      {
        status: 'online',
        avatar: 'some avatar url',
        username: 'morellexf13',
        discriminator: '0716',
        activities: [{
         'avatar': 'some avatar url',
         'details': 'Editing index.js',
         'name': 'Visual Studio Code'
        }] // Apps, Games & Spotify
    }

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Readme

Keywords

Package Sidebar

Install

npm i node-discord-presence

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

5.9 kB

Total Files

5

Last publish

Collaborators

  • morellexf26