-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
9 changed files
with
34 additions
and
42 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 @@ | ||
TELEGTAM_TOKEN= | ||
NIGHT_API_TOKEN= |
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,4 +1,3 @@ | ||
node_modules | ||
.env | ||
package-lock.json | ||
test.js | ||
package-lock.json |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
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,21 +1,18 @@ | ||
const { Telegraf } = require("telegraf"); | ||
const { Keyboard } = require("telegram-keyboard"); | ||
const axios = require("axios"); | ||
const bot = new Telegraf(process.env.TELEGTAM_TOKEN); | ||
// Require сommands | ||
|
||
let nswfYaoiImg = require("./commands/nswf/yaoi-img"); | ||
let nswfTrapImg = require("./commands/nswf/trap-img"); | ||
let nswfHentaiImg = require("./commands/nswf/hentai-img"); | ||
let startBtn = require("./handlers/buttons/start-btn"); | ||
let nswfImagesBtn = require("./handlers/buttons/nswfImages-btn"); | ||
|
||
// Сommands | ||
bot.start(startBtn); | ||
bot.command("back", startBtn); | ||
bot.command("yaoi_img", nswfYaoiImg); | ||
bot.command("trap_img", nswfTrapImg); | ||
bot.command("hentai_img", nswfHentaiImg); | ||
bot.command("images", nswfImagesBtn); | ||
bot.command("videos", (ctx) => ctx.reply("coming soon...")); | ||
// Launch | ||
|
||
bot.launch(); |
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,13 +1,12 @@ | ||
const axios = require("axios"); | ||
const nswfparse = require("nswfparse"); | ||
|
||
module.exports = async (ctx) => { | ||
axios | ||
.get("https://api.night-api.com/images/nsfw/hentai", { | ||
headers: { | ||
authorization: process.env.NIGHT_API_TOKEN, | ||
}, | ||
nswfparse.reddit.hentai | ||
.hentai() | ||
.then((payload) => { | ||
return ctx.replyWithPhoto(payload.url); | ||
}) | ||
.then(function (response) { | ||
return ctx.replyWithPhoto(response.data.content.url); | ||
.catch((error) => { | ||
console.error(error); | ||
}); | ||
}; |
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,9 +1,12 @@ | ||
const { Telegraf } = require("telegraf"); | ||
const { message } = require("telegraf/filters"); | ||
const axios = require("axios"); | ||
const nswfparse = require("nswfparse"); | ||
|
||
module.exports = async (ctx) => { | ||
axios.get("https://api.waifu.pics/nsfw/trap", {}).then(function (response) { | ||
return ctx.replyWithPhoto(response.data.url); | ||
}); | ||
nswfparse.reddit.hentai | ||
.femboy() | ||
.then((payload) => { | ||
return ctx.replyWithPhoto(payload.url); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); | ||
}; |
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,8 +1,12 @@ | ||
const { Telegraf } = require("telegraf"); | ||
const { message } = require("telegraf/filters"); | ||
const r34API = require("r34.api"); | ||
const nswfparse = require("nswfparse"); | ||
|
||
module.exports = async (ctx) => { | ||
let image = await r34API.rule34(["yaoi"]); | ||
return ctx.replyWithPhoto(image.replace(/"/gi, "")); | ||
nswfparse.reddit.hentai | ||
.yaoi() | ||
.then((payload) => { | ||
return ctx.replyWithPhoto(payload.url); | ||
}) | ||
.catch((error) => { | ||
console.error(error); | ||
}); | ||
}; |
Empty file.
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