# rojava

> Roblox library that makes heavy use of promises

Latest version **0.1.2** (published 2018-05-29) · None license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rojava
pnpm add rojava
yarn add rojava
bun add rojava
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-05-29 |
| First published | 2018-05-28 |
| Weekly downloads | 0 |
| License | None |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | javascript-csharp - npm, The Reverse Flash#6087 - discord |
| Maintainers | javascript-csharp |
| Keywords | roblox, api, library |

## Links

- npm: https://www.npmjs.com/package/rojava
- npm.io page: https://npm.io/package/rojava

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.87.0

## Recent versions

- 0.1.2 (latest) — 2018-05-29
- 0.1.1 — 2018-05-28
- 0.1.0 — 2018-05-28
- 0.0.9 — 2018-05-28
- 0.0.8 — 2018-05-28
- 0.0.7 — 2018-05-28
- 0.0.6 — 2018-05-28
- 0.0.5 — 2018-05-28

## README

All examples assume the module is defined as "roblox"

**Many of these functions return a promise!**

`const varnamehere = require("rojava")`

----

Documentation: 

*PostOnWall(GroupId, Message)*: 

Posts **Message** on the wall of the group with an id of **GroupId**

This will error if you have failed to login with a working account or the bot does not have permission to post on the wall of the group

Example:

```javascript

roblox.PostOnWall(8271827, "Hello Roblox, pls don't ban me :(")

```

*Login(Username, Password)*: 

Logs you in with **Username** and **Password**, This function is asynchronous so be sure to wait for the promise it returns to finish

Example:

```javascript

roblox.Login("BotAccount", "123456789").then((token) => {
   --Code
})

```

*GetUser(UserId)*: 
Gets a user object of **UserId** that can be used with *some* functions, **UserId** can be a number or string



Example:

```javascript

roblox.GetUser(1283127).then((User) => {
    --Code
})

```

*GetUserGroups(UserId)*:

Returns a list of groups **UserId** is in

Example:

```javascript

roblox.GetUserGroups(12312891).then((Groups) => {
   --Code
})

```

*SetRoleInGroup(User, GroupId, RoleName)*: 

**User is the object from GetUser, Not an id... Will fix this in the future**

Sets **User**'s role in **GroupId** to **RoleName**

Example: 

```javascript

roblox.SetRoleInGroup(UserObj, 326178, "Noobs")

```

Will error if bot is not logged in, or if it does not have permission to role the user 

*Switch(token)*:

Switches account that program is currently controlling, you can get a **token** from the **Login** function

Example: 

```javascript

roblox.Login(User, Pass).then((t) => {
    user1 = t

    roblox.Login(User, Pass).then((t2) => {
    user2 = t2

    --user2 stuff

    roblox.Switch(user1)

    --user1 stuff
    })

})

```

*GetPostsFromGroup(GroupId)*: 

Gets a small list of the most recent messages on **GroupId**'s wall

*DeletePost(GroupId, PostId)*: 

Deletes post **PostId** from the wall of **GroupId**

---
_Source: https://npm.io/package/rojava · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
