forked from souravkl11/Raganork-legacy
-
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
1 parent
bd9ccf8
commit 98e57e8
Showing
7 changed files
with
1,651 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* Copyright (C) 2020 Yusuf Usta. | ||
Licensed under the GPL-3.0 License; | ||
you may not use this file except in compliance with the License. | ||
WhatsAsena - Yusuf Usta | ||
*/ | ||
|
||
const { Sequelize } = require('sequelize'); | ||
const fs = require('fs'); | ||
if (fs.existsSync('config.env')) require('dotenv').config({ path: './config.env' }); | ||
|
||
// Özel Fonksiyonlarımız | ||
function convertToBool(text, fault = 'true') { | ||
return text === fault ? true : false; | ||
} | ||
|
||
DATABASE_URL = process.env.DATABASE_URL === undefined ? './whatsasena.db' : process.env.DATABASE_URL; | ||
DEBUG = process.env.DEBUG === undefined ? false : convertToBool(process.env.DEBUG); | ||
|
||
module.exports = { | ||
VERSION: 'v2.7.2', | ||
CHANNEL: 'https://t.me/remasterplugin', | ||
SESSION: process.env.RAGANORK_CODE === undefined ? '' : process.env.RAGANORK_CODE, | ||
ANTİLİNK: process.env.ANTİ_LİNK === undefined ? 'false' : process.env.ANTİ_LİNK, | ||
AFN: process.env.ALL_CAPTION === undefined ? '*MADE BY YOUR BOT NAME*' : process.env.ALL_CAPTION, | ||
AUTOBİO: process.env.AUTO_BİO === undefined ? 'false' : process.env.AUTO_BİO, | ||
WELCOME: process.env.WELCOME === undefined ? 'pp' : process.env.WELCOME, | ||
GANSTYLE: process.env.GAN_IMAGE === undefined ? 'https://i.hizliresim.com/loUtAb.jpg' : process.env.GAN_IMAGE, | ||
LANG: process.env.LANGUAGE === undefined ? 'TR' : process.env.LANGUAGE.toUpperCase(), | ||
ALIVEMSG: process.env.ALIVE_MESSAGE === undefined ? 'default' : process.env.ALIVE_MESSAGE, | ||
KICKMEMSG: process.env.KICKME_MESSAGE === undefined ? 'default' : process.env.KICKME_MESSAGE, | ||
AFNN: process.env.TAG_REPLY === undefined ? '[email protected]' : process.env.TAG_REPLY, | ||
NBSK: process.env.ALL_NUMBER === undefined ? '916282344739' : process.env.ALL_NUMBER, | ||
BLOCKCHAT: process.env.BLOCK_CHAT === undefined ? false : process.env.BLOCK_CHAT, | ||
ADDMSG: process.env.ADD_MESSAGE === undefined ? 'default' : process.env.ADD_MESSAGE, | ||
MUTEMSG: process.env.MUTE_MESSAGE === undefined ? 'default' : process.env.MUTE_MESSAGE, | ||
PLK: process.env.OWNER_NAME === undefined ? 'sᴏᴜʀᴀᴠᴋʟ¹¹' : process.env.OWNER_NAME, | ||
SONGD: process.env.SONGD === undefined ? '𝙎𝙚𝙖𝙧𝙘𝙝𝙞𝙣𝙜 𝙨𝙤𝙣𝙜... 🔍' : process.env.SONGD, | ||
SONGU: process.env.SONGU === undefined ? '𝙎𝙤𝙣𝙜 𝙛𝙤𝙪𝙣𝙙! 𝙐𝙥𝙡𝙤𝙖𝙙𝙞𝙣𝙜... ⏫' : process.env.SONGU, | ||
BGMFILTER: process.env.BGM_FILTER === undefined ? false : convertToBool(process.env.BGM_FILTER), | ||
DISBGM: process.env.DISABLE_JID_BGM_FILTER === undefined ? false : process.env.DISABLE_JID_BGM_FILTER, | ||
AUTOSTICKER: process.env.AUTO_STICKER === undefined ? true : convertToBool(process.env.AUTO_STICKER), | ||
DISSTICKER: process.env.DISABLE_STICKER === undefined ? false : process.env.DISABLE_STICKER, | ||
NOLOG: process.env.NO_LOG === undefined ? 'false' : process.env.NO_LOG, | ||
FULLEVA: process.env.FULL_EVA === undefined ? 'false' : process.env.FULL_EVA, | ||
BOTSK: process.env.BOT_NAME === undefined ? 'PUBLIC BOT' : process.env.BOT_NAME, | ||
GIF_WEL: process.env.GIF_WEL === undefined ? 'https://c.tenor.com/G9Bu13ZlhVkAAAPo/dancing-funny-dance.mp4' : process.env.GIF_WEL, | ||
SLINK: process.env.IG === undefined ? 'instagram.com/sourav_kl11' : process.env.IG, | ||
JID: process.env.VERIFIED === undefined ? '[email protected]' : process.env.VERIFIED, | ||
GIF_BYE: process.env.GIF_BYE === undefined ? 'https://c.tenor.com/6tlIWiAlT_gAAAPo/cat-impressed-cat-wow.mp4' : process.env.GIF_BYE, | ||
LOGOSK: process.env.ALL_IMG === undefined ? 'https://www.linkpicture.com/q/rgnk.jpg' : process.env.ALL_IMG, | ||
ALIVE: process.env.ALIVE_MODE === undefined ? 'pp' : process.env.ALIVE_MODE, | ||
SKDL: process.env.DIALOGUE === undefined ? '❤️🔥 𝗞𝗜𝗟𝗟𝗔𝗗𝗜𝗦𝗠 𝗡𝗘𝗩𝗘𝗥 𝗘𝗡𝗗𝗦 ❤️🔥' : process.env.DIALOGUE, | ||
BLOCKMSG: process.env.BLOCK_MESSAGE === undefined ? 'default' : process.env.BLOCK_MESSAGE, | ||
UNBLOCKMSG: process.env.UNBLOCK_MESSAGE === undefined ? 'default' : process.env.UNBLOCK_MESSAGE, | ||
SOURAV: process.env.SK_BLOCK === undefined ? 'false' : process.env.SK_BLOCK, | ||
FAKE: process.env.FAKE_REMOVE === undefined ? 'false' : process.env.FAKE_REMOVE, | ||
UNMUTEMSG: process.env.UNMUTE_MESSAGE === undefined ? 'default' : process.env.UNMUTE_MESSAGE, | ||
WORKTYPE: process.env.WORK_TYPE === undefined ? 'private' : process.env.WORK_TYPE, | ||
PROMOTEMSG: process.env.PROMOTE_MESSAGE === undefined ? 'default' : process.env.PROMOTE_MESSAGE, | ||
DEMOTEMSG: process.env.DEMOTE_MESSAGE === undefined ? 'default' : process.env.DEMOTE_MESSAGE, | ||
BANMSG: process.env.BAN_MESSAGE === undefined ? 'default' : process.env.BAN_MESSAGE, | ||
AFKMSG: process.env.AFK_MESSAGE === undefined ? 'default' : process.env.AFK_MESSAGE, | ||
TAGALL: process.env.TAG_HEADER === undefined ? '*Erangi vaa makkale*' : process.env.TAG_HEADER, | ||
SKDR: process.env.DURATION === undefined ? '99978509' : process.env.DURATION, | ||
HANDLERS: process.env.HANDLERS === undefined ? '^[.!;]' : process.env.HANDLERS, | ||
SEND_READ: process.env.SEND_READ === undefined ? false : convertToBool(process.env.SEND_READ), | ||
BRANCH: 'master', | ||
HEROKU: { | ||
HEROKU: process.env.HEROKU === undefined ? false : convertToBool(process.env.HEROKU), | ||
API_KEY: process.env.HEROKU_API_KEY === undefined ? '' : process.env.HEROKU_API_KEY, | ||
APP_NAME: process.env.HEROKU_APP_NAME === undefined ? '' : process.env.HEROKU_APP_NAME | ||
}, | ||
DATABASE_URL: DATABASE_URL, | ||
DATABASE: DATABASE_URL === './whatsasena.db' ? new Sequelize({ dialect: "sqlite", storage: DATABASE_URL, logging: DEBUG }) : new Sequelize(DATABASE_URL, { dialectOptions: { ssl: { require: true, rejectUnauthorized: false } }, logging: DEBUG }), | ||
RBG_API_KEY: process.env.REMOVE_BG_API_KEY === undefined ? false : process.env.REMOVE_BG_API_KEY, | ||
NO_ONLINE: process.env.NO_ONLINE === undefined ? true : convertToBool(process.env.NO_ONLINE), | ||
SUDO: process.env.SUDO === undefined ? '919074309534,0' : process.env.SUDO, | ||
DEBUG: DEBUG, | ||
COFFEEHOUSE_API_KEY: process.env.COFFEEHOUSE_API_KEY === undefined ? false : process.env.COFFEEHOUSE_API_KEY, | ||
WITAI_API: "TEYMELA6DMC4XB5YM3SPTTQWUUIBKURG", | ||
SUPPORT: "905524317852-1612300121", | ||
SUPPORT2: "905511384572-1617736751", | ||
SUPPORT3: "905511384572-1621015274" | ||
}; |
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,81 @@ | ||
const Asena = require('../events'); | ||
const {MessageType} = require('@adiwajshing/baileys'); | ||
const got = require('got'); | ||
const fs = require('fs'); | ||
const axios = require('axios'); | ||
const { errorMessage, infoMessage } = require('../helpers'); | ||
const IG_DESC = "Downloads Image/Video From Instagram" | ||
const NEED_WORD = "Must Enter a link" | ||
const FBDESC = "Downloads Video From FaceBook" | ||
const LOADING = "Downloading the Video..." | ||
const NOT_FOUNDFB = "Video Not Found" | ||
const CAPTION = "Caption" | ||
|
||
Asena.addCommand({ pattern: 'ig ?(.*)', fromMe: false, desc: IG_DESC}, async (message, match) => { | ||
|
||
const userName = match[1] | ||
|
||
if (!userName) return await message.sendMessage(errorMessage(NEED_WORD)) | ||
|
||
await message.sendMessage(infoMessage("Downloading the Post...")) | ||
|
||
await axios | ||
.get(`https://api-anoncybfakeplayer.herokuapp.com/igdown?url=${userName}`) | ||
.then(async (response) => { | ||
const { | ||
url, | ||
type, | ||
} = response.data.result[0] | ||
|
||
const profileBuffer = await axios.get(url, {responseType: 'arraybuffer'}) | ||
|
||
const msg = `${type}` | ||
|
||
if (msg === 'image') { await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.image, { | ||
caption: "Made By WhatsAsenaPublic" | ||
})} | ||
|
||
if (msg === 'video') { await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.video, { | ||
caption: "Made By WhatsAsenaPublic" | ||
})} | ||
|
||
|
||
}) | ||
.catch( | ||
async (err) => await message.sendMessage(errorMessage("Invaild Link, Please Enter a Vaild Instagram Link")), | ||
) | ||
}, | ||
) | ||
|
||
|
||
|
||
|
||
Asena.addCommand({ pattern: 'fb ?(.*)', fromMe: false, desc: FBDESC }, async (message, match) => { | ||
|
||
const userName = match[1] | ||
|
||
if (!userName) return await message.sendMessage(errorMessage(NEED_WORD)) | ||
|
||
await message.sendMessage(infoMessage(LOADING)) | ||
|
||
await axios | ||
.get(`https://videfikri.com/api/fbdl/?urlfb=${userName}`) | ||
.then(async (response) => { | ||
const { | ||
url, | ||
judul, | ||
} = response.data.result | ||
|
||
const profileBuffer = await axios.get(url, {responseType: 'arraybuffer'}) | ||
|
||
const msg = `*${CAPTION}*: ${judul}` | ||
|
||
await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.video, { | ||
caption: "Made By WhatsAsenaPublic" | ||
}) | ||
}) | ||
.catch( | ||
async (err) => await message.sendMessage(errorMessage(NOT_FOUNDFB )), | ||
) | ||
}, | ||
) |
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,5 @@ | ||
build: | ||
docker: | ||
worker: /plugins/sql/Dockerfile | ||
run: | ||
worker: npm start |
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,59 @@ | ||
/* Copyright (C) 2020 Yusuf Usta. | ||
Licensed under the GPL-3.0 License; | ||
you may not use this file except in compliance with the License. | ||
WhatsAsena - Yusuf Usta | ||
*/ | ||
|
||
const chalk = require('chalk'); | ||
const {WAConnection, MessageOptions, MessageType} = require('@adiwajshing/baileys'); | ||
const {StringSession} = require('./Raganork/'); | ||
const fs = require('fs'); | ||
|
||
async function whatsAsena () { | ||
const conn = new WAConnection(); | ||
const Session = new StringSession(); | ||
conn.version = [2,2121,7]; | ||
conn.logger.level = 'warn'; | ||
conn.regenerateQRIntervalMs = 50000; | ||
|
||
conn.on('connecting', async () => { | ||
console.log(`${chalk.green.bold('Whats')}${chalk.blue.bold('Asena')} | ||
${chalk.white.italic('AsenaString Kodu Alıcı')} | ||
${chalk.blue.italic('ℹ️ Connecting to Whatsapp... Please Wait.')}`); | ||
}); | ||
|
||
|
||
conn.on('open', async () => { | ||
var st = Session.createStringSession(conn.base64EncodedAuthInfo()); | ||
console.log( | ||
chalk.green.bold('Asena String Kodunuz: '), Session.createStringSession(conn.base64EncodedAuthInfo()) | ||
); | ||
|
||
if (!fs.existsSync('config.env')) { | ||
fs.writeFileSync('config.env', `RAGANORK_CODE="${st}"`); | ||
} | ||
if (conn.user.jid.startsWith('90')) { | ||
await conn.sendMessage(conn.user.jid,st, MessageType.text) | ||
await conn.sendMessage(conn.user.jid,'*Bu Kodu Kimseyle Paylaşmayın!*', MessageType.text) | ||
console.log( | ||
chalk.blue.bold('Locale kuruyorsanız node bot.js ile botu başlatabilirsiniz.') | ||
); | ||
} | ||
else { | ||
await conn.sendMessage(conn.user.jid,st, MessageType.text) | ||
await conn.sendMessage(conn.user.jid,'*Do Not Share This Code With Anyone!*', MessageType.text) | ||
console.log( | ||
chalk.blue.bold('If you are installing locale, you can start the bot with node bot.js') | ||
); | ||
} | ||
|
||
process.exit(0); | ||
}); | ||
|
||
await conn.connect(); | ||
} | ||
|
||
whatsAsena() |
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,37 @@ | ||
/* WhatsAsena Duplicated - Artificial Intelligence Similarity | ||
Codded by lyfee | ||
function similarity(first, second) { | ||
first = first.replace(/\s+/g, '') | ||
second = second.replace(/\s+/g, '') | ||
if (first === second) return 1; // identical or empty | ||
if (first.length < 2 || second.length < 2) return 0; // if either is a 0-letter or 1-letter string | ||
let firstBigrams = new Map(); | ||
for (let i = 0; i < first.length - 1; i++) { | ||
const bigram = first.substring(i, i + 1); | ||
const count = firstBigrams.has(bigram) | ||
? firstBigrams.get(bigram) + 1 | ||
: 1; | ||
firstBigrams.set(bigram, count); | ||
} | ||
let intersectionSize = 0; | ||
for (let i = 0; i < second.length - 1; i++) { | ||
const bigram = second.substring(i, i + 1); | ||
const count = firstBigrams.has(bigram) | ||
? firstBigrams.get(bigram) | ||
: 0; | ||
if (count > 0) { | ||
firstBigrams.set(bigram, count - 1); | ||
intersectionSize++; | ||
} | ||
} | ||
return (2.0 * intersectionSize) / (first.length + second.length - 2); | ||
} | ||
module.exports = {similarity:similarity} | ||
*/ |