discord-widget
v0.1.1
Published
Discord widgets lib, simple but comfortable
Downloads
81
Readme
Installation
$ npm i discord-widget
$ yarn add discord-widget
Methods
| Methods | Description |
| ------------------ | ------------------------------------------------------- |
| getAllInfo
| returns all info that can provide discord widget |
| getOnlineMembers
| returns objects of members that is online at the moment |
| getInvite
| returns invite of server |
| getIframe
| returns the iframe of widget for your web |
Code example (node.js):
const { Widget } = require('discord-widget')
const serverWidget = new Widget('your id here')
serverWidget.getAllInfo().then((res) => {
console.log(res)
})
Code example (typescript):
import { Widget } from 'discord-widget'
const serverWidget = new Widget('your id here')
serverWidget.getAllInfo().then((res) => {
console.log(res)
})