├── .github
└── FUNDING.yml
├── CODEOWNERS
├── PinkyMwol
├── Base.js
├── Dockerfile
├── Image.js
├── Message.js
├── ReplyMessage.js
├── StringSession.js
├── Video.js
└── index.js
├── README.md
├── _config.yml
├── app.json
├── bot.js
├── config.js
├── events.js
├── helper.js
├── helpers.js
├── heroku.yml
├── language.js
├── language
├── AZ.json
├── EN.json
├── ES.json
├── HI.json
├── ID.json
├── ML.json
├── PT.json
├── RU.json
└── TR.json
├── package.json
├── pinky.js
├── plugins
├── Pinky_lang.js
├── Talking Pinky.js
├── XMedia.js
├── _pinky.js
├── _plugin.js
├── admin.js
├── admin2.js
├── afk.js
├── carbon.js
├── clear.js
├── code_fake.js
├── conventer.js
├── deepai.js
├── dict.js
├── evaluators.js
├── extra.js
├── ffmpeg.js
├── filter.js
├── get.js
├── greetings.js
├── gsarena.js
├── help.js
├── heroku.js
├── images.js
├── insta.js
├── instagram.js
├── memes.js
├── moreimg.js
├── news.js
├── notes.js
├── ocr.js
├── pm block.js
├── profile.js
├── reminder.js
├── removebg.js
├── report.js
├── scan.js
├── scrapers.js
├── screenshot.js
├── social-scraper.js
├── someonesay.js
├── spammer.js
├── sql
│ ├── ai.js
│ ├── fake.js
│ ├── filters.js
│ ├── greetings.js
│ ├── lydia.js
│ ├── notes.js
│ ├── plk.js
│ ├── plugin.js
│ ├── tryplk.js
│ └── warn.js
├── stickers.js
├── system_stats.js
├── tagadmin.js
├── tagall.js
├── tblend.js
├── textmaker.js
├── troll.js
├── ttp.js
├── unvoice.js
├── updater.js
├── updown.js
├── usage.js
├── var_setting.js
├── vars.js
├── voicy.js
├── warning.js
├── web.js
└── whois.js
├── qr.js
└── scraper.js
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [afnanplk]
2 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 |
2 | # For the syntax of this file, see:
3 | #
4 | # https://docs.gitlab.com/ee/user/project/code_owners.html#the-syntax-of-code-owners-files
5 | #
6 | # If more than one rule matches a given file, the latest rule is used.
7 | # The file should be generally kept sorted, except when it is necessary
8 | # to use a different order due to the fact above. In that case, use
9 | # '# sort-order-reset' comment line to reset the sort order.
10 | # Project maintainers are responsible for clarifying the standards of acceptable
11 | # behavior and are expected to take appropriate and fair corrective action in
12 | # response to any instances of unacceptable behavior.
13 | #
14 | # Project maintainers have the right and responsibility to remove, edit, or
15 | # reject comments, commits, code, wiki edits, issues, and other contributions
16 | # that are not aligned to this Code of Conduct, or to ban temporarily or
17 | # permanently any contributor for other behaviors that they deem inappropriate,
18 | # threatening, offensive, or harmful.
19 | # Instances of abusive, harassing, or otherwise unacceptable behavior may be
20 | # reported by contacting the project team at AsenaDev. All
21 | # complaints will be reviewed and investigated and will result in a response that
22 | # is deemed necessary and appropriate to the circumstances. The project team is
23 | # obligated to maintain confidentiality with regard to the reporter of an incident.
24 | # Further details of specific enforcement policies may be posted separately.
25 | # Contributers:
26 | * @afnanplk @farhan-dqz
27 | # Project maintainers who do not follow or enforce the Code of Conduct in good
28 | # faith may face temporary or permanent repercussions as determined by other
29 | # members of the project's leadership.
30 | # You are not required to accept this License in order to receive or
31 | # run a copy of the Program. Ancillary propagation of a covered work
32 | # occurring solely as a consequence of using peer-to-peer transmission
33 | # to receive a copy likewise does not require acceptance. However,
34 | # nothing other than this License grants you permission to propagate or
35 | # modify any covered work. These actions infringe copyright if you do
36 | # not accept this License. Therefore, by modifying or propagating a
37 | # covered work, you indicate your acceptance of this License to do so.
38 | # Reserved
39 | # Reserved
40 | # Reserved
41 | # Reserved
42 | # Reserved
43 |
--------------------------------------------------------------------------------
/PinkyMwol/Base.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | 'use strict';
8 |
9 | class Base {
10 | constructor(client) {
11 | Object.defineProperty(this, 'client', { value: client });
12 | }
13 |
14 | _clone() {
15 | return Object.assign(Object.create(this), this);
16 | }
17 |
18 | _patch(data) { return data; }
19 | }
20 |
21 | module.exports = Base;
22 |
--------------------------------------------------------------------------------
/PinkyMwol/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM quay.io/lyfe00011/test:beta
2 |
3 | RUN git clone https://github.com/afnanplk/Pinky /root/WhatsAsenaDuplicated
4 | WORKDIR /root/WhatsAsenaDuplicated/
5 | RUN yarn install --no-audit
6 | RUN git clone https://github.com/afnanplk/uploads
7 | RUN cp -R /root/Utils/* /root/WhatsAsenaDuplicated
8 | CMD ["node", "bot.js"]
9 |
--------------------------------------------------------------------------------
/PinkyMwol/Image.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const {MessageType, Presence, MessageOptions} = require('@adiwajshing/baileys');
8 | const Base = require('./Base');
9 | const Message = require('./Message');
10 | const ReplyMessage = require('./ReplyMessage');
11 |
12 | class Image extends Base {
13 | constructor(client, data) {
14 | super(client);
15 | if (data) this._patch(data);
16 | }
17 |
18 | _patch(data) {
19 | this.id = data.key.id === undefined ? undefined : data.key.id;
20 | this.jid = data.key.remoteJid;
21 | this.fromMe = data.key.fromMe;
22 | this.caption = data.message.imageMessage.caption === null ? data.message.imageMessage.caption : '';
23 | this.url = data.message.imageMessage.url;
24 | this.timestamp = typeof(data.messageTimestamp) === 'object' ? data.messageTimestamp.low : data.messageTimestamp;
25 | this.mimetype = data.message.imageMessage.mimetype;
26 | this.height = data.message.imageMessage.height;
27 | this.width = data.message.imageMessage.width;
28 | this.mediaKey = data.message.imageMessage.mediaKey;
29 | this.data = data;
30 |
31 | if (data.message.imageMessage.hasOwnProperty('contextInfo') && data.message.contextInfo.quotedMessage) {
32 | this.reply_message = new ReplyMessage(this.client, data.message.imageMessage.contextInfo); }
33 | else {
34 | this.reply_message = false;
35 | }
36 |
37 | return super._patch(data);
38 | }
39 |
40 | async delete() {
41 | return await this.client.deleteMessage(this.jid, {id: this.id, remoteJid: this.jid, fromMe: true})
42 | }
43 |
44 | async reply(text) {
45 | var message = await this.client.sendMessage(this.jid, text, MessageType.text, {quoted: this.data})
46 | return new Message(this.client, message)
47 | }
48 |
49 | async sendMessage(content, type, options) {
50 | return await this.client.sendMessage(this.jid, content, type, options)
51 | }
52 |
53 | async sendTyping() {
54 | return await this.client.updatePresence(this.jid, Presence.composing) ;
55 | }
56 |
57 | async sendRead() {
58 | return await this.client.chatRead(this.jid);
59 | }
60 |
61 | async download(location = this.id) {
62 | await this.client.downloadAndSaveMediaMessage(this.data, location);
63 | return this.id + '.' + this.mimetype.split('/')[1];
64 | }
65 | };
66 |
67 | module.exports = Image;
68 |
--------------------------------------------------------------------------------
/PinkyMwol/Message.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const {MessageType, Presence, MessageOptions} = require('@adiwajshing/baileys');
8 | const Base = require('./Base');
9 | const ReplyMessage = require('./ReplyMessage');
10 |
11 | class Message extends Base {
12 | constructor(client, data) {
13 | super(client);
14 | if (data) this._patch(data);
15 | }
16 |
17 | _patch(data) {
18 | this.id = data.key.id === undefined ? undefined : data.key.id;
19 | this.jid = data.key.remoteJid;
20 | this.fromMe = data.key.fromMe;
21 | this.message = data.message.extendedTextMessage === null ? data.message.conversation : data.message.extendedTextMessage.text;
22 | this.unreadCount = data.unreadCount;
23 | this.timestamp = typeof(data.messageTimestamp) === 'object' ? data.messageTimestamp.low : data.messageTimestamp;
24 | this.data = data;
25 |
26 | if (data.message.hasOwnProperty('extendedTextMessage') &&
27 | data.message.extendedTextMessage.hasOwnProperty('contextInfo') === true &&
28 | data.message.extendedTextMessage.contextInfo.hasOwnProperty('quotedMessage')) {
29 | this.reply_message = new ReplyMessage(this.client, data.message.extendedTextMessage.contextInfo); } else {
30 | this.reply_message = false;
31 | }
32 |
33 | if (data.message.hasOwnProperty('extendedTextMessage') &&
34 | data.message.extendedTextMessage.hasOwnProperty('contextInfo') === true &&
35 | data.message.extendedTextMessage.contextInfo.hasOwnProperty('mentionedJid')) {
36 | this.mention = data.message.extendedTextMessage.contextInfo.mentionedJid;
37 | } else {
38 | this.mention = false;
39 | }
40 |
41 | return super._patch(data);
42 | }
43 |
44 | async delete() {
45 | return await this.client.deleteMessage(this.jid, {id: this.id, remoteJid: this.jid, fromMe: true})
46 | }
47 |
48 | async reply(text) {
49 | var message = await this.client.sendMessage(this.jid, text, MessageType.text);
50 | return new Message(this.client, message)
51 | }
52 |
53 | async sendMessage(content, type = MessageType.text, options) {
54 | return await this.client.sendMessage(this.jid, content, type, options)
55 | }
56 |
57 | async sendTyping() {
58 | return await this.client.updatePresence(this.jid, Presence.composing) ;
59 | }
60 |
61 | async sendRead() {
62 | return await this.client.chatRead(this.jid);
63 | }
64 | };
65 |
66 | module.exports = Message;
67 |
--------------------------------------------------------------------------------
/PinkyMwol/ReplyMessage.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const {MessageType, Presence, MessageOptions} = require('@adiwajshing/baileys');
8 | const Base = require('./Base');
9 | const Image = require('./Image');
10 |
11 | class ReplyMessage extends Base {
12 | constructor(client, data) {
13 | super(client);
14 | if (data) this._patch(data);
15 | }
16 |
17 | _patch(data) {
18 | this.id = data.stanzaId;
19 | this.jid = data.participant;
20 | if (data.quotedMessage && data.quotedMessage.imageMessage) {
21 | this.message = data.quotedMessage.imageMessage.caption === null ? data.message.imageMessage.caption : '';
22 | this.caption = data.quotedMessage.imageMessage.caption === null ? data.message.imageMessage.caption : '';
23 | this.url = data.quotedMessage.imageMessage.url;
24 | this.mimetype = data.quotedMessage.imageMessage.mimetype;
25 | this.height = data.quotedMessage.imageMessage.height;
26 | this.width = data.quotedMessage.imageMessage.width;
27 | this.mediaKey = data.quotedMessage.imageMessage.mediaKey;
28 | this.image = true;
29 | this.video = false;
30 | } else if (data.quotedMessage && data.quotedMessage.videoMessage) {
31 | this.message = data.quotedMessage.videoMessage.caption === null ? data.message.videoMessage.caption : '';
32 | this.caption = data.quotedMessage.videoMessage.caption === null ? data.message.videoMessage.caption : '';
33 | this.url = data.quotedMessage.videoMessage.url;
34 | this.mimetype = data.quotedMessage.videoMessage.mimetype;
35 | this.height = data.quotedMessage.videoMessage.height;
36 | this.width = data.quotedMessage.videoMessage.width;
37 | this.mediaKey = data.quotedMessage.videoMessage.mediaKey;
38 | this.video = true;
39 | } else if (data.quotedMessage && data.quotedMessage.conversation) {
40 | this.message = data.quotedMessage.conversation;
41 | this.text = data.quotedMessage.conversation;
42 | this.image = false;
43 | this.video = false;
44 | }
45 |
46 | this.data = data;
47 |
48 | return super._patch(data);
49 | }
50 |
51 | async delete() {
52 | return await this.client.deleteMessage(this.jid, {id: this.id, remoteJid: this.jid, fromMe: true});
53 | }
54 |
55 | async reply(text) {
56 | var message = await this.client.sendMessage(this.jid, text, MessageType.text, {quoted: this.data});
57 | return new Message(this.client, message)
58 | }
59 |
60 | async sendMessage(content, type, options) {
61 | return await this.client.sendMessage(this.jid, content, type, options);
62 | }
63 |
64 | async sendTyping() {
65 | return await this.client.updatePresence(this.jid, Presence.composing);
66 | }
67 |
68 | async download(location = this.id) {
69 | if (this.image) {
70 | await this.client.downloadAndSaveMediaMessage(this.data.quotedMessage.imageMessage, location);
71 | return this.id + '.' + this.mimetype.split('/')[1];
72 | } else {
73 | return false;
74 | }
75 | }
76 | };
77 |
78 | module.exports = ReplyMessage;
79 |
--------------------------------------------------------------------------------
/PinkyMwol/StringSession.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const fs = require('fs');
8 |
9 | class StringSession {
10 | constructor() {
11 | }
12 |
13 | deCrypt(string = undefined) {
14 | if ('PINKY_SESSION' in process.env && string === undefined) {
15 | string = process.env.STRING_SESSION;
16 | } else if (string !== undefined) {
17 | if (fs.existsSync(string)) {
18 | string = fs.readFileSync(string, {encoding:'utf8', flag:'r'});
19 | }
20 | }
21 |
22 | var split = string.split('___');
23 | if (split.length >= 2) {
24 | return JSON.parse(Buffer.from(split[split.length - 1], 'base64').toString('utf-8'));
25 | }
26 | }
27 |
28 | createStringSession(dict) {
29 | return 'Pinky___' + Buffer.from(JSON.stringify(dict)).toString('base64');
30 | }
31 | }
32 |
33 | module.exports = StringSession;
34 |
--------------------------------------------------------------------------------
/PinkyMwol/Video.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const {MessageType, Presence, MessageOptions} = require('@adiwajshing/baileys');
8 | const Base = require('./Base');
9 | const Message = require('./Message');
10 | const ReplyMessage = require('./ReplyMessage');
11 |
12 | class Video extends Base {
13 | constructor(client, data) {
14 | super(client);
15 | if (data) this._patch(data);
16 | }
17 |
18 | _patch(data) {
19 | this.id = data.key.id === undefined ? undefined : data.key.id;
20 | this.jid = data.key.remoteJid;
21 | this.fromMe = data.key.fromMe;
22 | this.caption = data.message.videoMessage.caption === null ? data.message.videoMessage.caption : '';
23 | this.url = data.message.videoMessage.url;
24 | this.timestamp = typeof(data.messageTimestamp) === 'object' ? data.messageTimestamp.low : data.messageTimestamp;
25 | this.mimetype = data.message.videoMessage.mimetype;
26 | this.height = data.message.videoMessage.height;
27 | this.width = data.message.videoMessage.width;
28 | this.mediaKey = data.message.videoMessage.mediaKey;
29 | this.data = data;
30 |
31 | if (data.message.videoMessage.hasOwnProperty('contextInfo') && data.message.contextInfo.quotedMessage) {
32 | this.reply_message = new ReplyMessage(this.client, data.message.videoMessage.contextInfo); }
33 | else {
34 | this.reply_message = false;
35 | }
36 |
37 | return super._patch(data);
38 | }
39 |
40 | async delete() {
41 | return await this.client.deleteMessage(this.jid, {id: this.id, remoteJid: this.jid, fromMe: true})
42 | }
43 |
44 | async reply(text) {
45 | var message = await this.client.sendMessage(this.jid, text, MessageType.text, {quoted: this.data})
46 | return new Message(this.client, message)
47 | }
48 |
49 | async sendMessage(content, type, options) {
50 | return await this.client.sendMessage(this.jid, content, type, options)
51 | }
52 |
53 | async sendTyping() {
54 | return await this.client.updatePresence(this.jid, Presence.composing) ;
55 | }
56 |
57 | async sendRead() {
58 | return await this.client.chatRead(this.jid);
59 | }
60 |
61 | async download(location = this.id) {
62 | await this.client.downloadAndSaveMediaMessage(this.data, location);
63 | return this.id + '.' + this.mimetype.split('/')[1];
64 | }
65 | };
66 |
67 | module.exports = Video;
68 |
--------------------------------------------------------------------------------
/PinkyMwol/index.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | module.exports = {
8 | Base: require('./Base'),
9 | Message: require('./Message'),
10 | StringSession: require('./StringSession'),
11 | ReplyMessage: require('./ReplyMessage'),
12 | Image: require('./Image'),
13 | Video: require('./Video')
14 | };
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Thanks for Everything
2 | ### We will always remember you..
3 |
4 |
5 |

6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Project created by afnanplk to make it public
15 |
16 | | © |
17 | Reserved |
18 |
19 |
20 |
21 | ----
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ```
34 |
35 | pinky - pinky Userbot is Open Source software open to development.
36 | The user is responsible for all consequences that may arise from incorrect or misuse.
37 | Since it is an open source project, anyone can copy the software, add and remove,
38 | and use it in a way that they customize. In addition, plug-in support enables users to
39 | install their own plugins to the original software and use them as they wish.
40 | Using the bot out of purpose will explicitly ban you.
41 | Usage is entirely the user's responsibility, Asena Userbot is an
42 | infrastructure only. Just as the operating system is not responsible
43 | for the work done with the programs that are installed later, WhatsAsena
44 | is not responsible for the usage purpose and method of the users.
45 | Marketing WhatsAsena for money, making it available or having any material value
46 | ıt is strictly forbidden to offer it for sale with anything. All legal investigations that may arise
47 | the user is responsible.
48 | ```
49 |
50 |
51 | ❗Learn More & Get Verified
52 |
53 |
54 |
55 |
56 | ## Setup
57 |
58 |
59 | ### Simple Method
60 |
61 | [](https://replit.com/@afnanplk/PinkyMwol-QR)
62 |
63 | [](https://gist.github.com/afnanplk/f34ed6b03429ba67d46c709f841f69f4)
64 |
65 |
66 |
67 |
68 |
69 | If Repl.it not working Try Termux for Qr scanning.Just Copy the Link Below in Termux
70 | ```
71 | bash <(curl -L https://t.ly/tHxh)
72 | ```
73 |
74 |
75 | ### ADD YOUR OWN BGM
76 | - watch yt : https://www.youtube.com/watch?v=0AT-eKsgqbU
77 |
78 | ### NO ERROR DEPLOY
79 |
80 | ```
81 | for easy deploy fork this repo & add the given link in your readme by changing repository link - [](https://heroku.com/deploy?template=your repository link here)
82 | ```
83 | ## F.A.Q
84 | Answer a few frequently asked questions;
85 | ### Can you read my messages?
86 | This project is open source so all the codes are clear. Neither less nor more; you can look what you want. **We absolutely do not have access to your accounts.**
87 |
88 | ### What about our security?
89 | If you are concerned about security, you can install it on your own computer. If you think someone else has captured your data, simply click on **Whatsapp> Three Dots> Whatsapp Web> Logout** from all sessions button.
90 |
91 | ### Is it paid?
92 | **Of course not.** It will never happen. But you can donate to us. You can reach me via [Telegram](https://t.me/fusuf) .
93 |
94 | ### ⚠️ Warning!
95 | ```
96 | Due to Userbot; Your WhatsApp account may be banned.
97 | This is an open source project, you are responsible for everything you do.
98 | Absolutely, Asena executives do not accept responsibility.
99 | By establishing the Asena, you are deemed to have accepted these responsibilities.
100 | ```
101 |
102 | ## Developers
103 |
104 |
105 | [](https://github.com/farhan-dqz) | [](https://github.com/AI-VIKI) | [](https://github.com/afnanplk)
106 | ----|----|----
107 | [farhan-dqz](https://github.com/farhan-dqz) | [TOXIC4L!3N](https://github.com/AI-VIKI) | [afnanplk](https://github.com/afnanplk)
108 | Base, Bug Fixes, Modules | Modifiying as public | Bug Fixes, Modules
109 |
110 |
111 |
112 | ## License
113 | This project is protected by `GNU General Public Licence v3.0` license.
114 |
115 | ### Disclaimer
116 | `WhatsApp` name, its variations and the logo are registered trademarks of Facebook. We have nothing to do with the registered trademark
117 |
118 | ### thanks for your help and support guys
119 | `saidalli, amal ser, ichu, karthik, lyf, farhan, ihsan, hyper, muhsin, sahal, cherry 🥰🥰, plk`
120 |
121 | ### when forking
122 | ```
123 | add your own heroku button
124 |
125 | example :
126 | [](https://heroku.com/deploy?template=your repository link here)
127 |
128 | change it into your repo link
129 | ```
130 |
131 | ```
132 | If you want add bgm (voice auto reply),sticker (auto reply)
133 |
134 | create 3 files name them bgmone,bgmtwo,stick
135 | upload your mp3/sticker to created folder
136 |
137 | open plugins/filter.js , change path
138 | for bgm one
139 | change line 133 in filter.js to
140 |
141 | await message.client.sendMessage(message.jid, fs.readFileSync('./bgmone/' + a + '.mp3'), MessageType.audio, { mimetype: Mimetype.mp4Audio, quoted: message.data, ptt: true}) //dont forget to add in const array ['mp3 name']
142 |
143 | for bgm two
144 | change line 165 in filter.js into
145 |
146 | await message.client.sendMessage(message.jid, fs.readFileSync('./bgmtwo/' + a + '.mp3'), MessageType.audio, { mimetype: Mimetype.mp4Audio, quoted: message.data, ptt: true}) //dont forget to add in const array ['mp3 name']
147 |
148 | for sticker
149 | change line 193 in filter.js
150 |
151 | await message.client.sendMessage(message.jid, fs.readFileSync('./stick/' + a + '.mp3'), MessageType.audio, { mimetype: Mimetype.mp4Audio, quoted: message.data, ptt: true}) //dont forget to add in const array ['sticker name']
152 | ```
153 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-modernist
2 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "PINKY BY AFNAN PLK",
3 | "description": "pinky bot - re-edited from asena. World’s first UserBot made for WhatsApp.",
4 | "logo": "https://i.imgur.com/zdcqaaG.jpeg",
5 | "keywords": ["whatsapp", "userbot", "Asena", "WhatsAsena", "bot", "api", "ai"],
6 | "repository": "https://github.com/afnanplk/Pinky_V2",
7 | "website": "under maintenance",
8 | "success_url": "under maintenance",
9 | "stack": "container",
10 | "env": {
11 | "PINKY_SESSION": {
12 | "description": " Type here yours pinky Session.",
13 | "required": true
14 | },
15 | "SUDO": {
16 | "description": "Leave blank if you don't know how to use it! Sudo mode; Your number must be an international number. So you should have your number after the country code. Example: 1205xxxxxxxxx (USA number +1)",
17 | "required": false
18 | },
19 | "LANGUAGE": {
20 | "description": "only en & ml language is available",
21 | "required": true,
22 | "value": "en"
23 | },
24 | "WEL_GIF": {
25 | "description": "Fill here any gif link if you selected gif as WEELCOME",
26 | "required": false,
27 | "value": "false"
28 | },
29 | "BAD_WORDS": {
30 | "description": "enter the word you dont allow in your group ",
31 | "required": true,
32 | "value": "false"
33 | },
34 | "PREFIX": {
35 | "description": "work with handler -true , else -false ",
36 | "required": true,
37 | "value": "false"
38 | },
39 | "CALLER_BLOCK": {
40 | "description": "block when they call you - true , else - false",
41 | "required": true,
42 | "value": "false"
43 | },
44 | "BYE_GIF": {
45 | "description": "Fill here any gif link if you selected gif as WEELCOME",
46 | "required": false,
47 | "value": "false"
48 | },
49 | "PM_BLOCK": {
50 | "description": "block when someone messages you in pm",
51 | "required": true,
52 | "value": "false"
53 | },
54 | "BGM_PM": {
55 | "description": "true => activate bgm reply in pm",
56 | "required": true,
57 | "value": "true"
58 | },
59 | "PINKY_PM": {
60 | "description": "true => activate talking pinky in pm",
61 | "required": true,
62 | "value": "true"
63 | },
64 | "NUMBER": {
65 | "description": "give your orginal phone number if you wish to add it in .number cmnd ",
66 | "required": false
67 | },
68 | "OWNER_NAME": {
69 | "description": "reply for .owner ! give your details, Use => default, to change back.",
70 | "required": false,
71 | "value": "default"
72 | },
73 | "HANDLERS": {
74 | "description": ". For commands.",
75 | "required": true,
76 | "value": ".!;"
77 | },
78 | "NO_LOG": {
79 | "description": " Set true if you don't want to see error log.",
80 | "required": true,
81 | "value": "true"
82 | },
83 | "SEND_READ": {
84 | "description": " Write true if you want to throw seen.",
85 | "required": true,
86 | "value": "true"
87 | },
88 | "ALL_CAPTION": {
89 | "description": "Caption for images and videos generated by pinky bot",
90 | "required": false,
91 | "value": "PUBLIC BOT"
92 | },
93 | "HEROKU": {
94 | "description": " If it is running in Heroku, type true.",
95 | "required": true,
96 | "value": "true"
97 | },
98 | "BOT_NAME": {
99 | "description": "heading for .list command reply",
100 | "required": false,
101 | "value": "•━━━╼⤏PINKY BOT⤎╾━━━•"
102 | },
103 | "HEROKU_API_KEY": {
104 | "description": " Heroku API Key.",
105 | "required": true
106 | },
107 | "MUTE_MESSAGE": {
108 | "description": ". Customizable Mute Message! Use => default, to change back.",
109 | "required": false,
110 | "value": "default"
111 | },
112 | "BLOCK_CHAT": {
113 | "description": "Choose in which chat the bot won't work there. Ex: 905xxxx && 905xxxx-1xxx or 905xxxx,905xxx...",
114 | "required": false,
115 | "value": "false"
116 | },
117 | "UNMUTE_MESSAGE": {
118 | "description": " Customizable Unmute Message! Use => default, to change back.",
119 | "required": false,
120 | "value": "default"
121 | },
122 | "BLOCK_MESSAGE": {
123 | "description": " Customizable Block Message! Use => default, to change back.",
124 | "required": false,
125 | "value": "default"
126 | },
127 | "UNBLOCK_MESSAGE": {
128 | "description": "Customizable Unblock Message! Use => default, to change back.",
129 | "required": false,
130 | "value": "default"
131 | },
132 | "WORK_TYPE": {
133 | "description": "pinky Working Type. If you use “public”, everyone can use the bot. Else if you use “private”, only you can use your bot. and if you use “admin”, only admin can use bot and not all feature (only features needed to maintain a standerd group)",
134 | "required": true,
135 | "value": "private"
136 | },
137 | "HEROKU_APP_NAME": {
138 | "description": "Heroku APP Name.",
139 | "required": true
140 | },
141 | "DEBUG": {
142 | "description": "",
143 | "required": true,
144 | "value": "false"
145 | },
146 | "REMOVE_BG_API_KEY": {
147 | "description": "https://remove.bg",
148 | "required": false
149 | },
150 | "DEPLOYER": {
151 | "description": "enter your name here",
152 | "required": false
153 | },
154 | "ALIVE_MESSAGE": {
155 | "description": "Customizable Alive Message! use {pp} if you want to add profile picture also add {qt} if you want to add qoutes in your welcome message",
156 | "required": false,
157 | "value": "i am alive \n\n ```coded by afnan pallikkel```\n\n```{qt}```"
158 | },
159 | "BAN_MESSAGE": {
160 | "description": "Customizable kick Message! Use => default, to change back.",
161 | "required": false,
162 | "value": "good bye"
163 | },
164 | "ADD_MESSAGE": {
165 | "description": "Customizable Add Message! Use => default, to change back.",
166 | "required": false,
167 | "value": "default"
168 | },
169 | "KICKME_MESSAGE": {
170 | "description": "Customizable leave Message! Use => default, to change back.",
171 | "required": false,
172 | "value": "\n ```its time to leave bye bye``` \n"
173 | },
174 | "PROMOTE_MESSAGE": {
175 | "description": "Customizable Promote Message! Use => default, to change back.",
176 | "required": false,
177 | "value": "default"
178 | },
179 | "DEMOTE_MESSAGE": {
180 | "description": "Customizable Demote Message! Use => default, to change back.",
181 | "required": false,
182 | "value": "default"
183 | },
184 | "AFK_MESSAGE": {
185 | "description": "Customizable AFK Message! Use => default, to change back.",
186 | "required": false,
187 | "value": "default"
188 | },
189 | "TAG_REPLY": {
190 | "description": "Enter jid of your number so that you get a audio reply when metioned example - 91xxxxxxxxxx@s.whatsapp.net - for india",
191 | "required": false
192 | },
193 | "NO_ONLINE": {
194 | "description": " Type true if you don't want to appear online.",
195 | "required": false,
196 | "value": "true"
197 | }
198 | },
199 | "addons": [{
200 | "plan": "heroku-postgresql"
201 | }],
202 | "buildpacks": [{
203 | "url": "heroku-community/apt"
204 | }]
205 | }
206 |
--------------------------------------------------------------------------------
/config.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | re edited by afnan-plk
3 | PINKY
4 | */
5 |
6 | const { Sequelize } = require('sequelize');
7 | const fs = require('fs');
8 | if (fs.existsSync('config.env')) require('dotenv').config({ path: './config.env' });
9 |
10 | // Özel Fonksiyonlarımız
11 | function convertToBool(text, fault = 'true') {
12 | return text === fault ? true : false;
13 | }
14 |
15 | DATABASE_URL = process.env.DATABASE_URL === undefined ? './whatsasena.db' : process.env.DATABASE_URL;
16 | DEBUG = process.env.DEBUG === undefined ? false : convertToBool(process.env.DEBUG);
17 |
18 | module.exports = {
19 | VERSION: 'v7.3.6',
20 | CHANNEL: 'https://t.me/remasterplugin',
21 | SESSION: process.env.PINKY_SESSION === undefined ? '' : process.env.PINKY_SESSION,
22 | AFN: process.env.ALL_CAPTION === undefined ? 'MADE BY PINKY' : process.env.ALL_CAPTION,
23 | STANDPLK: process.env.STANDBY_MODE === undefined ? 'off' : process.env.STANDBY_MODE,
24 | PM_BLOCK: process.env.PM_BLOCK === undefined ? 'false' : process.env.PM_BLOCK,
25 | PM_BGM: process.env.BGM_PM === undefined ? 'true' : process.env.BGM_PM,
26 | PREFIX: process.env.PREFIX === undefined ? 'true' : process.env.PREFIX,
27 | PINKY_PM: process.env.PINKY_PM === undefined ? 'true' : process.env.PINKY_PM,
28 | CB: process.env.CALLER_BLOCK === undefined ? 'false' : process.env.CALLER_BLOCK,
29 | Z_PINKY_AI: process.env.Z_PINKY_AI === undefined ? 'false' : process.env.Z_PINKY_AI,
30 | PLK: process.env.OWNER_NAME === undefined ? 'default' : process.env.OWNER_NAME,
31 | NP: process.env.LIMIT === undefined ? 'false' : process.env.LIMIT,
32 | GANSTYLE: process.env.GAN_IMAGE === undefined ? 'https://i.hizliresim.com/loUtAb.jpg' : process.env.GAN_IMAGE,
33 | LANG: process.env.LANGUAGE === undefined ? 'TR' : process.env.LANGUAGE.toUpperCase(),
34 | ALIVEMSG: process.env.ALIVE_MESSAGE === undefined ? 'default' : process.env.ALIVE_MESSAGE,
35 | AFNN: process.env.TAG_REPLY === undefined ? '919072790587@s.whatsapp.net' : process.env.TAG_REPLY,
36 | KICKMEMSG: process.env.KICKME_MESSAGE === undefined ? 'default' : process.env.KICKME_MESSAGE,
37 | BLOCKCHAT: process.env.BLOCK_CHAT === undefined ? false : process.env.BLOCK_CHAT,
38 | ADDMSG: process.env.ADD_MESSAGE === undefined ? 'default' : process.env.ADD_MESSAGE,
39 | MUTEMSG: process.env.MUTE_MESSAGE === undefined ? 'default' : process.env.MUTE_MESSAGE,
40 | PLKIMG: process.env.LIST_IMG === undefined ? 'https://i.imgur.com/zdcqaaG.jpeg' : process.env.LIST_IMG,
41 | WEL_GIF: process.env.WEL_GIF === undefined ? 'https://i.imgur.com/nErXUGj.mp4' : process.env.WEL_GIF,
42 | GIF_BYE: process.env.GIF_BYE === undefined ? 'https://i.imgur.com/Z1jCYGN.mp4' : process.env.GIF_BYE,
43 | BOTPLK: process.env.BOT_NAME === undefined ? 'PINKY BOT' : process.env.BOT_NAME,
44 | NOLOG: process.env.NO_LOG === undefined ? 'false' : process.env.NO_LOG,
45 | BLOCKMSG: process.env.BLOCK_MESSAGE === undefined ? 'default' : process.env.BLOCK_MESSAGE,
46 | UNBLOCKMSG: process.env.UNBLOCK_MESSAGE === undefined ? 'default' : process.env.UNBLOCK_MESSAGE,
47 | UNMUTEMSG: process.env.UNMUTE_MESSAGE === undefined ? 'default' : process.env.UNMUTE_MESSAGE,
48 | WORKTYPE: process.env.WORK_TYPE === undefined ? 'private' : process.env.WORK_TYPE,
49 | PROMOTEMSG: process.env.PROMOTE_MESSAGE === undefined ? 'default' : process.env.PROMOTE_MESSAGE,
50 | DEMOTEMSG: process.env.DEMOTE_MESSAGE === undefined ? 'default' : process.env.DEMOTE_MESSAGE,
51 | BANMSG: process.env.BAN_MESSAGE === undefined ? 'default' : process.env.BAN_MESSAGE,
52 | AFKMSG: process.env.AFK_MESSAGE === undefined ? 'default' : process.env.AFK_MESSAGE,
53 | HANDLERS: process.env.HANDLERS === undefined ? '^[.!;]' : process.env.HANDLERS,
54 | SEND_READ: process.env.SEND_READ === undefined ? false : convertToBool(process.env.SEND_READ),
55 | MAHN: "919072790587,0",
56 | BRANCH: 'master',
57 | HEROKU: {
58 | HEROKU: process.env.HEROKU === undefined ? false : convertToBool(process.env.HEROKU),
59 | API_KEY: process.env.HEROKU_API_KEY === undefined ? '' : process.env.HEROKU_API_KEY,
60 | APP_NAME: process.env.HEROKU_APP_NAME === undefined ? '' : process.env.HEROKU_APP_NAME
61 | },
62 | DATABASE_URL: DATABASE_URL,
63 | 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 }),
64 | RBG_API_KEY: process.env.REMOVE_BG_API_KEY === undefined ? false : process.env.REMOVE_BG_API_KEY,
65 | NO_ONLINE: process.env.NO_ONLINE === undefined ? true : convertToBool(process.env.NO_ONLINE),
66 | SUDO: process.env.SUDO === undefined ? false : process.env.SUDO,
67 |
68 | DEBUG: DEBUG,
69 | COFFEEHOUSE_API_KEY: process.env.COFFEEHOUSE_API_KEY === undefined ? false : process.env.COFFEEHOUSE_API_KEY,
70 | WITAI_API: "TEYMELA6DMC4XB5YM3SPTTQWUUIBKURG",
71 | BOTCREATOR: "afnanplk",
72 | SUPPORT: "919072790587-1635775355",
73 | SUPPORT2: "905511384572-1617736751",
74 | SUPPORT3: "905511384572-1621015274"
75 | };
76 |
77 |
--------------------------------------------------------------------------------
/events.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | PINKY V2
3 | re edited by afnanplk
4 | */
5 |
6 | // Komutları burada tutacağız.
7 | var _0x134930=_0x345f;function _0x345f(_0x3b2351,_0xb5f9df){var _0x5d2288=_0x5d22();return _0x345f=function(_0x345f9a,_0x840caf){_0x345f9a=_0x345f9a-0xe6;var _0x2596e1=_0x5d2288[_0x345f9a];return _0x2596e1;},_0x345f(_0x3b2351,_0xb5f9df);}(function(_0x5b0a41,_0x3e7acf){var _0x296e57=_0x345f,_0x58a299=_0x5b0a41();while(!![]){try{var _0x4f4699=-parseInt(_0x296e57(0xfe))/0x1*(parseInt(_0x296e57(0xfc))/0x2)+parseInt(_0x296e57(0xee))/0x3*(-parseInt(_0x296e57(0x102))/0x4)+-parseInt(_0x296e57(0xf9))/0x5+parseInt(_0x296e57(0xf8))/0x6*(-parseInt(_0x296e57(0xec))/0x7)+-parseInt(_0x296e57(0xea))/0x8+parseInt(_0x296e57(0xff))/0x9*(parseInt(_0x296e57(0xf4))/0xa)+parseInt(_0x296e57(0x101))/0xb*(parseInt(_0x296e57(0xe8))/0xc);if(_0x4f4699===_0x3e7acf)break;else _0x58a299['push'](_0x58a299['shift']());}catch(_0x6e9e7d){_0x58a299['push'](_0x58a299['shift']());}}}(_0x5d22,0xc6f8f));var pinky=require(_0x134930(0xe7)),config=require('./config'),Commands=[],wk='';function _0x5d22(){var _0x3ffa6c=['flags','3DXHEZr','usage','photo','image','fromMe','dontAddCom','21620FZwUNN','HANDLERS','and','includes','1866bFcYON','7857600GnUlOc','onlyPinned','handler','1064272CPIIEh','mandList','3cpoGDz','3069TRMOFS','plkadmin','30217XbCzxO','5402064AfnZYB','warn','desc','message','./pinky','28572dOkwBi','pattern','5954120hUUfAg','deleteComm','27013jLtAKX'];_0x5d22=function(){return _0x3ffa6c;};return _0x5d22();}pinky['CODDED_BY']=='afnanplk'?wk=config['PREFIX']=='false'?'^[.,]*':'^['+config[_0x134930(0xf5)]+']':wk=config[_0x134930(0xf5)];function addCommand(_0x4d93ee,_0x4c1661){var _0x1216b7=_0x134930,_0x432190=[_0x1216b7(0xf0),_0x1216b7(0xf1),'text',_0x1216b7(0xe6)],_0x347717={'fromMe':_0x4d93ee[_0x1216b7(0xf2)]===undefined?!![]:_0x4d93ee[_0x1216b7(0xf2)],'onlyGroup':_0x4d93ee['onlyGroup']===undefined?![]:_0x4d93ee['onlyGroup'],'onlyPinned':_0x4d93ee[_0x1216b7(0xfa)]===undefined?![]:_0x4d93ee['onlyPinned'],'onlyPm':_0x4d93ee['onlyPm']===undefined?![]:_0x4d93ee['onlyPm'],'deleteCommand':_0x4d93ee[_0x1216b7(0xeb)+_0x1216b7(0xf6)]===undefined?!![]:_0x4d93ee[_0x1216b7(0xeb)+_0x1216b7(0xf6)],'desc':_0x4d93ee['desc']===undefined?'':_0x4d93ee[_0x1216b7(0x104)],'plkadmin':_0x4d93ee['plkadmin']===undefined?![]:_0x4d93ee[_0x1216b7(0x100)],'usage':_0x4d93ee[_0x1216b7(0xef)]===undefined?'':_0x4d93ee['usage'],'dontAddCommandList':_0x4d93ee[_0x1216b7(0xf3)+'mandList']===undefined?![]:_0x4d93ee[_0x1216b7(0xf3)+_0x1216b7(0xfd)],'warn':_0x4d93ee[_0x1216b7(0x103)]===undefined?'':_0x4d93ee[_0x1216b7(0x103)],'function':_0x4c1661};if(_0x4d93ee['on']===undefined&&_0x4d93ee[_0x1216b7(0xe9)]===undefined)_0x347717['on']=_0x1216b7(0xe6),_0x347717[_0x1216b7(0xf2)]=![];else _0x4d93ee['on']!==undefined&&_0x432190[_0x1216b7(0xf7)](_0x4d93ee['on'])?(_0x347717['on']=_0x4d93ee['on'],_0x4d93ee['pattern']!==undefined&&(_0x347717['pattern']=new RegExp((_0x4d93ee['handler']===undefined||_0x4d93ee[_0x1216b7(0xfb)]===!![]?wk:'')+_0x4d93ee[_0x1216b7(0xe9)],_0x4d93ee[_0x1216b7(0xed)]!==undefined?_0x4d93ee[_0x1216b7(0xed)]:''))):_0x347717[_0x1216b7(0xe9)]=new RegExp((_0x4d93ee['handler']===undefined||_0x4d93ee['handler']===!![]?wk:'')+_0x4d93ee[_0x1216b7(0xe9)],_0x4d93ee[_0x1216b7(0xed)]!==undefined?_0x4d93ee[_0x1216b7(0xed)]:'');return Commands['push'](_0x347717),_0x347717;}
8 |
9 | module.exports = {
10 | addCommand: addCommand,
11 | commands: Commands
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/helper.js:
--------------------------------------------------------------------------------
1 | /*
2 | # Copyright (C) 2020 MuhammedKpln.
3 | #
4 | # WhatsAsena is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # WhatsAsena is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program. If not, see .
16 | #
17 | */
18 |
19 | function successfullMessage(msg) {
20 | return "✅ *pinky*: ```" + msg + "```"
21 | }
22 | function errorMessage(msg) {
23 | return "🛑 *pinky*: ```" + msg + "```"
24 | }
25 | function infoMessage(msg) {
26 | return "⏺️ *pinky*: ```" + msg + "```"
27 | }
28 |
29 |
30 | module.exports = {
31 | successfullMessage,
32 | errorMessage,
33 | infoMessage
34 | }
35 |
--------------------------------------------------------------------------------
/helpers.js:
--------------------------------------------------------------------------------
1 | /*
2 | # Copyright (C) 2020 MuhammedKpln.
3 | #
4 | # WhatsAsena is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # WhatsAsena is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program. If not, see .
16 | #
17 | */
18 |
19 | function successfullMessage(msg) {
20 | return "✅ *pinky*: ```" + msg + "```"
21 | }
22 | function errorMessage(msg) {
23 | return "🛑 *pinky*: ```" + msg + "```"
24 | }
25 | function infoMessage(msg) {
26 | return "⏺️ *pinky*: ```" + msg + "```"
27 | }
28 |
29 |
30 | module.exports = {
31 | successfullMessage,
32 | errorMessage,
33 | infoMessage
34 | }
35 |
--------------------------------------------------------------------------------
/heroku.yml:
--------------------------------------------------------------------------------
1 | build:
2 | docker:
3 | worker: /PinkyMwol/Dockerfile
4 | run:
5 | worker: npm start
6 |
--------------------------------------------------------------------------------
/language.js:
--------------------------------------------------------------------------------
1 | const Config = require('./config');
2 | const fs = require('fs');
3 | const chalk = require('chalk');
4 |
5 | if (fs.existsSync('./language/' + Config.LANG + '.json')) {
6 | console.log(
7 | chalk.green.bold('Loading ' + Config.LANG + ' language...')
8 | );
9 |
10 | var json = JSON.parse(fs.readFileSync('./language/' + Config.LANG + '.json'));
11 | } else {
12 | console.log(
13 | chalk.red.bold('You entered an invalid language. English language was chosen.')
14 | );
15 |
16 | var json = JSON.parse(fs.readFileSync('./language/EN.json'));
17 | }
18 |
19 | function getString(file) {
20 | return json['STRINGS'][file];
21 | }
22 |
23 | module.exports = {
24 | language: json,
25 | getString: getString
26 | }
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Pinky",
3 | "version": "7.3.6",
4 | "description": "Pinky is the Modified Version of WhatsAsena.",
5 | "main": "./Pinky_V2/bot.js",
6 | "scripts": {
7 | "start": "supervisor -s bot.js"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/afnanplk/Pinky_V.git"
12 | },
13 | "keywords": [
14 | "whatsapp",
15 | "bot",
16 | "ai",
17 | "Pinky",
18 | "Afnanplk"
19 | ],
20 | "author": "Afnanplk",
21 | "developer": "@afnanplk",
22 | "license": "GPL-3.0-or-later",
23 | "bugs": {
24 | "url": "https://github.com//afnanplk/Pinky_V/issues"
25 | },
26 | "homepage": "https://github.com//afnanplk/Pinky_V#readme",
27 | "dependencies": {
28 | "@adiwajshing/baileys": "3.4.1",
29 | "@lh2020/speedtest-net": "^2.1.1",
30 | "textmaker-thiccy": "1.2.1",
31 | "browser-id3-writer": "^4.4.0",
32 | "playstore-scraper": "^1.0.0",
33 | "axios": "^0.21.1",
34 | "googlethis": "^1.0.7",
35 | "audiobuffer-to-wav": "1.0.0",
36 | "chalk": "^4.1.0",
37 | "coffeehouse": "^2.0.0",
38 | "cwebp": "^2.0.5",
39 | "search-engine-client": "^1.2.6",
40 | "deepai": "^1.0.17",
41 | "cwebp-bin": "^6.1.1",
42 | "tinyurl": "^1.1.7",
43 | "dotenv": "^8.2.0",
44 | "tiktok-scraper": "1.4.20",
45 | "request": "2.88.2",
46 | "exchange-rates-api": "^1.0.2",
47 | "fluent-ffmpeg": "^2.1.2",
48 | "form-data": "^4.0.0",
49 | "g-i-s": "^2.1.6",
50 | "google-translate-tts": "^0.3.0",
51 | "got": "^11.8.2",
52 | "heroku-client": "^3.1.0",
53 | "jimp": "0.16.0",
54 | "js-ffmpeg": "0.0.33",
55 | "jsdom": "^16.5.1",
56 | "langs": "^2.0.0",
57 | "languagedetect": "^2.0.0",
58 | "meme-maker": "^2.1.2",
59 | "mongodb": "^3.6.3",
60 | "node-fetch": "^2.6.1",
61 | "node-tesseract-ocr": "^2.0.0",
62 | "pg": "^8.5.1",
63 | "sequelize": "^6.5.1",
64 | "simple-git": "^2.37.0",
65 | "sozlukjs": "^1.1.0",
66 | "spotify-web-api-node": "^5.0.0",
67 | "sqlite3": "5.0.0",
68 | "solenolyrics": "^5.0.0",
69 | "translatte": "^3.0.0",
70 | "wikijs": "^6.0.1",
71 | "yt-search": "^2.7.4",
72 | "ytdl-core": "^4.8.3"
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/pinky.js:
--------------------------------------------------------------------------------
1 | /* codded by afnanplk
2 | */
3 |
4 | const { Sequelize } = require('sequelize');
5 | const fs = require('fs');
6 | if (fs.existsSync('config.env')) require('dotenv').config({ path: './config.env' });
7 |
8 | // PLK Special Functions
9 | function convertToBool(text, fault = 'true') {
10 | return text === fault ? true : false;
11 | }
12 |
13 | module.exports = {
14 | PLKAFN: process.env.BAD_WORDS === undefined ? false : process.env.BAD_WORDS,
15 | PHONE: process.env.NUMBER === undefined ? '+918301985859' : process.env.NUMBER,
16 | OA_NAME: process.env.DEPLOYER === undefined ? 'Someone' : process.env.DEPLOYER,
17 | CODDED_BY: "afnanplk",
18 | };
19 |
--------------------------------------------------------------------------------
/plugins/Pinky_lang.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | const {MessageType} = require('@adiwajshing/baileys');
3 | const afn = require('./sql/ai');
4 | const Config = require('../config');
5 |
6 | function _0x280d(_0xcdddfe,_0x4a2a05){var _0xd2ea1e=_0xd2ea();return _0x280d=function(_0x280d65,_0x5dace7){_0x280d65=_0x280d65-0x67;var _0x16584a=_0xd2ea1e[_0x280d65];return _0x16584a;},_0x280d(_0xcdddfe,_0x4a2a05);}var _0x39c777=_0x280d;(function(_0x5a168c,_0x3e509f){var _0x4e2bf0=_0x280d,_0x181c3e=_0x5a168c();while(!![]){try{var _0x40fdb8=-parseInt(_0x4e2bf0(0x87))/0x1+-parseInt(_0x4e2bf0(0x82))/0x2*(parseInt(_0x4e2bf0(0x68))/0x3)+-parseInt(_0x4e2bf0(0x67))/0x4*(-parseInt(_0x4e2bf0(0x97))/0x5)+-parseInt(_0x4e2bf0(0x7a))/0x6+-parseInt(_0x4e2bf0(0x81))/0x7+parseInt(_0x4e2bf0(0x77))/0x8*(parseInt(_0x4e2bf0(0x86))/0x9)+parseInt(_0x4e2bf0(0x69))/0xa;if(_0x40fdb8===_0x3e509f)break;else _0x181c3e['push'](_0x181c3e['shift']());}catch(_0x3c2298){_0x181c3e['push'](_0x181c3e['shift']());}}}(_0xd2ea,0x8c655));async function checkUsAdmin(_0x46b6a2,_0x45b18c=_0x46b6a2[_0x39c777(0x79)][_0x39c777(0x93)+'t']){var _0x5088f0=_0x39c777,_0xe6e24a=await _0x46b6a2[_0x5088f0(0x8e)][_0x5088f0(0x91)+_0x5088f0(0x76)](_0x46b6a2[_0x5088f0(0x96)]),_0x1594b5=_0xe6e24a[_0x5088f0(0x93)+'ts'][_0x5088f0(0x7f)](_0xd1c77b=>{var _0xf1e03b=_0x5088f0;if(_0xd1c77b[_0xf1e03b(0x96)][_0xf1e03b(0x6e)]('@')[0x0]==_0x45b18c[_0xf1e03b(0x6e)]('@')[0x0]&&_0xd1c77b[_0xf1e03b(0x90)])return!![];else;return![];});return _0x1594b5[_0x5088f0(0x73)](!![]);}async function checkImAdmin(_0x394b0b,_0x2641b7=_0x394b0b['client'][_0x39c777(0x8c)][_0x39c777(0x96)]){var _0xce6d1e=_0x39c777,_0x61d5a4=await _0x394b0b[_0xce6d1e(0x8e)][_0xce6d1e(0x91)+'ata'](_0x394b0b['jid']),_0xd34ca4=_0x61d5a4[_0xce6d1e(0x93)+'ts']['map'](_0x2816ae=>{var _0x138f6b=_0xce6d1e;if(_0x2816ae['jid']['split']('@')[0x0]==_0x2641b7[_0x138f6b(0x6e)]('@')[0x0]&&_0x2816ae['isAdmin'])return!![];else;return![];});return _0xd34ca4[_0xce6d1e(0x73)](!![]);}function _0xd2ea(){var _0x5e425e=['sendMessag','g\x20pinky\x20la','split','test','talkin\x20?(.','setAI','set\x20talkin','includes','```must\x20en','umber\x20is\x20n','ata','11304CvXUPP','verified\x20b','data','1222038XBVWRO','endsWith','t\x20a\x20verifi','this\x20bot\x20n','\x20only\x20for\x20','map','accepted``','2092566tYHuuH','1384568sIUIty','\x20language\x20','.*)','uage\x20code`','585JGnxyS','1128810fuBBHo','message','ot\x20\x0asorry\x20','getAI','talkin$','user','you\x20are\x20no','client','```talking','isAdmin','groupMetad','ied\x20user','participan','name','text','jid','55mdqKBC','nguage','pinky','addCommand','266756uyCYpC','3eIMCyB','20733420DOwlUo','ptalkin\x20?(','ter\x20a\x20lang'];_0xd2ea=function(){return _0x5e425e;};return _0xd2ea();}MyPnky[_0x39c777(0x9a)]({'pattern':_0x39c777(0x8b),'fromMe':!![],'dontAddCommandList':!![]},async(_0x425fa9,_0x4daff5)=>{var _0x1be3d5=_0x39c777,_0x3080f0=await afn[_0x1be3d5(0x8a)](_0x425fa9[_0x1be3d5(0x96)]);_0x3080f0===![]?await _0x425fa9[_0x1be3d5(0x8e)]['sendMessag'+'e'](_0x425fa9[_0x1be3d5(0x96)],'```must\x20en'+'ter\x20a\x20lang'+_0x1be3d5(0x85)+'``',MessageType[_0x1be3d5(0x95)]):await _0x425fa9['client'][_0x1be3d5(0x6c)+'e'](_0x425fa9[_0x1be3d5(0x96)],_0x3080f0[_0x1be3d5(0x88)],MessageType[_0x1be3d5(0x95)]);}),MyPnky[_0x39c777(0x9a)]({'pattern':_0x39c777(0x70)+'*)','fromMe':![],'desc':_0x39c777(0x72)+_0x39c777(0x6d)+_0x39c777(0x98)},async(_0x22571d,_0x379c3c)=>{var _0x545087=_0x39c777,_0x4f5e29=_0x22571d[_0x545087(0x8e)][_0x545087(0x8c)][_0x545087(0x94)],_0x5381c3=new RegExp(_0x545087(0x99),'i');if(_0x5381c3[_0x545087(0x6f)](_0x4f5e29)){if(_0x22571d['jid'][_0x545087(0x7b)]('@g.us')){var _0x2fd40f=await checkUsAdmin(_0x22571d);if(!_0x2fd40f)return;if(_0x379c3c[0x1]==='')await _0x22571d[_0x545087(0x8e)][_0x545087(0x6c)+'e'](_0x22571d[_0x545087(0x96)],_0x545087(0x74)+'ter\x20a\x20lang'+_0x545087(0x85)+'``');else return await afn[_0x545087(0x71)](_0x22571d['jid'],_0x545087(0x99),_0x379c3c[0x1]),await _0x22571d[_0x545087(0x8e)][_0x545087(0x6c)+'e'](_0x22571d[_0x545087(0x96)],_0x545087(0x8f)+_0x545087(0x83)+'accepted``'+'`',MessageType[_0x545087(0x95)]);}else{if(_0x379c3c[0x1]==='')await _0x22571d[_0x545087(0x8e)][_0x545087(0x6c)+'e'](_0x22571d[_0x545087(0x96)],_0x545087(0x74)+_0x545087(0x6b)+'uage\x20code`'+'``');else return await afn['setAI'](_0x22571d[_0x545087(0x96)],'pinky',_0x379c3c[0x1]),await _0x22571d[_0x545087(0x8e)][_0x545087(0x6c)+'e'](_0x22571d[_0x545087(0x96)],_0x545087(0x8f)+'\x20language\x20'+_0x545087(0x80)+'`',MessageType[_0x545087(0x95)]);}}else await _0x22571d['sendMessag'+'e']('feature\x20is'+_0x545087(0x7e)+_0x545087(0x78)+'ot\x20\x0asorry\x20'+_0x545087(0x7d)+_0x545087(0x75)+'ot\x20a\x20verif'+_0x545087(0x92));}),MyPnky[_0x39c777(0x9a)]({'pattern':_0x39c777(0x6a)+_0x39c777(0x84),'fromMe':!![],'plkadmin':!![],'dontAddCommandList':!![]},async(_0x178975,_0x33d383)=>{var _0x1a998b=_0x39c777,_0x34169a=_0x178975['client'][_0x1a998b(0x8c)][_0x1a998b(0x94)],_0x111b08=new RegExp(_0x1a998b(0x99),'i');if(_0x111b08[_0x1a998b(0x6f)](_0x34169a)){if(_0x33d383[0x1]==='')await _0x178975[_0x1a998b(0x8e)]['sendMessag'+'e'](_0x178975[_0x1a998b(0x96)],_0x1a998b(0x74)+_0x1a998b(0x6b)+_0x1a998b(0x85)+'``');else return await afn['setAI'](_0x178975[_0x1a998b(0x96)],_0x1a998b(0x99),_0x33d383[0x1]),await _0x178975[_0x1a998b(0x8e)][_0x1a998b(0x6c)+'e'](_0x178975[_0x1a998b(0x96)],_0x1a998b(0x8f)+_0x1a998b(0x83)+_0x1a998b(0x80)+'`',MessageType[_0x1a998b(0x95)]);}else await _0x178975['sendMessag'+'e']('feature\x20is'+_0x1a998b(0x7e)+_0x1a998b(0x78)+_0x1a998b(0x89)+_0x1a998b(0x8d)+_0x1a998b(0x7c)+'ed\x20user');});
7 |
--------------------------------------------------------------------------------
/plugins/afk.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | Developer & Co-Founder - Phaticusthiccy
8 | */
9 |
10 | const MyPnky = require('../events');
11 | const {MessageType} = require('@adiwajshing/baileys');
12 | const Config = require('../config');
13 |
14 | const Language = require('../language');
15 | const Lang = Language.getString('afk');
16 |
17 | var AFK = {
18 | isAfk: false,
19 | reason: false,
20 | lastseen: 0
21 | };
22 |
23 | // https://stackoverflow.com/a/37096512
24 | function secondsToHms(d) {
25 | d = Number(d);
26 | var h = Math.floor(d / 3600);
27 | var m = Math.floor(d % 3600 / 60);
28 | var s = Math.floor(d % 3600 % 60);
29 |
30 | var hDisplay = h > 0 ? h + (h == 1 ? " " + Lang.HOUR + ", " : " " + Lang.HOUR + ", ") : "";
31 | var mDisplay = m > 0 ? m + (m == 1 ? " " + Lang.MINUTE + ", " : " " + Lang.MINUTE + ", ") : "";
32 | var sDisplay = s > 0 ? s + (s == 1 ? " " + Lang.SECOND : " " + Lang.SECOND) : "";
33 | return hDisplay + mDisplay + sDisplay;
34 | }
35 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
36 | MyPnky.addCommand({on: 'text', fromMe: false, deleteCommand: false}, (async (message, match) => {
37 | if (Config.AFKMSG == 'default') {
38 |
39 | if (AFK.isAfk && ((!message.jid.includes('-')) || (message.jid.includes('-') &&
40 | (( message.mention !== false && message.mention.length !== 0 ) || message.reply_message !== false)))) {
41 | if (message.jid.includes('-') && (message.mention !== false && message.mention.length !== 0)) {
42 | message.mention.map(async (jid) => {
43 | if (message.client.user.jid.split('@')[0] === jid.split('@')[0]) {
44 | await message.client.sendMessage(message.jid,Lang.AFK_TEXT + '\n' +
45 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
46 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
47 | }
48 | })
49 | } else if (message.jid.includes('-') && message.reply_message !== false) {
50 | if (message.reply_message.jid.split('@')[0] === message.client.user.jid.split('@')[0]) {
51 | await message.client.sendMessage(message.jid,Lang.AFK_TEXT + '\n' +
52 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
53 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
54 | }
55 | } else {
56 | await message.client.sendMessage(message.jid,Lang.AFK_TEXT + '\n' +
57 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
58 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
59 | }
60 | }
61 | }
62 | else {
63 | if (AFK.isAfk && ((!message.jid.includes('-')) || (message.jid.includes('-') &&
64 | (( message.mention !== false && message.mention.length !== 0 ) || message.reply_message !== false)))) {
65 | if (message.jid.includes('-') && (message.mention !== false && message.mention.length !== 0)) {
66 | message.mention.map(async (jid) => {
67 | if (message.client.user.jid.split('@')[0] === jid.split('@')[0]) {
68 | await message.client.sendMessage(message.jid,Config.AFKMSG + '\n' +
69 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
70 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
71 | }
72 | })
73 | } else if (message.jid.includes('-') && message.reply_message !== false) {
74 | if (message.reply_message.jid.split('@')[0] === message.client.user.jid.split('@')[0]) {
75 | await message.client.sendMessage(message.jid,Config.AFKMSG + '\n' +
76 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
77 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
78 | }
79 | } else {
80 | await message.client.sendMessage(message.jid,Config.AFKMSG + '\n' +
81 | (AFK.reason !== false ? '\n*' + Lang.REASON + ':* ```' + AFK.reason + '```' : '') +
82 | (AFK.lastseen !== 0 ? '\n*' + Lang.LAST_SEEN + ':* ```' + secondsToHms(Math.round((new Date()).getTime() / 1000) - AFK.lastseen) + Lang.AGO : ''), MessageType.text, {quoted: message.data});
83 | }
84 | }
85 | }
86 | }));
87 |
88 | MyPnky.addCommand({on: 'text', fromMe: true, deleteCommand: false}, (async (message, match) => {
89 | if (AFK.isAfk && !message.id.startsWith('3EB0')) {
90 | AFK.lastseen = 0;
91 | AFK.reason = false;
92 | AFK.isAfk = false;
93 |
94 | await message.client.sendMessage(message.jid,Lang.IM_NOT_AFK,MessageType.text);
95 | }
96 | }));
97 |
98 | MyPnky.addCommand({pattern: 'afk ?(.*)', fromMe: true, dontAddCommandList: true,plkadmin: true, deleteCommand: false, desc: Lang.AFK_DESC}, (async (message, match) => {
99 | if (!AFK.isAfk) {
100 | AFK.lastseen = Math.round((new Date()).getTime() / 1000);
101 | if (match[1] !== '') { AFK.reason = match[1]; }
102 | AFK.isAfk = true;
103 |
104 | await message.client.sendMessage(message.jid,Lang.IM_AFK + (AFK.reason !== false ? ('\n*' + Lang.REASON +':* ```' + AFK.reason + '```') : ''),MessageType.text);
105 | }
106 | }));
107 | }
108 |
109 | module.exports = { secondsToHms };
110 |
--------------------------------------------------------------------------------
/plugins/carbon.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | re edited by afnanplk
3 | */
4 |
5 | const MyPnky = require('../events');
6 | const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys');
7 | const axios = require('axios');
8 | const Config = require('../config');
9 | const dd = "Made by WhatsAsena"
10 |
11 | const Language = require('../language');
12 | const Lang = Language.getString('log');
13 |
14 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
15 | if (Config.WORKTYPE == 'private') {
16 |
17 | MyPnky.addCommand({pattern: 'carbon$', fromMe: true, desc: Lang.CARBON_DESC}, (async (message, match) => {
18 |
19 | if (!message.reply_message) return await message.client.sendMessage(message.jid,Lang.REPLY, MessageType.text);
20 |
21 | var rgbafmin = 0;
22 | var rgbafmax = 255;
23 | var rgbafirst = Math.floor(Math.random() * (+rgbafmax - +rgbafmin) + +rgbafmin)
24 |
25 | var rgbasmin = 0;
26 | var rgbasmax = 255;
27 | var rgbasecond = Math.floor(Math.random() * (+rgbasmax - +rgbasmin) + +rgbasmin)
28 |
29 | var rgbatmin = 0;
30 | var rgbatmax = 255;
31 | var rgbathird = Math.floor(Math.random() * (+rgbatmax - +rgbatmin) + +rgbatmin)
32 |
33 | var Theme = new Array ()
34 | Theme[0] = "twilight";
35 | Theme[1] = "panda";
36 | Theme[2] = "blackboard";
37 | Theme[3] = "seti";
38 | Theme[4] = "verminal";
39 | Theme[5] = "nord";
40 | Theme[6] = "monokai";
41 | Theme[7] = "cobalt";
42 | Theme[8] = "vscode";
43 | Theme[9] = "material";
44 | Theme[10] = "hopscotch";
45 | Theme[11] = "shades-of-purple";
46 | Theme[12] = "oceanic-next";
47 | Theme[13] = "one-light";
48 | Theme[14] = "one-dark";
49 | Theme[15] = "synthwave-84";
50 | Theme[16] = "zenburn";
51 | Theme[17] = "3024-night";
52 | Theme[18] = "a11y-dark";
53 | Theme[19] = "dracula-pro";
54 | Theme[20] = "dracula-pro";
55 | Theme[21] = "dracula-pro";
56 | Theme[22] = "dracula-pro";
57 | Theme[23] = "night-owl";
58 | var i = Math.floor(24*Math.random())
59 |
60 | var Language = new Array ()
61 | Language[0] = "Apache";
62 | Language[1] = "Python";
63 | Language[2] = "Javascript";
64 | Language[3] = "Bash";
65 | Language[4] = "cobol";
66 | Language[5] = "coffeescript";
67 | Language[6] = "Crystal";
68 | Language[7] = "Erlang";
69 | Language[8] = "GraphQL";
70 | var l = Math.floor(9*Math.random())
71 |
72 | var text = message.reply_message.text
73 | var fin = text.replace(/(?:\r\n|\r|\n)/g, '%250A')
74 | var pay = encodeURIComponent(fin)
75 |
76 | var respoimage = await axios.get('https://thiccyscarbonapi.herokuapp.com/?code=' + pay + '&theme=' + Theme[i] + '&exportSize=3x&paddingVertical=200px&paddingHorizontal=200px&backgroundColor=rgba(' + rgbafirst + ',' + rgbasecond + ',' + rgbathird + ')&language=' + Language[l], { responseType: 'arraybuffer' })
77 |
78 | await message.sendMessage(Buffer.from(respoimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN})
79 |
80 | }));
81 | }
82 | else if (Config.WORKTYPE == 'public') {
83 |
84 | MyPnky.addCommand({pattern: 'carbon$', fromMe: false, desc: Lang.CARBON_DESC}, (async (message, match) => {
85 |
86 | if (!message.reply_message) return await message.client.sendMessage(message.jid,Lang.REPLY, MessageType.text);
87 |
88 | var rgbafmin = 0;
89 | var rgbafmax = 255;
90 | var rgbafirst = Math.floor(Math.random() * (+rgbafmax - +rgbafmin) + +rgbafmin)
91 |
92 | var rgbasmin = 0;
93 | var rgbasmax = 255;
94 | var rgbasecond = Math.floor(Math.random() * (+rgbasmax - +rgbasmin) + +rgbasmin)
95 |
96 | var rgbatmin = 0;
97 | var rgbatmax = 255;
98 | var rgbathird = Math.floor(Math.random() * (+rgbatmax - +rgbatmin) + +rgbatmin)
99 |
100 | var Theme = new Array ()
101 | Theme[0] = "twilight";
102 | Theme[1] = "panda";
103 | Theme[2] = "blackboard";
104 | Theme[3] = "seti";
105 | Theme[4] = "verminal";
106 | Theme[5] = "nord";
107 | Theme[6] = "monokai";
108 | Theme[7] = "cobalt";
109 | Theme[8] = "vscode";
110 | Theme[9] = "material";
111 | Theme[10] = "hopscotch";
112 | Theme[11] = "shades-of-purple";
113 | Theme[12] = "oceanic-next";
114 | Theme[13] = "one-light";
115 | Theme[14] = "one-dark";
116 | Theme[15] = "synthwave-84";
117 | Theme[16] = "zenburn";
118 | Theme[17] = "3024-night";
119 | Theme[18] = "a11y-dark";
120 | Theme[19] = "dracula-pro";
121 | Theme[20] = "dracula-pro";
122 | Theme[21] = "dracula-pro";
123 | Theme[22] = "dracula-pro";
124 | Theme[23] = "night-owl";
125 | var i = Math.floor(24*Math.random())
126 |
127 | var Language = new Array ()
128 | Language[0] = "Apache";
129 | Language[1] = "Python";
130 | Language[2] = "Javascript";
131 | Language[3] = "Bash";
132 | Language[4] = "cobol";
133 | Language[5] = "coffeescript";
134 | Language[6] = "Crystal";
135 | Language[7] = "Erlang";
136 | Language[8] = "GraphQL";
137 | var l = Math.floor(9*Math.random())
138 |
139 | var text = message.reply_message.text
140 | var fin = text.replace(/(?:\r\n|\r|\n)/g, '%250A')
141 | var pay = encodeURIComponent(fin)
142 |
143 | var respoimage = await axios.get('https://thiccyscarbonapi.herokuapp.com/?code=' + pay + '&theme=' + Theme[i] + '&exportSize=3x&paddingVertical=200px&paddingHorizontal=200px&backgroundColor=rgba(' + rgbafirst + ',' + rgbasecond + ',' + rgbathird + ')&language=' + Language[l], { responseType: 'arraybuffer' })
144 |
145 | await message.sendMessage(Buffer.from(respoimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN})
146 | }));
147 | }
148 | }
--------------------------------------------------------------------------------
/plugins/clear.js:
--------------------------------------------------------------------------------
1 |
2 | /* Copyright (C) 2020 afnanplk.
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 | */
6 |
7 |
8 | const {MessageType, GroupSettingChange, ChatModification, WAConnectionTest} = require('@adiwajshing/baileys');
9 | const MyPnky = require('../events');
10 | const Config = require('../config');
11 |
12 | const Language = require('../language');
13 | const Lang = Language.getString('admin');
14 | const mut = Language.getString('mute');
15 | const END = "clear all messages"
16 |
17 | async function checkImAdmin(message, user = message.client.user.jid) {
18 | var grup = await message.client.groupMetadata(message.jid);
19 | var sonuc = grup['participants'].map((member) => {
20 | if (member.id.split('@')[0] === user.split('@')[0] && member.isAdmin) return true; else; return false;
21 | });
22 | return sonuc.includes(true);
23 | }
24 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
25 |
26 | MyPnky.addCommand({pattern: 'clear ?(.*)', fromMe: true,plkadmin: true, desc: END, dontAddCommandList: true}, (async (message, match) => {
27 | if (match[1] === '') return await message.client.sendMessage(message.jid,'```enter jid address```',MessageType.text);
28 | await message.sendMessage('Chat clearing...');
29 | await message.client.modifyChat (match[1] == '' ? message.jid : match [1], ChatModification.delete);
30 | await message.sendMessage('🚮 Chat cleared');
31 | }));
32 | }
33 |
--------------------------------------------------------------------------------
/plugins/code_fake.js:
--------------------------------------------------------------------------------
1 | //codded by afnanplk
2 |
3 | const MyPnky = require('../events');
4 | const {MessageType} = require('@adiwajshing/baileys');
5 | const plk = require('./sql/fake');
6 | const Config = require('../config');
7 |
8 | function _0x1a34(){var _0x57d227=['ith\x20','\x20untill\x20yo','215991rNffDd','fake\x20(.*)','jid','de\x20removed','1424766xTveBM','you\x20allow\x20','455adlxUX','22HMRNiW','message','untry\x20code','country\x20co','2294852iHXPAu','```','10SaXomD','age','5912870iIvVaL','removeMess','83414lqXFKn','88deKnHj','de\x20set','delete','ode','now\x20we\x20all','2202RZDmLr','okMessage','only\x20numbe','sendMessag','fake','addCommand','client','text','717710IpHftC'];_0x1a34=function(){return _0x57d227;};return _0x1a34();}function _0x3d93(_0x113587,_0x4ff79c){var _0x1a3405=_0x1a34();return _0x3d93=function(_0x3d93c5,_0x562a37){_0x3d93c5=_0x3d93c5-0xbc;var _0x4ae70d=_0x1a3405[_0x3d93c5];return _0x4ae70d;},_0x3d93(_0x113587,_0x4ff79c);}var _0x55745b=_0x3d93;(function(_0x7a20dc,_0x535954){var _0x479ef2=_0x3d93,_0x1cbc8a=_0x7a20dc();while(!![]){try{var _0x51acd7=-parseInt(_0x479ef2(0xd8))/0x1*(parseInt(_0x479ef2(0xdc))/0x2)+parseInt(_0x479ef2(0xcf))/0x3+-parseInt(_0x479ef2(0xd6))/0x4+parseInt(_0x479ef2(0xd1))/0x5*(parseInt(_0x479ef2(0xc0))/0x6)+-parseInt(_0x479ef2(0xc8))/0x7+-parseInt(_0x479ef2(0xdd))/0x8*(parseInt(_0x479ef2(0xcb))/0x9)+-parseInt(_0x479ef2(0xda))/0xa*(-parseInt(_0x479ef2(0xd2))/0xb);if(_0x51acd7===_0x535954)break;else _0x1cbc8a['push'](_0x1cbc8a['shift']());}catch(_0x12015e){_0x1cbc8a['push'](_0x1cbc8a['shift']());}}}(_0x1a34,0x51717),MyPnky[_0x55745b(0xc5)]({'pattern':'fake$','fromMe':!![],'desc':'know\x20allow'+'ed\x20country'+'\x20code'},async(_0x3d6900,_0x38be9c)=>{var _0x40e988=_0x55745b,_0x38160b=await plk['takeMessag'+'e'](_0x3d6900[_0x40e988(0xcd)]);_0x38160b===![]?await _0x3d6900[_0x40e988(0xc6)][_0x40e988(0xc3)+'e'](_0x3d6900[_0x40e988(0xcd)],_0x40e988(0xbf)+'ow\x20only\x2091'+_0x40e988(0xca)+'u\x20add\x20your'+'\x20country\x20c'+_0x40e988(0xbe),MessageType['text']):await _0x3d6900['client'][_0x40e988(0xc3)+'e'](_0x3d6900[_0x40e988(0xcd)],_0x40e988(0xd7)+(_0x40e988(0xd0)+_0x40e988(0xc2)+'rs\x20start\x20w'+_0x40e988(0xc9))+_0x38160b[_0x40e988(0xd3)]+_0x40e988(0xd7),MessageType[_0x40e988(0xc7)]);}),MyPnky[_0x55745b(0xc5)]({'pattern':_0x55745b(0xcc),'fromMe':!![],'dontAddCommandList':!![]},async(_0x20b889,_0x2f49f3)=>{var _0x2d3a82=_0x55745b;if(_0x2f49f3[0x1]==='')return await _0x20b889['client'][_0x2d3a82(0xc3)+'e'](_0x20b889[_0x2d3a82(0xcd)],'enter\x20a\x20co'+_0x2d3a82(0xd4));else{if(_0x2f49f3[0x1]===_0x2d3a82(0xbd))return await _0x20b889[_0x2d3a82(0xc6)]['sendMessag'+'e'](_0x20b889['jid'],_0x2d3a82(0xd5)+_0x2d3a82(0xce),MessageType[_0x2d3a82(0xc7)]),await plk[_0x2d3a82(0xdb)+_0x2d3a82(0xd9)](_0x20b889[_0x2d3a82(0xcd)],_0x2d3a82(0xc4));return await plk[_0x2d3a82(0xc1)](_0x20b889['jid'],_0x2d3a82(0xc4),_0x2f49f3[0x1]),await _0x20b889['client'][_0x2d3a82(0xc3)+'e'](_0x20b889[_0x2d3a82(0xcd)],_0x2d3a82(0xd5)+_0x2d3a82(0xbc),MessageType[_0x2d3a82(0xc7)]);}}));
9 |
10 |
11 | // take the code (with credit)
12 |
--------------------------------------------------------------------------------
/plugins/dict.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2021 Vai838.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsenaDuplicated
5 | */
6 | const MyPnky = require('../events');
7 | const {MessageType} = require('@adiwajshing/baileys');
8 | /*const got = require('got');
9 | const fs = require('fs');*/
10 | const axios = require('axios');
11 | const Config = require('../config');
12 |
13 | const Language = require('../language');
14 | const Lang = Language.getString('weather');
15 | const { errorMessage, infoMessage } = require('../helpers');
16 |
17 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
18 |
19 | MyPnky.addCommand({pattern: 'lngcode', fromMe: false, dontAddCommandList: true}, (async (message, match) => {
20 |
21 | await message.sendMessage('*Code:* en_US \n *Language:* English (US) \n\n *Code:* hi \n *Language:* Hindi \n\n *Code:* es \n *Language:* Spanish \n\n *Code:* fr \n *Language:* French \n\n *Code:* ja \n *Language:* Japanese \n\n *Code:* ru \n *Language:* Russian \n\n *Code:* en_GB \n *Language:* English (UK) \n\n *Code:* de \n *Language:* German \n\n *Code:* it \n *Language:* Italian \n\n *Code:* ko \n *Language:* Korean \n\n *Code:* pt-BR \n *Language:* Brazilian Portuguese \n\n *Code:* ar \n *Language:* Arabic \n\n *Code:* tr \n *Language:* Turkish \n\n');
22 |
23 | }));
24 |
25 |
26 |
27 | /*MyPnky.addCommand({pattern: 'dict ?(.*)', fromMe: false, dontAddCommandList: true }, async (message, match) => {
28 | if (match[1] === '') return await message.reply("Need word to translate");
29 | if (match[1].includes(';')) {
30 | var split = match[1].split(';');
31 | word = split[1];
32 | langcode = split[0];
33 | }
34 | else {
35 | word = match[1];
36 | langcode = 'en_US';
37 | }
38 | const url = `https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`;
39 | try {
40 | const response = await got(url);
41 | const json = JSON.parse(response.body);
42 | if (response.statusCode === 200) return await message.client.sendMessage(message.jid,
43 | '* ' + "Word:" +'* ```' + json[0].word + '```\n' +
44 | '* ' + "Phonetics:" +'* ```' + json[0].phonetics[0].text + '```\n\n' +
45 | '* ' + "Part of Speech:" +'* ```' + json.result[0][0].partOfSpeech + '```\n' +
46 | '* ' + "Definition 1:" +'* ```' + json[0].meanings[0].definitions[0].definition + '```\n' +
47 | '* ' + "Synonyms:" +'* ```' + json[0].meanings[0].definitions[0].synonyms[0] + '```\n' +
48 | '* ' + "-" +'* ```' + json[0].meanings[0].definitions[0].synonyms[1] + '```\n' +
49 | '* ' + "-" +'* ```' + json[0].meanings[0].definitions[0].synonyms[2] + '```\n' +
50 | '* ' + "Usage:" +'* ```' + json[0].meanings[0].definitions[0].example + '```\n\n' +
51 | '* ' + "Definition 2:" +'* ```' + json[0].meanings[0].definitions[1].definition + '```\n' +
52 | '* ' + "Usage:" +'* ```' + json[0].meanings[0].definitions[1].example + '```\n\n\n' +
53 | '* ' + "Part of Speech:" +'* ```' + json[0].meanings[1].partOfSpeech + '```\n\n' +
54 | '* ' + "Definition :" +'* ```' + json[0].meanings[0].definitions[0].definition + '```\n' +
55 | '* ' + "Synonyms:" +'* ```' + json[0].meanings[0].definitions[0].synonyms[0] + '```\n' +
56 | '* ' + "-" +'* ```' + json[0].meanings[0].definitions[0].synonyms[1] + '```\n' +
57 | '* ' + "Usage:" +'* ```' + json[0].meanings[0].definitions[0].example + '```\n\n', MessageType.text);
58 | } catch {
59 | return await message.client.sendMessage(message.jid, "error", MessageType.text);
60 | }
61 | });
62 | */
63 |
64 |
65 |
66 | /*MyPnky.addCommand({ pattern: 'dict ?(.*)', fromMe: false, desc: "Use it as a dictionary.\nEg: .dict en_US;lead\n For supporting languages send *.lngcode*" }, async (message, match) => {
67 | if (!match[1]) return await message.sendMessage(errorMessage("Need word"))
68 | if (match[1].includes(';')) {
69 | var split = match[1].split(';');
70 | word = split[1];
71 | langcode = split[0];
72 | }
73 | else {
74 | word = match[1];
75 | langcode = 'en_US';
76 | }
77 | await message.sendMessage(infoMessage("Loading"))
78 |
79 | for (var i = 0; i < 5 ; i++) {
80 |
81 | await axios
82 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
83 | .then(async (response) => {
84 | const {
85 | definition,
86 | example,
87 | } = response.data[i].meanings[i].definitions[i]
88 |
89 |
90 | const msg = `
91 | *${"Definition"}*: ${definition}
92 | *${"Example"}*: ${example}`
93 |
94 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
95 | quoted: message.data,
96 | })
97 | })
98 | .catch(
99 | async (err) => await message.sendMessage(""),
100 | )}
101 | },
102 | )
103 | */
104 |
105 | MyPnky.addCommand({ pattern: 'dict ?(.*)', fromMe: false, desc: "Use it as a dictionary.\nEg: .dict en_US;lead\n For supporting languages send *.lngcode*" }, async (message, match) => {
106 |
107 | if (!match[1]) return await message.sendMessage(errorMessage("Need word"))
108 |
109 | if (match[1].includes(';')) {
110 | var split = match[1].split(';');
111 | word = split[1];
112 | langcode = split[0];
113 | }
114 | else {
115 | word = match[1];
116 | langcode = 'en_US';
117 | }
118 |
119 | await message.sendMessage(infoMessage("Loading"))
120 |
121 |
122 | await axios
123 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
124 | .then(async (response) => {
125 | const {
126 | definition,
127 | example,
128 | } = response.data[0].meanings[0].definitions[0]
129 |
130 |
131 |
132 | const msg = `
133 | *${"Definition"}*: ${definition}
134 | *${"Example"}*: ${example}`
135 |
136 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
137 | quoted: message.data,
138 | })
139 | })
140 |
141 |
142 | await axios
143 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
144 | .then(async (response) => {
145 | const {
146 | definition,
147 | example,
148 | } = response.data[0].meanings[0].definitions[1]
149 |
150 |
151 |
152 | const msg = `
153 | *${"Definition"}*: ${definition}
154 | *${"Example"}*: ${example}`
155 |
156 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
157 | quoted: message.data,
158 | })
159 | })
160 |
161 | await axios
162 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
163 | .then(async (response) => {
164 | const {
165 | definition,
166 | example,
167 | } = response.data[0].meanings[1].definitions[0]
168 |
169 |
170 |
171 | const msg = `
172 | *${"Definition"}*: ${definition}
173 | *${"Example"}*: ${example}`
174 |
175 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
176 | quoted: message.data,
177 | })
178 | })
179 |
180 | await axios
181 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
182 | .then(async (response) => {
183 | const {
184 | definition,
185 | example,
186 | } = response.data[0].meanings[1].definitions[1]
187 |
188 |
189 |
190 | const msg = `
191 | *${"Definition"}*: ${definition}
192 | *${"Example"}*: ${example}`
193 |
194 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
195 | quoted: message.data,
196 | })
197 | })
198 |
199 | await axios
200 | .get(`https://api.dictionaryapi.dev/api/v2/entries/${langcode}/${word}`)
201 | .then(async (response) => {
202 | const {
203 | definition,
204 | example,
205 | } = response.data[1].meanings[0].definitions[0]
206 |
207 |
208 |
209 | const msg = `
210 | *${"Definition"}*: ${definition}
211 | *${"Example"}*: ${example}`
212 |
213 | await message.client.sendMessage(message.jid, msg , MessageType.text, {
214 | quoted: message.data,
215 | })
216 |
217 |
218 | })
219 |
220 | },
221 | )
222 | }
--------------------------------------------------------------------------------
/plugins/ffmpeg.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | re-edited by afnanplk
3 | PINKY V2
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const {MessageType,Mimetype} = require('@adiwajshing/baileys');
8 | const fs = require('fs');
9 | const ffmpeg = require('fluent-ffmpeg');
10 | const {execFile} = require('child_process');
11 | const cwebp = require('cwebp-bin');
12 | const Config = require('../config');
13 |
14 | const Language = require('../language');
15 | const Lang = Language.getString('ffmpeg');
16 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
17 | if (Config.WORKTYPE == 'private') {
18 |
19 | MyPnky.addCommand({pattern: 'ffmpeg ?(.*)', fromMe: true, desc: Lang.FF_DESC}, (async (message, match) => {
20 |
21 | if (match[1] === '') return await message.client.sendMessage(message.jid,'Need Media and Filter Name!\nℹ️ Ex: ```.ffmpeg fade=in:0:30```\nℹ️ Ex: ```.ffmpeg curves=vintage, fps=fps=25```', MessageType.text);
22 | if (message.reply_message.video) {
23 |
24 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
25 | var location = await message.client.downloadAndSaveMediaMessage({
26 | key: {
27 | remoteJid: message.reply_message.jid,
28 | id: message.reply_message.id
29 | },
30 | message: message.reply_message.data.quotedMessage
31 | });
32 |
33 | ffmpeg(location)
34 | .videoFilters(`${match[1]}`)
35 | .format('mp4')
36 | .save('output.mp4')
37 | .on('end', async () => {
38 | await message.sendMessage(fs.readFileSync('output.mp4'), MessageType.video, {mimetype: Mimetype.mpeg, caption: Config.AFN});
39 | });
40 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
41 | }
42 | else if (message.reply_message.video === false && message.reply_message.image) {
43 |
44 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
45 | var location = await message.client.downloadAndSaveMediaMessage({
46 | key: {
47 | remoteJid: message.reply_message.jid,
48 | id: message.reply_message.id
49 | },
50 | message: message.reply_message.data.quotedMessage
51 | });
52 |
53 | ffmpeg(location)
54 | .videoFilters(`${match[1]}`)
55 | .save('output.jpg')
56 | .on('end', async () => {
57 | await message.sendMessage(fs.readFileSync('output.jpg'), MessageType.image, {mimetype: Mimetype.jpg, caption: Config.AFN});
58 | });
59 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
60 | }
61 | else {
62 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
63 | var location = await message.client.downloadAndSaveMediaMessage({
64 | key: {
65 | remoteJid: message.reply_message.jid,
66 | id: message.reply_message.id
67 | },
68 | message: message.reply_message.data.quotedMessage
69 | });
70 |
71 | ffmpeg(location)
72 | .audioFilters(`${match[1]}`)
73 | .save('output.mp3')
74 | .on('end', async () => {
75 | await message.sendMessage(fs.readFileSync('output.mp3'), MessageType.audio, {mimetype: Mimetype.mp4Audio});
76 | });
77 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
78 | }
79 | }));
80 | }
81 | else if (Config.WORKTYPE == 'public') {
82 |
83 | MyPnky.addCommand({pattern: 'ffmpeg ?(.*)', fromMe: false, desc: Lang.FF_DESC}, (async (message, match) => {
84 |
85 | if (match[1] === '') return await message.client.sendMessage(message.jid,'Need Media and Filter Name!\nℹ️ Ex: ```.ffmpeg fade=in:0:30```\nℹ️ Ex: ```.ffmpeg curves=vintage, fps=fps=25```', MessageType.text);
86 | if (message.reply_message.video) {
87 |
88 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
89 | var location = await message.client.downloadAndSaveMediaMessage({
90 | key: {
91 | remoteJid: message.reply_message.jid,
92 | id: message.reply_message.id
93 | },
94 | message: message.reply_message.data.quotedMessage
95 | });
96 |
97 | ffmpeg(location)
98 | .videoFilters(`${match[1]}`)
99 | .format('mp4')
100 | .save('output.mp4')
101 | .on('end', async () => {
102 | await message.sendMessage(fs.readFileSync('output.mp4'), MessageType.video, {mimetype: Mimetype.mpeg, caption: Config.AFN});
103 | });
104 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
105 | }
106 | else if (message.reply_message.video === false && message.reply_message.image) {
107 |
108 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
109 | var location = await message.client.downloadAndSaveMediaMessage({
110 | key: {
111 | remoteJid: message.reply_message.jid,
112 | id: message.reply_message.id
113 | },
114 | message: message.reply_message.data.quotedMessage
115 | });
116 |
117 | ffmpeg(location)
118 | .videoFilters(`${match[1]}`)
119 | .save('output.jpg')
120 | .on('end', async () => {
121 | await message.sendMessage(fs.readFileSync('output.jpg'), MessageType.image, {mimetype: Mimetype.jpg, caption: Config.AFN});
122 | });
123 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
124 | }
125 | else {
126 | var downloading = await message.client.sendMessage(message.jid,Lang.FF_PROC,MessageType.text);
127 | var location = await message.client.downloadAndSaveMediaMessage({
128 | key: {
129 | remoteJid: message.reply_message.jid,
130 | id: message.reply_message.id
131 | },
132 | message: message.reply_message.data.quotedMessage
133 | });
134 |
135 | ffmpeg(location)
136 | .audioFilters(`${match[1]}`)
137 | .save('output.mp3')
138 | .on('end', async () => {
139 | await message.sendMessage(fs.readFileSync('output.mp3'), MessageType.audio, {mimetype: Mimetype.mp4Audio});
140 | });
141 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
142 | }
143 | }));
144 |
145 | }
146 | }
--------------------------------------------------------------------------------
/plugins/get.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | re coded and edited by afnanplk
3 | */
4 |
5 | const Asena = require('../events');
6 | const {MessageType,Mimetype} = require('@adiwajshing/baileys');
7 | const translatte = require('translatte');
8 | const config = require('../config');
9 | const LanguageDetect = require('languagedetect');
10 | const lngDetector = new LanguageDetect();
11 | const Heroku = require('heroku-client');
12 | const heroku = new Heroku({
13 | token: config.HEROKU.API_KEY
14 | });
15 | let baseURI = '/apps/' + config.HEROKU.APP_NAME;
16 | //============================== by afnanplk =============================================
17 | const axios = require('axios');
18 | const fs = require('fs');
19 | const https = require('https');
20 | const ytdl = require('ytdl-core');
21 | const ffmpeg = require('fluent-ffmpeg');
22 | const yts = require( 'yt-search' )
23 | const got = require("got");
24 | const ID3Writer = require('browser-id3-writer');
25 | const SpotifyWebApi = require('spotify-web-api-node');
26 |
27 | const spotifyApi = new SpotifyWebApi({
28 | clientId: 'acc6302297e040aeb6e4ac1fbdfd62c3',
29 | clientSecret: '0e8439a1280a43aba9a5bc0a16f3f009'
30 | });
31 | const Language = require('../language');
32 | const Lang = Language.getString('scrapers');
33 | const LOAD_ING = "```Downloading media...```"
34 | if (config.STANDPLK == 'off' || config.STANDPLK == 'OFF') {
35 | Asena.addCommand({pattern: 'need ?(.*)', fromMe: false, desc: Lang.GET_DESC}, (async (message, match) => {
36 |
37 | if (match[1] === '') return await message.client.sendMessage(message.jid,Lang.NEED_SOME,MessageType.text);
38 | if (!match[1].includes('mp3') && match[1].includes('youtu.be') || match[1].includes('youtube.com')) {
39 | var VID = '';
40 | try {
41 | if (match[1].includes('watch')) {
42 | var tsts = match[1].replace('watch?v=', '')
43 | var alal = tsts.split('/')[3]
44 | VID = alal
45 | } else {
46 | VID = match[1].split('/')[3]
47 | }
48 | } catch {
49 | return await message.client.sendMessage(message.jid,Lang.NO_RESULT,MessageType.text);
50 | }
51 | var afnjson = await message.client.groupMetadata(message.jid)
52 | var reply = await message.client.sendMessage(message.jid,Lang.DOWNLOADING_VIDEO,MessageType.text);
53 |
54 | var yt = ytdl(VID, {filter: format => format.container === 'mp4' && ['720p', '480p', '360p', '240p', '144p'].map(() => true)});
55 | yt.pipe(fs.createWriteStream('./' + VID + '.mp4'));
56 |
57 | yt.on('end', async () => {
58 | reply = await message.client.sendMessage(message.jid,Lang.UPLOADING_VIDEO + ' for ' + afnjson.subject,MessageType.text);
59 | await message.client.sendMessage(message.jid,fs.readFileSync('./' + VID + '.mp4'), MessageType.video, {quoted: message.data ,mimetype: Mimetype.mp4});
60 | });
61 | }
62 | if (match[1].includes('instagram.com')) {
63 |
64 | const instagram = async (url, key) => {
65 | const _0x4a94a8 = _0x185a; function _0x3f3b() { const _0x37037c = ['jul', 'htt', 'ps:', 'nti', 'ouy', 'aw.', 'kit', '/in', 'sta', '?ur', 'dat', 'get', 'arr']; _0x3f3b = function () { return _0x37037c; }; return _0x3f3b(); } function _0x185a(_0x38e93d, _0x3f3b83) { const _0x185a5f = _0x3f3b(); _0x185a = function (_0x829ec5, _0x405d60) { _0x829ec5 = _0x829ec5 - 0xe5; let _0x20f676 = _0x185a5f[_0x829ec5]; return _0x20f676; }; return _0x185a(_0x38e93d, _0x3f3b83); } if (key != _0x4a94a8(0xe5) + 'ie') throw new Error('Jul' + 'ie'); const response = await axios(_0x4a94a8(0xe6) + _0x4a94a8(0xe7) + '//u' + _0x4a94a8(0xe8) + 'tle' + 'd-1' + _0x4a94a8(0xe9) + 'r1r' + 'szh' + _0x4a94a8(0xea) + 'run' + _0x4a94a8(0xeb) + '.sh' + _0x4a94a8(0xec) + _0x4a94a8(0xed) + _0x4a94a8(0xee) + 'l=' + url); const { status, result } = response[_0x4a94a8(0xef) + 'a']; if (!status) return { 'status': status }; const { type, data } = result[0x0]; const res = await axios[_0x4a94a8(0xf0)](data, { 'responseType': _0x4a94a8(0xf1) + 'ayb' + 'uff' + 'er' }); return { 'type': type, 'data': res[_0x4a94a8(0xef) + 'a'], 'status': status };
66 | }
67 |
68 | const { status, type, data } = await instagram(match[1], 'julie')
69 | if (!status) return await message.sendMessage('```server down will solve as soon as possible```')
70 | await message.client.sendMessage(message.jid, LOAD_ING, MessageType.text, { quoted: message.data });
71 | if (type === 'image') return await message.sendMessage(data, MessageType.image, { caption: config.AFN , quoted: message.data })
72 | if (type === 'video') return await message.sendMessage(data, MessageType.video, { caption: config.AFN , quoted: message.data })
73 | }
74 | if (!match[1].includes('.com') && !match[1].includes('youtu.be')) {
75 |
76 | let arama = await yts(match[1]);
77 | arama = arama.all;
78 | if(arama.length < 1) return await message.client.sendMessage(message.jid,Lang.NO_RESULT,MessageType.text);
79 | var reply = await message.client.sendMessage(message.jid,Lang.DOWNLOADING_SONG,MessageType.text);
80 |
81 | let title = arama[0].title.replace(' ', '+');
82 | let stream = ytdl(arama[0].videoId, {
83 | quality: 'highestaudio',
84 | });
85 |
86 | got.stream(arama[0].image).pipe(fs.createWriteStream(title + '.jpg'));
87 | ffmpeg(stream)
88 | .audioBitrate(320)
89 | .save('./' + title + '.mp3')
90 | .on('end', async () => {
91 | const writer = new ID3Writer(fs.readFileSync('./' + title + '.mp3'));
92 | writer.setFrame('TIT2', arama[0].title)
93 | .setFrame('TPE1', [arama[0].author.name])
94 | .setFrame('APIC', {
95 | type: 3,
96 | data: fs.readFileSync(title + '.jpg'),
97 | description: arama[0].description
98 | });
99 | writer.addTag();
100 |
101 | reply = await message.client.sendMessage(message.jid,Lang.UPLOADING_SONG,MessageType.text);
102 | await message.client.sendMessage(message.jid,Buffer.from(writer.arrayBuffer), MessageType.audio, {quoted: message.data , mimetype: Mimetype.mp4Audio, ptt: false});
103 | await message.client.sendMessage(message.jid,Buffer.from(writer.arrayBuffer), MessageType.document, {filename: match[1].replace('mp3', config.AFN) + '.mp3', mimetype: 'audio/mpeg',quoted: message.data});
104 |
105 | });
106 | }
107 | if (match[1].includes('youtu.be') || match[1].includes('youtube.com') && match[1].includes('mp3')) {
108 | let arama = await yts(match[1].replace('mp3',''));
109 | arama = arama.all;
110 | if(arama.length < 1) return await message.client.sendMessage(message.jid,Lang.NO_RESULT,MessageType.text);
111 | var reply = await message.client.sendMessage(message.jid,Lang.DOWNLOADING_SONG,MessageType.text);
112 |
113 | let title = arama[0].title.replace(' ', '+');
114 | let stream = ytdl(arama[0].videoId, {
115 | quality: 'highestaudio',
116 | });
117 |
118 | got.stream(arama[0].image).pipe(fs.createWriteStream(title + '.jpg'));
119 | ffmpeg(stream)
120 | .audioBitrate(320)
121 | .save('./' + title + '.mp3')
122 | .on('end', async () => {
123 | const writer = new ID3Writer(fs.readFileSync('./' + title + '.mp3'));
124 | writer.setFrame('TIT2', arama[0].title)
125 | .setFrame('TPE1', [arama[0].author.name])
126 | .setFrame('APIC', {
127 | type: 3,
128 | data: fs.readFileSync(title + '.jpg'),
129 | description: arama[0].description
130 | });
131 | writer.addTag();
132 |
133 | reply = await message.client.sendMessage(message.jid,Lang.UPLOADING_SONG,MessageType.text);
134 | await message.client.sendMessage(message.jid,Buffer.from(writer.arrayBuffer), MessageType.audio, {quoted: message.data , mimetype: Mimetype.mp4Audio, ptt: false});
135 | await message.client.sendMessage(message.jid,Buffer.from(writer.arrayBuffer), MessageType.document, {filename: 'for iphone' + config.AFN + '.mp3', mimetype: 'audio/mpeg',quoted: message.data});
136 | });
137 | }
138 | if (match[1].includes('instagram.com') && match[1].includes('mp3') || match[1].includes('.gov') || match[1].includes('.edu') || match[1].includes('.org') || match[1].includes('.net') || match[1].includes('.biz') || match[1].includes('.info') || match[1].includes('.facebook')) {
139 | let pallikkel = match[1]
140 | await message.client.sendMessage(message.jid,'```' + Lang.LINK_TEXT + ' : ```'+ pallikkel +' \n ```' + Lang.NO_SPRT + '```',MessageType.text);
141 | }
142 | }));
143 | }
--------------------------------------------------------------------------------
/plugins/greetings.js:
--------------------------------------------------------------------------------
1 |
2 | /* Copyright (C) 2020 Yusuf Usta.
3 | recodded by afnanplk
4 | new work type by afnanplk
5 | PINKY V2
6 | */
7 |
8 | const MyPnky = require('../events');
9 | const {MessageType} = require('@adiwajshing/baileys');
10 | const sql = require('./sql/greetings');
11 | const Config = require('../config');
12 |
13 |
14 | const Language = require('../language');
15 | const Lang = Language.getString('greetings');
16 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
17 | if (Config.WORKTYPE == 'private') {
18 |
19 | MyPnky.addCommand({pattern: 'welcome$', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.WELCOME_DESC}, (async (message, match) => {
20 | var hg = await sql.getMessage(message.jid);
21 | if (hg === false) {
22 | await message.client.sendMessage(message.jid,Lang.NOT_SET_WELCOME,MessageType.text);
23 | } else {
24 | await message.client.sendMessage(message.jid,Lang.WELCOME_ALREADY_SETTED + hg.message + '```',MessageType.text);
25 | }
26 | }));
27 |
28 | MyPnky.addCommand({pattern: 'welcome (.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {
29 | if (match[1] === '') {
30 | return await message.client.sendMessage(message.jid,Lang.NEED_WELCOME_TEXT);
31 | } else {
32 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.WELCOME_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'welcome'); }
33 | await sql.setMessage(message.jid, 'welcome', match[1].replace(/#/g, '\n'));
34 | return await message.client.sendMessage(message.jid,Lang.WELCOME_SETTED,MessageType.text)
35 | }
36 | }));
37 |
38 | MyPnky.addCommand({pattern: 'goodbye$', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.GOODBYE_DESC}, (async (message, match) => {
39 | var hg = await sql.getMessage(message.jid, 'goodbye');
40 | if (hg === false) {
41 | await message.client.sendMessage(message.jid,Lang.NOT_SET_GOODBYE,MessageType.text)
42 | } else {
43 | await message.client.sendMessage(message.jid,Lang.GOODBYE_ALREADY_SETTED + hg.message + '```',MessageType.text);
44 | }
45 | }));
46 |
47 | MyPnky.addCommand({pattern: 'goodbye (.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {
48 | if (match[1] === '') {
49 | return await message.client.sendMessage(message.jid,Lang.NEED_GOODBYE_TEXT,MessageType.text);
50 | } else {
51 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.GOODBYE_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'goodbye'); }
52 | await sql.setMessage(message.jid, 'goodbye', match[1].replace(/#/g, '\n'));
53 | return await message.client.sendMessage(message.jid,Lang.GOODBYE_SETTED,MessageType.text)
54 | }
55 | }));
56 | }
57 |
58 | else if (Config.WORKTYPE == 'public') {
59 |
60 |
61 | MyPnky.addCommand({pattern: 'welcome$', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.WELCOME_DESC}, (async (message, match) => {
62 | var hg = await sql.getMessage(message.jid);
63 | if (hg === false) {
64 | await message.client.sendMessage(message.jid,Lang.NOT_SET_WELCOME,MessageType.text);
65 | } else {
66 | await message.client.sendMessage(message.jid,Lang.WELCOME_ALREADY_SETTED + hg.message + '```',MessageType.text);
67 | }
68 | }));
69 |
70 | MyPnky.addCommand({pattern: 'welcome (.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {
71 | if (match[1] === '') {
72 | return await message.client.sendMessage(message.jid,Lang.NEED_WELCOME_TEXT);
73 | } else {
74 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.WELCOME_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'welcome'); }
75 | await sql.setMessage(message.jid, 'welcome', match[1].replace(/#/g, '\n'));
76 | return await message.client.sendMessage(message.jid,Lang.WELCOME_SETTED,MessageType.text)
77 | }
78 | }));
79 |
80 | MyPnky.addCommand({pattern: 'goodbye$', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.GOODBYE_DESC}, (async (message, match) => {
81 | var hg = await sql.getMessage(message.jid, 'goodbye');
82 | if (hg === false) {
83 | await message.client.sendMessage(message.jid,Lang.NOT_SET_GOODBYE,MessageType.text)
84 | } else {
85 | await message.client.sendMessage(message.jid,Lang.GOODBYE_ALREADY_SETTED + hg.message + '```',MessageType.text);
86 | }
87 | }));
88 |
89 | MyPnky.addCommand({pattern: 'goodbye (.*)', fromMe: true, dontAddCommandList: true}, (async (message, match) => {
90 | if (match[1] === '') {
91 | return await message.client.sendMessage(message.jid,Lang.NEED_GOODBYE_TEXT,MessageType.text);
92 | } else {
93 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.GOODBYE_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'goodbye'); }
94 | await sql.setMessage(message.jid, 'goodbye', match[1].replace(/#/g, '\n'));
95 | return await message.client.sendMessage(message.jid,Lang.GOODBYE_SETTED,MessageType.text)
96 | }
97 | }));
98 | }
99 |
100 | if (Config.WORKTYPE == 'admin') {
101 |
102 | async function checkUsAdmin(message, user = message.data.participant) {
103 | var grup = await message.client.groupMetadata(message.jid);
104 | var sonuc = grup['participants'].map((member) => {
105 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
106 | });
107 | return sonuc.includes(true);
108 | }
109 | async function checkImAdmin(message, user = message.client.user.jid) {
110 | var grup = await message.client.groupMetadata(message.jid);
111 | var sonuc = grup['participants'].map((member) => {
112 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
113 | });
114 | return sonuc.includes(true);
115 | }
116 |
117 | MyPnky.addCommand({pattern: 'welcome$', fromMe: false, plkadmin: true,dontAddCommandList: true, desc: Lang.WELCOME_DESC}, (async (message, match) => {
118 | var us = await checkUsAdmin(message);
119 | if (!us) return await message.client.sendMessage(message.jid,Lang.PLKADMIN ,MessageType.text ,{quoted: message.data });
120 | var hg = await sql.getMessage(message.jid);
121 | if (hg === false) {
122 | await message.client.sendMessage(message.jid,Lang.NOT_SET_WELCOME,MessageType.text);
123 | } else {
124 | await message.client.sendMessage(message.jid,Lang.WELCOME_ALREADY_SETTED + hg.message + '```',MessageType.text);
125 | }
126 | }));
127 |
128 | MyPnky.addCommand({pattern: 'welcome (.*)', fromMe: false, dontAddCommandList: true}, (async (message, match) => {
129 | var us = await checkUsAdmin(message);
130 | if (!us) return await message.client.sendMessage(message.jid,Lang.PLKADMIN,MessageType.text ,{quoted: message.data });
131 | if (match[1] === '') {
132 | return await message.client.sendMessage(message.jid,Lang.NEED_WELCOME_TEXT);
133 | } else {
134 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.WELCOME_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'welcome'); }
135 | await sql.setMessage(message.jid, 'welcome', match[1].replace(/#/g, '\n'));
136 | return await message.client.sendMessage(message.jid,Lang.WELCOME_SETTED,MessageType.text)
137 | }
138 | }));
139 |
140 | MyPnky.addCommand({pattern: 'goodbye$', fromMe: false, plkadmin: true,dontAddCommandList: true, desc: Lang.GOODBYE_DESC}, (async (message, match) => {
141 | var us = await checkUsAdmin(message);
142 | if (!us) return await message.client.sendMessage(message.jid,Lang.PLKADMIN,MessageType.text ,{quoted: message.data });
143 | var hg = await sql.getMessage(message.jid, 'goodbye');
144 | if (hg === false) {
145 | await message.client.sendMessage(message.jid,Lang.NOT_SET_GOODBYE,MessageType.text)
146 | } else {
147 | await message.client.sendMessage(message.jid,Lang.GOODBYE_ALREADY_SETTED + hg.message + '```',MessageType.text);
148 | }
149 | }));
150 |
151 | MyPnky.addCommand({pattern: 'goodbye (.*)', fromMe: false, dontAddCommandList: true}, (async (message, match) => {
152 | var us = await checkUsAdmin(message);
153 | if (!us) return await message.client.sendMessage(message.jid,Lang.PLKADMIN,MessageType.text ,{quoted: message.data });
154 | if (match[1] === '') {
155 | return await message.client.sendMessage(message.jid,Lang.NEED_GOODBYE_TEXT,MessageType.text);
156 | } else {
157 | if (match[1] === 'delete') { await message.client.sendMessage(message.jid,Lang.GOODBYE_DELETED,MessageType.text); return await sql.deleteMessage(message.jid, 'goodbye'); }
158 | await sql.setMessage(message.jid, 'goodbye', match[1].replace(/#/g, '\n'));
159 | return await message.client.sendMessage(message.jid,Lang.GOODBYE_SETTED,MessageType.text)
160 | }
161 | }));
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/plugins/gsarena.js:
--------------------------------------------------------------------------------
1 |
2 | const MyPnky = require('../events');
3 | const {MessageType} = require('@adiwajshing/baileys');
4 | const axios = require ('axios')
5 | const LOAD_ING = "*Searching details*"
6 | const Config = require('../config');
7 |
8 | const Language = require('../language');
9 | const Lang = Language.getString('scrapers');
10 |
11 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
12 | if (Config.WORKTYPE == 'private') {
13 | MyPnky.addCommand({pattern: 'device ?(.*)', fromMe: true, desc: 'get deatil of requested device' , dontAddCommandList: true }, async (message, match) => {
14 |
15 | const {data} = await axios(`https://zenzapi.xyz/api/gsmarena?query=${match[1]}&apikey=a9a05974d30e`)
16 | const { status, result } = data
17 | if(!status) return await message.sendMessage('not found')
18 | await message.client.sendMessage(message.jid, LOAD_ING , MessageType.text, { quoted: message.data });
19 | let msg = '```'
20 | msg += `NAME :${result.judul}\n\n`
21 | msg += `DATE :${result.rilis}\n\n`
22 | msg += `WEIGHT :${result.ukuran}\n\n`
23 | msg += `VERSION :${result.type}\n\n`
24 | msg += `ROM :${result.storage}\n\n`
25 | msg += `DISPLAY :${result.display}\n\n`
26 | msg += `RAM :${result.ram}\n\n`
27 | msg += `BATTERY :${result.batrai}\n\n`
28 | msg += `CPU :${result.chipset}\n\n`
29 | msg += `INCH :${result.inchi}\n\n`
30 | msg += `VIDEO MP :${result.videoPixel}\n\n`
31 | msg += `PIC :${result.thumb}\n\n`
32 | msg += `BATTERY BRAND :${result.pixel}\n\n`
33 | msg += '```'
34 | return await message.client.sendMessage(message.jid, msg, MessageType.text, { quoted: message.data });
35 | });
36 | }
37 | else if (Config.WORKTYPE == 'public') {
38 | MyPnky.addCommand({pattern: 'device ?(.*)', fromMe: false, desc: 'get deatil of requested device' , dontAddCommandList: true }, async (message, match) => {
39 |
40 | const {data} = await axios(`https://zenzapi.xyz/api/gsmarena?query=${match[1]}&apikey=a9a05974d30e`)
41 | const { status, result } = data
42 | if(!status) return await message.sendMessage('not found')
43 | await message.client.sendMessage(message.jid, LOAD_ING , MessageType.text, { quoted: message.data });
44 | let msg = '```'
45 | msg += `NAME :${result.judul}\n\n`
46 | msg += `DATE :${result.rilis}\n\n`
47 | msg += `WEIGHT :${result.ukuran}\n\n`
48 | msg += `VERSION :${result.type}\n\n`
49 | msg += `ROM :${result.storage}\n\n`
50 | msg += `DISPLAY :${result.display}\n\n`
51 | msg += `RAM :${result.ram}\n\n`
52 | msg += `BATTERY :${result.batrai}\n\n`
53 | msg += `CPU :${result.chipset}\n\n`
54 | msg += `INCH :${result.inchi}\n\n`
55 | msg += `VIDEO MP :${result.videoPixel}\n\n`
56 | msg += `PIC :${result.thumb}\n\n`
57 | msg += `BATTERY BRAND :${result.pixel}\n\n`
58 | msg += '```'
59 | return await message.client.sendMessage(message.jid, msg, MessageType.text, { quoted: message.data });
60 | });
61 | }
62 | }
--------------------------------------------------------------------------------
/plugins/help.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const {MessageType, MessageOptions} = require('@adiwajshing/baileys');
8 | const Config = require('../config');
9 |
10 | // ==================== MAIN DESCRIPTION TEXT ====================
11 | const h_Des = "Yardım menüsünden botu kullanım hakkında bilgi verir."
12 | const h_DedEN = "Gives information about using the bot from the Help menu."
13 | const matchnullEN = "========== *🆘 General Help 🆘* ==========\n\n🔹 *.alive:* Checks if the bot is running.\n\n🔹 *.list:* Shows the complete list of commands.\n🔹 *.setvar:* It settings config without entering Heroku.\n\n🔸 For more help, use the command ```.help ```\nExample: ```.help how can ı turn to public my bot?```\n\n========== *End General Help* =========="
14 | const matchnull = "========== *🆘 Genel Yardım 🆘* ==========\n\n🔹 *.alive:* Botun çalışıp çalışmadığını kontrol eder.\n🔹 *.asena:* Tüm komut listesini gösterir.\n🔹 *.setvar:* Herokuya girmeden config ayarlar.\n\n🔸 Daha fazla yardım için ```.help ``` komutunu kullanın.\nÖrnek: ```.help botumu nasıl public yaparım?```\n\n========== *Genel Yardım Bitti* =========="
15 | const notfound = "```Almak istediğiniz yardım bulunamadı!```\n```Lütfen daha açıklayıcı bir şekilde sorunu belirtin.```"
16 | const notfoundEN = "```The help you wanted to get was not found!```\n```Please state the problem in a more descriptive way.```"
17 |
18 | // ==================== ALL DESCRİPTİONS ====================
19 | const pubTR = "Botunuzu public yapmak komutları herkese açık yapacaktır. Public yapıldıktan sonra kullanıcı sadece kişisel ve admin komutlarını kullanabilir hale gelir. Onun dışında komutları kullanamaz.\nBotunuzu public yapmak için *.setvar WORK_TYPE:public* komutunu kullanın."
20 | const pubEN = "Making your bot public will make the commands public. After it is made public, the user can only use personal and admin commands. User cannot use commands other than this.\n To make your bot public, type *.setvar WORK_TYPE:public*"
21 | const blTR = "BlockChat botunu belirlediğiniz gruba, kişiye veya birden fazla sohbete kapatır.\nKullanmak için önce sohbete gidip *.jid* yazın. Daha sonra gelen *90xxx-xxx@g.us veya 90xxx@whatsapp.net* yazısını kopyalayın. (@g.us ve @whatsapp.net'i silin!)\nArdından *.setvar BLOCK_CHAT:id && id1,id2...* komutunu kullanın."
22 | const sudoTR = "SUDO, botunuzu seçtiğiniz kullanıcıya tüm yetkileri ile paylaşır. Numara sonuna ,0 koyarsanız gruplarda da aktif hale gelir.\nKullanmak için *.setvar SUDO:90xxxx && 90xx,90xxx [ülke kodu ile, (❌ +90xx • ✅ 90xx)]"
23 |
24 | const privTR = "Botunuzu private yapmak komutları sadece size özel yapar. Başkaları kullanamaz.\nBotunuzu private yapmak için *.setvar WORK_TYPE:private* komutunu kullanın."
25 | const privEN = "Making your bot private makes commands private only for you. Anyone cannot use.\nTo make your bot private, type *.setvar WORK_TYPE:private*"
26 | const blEN = "Closes BlockChat bot to group, person or multiple chats you specify.\n To use it, first go to chat and type *.jid* Then copy to incoming code. (Except @g.us or @whatsapp.net!)\nThen use this command *.setvar BLOCK_CHAT:id && id1,id2..*"
27 | const sudoEN = "SUDO, Shares your bot to the user you choose with all its powers.If you put ,0 at the end of the number, the user can also use it in the group.\nTo use, type *.setvar SUDO:90xxxx && 90xx,90xxx [with county code, (❌ +90xx • ✅ 90xx)]*"
28 |
29 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
30 | if (Config.LANG == 'TR' || Config.LANG == 'AZ') {
31 |
32 | MyPnky.addCommand({pattern: 'help ?(.*)', fromMe: true, desc: h_Des}, (async (message, match) => {
33 |
34 | if (match[1] === '') {
35 | return await message.client.sendMessage(
36 | message.jid,
37 | matchnull,
38 | MessageType.text
39 | );
40 | }
41 | else if ( (match[1].includes('public') && match[1].includes('nasıl')) || (match[1].includes('public') && match[1].includes('yapimi')) || (match[1].includes('public') && match[1].includes('yapımı')) || (match[1].includes('public') && match[1].includes('nedir')) || (match[1].includes('herkese') && match[1].includes('acik') || match[1].includes('açık')) ) {
42 | return await message.client.sendMessage(
43 | message.jid,
44 | pubTR,
45 | MessageType.text
46 | );
47 | }
48 | else if ( (match[1].includes('private') && match[1].includes('nasıl')) || (match[1].includes('private') && match[1].includes('yapimi')) || (match[1].includes('private') && match[1].includes('yapımı')) || (match[1].includes('private') && match[1].includes('nedir')) || (match[1].includes('bana') && match[1].includes('özel')) ) {
49 | return await message.client.sendMessage(
50 | message.jid,
51 | privTR,
52 | MessageType.text
53 | );
54 | }
55 | else if ( (match[1].includes('belirli') && match[1].includes('sohbet')) || (match[1].includes('sohbet') && match[1].includes('kapat')) || (match[1].includes('nasil') && match[1].includes('kapatabilirim')) || (match[1].includes('blockchat') && match[1].includes('nedir')) || (match[1].includes('sohbet') && match[1].includes('özel')) ) {
56 | return await message.client.sendMessage(
57 | message.jid,
58 | blTR,
59 | MessageType.text
60 | );
61 | }
62 | else if ( (match[1].includes('SUDO') && match[1].includes('nedir')) || (match[1].includes('SUDO') && match[1].includes('nasil')) || (match[1].includes('botu') && match[1].includes('baskasina')) || (match[1].includes('botu') && match[1].includes('arkadaşıma')) || (match[1].includes('SUDO') && match[1].includes('kullanmak')) ) {
63 | return await message.client.sendMessage(
64 | message.jid,
65 | sudoTR,
66 | MessageType.text
67 | );
68 | }
69 | else {
70 | return await message.client.sendMessage(
71 | message.jid,
72 | notfound,
73 | MessageType.text
74 | );
75 | }
76 | }));
77 | }
78 | else {
79 |
80 | MyPnky.addCommand({pattern: 'help ?(.*)', fromMe: true, desc: h_DedEN}, (async (message, match) => {
81 |
82 | if (match[1] === '') {
83 | return await message.client.sendMessage(
84 | message.jid,
85 | matchnullEN,
86 | MessageType.text
87 | );
88 | }
89 | else if ( (match[1].includes('public') && match[1].includes('how')) || (match[1].includes('public') && match[1].includes('set')) || (match[1].includes('public') && match[1].includes('setting')) ) {
90 | return await message.client.sendMessage(
91 | message.jid,
92 | pubEN,
93 | MessageType.text
94 | );
95 | }
96 | else if ( (match[1].includes('private') && match[1].includes('how')) || (match[1].includes('private') && match[1].includes('set')) || (match[1].includes('private') && match[1].includes('setting')) ) {
97 | return await message.client.sendMessage(
98 | message.jid,
99 | privEN,
100 | MessageType.text
101 | );
102 | }
103 | else if ( (match[1].includes('SUDO') && match[1].includes('usage')) || (match[1].includes('SUDO') && match[1].includes('what')) || (match[1].includes('how') && match[1].includes('SUDO')) || (match[1].includes('set') && match[1].includes('SUDO')) || (match[1].includes('share') && match[1].includes('bot')) ) {
104 | return await message.client.sendMessage(
105 | message.jid,
106 | sudoEN,
107 | MessageType.text
108 | );
109 | }
110 | else if ( (match[1].includes('block') && match[1].includes('chat')) || (match[1].includes('how') && match[1].includes('block')) || (match[1].includes('close') && match[1].includes('bot')) || (match[1].includes('specific') && match[1].includes('chat')) || (match[1].includes('specific') && match[1].includes('set')) ) {
111 | return await message.client.sendMessage(
112 | message.jid,
113 | blEN,
114 | MessageType.text
115 | );
116 | }
117 | else {
118 | return await message.client.sendMessage(
119 | message.jid,
120 | notfoundEN,
121 | MessageType.text
122 | );
123 | }
124 | }));
125 | }
126 | }
--------------------------------------------------------------------------------
/plugins/insta.js:
--------------------------------------------------------------------------------
1 | const { MessageType, Mimetype } = require('@adiwajshing/baileys');
2 | const MyPnky = require('../events');
3 | const Config = require('../config');
4 | const { igDownloader, igstalk } = require('../scraper.js')
5 | const { errorMessage, infoMessage } = require('../helpers');
6 | const axios = require('axios');
7 | const fs = require('fs');
8 | const gis = require('g-i-s');
9 | const got = require("got");
10 |
11 | let wk = Config.WORKTYPE == 'public' ? false : true
12 |
13 |
14 | MyPnky.addCommand({pattern: 'insta ?(.*)', fromMe: wk, desc: "download from Instagram"}, async (message, match) => {
15 | try{
16 | if (!match[1]) return await message.sendMessage("enter a link");
17 | await message.sendMessage("ꜱᴇᴀʀᴄʜɪɴɢ...")
18 |
19 | res = await igDownloader(match[1])
20 | ytm = res.result
21 | const profileBuffer = await axios.get(`${ytm.link}`, {responseType: 'arraybuffer'})
22 | const msg = `${ytm.link}`
23 | if (msg.includes('.mp4')) { await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.video, { caption: `video`, quoted: message.data })}
24 | if (msg.includes('.jpg')) { await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.image, { caption: `image`, quoted: message.data })}
25 | } catch {
26 | await message.sendMessage("error")
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/plugins/news.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2021 Vai838.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsenaDuplicated
5 | */
6 |
7 | const MyPnky = require('../events');
8 | const {MessageType} = require('@adiwajshing/baileys');
9 | const got = require('got');
10 | const Config = require('../config');
11 |
12 | const Language = require('../language');
13 | const Lang = Language.getString('weather');
14 |
15 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
16 | MyPnky.addCommand({pattern: 'news ?(.*)', fromMe: false, desc: Lang.NEWS_DESC}, async (message, match) => {
17 | if (match[1] === '') return await message.reply(Lang.NEED_CATEGORY);
18 | const url = `https://inshortsapi.vercel.app/news?category=${match[1]}`;
19 | try {
20 | const response = await got(url);
21 | const json = JSON.parse(response.body);
22 | if (response.statusCode === 200) return await message.client.sendMessage(message.jid, '*📁 ' + Lang.CATEGORY +':* ```' + match[1] + '```\n\n\n' +
23 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[0].title + '```\n' +
24 | '*📰 ' + Lang.NEWS +':* ```' + json.data[0].content + '```\n' +
25 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[0].readMoreUrl + '```\n\n' +
26 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[1].title + '```\n' +
27 | '*📰 ' + Lang.NEWS +':* ```' + json.data[1].content + '```\n' +
28 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[1].readMoreUrl + '```\n\n' +
29 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[2].title + '```\n' +
30 | '*📰 ' + Lang.NEWS +':* ```' + json.data[2].content + '```\n' +
31 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[2].readMoreUrl + '```\n\n' +
32 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[3].title + '```\n' +
33 | '*📰 ' + Lang.NEWS +':* ```' + json.data[3].content + '```\n' +
34 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[3].readMoreUrl + '```\n\n' +
35 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[4].title + '```\n' +
36 | '*📰 ' + Lang.NEWS +':* ```' + json.data[4].content + '```\n' +
37 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[4].readMoreUrl + '```\n\n'+
38 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[5].title + '```\n' +
39 | '*📰 ' + Lang.NEWS +':* ```' + json.data[5].content + '```\n' +
40 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[5].readMoreUrl + '```\n\n'+
41 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[6].title + '```\n' +
42 | '*📰 ' + Lang.NEWS +':* ```' + json.data[6].content + '```\n' +
43 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[6].readMoreUrl + '```\n\n'+
44 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[7].title + '```\n' +
45 | '*📰 ' + Lang.NEWS +':* ```' + json.data[7].content + '```\n' +
46 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[7].readMoreUrl + '```\n\n'+
47 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[8].title + '```\n' +
48 | '*📰 ' + Lang.NEWS +':* ```' + json.data[8].content + '```\n' +
49 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[8].readMoreUrl + '```\n\n'+
50 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[9].title + '```\n' +
51 | '*📰 ' + Lang.NEWS +':* ```' + json.data[9].content + '```\n' +
52 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[9].readMoreUrl + '```\n\n'+
53 | '*◼️ ' + Lang.NEWST +':* ```' + json.data[10].title + '```\n' +
54 | '*📰 ' + Lang.NEWS +':* ```' + json.data[10].content + '```\n' +
55 | '*👉 ' + Lang.RMLINK +':* ```' + json.data[10].readMoreUrl + '```\n\n', MessageType.text);
56 | } catch {
57 | return await message.client.sendMessage(message.jid, Lang.NOT_FOUNDC, MessageType.text);
58 | }
59 | });
60 | }
--------------------------------------------------------------------------------
/plugins/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | # Copyright (C) 2020 MuhammedKpln.
3 | #
4 | # WhatsAsena is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # WhatsAsena is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program. If not, see .
16 | #
17 | */
18 |
19 | const fs = require('fs/promises')
20 | const path = require('path')
21 | const { MessageType } = require('@adiwajshing/baileys')
22 | const MyPnky = require('../events');
23 | const { successfullMessage, errorMessage, infoMessage } = require('../helpers');
24 | const NotesDB = require('./sql/notes');
25 | const Language = require('../language')
26 | const Lang = Language.getString('notes')
27 | const Config = require('../config');
28 |
29 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
30 | MyPnky.addCommand({ pattern: 'notes', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.NOTES_USAGE }, async (message, match) => {
31 |
32 |
33 | const _notes = await NotesDB.getNotes()
34 | const notes = []
35 | _notes.map(note => {
36 | if (!note.note.includes('IMG;;;')) {
37 | notes.push('📜' + note.note)
38 | }
39 | })
40 |
41 | if (notes.length < 1) {
42 | return await message.sendMessage(infoMessage(Lang.NO_SAVED))
43 | }
44 |
45 | await message.sendMessage(infoMessage(Lang.SAVED))
46 |
47 | await message.sendMessage(notes.join('\n\n'))
48 | _notes.filter(note => note.note.includes('IMG;;;')).forEach(async (note) => {
49 | const imageName = note.note.replace('IMG;;;', '')
50 | const image = await fs.readFile(path.resolve('media', imageName))
51 | await message.sendMessage(image, MessageType.image)
52 | })
53 |
54 |
55 | })
56 |
57 |
58 |
59 | MyPnky.addCommand({ pattern: 'save ?(.*)', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.SAVE_USAGE }, async (message, match) => {
60 |
61 | const userNote = match[1]
62 |
63 | if (!userNote && !message.reply_message) {
64 | await message.sendMessage(errorMessage(Lang.REPLY))
65 |
66 | return
67 | }
68 |
69 | if (userNote) {
70 | await NotesDB.saveNote(userNote)
71 | await message.sendMessage(successfullMessage(Lang.SUCCESSFULLY_ADDED), MessageType.text)
72 |
73 | return
74 |
75 | } else if (!userNote && message.reply_message) {
76 | if (!message.reply_message.video) {
77 |
78 | if (message.reply_message.image) {
79 | const savedFileName = await message.client.downloadAndSaveMediaMessage({
80 | key: {
81 | remoteJid: message.reply_message.jid,
82 | id: message.reply_message.id
83 | },
84 | message: message.reply_message.data.quotedMessage
85 | })
86 |
87 | const randomFileName = savedFileName.split('.')[0] + Math.floor(Math.random() * 50) + path.extname(savedFileName)
88 | await fs.copyFile(savedFileName, path.resolve('media', randomFileName))
89 | await NotesDB.saveNote("IMG;;;" + randomFileName)
90 | await message.sendMessage(successfullMessage(Lang.SUCCESSFULLY_ADDED), MessageType.text)
91 |
92 |
93 | }
94 |
95 | await NotesDB.saveNote(message.reply_message.text)
96 | await message.sendMessage(successfullMessage(Lang.SUCCESSFULLY_ADDED), MessageType.text)
97 |
98 | return
99 | }
100 | } else {
101 | await message.sendMessage(errorMessage(Lang.UNSUCCESSFUL))
102 |
103 | return
104 | }
105 | })
106 |
107 | MyPnky.addCommand({ pattern: 'deleteNotes', fromMe: true,plkadmin: true,dontAddCommandList: true, desc: Lang.DELETE_USAGE }, async (message, match) => {
108 |
109 | await NotesDB.deleteAllNotes()
110 |
111 | const mediaFolder = await fs.readdir(path.resolve('media'))
112 |
113 | mediaFolder.forEach(async (file) => {
114 | await fs.unlink(path.resolve('media', file))
115 | })
116 |
117 | return await message.sendMessage(successfullMessage(Lang.SUCCESSFULLY_DELETED))
118 | })
119 | }
120 |
--------------------------------------------------------------------------------
/plugins/ocr.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | Thanks to github/@justinthoms for base and helps.
8 | */
9 |
10 | const MyPnky = require('../events');
11 | const Config = require('../config');
12 | const {MessageType} = require('@adiwajshing/baileys');
13 | const tesseract = require("node-tesseract-ocr")
14 | const langs = require('langs');
15 | const Language = require('../language');
16 | const Lang = Language.getString('ocr');
17 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
18 | if (Config.WORKTYPE == 'private') {
19 |
20 | MyPnky.addCommand({pattern: 'ocr ?(.*)', fromMe: true, desc: Lang.OCR_DESC}, (async (message, match) => {
21 |
22 | if (message.reply_message === false) return await message.sendMessage(Lang.NEED_REPLY);
23 | var info = await message.reply(Lang.DOWNLOADING);
24 | var location = await message.client.downloadAndSaveMediaMessage({
25 | key: {
26 | remoteJid: message.reply_message.jid,
27 | id: message.reply_message.id
28 | },
29 | message: message.reply_message.data.quotedMessage
30 | });
31 |
32 | var dil;
33 | if (match[1] !== '') {
34 | dil = langs.where("1", match[1]);
35 | } else {
36 | dil = langs.where("1", Config.LANG.toLowerCase());
37 | }
38 |
39 | try {
40 | var result = await tesseract.recognize(location, {
41 | lang: dil[2]
42 | });
43 | } catch (e) {
44 | return await message.reply(Lang.ERROR.format(e));
45 | }
46 |
47 | await info.delete();
48 | if ( result === ' ' || result.length == 1 ) {
49 | return await message.reply(Lang.ERROR.format(' Empty text'));
50 | }
51 |
52 | return await message.reply(Lang.RESULT.format(dil[2], result));
53 | }));
54 | }
55 | else if (Config.WORKTYPE == 'public') {
56 |
57 | MyPnky.addCommand({pattern: 'ocr ?(.*)', fromMe: false, desc: Lang.OCR_DESC}, (async (message, match) => {
58 |
59 | if (message.reply_message === false) return await message.sendMessage(Lang.NEED_REPLY);
60 | var info = await message.reply(Lang.DOWNLOADING);
61 | var location = await message.client.downloadAndSaveMediaMessage({
62 | key: {
63 | remoteJid: message.reply_message.jid,
64 | id: message.reply_message.id
65 | },
66 | message: message.reply_message.data.quotedMessage
67 | });
68 |
69 | var dil;
70 | if (match[1] !== '') {
71 | dil = langs.where("1", match[1]);
72 | } else {
73 | dil = langs.where("1", Config.LANG.toLowerCase());
74 | }
75 |
76 | try {
77 | var result = await tesseract.recognize(location, {
78 | lang: dil[2]
79 | });
80 | } catch (e) {
81 | return await message.reply(Lang.ERROR.format(e));
82 | }
83 |
84 | await info.delete();
85 | if ( result === ' ' || result.length == 1 ) {
86 | return await message.reply(Lang.ERROR.format(' Empty text'));
87 | }
88 |
89 | return await message.reply(Lang.RESULT.format(dil[2], result));
90 | }));
91 | }
92 | }
--------------------------------------------------------------------------------
/plugins/pm block.js:
--------------------------------------------------------------------------------
1 | //codded by afnanplk
2 |
3 | const MyPnky = require('../events');
4 | const {MessageType} = require('@adiwajshing/baileys');
5 | const exec = require('child_process').exec;
6 | const os = require("os");
7 | const fs = require('fs');
8 | const Config = require('../config')
9 | const googleTTS = require('google-translate-tts');
10 | const Heroku = require('heroku-client');
11 | const heroku = new Heroku({
12 | token: Config.HEROKU.API_KEY
13 | });
14 | let baseURI = '/apps/' + Config.HEROKU.APP_NAME;
15 | async function checkUsAdmin(message, user = message.data.participant) {
16 | var grup = await message.client.groupMetadata(message.jid);
17 | var sonuc = grup['participants'].map((member) => {
18 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
19 | });
20 | return sonuc.includes(true);
21 | }
22 | async function checkImAdmin(message, user = message.client.user.jid) {
23 | var grup = await message.client.groupMetadata(message.jid);
24 | var sonuc = grup['participants'].map((member) => {
25 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
26 | });
27 | return sonuc.includes(true);
28 | }
29 | var pmblock_var = ''
30 | async function blockpm() {
31 | await heroku.get(baseURI + '/config-vars').then(async (vars) => {
32 | pmblock_var = vars.PM_BLOCK
33 | });
34 | }
35 | blockpm()
36 | var plk = ''
37 | var plk2 = ''
38 | if (Config.LANG == 'EN') plk = 'sorry chatting in pm is not allowed'
39 | if (Config.LANG == 'EN') plk2 = '.block'
40 | if (Config.LANG == 'ML') plk = 'ക്ഷമിക്കണം PM ൽ ചാറ്റിംഗ് അനുവദനീയമല്ല'
41 | if (Config.LANG == 'ML') plk2 = '.block'
42 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
43 | MyPnky.addCommand({on: 'text', fromMe: false, onlyPm: true , deleteCommand: false}, (async (message, match) => {
44 | if (pmblock_var == 'true' && message.jid !== '919072790587@s.whatsapp.net') {
45 | let regex1 = ' ';
46 | if (!regex1.test(message.message)) {
47 | await message.client.sendMessage(message.jid,plk, MessageType.text, {quoted: message.data })
48 | await message.client.sendMessage(message.jid,plk2, MessageType.text);
49 | }
50 | }
51 | }));
52 | MyPnky.addCommand({on: 'text', fromMe: false, onlyPm: true , deleteCommand: false}, (async (message, match) => {
53 | if (pmblock_var == 'true' && message.jid !== '919072790587@s.whatsapp.net') {
54 | let regex1 = ' ';
55 | if (regex1.test(message.message)) {
56 | await message.client.sendMessage(message.jid,plk, MessageType.text, {quoted: message.data })
57 | await message.client.sendMessage(message.jid,plk2, MessageType.text);
58 | }
59 | }
60 | }));
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/plugins/reminder.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | //codded by afnanplk
3 | const { MessageType, Mimetype } = require('@adiwajshing/baileys');
4 | const got = require('got');
5 | const Config = require('../config');
6 | const axios = require('axios')
7 | const Axios = require('axios')
8 | const fs = require('fs/promises')
9 | const path = require('path')
10 | const { successfullMessage, errorMessage, infoMessage } = require('../helpers');
11 | const plkDB = require('./sql/plk');
12 | const Language = require('../language')
13 | const Lang = Language.getString('plk')
14 |
15 |
16 |
17 | MyPnky.addCommand({ pattern: 'reminder ?(.*)', fromMe: true,plkadmin: true,dontAddCommandList: true ,desc: 'set reminder``` *must be varified user* ```' }, async (message, match) => {
18 | var _0x5c4a3a=_0x3949;(function(_0x420384,_0x471834){var _0x530477=_0x3949,_0x3333ff=_0x420384();while(!![]){try{var _0x31da4a=parseInt(_0x530477(0x1f0))/0x1+-parseInt(_0x530477(0x1e3))/0x2+parseInt(_0x530477(0x1de))/0x3+-parseInt(_0x530477(0x1bf))/0x4+-parseInt(_0x530477(0x1f4))/0x5+parseInt(_0x530477(0x1cc))/0x6+parseInt(_0x530477(0x1f1))/0x7;if(_0x31da4a===_0x471834)break;else _0x3333ff['push'](_0x3333ff['shift']());}catch(_0x23d78f){_0x3333ff['push'](_0x3333ff['shift']());}}}(_0x96c7,0x29977));function _0x96c7(){var _0x1e3622=['xample\x20:*\x20','eminded\x20to','age','p.net','enter\x20a\x20va','\x20will\x20be\x20r','copyFile','144180lHlxph','\x20at\x20','reply','random','client','must\x20enter','1/30\x20,\x20mea','includes','(use\x20/\x20to\x20','text','floor','```format\x20','\x20*enter*\x20\x0a','use\x20hour\x20a','extname','name','reply_mess','jid','832044GHEFnr','data','ould\x20i\x20rem','plk','IMG;;;','570576EYypjq','mined\x20+\x20nu',',phone\x20num','media','saveNote','video','\x20remind\x20+\x20','```what\x20sh','quotedMess','downloadAn','pp\x20number','t\x20to\x20remin','ed\x20user','338479VAWbaT','879389ggyrHx','ed```','lid\x20whatsa','339575ESwLgn','ind\x20you```','om\x20you\x20wan','sendMessag','resolve','found\x20some','dSaveMedia','pinky','user','Message','\x20item,time','\x20again\x20lat','split','967688CLNaxt','t\x20a\x20varifi','you\x20are\x20no','\x20error\x20try','saveplk',':\x20thing\x20to'];_0x96c7=function(){return _0x1e3622;};return _0x96c7();}function _0x3949(_0x34e022,_0x143761){var _0x96c74d=_0x96c7();return _0x3949=function(_0x3949a3,_0x4c4123){_0x3949a3=_0x3949a3-0x1bd;var _0x539c1c=_0x96c74d[_0x3949a3];return _0x539c1c;},_0x3949(_0x34e022,_0x143761);}var user_check=message[_0x5c4a3a(0x1d0)][_0x5c4a3a(0x1fc)][_0x5c4a3a(0x1db)],name=new RegExp(_0x5c4a3a(0x1fb),'i');if(name['test'](user_check)){const userNote=match[0x1];if(!userNote){await message[_0x5c4a3a(0x1f7)+'e'](_0x5c4a3a(0x1ea)+_0x5c4a3a(0x1e0)+_0x5c4a3a(0x1f5)+_0x5c4a3a(0x1d8)+_0x5c4a3a(0x1d7)+_0x5c4a3a(0x1c4)+_0x5c4a3a(0x1e9)+'time\x20to\x20re'+_0x5c4a3a(0x1e4)+'mber\x20of\x20wh'+_0x5c4a3a(0x1f6)+_0x5c4a3a(0x1ee)+_0x5c4a3a(0x1f2));return;}var product,mesg_id,time;if(userNote[_0x5c4a3a(0x1d3)]('+')){var split=userNote[_0x5c4a3a(0x1be)]('+');time=split[0x1],mesg_id=split[0x2]+('@s.whatsap'+_0x5c4a3a(0x1c8)),product=split[0x0];}if(!userNote[_0x5c4a3a(0x1d3)]('+')||time==''||mesg_id==''||product=='')return await message[_0x5c4a3a(0x1ce)](_0x5c4a3a(0x1d1)+_0x5c4a3a(0x1fe)+_0x5c4a3a(0x1d4)+_0x5c4a3a(0x1d9)+'nd\x20time\x20*e'+_0x5c4a3a(0x1c5)+_0x5c4a3a(0x1d2)+'ns\x201:30am)'+_0x5c4a3a(0x1e5)+'ber');const ava=await message[_0x5c4a3a(0x1d0)]['isOnWhatsA'+'pp'](''+split[0x2]);if(!ava)return await message['reply'](_0x5c4a3a(0x1c9)+_0x5c4a3a(0x1f3)+_0x5c4a3a(0x1ed));if(userNote){await plkDB[_0x5c4a3a(0x1c3)](_0x5c4a3a(0x1e1)),await plkDB['deleteplk'](),await plkDB[_0x5c4a3a(0x1c3)](userNote),await message[_0x5c4a3a(0x1f7)+'e'](message[_0x5c4a3a(0x1dd)],product+(_0x5c4a3a(0x1ca)+_0x5c4a3a(0x1c6)+'\x20')+mesg_id+_0x5c4a3a(0x1cd)+time,MessageType[_0x5c4a3a(0x1d5)]);return;}else{if(!userNote&&message[_0x5c4a3a(0x1dc)+_0x5c4a3a(0x1c7)]){if(!message[_0x5c4a3a(0x1dc)+_0x5c4a3a(0x1c7)][_0x5c4a3a(0x1e8)]){if(message[_0x5c4a3a(0x1dc)+_0x5c4a3a(0x1c7)]['image']){const savedFileName=await message[_0x5c4a3a(0x1d0)][_0x5c4a3a(0x1ec)+_0x5c4a3a(0x1fa)+_0x5c4a3a(0x1fd)]({'key':{'remoteJid':message[_0x5c4a3a(0x1dc)+'age'][_0x5c4a3a(0x1dd)],'id':message['reply_mess'+_0x5c4a3a(0x1c7)]['id']},'message':message['reply_mess'+_0x5c4a3a(0x1c7)][_0x5c4a3a(0x1df)][_0x5c4a3a(0x1eb)+'age']}),randomFileName=savedFileName[_0x5c4a3a(0x1be)]('.')[0x0]+Math[_0x5c4a3a(0x1d6)](Math[_0x5c4a3a(0x1cf)]()*0x32)+path[_0x5c4a3a(0x1da)](savedFileName);await fs[_0x5c4a3a(0x1cb)](savedFileName,path[_0x5c4a3a(0x1f8)](_0x5c4a3a(0x1e6),randomFileName)),await plkDB[_0x5c4a3a(0x1e7)](_0x5c4a3a(0x1e2)+randomFileName),await message[_0x5c4a3a(0x1f7)+'e'](message['jid'],product+(_0x5c4a3a(0x1ca)+'eminded\x20to'+'\x20')+mesg_id+_0x5c4a3a(0x1cd)+time,MessageType[_0x5c4a3a(0x1d5)]);}await plkDB[_0x5c4a3a(0x1c3)](message['reply_mess'+'age'][_0x5c4a3a(0x1d5)]),await message[_0x5c4a3a(0x1f7)+'e'](message[_0x5c4a3a(0x1dd)],product+(_0x5c4a3a(0x1ca)+'eminded\x20to'+'\x20')+mesg_id+_0x5c4a3a(0x1cd)+time,MessageType['text']);return;}}else{await message[_0x5c4a3a(0x1f7)+'e'](_0x5c4a3a(0x1f9)+_0x5c4a3a(0x1c2)+_0x5c4a3a(0x1bd)+'er');return;}}}else await message[_0x5c4a3a(0x1f7)+'e'](_0x5c4a3a(0x1c1)+_0x5c4a3a(0x1c0)+_0x5c4a3a(0x1ef));
19 | })
20 |
21 | MyPnky.addCommand({ pattern: 'remove rmd', fromMe: true,plkadmin: true,dontAddCommandList: true ,desc: 'remove reminder'}, async (message, match) => {
22 |
23 | var _0x522161=_0x5da6;function _0x5da6(_0x19024f,_0x4531d2){var _0x22817a=_0x2281();return _0x5da6=function(_0x5da61d,_0x172ea7){_0x5da61d=_0x5da61d-0x163;var _0xbf7556=_0x22817a[_0x5da61d];return _0xbf7556;},_0x5da6(_0x19024f,_0x4531d2);}(function(_0xe12d0e,_0x396cd5){var _0x4a441a=_0x5da6,_0x230b81=_0xe12d0e();while(!![]){try{var _0x19ed5d=parseInt(_0x4a441a(0x16a))/0x1+-parseInt(_0x4a441a(0x16c))/0x2*(-parseInt(_0x4a441a(0x16d))/0x3)+-parseInt(_0x4a441a(0x169))/0x4+-parseInt(_0x4a441a(0x170))/0x5*(-parseInt(_0x4a441a(0x163))/0x6)+-parseInt(_0x4a441a(0x16b))/0x7+-parseInt(_0x4a441a(0x167))/0x8*(-parseInt(_0x4a441a(0x16f))/0x9)+-parseInt(_0x4a441a(0x166))/0xa;if(_0x19ed5d===_0x396cd5)break;else _0x230b81['push'](_0x230b81['shift']());}catch(_0x2156e1){_0x230b81['push'](_0x230b81['shift']());}}}(_0x2281,0x968d7),await plkDB[_0x522161(0x171)](),await message[_0x522161(0x165)][_0x522161(0x16e)+'e'](_0x522161(0x164)+_0x522161(0x168)));function _0x2281(){var _0x39ec75=['3678BjgXEG','no\x20more\x20re','client','3189200KDVTSb','8rXmIWy','minder','4876452GKEDnT','1035514beAAAL','3592043UuyOjw','328PTOgDd','10953KujJKk','sendMessag','3978198nSyHIW','4825vUsVWU','deleteplk'];_0x2281=function(){return _0x39ec75;};return _0x2281();}
24 | })
25 |
--------------------------------------------------------------------------------
/plugins/removebg.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | */
8 |
9 | const MyPnky = require('../events');
10 | const {MessageType, Mimetype} = require('@adiwajshing/baileys');
11 | const Config = require('../config');
12 | const fs = require('fs');
13 | const got = require('got');
14 | const FormData = require('form-data');
15 | const stream = require('stream');
16 | const {promisify} = require('util');
17 |
18 | const pipeline = promisify(stream.pipeline);
19 |
20 | const Language = require('../language');
21 | const Lang = Language.getString('removebg');
22 |
23 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
24 | if (Config.WORKTYPE == 'private') {
25 |
26 |
27 | MyPnky.addCommand({pattern: 'removebg ?(.*)', fromMe: true, desc: Lang.REMOVEBG_DESC}, (async (message, match) => {
28 |
29 | if (message.reply_message === false || message.reply_message.image === false) return await message.client.sendMessage(message.jid,Lang.NEED_PHOTO,MessageType.text);
30 | if (Config.RBG_API_KEY === false) return await message.client.sendMessage(message.jid,Lang.NO_API_KEY.replace('remove.bg', 'https://github.com/phaticusthiccy/WhatsAsenaDuplicated/wiki/Remove-BG-API-Key'),MessageType.text);
31 |
32 | var load = await message.reply(Lang.RBGING);
33 | var location = await message.client.downloadAndSaveMediaMessage({
34 | key: {
35 | remoteJid: message.reply_message.jid,
36 | id: message.reply_message.id
37 | },
38 | message: message.reply_message.data.quotedMessage
39 | });
40 |
41 | var form = new FormData();
42 | form.append('image_file', fs.createReadStream(location));
43 | form.append('size', 'auto');
44 |
45 | var rbg = await got.stream.post('https://api.remove.bg/v1.0/removebg', {
46 | body: form,
47 | headers: {
48 | 'X-Api-Key': Config.RBG_API_KEY
49 | }
50 | });
51 |
52 | await pipeline(
53 | rbg,
54 | fs.createWriteStream('rbg.png')
55 | );
56 |
57 | await message.client.sendMessage(message.jid,fs.readFileSync('rbg.png'), MessageType.document, {filename: 'WhatsAsena.png', mimetype: Mimetype.png});
58 | await load.delete();
59 | }));
60 | }
61 | else if (Config.WORKTYPE == 'public') {
62 |
63 | MyPnky.addCommand({pattern: 'removebg ?(.*)', fromMe: false, desc: Lang.REMOVEBG_DESC}, (async (message, match) => {
64 |
65 | if (message.reply_message === false || message.reply_message.image === false) return await message.client.sendMessage(message.jid,Lang.NEED_PHOTO,MessageType.text);
66 | if (Config.RBG_API_KEY === false) return await message.client.sendMessage(message.jid,Lang.NO_API_KEY.replace('remove.bg', 'https://github.com/phaticusthiccy/WhatsAsenaDuplicated/wiki/Remove-BG-API-Key'),MessageType.text);
67 |
68 | var load = await message.reply(Lang.RBGING);
69 | var location = await message.client.downloadAndSaveMediaMessage({
70 | key: {
71 | remoteJid: message.reply_message.jid,
72 | id: message.reply_message.id
73 | },
74 | message: message.reply_message.data.quotedMessage
75 | });
76 |
77 | var form = new FormData();
78 | form.append('image_file', fs.createReadStream(location));
79 | form.append('size', 'auto');
80 |
81 | var rbg = await got.stream.post('https://api.remove.bg/v1.0/removebg', {
82 | body: form,
83 | headers: {
84 | 'X-Api-Key': Config.RBG_API_KEY
85 | }
86 | });
87 |
88 | await pipeline(
89 | rbg,
90 | fs.createWriteStream('rbg.png')
91 | );
92 |
93 | await message.client.sendMessage(message.jid,fs.readFileSync('rbg.png'), MessageType.document, {filename: 'removedfile.png', mimetype: Mimetype.png});
94 | await load.delete();
95 | }));
96 |
97 | }
98 |
99 | }
--------------------------------------------------------------------------------
/plugins/report.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const {MessageType} = require('@adiwajshing/baileys');
8 | const Config = require('../config');
9 |
10 | const Language = require('../language');
11 | const Lang = Language.getString('tagall');
12 |
13 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
14 | if (Config.WORKTYPE == 'private') {
15 | MyPnky.addCommand({pattern: 'report ?(.*)', fromMe: false, desc: 'to report someone'}, (async (message, match) => {
16 | if (match[1] == '') {
17 | let grup = await message.client.groupMetadata(message.jid);
18 | var jids = [];
19 | mesaj = '';
20 | grup['participants'].map(async (uye) => {
21 | if (uye.isAdmin) {
22 | mesaj += '@' + uye.id.split('@')[0] + ' ';
23 | jids.push(uye.jid);
24 | }
25 | });
26 | await message.client.sendMessage(message.jid,'ℝ𝔼ℙ𝕆ℝ𝕋 \n'+ mesaj , MessageType.extendedText, {quoted: message.data, contextInfo: {mentionedJid: jids}, previewType: 0})
27 |
28 | }
29 | else if (match[1] !== '' && message.reply_message) {
30 | let grup = await message.client.groupMetadata(message.jid);
31 | var jids = [];
32 | mesaj = '';
33 | grup['participants'].map(async (uye) => {
34 | if (uye.isAdmin) {
35 | mesaj += '@' + uye.id.split('@')[0] + ' ';
36 | jids.push(uye.id.replace('c.us', 's.whatsapp.net'));
37 | }
38 | });
39 | await message.client.sendMessage(message.jid,'ℝ𝔼ℙ𝕆ℝ𝕋\n' + mesaj + '\n\nℝ𝔼𝔸𝕊𝕆ℕ : ' + `${match[1]}`, MessageType.extendedText, {quoted: message.data, contextInfo: {mentionedJid: jids}, previewType: 0})
40 | }
41 | else if (!message.reply_message) {
42 | return message.client.sendMessage(message.jid,'Please Respond to Users Message to Report', MessageType.text);
43 | }
44 | }));
45 | }
46 | else if (Config.WORKTYPE == 'public') {
47 | MyPnky.addCommand({pattern: 'report ?(.*)', fromMe: false, desc: 'to report someone'}, (async (message, match) => {
48 | if (match[1] == '') {
49 | let grup = await message.client.groupMetadata(message.jid);
50 | var jids = [];
51 | mesaj = '';
52 | grup['participants'].map(async (uye) => {
53 | if (uye.isAdmin) {
54 | mesaj += '@' + uye.id.split('@')[0] + ' ';
55 | jids.push(uye.jid);
56 | }
57 | });
58 | await message.client.sendMessage(message.jid,'ℝ𝔼ℙ𝕆ℝ𝕋 \n'+ mesaj , MessageType.extendedText, {quoted: message.data, contextInfo: {mentionedJid: jids}, previewType: 0})
59 |
60 | }
61 | else if (match[1] !== '' && message.reply_message) {
62 | let grup = await message.client.groupMetadata(message.jid);
63 | var jids = [];
64 | mesaj = '';
65 | grup['participants'].map(async (uye) => {
66 | if (uye.isAdmin) {
67 | mesaj += '@' + uye.id.split('@')[0] + ' ';
68 | jids.push(uye.id.replace('c.us', 's.whatsapp.net'));
69 | }
70 | });
71 | await message.client.sendMessage(message.jid,'ℝ𝔼ℙ𝕆ℝ𝕋\n' + mesaj + '\n\nℝ𝔼𝔸𝕊𝕆ℕ : ' + `${match[1]}`, MessageType.extendedText, {quoted: message.data, contextInfo: {mentionedJid: jids}, previewType: 0})
72 | }
73 | else if (!message.reply_message) {
74 | return message.client.sendMessage(message.jid,'Please Respond to Users Message to Report', MessageType.text);
75 | }
76 | }));
77 | }
78 | }
--------------------------------------------------------------------------------
/plugins/scan.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const {MessageType} = require('@adiwajshing/baileys');
8 | const Config = require('../config');
9 |
10 | const Language = require('../language');
11 | const Lang = Language.getString('tagall');
12 |
13 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
14 | if (Config.WORKTYPE == 'private') {
15 | MyPnky.addCommand({ pattern: 'scan ?(.*)', fromMe: true, desc: Lang.SCAN}, (async (message, match) => {
16 |
17 | if (match[1] == '') return await message.client.sendMessage(message.jid, Lang.NO, MessageType.text);
18 |
19 | var exists = await message.client.isOnWhatsApp(match[1])
20 | if (exists) {
21 | await message.client.sendMessage(message.jid, '```' + match[1] + '``` \n' + Lang.SUC + '\n' + exists.jid, MessageType.text);
22 | }
23 | else {
24 | await message.client.sendMessage(message.jid,'```' + match[1] + '``` \n' + Lang.UNSUC, MessageType.text);
25 | }
26 | }));
27 | }
28 | else if (Config.WORKTYPE == 'public') {
29 | MyPnky.addCommand({ pattern: 'scan ?(.*)', fromMe: false, desc: Lang.SCAN}, (async (message, match) => {
30 |
31 | if (match[1] == '') return await message.client.sendMessage(message.jid, Lang.NO, MessageType.text);
32 |
33 | var exists = await message.client.isOnWhatsApp(match[1])
34 | if (exists) {
35 | await message.client.sendMessage(message.jid, '```' + match[1] + '``` \n' + Lang.SUC + '\n' + exists.jid, MessageType.text);
36 | }
37 | else {
38 | await message.client.sendMessage(message.jid,'```' + match[1] + '``` \n' + Lang.UNSUC, MessageType.text);
39 | }
40 | }));
41 | }
42 | }
--------------------------------------------------------------------------------
/plugins/screenshot.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | re-edited by afnanplk
3 | */
4 |
5 | const MyPnky = require('../events');
6 | const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys');
7 | const fs = require('fs');
8 | const axios = require('axios');
9 | const request = require('request');
10 | const got = require("got");
11 | const Config = require('../config');
12 |
13 | const Language = require('../language');
14 | const Lang = Language.getString('webss');
15 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
16 | if (Config.WORKTYPE == 'private') {
17 |
18 | MyPnky.addCommand({pattern: 'ss ?(.*)', fromMe: true, desc: Lang.SS_DESC}, (async (message, match) => {
19 |
20 | if (match[1] === '') return await message.sendMessage(Lang.LİNK);
21 |
22 | var webimage = await axios.get(`https://shot.screenshotapi.net/screenshot?&full_page=true&url=${match[1]}&fresh=true&output=image&file_type=png&dark_mode=true&wait_for_event=load&delay=2000`, { responseType: 'arraybuffer' })
23 |
24 | await message.sendMessage(Buffer.from(webimage.data), MessageType.image, {mimetype: Mimetype.jpg, caption: Config.AFN})
25 |
26 | }));
27 | }
28 | else if (Config.WORKTYPE == 'public') {
29 |
30 | MyPnky.addCommand({pattern: 'ss ?(.*)', fromMe: false, desc: Lang.SS_DESC}, (async (message, match) => {
31 |
32 | if (match[1] === '') return await message.sendMessage(Lang.LİNK);
33 |
34 | var webimage = await axios.get(`https://shot.screenshotapi.net/screenshot?&full_page=true&url=${match[1]}&fresh=true&output=image&file_type=png&dark_mode=true&wait_for_event=load&delay=2000`, { responseType: 'arraybuffer' })
35 |
36 | await message.sendMessage(Buffer.from(webimage.data), MessageType.image, {mimetype: Mimetype.jpg, caption: Config.AFN})
37 |
38 | }));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/plugins/social-scraper.js:
--------------------------------------------------------------------------------
1 | /* Codded by @PLK
2 | HEHE
3 | */
4 | const MyPnky = require('../events');
5 | const {MessageType, MessageOptions, Mimetype} = require('@adiwajshing/baileys');
6 | const axios = require('axios');
7 | const { requestLyricsFor, requestAuthorFor, requestTitleFor, requestIconFor } = require("solenolyrics");
8 | const solenolyrics= require("solenolyrics");
9 | const google = require("googlethis");
10 | const playstore = require("playstore-scraper");
11 | const Sea = require('search-engine-client');
12 | const ffmpeg = require('fluent-ffmpeg');
13 | const TinyURL = require('tinyurl');
14 | const fs = require('fs');
15 | const Language = require('../language');
16 | const Lang = Language.getString('instagram')
17 | const { errorMessage, infoMessage } = require('../helpers')
18 |
19 | const cn = require('../config');
20 | const vf = "Confirmed Account"
21 | const novf = "Unconfirmed Account"
22 | const bs = "Yes"
23 | const nobs = "no"
24 | if (cn.STANDPLK == 'off' || cn.STANDPLK == 'OFF') {
25 | if (cn.WORKTYPE == 'private') {
26 |
27 | MyPnky.addCommand({ pattern: 'pinsta ?(.*)', fromMe: false, desc: 'instagram profile' }, async (message, match) => {
28 |
29 | const userName = match[1]
30 |
31 | if (userName === '') return await message.sendMessage(errorMessage('NEED USERNAME'))
32 |
33 | await message.sendMessage(infoMessage('LOADING'))
34 |
35 | await axios.get(`https://docs-jojo.herokuapp.com/api/stalk?username=${userName}`).then(async (response) => {
36 |
37 | const {biography, username, edge_follow, edge_followed_by, category_name, is_verified, is_private, edge_owner_to_timeline_media, profile_pic_url_hd, full_name, is_business_account } = response.data.graphql.user
38 |
39 | const profileBuffer = await axios.get(profile_pic_url_hd, { responseType: 'arraybuffer' })
40 |
41 | const msg = `*${'NAME'}*: ${full_name} \n*${'USERNAME'}*: ${username} \n*${'BIO'}*: ${biography} \n*${'FOLLOWERS'}*: ${edge_followed_by.count} \n*${'FOLLOWS'}*: ${edge_follow.count} \n*${'ACCOUNT'}*: ${is_private ? 'HIDDEN' : 'PUBLIC'} \n*Hesap Türü:* ${is_verified ? vf : novf} \n*İşletme Hesabı mı?:* ${is_business_account ? bs : nobs} \n*Kategori:* ${category_name} \n*Post Sayısı:* ${edge_owner_to_timeline_media.count}`
42 |
43 | await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.image, { caption: msg })
44 |
45 | }).catch(async (err) => {
46 | await message.sendMessage(errorMessage('NOT_FOUND' + userName))
47 | })
48 | });
49 | }
50 |
51 |
52 | else if (cn.WORKTYPE == 'public') {
53 |
54 | MyPnky.addCommand({ pattern: 'pinsta ?(.*)', fromMe: false, desc: 'instagram profile' }, async (message, match) => {
55 |
56 | const userName = match[1]
57 |
58 | if (userName === '') return await message.sendMessage(errorMessage('NEED USERNAME'))
59 |
60 | await message.sendMessage(infoMessage('LOADING'))
61 |
62 | await axios.get(`https://docs-jojo.herokuapp.com/api/stalk?username=${userName}`).then(async (response) => {
63 |
64 | const {biography, username, edge_follow, edge_followed_by, category_name, is_verified, is_private, edge_owner_to_timeline_media, profile_pic_url_hd, full_name, is_business_account } = response.data.graphql.user
65 |
66 | const profileBuffer = await axios.get(profile_pic_url_hd, { responseType: 'arraybuffer' })
67 |
68 | const msg = `*${'NAME'}*: ${full_name} \n*${'USERNAME'}*: ${username} \n*${'BIO'}*: ${biography} \n*${'FOLLOWERS'}*: ${edge_followed_by.count} \n*${'FOLLOWS'}*: ${edge_follow.count} \n*${'ACCOUNT'}*: ${is_private ? 'HIDDEN' : 'PUBLIC'} \n*Hesap Türü:* ${is_verified ? vf : novf} \n*İşletme Hesabı mı?:* ${is_business_account ? bs : nobs} \n*Kategori:* ${category_name} \n*Post Sayısı:* ${edge_owner_to_timeline_media.count}`
69 |
70 | await message.sendMessage(Buffer.from(profileBuffer.data), MessageType.image, { caption: msg })
71 |
72 | }).catch(async (err) => {
73 | await message.sendMessage(errorMessage('NOT_FOUND' + userName))
74 | })
75 | });
76 | }
77 | }
--------------------------------------------------------------------------------
/plugins/someonesay.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const { MessageType, MessageOptions, Mimetype } = require('@adiwajshing/baileys');
8 | const fs = require('fs');
9 | const axios = require('axios');
10 | const Config = require('../config');
11 |
12 | const Language = require('../language');
13 | const Lang = Language.getString('ttp');
14 |
15 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
16 | if (Config.WORKTYPE == 'private') {
17 |
18 | MyPnky.addCommand({ pattern: 'animesay ?(.*)', fromMe: true, desc: Lang.ANIME_DESC }, (async (message, match) => {
19 |
20 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
21 |
22 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=kannagen&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
23 |
24 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
25 |
26 | }));
27 |
28 | MyPnky.addCommand({ pattern: 'changesay ?(.*)', fromMe: true, desc: Lang.CHANGE_DESC }, (async (message, match) => {
29 |
30 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
31 |
32 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=changemymind&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
33 |
34 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
35 |
36 | }));
37 |
38 | MyPnky.addCommand({ pattern: 'trumpsay ?(.*)', fromMe: true, desc: Lang.TRUMP_DESC }, (async (message, match) => {
39 |
40 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
41 |
42 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=trumptweet&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
43 |
44 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
45 |
46 | }));
47 | }
48 | else if (Config.WORKTYPE == 'public') {
49 |
50 | MyPnky.addCommand({ pattern: 'animesay ?(.*)', fromMe: false, desc: Lang.ANIME_DESC }, (async (message, match) => {
51 |
52 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
53 |
54 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=kannagen&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
55 |
56 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
57 |
58 | }));
59 |
60 | MyPnky.addCommand({ pattern: 'changesay ?(.*)', fromMe: false, desc: Lang.CHANGE_DESC }, (async (message, match) => {
61 |
62 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
63 |
64 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=changemymind&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
65 |
66 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
67 |
68 | }));
69 |
70 | MyPnky.addCommand({ pattern: 'trumpsay ?(.*)', fromMe: false, desc: Lang.TRUMP_DESC }, (async (message, match) => {
71 |
72 | if (match[1] === '') return await message.sendMessage(Lang.NEED_WORD);
73 |
74 | var ttinullimage = await axios.get(`https://nekobot.xyz/api/imagegen?type=trumptweet&text=${match[1].replace(/Ö/g, "%C3%96").replace(/ö/g, "%C3%B6").replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/Ğ/g, "%C4%9E").replace(/ğ/g, "%C4%9F").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/i/g, "%69").replace(/"/g, "%22").replace(/İ/g, "%C4%B0")}&raw=1`, { responseType: 'arraybuffer' })
75 |
76 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.png, caption: Config.AFN })
77 |
78 | }));
79 | }
80 | }
--------------------------------------------------------------------------------
/plugins/sql/ai.js:
--------------------------------------------------------------------------------
1 | const config = require('../../config');
2 | const { DataTypes } = require('sequelize');
3 | //by afnan pallikkel
4 | var _0x5ef28e=_0x5595;(function(_0x187d58,_0x5ec81a){var _0x480d51=_0x5595,_0x324121=_0x187d58();while(!![]){try{var _0x5dc34d=parseInt(_0x480d51(0xb4))/0x1+-parseInt(_0x480d51(0xa3))/0x2+-parseInt(_0x480d51(0xb0))/0x3+-parseInt(_0x480d51(0xa9))/0x4*(-parseInt(_0x480d51(0xa5))/0x5)+-parseInt(_0x480d51(0xb5))/0x6*(-parseInt(_0x480d51(0xae))/0x7)+-parseInt(_0x480d51(0xad))/0x8+parseInt(_0x480d51(0xaa))/0x9;if(_0x5dc34d===_0x5ec81a)break;else _0x324121['push'](_0x324121['shift']());}catch(_0x1762e5){_0x324121['push'](_0x324121['shift']());}}}(_0x46b6,0xe8420));const AIDB=config['DATABASE'][_0x5ef28e(0xb3)]('AI',{'chat':{'type':DataTypes[_0x5ef28e(0xa7)],'allowNull':![]},'type':{'type':DataTypes['STRING'],'allowNull':![]},'message':{'type':DataTypes[_0x5ef28e(0xaf)],'allowNull':![]}});function _0x5595(_0x333a7b,_0x1fbe5b){var _0x46b639=_0x46b6();return _0x5595=function(_0x5595d2,_0x11d2d5){_0x5595d2=_0x5595d2-0xa3;var _0x2f18a4=_0x46b639[_0x5595d2];return _0x2f18a4;},_0x5595(_0x333a7b,_0x1fbe5b);}async function getAI(_0x70f784=null,_0x312a47='pinky'){var _0x58bd20=_0x5ef28e,_0x53e3e5=await AIDB[_0x58bd20(0xb6)]({'where':{'chat':_0x70f784,'type':_0x312a47}});return _0x53e3e5[_0x58bd20(0xa4)]<0x1?![]:_0x53e3e5[0x0][_0x58bd20(0xab)];}async function setAI(_0x247f6e=null,_0x5ad2e9=_0x5ef28e(0xb1),_0x4fb9a9=null){var _0xdf28d2=_0x5ef28e,_0x578a43=await AIDB[_0xdf28d2(0xb6)]({'where':{'chat':_0x247f6e,'type':_0x5ad2e9}});return _0x578a43[_0xdf28d2(0xa4)]<0x1?await AIDB[_0xdf28d2(0xb2)]({'chat':_0x247f6e,'type':_0x5ad2e9,'message':_0x4fb9a9}):await _0x578a43[0x0][_0xdf28d2(0xa8)]({'chat':_0x247f6e,'type':_0x5ad2e9,'message':_0x4fb9a9});}async function deleteAI(_0x330745=null,_0x9a5e79=_0x5ef28e(0xb1)){var _0x73a531=_0x5ef28e,_0x4ce3bb=await AIDB['findAll']({'where':{'chat':_0x330745,'type':_0x9a5e79}});return await _0x4ce3bb[0x0][_0x73a531(0xac)]();}module[_0x5ef28e(0xa6)]={'AIDB':AIDB,'getAI':getAI,'setAI':setAI,'deleteAI':deleteAI};function _0x46b6(){var _0x4be3f3=['3458161fbBLNH','TEXT','4615074yPDUol','pinky','create','define','951408MtHXbL','6nqnZLj','findAll','3580130NTbonE','length','10qepvyh','exports','STRING','update','2488748LNdIkr','18635796Menwot','dataValues','destroy','3845584xLmGkI'];_0x46b6=function(){return _0x4be3f3;};return _0x46b6();}
5 |
--------------------------------------------------------------------------------
/plugins/sql/fake.js:
--------------------------------------------------------------------------------
1 | //codded by afnanplk
2 |
3 | const config = require('../../config');
4 | const { DataTypes } = require('sequelize');
5 |
6 | function _0x58ac(_0x74c9f2,_0x11bd86){var _0x8ce574=_0x8ce5();return _0x58ac=function(_0x58ac1f,_0xc4adf3){_0x58ac1f=_0x58ac1f-0xcd;var _0x59d2e0=_0x8ce574[_0x58ac1f];return _0x59d2e0;},_0x58ac(_0x74c9f2,_0x11bd86);}var _0x50274b=_0x58ac;(function(_0x589bad,_0x47823d){var _0x5c075d=_0x58ac,_0xaa19f6=_0x589bad();while(!![]){try{var _0x51f691=-parseInt(_0x5c075d(0xcd))/0x1*(parseInt(_0x5c075d(0xde))/0x2)+-parseInt(_0x5c075d(0xd2))/0x3+-parseInt(_0x5c075d(0xce))/0x4*(parseInt(_0x5c075d(0xd6))/0x5)+-parseInt(_0x5c075d(0xdf))/0x6+parseInt(_0x5c075d(0xd7))/0x7+-parseInt(_0x5c075d(0xd5))/0x8*(parseInt(_0x5c075d(0xd3))/0x9)+parseInt(_0x5c075d(0xdc))/0xa;if(_0x51f691===_0x47823d)break;else _0xaa19f6['push'](_0xaa19f6['shift']());}catch(_0x547fa0){_0xaa19f6['push'](_0xaa19f6['shift']());}}}(_0x8ce5,0xd5ede));const FakeDB=config[_0x50274b(0xd4)]['define'](_0x50274b(0xd8),{'chat':{'type':DataTypes['STRING'],'allowNull':![]},'type':{'type':DataTypes[_0x50274b(0xd1)],'allowNull':![]},'message':{'type':DataTypes[_0x50274b(0xd9)],'allowNull':![]}});async function takeMessage(_0x27ac32=null,_0x33e3e4=_0x50274b(0xe1)){var _0xec2603=_0x50274b,_0x4c2f3b=await FakeDB[_0xec2603(0xdb)]({'where':{'chat':_0x27ac32,'type':_0x33e3e4}});return _0x4c2f3b['length']<0x1?![]:_0x4c2f3b[0x0]['dataValues'];}function _0x8ce5(){var _0x3529e4=['9894666gbNbVV','welcome','fake','136733DcHrXG','4YosYXr','destroy','length','STRING','306810gSYrCQ','7884207hCjmMM','DATABASE','8vakZBG','8521915BEUXeQ','4361511hwuIHm','Fake','TEXT','exports','findAll','48584340iFyZAs','create','4JWZwzU'];_0x8ce5=function(){return _0x3529e4;};return _0x8ce5();}async function okMessage(_0x53fea0=null,_0x351cc0='fake',_0xd1b499=null){var _0x475be0=_0x50274b,_0x14023f=await FakeDB[_0x475be0(0xdb)]({'where':{'chat':_0x53fea0,'type':_0x351cc0}});return _0x14023f[_0x475be0(0xd0)]<0x1?await FakeDB[_0x475be0(0xdd)]({'chat':_0x53fea0,'type':_0x351cc0,'message':_0xd1b499}):await _0x14023f[0x0]['update']({'chat':_0x53fea0,'type':_0x351cc0,'message':_0xd1b499});}async function removeMessage(_0x522a06=null,_0x45f002=_0x50274b(0xe0)){var _0x19b881=_0x50274b,_0x437872=await FakeDB['findAll']({'where':{'chat':_0x522a06,'type':_0x45f002}});return await _0x437872[0x0][_0x19b881(0xcf)]();}module[_0x50274b(0xda)]={'FakeDB':FakeDB,'takeMessage':takeMessage,'okMessage':okMessage,'removeMessage':removeMessage};
7 |
8 |
9 | //thise code can be copy pasted and used (with credit)
10 |
--------------------------------------------------------------------------------
/plugins/sql/filters.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | */
8 |
9 | const config = require('../../config');
10 | const { DataTypes } = require('sequelize');
11 |
12 | const FiltersDB = config.DATABASE.define('filter', {
13 | chat: {
14 | type: DataTypes.STRING,
15 | allowNull: false
16 | },
17 | pattern: {
18 | type: DataTypes.TEXT,
19 | allowNull: false
20 | },
21 | text: {
22 | type: DataTypes.TEXT,
23 | allowNull: false
24 | },
25 | regex: {
26 | type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false
27 | }
28 | });
29 |
30 | async function getFilter(jid = null, filter = null) {
31 | var Wher = {chat: jid};
32 | if (filter !== null) Wher.push({pattern: filter});
33 | var Msg = await FiltersDB.findAll({
34 | where: Wher
35 | });
36 |
37 | if (Msg.length < 1) {
38 | return false;
39 | } else {
40 | return Msg;
41 | }
42 | }
43 |
44 |
45 | async function setFilter(jid = null, filter = null, tex = null, regx = false) {
46 | var Msg = await FiltersDB.findAll({
47 | where: {
48 | chat: jid,
49 | pattern: filter
50 | }
51 | });
52 |
53 | if (Msg.length < 1) {
54 | return await FiltersDB.create({ chat: jid, pattern: filter, text: tex, regex: regx });
55 | } else {
56 | return await Msg[0].update({ chat: jid, pattern: filter, text: tex, regex: regx });
57 | }
58 | }
59 |
60 | async function deleteFilter(jid = null, filter) {
61 | var Msg = await FiltersDB.findAll({
62 | where: {
63 | chat: jid,
64 | pattern: filter
65 | }
66 | });
67 | if (Msg.length < 1) {
68 | return false;
69 | } else {
70 | return await Msg[0].destroy();
71 | }
72 | }
73 |
74 | module.exports = {
75 | FiltersDB: FiltersDB,
76 | getFilter: getFilter,
77 | setFilter: setFilter,
78 | deleteFilter: deleteFilter
79 | };
--------------------------------------------------------------------------------
/plugins/sql/greetings.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | */
8 |
9 | const config = require('../../config');
10 | const { DataTypes } = require('sequelize');
11 |
12 | const GreetingsDB = config.DATABASE.define('Greeting', {
13 | chat: {
14 | type: DataTypes.STRING,
15 | allowNull: false
16 | },
17 | type: {
18 | type: DataTypes.STRING,
19 | allowNull: false
20 | },
21 | message: {
22 | type: DataTypes.TEXT,
23 | allowNull: false
24 | }
25 | });
26 |
27 | async function getMessage(jid = null, tip = 'welcome') {
28 | var Msg = await GreetingsDB.findAll({
29 | where: {
30 | chat: jid,
31 | type: tip
32 | }
33 | });
34 |
35 | if (Msg.length < 1) {
36 | return false;
37 | } else {
38 | return Msg[0].dataValues;
39 | }
40 | }
41 |
42 | async function setMessage(jid = null, tip = 'welcome', text = null) {
43 | var Msg = await GreetingsDB.findAll({
44 | where: {
45 | chat: jid,
46 | type: tip
47 | }
48 | });
49 |
50 | if (Msg.length < 1) {
51 | return await GreetingsDB.create({ chat: jid, type: tip, message:text });
52 | } else {
53 | return await Msg[0].update({ chat: jid, type: tip, message:text });
54 | }
55 | }
56 |
57 | async function deleteMessage(jid = null, tip = 'welcome') {
58 | var Msg = await GreetingsDB.findAll({
59 | where: {
60 | chat: jid,
61 | type: tip
62 | }
63 | });
64 |
65 | return await Msg[0].destroy();
66 | }
67 |
68 | module.exports = {
69 | GreetingsDB: GreetingsDB,
70 | getMessage: getMessage,
71 | setMessage: setMessage,
72 | deleteMessage: deleteMessage
73 | };
--------------------------------------------------------------------------------
/plugins/sql/lydia.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 |
8 |
9 | const config = require('../../config');
10 | const { DataTypes } = require('sequelize');
11 |
12 | const LydiaDB = config.DATABASE.define('Lydia', {
13 | session_id: {
14 | type: DataTypes.STRING,
15 | allowNull: false
16 | },
17 | expires: {
18 | type: DataTypes.INTEGER,
19 | allowNull: false
20 | },
21 | users: {
22 | type: DataTypes.TEXT,
23 | allowNull: false
24 | }
25 | });
26 |
27 | module.exports = { LydiaDB: LydiaDB };
28 | */
29 |
--------------------------------------------------------------------------------
/plugins/sql/notes.js:
--------------------------------------------------------------------------------
1 | /*
2 | # Copyright (C) 2020 MuhammedKpln.
3 | #
4 | # WhatsAsena is free software: you can redistribute it and/or modify
5 | # it under the terms of the GNU General Public License as published by
6 | # the Free Software Foundation, either version 3 of the License, or
7 | # (at your option) any later version.
8 | #
9 | # WhatsAsena is distributed in the hope that it will be useful,
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | # GNU General Public License for more details.
13 | #
14 | # You should have received a copy of the GNU General Public License
15 | # along with this program. If not, see .
16 | #
17 | */
18 |
19 | const config = require('../../config');
20 | const { DataTypes } = require('sequelize');
21 |
22 | const NotesDB = config.DATABASE.define('notes', {
23 | note: {
24 | type: DataTypes.TEXT,
25 | allowNull: false
26 | }
27 | });
28 |
29 |
30 | async function getNotes() {
31 | const Notes = await NotesDB.findAll()
32 |
33 | return Notes
34 | }
35 |
36 | async function saveNote(note) {
37 | return await NotesDB.create({ note });
38 | }
39 |
40 | async function deleteAllNotes() {
41 | return await NotesDB.destroy({
42 | where: {},
43 | truncate: true
44 | })
45 | }
46 |
47 | module.exports = {
48 | NotesDB,
49 | getNotes,
50 | saveNote,
51 | deleteAllNotes
52 | };
53 |
--------------------------------------------------------------------------------
/plugins/sql/plk.js:
--------------------------------------------------------------------------------
1 | const _0x56b118=_0x6dfe;(function(_0xc9f07a,_0x5db4ba){const _0x4998aa=_0x6dfe,_0x522dbf=_0xc9f07a();while(!![]){try{const _0x48a142=parseInt(_0x4998aa(0xb4))/0x1+-parseInt(_0x4998aa(0xad))/0x2+-parseInt(_0x4998aa(0xaf))/0x3*(-parseInt(_0x4998aa(0xb9))/0x4)+-parseInt(_0x4998aa(0xb7))/0x5+-parseInt(_0x4998aa(0xb6))/0x6*(-parseInt(_0x4998aa(0xae))/0x7)+-parseInt(_0x4998aa(0xaa))/0x8*(-parseInt(_0x4998aa(0xb8))/0x9)+parseInt(_0x4998aa(0xb0))/0xa*(-parseInt(_0x4998aa(0xab))/0xb);if(_0x48a142===_0x5db4ba)break;else _0x522dbf['push'](_0x522dbf['shift']());}catch(_0x1cb334){_0x522dbf['push'](_0x522dbf['shift']());}}}(_0x211f,0x44d3e));function _0x211f(){const _0x17cfc0=['notes','define','540971OyFjhp','create','6lFDiRx','73305pxkHak','747TFxsEk','38924ajNdpg','50608kqWjqZ','492371WfpFAr','sequelize','111458KKispM','1774514EfWpIZ','33ANWSkX','240HcJdPf','exports'];_0x211f=function(){return _0x17cfc0;};return _0x211f();}const config=require('../../conf'+'ig'),{DataTypes}=require(_0x56b118(0xac)),plkDB=config['DATABASE'][_0x56b118(0xb3)](_0x56b118(0xb2),{'note':{'type':DataTypes['TEXT'],'allowNull':![]}});async function getplk(){const _0x57d4b5=await plkDB['findAll']();return _0x57d4b5;}function _0x6dfe(_0x172ca2,_0x21a71e){const _0x211f06=_0x211f();return _0x6dfe=function(_0x6dfee4,_0x37598e){_0x6dfee4=_0x6dfee4-0xaa;let _0x377221=_0x211f06[_0x6dfee4];return _0x377221;},_0x6dfe(_0x172ca2,_0x21a71e);}async function saveplk(_0x395c7c){const _0x3d0034=_0x56b118;return await plkDB[_0x3d0034(0xb5)]({'note':_0x395c7c});}async function deleteplk(){return await plkDB['destroy']({'where':{},'truncate':!![]});}module[_0x56b118(0xb1)]={'plkDB':plkDB,'getplk':getplk,'saveplk':saveplk,'deleteplk':deleteplk};
2 |
--------------------------------------------------------------------------------
/plugins/sql/plugin.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | */
8 |
9 | const config = require('../../config');
10 | const { DataTypes } = require('sequelize');
11 |
12 | const PluginDB = config.DATABASE.define('Plugin', {
13 | name: {
14 | type: DataTypes.STRING,
15 | allowNull: false
16 | },
17 | url: {
18 | type: DataTypes.TEXT,
19 | allowNull: false
20 | }
21 | });
22 |
23 | async function installPlugin(adres, file) {
24 | var Plugin = await PluginDB.findAll({
25 | where: {url: adres}
26 | });
27 |
28 | if (Plugin.length >= 1) {
29 | return false;
30 | } else {
31 | return await PluginDB.create({ url: adres, name: file });
32 | }
33 | }
34 | module.exports = { PluginDB: PluginDB, installPlugin: installPlugin };
--------------------------------------------------------------------------------
/plugins/sql/tryplk.js:
--------------------------------------------------------------------------------
1 | // codded by afnanplk
2 |
3 | const config = require('../../config');
4 | const { DataTypes } = require('sequelize');
5 |
6 | function _0x38f3(){var _0xfbcb77=['TEXT','define','13626880JyiIdX','STRING','54JLCkwP','4NTtarg','4714722IZaOUS','250138NdWdJk','4759fipmQo','3091345SuiGZN','exports','setting','12YVDkSr','update','291243CqxULs','length','findAll','DATABASE','29982900OuSFnS'];_0x38f3=function(){return _0xfbcb77;};return _0x38f3();}function _0x37c8(_0x2c9b7d,_0x16a562){var _0x38f314=_0x38f3();return _0x37c8=function(_0x37c83c,_0x3024da){_0x37c83c=_0x37c83c-0x114;var _0x17a018=_0x38f314[_0x37c83c];return _0x17a018;},_0x37c8(_0x2c9b7d,_0x16a562);}var _0x451e5f=_0x37c8;(function(_0x40438d,_0x2023c7){var _0x5ba76a=_0x37c8,_0xccd9f1=_0x40438d();while(!![]){try{var _0x46cea0=parseInt(_0x5ba76a(0x121))/0x1+-parseInt(_0x5ba76a(0x11e))/0x2*(-parseInt(_0x5ba76a(0x114))/0x3)+parseInt(_0x5ba76a(0x125))/0x4*(parseInt(_0x5ba76a(0x122))/0x5)+parseInt(_0x5ba76a(0x11d))/0x6*(-parseInt(_0x5ba76a(0x120))/0x7)+parseInt(_0x5ba76a(0x11b))/0x8+parseInt(_0x5ba76a(0x11f))/0x9+-parseInt(_0x5ba76a(0x118))/0xa;if(_0x46cea0===_0x2023c7)break;else _0xccd9f1['push'](_0xccd9f1['shift']());}catch(_0x369a65){_0xccd9f1['push'](_0xccd9f1['shift']());}}}(_0x38f3,0xeaa1a));const AfnanPLK=config[_0x451e5f(0x117)][_0x451e5f(0x11a)]('Afnan',{'chat':{'type':DataTypes[_0x451e5f(0x11c)],'allowNull':![]},'type':{'type':DataTypes['STRING'],'allowNull':![]},'message':{'type':DataTypes[_0x451e5f(0x119)],'allowNull':![]}});async function addplk(_0x3d4f9a=null,_0x331728=_0x451e5f(0x124)){var _0x2ca590=_0x451e5f,_0x5d7d71=await AfnanPLK[_0x2ca590(0x116)]({'where':{'chat':_0x3d4f9a,'type':_0x331728}});return _0x5d7d71[_0x2ca590(0x115)]<0x1?![]:_0x5d7d71[0x0]['dataValues'];}async function makeplk(_0x2ef1b5=null,_0x51f9be='setting',_0x166961=null){var _0x52fac8=_0x451e5f,_0x43d9d7=await AfnanPLK[_0x52fac8(0x116)]({'where':{'chat':_0x2ef1b5,'type':_0x51f9be}});return _0x43d9d7['length']<0x1?await AfnanPLK['create']({'chat':_0x2ef1b5,'type':_0x51f9be,'message':_0x166961}):await _0x43d9d7[0x0][_0x52fac8(0x126)]({'chat':_0x2ef1b5,'type':_0x51f9be,'message':_0x166961});}async function removeplk(_0xbb2db8=null,_0x5f15c8=_0x451e5f(0x124)){var _0x2f0775=await AfnanPLK['findAll']({'where':{'chat':_0xbb2db8,'type':_0x5f15c8}});return await _0x2f0775[0x0]['destroy']();}module[_0x451e5f(0x123)]={'AfnanPLK':AfnanPLK,'addplk':addplk,'makeplk':makeplk,'removeplk':removeplk};
7 |
8 |
9 |
10 | //thise code can be copy pasted and used (with credit)
11 |
--------------------------------------------------------------------------------
/plugins/sql/warn.js:
--------------------------------------------------------------------------------
1 | //codded by afnanplk...
2 |
3 |
4 | const config = require('../../config');
5 | const { DataTypes } = require('sequelize')
6 |
7 | function _0x5b15(_0x29b02a,_0x629b7c){var _0x5c2b05=_0x5c2b();return _0x5b15=function(_0x5b159a,_0x220135){_0x5b159a=_0x5b159a-0x125;var _0x5e767a=_0x5c2b05[_0x5b159a];return _0x5e767a;},_0x5b15(_0x29b02a,_0x629b7c);}var _0x245fed=_0x5b15;(function(_0x29c2b2,_0xd6c860){var _0x3fd25c=_0x5b15,_0x428109=_0x29c2b2();while(!![]){try{var _0x202834=parseInt(_0x3fd25c(0x125))/0x1+parseInt(_0x3fd25c(0x130))/0x2+parseInt(_0x3fd25c(0x126))/0x3+-parseInt(_0x3fd25c(0x12a))/0x4+parseInt(_0x3fd25c(0x12f))/0x5*(parseInt(_0x3fd25c(0x128))/0x6)+parseInt(_0x3fd25c(0x12c))/0x7+parseInt(_0x3fd25c(0x12d))/0x8*(-parseInt(_0x3fd25c(0x129))/0x9);if(_0x202834===_0xd6c860)break;else _0x428109['push'](_0x428109['shift']());}catch(_0x4dd331){_0x428109['push'](_0x428109['shift']());}}}(_0x5c2b,0xc35df));const WarnDB=config[_0x245fed(0x137)]['define'](_0x245fed(0x131),{'chat':{'type':DataTypes['STRING'],'allowNull':![]},'type':{'type':DataTypes[_0x245fed(0x132)],'allowNull':![]},'message':{'type':DataTypes[_0x245fed(0x133)],'allowNull':![]}});async function getJid(_0x12edbb=null,_0x2422a0=_0x245fed(0x135)){var _0x402831=_0x245fed,_0x45f52a=await WarnDB[_0x402831(0x12b)]({'where':{'chat':_0x12edbb,'type':_0x2422a0}});return _0x45f52a[_0x402831(0x127)]<0x1?![]:_0x45f52a[0x0][_0x402831(0x138)];}async function setJid(_0x52db72=null,_0x46937a=_0x245fed(0x135),_0xd8a4de=null){var _0x5ca7e4=_0x245fed,_0x570a4c=await WarnDB[_0x5ca7e4(0x12b)]({'where':{'chat':_0x52db72,'type':_0x46937a}});return _0x570a4c[_0x5ca7e4(0x127)]<0x1?await WarnDB[_0x5ca7e4(0x12e)]({'chat':_0x52db72,'type':_0x46937a,'message':_0xd8a4de}):await _0x570a4c[0x0][_0x5ca7e4(0x136)]({'chat':_0x52db72,'type':_0x46937a,'message':_0xd8a4de});}function _0x5c2b(){var _0x2fcf8d=['2790150NTUUFG','length','12FisabD','72JKYBYj','2837792OeDRvB','findAll','10542546mGPzRX','2577872sZDjTY','create','2393085KTemle','501458zifqND','Warn','STRING','TEXT','exports','warn','update','DATABASE','dataValues','443452mczgxz'];_0x5c2b=function(){return _0x2fcf8d;};return _0x5c2b();}async function removeJid(_0x2ce248=null,_0x1f8e5e=_0x245fed(0x135)){var _0x4a53a1=await WarnDB['findAll']({'where':{'chat':_0x2ce248,'type':_0x1f8e5e}});return await _0x4a53a1[0x0]['destroy']();}module[_0x245fed(0x134)]={'WarnDB':WarnDB,'getJid':getJid,'setJid':setJid,'removeJid':removeJid};
8 |
--------------------------------------------------------------------------------
/plugins/stickers.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | const {MessageType, Mimetype} = require('@adiwajshing/baileys');
3 | const fs = require('fs');
4 | const ffmpeg = require('fluent-ffmpeg');
5 | const {execFile} = require('child_process');
6 | const cwebp = require('cwebp-bin');
7 | const Config = require('../config');
8 |
9 | const Language = require('../language');
10 | const Lang = Language.getString('sticker');
11 |
12 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
13 | if (Config.WORKTYPE == 'private') {
14 | MyPnky.addCommand({pattern: 'sticker$', fromMe: true, desc: Lang.STICKER_DESC}, (async (message, match) => {
15 |
16 | if (message.reply_message === false) return await message.client.sendMessage(message.jid,Lang.NEED_REPLY, MessageType.text);
17 | var downloading = await message.client.sendMessage(message.jid,Lang.DOWNLOADING,MessageType.text);
18 | var location = await message.client.downloadAndSaveMediaMessage({
19 | key: {
20 | remoteJid: message.reply_message.jid,
21 | id: message.reply_message.id
22 | },
23 | message: message.reply_message.data.quotedMessage
24 | });
25 |
26 | if (message.reply_message.video === false && message.reply_message.image) {
27 | ffmpeg(location)
28 | .outputOptions(["-y", "-vcodec libwebp"])
29 | .videoFilters('scale=2000:2000:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=2000:2000:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1')
30 | .save('st.webp')
31 | .on('end', async () => {
32 | await message.sendMessage(fs.readFileSync('st.webp'), MessageType.sticker);
33 | });
34 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
35 |
36 | }
37 |
38 | ffmpeg(location)
39 | .outputOptions(["-y", "-vcodec libwebp", "-lossless 1", "-qscale 1", "-preset default", "-loop 0", "-an", "-vsync 0", "-s 600x600"])
40 | .videoFilters('scale=600:600:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=600:600:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1')
41 | .save('sticker.webp')
42 | .on('end', async () => {
43 | await message.sendMessage(fs.readFileSync('sticker.webp'), MessageType.sticker);
44 | });
45 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
46 | }));
47 | }
48 | else if (Config.WORKTYPE == 'public') {
49 |
50 | MyPnky.addCommand({pattern: 'sticker$', fromMe: false, desc: Lang.STICKER_DESC}, (async (message, match) => {
51 |
52 | if (message.reply_message === false) return await message.client.sendMessage(message.jid,Lang.NEED_REPLY, MessageType.text);
53 | var downloading = await message.client.sendMessage(message.jid,Lang.DOWNLOADING,MessageType.text);
54 | var location = await message.client.downloadAndSaveMediaMessage({
55 | key: {
56 | remoteJid: message.reply_message.jid,
57 | id: message.reply_message.id
58 | },
59 | message: message.reply_message.data.quotedMessage
60 | });
61 |
62 | if (message.reply_message.video === false && message.reply_message.image) {
63 | ffmpeg(location)
64 | .outputOptions(["-y", "-vcodec libwebp"])
65 | .videoFilters('scale=2000:2000:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=2000:2000:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1')
66 | .save('st.webp')
67 | .on('end', async () => {
68 | await message.sendMessage(fs.readFileSync('st.webp'), MessageType.sticker);
69 | });
70 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
71 |
72 | }
73 |
74 | ffmpeg(location)
75 | .outputOptions(["-y", "-vcodec libwebp", "-lossless 1", "-qscale 1", "-preset default", "-loop 0", "-an", "-vsync 0", "-s 600x600"])
76 | .videoFilters('scale=600:600:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=600:600:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1')
77 | .save('sticker.webp')
78 | .on('end', async () => {
79 | await message.sendMessage(fs.readFileSync('sticker.webp'), MessageType.sticker);
80 | });
81 | return await message.client.deleteMessage(message.jid, {id: downloading.key.id, remoteJid: message.jid, fromMe: true})
82 | }));
83 | }
84 | }
--------------------------------------------------------------------------------
/plugins/system_stats.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | Developer & Co-Founder - Phaticusthiccy
6 | re-edited by afnan plk
7 | */
8 |
9 | const MyPnky = require('../events');
10 | const {MessageType,Mimetype} = require('@adiwajshing/baileys');
11 | const {spawnSync} = require('child_process');
12 | const Config = require('../config');
13 | const chalk = require('chalk');
14 | const axios = require('axios');
15 |
16 | const Language = require('../language');
17 | const Lang = Language.getString('system_stats');
18 |
19 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
20 | if (Config.WORKTYPE == 'private') {
21 |
22 | MyPnky.addCommand({pattern: 'alive', fromMe: true, desc: Lang.ALIVE_DESC}, (async (message, match) => {
23 |
24 | let pp
25 | try { pp = await message.client.getProfilePicture(message.jid.includes('-') ? message.data.participant : message.jid ); } catch { pp = await message.client.getProfilePicture(); }
26 | await axios.get(pp, {responseType: 'arraybuffer'}).then(async (res) => { await message.client.sendMessage(message.jid, res.data, MessageType.image, { caption: Config.ALIVEMSG }); });
27 | }));
28 |
29 | MyPnky.addCommand({pattern: 'sysd', fromMe: true, desc: Lang.SYSD_DESC}, (async (message, match) => {
30 |
31 | const child = spawnSync('neofetch', ['--stdout']).stdout.toString('utf-8')
32 | await message.sendMessage(
33 | '```' + child + '```', MessageType.text
34 | );
35 | }));
36 | }
37 | else if (Config.WORKTYPE == 'public') {
38 |
39 | MyPnky.addCommand({pattern: 'alive', fromMe: false, desc: Lang.ALIVE_DESC}, (async (message, match) => {
40 |
41 | var plk_say = new Date().toLocaleString('HI', { timeZone: 'Asia/Kolkata' }).split(' ')[1]
42 | const get_localized_date = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
43 | var plk_here = new Date().toLocaleDateString(get_localized_date)
44 | var afnplk = '```⏱ Time :' + plk_say + '```\n\n ```📅 Date :' + plk_here + '```'
45 |
46 | var r_text = new Array ();
47 | r_text[0] = "The greatest glory in living lies not in never falling, but in rising every time we fall.\n -Nelson Mandela";
48 | r_text[1] = "The way to get started is to quit talking and begin doing.\n -Walt Disney";
49 | r_text[2] = "Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma – which is living with the results of other people's thinking.\n -Steve Jobs";
50 | r_text[3] = "If life were predictable it would cease to be life, and be without flavor.\n -Eleanor Roosevelt";
51 | r_text[4] = "If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough.\n -Oprah Winfrey";
52 | r_text[5] = "If you set your goals ridiculously high and it's a failure, you will fail above everyone else's success.\n -James Cameron";
53 | r_text[6] = "Spread love everywhere you go. Let no one ever come to you without leaving happier.\n -Mother Teresa";
54 | r_text[7] = "When you reach the end of your rope, tie a knot in it and hang on.\n -Franklin D. Roosevelt";
55 | r_text[8] = "Always remember that you are absolutely unique. Just like everyone else.\n -Margaret Mead";
56 | r_text[9] = "Don't judge each day by the harvest you reap but by the seeds that you plant.\n -Robert Louis Stevenson";
57 | r_text[10] = "The future belongs to those who believe in the beauty of their dreams.\n -Eleanor Roosevelt";
58 | r_text[11] = "The best and most beautiful things in the world cannot be seen or even touched — they must be felt with the heart.\n -Helen Keller";
59 | r_text[12] = "It is during our darkest moments that we must focus to see the light.\n -Aristotle";
60 | r_text[13] = "Do not go where the path may lead, go instead where there is no path and leave a trail.\n -Ralph Waldo Emerson";
61 | r_text[14] = "You will face many defeats in life, but never let yourself be defeated.\n -Maya Angelou";
62 | r_text[15] = "The greatest glory in living lies not in never falling, but in rising every time we fall.\n -Nelson Mandela";
63 | r_text[16] = "In the end, it's not the years in your life that count. It's the life in your years.\n -Abraham Lincoln";
64 | r_text[17] = "Never let the fear of striking out keep you from playing the game.\n -Babe Ruth";
65 | r_text[18] = "Life is either a daring adventure or nothing at all.\n -Helen Keller";
66 | r_text[19] = "Many of life's failures are people who did not realize how close they were to success when they gave up.\n -Thomas A. Edison";
67 | r_text[20] = "The secret of success is to do the common thing uncommonly well. -John D. Rockefeller Jr.";//created by afnanplk
68 | r_text[21] = "Keep smiling, because life is a beautiful thing and there's so much to smile about.\n -Marilyn Monroe";
69 | r_text[22] = "You have brains in your head. You have feet in your shoes. You can steer yourself any direction you choose.\n -Dr. Seuss";
70 | r_text[23] = "Life is made of ever so many partings welded together.\n -Charles Dickens";
71 | r_text[24] = "Success is not final; failure is not fatal: It is the courage to continue that counts.\n -Winston S. Churchill";
72 | r_text[25] = "The real test is not whether you avoid this failure, because you won't. It's whether you let it harden or shame you into inaction, or whether you learn from it; whether you choose to persevere.\n -Barack Obama";
73 | r_text[26] = "The only person you are destined to become is the person you decide to be.\n -Ralph Waldo Emerson";
74 | r_text[27] = "When we strive to become better than we are, everything around us becomes better too.\n -Paulo Coelho";
75 | r_text[28] = "There are three things you can do with your life: You can waste it, you can spend it, or you can invest it. The best use of your life is to invest it in something that will last longer than your time on Earth.\n -Rick Warren";
76 | r_text[29] = "You only pass through this life once, you don't come back for an encore.\n -Elvis Presley";
77 | r_text[30] = "motivate cheyaan aarkum kayyum ath cheyth kaanikkaaana paad.\n -Pinky";
78 | var i = Math.floor(31*Math.random())
79 |
80 | if (Config.ALIVEMSG.includes('{pp}')) {
81 |
82 | let pp
83 | try { pp = await message.client.getProfilePicture(message.jid.includes('-') ? message.data.participant : message.jid ); } catch { pp = await message.client.getProfilePicture(); }
84 | await axios.get(pp, {responseType: 'arraybuffer'}).then(async (res) => { await message.client.sendMessage(message.jid, res.data, MessageType.image, { caption: Config.ALIVEMSG.replace('{pp}', '').replace('{time}', afnplk).replace('{qt}', r_text[i])}); });
85 | }
86 | else {//codded by afnanplk
87 |
88 | var a_plk = new Array ();
89 |
90 | a_plk[0] = "https://i.imgur.com/zdcqaaG.jpeg";
91 | a_plk[1] = "https://mcdn.wallpapersafari.com/medium/20/69/juFNVl.jpg";
92 | a_plk[2] = "https://cdn.wallpapersafari.com/51/57/WXxpck.jpg";
93 | a_plk[3] = "https://cdn.wallpapersafari.com/72/42/nAdV2j.jpg";
94 | a_plk[4] = "https://cdn.wallpapersafari.com/55/85/n5cLrp.jpg";
95 | a_plk[5] = "https://i.imgur.com/zdcqaaG.jpeg";
96 | a_plk[6] = "https://mcdn.wallpapersafari.com/medium/55/25/KrvA7S.jpg";
97 | a_plk[7] = "https://images.pexels.com/photos/8294554/pexels-photo-8294554.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500";
98 | a_plk[8] = "https://images.pexels.com/photos/8566473/pexels-photo-8566473.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500";
99 | a_plk[9] = "https://wallpapercave.com/wp/wp2957455.jpg";
100 | a_plk[10] = "https://i.imgur.com/1PPJq0Q.jpeg";
101 | var p = Math.floor(11*Math.random())
102 |
103 | var plk_alive = await axios.get(`${a_plk[p]}`, { responseType: 'arraybuffer' })
104 | //codded by afnanplk
105 | await message.client.sendMessage(message.jid, Buffer(plk_alive.data), MessageType.image, {mimetype: Mimetype.png, caption: Config.ALIVEMSG.replace('{time}', afnplk).replace('{qt}', r_text[i])})
106 | }
107 | }));
108 |
109 | MyPnky.addCommand({pattern: 'sysd', fromMe: false, desc: Lang.SYSD_DESC}, (async (message, match) => {
110 |
111 | const child = spawnSync('neofetch', ['--stdout']).stdout.toString('utf-8')
112 | await message.sendMessage(
113 | '```' + child + '```', MessageType.text
114 | );
115 | }));
116 |
117 | MyPnky.addCommand({pattern: 'psysd', fromMe: true, desc: Lang.SYSD_DESC, dontAddCommandList: true }, (async (message, match) => {
118 |
119 | const child = spawnSync('neofetch', ['--stdout']).stdout.toString('utf-8')
120 | await message.sendMessage(
121 | '```' + child + '```', MessageType.text
122 | );
123 | }));
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/plugins/tagadmin.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const {MessageType} = require('@adiwajshing/baileys');
8 | const Config = require('../config');
9 |
10 | const Language = require('../language');
11 | const Lang = Language.getString('tagall');
12 |
13 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
14 | if (Config.WORKTYPE == 'private') {
15 | MyPnky.addCommand({pattern: 'tagadmin$', fromMe: true, desc: Lang.TAGADMİN}, (async (message, match) => {
16 | let grup = await message.client.groupMetadata(message.jid);
17 | var jids = [];
18 | mesaj = '';
19 | grup['participants'].map(async (uye) => {
20 | if (uye.isAdmin) {
21 | mesaj += '👮♂️@' + uye.id.split('@')[0] + '\n';
22 | jids.push(uye.id.replace('c.us', 's.whatsapp.net'));
23 | }
24 | });
25 | await message.client.sendMessage(message.jid,mesaj, MessageType.extendedText, {contextInfo: {mentionedJid: jids}, previewType: 0})
26 | }));
27 | }
28 | else if (Config.WORKTYPE == 'public') {
29 | MyPnky.addCommand({pattern: 'tagadmin$', fromMe: false, desc: Lang.TAGADMİN}, (async (message, match) => {
30 | let grup = await message.client.groupMetadata(message.jid);
31 | var jids = [];
32 | mesaj = '';
33 | grup['participants'].map(async (uye) => {
34 | if (uye.isAdmin) {
35 | mesaj += '👮♂️@' + uye.id.split('@')[0] + '\n';
36 | jids.push(uye.id.replace('c.us', 's.whatsapp.net'));
37 | }
38 | });
39 | await message.client.sendMessage(message.jid,mesaj, MessageType.extendedText, {contextInfo: {mentionedJid: jids}, previewType: 0})
40 | }));
41 | }
42 |
43 | else if (Config.WORKTYPE == 'admin') {
44 | MyPnky.addCommand({pattern: 'tagadmin$', fromMe: false, desc: Lang.TAGADMİN}, (async (message, match) => {
45 | let grup = await message.client.groupMetadata(message.jid);
46 | var jids = [];
47 | mesaj = '';
48 | grup['participants'].map(async (uye) => {
49 | if (uye.isAdmin) {
50 | mesaj += '👮♂️@' + uye.id.split('@')[0] + '\n';
51 | jids.push(uye.id.replace('c.us', 's.whatsapp.net'));
52 | }
53 | });
54 | await message.client.sendMessage(message.jid,mesaj, MessageType.extendedText, {contextInfo: {mentionedJid: jids}, previewType: 0})
55 | }));
56 | }
57 | }
--------------------------------------------------------------------------------
/plugins/troll.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | const {MessageType,Mimetype} = require('@adiwajshing/baileys');
3 | const fs = require('fs');
4 | const ffmpeg = require('fluent-ffmpeg');
5 | const {execFile} = require('child_process');
6 | const cwebp = require('cwebp-bin');
7 | const Config = require('../config');
8 | const ban = '```now maximum limit is``` *501* ``` to use this feature without limt use``` *.setvar LIMIT:ok* ``` (at your own risk)```'
9 | const give = 'give me something to spam and limit and number of whome you want to spam \n\n command .troll hello+5+9190xxxxxx87 \n\n word to spam+number of time time you want sent+number of whatsapp user you want to troll';
10 | const valid = 'enter a valid whatsapp number';
11 | const spam = 'spam a given number given number of time';
12 |
13 | function _0x4b19(){var _0x252b7b=['Sandpiper','me/','Deer','77472nWTbUM','Eel','Woodcock','numbers','Elephant','Swallow','Hare','Lion','Okapi','4696530QYnNzQ','Rail','134ZiiYUp','Octopus','Bat','et\x20limit\x20\x20','Lark','Gull','wa.me/','random','Dove','Lemur','\x20times\x20\x0a*a','Spoonbill','Sheep','Rhinoceros','Herring','Goldfish','50199KxWmHb','Elk','Magpie','domly\x20spam','jid','split','Koala','Pelican','text','Mandrill','Anteater','Whale','Camel','Fox','Ostrich','Mule','Jellyfish','Gnat','Mink','Turtle','Ant','Boar','animals','Nightingal','Zebra','Trout','Wombat','Lobster','Parrot','Cheetah','Rat','Dotterel','Quetzal','Penguin','Horse','Giraffe','Goshawk','and\x20enter\x20','Gazelle','Human','Wallaby','Cormorant','Goldfinch','*message\x20:','client','Baboon','Duck','\x20numbers\x20a','Porpoise','Kingfisher','Yak','\x20\x0a*spammed','Weasel','Jackal','Viper','\x20times\x20to\x20','Snake','Cobra','Ibex','Monkey','Jay','Pig','Armadillo','Mallard','908218YTAtmU','Panther','Ibis','Fish','Leopard','Wren','Tiger','Salmon','es\x20are\x20ran','Alpaca','Rook','Heron','Mongoose','Snail','Sardine','Chicken','@s.whatsap','Salamander','Pheasant','Red\x20deer','Chinchilla','Bison','Newt','Pigeon','Wolverine','Raven','Chamois','Partridge','Porcupine','Cattle','Quail','Dragonfly','Raccoon','Seal','Toad','1209640skUevB','5VKodBV','includes','Manatee','Albatross','Buffalo','Flamingo','Capybara','Oryx','9762599cymtdN','Ferret','Bee','Gaur','Jaguar','Ape','Finch','Hornet','Stork','Swan','Clam','3232530MRWFTw','Dugong','Shrew','Rabbit','Dolphin','Barracuda','Mole','Caterpilla','Gorilla','Badger','Red\x20panda','Grasshoppe','Antelope','Dog','Owl','addCommand','Emu','664rIeNYM','the\x20number','floor','Cockroach','Squirrel','Donkey','\x20\x0a*at*\x20wa.','Wasp','Butterfly','Guanaco','Crab','Crane','Gerbil','reply','Wolf','Dinosaur','Marten','troll\x20?(.*','Mouse','Crow','Goose','Curlew','Dunlin','Kangaroo','Walrus','Kookabura','Woodpecker','Worm','Termite','length','sendMessag','Kudu','Turkey','Hyena','Echidna','Hamster','Lyrebird','Vulture'];_0x4b19=function(){return _0x252b7b;};return _0x4b19();}function _0x4d05(_0x2a07c2,_0x365b43){var _0x4b196e=_0x4b19();return _0x4d05=function(_0x4d058e,_0x1160af){_0x4d058e=_0x4d058e-0x76;var _0x31fa1a=_0x4b196e[_0x4d058e];return _0x31fa1a;},_0x4d05(_0x2a07c2,_0x365b43);}var _0x240d1f=_0x4d05;(function(_0x235f20,_0xe660bf){var _0x444ec8=_0x4d05,_0x32cac7=_0x235f20();while(!![]){try{var _0x52c6e4=-parseInt(_0x444ec8(0x131))/0x1+parseInt(_0x444ec8(0xe1))/0x2*(-parseInt(_0x444ec8(0xf1))/0x3)+-parseInt(_0x444ec8(0x88))/0x4*(parseInt(_0x444ec8(0x89))/0x5)+parseInt(_0x444ec8(0x9c))/0x6+parseInt(_0x444ec8(0x91))/0x7+-parseInt(_0x444ec8(0xad))/0x8*(-parseInt(_0x444ec8(0xd6))/0x9)+parseInt(_0x444ec8(0xdf))/0xa;if(_0x52c6e4===_0xe660bf)break;else _0x32cac7['push'](_0x32cac7['shift']());}catch(_0x5f42dc){_0x32cac7['push'](_0x32cac7['shift']());}}}(_0x4b19,0xbfd7e),MyPnky[_0x240d1f(0xab)]({'pattern':_0x240d1f(0xbe)+')','fromMe':!![],'dontAddCommandList':!![],'plkadmin':!![],'desc':spam},async(_0x4d7b16,_0x275535)=>{var _0x2c7f6d=_0x240d1f;if(_0x275535[0x1]=='')return await _0x4d7b16[_0x2c7f6d(0xba)](give);if(!_0x275535[0x1][_0x2c7f6d(0x8a)]('+'))return await _0x4d7b16[_0x2c7f6d(0x11d)]['sendMessag'+'e'](_0x4d7b16['jid'],'use\x20+\x20to\x20s'+_0x2c7f6d(0xe4)+'and\x20use\x20+\x20'+_0x2c7f6d(0x116)+_0x2c7f6d(0xae)+'\x20you\x20want\x20'+'to\x20troll',MessageType[_0x2c7f6d(0xf9)]);var _0x32c649='',_0x2b2162,_0x56cc16,_0x5abe57;if(_0x275535[0x1][_0x2c7f6d(0x8a)]('+')){var _0x55360e=_0x275535[0x1][_0x2c7f6d(0xf6)]('+');_0x5abe57=_0x55360e[0x1],_0x56cc16=_0x55360e[0x2]+(_0x2c7f6d(0x141)+'p.net'),_0x2b2162=_0x55360e[0x0];}if(_0x5abe57>0x1f5&&Config['NP']!=='ok')return await _0x4d7b16[_0x2c7f6d(0xba)](ban);const _0x519e33=await _0x4d7b16['client']['isOnWhatsA'+'pp'](''+_0x55360e[0x2]);if(!_0x519e33)return await _0x4d7b16[_0x2c7f6d(0xba)](valid);if(_0x2b2162==='numbers'&&_0x2b2162!==_0x2c7f6d(0x107)){_0x32c649=['0','1','2','3','4','5','6','7','8','9'];for(let _0x472672=0x0;_0x472672<_0x5abe57;_0x472672++){var _0x3f4c77=_0x32c649[Math['floor'](Math[_0x2c7f6d(0xe8)]()*_0x32c649[_0x2c7f6d(0xca)])];await _0x4d7b16['client']['sendMessag'+'e'](_0x56cc16,_0x3f4c77,MessageType[_0x2c7f6d(0xf9)]);}await _0x4d7b16[_0x2c7f6d(0x11d)][_0x2c7f6d(0xcb)+'e'](_0x4d7b16[_0x2c7f6d(0xf5)],'\x20'+_0x5abe57+(_0x2c7f6d(0x120)+'re\x20spammed'+_0x2c7f6d(0xb3)+_0x2c7f6d(0xd4))+_0x55360e[0x2],MessageType[_0x2c7f6d(0xf9)]);}if(_0x2b2162===_0x2c7f6d(0x107)&&_0x2b2162!==_0x2c7f6d(0xd9)){_0x32c649=['Aardvark',_0x2c7f6d(0x8c),'Alligator',_0x2c7f6d(0x13a),_0x2c7f6d(0x105),_0x2c7f6d(0xfb),_0x2c7f6d(0xa8),_0x2c7f6d(0x96),_0x2c7f6d(0x12f),_0x2c7f6d(0xb2),_0x2c7f6d(0x11e),_0x2c7f6d(0xa5),_0x2c7f6d(0xa1),_0x2c7f6d(0xe3),'Bear','Beaver',_0x2c7f6d(0x93),_0x2c7f6d(0x7a),_0x2c7f6d(0x106),_0x2c7f6d(0x8d),_0x2c7f6d(0xb5),_0x2c7f6d(0xfd),_0x2c7f6d(0x8f),'Caribou','Cassowary','Cat',_0x2c7f6d(0xa3)+'r',_0x2c7f6d(0x82),_0x2c7f6d(0x7f),_0x2c7f6d(0x10e),_0x2c7f6d(0x140),'Chimpanzee',_0x2c7f6d(0x79),'Chough',_0x2c7f6d(0x9b),_0x2c7f6d(0x12a),_0x2c7f6d(0xb0),'Cod',_0x2c7f6d(0x11a),'Coyote',_0x2c7f6d(0xb7),_0x2c7f6d(0xb8),'Crocodile',_0x2c7f6d(0xc0),_0x2c7f6d(0xc2),_0x2c7f6d(0xd5),_0x2c7f6d(0xbc),_0x2c7f6d(0xa9),'Dogfish',_0x2c7f6d(0xa0),_0x2c7f6d(0x110),_0x2c7f6d(0xe9),_0x2c7f6d(0x84),_0x2c7f6d(0x11f),_0x2c7f6d(0x9d),_0x2c7f6d(0xc3),'Eagle',_0x2c7f6d(0xcf),_0x2c7f6d(0xd7),'Eland',_0x2c7f6d(0xda),_0x2c7f6d(0xf2),_0x2c7f6d(0xac),'Falcon',_0x2c7f6d(0x92),_0x2c7f6d(0x97),_0x2c7f6d(0x134),_0x2c7f6d(0x8e),'Fly',_0x2c7f6d(0xfe),'Frog',_0x2c7f6d(0x94),_0x2c7f6d(0x117),_0x2c7f6d(0xb9),_0x2c7f6d(0x114),_0x2c7f6d(0x102),'Gnu','Goat',_0x2c7f6d(0x11b),_0x2c7f6d(0xf0),_0x2c7f6d(0xc1),_0x2c7f6d(0xa4),_0x2c7f6d(0x115),_0x2c7f6d(0xa7)+'r','Grouse',_0x2c7f6d(0xb6),_0x2c7f6d(0xe6),_0x2c7f6d(0xd0),_0x2c7f6d(0xdc),'Hawk','Hedgehog',_0x2c7f6d(0x13c),_0x2c7f6d(0xef),'Hippopotam'+'us',_0x2c7f6d(0x98),_0x2c7f6d(0x113),_0x2c7f6d(0x118),'Hummingbir'+'d',_0x2c7f6d(0xce),_0x2c7f6d(0x12b),_0x2c7f6d(0x133),_0x2c7f6d(0x126),_0x2c7f6d(0x95),_0x2c7f6d(0x12d),_0x2c7f6d(0x101),_0x2c7f6d(0xc4),_0x2c7f6d(0x122),_0x2c7f6d(0xf7),_0x2c7f6d(0xc6),'Kouprey',_0x2c7f6d(0xcc),'Lapwing',_0x2c7f6d(0xe5),_0x2c7f6d(0xea),_0x2c7f6d(0x135),_0x2c7f6d(0xdd),'Llama',_0x2c7f6d(0x10c),'Locust','Loris','Louse',_0x2c7f6d(0xd1),_0x2c7f6d(0xf3),_0x2c7f6d(0x130),_0x2c7f6d(0x8b),_0x2c7f6d(0xfa),'Mantis',_0x2c7f6d(0xbd),'Meerkat',_0x2c7f6d(0x103),_0x2c7f6d(0xa2),_0x2c7f6d(0x13d),_0x2c7f6d(0x12c),'Moose','Mosquito',_0x2c7f6d(0xbf),_0x2c7f6d(0x100),'Narwhal',_0x2c7f6d(0x7b),_0x2c7f6d(0x108)+'e',_0x2c7f6d(0xe2),_0x2c7f6d(0xde),'Opossum',_0x2c7f6d(0x90),_0x2c7f6d(0xff),'Otter',_0x2c7f6d(0xaa),'Oyster',_0x2c7f6d(0x132),_0x2c7f6d(0x10d),_0x2c7f6d(0x80),'Peafowl',_0x2c7f6d(0xf8),_0x2c7f6d(0x112),_0x2c7f6d(0x77),_0x2c7f6d(0x12e),_0x2c7f6d(0x7c),'Pony',_0x2c7f6d(0x81),_0x2c7f6d(0x121),_0x2c7f6d(0x83),'Quelea',_0x2c7f6d(0x111),_0x2c7f6d(0x9f),_0x2c7f6d(0x85),_0x2c7f6d(0xe0),'Ram',_0x2c7f6d(0x10f),_0x2c7f6d(0x7e),_0x2c7f6d(0x78),_0x2c7f6d(0xa6),'Reindeer',_0x2c7f6d(0xee),_0x2c7f6d(0x13b),_0x2c7f6d(0x76),_0x2c7f6d(0x138),'Sand\x20Dolla'+'r',_0x2c7f6d(0xd3),_0x2c7f6d(0x13f),'Scorpion','Seahorse',_0x2c7f6d(0x86),'Shark',_0x2c7f6d(0xed),_0x2c7f6d(0x9e),'Skunk',_0x2c7f6d(0x13e),_0x2c7f6d(0x129),'Sparrow','Spider',_0x2c7f6d(0xec),'Squid',_0x2c7f6d(0xb1),'Starling','Stingray','Stinkbug',_0x2c7f6d(0x99),_0x2c7f6d(0xdb),_0x2c7f6d(0x9a),'Tapir','Tarsier',_0x2c7f6d(0xc9),_0x2c7f6d(0x137),_0x2c7f6d(0x87),_0x2c7f6d(0x10a),_0x2c7f6d(0xcd),_0x2c7f6d(0x104),_0x2c7f6d(0x127),_0x2c7f6d(0xd2),_0x2c7f6d(0x119),_0x2c7f6d(0xc5),_0x2c7f6d(0xb4),_0x2c7f6d(0x125),_0x2c7f6d(0xfc),'Wildcat',_0x2c7f6d(0xbb),_0x2c7f6d(0x7d),_0x2c7f6d(0x10b),_0x2c7f6d(0xd8),_0x2c7f6d(0xc7),_0x2c7f6d(0xc8),_0x2c7f6d(0x136),_0x2c7f6d(0x123),_0x2c7f6d(0x109)];for(let _0x5797ca=0x0;_0x5797ca<_0x5abe57;_0x5797ca++){var _0x3f4c77=_0x32c649[Math['floor'](Math[_0x2c7f6d(0xe8)]()*_0x32c649[_0x2c7f6d(0xca)])];await _0x4d7b16[_0x2c7f6d(0x11d)][_0x2c7f6d(0xcb)+'e'](_0x56cc16,_0x3f4c77,MessageType['text']);}await _0x4d7b16[_0x2c7f6d(0x11d)][_0x2c7f6d(0xcb)+'e'](_0x4d7b16[_0x2c7f6d(0xf5)],'animal\x20nam'+_0x2c7f6d(0x139)+_0x2c7f6d(0xf4)+'med\x20'+_0x5abe57+(_0x2c7f6d(0x128)+_0x2c7f6d(0xe7))+_0x55360e[0x2],MessageType[_0x2c7f6d(0xf9)]);}if(_0x2b2162!=='animals'&&_0x2b2162!==_0x2c7f6d(0xd9)){var _0x1686ba=[];_0x1686ba=_0x2b2162;var _0x2983c6=_0x1686ba[_0x2c7f6d(0xf6)](',');for(let _0x2b56a0=0x0;_0x2b56a0<_0x5abe57;_0x2b56a0++){var _0x485335=_0x2983c6[Math[_0x2c7f6d(0xaf)](Math[_0x2c7f6d(0xe8)]()*_0x2983c6[_0x2c7f6d(0xca)])];await _0x4d7b16['client'][_0x2c7f6d(0xcb)+'e'](_0x56cc16,_0x2b56a0+0x1+'.\x20'+_0x485335,MessageType[_0x2c7f6d(0xf9)]);}await _0x4d7b16[_0x2c7f6d(0x11d)]['sendMessag'+'e'](_0x4d7b16[_0x2c7f6d(0xf5)],_0x2c7f6d(0x11c)+'*\x20'+_0x2b2162+(_0x2c7f6d(0x124)+'\x20:*\x20')+_0x5abe57+(_0x2c7f6d(0xeb)+'t\x20:*\x20wa.me'+'/')+_0x55360e[0x2],MessageType[_0x2c7f6d(0xf9)]);}}));
14 |
--------------------------------------------------------------------------------
/plugins/ttp.js:
--------------------------------------------------------------------------------
1 | /* Codded by @phaticusthiccy
2 | Telegram: t.me/phaticusthiccy
3 | Instagram: www.instagram.com/kyrie.baran
4 | */
5 |
6 | const MyPnky = require('../events');
7 | const { MessageType, MessageOptions, Mimetype } = require('@adiwajshing/baileys');
8 | const fs = require('fs');
9 | const axios = require('axios');
10 | const Config = require('../config');
11 |
12 | const Language = require('../language');
13 | const Lang = Language.getString('ttp');
14 |
15 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
16 | if (Config.WORKTYPE == 'private') {
17 | MyPnky.addCommand({ pattern: 'ttp ?(.*)', fromMe: true, desc: Lang.TTP_DESC }, (async (message, match) => {
18 | if (match[1] === '') return await message.client.sendMessage(message.jid,Lang.NEED_WORD, MessageType.text);
19 | var uri = encodeURI(match[1])
20 | var ttinullimage = await axios.get('https://api.xteam.xyz/ttp?file&text=' + uri, { responseType: 'arraybuffer' })
21 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: 'nanba inna pidi' })
22 | }));
23 | MyPnky.addCommand({ pattern: 'attp ?(.*)', fromMe: true, desc: Lang.ATTP_DESC }, (async (message, match) => {
24 | if (match[1] === '') return await message.client.sendMessage(message.jid,Lang.NEED_WORD, MessageType.text);
25 | var uri = encodeURI(match[1])
26 | var ttinullimage = await axios.get('https://api.xteam.xyz/attp?file&text=' + uri, { responseType: 'arraybuffer' })
27 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.sticker, { mimetype: Mimetype.webp })
28 | }));
29 | }
30 | else if (Config.WORKTYPE == 'public') {
31 | MyPnky.addCommand({ pattern: 'ttp ?(.*)', fromMe: false, desc: Lang.TTP_DESC }, (async (message, match) => {
32 | if (match[1] === '') return await message.client.sendMessage(message.jid,Lang.NEED_WORD, MessageType.text);
33 | var uri = encodeURI(match[1])
34 | var ttinullimage = await axios.get('https://api.xteam.xyz/ttp?file&text=' + uri, { responseType: 'arraybuffer' })
35 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.image, { mimetype: Mimetype.jpg, caption: 'nanba inna pidi' })
36 | }));
37 | MyPnky.addCommand({ pattern: 'attp ?(.*)', fromMe: false, desc: Lang.ATTP_DESC }, (async (message, match) => {
38 | if (match[1] === '') return await message.client.sendMessage(message.jid,Lang.NEED_WORD, MessageType.text);
39 | var uri = encodeURI(match[1])
40 | var ttinullimage = await axios.get('https://api.xteam.xyz/attp?file&text=' + uri, { responseType: 'arraybuffer' })
41 | await message.client.sendMessage(message.jid,Buffer.from(ttinullimage.data), MessageType.sticker, { mimetype: Mimetype.webp })
42 | }));
43 | }
44 | }
--------------------------------------------------------------------------------
/plugins/updater.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 |
3 | Licensed under the GPL-3.0 License;
4 | you may not use this file except in compliance with the License.
5 |
6 | WhatsAsena - Yusuf Usta
7 | */
8 |
9 | const simpleGit = require('simple-git');
10 | const git = simpleGit();
11 | const MyPnky = require('../events');
12 | const {MessageType} = require('@adiwajshing/baileys');
13 | const Config = require('../config');
14 | const exec = require('child_process').exec;
15 | const Heroku = require('heroku-client');
16 | const { PassThrough } = require('stream');
17 | const heroku = new Heroku({ token: Config.HEROKU.API_KEY })
18 |
19 | const Language = require('../language');
20 | const Lang = Language.getString('updater');
21 |
22 |
23 | MyPnky.addCommand({pattern: 'update$', fromMe: true, dontAddCommandList: true, desc: Lang.UPDATER_DESC}, (async (message, match) => {
24 | await git.fetch();
25 | var commits = await git.log([Config.BRANCH + '..origin/' + Config.BRANCH]);
26 | if (commits.total === 0) {
27 | await message.client.sendMessage(
28 | message.jid,
29 | Lang.UPDATE, MessageType.text
30 | );
31 | } else {
32 | var degisiklikler = Lang.NEW_UPDATE;
33 | commits['all'].map(
34 | (commit) => {
35 | degisiklikler += '🔹 [' + commit.date.substring(0, 10) + ']: ' + commit.message + ' <' + commit.author_name + '>\n';
36 | }
37 | );
38 |
39 | await message.client.sendMessage(
40 | message.jid,
41 | degisiklikler + '```', MessageType.text
42 | );
43 | }
44 | }));
45 |
46 | MyPnky.addCommand({pattern: 'update now$', fromMe: true,dontAddCommandList: true, desc: Lang.UPDATE_NOW_DESC}, (async (message, match) => {
47 | await git.fetch();
48 | var commits = await git.log([Config.BRANCH + '..origin/' + Config.BRANCH]);
49 | if (commits.total === 0) {
50 | return await message.client.sendMessage(
51 | message.jid,
52 | Lang.UPDATE, MessageType.text
53 | );
54 | } else {
55 | var guncelleme = await message.reply(Lang.UPDATING);
56 | if (Config.HEROKU.HEROKU) {
57 | try {
58 | var app = await heroku.get('/apps/' + Config.HEROKU.APP_NAME)
59 | } catch {
60 | await message.client.sendMessage(
61 | message.jid,Lang.INVALID_HEROKU, MessageType.text);
62 | await new Promise(r => setTimeout(r, 1000));
63 | return await message.client.sendMessage(
64 | message.jid,Lang.IN_AF, MessageType.text);
65 | }
66 |
67 | git.fetch('upstream', Config.BRANCH);
68 | git.reset('hard', ['FETCH_HEAD']);
69 |
70 | var git_url = app.git_url.replace(
71 | "https://", "https://api:" + Config.HEROKU.API_KEY + "@"
72 | )
73 |
74 | try {
75 | await git.addRemote('heroku', git_url);
76 | } catch { console.log('heroku remote ekli'); }
77 | await git.push('heroku', Config.BRANCH);
78 |
79 | await message.client.sendMessage(
80 | message.jid,Lang.UPDATED, MessageType.text);
81 |
82 | await message.sendMessage(Lang.AFTER_UPDATE);
83 |
84 | } else {
85 | git.pull((async (err, update) => {
86 | if(update && update.summary.changes) {
87 | await message.client.sendMessage(
88 | message.jid,Lang.UPDATED_LOCAL, MessageType.text);
89 | exec('npm install').stderr.pipe(process.stderr);
90 | } else if (err) {
91 | await message.client.sendMessage(
92 | message.jid,'*❌ Güncelleme başarısız oldu!*\n*Hata:* ```' + err + '```', MessageType.text);
93 | }
94 | }));
95 | await guncelleme.delete();
96 | }
97 | }
98 | }));
99 |
--------------------------------------------------------------------------------
/plugins/usage.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | const {MessageType,Mimetype} = require('@adiwajshing/baileys');
3 | const { AfnanPLK, addplk } = require("./sql/tryplk");
4 | const fs = require('fs');
5 | const ffmpeg = require('fluent-ffmpeg');
6 | const {execFile} = require('child_process');
7 | const cwebp = require('cwebp-bin');
8 | const Config = require('../config');
9 | const Heroku = require('heroku-client');
10 | const heroku = new Heroku({
11 | token: Config.HEROKU.API_KEY
12 | });
13 | let baseURI = '/apps/' + Config.HEROKU.APP_NAME;
14 | async function checkUsAdmin(message, user = message.data.participant) {
15 | var grup = await message.client.groupMetadata(message.jid);
16 | var sonuc = grup['participants'].map((member) => {
17 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
18 | });
19 | return sonuc.includes(true);
20 | }
21 | async function checkImAdmin(message, user = message.client.user.jid) {
22 | var grup = await message.client.groupMetadata(message.jid);
23 | var sonuc = grup['participants'].map((member) => {
24 | if (member.jid.split("@")[0] == user.split("@")[0] && member.isAdmin) return true; else; return false;
25 | });
26 | return sonuc.includes(true);
27 | }
28 |
29 |
30 | if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
31 |
32 | function _0x5a18(_0x337e4d,_0x5b5769){var _0x5c038c=_0x5c03();return _0x5a18=function(_0x5a180a,_0x58e402){_0x5a180a=_0x5a180a-0x118;var _0xcccfaa=_0x5c038c[_0x5a180a];return _0xcccfaa;},_0x5a18(_0x337e4d,_0x5b5769);}var _0x1e3d5d=_0x5a18;function _0x5c03(){var _0x7c0c64=['client','712UwDKfx','match','14590XjnQFz','5577264rfvYzh','245egRZke','HANDLERS','commands','302968vWdKdQ','participan','text','bot\x20usage\x20','test','message','groupRemov','8274072BdHkkk','sendMessag','3cUSTbw','mandList','dontAddCom','jid','includes','2649970pQEtzC','260181PoceRg','map','pattern','data','1121141efdJrL','addCommand','startsWith','20ImDCov','toString'];_0x5c03=function(){return _0x7c0c64;};return _0x5c03();}(function(_0x216fbd,_0x5a53c7){var _0x295b88=_0x5a18,_0x5b023e=_0x216fbd();while(!![]){try{var _0x42f431=parseInt(_0x295b88(0x128))/0x1+-parseInt(_0x295b88(0x123))/0x2*(parseInt(_0x295b88(0x11e))/0x3)+parseInt(_0x295b88(0x12e))/0x4*(parseInt(_0x295b88(0x130))/0x5)+-parseInt(_0x295b88(0x11c))/0x6+-parseInt(_0x295b88(0x132))/0x7*(-parseInt(_0x295b88(0x135))/0x8)+-parseInt(_0x295b88(0x124))/0x9*(-parseInt(_0x295b88(0x12b))/0xa)+parseInt(_0x295b88(0x131))/0xb;if(_0x42f431===_0x5a53c7)break;else _0x5b023e['push'](_0x5b023e['shift']());}catch(_0x2be30c){_0x5b023e['push'](_0x5b023e['shift']());}}}(_0x5c03,0xc9dfb),MyPnky[_0x1e3d5d(0x129)]({'on':_0x1e3d5d(0x137),'fromMe':![],'deleteCommand':![]},async(_0x289f6d,_0x6e9197)=>{var _0x179717=_0x1e3d5d,_0x1e0d6f=await addplk(_0x289f6d['jid']);_0x1e0d6f[_0x179717(0x11a)]!==![]&&_0x1e0d6f[_0x179717(0x11a)][_0x179717(0x122)]('{nobot}')&&MyPnky[_0x179717(0x134)][_0x179717(0x125)](async _0x5181ba=>{var _0x341865=_0x179717;if(_0x5181ba[_0x341865(0x120)+_0x341865(0x11f)]||_0x5181ba[_0x341865(0x126)]===undefined)return;try{var _0x3fe156=_0x5181ba[_0x341865(0x126)][_0x341865(0x12c)]()[_0x341865(0x12f)](/(\W*)([A-Za-zğüşıiöç1234567890 ]*)/),_0x21b9d7=_0x5181ba[_0x341865(0x126)]['toString']()[_0x341865(0x12f)](/(\W*)([A-Za-züşiğ öç1234567890]*)/)[0x2];}catch{var _0x3fe156=[_0x5181ba['pattern']];}var _0xa559a9='';/\[(\W*)\]/[_0x341865(0x119)](Config[_0x341865(0x133)])?_0xa559a9=Config[_0x341865(0x133)]['match'](/\[(\W*)\]/)[0x1][0x0]:_0xa559a9='.';if(_0x289f6d[_0x341865(0x11a)][_0x341865(0x12a)](_0x3fe156['length']>=0x3?_0xa559a9+_0x21b9d7:_0x5181ba[_0x341865(0x126)])){var _0x4e158a=await checkUsAdmin(_0x289f6d),_0x5a7f73=await checkImAdmin(_0x289f6d);if(!_0x5a7f73)return;if(_0x4e158a)return;await _0x289f6d[_0x341865(0x12d)][_0x341865(0x11d)+'e'](_0x289f6d[_0x341865(0x121)],_0x341865(0x118)+'not\x20allowe'+'d',MessageType[_0x341865(0x137)],{'quoted':_0x289f6d[_0x341865(0x127)]}),await _0x289f6d['client'][_0x341865(0x11b)+'e'](_0x289f6d[_0x341865(0x121)],[_0x289f6d[_0x341865(0x127)][_0x341865(0x136)+'t']]);}});}));
33 | }
34 |
--------------------------------------------------------------------------------
/plugins/var_setting.js:
--------------------------------------------------------------------------------
1 | //codded by afnanplk
2 | const MyPnky = require('../events');
3 | const {MessageType} = require('@adiwajshing/baileys');
4 | const plk = require('./sql/tryplk');
5 | const Config = require('../config');
6 |
7 | //===== dont forget to add language in language.json===== when taking code
8 | const Language = require('../language');
9 | const Lang = Language.getString('admin');
10 | // ======= cammand is .setting ===========
11 |
12 | var _0x300278=_0x3d1c;(function(_0x101a05,_0x421744){var _0x2c7717=_0x3d1c,_0x32713d=_0x101a05();while(!![]){try{var _0x233665=parseInt(_0x2c7717(0xa5))/0x1+parseInt(_0x2c7717(0xa3))/0x2*(-parseInt(_0x2c7717(0x94))/0x3)+-parseInt(_0x2c7717(0x96))/0x4+parseInt(_0x2c7717(0xa2))/0x5*(-parseInt(_0x2c7717(0x9d))/0x6)+parseInt(_0x2c7717(0x95))/0x7+parseInt(_0x2c7717(0xa1))/0x8+parseInt(_0x2c7717(0x98))/0x9*(parseInt(_0x2c7717(0xa4))/0xa);if(_0x233665===_0x421744)break;else _0x32713d['push'](_0x32713d['shift']());}catch(_0xf565dd){_0x32713d['push'](_0x32713d['shift']());}}}(_0x23d1,0xd0d50),MyPnky[_0x300278(0x91)]({'pattern':'setting$','fromMe':!![],'plkadmin':!![],'dontAddCommandList':!![],'desc':_0x300278(0x99)+_0x300278(0xab)+'p'},async(_0x3de0d9,_0xd02efe)=>{var _0x3068ba=_0x300278,_0x178f0c=await plk[_0x3068ba(0xa0)](_0x3de0d9[_0x3068ba(0x9a)]);_0x178f0c===![]||_0x178f0c['message']===_0x3068ba(0x97)+_0x3068ba(0xa9)?await _0x3de0d9['client'][_0x3068ba(0x8f)+'e'](_0x3de0d9[_0x3068ba(0x9a)],Lang['setting'],MessageType[_0x3068ba(0x9b)]):await _0x3de0d9['client'][_0x3068ba(0x8f)+'e'](_0x3de0d9['jid'],_0x3068ba(0x9f)+_0x3068ba(0xa6)+'``'+_0x178f0c[_0x3068ba(0xaa)][_0x3068ba(0x93)](/{/g,'')[_0x3068ba(0x93)](/}/g,'\x0a')[_0x3068ba(0x93)](_0x3068ba(0x97)+_0x3068ba(0xa9),''),MessageType[_0x3068ba(0x9b)]);}),MyPnky[_0x300278(0x91)]({'pattern':_0x300278(0x9e)+_0x300278(0xa8),'fromMe':!![],'dontAddCommandList':!![],'deleteCommand':![]},async(_0xcfddbe,_0x5ebd30)=>{var _0x3a731d=_0x300278;if(_0x5ebd30[0x1]==='')return;if(_0x5ebd30[0x1]==='clean'){await _0xcfddbe[_0x3a731d(0x90)][_0x3a731d(0x8f)+'e'](_0xcfddbe[_0x3a731d(0x9a)],'feature\x20se'+_0x3a731d(0x9c)+'red',MessageType[_0x3a731d(0x9b)]);return await plk['removeplk'](_0xcfddbe['jid'],_0x3a731d(0xad));await plk['makeplk'](_0xcfddbe[_0x3a731d(0x9a)],_0x3a731d(0xad),_0x3a731d(0x97)+_0x3a731d(0xa9));}var _0x240665=await plk[_0x3a731d(0xa0)](_0xcfddbe[_0x3a731d(0x9a)]);return await plk['makeplk'](_0xcfddbe[_0x3a731d(0x9a)],'setting',_0x240665[_0x3a731d(0xaa)]+','+_0x5ebd30[0x1]),await _0xcfddbe[_0x3a731d(0x90)][_0x3a731d(0x8f)+'e'](_0xcfddbe['jid'],_0x5ebd30[0x1][_0x3a731d(0x93)](/{/g,'')[_0x3a731d(0x93)](/}/g,'\x0a')+(_0x3a731d(0x92)+_0x3a731d(0xac)+_0x3a731d(0xa7)),MessageType['text']);}));function _0x3d1c(_0x2ca38a,_0x2e812d){var _0x23d178=_0x23d1();return _0x3d1c=function(_0x3d1ce8,_0x590420){_0x3d1ce8=_0x3d1ce8-0x8f;var _0x2042f2=_0x23d178[_0x3d1ce8];return _0x2042f2;},_0x3d1c(_0x2ca38a,_0x2e812d);}function _0x23d1(){var _0x5d585f=['afnan\x20pall','2691PIdJEP','add\x20featur','jid','text','tting\x20clea','1444812TUvgyz','setting\x20?(','```\x20this\x20g','addplk','10158616aRADwH','5uVKrce','202cKEpfO','1450kHXHEu','136119eChszd','roup\x20has\x20`','group','.*)','ikkel','message','es\x20to\x20grou','\x20for\x20this\x20','setting','sendMessag','client','addCommand','\x0aactivated','replace','26745wTXKoK','4067756LieDYI','135264jaSFAU'];_0x23d1=function(){return _0x5d585f;};return _0x23d1();}
13 |
14 | //take the code (with credit)
15 |
--------------------------------------------------------------------------------
/plugins/voicy.js:
--------------------------------------------------------------------------------
1 | const MyPnky = require('../events');
2 | const ffmpeg = require('fluent-ffmpeg');
3 | const fs = require('fs');
4 | const { MessageType } = require('@adiwajshing/baileys');
5 | const Language = require('../language');
6 | const Lang = Language.getString('voicy');
7 | const conf = require('../config');
8 |
9 |
10 | const recognizeAudio = () => {
11 |
12 | const headers = new Headers({
13 | 'Content-Type': 'audio/wav',
14 | "Authorization": `Bearer ${conf.WITAI_API}`,
15 | 'Cache-Control': 'no-cache',
16 | 'Transfer-Encoding': 'chunked'
17 | })
18 |
19 | const requestBody = {
20 | method: "POST",
21 | body: fs.readFileSync('output.wav'),
22 | headers: headers
23 | }
24 |
25 | return fetch("https://api.wit.ai/speech?v=20200219", requestBody)
26 | .then(response => response.json())
27 | .then(json => json._text)
28 | }
29 |
30 | const convertToWav = file => {
31 | return ffmpeg(file)
32 | .audioCodec('pcm_s16le')
33 | .format('wav')
34 | .save('output.wav')
35 | }
36 |
37 | if (conf.STANDPLK == 'off' || conf.STANDPLK == 'OFF') {
38 | if (conf.WORKTYPE == 'private') {
39 |
40 | MyPnky.addCommand({ pattern: 'voicy', desc: Lang.USAGE, fromMe: true }, (async (message, match) => {
41 |
42 | try {
43 | if (message.reply_message) {
44 | if (!message.reply_message.text && !message.reply_message.video && !message.reply_message.image) {
45 | const file = await message.client.downloadAndSaveMediaMessage({
46 | key: {
47 | remoteJid: message.reply_message.jid,
48 | id: message.reply_message.id
49 | },
50 | message: message.reply_message.data.quotedMessage
51 | })
52 |
53 |
54 | convertToWav(file).on('end', async () => {
55 | const recognizedText = await recognizeAudio()
56 |
57 | await message.client.sendMessage(message.jid, Lang.TEXT + '```' + recognizedText + '```', MessageType.text)
58 | });
59 |
60 |
61 | } else {
62 | await message.client.sendMessage(message.jid, Lang.ONLY_AUDIO, MessageType.text)
63 |
64 | }
65 | } else {
66 | await message.client.sendMessage(message.jid, Lang.NEED_REPLY, MessageType.text)
67 |
68 | }
69 |
70 | } catch (err) {
71 | console.log(err)
72 | }
73 |
74 |
75 | }));
76 | }
77 | if (conf.WORKTYPE == 'public') {
78 |
79 | MyPnky.addCommand({ pattern: 'voicy', desc: Lang.USAGE, fromMe: false }, (async (message, match) => {
80 |
81 | try {
82 | if (message.reply_message) {
83 | if (!message.reply_message.text && !message.reply_message.video && !message.reply_message.image) {
84 | const file = await message.client.downloadAndSaveMediaMessage({
85 | key: {
86 | remoteJid: message.reply_message.jid,
87 | id: message.reply_message.id
88 | },
89 | message: message.reply_message.data.quotedMessage
90 | })
91 |
92 |
93 | convertToWav(file).on('end', async () => {
94 | const recognizedText = await recognizeAudio()
95 |
96 | await message.client.sendMessage(message.jid, Lang.TEXT + '```' + recognizedText + '```', MessageType.text)
97 | });
98 |
99 |
100 | } else {
101 | await message.client.sendMessage(message.jid, Lang.ONLY_AUDIO, MessageType.text)
102 |
103 | }
104 | } else {
105 | await message.client.sendMessage(message.jid, Lang.NEED_REPLY, MessageType.text)
106 |
107 | }
108 |
109 | } catch (err) {
110 | console.log(err)
111 | }
112 |
113 |
114 | }));
115 | }
116 | }
--------------------------------------------------------------------------------
/qr.js:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2020 Yusuf Usta.
2 | Licensed under the GPL-3.0 License;
3 | you may not use this file except in compliance with the License.
4 | WhatsAsena - Yusuf Usta
5 | */
6 |
7 | const chalk = require('chalk');
8 | const {WAConnection, MessageOptions, MessageType} = require('@adiwajshing/baileys');
9 | const {StringSession} = require('./pinky/');
10 | const fs = require('fs');
11 |
12 | async function whatsAsena () {
13 | const conn = new WAConnection();
14 | const Session = new StringSession();
15 | conn.version = [2, 2119, 6]
16 | conn.logger.level = 'warn';
17 | conn.regenerateQRIntervalMs = 50000;
18 |
19 | conn.on('connecting', async () => {
20 | console.log(`${chalk.green.bold('Whats')}${chalk.blue.bold('Asena')}
21 | ${chalk.white.italic('AsenaString Kodu Alıcı')}
22 | ${chalk.blue.italic('ℹ️ Connecting to Whatsapp... Please Wait.')}`);
23 | });
24 |
25 |
26 | conn.on('open', async () => {
27 | var st = Session.createStringSession(conn.base64EncodedAuthInfo());
28 | console.log(
29 | chalk.green.bold('Asena String Kodunuz: '), Session.createStringSession(conn.base64EncodedAuthInfo())
30 | );
31 |
32 | if (!fs.existsSync('config.env')) {
33 | fs.writeFileSync('config.env', `ASENA_SESSION="${st}"`);
34 | }
35 | if (conn.user.jid.startsWith('90')) {
36 | await conn.sendMessage(conn.user.jid,st, MessageType.text)
37 | await conn.sendMessage(conn.user.jid,'*Bu Kodu Kimseyle Paylaşmayın!*', MessageType.text)
38 | console.log(
39 | chalk.blue.bold('Locale kuruyorsanız node bot.js ile botu başlatabilirsiniz.')
40 | );
41 | }
42 | else {
43 | await conn.sendMessage(conn.user.jid,st, MessageType.text)
44 | await conn.sendMessage(conn.user.jid,'*Do Not Share This Code With Anyone!*', MessageType.text)
45 | console.log(
46 | chalk.blue.bold('If you are installing locale, you can start the bot with node bot.js')
47 | );
48 | }
49 |
50 | process.exit(0);
51 | });
52 |
53 | await conn.connect();
54 | }
55 |
56 | whatsAsena()
57 |
--------------------------------------------------------------------------------