Skip to content

Commit

Permalink
Added README
Browse files Browse the repository at this point in the history
  • Loading branch information
DARKPOISON-yt committed Nov 26, 2022
1 parent 3094326 commit 1d58a69
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 3 deletions.
110 changes: 108 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,108 @@
# 🔎 truthordare.js
💫 Scrapper for Truth or Dare API
<div align="center">
<br />
<p>
<a href="https://www.npmjs.com/package/truthordare.js"><img src="https://i.imgur.com/hmnJFmO.png" width="600" alt="truthordare.js" /></a>
</p>
<br />
</div>

# 📝 Info

`truthordare.js` is a [Node.js](https://nodejs.org) module that enables us to fetch data from the [Truth or Dare API](https://docs.truthordarebot.xyz/api-docs)

# ⬇️ Installation

```sh-session
npm i truthordare.js
```

# 🔃 Usage

```js
const tord = require("truthordare.js");
```

## ✅ Commands

> You can use the following Funtions :- Truth() | Dare() | Paranomia() | Wyr() | Nhie()
### 👼 **Truth**

```js
const tord = require("truthordare.js");

async function truth_function() {
(async () => {
truth = await tord.Truth();
console.log(truth);
})();
}

truth_function();
```

### 😈 **Dare**

```js
const tord = require("truthordare.js");

async function dare_function() {
(async () => {
dare = await tord.Dare();
console.log(dare);
})();
}

dare_function();
```

### 🔎 **Never Have I Ever**

```js
const tord = require("truthordare.js");

async function nhie_function() {
(async () => {
nhie = await tord.Nhie();
console.log(nhie);
})();
}

nhie_function();
```

## 🟡 Using Parameters

```js
const tord = require("truthordare.js");

async function wyr_function() {
(async () => {
wyr = await tord.Wyr({ rating: "R" });
console.log(wyr);
})();
}

wyr_function();
```

> Valid Paramaters are: - "PG" , "PG13" , "R"
## ☑️ Output Log (Example)

```
{
id: 'ku9abgpi0ivr',
type: 'TRUTH',
rating: 'PG',
question: 'Who is your best friend?',
translations: {
bn: 'আপনার সেরা বন্ধু কে?',
de: 'Wer ist dein bester Freund?',
es: '¿Quién es tu mejor amigo?',
fr: 'Qui est ton meilleur ami?',
hi: 'कौन सबसे अच्छे बंधु के रूप में ज्ञात है?',
tl: 'Sino ang iyong pinakamatalik na kaibigan?'
}
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "truthordare.js",
"version": "1.0.0",
"version": "1.0.1",
"description": "Truth or Dare API Package",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1d58a69

Please sign in to comment.