flarumbots.js

0.0.2 • Public • Published

Flarum.js

Please read the disclaimer in the bottom of the readme!

Install: npm i flarumbots.js

How to create your first bot:

const flarum = require('flarumbots.js'); // import package
const Flarum = new flarum('https://discuss.flarum.org', false); // DO NOT PUT A '/' AT THE END OF THE URL!

// Make an Async function that runs automaticly
(async ()=>{
    const FlarumLogin = await Flarum.login('email/username', 'pass'); // Username/email password
    console.log(FlarumLogin);

    const posts = await Flarum.getLatestPosts();
    console.log(posts)

    const me = await Flarum.getUser('me'); // me = userid ('me' IS supported!!!!)
    console.log(me)
})()

Functions

getForumData() This requires no arguments, this gets all json from the forum itself.

getLatestPosts(mine) This has one argument of bool, this will get your/all latests posts.

getUser(id) This will get the selected user with that id.

getUsers() This needs no arguments, but you do need permissions!

login(identification, password) Log your bot in to initialize.

DISCLAIMER:

We are not affiliated to Flarum.org at all, all copyright belongs to the rightfull owner! We are not responsible for any damage done by this package, this is made to improve a flarum expierence!

Readme

Keywords

Package Sidebar

Install

npm i flarumbots.js

Weekly Downloads

3

Version

0.0.2

License

ISC

Unpacked Size

9.91 kB

Total Files

7

Last publish

Collaborators

  • dxy_seer