discord-lanyard-awesome
v1.0.4
Published
Awesome & simple discord presence functions
Downloads
2
Readme
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:
Join
Lanyard Discord
Copy you Discord User ID to a
.env
fileGo to your project and run:
npm install discord-lanyard-awesome
Use the API like the next example:
import { fetchDiscordStatus } from "discord-lanyard-awesome"; fetchDiscordStatus(process.env.DISCORD_USER_ID).then((response) => { console.log(response); }); Result { status: 'online', avatar: 'https://cdn.discordapp.com/avatars/869736569051967578/89ba9c1383e3da8df7f387d9fa989f2f.webp?size=256', username: 'morellexf13', discriminator: '0716', activities: [] // Playing game or Spotify }