This package is part of SplitScript.js, the everything framework
It is used for building discord bots
$ npm i @splitscript.js/discord
This authenticates the discord APIs and listens for events from the gateway
import discord from '@splitscript.js/discord'
discord.listen('TOKEN', {
// Intents get calculated automatically
intents: ['guild_messages', 'message_content', 'other_intent']
})
You can also use .login
if you don't want to listen for events, but just want to use the apis
discord.login('TOKEN')
Most discord APIs should be supported. You can use them like this:
await discord.channels.list('A_GUILD_ID')
For a full list of APIs, go to the docs
by ultraviolet