-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DARKPOISON-yt
committed
Nov 26, 2022
1 parent
3094326
commit 1d58a69
Showing
2 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?' | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters