use-lanyard-react
v1.0.0
Published
A React Hook for Lanyard. An API that exposes your Discord & Spotify presence to the web!
Downloads
4
Readme
use-lanyard
A React Hook for Lanyard. An API that exposes your Discord & Spotify presence to the web!
Install
npm install --save use-lanyard
Usage
import * as React from 'react'
import { useLanyard } from 'use-lanyard'
const Example = () => {
const state = useLanyard('DISCORD_ID')
return (
<div>
{state.listening_to_spotify ? `Wohoo! I'm listening to Spotify right now.` : `I'm not listening to anything right now :(`}
</div>
)
}
License
MIT © 220ish