Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Latest commit

 

History

History
42 lines (31 loc) · 813 Bytes

README.md

File metadata and controls

42 lines (31 loc) · 813 Bytes

roleplaybotSDK

A type-safe Javascript SDK for the RoleplayBot API

Example Usage

ESM

import { RoleplayBotSDK } from 'roleplaybot-sdk';

const auth = {
  authKey: 'your api auth key',
  guildId: 'your guild id'
};

const client = new RoleplayBotSDK(auth);

//Get the current API version
const version = await client.getAPIVersion();

//Get all civilians in the guild
const civilians = await client.getAllCivilians();

CJS

const { RoleplayBotSDK } = require('roleplaybot-sdk');

const auth = {
  authKey: 'your api auth key',
  guildId: 'your guild id'
};

const client = new RoleplayBotSDK(auth);

(async () => {
  //Get the current API version
  const version = await client.getAPIVersion();

  //Get all civilians in the guild
  const civilians = await client.getAllCivilians();
})();