fivecord

A Discord Api Wrapper That Works For FXServer


Keywords
discord, api, bot, client, fivem, discordapp, fxserver, discord-api-wrapper, discord-bot, javascript, typescript
License
Apache-2.0
Install
npm install fivecord@0.2.4

Documentation

DinoCord

A Discord API Wrapper For Everyone 🦕


https://nodei.co/npm/dinocord.png?downloads=true&downloadRank=true&stars=true

Discord


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: DinoCord Docs The Docs are for the old <v0.1.* New docs are being made to be compatible with the new re-written version of DinoCord


Prerequisites

The prerequisites for DinoCord 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 DinoCord from npm with the following command:

npm i DinoCord
yarn add dinocord

Example

Here is a basic example:

import { Client, StatusType, PresenceType } from 'dinocord'

const client : Client = new Client("TOKEN", {
    debug: false,
    prefix: "!",
    commandHandlerOptions: {
        allowBotsTriggerCommands: false
    }
});

client.onReady(async () => {
    console.log(`Bot is Online!`)
    client.setStatus("DinoCord!", StatusType.DND, PresenceType.PLAYING)
});

client.onMessage(async (e : Message) => {
    console.log(`New Message: ${e.content} | With the id ${e.snowflake}`)
    await e.reply(`Hey, I'm DinoCord!`)
});

client.registerCommand("ping", async (message : Message, args : string[]) => {
  await message.reply("pong!");
});

client.Login();