Skip to content

Commit

Permalink
✨✨
Browse files Browse the repository at this point in the history
  • Loading branch information
DARKPOISON-yt committed Dec 18, 2021
1 parent 3086204 commit ec5206b
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 39 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Miyuki-fun

This package currently gives a random truth or a dare questions (More to come later)

# Available Functions

truth,
dare

# Usage for truth and dare commands

```js
const miyuki = require('miyuki-fun.js');
const miyuki = require("miyuki-fun.js");
const dare = miyuki.dare();
const truth = miyuki.truth();
console.log(truth);
console.log(dare);
```
console.log(dare);
```
65 changes: 65 additions & 0 deletions functions/apis/animals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
async function GetAnimalImage(Animal) {
let Animals = [
"dog",
"cat",
"duck",
"bird",
"panda",
"wolf",
"fox",
"seal",
"llama",
"alpaca",
"camel",
"lizard",
],
res,
json,
Data;

if (!Animal) {
Animals = Animals[Math.floor(Math.random() * Animals.length)];
(res = await Fetch(
`https://apis.duncte123.me/animal/${Animals.toLowerCase()}`,
{
headers: {
"user-agent":
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/hspr-H102; Blazer/4.0) 16;320x320",
},
}
)),
(json = await res.json());

if (!json.data.file)
throw new Error(`Something Went Wrong, Try Again Later!`);

Data = json.data.file;

return Data;
} else {
if (!Animals.find((Ani) => Ani === Animal.toLowerCase()))
throw new Error(
`Invalid Animal Provided - ${Animals.map(
(Ani) => Ani.charAt(0).toUpperCase() + Ani.slice(1)
).join(", ")}`
);
(res = await Fetch(
`https://apis.duncte123.me/animal/${Animal.toLowerCase()}`,
{
headers: {
"user-agent":
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/hspr-H102; Blazer/4.0) 16;320x320",
},
}
)),
(json = await res.json());

if (!json.data.file)
throw new Error(`Something Went Wrong, Try Again Later!`);

Data = json.data.file;
return Data;
}
}

module.exports = { GetAnimalImage };
16 changes: 16 additions & 0 deletions functions/apis/chatbot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
async function Chat(Message) {
if (!Message) throw new Error(`No Message`);
if (Message.length > 1900) throw new Error(`Message Limit: 1900`);

const res = await Fetch(
encodeURI(`https://api.affiliateplus.xyz/api/chatbot?message=${Message}`)
),
json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);

let Data = json.message;
return Data;
}

module.exports = { Chat };
67 changes: 47 additions & 20 deletions functions/apis/nekobot.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,58 @@
const Fetch = require('node-fetch')
const Fetch = require("node-fetch");
async function Awooify(avatar) {
if (!avatar) throw new Error(`No Image`);
if (!avatar) throw new Error(`No Image`);

const res = await Fetch(`https://nekobot.xyz/api/imagegen?type=awooify&url=${avatar}`), json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message;
};
const res = await Fetch(
`https://nekobot.xyz/api/imagegen?type=awooify&url=${avatar}`
),
json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message;
}

async function Baguette(avatar) {
if (!avatar) throw new Error(`No Image`);
if (!avatar) throw new Error(`No Image`);

const res = await Fetch(`https://nekobot.xyz/api/imagegen?type=baguette&url=${avatar}`), json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message;
};
const res = await Fetch(
`https://nekobot.xyz/api/imagegen?type=baguette&url=${avatar}`
),
json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message;
}

async function BlushFact(Message) {
if (Message) throw new Error(`No Message`);
if (Message.length > 1500) throw new Error(`Message Limit: 1500`);
if (Message) throw new Error(`No Message`);
if (Message.length > 1500) throw new Error(`Message Limit: 1500`);

const res = await Fetch(
`https://nekobot.xyz/api/imagegen?type=fact&text=${encodeURIComponent(
Message
)}`
),
json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message;
}

const res = await Fetch(`https://nekobot.xyz/api/imagegen?type=fact&text=${encodeURIComponent(Message)}`), json = await res.json();
async function Clyde(options = {}) {
if (!Message) throw new Error(`No Message`);
if (Message.length > 1500) throw new Error(`Message Limit: 1500`);

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);
return json.message
}
const res = await Fetch(
`https://nekobot.xyz/api/imagegen?type=clyde&text=${encodeURIComponent(
Message
)}`
),
json = await res.json();

if (!json.message) throw new Error(`Something Went Wrong, Try Again Later!`);

module.exports = {Awooify,Baguette,BlushFact}
const Data = json.message;

return Data;
}
module.exports = { Awooify, Baguette, BlushFact, Clyde };
8 changes: 8 additions & 0 deletions functions/apis/some-random-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
async function Gay(Image) {
if (!Image) throw new Error(`No Image (Format: png)`);

const image = encodeURI(Image);

const Data = `https://some-random-api.ml/canvas/gay?avatar=${image}`;
return Data;
}
11 changes: 11 additions & 0 deletions functions/apis/vacefron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
async function ChangeMyMind(Message) {
if (!Message) throw new Error(`No Message`);
if (Message.length > 100) throw new Error(`Message Limit: 100`);

const Data = encodeURI(
`https://vacefron.nl/api/changemymind?text=${options.Message}`
);
if (!Data) throw new Error(`Something went wrong`);
return Data;
}
module.exports = { ChangeMyMind };
24 changes: 18 additions & 6 deletions functions/truthordare/dare.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions functions/truthordare/truths.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
t= `If you could be invisible what’s the first thing you would do?,What’s a secret you kept from your parents?,What’s the most embarrassing music you listen to?,What’s one thing you wish you could change about yourself?,Who is your secret crush?,Who is the last person you creeped on social media?,When was the last time you wet the bed?,If a genie granted you three wishes what would you ask for?,What’s your biggest regret?,If you had to only ever watch rom coms or only watch scary movies for the rest of your life which would you choose?,Where is the weirdest place you've ever gone to the bathroom?,What’s the most food you've ever eaten in a single sitting?,Which player would survive a zombie apocalypse and which would be the first to go?,Reveal all the details of your first kiss.,What excuse have you used before to get out plans?
t =
`If you could be invisible what’s the first thing you would do?,What’s a secret you kept from your parents?,What’s the most embarrassing music you listen to?,What’s one thing you wish you could change about yourself?,Who is your secret crush?,Who is the last person you creeped on social media?,When was the last time you wet the bed?,If a genie granted you three wishes what would you ask for?,What’s your biggest regret?,If you had to only ever watch rom coms or only watch scary movies for the rest of your life which would you choose?,Where is the weirdest place you've ever gone to the bathroom?,What’s the most food you've ever eaten in a single sitting?,Which player would survive a zombie apocalypse and which would be the first to go?,Reveal all the details of your first kiss.,What excuse have you used before to get out plans?
,What's the longest you've ever slept?
,Read the last thing you sent your best friend or significant other out loud.
,What's your biggest pet peeve?
Expand Down Expand Up @@ -82,12 +83,16 @@ t= `If you could be invisible what’s the first thing you would do?,What’s a
,Have you ever had an imaginary friend? Describe them.
,What gross food combo do you secretly love?
,If you could become besties with a celebrity who would it be?
,What’s the most embarrassing nickname you’ve ever been given?,If you could trade lives with any person you know for a day who would it be?`.split(',')
,What’s the most embarrassing nickname you’ve ever been given?,If you could trade lives with any person you know for a day who would it be?`.split(
","
);


function truth(){
const netques = [t], question_total = netques[Math.floor(Math.random() * netques.length)], question = question_total[Math.floor(Math.random() * question_total.length)];
function truth() {
const netques = [t],
question_total = netques[Math.floor(Math.random() * netques.length)],
question =
question_total[Math.floor(Math.random() * question_total.length)];
return question;
}

module.exports = {truth}
module.exports = { truth };
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {truth} =require("./functions/truthordare/truths.js");
const {dare} =require("./functions/truthordare/dare.js")
const {Awooify,BlushFact,Baguette} = require("./functions/apis/nekobot.js")
module.exports = {truth,dare,Awooify,BlushFact,Baguette}
const { truth } = require("./functions/truthordare/truths.js");
const { dare } = require("./functions/truthordare/dare.js");
const { Awooify, BlushFact, Baguette } = require("./functions/apis/nekobot.js");
module.exports = { truth, dare, Awooify, BlushFact, Baguette };

0 comments on commit ec5206b

Please sign in to comment.