open-assistant.js
v1.0.5-alpha.0
Published
A package for interact with the open-assisntat.io API
Downloads
8
Maintainers
Readme
open-assistant.js
A package for interact with the open-assisntat.io API
Installation
npm i open-assistant.js
pnpm add open-assistant.js
yarn add open-assistant.js
Basic Usage
You can check the auto generated docs for more information.
Init client
import OpenAssistant from 'open-assistant.js';
const OAclient = new OpenAssistant(process.env.APIKEY, process.env.APIURL); // create the open assistant client
const user = {
id: '530102778408861706',
display_name: 'MrlolDev',
auth_method: 'discord',
}; // user object example
const lang = 'en';
Tasks
Get availability
(async () => {
let availability = await OAclient.getAvailability(user, lang);
console.log(availability);
})();
Get Task
Accept task
Reject task
Solve task
Get leaderboard
Get trollboard
To do
- [x] Get a task
- [x] Get task availability
- [x] Reject tasks
- [x] Accept tasks
- [x] Solve tasks
- [x] Get leaderboard
- [ ] Trollboards
- [ ] Close tasks
- [ ] Messages endpoints
- [ ] Users endpoints
- [ ] Stats endpoints
- [ ] Admin endpoints