0.2.5 • Published 4 years ago
fivecord v0.2.5
FiveCord
A Discord API Wrapper That Works For FXServer
NOTE: this is in very early beta and isn't ready for use on release server yet! For support please join the discord server :D
Docs: FiveCord Docs
Prerequisites
The prerequisites for FiveCord are:
This is recomended for use with FXServer primerally FiveM which can be got from there docs. You can then make a JS resource as show on there scripting manual
Installing
You can install FiveCord from npm with the following command:
npm i fivecord
Example
Here is a basic example:
import { Client, StatusType, DiscordToken, PresenceType, Snowflake } from 'fivecord'
const client = new Client(new DiscordToken("TOKEN"))
client.onReady(async (e) => {
console.log(`Online as ${e.user.username}#${e.user.tag}`)
client.setStatus("Fivecord!", StatusType.DND, PresenceType.PLAYING)
});
client.onMessage(async (e) => {
console.log(`New Message: ${e.message.content} | With the id ${e.message.id.id}`)
e.reply(`Hey, I'm Fivecord!`)
});
client.login()