Repository: zim-bot/zimbot-v4
Branch: zim-bot
Commit: ec8216f6e104
Files: 117
Total size: 1.2 MB
Directory structure:
gitextract_gb_3ye8s/
├── .dockerignore
├── .gitattributes
├── .github/
│ └── FUNDING.yml
├── .npmignore
├── Dockerfile
├── LICENSE
├── README.md
├── Zimbot/
│ ├── gtts.js
│ ├── index.js
│ ├── index2.js
│ ├── index3.js
│ ├── index4.js
│ ├── index5.js
│ ├── jadibot.js
│ ├── mediafire.js
│ └── zimbotii.js
├── Zimbot.js
├── app.json
├── bot.js
├── bot_session/
│ └── upload_your_creds.json_here
├── database/
│ ├── antilink.json
│ ├── balance.json
│ ├── ban.json
│ ├── banned.json
│ ├── database.json
│ ├── glimit.json
│ ├── inventori.json
│ ├── language.json
│ ├── level.json
│ ├── leveluser.json
│ ├── limit.json
│ ├── userhit.json
│ └── welcome.json
├── drips.js
├── drips.yml
├── gitattributes
├── gitignore
├── heroku.yml
├── index.js
├── level.js
├── leveluser.json
├── lib/
│ ├── ApkDown.js
│ ├── Dockerfile
│ ├── antispam.js
│ ├── binary.js
│ ├── cloudDBAdapter.js
│ ├── color.js
│ ├── converter.js
│ ├── database.js
│ ├── dungeon.js
│ ├── exif.js
│ ├── fetcher.js
│ ├── image.js
│ ├── level.js
│ ├── levelling.js
│ ├── limit.js
│ ├── limit2.js
│ ├── limit3.js
│ ├── limitbb.js
│ ├── limitc.js
│ ├── lirik.js
│ ├── liyascrape.js
│ ├── lol.js
│ ├── lvlfunction.js
│ ├── mediafire.js
│ ├── mongoDB.js
│ ├── myfunc.js
│ ├── myfunc2.js
│ ├── namaku.js
│ ├── nothing.js
│ ├── random.js
│ ├── rpg.js
│ ├── rude.json
│ ├── scrape.js
│ ├── scrape2.js
│ ├── scrape3.js
│ ├── scrapedl.js
│ ├── scrapejoox.js
│ ├── scraper.js
│ ├── scraper2.js
│ ├── scraper3.js
│ ├── skiuwers.js
│ ├── tes.xlsx
│ ├── tictactoe.d.ts
│ ├── tictactoe.js
│ ├── tiktok.js
│ ├── uploader.js
│ ├── y2mate.js
│ ├── ytdl.js
│ ├── ytdl2.js
│ └── zimbot
├── limit.js
├── package.json
├── plugins/
│ ├── converter.js
│ ├── neoxrApi.js
│ ├── sticker.js
│ ├── tiktok.js
│ ├── uploadFile.js
│ └── uploadImage.js
├── replit
├── replit.nix
├── rude.json
├── server.js
├── speed.py
├── src/
│ ├── database.json
│ └── math.js
├── storage/
│ └── user/
│ ├── alat_tukar.js
│ ├── buruan.js
│ ├── darah.js
│ ├── darah.json
│ ├── hasil_buruan.json
│ ├── inventory.json
│ ├── limit.js
│ ├── limit.json
│ ├── monay.js
│ └── monay.json
└── tez.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
node_modules
package-lock.json
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['https://www.youtube.com/c/DRISOFC', 'link2']
================================================
FILE: .npmignore
================================================
node_modules
package-lock.json
================================================
FILE: Dockerfile
================================================
FROM fedora:37
RUN sudo dnf -y update &&\
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm &&\
sudo dnf install -y git ffmpeg ImageMagick nodejs libwebp yarnpkg &&\
sudo dnf clean all -y
WORKDIR /zimbot
COPY . /zimbot
RUN yarn
CMD ["node", "."]
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
.
================================================
FILE: README.md
================================================
<<<<<<< HEAD

# ZIM BOT V4
## ``` This Script is for Everyone Don't sell it at high price ```
## WATCH TUTORIAL NICELY DON'T SKIP [`YOUTUBE`](https://youtube.com/@zim-bot)
## ``` Are you Experiencing an error don't hesitate to ask me ``` [`DRIPS`](https://wa.me/+447441437150)
WhatsApp with so Many features using multi device [`BAILEYS`](https://github.com/adiwajshing/baileys)

## ```Donate Me```
- [`Paypal`](https://www.paypal.me/zimbotinc)
## [](https://chat.whatsapp.com/Kmb2MgOn3voDqrI2khhYDa) [](https://nodejs.org/en/)
> A Fully PRECIOUS COOL BOT BY DRIPS MEMES
>
## DONT FORGET TO GIVE A STAR🌟 AND FORK
[](https://heroku.com/deploy?template=https://github.com/zim-bot/zimbot-v4)
## BUILD PACKS
```
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest
https://github.com/clhuang/heroku-buildpack-webp-binaries.git
```
[](https://replit.com/@ReinhardTuna/ZIM-BOT-INC-QR?v=1)
## > THIS BOT CODED BY DRIPS MEMES ZIM BOT INC
## > FOLLOW STEPS BELOW FOR INSTALLATION
## > THIS BOT IT USE MULTI DEVICE BAILEYS
## > CHANGE LINK IN LIB FOLDER 📁📂 CHANGE HERE [`DOCKERFILE`](https://github.com/zim-bot/zimbot-v4/edit/main/lib/Dockerfile)
```
apt install nodejs
apt install git
apt update && apt upgrade
git clone https://github.com/zim-bot/zimbot-v4
cd zimbot-v4
rm -r session.json
node --expose-gc index.js
echo scan the qr code and enjoy bot
```
## JOIN MY WHATSAPP GROUP
# [](https://chat.whatsapp.com/EFsb8RCXV4jLEFk4eAcA1A)
## MY PERSONAL CHAT
# [](https://wa.me/27634090203)
# > THANKS FOR CHOOSING ZIM BOT WE APPRECIATE YOU FOR YOUR SUPPORT
=======

# ZIM BOT V4 NEW UPDATE
## ``` This Script is for Everyone Don't sell it at high price ```
## WATCH TUTORIAL NICELY DON'T SKIP [`YOUTUBE`](https://youtu.be/v1UL3fB3bK0)
## ``` Are you Experiencing an error don't hesitate to ask me ``` [`DRIPS`](https://wa.me/263776558634)
WhatsApp with so Many features using multi device [`BAILEYS`](https://github.com/adiwajshing/baileys)

## ```Donate Me```
- [`Paypal`](https://www.paypal.me/zimbotinc)
## [](https://chat.whatsapp.com/Kmb2MgOn3voDqrI2khhYDa) [](https://nodejs.org/en/)
> A Fully PRECIOUS COOL BOT BY BLESSED TUNA (DRIPS BLENNIE MEMES)
>
## DONT FORGET TO GIVE A STAR🌟 AND FORK
[](https://heroku.com/deploy?template=https://github.com/zim-bot/zimbot-v4)
## BUILD PACKS
```
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest
https://github.com/clhuang/heroku-buildpack-webp-binaries.git
```
[](https://replit.com/@ReinhardTuna/ZIM-BOT-INC-QR?v=1)
## > THIS BOT CODED BY DRIPS MEMES ZIM BOT INC
## > FOLLOW STEPS BELOW FOR INSTALLATION
## > THIS BOT IT USE MULTI DEVICE BAILEYS
```
apt install nodejs
apt install git
apt update && apt upgrade
git clone https://github.com/zim-bot/zimbot-v4
cd zimbot-v4
yarn
node --expose-gc index.js
echo scan the qr code and enjoy bot
```
## JOIN MY WHATSAPP GROUP
# [](https://chat.whatsapp.com/Kmb2MgOn3voDqrI2khhYDa)
## MY PERSONAL CHAT
# [](https://wa.me/263776558634)
# > THANKS FOR CHOOSING ZIM BOT WE APPRECIATE YOU FOR YOUR SUPPORT
>>>>>>> d904ae1d (new update)
================================================
FILE: Zimbot/gtts.js
================================================
const request = require('request');
const escapeStringRegexp = require('escape-string-regexp');
const async = require('async');
const fs = require('fs');
const MultiStream = require('multistream');
const fakeUa = require('fake-useragent');
const GOOGLE_TTS_URL = 'http://translate.google.com/translate_tts';
const MAX_CHARS = 100;
const LANGUAGES = {
'af': 'Afrikaans',
'sq': 'Albanian',
'ar': 'Arabic',
'hy': 'Armenian',
'ca': 'Catalan',
'zh': 'Chinese',
'zh-cn': 'Chinese (Mandarin/China)',
'zh-tw': 'Chinese (Mandarin/Taiwan)',
'zh-yue': 'Chinese (Cantonese)',
'hr': 'Croatian',
'cs': 'Czech',
'da': 'Danish',
'nl': 'Dutch',
'en': 'English',
'en-au': 'English (Australia)',
'en-uk': 'English (United Kingdom)',
'en-us': 'English (United States)',
'eo': 'Esperanto',
'fi': 'Finnish',
'fr': 'French',
'de': 'German',
'el': 'Greek',
'ht': 'Haitian Creole',
'hi': 'Hindi',
'hu': 'Hungarian',
'is': 'Icelandic',
'id': 'Indonesian',
'it': 'Italian',
'ja': 'Japanese',
'ko': 'Korean',
'la': 'Latin',
'lv': 'Latvian',
'mk': 'Macedonian',
'no': 'Norwegian',
'pl': 'Polish',
'pt': 'Portuguese',
'pt-br': 'Portuguese (Brazil)',
'ro': 'Romanian',
'ru': 'Russian',
'sr': 'Serbian',
'sk': 'Slovak',
'es': 'Spanish',
'es-es': 'Spanish (Spain)',
'es-us': 'Spanish (United States)',
'sw': 'Swahili',
'sv': 'Swedish',
'ta': 'Tamil',
'th': 'Thai',
'tr': 'Turkish',
'vi': 'Vietnamese',
'cy': 'Welsh'
}
function Text2Speech(_lang, _debug) {
var lang = _lang || 'en';
var debug = _debug || false;
lang = lang.toLowerCase();
if (!LANGUAGES[lang])
throw new Error('Language not supported: ' + lang);
var getArgs = getArgsFactory(lang);
return {
tokenize: tokenize,
createServer: (port) => createServer(getArgs, port),
stream: (text) => stream(getArgs, text),
save: (filepath, text, callback) => save(getArgs, filepath, text, callback)
}
}
function save(getArgs, filepath, text, callback) {
var text_parts = tokenize(text);
var total = text_parts.length;
async.eachSeries(text_parts, function(part, cb) {
var index = text_parts.indexOf(part);
var headers = getHeader();
var args = getArgs(part, index, total);
var fullUrl = GOOGLE_TTS_URL + args;
var writeStream = fs.createWriteStream(filepath, {
flags: index > 0 ? 'a' : 'w'
});
request({
uri: fullUrl,
headers: headers,
method: 'GET'
})
.pipe(writeStream);
writeStream.on('finish', cb);
writeStream.on('error', cb);
}, callback);
}
function stream(getArgs, text) {
var text_parts = tokenize(text);
var total = text_parts.length;
return MultiStream(text_parts.map(function(part, index) {
var headers = getHeader();
var args = getArgs(part, index, total);
var fullUrl = GOOGLE_TTS_URL + args
return request({
uri: fullUrl,
headers: headers,
method: 'GET'
});
}));
}
function getHeader() {
var headers = {
"User-Agent": fakeUa()
};
//console.log('headers', headers);
return headers;
}
function getArgsFactory(lang){
return function (text, index, total) {
var textlen = text.length;
var encodedText = encodeURIComponent(text);
var language = lang || 'en';
return `?ie=UTF-8&tl=${language}&q=${encodedText}&total=${total}&idx=${index}&client=tw-ob&textlen=${textlen}`
}
}
function tokenize(text) {
var text_parts = [];
if (!text)
throw new Error('No text to speak');
var punc = '¡!()[]¶;|°•—«»≤≥«»‹›\n ';
var punc_list = punc.split('').map(function(char) {
return escapeStringRegexp(char);
});
var pattern = punc_list.join('|');
var parts = text.split(new RegExp(pattern));
parts = parts.filter(p => p.length > 0);
var output = [];
var i = 0;
for (let p of parts) {
if (!output[i]) {
output[i] = '';
}
if (output[i].length + p.length < MAX_CHARS) {
output[i] += ' ' + p;
} else {
i++;
output[i] = p;
}
}
output[0] = output[0].substr(1);
return output;
}
function createServer(getArgs, port) {
var http = require("http");
var url = require('url');
var server = http.createServer(function(req, res) {
var queryData = url.parse(req.url, true).query;
var argsCallback = getArgs;
if (queryData && queryData.lang && LANGUAGES[queryData.lang]) {
argsCallback = getArgsFactory(queryData.lang);
}
if (queryData && queryData.text) {
res.writeHead(200, {'Content-Type': 'audio/mpeg'});
stream(argsCallback, queryData.text).pipe(res);
} else {
console.log(req.headers);
res.writeHead(200, {'Content-Type': 'application/json'});
res.end(JSON.stringify({
code: -1,
message: `Missing text. Please try: ${req.headers.host}?text=your+text`
}))
}
});
server.listen(port);
console.log("Text-to-Speech Server running on " + port);
}
module.exports = Text2Speech;
================================================
FILE: Zimbot/index.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//━━━━━━━━━━━━━━━━━━━━━━━━
//
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require('axios')
const _math = require('mathjs')
const _url = require('url')
const request = require('request');
const randomarray = async (array) => {
return array[Math.floor(Math.random() * array.length)]
}
exports.rexdl = async (query) => {
return new Promise((resolve) => {
axios.get('https://rexdl.com/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const jenis = [];
const date = [];
const desc = [];
const link = [];
const thumb = [];
const result = [];
$('div > div.post-content').each(function(a, b) {
judul.push($(b).find('h2.post-title > a').attr('title'))
jenis.push($(b).find('p.post-category').text())
date.push($(b).find('p.post-date').text())
desc.push($(b).find('div.entry.excerpt').text())
link.push($(b).find('h2.post-title > a').attr('href'))
})
$('div > div.post-thumbnail > a > img').each(function(a, b) {
thumb.push($(b).attr('data-src'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
creator: 'Fajar Ihsana',
judul: judul[i],
kategori: jenis[i],
upload_date: date[i],
deskripsi: desc[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
})
}
exports.rexdldown = async (link) => {
return new Promise((resolve) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const url = [];
const link_name = [];
const judul = $('#page > div > div > div > section > div:nth-child(2) > article > div > h1.post-title').text();
const plink = $('#page > div > div > div > section > div:nth-child(2) > center:nth-child(3) > h2 > span > a').attr('href')
axios.get(plink)
.then(({
data
}) => {
const $$ = cheerio.load(data)
$$('#dlbox > ul.dl > a > li > span').each(function(a, b) {
deta = $$(b).text();
link_name.push(deta)
})
$$('#dlbox > ul.dl > a').each(function(a, b) {
url.push($$(b).attr('href'))
})
for (let i = 0; i < link_name.length; i++) {
link.push({
link_name: link_name[i],
url: url[i]
})
}
resolve({
creator: 'Fajar Ihsana',
judul: judul,
update_date: $$('#dlbox > ul.dl-list > li.dl-update > span:nth-child(2)').text(),
version: $$('#dlbox > ul.dl-list > li.dl-version > span:nth-child(2)').text(),
size: $$('#dlbox > ul.dl-list > li.dl-size > span:nth-child(2)').text(),
download: link
})
})
})
})
}
exports.merdekanews = async () => {
return new Promise((resolve) => {
axios.get('https://www.merdeka.com/peristiwa/')
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const upload = [];
const link = [];
const thumb = [];
const result = [];
$('#mdk-content-center > div.inner-content > ul > li > div').each(function(a, b) {
deta = $(b).find('h3 > a').text();
judul.push(deta)
link.push('https://www.merdeka.com' + $(b).find('h3 > a').attr('href'))
upload.push($(b).find('div > span').text())
thumb.push($(b).find('div > a > img').attr('src'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
judul: judul[i],
upload_date: upload[i],
link: link[i],
thumb: thumb[i]
})
}
resolve(result)
})
})
}
exports.metronews = async () => {
return new Promise((resolve) => {
axios.get('https://www.metrotvnews.com/news')
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const desc = [];
const link = [];
const thumb = [];
const tag = [];
const result = [];
$('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > h3 > a').each(function(a, b) {
judul.push($(b).attr('title'))
})
$('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > p').each(function(a, b) {
deta = $(b).text();
desc.push(deta)
})
$('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > h3 > a').each(function(a, b) {
link.push('https://www.metrotvnews.com' + $(b).attr('href'))
})
$('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > img').each(function(a, b) {
thumb.push($(b).attr('src').replace('w=300', 'w=720'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
judul: judul[i],
link: link[i],
thumb: thumb[i],
deskripsi: desc[i]
})
}
resolve(result)
})
})
}
exports.asupanfilm = async (query) => {
return new Promise((resolve) => {
axios.get(`https://asupanfilm.link/?search=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const desc = [];
const thumb = [];
const link = [];
const result = [];
$('body > div > div > div.card-body.p-2 > ul > li > div > div > h6 > a').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('body > div > div > div.card-body.p-2 > ul > li > div > div').each(function(a, b) {
deta = $(b).text()
desc.push(deta.split(' ')[2])
})
$('body > div > div > div.card-body.p-2 > ul > li > div > img').each(function(a, b) {
thumb.push($(b).attr('src').split('UX67_CR0,0,67,98_AL_')[0])
})
$('body > div > div > div.card-body.p-2 > ul > li > div > div > h6 > a').each(function(a, b) {
link.push('https://asupanfilm.link/' + $(b).attr('href'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
judul: judul[i],
deskripsi: desc[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
})
}
exports.asupanfilminfo = async (link) => {
return new Promise((resolve) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const info = {
judul: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(1)').text(),
thumb: $('body > div > div.card.mb-3 > div.card-footer > a').attr('href'),
alurcerita_imdb: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(2)').text().split(' Alur Cerita IMDb: ')[1],
alurcerita_tmdb: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(3)').text().split(' Alur Cerita TMDb: ')[1],
direksi: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(4)').text().split(' Direksi: ')[1],
pemeran: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(5)').text().split(' Pemeran: ')[1],
kategori: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(6)').text().split(' Kategori: ')[1],
negara: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(7)').text().split(' Negara: ')[1],
tahun_rilis: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(8)').text().split(' Tahun Rilis: ')[1],
durasi: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(9)').text().split(' Durasi: ')[1],
skor: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(10)').text().split(' Skor: ')[1],
kualitas: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(11)').text().split(' Kualitas: ')[1],
jenis: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(12)').text().split(' Jenis: ')[1]
}
resolve(info)
})
})
}
exports.stickersearch = async (query) => {
return new Promise((resolve) => {
axios.get(`https://getstickerpack.com/stickers?query=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
$('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) {
link.push($(b).attr('href'))
})
rand = link[Math.floor(Math.random() * link.length)]
axios.get(rand)
.then(({
data
}) => {
const $$ = cheerio.load(data)
const url = [];
$$('#stickerPack > div > div.row > div > img').each(function(a, b) {
url.push($$(b).attr('src').split('&d=')[0])
})
resolve({
creator: 'Fajar Ihsana',
title: $$('#intro > div > div > h1').text(),
author: $$('#intro > div > div > h5 > a').text(),
author_link: $$('#intro > div > div > h5 > a').attr('href'),
sticker: url
})
})
})
})
}
exports.randomtt = async (query) => {
return new Promise((resolve, reject) => {
axios.get('https://brainans.com/search?query=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const luser = $('#search-container > div:nth-child(1) > div.content__text > a').attr('href')
axios.get('https://brainans.com/' + luser)
.then(({
data
}) => {
const $$ = cheerio.load(data)
vlink = [];
$$('#videos_container > div > div.content__list.grid.infinite_scroll.cards > div > div > a').each(function(a, b) {
vlink.push('https://brainans.com/' + $$(b).attr('href'))
})
randomarray(vlink).then(res => {
axios.get(res)
.then(({
data
}) => {
const $$$ = cheerio.load(data)
resolve({
username: $$$('#card-page > div > div.row > div > div > div > div > div.main__user-desc.align-self-center.ml-2 > a').text(),
caption: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__list').text(),
like_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div > div:nth-child(1) > span').text(),
comment_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(2) > span').text(),
share_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(3) > span').text(),
videourl: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__image-container > div > video').attr('src')
})
})
})
})
})
})
}
exports.trendtwit = (country) => {
return new Promise((resolve, reject) => {
axios.get(`https://getdaytrends.com/${country}/`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hastag = [];
const tweet = [];
const result = [];
$('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr> td.main > a').each(function(a, b) {
deta = $(b).text()
hastag.push(deta)
})
$('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr > td.main > div > span').each(function(a, b) {
deta = $(b).text()
tweet.push(deta)
})
num = 1
for (let i = 0; i < hastag.length; i++) {
result.push({
rank: num,
hastag: hastag[i],
tweet: tweet[i]
})
num += 1
}
resolve({
country: country,
result: result
})
})
.catch(reject)
})
}
exports.pinterest = async (querry) => {
return new Promise(async (resolve, reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie": "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if (v == undefined) return
hasil.push(v.replace(/236/g, '736'))
})
hasil.shift();
resolve(hasil)
})
})
}
exports.zerochan = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://www.zerochan.net/search?q=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const result = [];
const id = [];
$('#thumbs2 > li > a > img').each(function(a, b) {
if (!$(b).attr('alt').startsWith('https://static.zerochan.net/')) {
judul.push($(b).attr('alt'))
}
})
$('#thumbs2 > li > a').each(function(a, b) {
id.push($(b).attr('href'))
})
for (let i = 0; i < judul.length; i++) {
result.push('https://s1.zerochan.net/' + judul[i].replace(/\ /g, '.') + '.600.' + id[i].split('/')[1] + '.jpg')
}
resolve({
creator: 'Fajar Ihsana',
result: result
})
})
.catch(reject)
})
}
exports.happymoddl = (link) => {
return new Promise((resolve, reject) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const jlink = [];
const result = [];
const title = $('body > div > div.container-left > section:nth-child(1) > div > h1').text()
const info = $('body > div > div.container-left > section:nth-child(1) > div > ul').text()
$('body > div.container-row.clearfix.container-wrap.pdt-font-container > div.container-left > section:nth-child(1) > div > div:nth-child(3) > div > p > a').each(function(a, b) {
deta = $(b).text();
jlink.push(deta)
if ($(b).attr('href').startsWith('/')) {
link.push('https://happymod.com' + $(b).attr('href'))
} else {
link.push($(b).attr('href'))
}
})
for (let i = 0; i < link.length; i++) {
result.push({
title: jlink[i],
dl_link: link[i]
})
}
console.log(link)
resolve({
creator: 'Fajar Ihsana',
title: title,
info: info.replace(/\t|- /g, ''),
download: link
})
})
.catch(reject)
})
}
exports.goredl = async (link) => {
return new Promise(async (resolve, reject) => {
axios.get(link)
.then(({
data
}) => {
const $$ = cheerio.load(data)
const format = {
judul: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
views: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
comment: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
link: $$('video > source').attr('src')
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.chara = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/characters/all?name=${query}&sort=likes&order=desc`)
.then((data) => {
const $ = cheerio.load(data.data)
const linkp = $('#siteContainer > table > tbody > tr:nth-child(1) > td.tableCharInfo > a').attr('href')
axios.get('https://www.anime-planet.com' + linkp)
.then((data) => {
//console.log(data.data)
const $$ = cheerio.load(data.data)
resolve({
nama: $$('#siteContainer > h1').text(),
gender: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(1)').text().split('\nGender: ')[1],
warna_rambut: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(2)').text().split('\nHair Color: ')[1],
warna_mata: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(1) > div').text().split('\n')[1],
gol_darah: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(2) > div').text().split('\n')[1],
birthday: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(3) > div').text().split('\n')[1],
description: $$('#siteContainer > section:nth-child(11) > div > div > div > div:nth-child(1) > p').text()
})
})
})
.catch(reject)
})
}
exports.anime = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const result = [];
const judul = [];
const link = [];
const thumb = [];
$('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
link.push('https://www.anime-planet.com' + $(b).attr('href'))
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
judul: judul[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.manga = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const result = [];
const judul = [];
const link = [];
const thumb = [];
$('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
link.push('https://www.anime-planet.com' + $(b).attr('href'))
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
judul: judul[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.job = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.jobstreet.co.id/id/job-search/${query}-jobs/`)
.then((data) => {
//console.log(data.data)
const $ = cheerio.load(data.data)
const job = [];
const perusahaan = [];
const daerah = [];
const format = [];
const link = [];
const upload = [];
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a > div').each(function(a, b) {
deta = $(b).text();
job.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > span').each(function(a, b) {
deta = $(b).text();
perusahaan.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > span > span').each(function(a, b) {
deta = $(b).text();
daerah.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a').each(function(a, b) {
link.push($(b).attr('href'))
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div.sx2jih0.zcydq852.zcydq842.zcydq872.zcydq862.zcydq82a.zcydq832.zcydq8d2.zcydq8cq > div.sx2jih0.zcydq832.zcydq8cq.zcydq8c6.zcydq882 > time > span').each(function(a, b) {
deta = $(b).text();
upload.push(deta)
})
for (let i = 0; i < job.length; i++) {
format.push({
job: job[i],
perusahaan: perusahaan[i],
daerah: daerah[i],
upload: upload[i],
link_Detail: 'https://www.jobstreet.co.id' + link[i]
})
}
resolve(format)
})
.catch(reject)
})
}
exports.anoboys = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://anoboy.media/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const format = [];
const link = [];
const judul = [];
const thumb = [];
const uptime = [];
$('body > div.wrap > div.container > div.column-content > a > div > div.amvj > h3').each(function(a, b) {
jud = $(b).text();
judul.push(jud)
})
$('body > div.wrap > div.container > div.column-content > a > div > div.jamup').each(function(c, d) {
upt = $(d).text();
uptime.push(upt)
})
$('body > div.wrap > div.container > div.column-content > a > div > amp-img').each(function(e, f) {
thumb.push($(f).attr('src'))
})
$('body > div.wrap > div.container > div.column-content > a').each(function(g, h) {
link.push($(h).attr('href'))
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: judul[i],
thumb: thumb[i],
link: link[i]
})
}
const result = {
status: data.status,
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.anoboydl = (query) => {
return new Promise((resolve, reject) => {
axios.get(query)
.then(({
data
}) => {
const $ = cheerio.load(data)
resolve({
judul: $('body > div.wrap > div.container > div.pagetitle > h1').text(),
uptime: $('body > div.wrap > div.container > div.pagetitle > div > div > span > time').text(),
direct_link: $('#tontonin > source').attr('src'),
mforu: {
SD: $('#colomb > p > span:nth-child(1) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(1) > a:nth-child(5)').attr('href')
},
zippy: {
SD: $('#colomb > p > span:nth-child(3) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(3) > a:nth-child(5)').attr('href')
},
mirror: {
SD: $('#colomb > p > span:nth-child(5) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(5) > a:nth-child(5)').attr('href')
}
})
})
.catch(reject)
})
}
exports.film = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`http://167.99.71.200/?s=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const judul = [];
const genre = [];
const thumb = [];
const link = [];
const format = [];
$('div > div.item-article > header > h2 > a').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('div > div.item-article > header > div.gmr-movie-on').each(function(a, b) {
deta = $(b).text();
genre.push(deta)
})
$('div > div.content-thumbnail.text-center > a > img').each(function(a, b) {
thumb.push($(b).attr('src'))
})
$('div > div.item-article > header > div.gmr-watch-movie > a').each(function(a, b) {
link.push($(b).attr('href'))
})
for (let i = 0; i < judul.length; i++) {
format.push({
judul: judul[i],
genre: genre[i],
thumb: thumb[i],
link_nonton: link[i]
})
}
if (format == '') {
resolve({
status: 'error'
})
} else {
resolve(format)
}
})
.catch(reject)
})
}
exports.webtoons = async (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const judul = [];
const genre = [];
const author = [];
const link = [];
const likes = [];
const format = [];
$('#content > div > ul > li > a > div > p.subj').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('div > ul > li > a > span').each(function(a, b) {
deta = $(b).text();
genre.push(deta)
})
$('div > ul > li > a > div > p.author').each(function(a, b) {
deta = $(b).text();
author.push(deta)
})
$('div > ul > li > a > div > p.grade_area > em').each(function(a, b) {
deta = $(b).text();
likes.push(deta)
})
$('#content > div > ul > li > a').each(function(a, b) {
link.push($(b).attr('href'))
})
for (let i = 0; i < judul.length; i++) {
format.push({
judul: judul[i],
genre: genre[i],
author: author[i],
likes: likes[i],
link: 'https://www.webtoons.com' + link[i]
})
}
if (likes == '') {
resolve({
status: `${query} tidak dapat ditemukan/error`
})
} else {
resolve(format)
}
})
.catch(reject)
})
}
exports.soundcloud = async (link) => {
return new Promise((resolve, reject) => {
const options = {
method: 'POST',
url: "https://www.klickaud.co/download.php",
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
formData: {
'value': link,
'2311a6d881b099dc3820600739d52e64a1e6dcfe55097b5c7c649088c4e50c37': '710c08f2ba36bd969d1cbc68f59797421fcf90ca7cd398f78d67dfd8c3e554e3'
}
};
request(options, async function(error, response, body) {
console.log(body)
if (error) throw new Error(error);
const $ = cheerio.load(body)
resolve({
judul: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(2)').text(),
download_count: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(3)').text(),
thumb: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(1) > img').attr('src'),
link: $('#dlMP3').attr('onclick').split(`downloadFile('`)[1].split(`',`)[0]
});
});
})
}
exports.igdl = async (link) => {
return new Promise((resolve, reject) => {
const options = {
method: 'POST',
url: "https://downloadgram.org/#downloadhere",
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
formData: {
url: link,
submit: ''
}
};
request(options, async function(error, response, body) {
if (error) throw new Error(error);
const $ = cheerio.load(body)
const result = [];
$('#downloadBox > a').each(function(a, b) {
result.push($(b).attr('href'))
})
resolve(result);
});
})
}
exports.igstalk = async (username) => {
return new Promise(async (resolve, reject) => {
let {
data
} = await axios('https://www.instagram.com/' + username + '/?__a=1', {
'method': 'GET',
'headers': {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
'cookie': 'isi sendiri cokie igeh'
}
})
let user = data.graphql.user
let json = {
creator: '"hardianto02_',
status: 'ok',
code: 200,
username: user.username,
fullname: user.full_name,
verified: user.is_verified,
video_count_reel: user.highlight_reel_count,
followers: user.edge_followed_by.count,
follow: user.edge_follow.count,
is_bussines: user.is_business_account,
is_professional: user.is_professional_account,
category: user.category_name,
thumbnail: user.profile_pic_url_hd,
bio: user.biography,
info_account: data.seo_category_infos
}
resolve(json)
})
}
exports.gempa = async () => {
return new Promise(async (resolve, reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg')
.then(({
data
}) => {
const $ = cheerio.load(data)
const drasa = [];
$('table > tbody > tr:nth-child(1) > td:nth-child(6) > span').get().map((rest) => {
dir = $(rest).text();
drasa.push(dir.replace('\t', ' '))
})
teks = ''
for (let i = 0; i < drasa.length; i++) {
teks += drasa[i] + '\n'
}
const rasa = teks
const format = {
imagemap: $('div.modal-body > div > div:nth-child(1) > img').attr('src'),
magnitude: $('table > tbody > tr:nth-child(1) > td:nth-child(4)').text(),
kedalaman: $('table > tbody > tr:nth-child(1) > td:nth-child(5)').text(),
wilayah: $('table > tbody > tr:nth-child(1) > td:nth-child(6) > a').text(),
waktu: $('table > tbody > tr:nth-child(1) > td:nth-child(2)').text(),
lintang_bujur: $('table > tbody > tr:nth-child(1) > td:nth-child(3)').text(),
dirasakan: rasa
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.cariresep = async (query) => {
return new Promise(async (resolve, reject) => {
axios.get('https://resepkoki.id/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const judul = [];
const upload_date = [];
const format = [];
const thumb = [];
$('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-media > a').each(function(a, b) {
link.push($(b).attr('href'))
})
$('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-content > header > h3 > a').each(function(c, d) {
jud = $(d).text();
judul.push(jud)
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: judul[i],
link: link[i]
})
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.bacaresep = async (query) => {
return new Promise(async (resolve, reject) => {
axios.get(query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const abahan = [];
const atakaran = [];
const atahap = [];
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-name').each(function(a, b) {
bh = $(b).text();
abahan.push(bh)
})
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-amount').each(function(c, d) {
uk = $(d).text();
atakaran.push(uk)
})
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-content > div.single-steps > table > tbody > tr > td.single-step-description > div > p').each(function(e, f) {
th = $(f).text();
atahap.push(th)
})
const judul = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-title.title-hide-in-desktop > h1').text();
const waktu = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-cooking-time > span').text();
const hasil = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-serves > span').text().split(': ')[1]
const level = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-difficulty > span').text().split(': ')[1]
const thumb = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-main-media > img').attr('src')
tbahan = 'bahan\n'
for (let i = 0; i < abahan.length; i++) {
tbahan += abahan[i] + ' ' + atakaran[i] + '\n'
}
ttahap = 'tahap\n'
for (let i = 0; i < atahap.length; i++) {
ttahap += atahap[i] + '\n\n'
}
const tahap = ttahap
const bahan = tbahan
const result = {
creator: 'Fajar Ihsana',
data: {
judul: judul,
waktu_masak: waktu,
hasil: hasil,
tingkat_kesulitan: level,
thumb: thumb,
bahan: bahan.split('bahan\n')[1],
langkah_langkah: tahap.split('tahap\n')[1]
}
}
resolve(result)
})
.catch(reject)
})
}
exports.searchgore = async (query) => {
return new Promise(async (resolve, reject) => {
axios.get('https://seegore.com/?s=' + query).then(dataa => {
const $$$ = cheerio.load(dataa)
pagina = $$$('#main > div.container.main-container > div > div.bb-col.col-content > div > div > div > div > nav > ul > li:nth-child(4) > a').text();
rand = Math.floor(Math.random() * pagina) + 1
if (rand === 1) {
slink = 'https://seegore.com/?s=' + query
} else {
slink = `https://seegore.com/page/${rand}/?s=${query}`
}
axios.get(slink)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const judul = [];
const uploader = [];
const format = [];
const thumb = [];
$('#post-items > li > article > div.content > header > h2 > a').each(function(a, b) {
link.push($(b).attr('href'))
})
$('#post-items > li > article > div.content > header > h2 > a').each(function(c, d) {
jud = $(d).text();
judul.push(jud)
})
$('#post-items > li > article > div.content > header > div > div.bb-cat-links > a').each(function(e, f) {
upl = $(f).text();
uploader.push(upl)
})
$('#post-items > li > article > div.post-thumbnail > a > div > img').each(function(g, h) {
thumb.push($(h).attr('src'))
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: judul[i],
uploader: uploader[i],
thumb: thumb[i],
link: link[i]
})
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
})
}
exports.randomgore = async () => {
return new Promise(async (resolve, reject) => {
rand = Math.floor(Math.random() * 218) + 1
randvid = Math.floor(Math.random() * 16) + 1
if (rand === 1) {
slink = 'https://seegore.com/gore/'
} else {
slink = `https://seegore.com/gore/page/${rand}/`
}
axios.get(slink)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
const linkp = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a`).attr('href')
const thumbb = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a > div > img`).attr('src')
axios.get(linkp)
.then(({
data
}) => {
const $$ = cheerio.load(data)
const format = {
judul: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
views: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
comment: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text() == '' ? 'Tidak ada komentar' : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
thumb: thumbb,
link: $$('video > source').attr('src')
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
})
}
exports.textmakervid = async (text1, style) => {
if (style == 'poly') {
var tstyle = 0
} else if (style == 'bold') {
var tstyle = 1
} else if (style == 'glowing') {
var tstyle = 2
} else if (style == 'colorful') {
var tstyle = 3
} else if (style == 'army') {
var tstyle = 4
} else if (style == 'retro') {
var tstyle = 5
}
return new Promise((resolve, reject) => {
const options = {
method: 'POST',
url: "https://photooxy.com/other-design/make-a-video-that-spells-your-name-237.html",
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
formData: {
optionNumber_0: tstyle,
text_1: text1,
login: 'OK'
}
};
request(options, async function(error, response, body) {
if (error) throw new Error(error);
const $ = cheerio.load(body)
const result = {
url: $('div.btn-group > a').attr('href')
}
resolve(result);
});
})
}
exports.apkmirror = async (query) => {
return new Promise((resolve, reject) => {
axios.get('https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const nama = [];
const developer = [];
const lupdate = [];
const size = [];
const down = [];
const version = [];
const link = [];
const format = [];
$('#content > div > div > div.appRow > div > div > div > h5 > a').each(function(a, b) {
nem = $(b).text();
nama.push(nem)
})
$('#content > div > div > div.appRow > div > div > div > a').each(function(c, d) {
dev = $(d).text();
developer.push(dev)
})
$('#content > div > div > div.appRow > div > div > div > div.downloadIconPositioning > a').each(function(e, f) {
link.push('https://www.apkmirror.com' + $(f).attr('href'))
})
$('#content > div > div > div.infoSlide > p > span.infoslide-value').each(function(g, h) {
data = $(h).text();
if (data.match('MB')) {
size.push(data)
} else if (data.match('UTC')) {
lupdate.push(data)
} else if (!isNaN(data) || data.match(',')) {
down.push(data)
} else {
version.push(data)
}
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: nama[i],
dev: developer[i],
size: size[i],
version: version[i],
uploaded_on: lupdate[i],
download_count: down[i],
link: link[i]
})
}
const result = {
creator: 'Hanya Orang Biasa',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.sfiledown = async (link) => {
return new Promise((resolve, reject) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const nama = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(2) > b').text();
const size = $('#download').text().split('Download File')
const desc = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(7) > center > h1').text();
const type = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(3)').text();
const upload = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(5)').text();
const uploader = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(2)').text();
const download = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(6)').text();
const link = $('#download').attr('href')
other = link.split('/')[7].split('&is')[0]
const format = {
judul: nama + other.substr(other.length - 6).split('.')[1],
size: size[1].split('(')[1].split(')')[0],
type: type,
mime: other.substr(other.length - 6).split('.')[1],
desc: desc,
uploader: uploader,
uploaded: upload.split('\n - Uploaded: ')[1],
download_count: download.split(' - Downloads: ')[1],
link: link
}
const result = {
creator: 'Hanya Orang Biasa',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.zippydl = async (link) => {
return new Promise(async (resolve, reject) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const nama = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(4)').text();
const size = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(7)').text();
const upload = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(10)').text();
const getlink = async (u) => {
console.log('⏳ ' + `Get Page From : ${u}`)
const zippy = await axios({
method: 'GET',
url: u
}).then(res => res.data).catch(err => false)
console.log('Done')
const $ = cheerio.load(zippy)
if (!$('#dlbutton').length) {
return {
error: true,
message: $('#lrbox>div').first().text().trim()
}
}
console.log('⏳ ' + 'Fetch Link Download...')
const url = _url.parse($('.flagen').attr('href'), true)
const urlori = _url.parse(u)
const key = url.query['key']
let time;
let dlurl;
try {
time = /var b = ([0-9]+);$/gm.exec($('#dlbutton').next().html())[1]
dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (2 + 2 * 2 + parseInt(time)) + '3/DOWNLOAD'
} catch (error) {
time = _math.evaluate(/ \+ \((.*)\) \+ /gm.exec($('#dlbutton').next().html())[1])
dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (time) + '/DOWNLOAD'
}
console.log('Done')
return dlurl
}
getlink(link).then(res => {
//_(timet)
var result = {
creator: 'Hanya Orang Biasa',
data: {
Judul: nama,
size: size,
uploaded: upload,
link: res
}
}
resolve(result)
})
})
.catch(reject)
})
}
exports.android1 = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://an1.com/tags/MOD/?story=' + query + '&do=search&subaction=search')
.then(({
data
}) => {
const $ = cheerio.load(data)
const nama = [];
const link = [];
const rating = [];
const thumb = [];
const developer = [];
const format = [];
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a > span').each(function(a, b) {
nem = $(b).text();
nama.push(nem)
})
$('div > ul > li.current-rating').each(function(c, d) {
rat = $(d).text();
rating.push(rat)
})
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.developer.xsmf.muted').each(function(e, f) {
dev = $(f).text();
developer.push(dev)
})
$('body > div.page > div > div > div.app_list > div > div > div.img > img').each(function(g, h) {
thumb.push($(h).attr('src'))
})
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a').each(function(i, j) {
link.push($(j).attr('href'))
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: nama[i],
dev: developer[i],
rating: rating[i],
thumb: thumb[i],
link: link[i]
})
}
const result = {
creator: 'Hanya Orang Biasa',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.apkmody = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://apkmody.io/?s=' + query)
.then(({
data
}) => {
//console.log(data)
const $ = cheerio.load(data)
const nama = [];
const link = [];
const mod = [];
const thumb = [];
const format = [];
$('#primary > section:nth-child(3) > div > div > div > article > a > div > div > div > h2').each(function(a, b) {
nem = $(b).text();
nama.push(nem)
})
$('#primary > section:nth-child(3) > div > div > div > article > a > div > div > p').each(function(c, d) {
modd = $(d).text();
mod.push(modd.split('\n')[1])
})
$('#primary > section:nth-child(3) > div > div > div > article > a > div > img').each(function(e, f) {
thumb.push($(f).attr('src'))
})
$('#primary > section:nth-child(3) > div > div > div > article > a').each(function(g, h) {
link.push($(h).attr('href'))
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: nama[i],
infomod: mod[i],
thumb: thumb[i],
link: link[i]
})
}
const result = {
creator: 'Hanya Orang Biasa',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.happymod = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://www.happymod.com/search.html?q=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const nama = [];
const link = [];
const rating = [];
const thumb = [];
const format = [];
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > h3 > a').each(function(a, b) {
nem = $(b).text();
nama.push(nem)
link.push('https://happymod.com' + $(b).attr('href'))
})
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > div.clearfix > span').each(function(c, d) {
rat = $(d).text();
rating.push(rat)
})
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > a > img').each(function(e, f) {
thumb.push($(f).attr('data-original'))
})
for (let i = 0; i < link.length; i++) {
format.push({
judul: nama[i],
thumb: thumb[i],
rating: rating[i],
link: link[i]
})
}
const result = {
creator: 'Hanya Orang Biasa',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.ghuser = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://github.com/search?q=' + query + '&type=users')
.then(({
data
}) => {
const $ = cheerio.load(data)
const username = [];
const link = [];
const result = [];
const thumb = [];
$('#user_search_results > div > div > div.flex-auto > div > div.f4.text-normal > a.color-text-secondary').each(function(a, b) {
link.push('https://github.com/' + $(b).attr('href'))
usr = $(b).text();
username.push(usr)
})
$('#user_search_results > div > div > div.flex-shrink-0.mr-2 > a > img').each(function(c, d) {
thumb.push($(d).attr('src').replace('s=40&', ''))
})
for (let i = 0; i < link.length; i++) {
result.push({
name: username[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.ghfollower = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://github.com/' + query + '?tab=followers')
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
$('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-9.mb-4.mb-md-0 > div > div > div > div.d-table-cell.col-9.v-align-top.pr-3 > a').each(function(a, b) {
link.push('https://github.com/' + $(b).attr('href'))
username.push($(b).attr('href').split('/')[1])
})
for (let i = 0; i < link.length; i++) {
result.push({
username: username[i],
link: link[i]
})
}
const hasil = {
username: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.vcard-names-container.float-left.js-profile-editable-names.col-12.py-3.js-sticky.js-user-profile-sticky-fields > h1 > span.p-nickname.vcard-username.d-block').text().split('\n')[1].replace(' ', ''),
followers: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.d-flex.flex-column > div.js-profile-editable-area.d-flex.flex-column.d-md-block > div.flex-order-1.flex-md-order-none.mt-2.mt-md-0 > div > a:nth-child(1) > span').text(),
avatar: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.position-relative.d-inline-block.col-2.col-md-12.mr-3.mr-md-0.flex-shrink-0 > a > img').attr('src'),
listfollowers: result
}
resolve(hasil)
})
.catch(reject)
})
}
exports.ghfollowing = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://github.com/' + query + '?tab=following')
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
$('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-9.mb-4.mb-md-0 > div > div > div > div.d-table-cell.col-9.v-align-top.pr-3 > a').each(function(a, b) {
link.push('https://github.com/' + $(b).attr('href'))
username.push($(b).attr('href').split('/')[1])
})
for (let i = 0; i < link.length; i++) {
result.push({
username: username[i],
link: link[i]
})
}
const hasil = {
username: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.vcard-names-container.float-left.js-profile-editable-names.col-12.py-3.js-sticky.js-user-profile-sticky-fields > h1 > span.p-nickname.vcard-username.d-block').text().split('\n')[1].replace(' ', ''),
following: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.d-flex.flex-column > div.js-profile-editable-area.d-flex.flex-column.d-md-block > div.flex-order-1.flex-md-order-none.mt-2.mt-md-0 > div > a:nth-child(1) > span').text(),
avatar: $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.position-relative.d-inline-block.col-2.col-md-12.mr-3.mr-md-0.flex-shrink-0 > a > img').attr('src'),
listfollowing: result
}
resolve(hasil)
})
.catch(reject)
})
}
exports.corona = async (country) => {
if (!country) return loghandler.noinput;
try {
const res = await axios.request(`https://www.worldometers.info/coronavirus/country/` + country, {
method: "GET",
headers: {
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
}
});
let result = {};
const $ = cheerio.load(res.data);
result.status = res.status
result.negara = $("div").find("h1").text().slice(3).split(/ /g)[0];
result.total_kasus = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(0).text() + " total";
result.total_kematian = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(1).text() + " total";
result.total_sembuh = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(2).text() + " total";
result.informasi = $("div.content-inner > div").eq(1).text();
result.informasi_lengkap = "https://www.worldometers.info/coronavirus/country/" + country;
if (result.negara == '') {
result.status = 'error'
}
return result;
} catch (error404) {
return "=> Error => " + error404;
}
};
exports.mangatoon = async (search) => {
if (!search) return "No Querry Input! Bakaa >\/\/<";
try {
const res = await axios.get(`https://mangatoon.mobi/en/search?word=${search}`, {
method: "GET",
headers: {
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
}
});
const hasil = [];
const $ = cheerio.load(res.data);
$('div.recommend-item').each(function(a, b) {
let comic_name = $(b).find('div.recommend-comics-title > span').text();
let comic_type = $(b).find('div.comics-type > span').text().slice(1).split(/ /g).join("");
let comic_url = $(b).find('a').attr('href');
let comic_thumb = $(b).find('img').attr('src');
const result = {
status: res.status,
creator: "@dehan_j1ng",
comic_name,
comic_type,
comic_url: 'https://mangatoon.mobi' + comic_url,
comic_thumb
};
hasil.push(result);
});
let filt = hasil.filter(v => v.comic_name !== undefined && v.comic_type !== undefined);
return filt;
} catch (eror404) {
return "=> Error =>" + eror404;
}
}
exports.palingmurah = async (produk) => {
if (!produk) {
return new TypeError("No Querry Input! Bakaaa >\/\/<")
}
try {
const res = await axios.get(`https://palingmurah.net/pencarian-produk/?term=` + produk)
const hasil = []
const $ = cheerio.load(res.data)
$('div.ui.card.wpj-card-style-2 ').each(function(a, b) {
let url = $(b).find('a.image').attr('href')
let img = $(b).find('img.my_image.lazyload').attr('data-src')
let title = $(b).find('a.list-header').text().trim()
let product_desc = $(b).find('div.description.visible-on-list').text().trim()
let price = $(b).find('div.flex-master.card-job-price.text-right.text-vertical-center').text().trim()
const result = {
status: res.status,
creator: "@dehan_j1ng",
product: title,
product_desc: product_desc,
product_image: img,
product_url: url,
price
}
hasil.push(result)
})
return hasil
} catch (error404) {
return new Error("=> Error =>" + error404)
}
}
exports.mediafire = (query) => {
return new Promise((resolve, reject) => {
axios.get(query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-btn-cont > div.dl-btn-labelWrap > div.promoDownloadName.notranslate > div').text();
const size = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(1) > span').text();
const upload_date = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(2) > span').text();
const link = $('#downloadButton').attr('href')
const hsil = {
judul: link.split('/')[5],
upload_date: upload_date,
size: size,
mime: link.split('/')[5].split('.')[1],
link: link
}
resolve(hsil)
})
.catch(reject)
})
}
exports.artinama = (query) => {
return new Promise((resolve, reject) => {
queryy = query.replace(/ /g, '+')
axios.get('https://www.primbon.com/arti_nama.php?nama1=' + query + '&proses=+Submit%21+')
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = $('#body').text();
const result2 = result.split('\n \n \n \n')[0]
const result4 = result2.split('ARTI NAMA')[1]
const result5 = result4.split('.\n\n')
const result6 = result5[0] + '\n\n' + result5[1]
resolve(result6)
})
.catch(reject)
})
}
exports.drakor = (query) => {
return new Promise((resolve, reject) => {
queryy = query.replace(/ /g, '+')
axios.get('https://drakorasia.net/?s=' + queryy + '&post_type=post')
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const link = [];
const judul = [];
const thumb = [];
$('#post > div > div.thumbnail > a').each(function(a, b) {
link.push($(b).attr('href'))
thumb.push($(b).find('img').attr('src'))
})
$('#post > div > div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').each(function(c, d) {
titel = $(d).text();
judul.push(titel)
})
for (let i = 0; i < link.length; i++) {
result.push({
judul: judul[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.wattpad = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://www.wattpad.com/search/' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const linkk = [];
const judull = [];
const thumb = [];
const dibaca = [];
const vote = [];
const bab = [];
$('ul.list-group > li.list-group-item').each(function(a, b) {
linkk.push('https://www.wattpad.com' + $(b).find('a').attr('href'))
thumb.push($(b).find('img').attr('src'))
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(1) > div.icon-container > div > span.stats-value').each(function(e, f) {
baca = $(f).text();
dibaca.push(baca)
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(2) > div.icon-container > div > span.stats-value').each(function(g, h) {
vot = $(h).text();
vote.push(vot)
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(3) > div.icon-container > div > span.stats-value').each(function(i, j) {
bb = $(j).text();
bab.push(bb)
})
$('div.story-card-data.hidden-xxs > div.story-info > div.title').each(function(c, d) {
titel = $(d).text();
judull.push(titel)
})
for (let i = 0; i < linkk.length; i++) {
if (!judull[i] == '') {
result.push({
judul: judull[i],
dibaca: dibaca[i],
divote: vote[i],
thumb: thumb[i],
link: linkk[i]
})
}
}
resolve(result)
})
.catch(reject)
})
}
exports.dewabatch = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://dewabatch.com/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const linkk = [];
const judull = [];
const thumb = [];
const rating = [];
$('div.thumb > a').each(function(a, b) {
linkk.push($(b).attr('href'))
judull.push($(b).attr('title'))
thumb.push($(b).find('img').attr('src').split('?resize')[0])
})
$('#content > div.postbody > div > div > ul > li > div.dtl > div.footer-content-post.fotdesktoppost > div.contentleft > span:nth-child(1) > rating > ratingval > ratingvalue').each(function(c, d) {
rate = $(d).text();
rating.push(rate.split(' ')[0])
})
for (let i = 0; i < linkk.length; i++) {
result.push({
judul: judull[i],
rating: rating[i],
thumb: thumb[i],
link: linkk[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.kiryu = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://kiryuu.id/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const linkk = [];
const judull = [];
const thumb = [];
const rating = [];
$('div.bsx > a').each(function(a, b) {
linkk.push($(b).attr('href'))
judull.push($(b).attr('title'))
thumb.push($(b).find('img').attr('src').split('?resize')[0])
})
$('div.rating > div.numscore').each(function(c, d) {
rate = $(d).text();
rating.push(rate)
})
for (let i = 0; i < linkk.length; i++) {
result.push({
judul: judull[i],
rating: rating[i],
thumb: thumb[i],
link: linkk[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.sfilesearch = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://sfile.mobi/search.php?q=' + query + '&search=Search')
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
const link = [];
const neme = [];
const size = [];
$('div.w3-card.white > div.list > a').each(function(a, b) {
link.push($(b).attr('href'))
})
$('div.w3-card.white > div.list > a').each(function(c, d) {
name = $(d).text();
neme.push(name)
})
$('div.w3-card.white > div.list').each(function(e, f) {
siz = $(f).text();
//sz = siz.
size.push(siz.split('(')[1])
})
for (let i = 0; i < link.length; i++) {
result.push({
nama: neme[i],
size: size[i].split(')')[0],
link: link[i]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.carigc = (nama) => {
return new Promise((resolve, reject) => {
axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search=' + nama + '&searchby=name')
.then(({
data
}) => {
const $ = cheerio.load(data);
const result = [];
const lnk = [];
const nm = [];
$('div.wa-chat-title-container').each(function(a, b) {
const limk = $(b).find('a').attr('href');
lnk.push(limk)
})
$('div.wa-chat-title-text').each(function(c, d) {
const name = $(d).text();
nm.push(name)
})
for (let i = 0; i < lnk.length; i++) {
result.push({
nama: nm[i].split('. ')[1],
link: lnk[i].split('?')[0]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.wikisearch = async (query) => {
const res = await axios.get(`https://id.m.wikipedia.org/w/index.php?search=${query}`)
const $ = cheerio.load(res.data)
const hasil = []
let wiki = $('#mf-section-0').find('p').text()
let thumb = $('#mf-section-0').find('div > div > a > img').attr('src')
thumb = thumb ? thumb : '//pngimg.com/uploads/wikipedia/wikipedia_PNG35.png'
thumb = 'https:' + thumb
let judul = $('h1#section_0').text()
hasil.push({
wiki,
thumb,
judul
})
return hasil
}
exports.devianart = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://www.deviantart.com/search?q=' + query)
.then(({
data
}) => {
const $$ = cheerio.load(data)
no = ''
$$('#root > div.hs1JI > div > div._3WsM9 > div > div > div:nth-child(3) > div > div > div:nth-child(1) > div > div:nth-child(1) > div > section > a').each(function(c, d) {
no = $$(d).attr('href')
})
axios.get(no)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
$('#root > main > div > div._2QovI > div._2rKEX._17aAh._1bdC8 > div > div._2HK_1 > div._1lkTS > div > img').each(function(a, b) {
result.push($(b).attr('src'))
})
resolve(result)
})
})
.catch(reject)
})
}
exports.konachan = (chara) => {
return new Promise((resolve, reject) => {
let text = chara.replace(' ', '_')
axios.get('https://konachan.net/post?tags=' + text + '+')
.then(({
data
}) => {
const $$ = cheerio.load(data)
const no = [];
$$('div.pagination > a').each(function(c, d) {
no.push($$(d).text())
})
let mat = Math.floor(Math.random() * no.length)
axios.get('https://konachan.net/post?page=' + mat + '&tags=' + text + '+')
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
$('#post-list > div.content > div:nth-child(4) > ul > li > a.directlink.largeimg').each(function(a, b) {
result.push($(b).attr('href'))
})
resolve(result)
})
})
.catch(reject)
})
}
exports.wallpapercave = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://wallpapercave.com/search?q=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
$('div.imgrow > a').each(function(a, b) {
if (!$(b).find('img').attr('src').includes('.gif')) {
result.push('https://wallpapercave.com/' + $(b).find('img').attr('src').replace('fuwp', 'uwp'))
}
})
resolve(result)
})
.catch(reject)
})
}
exports.wallpapercraft = (query) => {
return new Promise((resolve, reject) => {
axios.get('https://wallpaperscraft.com/search/?query=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
$('span.wallpapers__canvas').each(function(a, b) {
result.push($(b).find('img').attr('src'))
})
resolve(result)
})
.catch(reject)
})
}
exports.wallpaperhd = (chara) => {
return new Promise((resolve, reject) => {
axios.get('https://wall.alphacoders.com/search.php?search=' + chara + '&filter=4K+Ultra+HD')
.then(({
data
}) => {
const $ = cheerio.load(data)
const result = [];
$('div.boxgrid > a > picture').each(function(a, b) {
result.push($(b).find('img').attr('src').replace('thumbbig-', ''))
})
resolve(result)
})
.catch(reject)
})
}
================================================
FILE: Zimbot/index2.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮ZimBotInc SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF ZimBotInc SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃ZimBotInc SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃THANKS TO DIKA ARDNT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs');
const { spawn, exec } = require("child_process");
const yt = require("yt-search");
const FormData = require("form-data");
const got = require("got")
const print = (message) => {
return console.log(message)
}
async function ManggaToon(judul) {
try {
const link = await axios.get(`https://mangatoon.mobi/id/search?word=${judul}`)
const c = cheerio.load(link.data)
let id = c('#page-content').find('div.search-page > div > div.comics-result > div.recommended-wrap > div > div > a').attr('href') || 'undefined'
if(id === 'undefined') {
const link2 = await axios.get(`https://mangatoon.mobi/en/search?word=${judul}`)
const C = cheerio.load(link2.data)
let id2 = C('#page-content').find('div.search-page > div > div.comics-result > div.recommended-wrap > div > div:nth-child(1) > a').attr('href')
const data = await axios.get(`https://mangatoon.mobi${id2}`)
const $ = cheerio.load(data.data)
var judul = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-title-bg > span').text().trim()
var genre = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-tags-info > span').text().trim()
var author = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-author-name > span').text().trim()
var thumb = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-img > img.big-img').attr('src');
var LinkKe = $('#page-content').find('div.detail-wrap > div.detail-interact > a').attr('href')
var Link = `https://mangatoon.mobi${LinkKe}`
let Author = author.replace('Nama Author: ', '');
let hasil = {
judul, thumb, genre, Author, Link
}
return hasil
} else {
const data = await axios.get(`https://mangatoon.mobi${id}`)
const $ = cheerio.load(data.data)
var judul = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-title-bg > span').text().trim()
var genre = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-tags-info > span').text().trim()
var author = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-author-name > span').text().trim()
var thumb = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-img > img.big-img').attr('src');
var LinkKe = $('#page-content').find('div.detail-wrap > div.detail-interact > a').attr('href')
var Link = `https://mangatoon.mobi${LinkKe}`
let Author = author.replace('Nama Author: ', '');
let hasil = {
judul, thumb, genre, Author, Link
}
return hasil
}
} catch (err) {
return `Not Found 404`
}
}
async function emoji(emoticon) {
const emojii = encodeURI(`${emoticon}`)
const link = await axios.get(`https://emojipedia.org/${emojii}/`)
const $ = cheerio.load(link.data)
var apple = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(1) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var google = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(2) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var samsung = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(3) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var microsoft = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(4) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var whatsapp = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(5) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var twitter = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(6) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var facebook = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(7) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var jooxpixel = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(8) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var openmoji = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(9) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var emojidex = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(10) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var messager = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(11) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var LG = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(12) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var HTC = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(13) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var mozilla = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(14) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var softbank = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(15) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var docomo = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(16) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var KDDI = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(17) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
const result = {
apple: apple.replace('120', '240'),
google: google.replace('120', '240'),
samsung: samsung.replace('120', '240'),
microsoft: microsoft.replace('120', '240'),
whatsapp: whatsapp.replace('120', '240'),
twitter: twitter.replace('120', '240'),
facebook: facebook.replace('120', '240'),
jooxPixel: jooxpixel.replace('120', '240'),
openemoji: openmoji.replace('120', '240'),
emojidex: emojidex.replace('120', '240'),
messanger: messager.replace('120', '240'),
LG: LG.replace('120', '240'),
HTC: HTC.replace('120', '240'),
mozilla: mozilla.replace('120', '240'),
softbank: softbank.replace('120', '240'),
docomo: docomo.replace('120', '240'),
KDDI: KDDI.replace('120', '240')
}
return result
}
async function RandomCerpen() {
try{
const link = await axios.get(`http://cerpenmu.com/`)
const c = cheerio.load(link.data)
let kumpulan = []
c('#sidebar > div').each(function (real, ra) {
c(ra).find('ul > li').each(function (i, rayy) {
let random = c(rayy).find('a').attr('href')
kumpulan.push(random)
})
})
var acak = kumpulan[Math.floor(Math.random() * (kumpulan.length))]
let Otw = await axios.get(`${acak}`)
const C = cheerio.load(Otw.data)
let otw = []
C('#content > article > article').each(function (a, b) {
let random = C(b).find('h2 > a').attr('href')
otw.push(random)
})
var Acak = otw[Math.floor(Math.random() * (otw.length))]
let Link = await axios.get(`${Acak}`)
let $ = cheerio.load(Link.data)
let judul = $('#content').find('article > h1').text().trim()
let karangan = $('#content').find('article > a:nth-child(2)').text().trim()
let Isi = []
$('#content > article > p').each(function (wm, Ra) {
let isi = $(Ra).text().trim()
Isi.push(isi)
})
let cerita = []
for (let i of Isi) {
cerita += i
}
const data = {
status: 200,
author: 'RA BOT',
result: {
Judul: judul,
Penulis: karangan,
sumber: Acak,
cerita: cerita
}
}
return data
} catch (err) {
const res404 = {
status: 500,
author: 'RA BOT',
Pesan: 'Udah Ga work?:/ cp: 082149344210'
}
return res404
}
}
async function stickerSearch(querry) {
const link = await axios.get(`https://getstickerpack.com/stickers?query=${querry}`);
const $ = cheerio.load(link.data)
let sticker1 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > img').attr('src'),
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > span.title').text().trim(),
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > span.username').text().trim()
}
let sticker2 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > span.username').text().trim()
}
let sticker3 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > span.username').text().trim()
}
let sticker4 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > span.username').text().trim()
}
let sticker5 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > span.username').text().trim()
}
let sticker6 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > span.username').text().trim()
}
let sticker7 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > span.username').text().trim()
}
let sticker8 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > span.username').text().trim()
}
let sticker9 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > span.username').text().trim()
}
let sticker10 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > span.username').text().trim()
}
let sticker11 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > span.username').text().trim()
}
let sticker12 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > span.username').text().trim()
}
let stickerlop = [
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > img').attr('src')
]
let data = {
sticker: stickerlop, sticker1, sticker2, sticker3, sticker4, sticker5, sticker6, sticker7, sticker8, sticker9, sticker10, sticker11, sticker12
}
return data
}
async function RamalJadian(tanggal, bulan, tahun) {
if(isNaN(tanggal) && isNaN(bulan) && isNaN(tahun)) return `Tanggal bulan tahun harus berupa angka`
const link = await axios.get(`https://www.primbon.com/tanggal_jadian_pernikahan.php?tgl=${tanggal}&bln=${bulan}&thn=${tahun}&proses=+Submit%21+`)
const $ = cheerio.load(link.data)
let tanggall = $('#body').text().trim()
let a = tanggall.replace('MAKNA TANGGAL JADIAN, PERNIKAHAN', '').replace('Karakteristik:', '\nKarakteristik : ').replace('< Hitung Kembali', '')
return a
}
async function igDownloader(Link) {
const hasil = []
const Form = {
url: Link,
submit: ""
}
await axios(`https://downloadgram.org/`, {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1695343126.1621491858; _gid=GA1.2.28178724.1621491859; __gads=ID=8f9d3ef930e9a07b-2258e672bec80081:T=1621491859:RT=1621491859:S=ALNI_MbqLxhztDiYZttJFX2SkvYei6uGOw; __atuvc=3%7C20; __atuvs=60a6eb107a17dd75000; __atssc=google%3B2; _gat_gtag_UA_142480840_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin",
}).then(async res => {
const $ = cheerio.load(res.data)
let url = $('#downloadBox').find('a').attr('href');
await axios(Link, {
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "ig_did=08A3C465-7D43-4D8A-806A-88F98384E63B; ig_nrcb=1; mid=X_ipMwALAAFgQ7AftbrkhIDIdXJ8; fbm_124024574287414=base_domain=.instagram.com; shbid=17905; ds_user_id=14221286336; csrftoken=fXHAj5U3mcJihQEyVXfyCzcg46lHx7QD; sessionid=14221286336%3A5n4czHpQ0GRzlq%3A28; shbts=1621491639.7673564; rur=FTW"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(respon => {
const ch = cheerio.load(respon.data)
let title = ch('title').text().trim()
const result = {
author: "RA BOT",
result: {
link: url,
desc: title,
LinkAwal: Link
}
}
hasil.push(result)
})
})
return hasil[0]
}
function Pantun() {
const pantun = fs.readFileSync('./database/pantun.json')
const data = JSON.parse(pantun)
const acak = data[Math.floor(Math.random() * (data.length))]
return acak
}
function trutdare(querry) {
const trdr = fs.readFileSync('./database/truthdare.json') // tempat simpen file lu
const result = JSON.parse(trdr)
if(querry === 'truth id') {
let res = result.Truth.id[Math.floor(Math.random() * result.Truth.id.length)]
return res
} else if (querry === 'truth eng') {
let res = result.Truth.eng[Math.floor(Math.random() * result.Truth.eng.length)]
return res
} else if(querry === 'dare id') {
let res = result.Dare.id[Math.floor(Math.random() * result.Dare.id.length)]
return res
} else if(querry === 'dare eng') {
let res = result.Dare.eng[Math.floor(Math.random() * result.Dare.eng.length)]
return res
} else {
return `Querry tidak terdaftar dimenu harap masukkan dengan benar.\n\ncara pakai :\n1. trutdare('truth id')\n2. trutdare('truth eng')\n3. trutdare('dare id')\n4. trutdare('dare eng')`
}
}
async function SearchFilm(querry) {
const link = await axios.get(`https://123movies.mom/search/?keyword=${querry}`)
const $ = cheerio.load(link.data)
let hasil = []
let result = []
$('#main').each(function (a, b) {
$(b).find('div').each(function (c, d) {
let url = $(d).find('a').attr('href')
let img = $(d).find('a > img').attr('src')
let judul = $(d).find('a > img').attr('alt')
let data = {
judul: judul,
thumb: img,
url: url
}
result.push(data)
})
for (let i = 29; i < result.length; i++) {
hasil.push(result[i])
}
})
return hasil
}
function FaktaUnik() {
const fakta = fs.readFileSync('./database/faktaunik.json')
const data = JSON.parse(fakta)
const acak = data[Math.floor(Math.random() * (data.length))]
return acak
}
async function Liriklagu(querry) {
return new Promise(async (resolve, reject) => {
await axios.request({
url: "https://www.musixmatch.com/search/" + querry,
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(async res => {
const ch = cheerio.load(res.data)
let Url = ch('#search-all-results').find('div.main-panel > div:nth-child(1) > div.box-content > div > ul > li > div > div.media-card-body > div > h2 > a').attr('href')
await axios.request({
url: "https://www.musixmatch.com"+ Url,
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"if-none-match": "W/\"252c5-LEqIxy/rzHPI2QxgG5//NcL3YjQ\"",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(({ data }) => {
const $ = cheerio.load(data)
let judul = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-10.col-md-8.col-ml-9.col-lg-9.static-position > div.track-title-header > div.mxm-track-title > h1').text().trim()
let artis = $('#site > div > div > div > main > div > div > div > div > div > div > div> div > div > h2 > span').text().trim()
let thumb = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div > img').attr('src')
let lirik = []
$('#site > div > div > div > main > div > div > div.mxm-track-lyrics-container').find('div.container > div > div > div > div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function (a, b) {
let isi = $(b).find('span').text().trim()
lirik.push(isi)
})
const result = {
result: {
judul: judul.replace('Lyrics', ''),
penyanyi: artis,
thumb: "https:" + thumb,
lirik: lirik[0]
}
}
resolve(result)
}).catch(reject)
})
})
}
async function infoFilm123(url) {
try{
const link = await axios.get(`${url}`)
const $ = cheerio.load(link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h1').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1) > a').text().trim()
let aktor = []
$('div.mvi-content').each(function (a, b) {
let res = $(b).find('div.mvic-desc > div.mvic-info > div.mvici-left > p > a').text().trim()
aktor.push(res)
})
let country = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(4) > a').attr('title')
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > strong').text().trim()
let kualitas = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let publish = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(4) > a').text().trim()
let tag = []
$('#mv-keywords').each(function (c, d) {
let res = $(d).find('a').text().trim()
tag.push(res)
})
let thumb = $('#mv-info').find('div.player-holder > a').attr('style')
let video = $('#mv-info').find('div.player-holder > a').attr('href')
var result = {
judul: judul,
thumbail: thumb.replace('background-image: url', '').replace('(', '').replace(')', ''),
genre: genre,
video: video,
negara: country,
durasi: durasi,
quality: kualitas,
rilis: publish,
aktor: aktor,
hastag: tag
}
return result
} catch (err) {
return `Judul tidak ditemukan`
}
}
async function Otakudesu(querry) {
try {
const link = await axios.get(`https://otakudesu.moe/?s=${querry}&post_type=anime`)
const c = cheerio.load(link.data)
let id = c('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href')
const Link = await axios.get(id)
const $ = cheerio.load(Link.data)
let judul = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(1) > span').text().trim()
let judulJpn = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(2) > span').text().trim()
let score = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(3) > span').text().trim()
let Produser = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(4) > span').text().trim()
let Type = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(5) > span').text().trim()
let Status = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(6) > span').text().trim()
let TotalEpisode = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(7) > span').text().trim()
let durasi = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(8) > span').text().trim()
let Rilis = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(9) > span').text().trim()
let studio = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(10) > span').text().trim()
let genre = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(11) > span').text().trim()
let thumb = $('#venkonten > div.venser > div.fotoanime').find('img').attr('src')
let Sinopsis = $('#venkonten > div.venser > div.fotoanime > div.sinopc').find('p').text().trim()
let LinkDown = $('#venkonten').find('div.venser > div:nth-child(8) > ul > li:nth-child(4) > span:nth-child(1) > a').attr('href')
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: thumb,
japan: judulJpn,
rating: score,
produser: Produser,
type: Type,
status: Status,
episode: TotalEpisode,
durasi: durasi,
rilis: Rilis,
studio: studio,
genre: genre,
LinkDown: LinkDown,
sinopsis: Sinopsis
}
}
return data
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function wikipedia(querry) {
try {
const link = await axios.get(`https://id.wikipedia.org/wiki/${querry}`)
const $ = cheerio.load(link.data)
let judul = $('#firstHeading').text().trim()
let thumb = $('#mw-content-text').find('div.mw-parser-output > div:nth-child(1) > table > tbody > tr:nth-child(2) > td > a > img').attr('src') || `//i.ibb.co/nzqPBpC/http-error-404-not-found.png`
let isi = []
$('#mw-content-text > div.mw-parser-output').each(function (rayy, Ra) {
let penjelasan = $(Ra).find('p').text().trim()
isi.push(penjelasan)
})
for(let i of isi) {
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: 'https:'+thumb,
isi: i
}
}
return data
}
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function corona(negara) {
try{
const link = await axios.get(`https://www.worldometers.info/coronavirus/country/${negara}/`)
const $ = cheerio.load(link.data)
let kasus = $('#maincounter-wrap').find(' div > span').eq(0).text().trim()
let mati = $('#maincounter-wrap').find(' div > span').eq(1).text().trim()
let sembuh = $('#maincounter-wrap').find(' div > span').eq(2).text().trim()
const data = {
author: 'Iqbalzz',
status: link.status,
result: {
kasus: kasus,
meninggal: mati,
sembuh: sembuh
}
}
return data
} catch (err) {
var notFond = {
author: 'Iqbalzz',
status: link.status,
Pesan: 'Error Hubungi Owner Kami'
}
return notFond
}
}
async function cuaca(wilayah) {
try {
function Cuaca(daerah) {
const listcuaca = fs.readFileSync('./database/cuaca.json')
const data = JSON.parse(listcuaca)
if(daerah.toLowerCase() === 'aceh'){
return data[0]
} else if (daerah.toLowerCase() === 'bali') {
return data[1]
} else if (daerah.toLowerCase() === 'bangka belitung') {
return data[2]
} else if (daerah.toLowerCase() === 'banten') {
return data[3]
} else if (daerah.toLowerCase() === 'yogyakarta' || daerah.toLowerCase() === 'jogja') {
return data[4]
} else if (daerah.toLowerCase() === 'jakarta') {
return data[5]
} else if (daerah.toLowerCase() === 'gorontalo') {
return data[6]
} else if (daerah.toLowerCase() === 'jambi') {
return data[7]
} else if (daerah.toLowerCase() === 'jawa barat') {
return data[8]
} else if (daerah.toLowerCase() === 'jawa tengah') {
return data[9]
} else if (daerah.toLowerCase() === 'jawa timur') {
return data[10]
} else if (daerah.toLowerCase() === 'kalimantan barat') {
return data[11]
} else if (daerah.toLowerCase() === 'kalimantan selatan') {
return data[12]
} else if (daerah.toLowerCase() === 'kalimantan tengah') {
return data[13]
} else if (daerah.toLowerCase() === 'kalimantan timur') {
return data[14]
} else if (daerah.toLowerCase() === 'kalimantan utara') {
return data[15]
} else if (daerah.toLowerCase() === 'riau') {
return data[16]
} else if (daerah.toLowerCase() === 'lampung') {
return data[17]
} else if (daerah.toLowerCase() === 'maluku') {
return data[18]
} else if (daerah.toLowerCase() === 'maluku utara') {
return data[19]
} else if (daerah.toLowerCase() === 'ntb') {
return data[20]
} else if (daerah.toLowerCase() === 'ntt') {
return data[21]
} else if (daerah.toLowerCase() === 'papua') {
return data[22]
} else if (daerah.toLowerCase() === 'papua barat') {
return data[23]
} else if (daerah.toLowerCase() === 'riau') {
return data[24]
} else if (daerah.toLowerCase() === 'sulawesi barat') {
return data[25]
} else if (daerah.toLowerCase() === 'sulawesi selatan') {
return data[26]
} else if (daerah.toLowerCase() === 'sulawesi tengah') {
return data[27]
} else if (daerah.toLowerCase() === 'sulawesi tenggara') {
return data[28]
} else if (daerah.toLowerCase() === 'sulawesi utara') {
return data[29]
} else if (daerah.toLowerCase() === 'sumatra barat') {
return data[30]
} else if (daerah.toLowerCase() === 'sumatra selatan') {
return data[31]
} else if (daerah.toLowerCase() === 'sumatra utara') {
return data[32]
} else if (daerah.toLowerCase() === 'indonesia') {
return data[33]
} else {
return `undefined`
}
}
const link = await axios.get(`https://www.bmkg.go.id/cuaca/prakiraan-cuaca-indonesia.bmkg${Cuaca(wilayah)}`)
const $ = cheerio.load(link.data)
let hasil = []
$('#TabPaneCuaca2 > div.table-responsive > table > tbody').each(function (a, b) {
$(b).find('tr').each(function (c, d) {
let nama = $(d).find('td > a').text().trim()
let cuaca = $(d).find('td > span').text().trim()
let suhu = $(d).find('td:nth-child(6)').text().trim()
let kelembapan = $(d).find('td:nth-child(7)').text().trim()
let data = {
daerah: nama,
cuaca: cuaca,
suhu: suhu + ' °C',
kelembapan: kelembapan + '%'
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function FilmApik23(querry) {
try{
const link = await axios.get(`https://filmapik.website/?s=${querry}`);
const c = cheerio.load(link.data)
let Id = []
c('#main > div > div.main-content.main-category > div.movies-list-wrap.mlw-category > div.movies-list.movies-list-full ').each(function (a, b) {
c(b).find('div').each(function (e, d) {
let id = c(d).find('a').attr('href')
Id.push(id)
})
})
let Random = Id[Math.floor(Math.random() * (Id.length))]
const Link = await axios.get(Random)
const $ = cheerio.load(Link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h3').text().trim()
let view = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1)').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(2)').text().trim()
let studio = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(3) > span').text().trim()
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > span').text().trim()
let TvStatus = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let network = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > div > p:nth-child(5) > a').text().trim()
let thumb = $('#mv-info').find('div.mvi-content > div.thumb.mvic-thumb > img').attr('src')
let BintangFilm = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > p > span').text().trim()
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: thumb,
Link: Random,
penonton: view.replace('Views: ', ''),
durasi: durasi,
genre: genre.replace('Genre: ', ''),
studio: studio,
TV: TvStatus,
network: network,
bintangFilm: BintangFilm
}
}
return data
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function ssstik_io(Link) {
const hasil = []
await axios.request({
url: "https://ssstik.io/download-tiktok-mp3",
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1214162640.1613122103; __gads=ID=a84fb2b8cf02d3d7-22dd4d0604c600bf:T=1613122103:RT=1613122103:S=ALNI_MYL7L8hoaImlsOJ4ci_mlprmNr_dQ; __cflb=02DiuEcwseaiqqyPC5pErDKzpi9ACpCy4uc7DgJdduo1D; _gid=GA1.2.318630001.1621485974; PHPSESSID=e6tcghbdi76h30pkem3lmgb6h2; _gat_UA-3524196-6=1"
}
}).then(async res => {
const $ = cheerio.load(res.data)
let token = $('#splash > div').find('form').attr('data-hx-post')
let ttts = $('#splash > div').find('form').attr('include-vals')
const tt = ttts.split(',')[0].replace('tt:', '')
const ts = ttts.split(',')[1].replace('ts:', '')
const format = {
id: Link,
locale: "en",
tt: tt,
ts: ts
}
await axios('https://ssstik.io' + token, {
method: "POST",
data: new URLSearchParams(Object.entries(format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"hx-active-element": "submit",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1214162640.1613122103; __gads=ID=a84fb2b8cf02d3d7-22dd4d0604c600bf:T=1613122103:RT=1613122103:S=ALNI_MYL7L8hoaImlsOJ4ci_mlprmNr_dQ; __cflb=02DiuEcwseaiqqyPC5pErDKzpi9ACpCy4uc7DgJdduo1D; _gid=GA1.2.318630001.1621485974; PHPSESSID=e6tcghbdi76h30pkem3lmgb6h2; _gat_UA-3524196-6=1"
}
}).then(respon => {
const ch = cheerio.load(respon.data)
const data = {
author: "RA BOT",
result: {
nowm: ch('#mainpicture > div').find('a.pure-button.pure-button-primary.is-center.u-bl.dl-button.download_link.without_watermark_direct.snaptik').attr('href'),
mp3: ch('#mainpicture > div').find('a.pure-button.pure-button-primary.is-center.u-bl.dl-button.download_link.music.snaptik').attr('href')
}
}
hasil.push(data)
})
})
return hasil[0]
}
async function TiktokDownloader(link) {
const Result = []
await axios.request({
url: `https://ttdownloader.com/`,
method: "get",
headers: {
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=797oo0b7ao6ma18170vfggf8sa; popCookie=1; _gid=GA1.2.182249774.1621486055; _gat_gtag_UA_117413493_7=1"
}
})
.then(async res => {
const $ = cheerio.load(res.data)
let token = $('#token').attr('value');
const Form = {
url: link,
format: '',
token: token
}
await axios("https://ttdownloader.com/ajax/", {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=797oo0b7ao6ma18170vfggf8sa; popCookie=1; _gid=GA1.2.182249774.1621486055; _gat_gtag_UA_117413493_7=1"
}
}).then(respon => {
const ch = cheerio.load(respon.data)
let result = {
status: respon.status,
author: 'RA BOT',
result: {
nowm: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
wm: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
audio: ch('#results-list > div:nth-child(4)').find('div.download > a').attr('href')
}
}
Result.push(result)
})
})
return Result[0]
}
async function uploadFile(path) {
const Result = []
const bodyForm = new FormData();
bodyForm.append('files[]', fs.createReadStream(path))
await axios(`https://uguu.se/upload.php`,{
method: 'POST',
data: bodyForm,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": `multipart/form-data; boundary=${bodyForm._boundary}`
}
}).then(({ data }) => {
const result = {
author: 'Created by Ra',
status: data.success ? 200 : 404,
result: {
url: data.files[0].name,
namaFile: data.files[0].url,
size: data.files[0].size,
hash: data.files[0].hash
}
}
Result.push(result.result.url)
})
return Result[0]
}
async function ytPlay(querry) {
const videos = await yt(querry)
const result = []
const Format = {
q: videos.all[0].url,
vt: 'mp3'
}
await axios('https://yt1s.com/api/ajaxSearch/index', {
method: 'POST',
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.586773459.1621481788; _gid=GA1.2.1576517376.1621481788; _gat_gtag_UA_173445049_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(async res => {
const FormatData = {
vid: res.data.vid,
k: res.data.kc
}
await axios('https://yt1s.com/api/ajaxConvert/convert', {
method: 'POST',
data: new URLSearchParams(Object.entries(FormatData)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"sec-ch-ua-mobile": "?0",
"cookie": "_ga=GA1.2.586773459.1621481788; _gid=GA1.2.1576517376.1621481788; _gat_gtag_UA_173445049_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(respon => {
result.push(respon.data)
})
})
return result[0]
}
async function Gempa() {
try{
const link = await axios.get(`https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg`)
const $ = cheerio.load(link.data)
let hasil = []
$('body > div.wrapper > div.container.content > div > div.col-md-8 > div > div > table > tbody').each(function (a, b) {
$(b).find('tr').each(function (c, d) {
let tanggal = $(d).find('td:nth-child(2)').text().trim()
let koordinat = $(d).find('td:nth-child(3)').text().trim()
let magnitudo = $(d).find('td:nth-child(4)').text().trim()
let kedalaman = $(d).find('td:nth-child(5)').text().trim()
let skala = $(d).find('td:nth-child(6) > a').text().trim()
const data = {
author: 'Ra bot',
status: link.status,
result: {
tanggal: tanggal,
koordinat: koordinat,
getaran: magnitudo,
kedalaman: kedalaman,
skala: skala
}
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function cnn() {
try {
const link = await axios.get('https://www.cnnindonesia.com/')
const $ = cheerio.load(link.data)
let hasil = []
$('#content > div > div.l_content > div.box.feed.berita_terbaru_lst > div.list.media_rows.middle').each(function (a, b) {
$(b).find('article').each(function (c, d) {
let judul = $(d).find('a > span.box_text > h2').text().trim() || '-'
let tema = $(d).find('a > span.box_text > span.kanal').text().trim() || '-'
let publik = $(d).find('a > span.box_text > span.date').text().trim() || '-'
let thumb = $(d).find('a > span.ratiobox.ratio_16_9.box_img > span > img').attr('src') || '-'
let url = $(d).find('a').attr('href') || '-'
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
tema: tema,
rilis: publik,
thumb: thumb,
url: url
}
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function photoManipulation(namaFile, path, effectId) {
const hasil = []
const fd = new FormData();
fd.append('name', `${namaFile}`)
fd.append('file', fs.createReadStream(`${path}`))
await axios( {
method: "POST",
url: "https://photomania.net/upload/file",
headers: fd.getHeaders(),
data: fd
}).then(async res => {
const formData = {
photoId: `${res.data.id}`,
effectId: `${effectId}`
}
await axios(`https://photomania.net/render`, {
method: "POST",
data: new URLSearchParams(Object.entries(formData)),
headers: {
"accept": "application/json, text/javascript, /; q=0.01",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
const result = {
status: respon .status,
author: "I`am Ra",
result: {
url: respon.data.url,
url_secury: respon.data.url_secure,
ukuran: respon.data.width + ' x ' + respon.data.height,
explayet: respon.data.expires_at
}
}
hasil.push(result)
return result
})
})
return hasil[0]
}
async function ToVid(path) {
return new Promise(async (resolve, reject) => {
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
await axios({
url: "https://s7.ezgif.com/webp-to-mp4",
method: "POST",
headers: BodyForm.getHeaders(),
data: BodyForm
}).then(res => {
const $ = cheerio.load(res.data)
let File = $('#main > form').find('input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
let Submit = $('#tool-submit-button').find('input').attr('value')
const Format = {
file: File,
token: token,
convert: Submit
}
axios({
url: "https://ezgif.com/webp-to-mp4/" + File,
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(({ data, status}) => {
const ch = cheerio.load(data)
let link = ch('#output > p.outfile').find('video > source').attr('src')
const result = {
status: status,
data: "https:" + link
}
resolve(result)
}).catch(reject)
})
})
}
async function fbDownloader(Link) {
return new Promise (async (resolve, reject) => {
const BodyForm = {
url: Link
}
await axios({
url: "https://www.getfvid.com/downloader",
method: "POST",
data: new URLSearchParams(Object.entries(BodyForm)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(respon => {
const $ = cheerio.load(respon.data)
let HD = $("body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered").find('div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(1) > a').attr('href')
let Normal = $("body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered").find('div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(2) > a').attr("href")
const result = {
status: respon.status,
author: "I`am RA",
result: {
link_hd: HD,
normal: Normal
}
}
resolve(result)
}).catch(reject)
})
}
async function SpeedVid(path, kecepatan) {
return new Promise(async (resolve, reject) => {
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
BodyForm.append('upload', 'Upload video!')
await axios({
url: "https://s3.ezgif.com/video-speed",
method: "POST",
data: BodyForm,
headers: BodyForm.getHeaders()
}).then(({ data }) => {
const $ = cheerio.load(data)
let File = $('#main > form').find(' input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
const Format = {
file: File,
token: token,
multiplier: kecepatan,
apply_audio: "on"
}
axios({
url: `https://s3.ezgif.com/video-speed/${File}?ajax=true`,
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
const ch = cheerio.load(respon.data)
let result = {
status: respon.status,
author: "I`am Ra",
data: 'https:' + ch('p').find('video > source').attr('src')
}
resolve(result)
}).catch(reject)
})
})
}
async function ReverseVid (path, audio) {
return new Promise(async (resolve, reject) => {
function muteOrno(audioo ,File, token) {
if (audioo === true) {
const Format = {
file: File,
token: token,
audio: "on",
encoding: "original"
}
return Format
} else if (audioo === false) {
const Format = {
file: File,
token: token,
mute: "on",
encoding: "original"
}
return Format
} else {
const Format = {
file: File,
token: token,
audio: "on",
encoding: "original"
}
return Format
}
}
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
BodyForm.append('upload', 'Upload video!')
await axios({
url: "https://s3.ezgif.com/reverse-video",
method: 'POST',
data: BodyForm,
headers: BodyForm.getHeaders()
}).then(async respon => {
const $ = cheerio.load(respon.data)
let File = $('#main > form').find('input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
const Format = await muteOrno(audio, File, token)
axios(`https://s3.ezgif.com/reverse-video/${File}?ajax=true`, {
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(res => {
const ch = cheerio.load(res.data)
let Link = ch('p > video').find('source').attr('src')
let Type = ch('p > video').find('source').attr('type')
const result = {
status: res.status,
created: "I`am Ra",
result: {
link: "https:" + Link,
type: Type
}
}
resolve(result)
}).catch(reject)
}).catch(reject)
})
}
async function GSMArena(querry) {
const link = await axios.get(`https://www.gsmarena.com/res.php3?sSearch=${querry}`)
const ch = cheerio.load(link.data)
let Url = ch('#review-body > div > ul').find('li:nth-child(1) > a').attr('href')
const Link = await axios.get(`https://www.gsmarena.com/${Url}`)
let $ = cheerio.load(Link.data)
let barang = $('#body > div > div.review-header > div').find(' div.article-info-line.page-specs.light.border-bottom > h1').text().trim()
let rilis = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(1) > span').text().trim()
let thumb = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > div > a > img').attr('src')
let ukuran = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(3) > span').text().trim()
let tipe = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(5) > span').text().trim()
let storage = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(7) > span').text().trim()
let display = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-display > div').text().trim()
let inchi = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-display > strong > span').text().trim()
let camPix = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > strong > span:nth-child(1)').text().trim()
let Mp = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > strong > span:nth-child(2)').text().trim()
let VideoVix = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > div').text().trim()
let Ram = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > strong > span:nth-child(2)').text().trim()
let chipset = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > div').text().trim()
let batre = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > strong > span:nth-child(1)').text().trim()
let Mah = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > strong > span:nth-child(2)').text().trim()
let merekBatre = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > div').text().trim()
let AngkaRam = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > strong > span:nth-child(1)').text().trim()
let detail = []
$('#specs-list').each(function (anu, RA) {
let isi = $(RA).text().trim()
detail.push(isi)
})
const result = {
status: Link.status,
author: "I`am Ra",
result: {
judul: barang,
rilis: rilis,
thumb: thumb,
ukuran: ukuran,
type: tipe,
storage: storage,
display: display,
inchi: inchi,
pixel: camPix + Mp,
videoPixel: VideoVix,
ram: AngkaRam + Ram,
chipset: chipset,
batrai: batre + Mah,
merek_batre: merekBatre,
detail: detail[0]
}
}
return result
}
async function zodiakMing(querry) {
const link = await axios.get(`https://www.fimela.com/zodiak/${querry}/minggu-ini`)
const $ = cheerio.load(link.data)
let thumb = $('body > div > div > div').find('div > div > a > img').attr('src')
let judul = $('body > div > div > div').find('div > div > div.zodiak--content-header__text > h5').text().trim()
let date = $('body > div > div > div').find('div> div.zodiak--content-header__text > span').text().trim()
let hoki = $('body > div > div > div > div').find('div > div > div:nth-child(1) > div > span').text().trim()
let umum = $('body > div > div > div > div').find(' div > div > div:nth-child(1) > div > p').text().trim()
let love = $('body > div > div > div > div').find(' div > div > div:nth-child(2) > div > p').text().trim()
let keuangan = $('body > div > div > div > div').find(' div > div > div:nth-child(3) > div > p').text().trim()
const result = {
status: link.status,
data: {
judul: judul,
thumb: thumb,
date: date,
nomer_hoki: hoki,
isi: {
umum: umum,
love: love,
keuangan: keuangan
}
}
}
return result
}
async function zodiakHar (querry) {
let Hasil = []
await axios.request(`https://www.fimela.com/zodiak/${querry}`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(({ data}) => {
const $ = cheerio.load(data)
let thumb = $('body > div > div > div').find('div > div > a > img').attr('src')
let judul = $('body > div > div.container-main > div.container-article > div').find('div.zodiak--content-header__right > div.zodiak--content-header__text > h5').text().trim()
let tanggal = $('body > div > div > div > div > div > div > span').text().trim()
let nomer_ = $('body > div > div > div > div > div > div').find('div:nth-child(1) > div.zodiak--content__content > span').text().trim()
let isi = []
$('body > div > div > div > div > div > div').each(function (anu, RA) {
let umum = $(RA).find('div:nth-child(1) > div.zodiak--content__content > p').text().trim() || undefined
let love = $(RA).find('div:nth-child(2) > div.zodiak--content__content > p').text().trim() || undefined
let keuangan = $(RA).find('div:nth-child(3) > div.zodiak--content__content > p').text().trim() || undefined
let Data = {
umum: umum,
love: love,
keuangan: keuangan
}
isi.push(Data)
})
let ramal = []
isi.map(ryuzin => {
if (ryuzin.umum === undefined) return
if (ryuzin.love === undefined) return
if (ryuzin.keuangan === undefined) return
ramal.push(ryuzin)
})
const result = {
judul: judul,
thumb: thumb,
date: tanggal,
no_hoki: nomer_,
teori: ramal[0]
}
Hasil.push(result)
})
return Hasil[0]
}
async function Shoope(item, limit) {
const hasil = []
await axios.request(`https://shopee.co.id/api/v4/search/search_items?by=relevancy&keyword=${item}&limit=${limit}&newest=0&order=desc&page_type=search&scenario=PAGE_GLOBAL_SEARCH&version=2`, {
method: "GET",
data: null,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"if-none-match-": "55b03-856cd63f16112f8a43da6096f97ac3fe",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
hasil.push(respon.data)
})
return hasil[0]
}
async function pinterest(querry) {
let HASIL = []
await axios.request(`https://id.pinterest.com/search/pins/?rs=typed&q=` + querry, {
method: "GET",
url: "https://id.pinterest.com/search/pins/?rs=typed&q="+ querry,
headers: {
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"sec-ch-ua-mobile": "?0",
"upgrade-insecure-requests": "1",
"cookie": "csrftoken=ebe0be3a93cea6072be18633add953a2; _b=\"AVezvd6F4UtE24FUsA6INxipyZZDoSpyCc5vaJK4QDYXmExosVEc4h6WkiKhlVtQ430=\"; cm_sub=denied; fba=True; _ga=GA1.2.862909259.1620474446; g_state={\"i_l\":0}; _auth=1; _pinterest_sess=TWc9PSZ0VEZqZmdDSlJYaGU5REIvNklIcVlnMjE5b0ZraTE5REJVQ0JiMUwxTkZZaGFoVk1sRDVhOFlwQzhkQnQ0YkMwRlNyV0lIWUFlK0ZVTkVxYUhKNmlvZ0R1UXlQYTBRRVVhMU1yYkpmcXpHK3UyNjNhckRqUFFOYVJVa3RnVmJtVzd2MmRGaHFMZUpLNVhtaHptTDhWSnBSdXhZY0FhRnRTN3J1S0V4cGtsVTBxeE54NkF2blVNSFV3R0NTQTR1bVVNRURGVGdnYlN5UjdBbk9YcHVGbGI3a1kwd1dEZDgrZVM1SDc3V0pJMm00OWxKUDVNQjBLVlFocTB4Mjg1M1RnbGxBaFAxbS9MTnVzei91cEQvcjBtakp6N0ZnU2t1Y3NxWW1DRDV1Q3h0ankvQ3FEWGh3MXczcXBHNXJpYVNCMHB6dUoxMGF6ZzVxN2VqQVBoSElSd0tiQk41ZVRPQXlOaGNpNzVQMWJSeVZJbCtYYVMxQ1ZRUFUwalU3eGVzMGRySlNzdWo1NG5uaXNFM3ZpT0o0TkZHR1daUXlwaXFQclMwa04raW9xVnVaTTRSVGEzTE03TVlZcmZYVDd5UmVPd2lZaGw4aE9VMHJBd0tidEsrcHdPWk96RlFMekVLTzY3VU1PL0tIYUdwUE1IWVdJNnJXalBkU09Sb3dEaHlQVVR1T1RqNW5Sc2FRdmVkZmhkMk9HNHBCL0ZpZ3NMdmZvVW9ReVltTFBCTlNLWHpray9LNWJ2UTNvTlBzVm9aZjRvYWRvRFhla0dBNzdveWJVYXZmVFp2cnFFNU5DYUVwSHhxeDlIajNIVTlHaEVYdGptWm5mSGVSRmtIMmQwVVVVZlVCVEh6UHB3TnBtdWV0b2l6L3VTc3pXMXFGN3lHS3ZJM3BwL0NrWVJDMm1HY2tROGxuQVFRNS9OUW45R3dtSk8zeFJidVFSTG1qTG5PelAvKzd3T3lrN1NoKzBHVGNTY1pGSEY0bW8xcGVmc3NtclBhTWE2QUMxOXNpQWUwRmo4UHl0ZGpwUzhUQXVhbjYwT0ZJeHhHai8yOWFUVTA1Wkx2czN4VSttLzMvbkFVQ2svWnZvNC9xZ3E4VkhYSFZ5elo4TzhtU0o5c3ZDcEJyYjE3QVI1WHlmTTFhWThvWHQ1T0tSTWRsWnI3a1lpU245dEVLd1lZSXRremtkTUZmcVA2YUg0c1UrSk1JOWJVRzZpcWd3T0NVaFZkdUh3UUdURi9sbDBqT2pBZVV2ZnlTQzc5ZnBMYkFMQ1ZsWjdIYWcmaDc1Uk5kK2I4MjFMUXBaVUthci9rVHpCUWRvPQ==; _pinterest_cm=\"TWc9PSYxZnpkMS9XN29Rd2R0TnpBN0RzVktja1J4NUtINUJqRzNGODFXS0xES1pndWlNVm52a0d3V0JocmVIS3p5eDdnNXNZa0hGelNQNDBSTFRId3ZhTFFIQjRGOW1lNlJZMzFiVlg1MHhSOFpmMGhRZUoySUpJZDIyWlVYMjRXNHRaL1lodFl4eW1jWjNyTklpbytYbHZyd29nRm5DY0pQOGgyUWpDdk9zQ1craXR5VEZoNHV4ZzRnOXV4SUFFSStYZCsmT08zMFI1bktXa3pwSDFtK3NNRWpxWWNpQzNzPQ==\"; _routing_id=\"595f24cd-7f4c-4495-aa67-37212d099cd8\"; sessionFunnelEventLogged=1"
}
}).then(res => {
const $ = cheerio.load(res.data)
let hasil = []
$('body > div > div > div > div > div > div > div > div > div > div > div').each(function (a, b) {
$(b).find('div').each(function (c, d) {
let Link = $(d).find('div > div > div > div > a').find('img').attr('src')
hasil.push(Link)
})
})
let Data = []
hasil.map(V => {
if (V === undefined) return
Data.push(V.replace('236x', 'originals'))
})
let FilterArray = new Set(Data)
let unique = [...FilterArray]
const result = {
status: res.status,
result: unique
}
HASIL.push(result)
})
return HASIL[0]
}
async function TiktokDown (link) {
return new Promise (async (resolve, reject) => {
await axios.request(`https://toksaver.com/convertok?url=` + link, {
method: "GET",
data: null,
headers: {
"accept": "/",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(res => {
resolve(res.data)
}).catch(reject)
})
}
module.exports.RandomCerpen = RandomCerpen
module.exports.emoji = emoji
module.exports.stickerSearch = stickerSearch
module.exports.ManggaToon = ManggaToon
module.exports.RamalJadian = RamalJadian
module.exports.Pantun = Pantun
module.exports.trutdare = trutdare
module.exports.SearchFilm = SearchFilm
module.exports.infoFilm123 = infoFilm123
module.exports.FaktaUnik = FaktaUnik
module.exports.Liriklagu = Liriklagu
module.exports.Otakudesu = Otakudesu
module.exports.wikipedia = wikipedia
module.exports.corona = corona
module.exports.cuaca = cuaca
module.exports.FilmApik23 = FilmApik23
module.exports.Gempa = Gempa
module.exports.cnn = cnn
module.exports.TiktokDownloader = TiktokDownloader
module.exports.uploadFile = uploadFile
module.exports.ytPlay = ytPlay
module.exports.igDownloader = igDownloader
module.exports.ssstik_io = ssstik_io
module.exports.photoManipulation = photoManipulation
module.exports.ToVid = ToVid
module.exports.fbDownloader = fbDownloader
module.exports.SpeedVid = SpeedVid
module.exports.ReverseVid = ReverseVid
module.exports.GSMArena = GSMArena
module.exports.zodiakMing = zodiakMing
module.exports.zodiakHar = zodiakHar
module.exports.Shoope = Shoope
module.exports.pinterest = pinterest
module.exports.TiktokDown = TiktokDown
================================================
FILE: Zimbot/index3.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs');
const { spawn, exec } = require("child_process");
const yt = require("yt-search");
const FormData = require("form-data");
const got = require("got")
const print = (message) => {
return console.log(message)
}
async function ManggaToon(judul) {
try {
const link = await axios.get(`https://mangatoon.mobi/id/search?word=${judul}`)
const c = cheerio.load(link.data)
let id = c('#page-content').find('div.search-page > div > div.comics-result > div.recommended-wrap > div > div > a').attr('href') || 'undefined'
if(id === 'undefined') {
const link2 = await axios.get(`https://mangatoon.mobi/en/search?word=${judul}`)
const C = cheerio.load(link2.data)
let id2 = C('#page-content').find('div.search-page > div > div.comics-result > div.recommended-wrap > div > div:nth-child(1) > a').attr('href')
const data = await axios.get(`https://mangatoon.mobi${id2}`)
const $ = cheerio.load(data.data)
var judul = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-title-bg > span').text().trim()
var genre = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-tags-info > span').text().trim()
var author = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-author-name > span').text().trim()
var thumb = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-img > img.big-img').attr('src');
var LinkKe = $('#page-content').find('div.detail-wrap > div.detail-interact > a').attr('href')
var Link = `https://mangatoon.mobi${LinkKe}`
let Author = author.replace('Nama Author: ', '');
let hasil = {
judul, thumb, genre, Author, Link
}
return hasil
} else {
const data = await axios.get(`https://mangatoon.mobi${id}`)
const $ = cheerio.load(data.data)
var judul = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-title-bg > span').text().trim()
var genre = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-tags-info > span').text().trim()
var author = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-info > div.detail-author-name > span').text().trim()
var thumb = $('#page-content').find('div.detail-wrap > div.detail-top-info > div.detail-img > img.big-img').attr('src');
var LinkKe = $('#page-content').find('div.detail-wrap > div.detail-interact > a').attr('href')
var Link = `https://mangatoon.mobi${LinkKe}`
let Author = author.replace('Nama Author: ', '');
let hasil = {
judul, thumb, genre, Author, Link
}
return hasil
}
} catch (err) {
return `Not Found 404`
}
}
async function emoji(emoticon) {
const emojii = encodeURI(`${emoticon}`)
const link = await axios.get(`https://emojipedia.org/${emojii}/`)
const $ = cheerio.load(link.data)
var apple = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(1) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var google = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(2) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var samsung = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(3) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var microsoft = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(4) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var whatsapp = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(5) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var twitter = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(6) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var facebook = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(7) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var jooxpixel = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(8) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var openmoji = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(9) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var emojidex = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(10) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var messager = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(11) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var LG = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(12) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var HTC = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(13) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var mozilla = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(14) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var softbank = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(15) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var docomo = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(16) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var KDDI = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(17) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
const result = {
apple: apple.replace('120', '240'),
google: google.replace('120', '240'),
samsung: samsung.replace('120', '240'),
microsoft: microsoft.replace('120', '240'),
whatsapp: whatsapp.replace('120', '240'),
twitter: twitter.replace('120', '240'),
facebook: facebook.replace('120', '240'),
jooxPixel: jooxpixel.replace('120', '240'),
openemoji: openmoji.replace('120', '240'),
emojidex: emojidex.replace('120', '240'),
messanger: messager.replace('120', '240'),
LG: LG.replace('120', '240'),
HTC: HTC.replace('120', '240'),
mozilla: mozilla.replace('120', '240'),
softbank: softbank.replace('120', '240'),
docomo: docomo.replace('120', '240'),
KDDI: KDDI.replace('120', '240')
}
return result
}
async function RandomCerpen() {
try{
const link = await axios.get(`http://cerpenmu.com/`)
const c = cheerio.load(link.data)
let kumpulan = []
c('#sidebar > div').each(function (real, ra) {
c(ra).find('ul > li').each(function (i, rayy) {
let random = c(rayy).find('a').attr('href')
kumpulan.push(random)
})
})
var acak = kumpulan[Math.floor(Math.random() * (kumpulan.length))]
let Otw = await axios.get(`${acak}`)
const C = cheerio.load(Otw.data)
let otw = []
C('#content > article > article').each(function (a, b) {
let random = C(b).find('h2 > a').attr('href')
otw.push(random)
})
var Acak = otw[Math.floor(Math.random() * (otw.length))]
let Link = await axios.get(`${Acak}`)
let $ = cheerio.load(Link.data)
let judul = $('#content').find('article > h1').text().trim()
let karangan = $('#content').find('article > a:nth-child(2)').text().trim()
let Isi = []
$('#content > article > p').each(function (wm, Ra) {
let isi = $(Ra).text().trim()
Isi.push(isi)
})
let cerita = []
for (let i of Isi) {
cerita += i
}
const data = {
status: 200,
author: 'RA BOT',
result: {
Judul: judul,
Penulis: karangan,
sumber: Acak,
cerita: cerita
}
}
return data
} catch (err) {
const res404 = {
status: 500,
author: 'RA BOT',
Pesan: 'Udah Ga work?:/ cp: 082149344210'
}
return res404
}
}
async function stickerSearch(querry) {
const link = await axios.get(`https://getstickerpack.com/stickers?query=${querry}`);
const $ = cheerio.load(link.data)
let sticker1 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > img').attr('src'),
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > span.title').text().trim(),
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > span.username').text().trim()
}
let sticker2 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > span.username').text().trim()
}
let sticker3 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > span.username').text().trim()
}
let sticker4 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > span.username').text().trim()
}
let sticker5 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > span.username').text().trim()
}
let sticker6 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > span.username').text().trim()
}
let sticker7 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > span.username').text().trim()
}
let sticker8 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > span.username').text().trim()
}
let sticker9 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > span.username').text().trim()
}
let sticker10 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > span.username').text().trim()
}
let sticker11 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > span.username').text().trim()
}
let sticker12 = {
sticker: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > img').attr('src') ,
nama: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > span.title').text().trim() ,
creator: $('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > span.username').text().trim()
}
let stickerlop = [
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(1) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(2) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(3) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(4) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(5) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(6) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(7) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(8) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(9) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(10) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(11) > a > div > img').attr('src'),
$('#stickerPacks').find('div > div:nth-child(3) > div:nth-child(12) > a > div > img').attr('src')
]
let data = {
sticker: stickerlop, sticker1, sticker2, sticker3, sticker4, sticker5, sticker6, sticker7, sticker8, sticker9, sticker10, sticker11, sticker12
}
return data
}
async function RamalJadian(tanggal, bulan, tahun) {
if(isNaN(tanggal) && isNaN(bulan) && isNaN(tahun)) return `Tanggal bulan tahun harus berupa angka`
const link = await axios.get(`https://www.primbon.com/tanggal_jadian_pernikahan.php?tgl=${tanggal}&bln=${bulan}&thn=${tahun}&proses=+Submit%21+`)
const $ = cheerio.load(link.data)
let tanggall = $('#body').text().trim()
let a = tanggall.replace('MAKNA TANGGAL JADIAN, PERNIKAHAN', '').replace('Karakteristik:', '\nKarakteristik : ').replace('< Hitung Kembali', '')
return a
}
async function igDownloader(Link) {
const hasil = []
const Form = {
url: Link,
submit: ""
}
await axios(`https://downloadgram.org/`, {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1695343126.1621491858; _gid=GA1.2.28178724.1621491859; __gads=ID=8f9d3ef930e9a07b-2258e672bec80081:T=1621491859:RT=1621491859:S=ALNI_MbqLxhztDiYZttJFX2SkvYei6uGOw; __atuvc=3%7C20; __atuvs=60a6eb107a17dd75000; __atssc=google%3B2; _gat_gtag_UA_142480840_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin",
}).then(async res => {
const $ = cheerio.load(res.data)
let url = $('#downloadBox').find('a').attr('href');
await axios(Link, {
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "ig_did=08A3C465-7D43-4D8A-806A-88F98384E63B; ig_nrcb=1; mid=X_ipMwALAAFgQ7AftbrkhIDIdXJ8; fbm_124024574287414=base_domain=.instagram.com; shbid=17905; ds_user_id=14221286336; csrftoken=fXHAj5U3mcJihQEyVXfyCzcg46lHx7QD; sessionid=14221286336%3A5n4czHpQ0GRzlq%3A28; shbts=1621491639.7673564; rur=FTW"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(respon => {
const ch = cheerio.load(respon.data)
let title = ch('title').text().trim()
const result = {
author: "RA BOT",
result: {
link: url,
desc: title,
LinkAwal: Link
}
}
hasil.push(result)
})
})
return hasil[0]
}
function Pantun() {
const pantun = fs.readFileSync('./database/pantun.json')
const data = JSON.parse(pantun)
const acak = data[Math.floor(Math.random() * (data.length))]
return acak
}
function trutdare(querry) {
const trdr = fs.readFileSync('./database/truthdare.json') // tempat simpen file lu
const result = JSON.parse(trdr)
if(querry === 'truth id') {
let res = result.Truth.id[Math.floor(Math.random() * result.Truth.id.length)]
return res
} else if (querry === 'truth eng') {
let res = result.Truth.eng[Math.floor(Math.random() * result.Truth.eng.length)]
return res
} else if(querry === 'dare id') {
let res = result.Dare.id[Math.floor(Math.random() * result.Dare.id.length)]
return res
} else if(querry === 'dare eng') {
let res = result.Dare.eng[Math.floor(Math.random() * result.Dare.eng.length)]
return res
} else {
return `Querry tidak terdaftar dimenu harap masukkan dengan benar.\n\ncara pakai :\n1. trutdare('truth id')\n2. trutdare('truth eng')\n3. trutdare('dare id')\n4. trutdare('dare eng')`
}
}
async function SearchFilm(querry) {
const link = await axios.get(`https://123movies.mom/search/?keyword=${querry}`)
const $ = cheerio.load(link.data)
let hasil = []
let result = []
$('#main').each(function (a, b) {
$(b).find('div').each(function (c, d) {
let url = $(d).find('a').attr('href')
let img = $(d).find('a > img').attr('src')
let judul = $(d).find('a > img').attr('alt')
let data = {
judul: judul,
thumb: img,
url: url
}
result.push(data)
})
for (let i = 29; i < result.length; i++) {
hasil.push(result[i])
}
})
return hasil
}
function FaktaUnik() {
const fakta = fs.readFileSync('./database/faktaunik.json')
const data = JSON.parse(fakta)
const acak = data[Math.floor(Math.random() * (data.length))]
return acak
}
async function Liriklagu(querry) {
return new Promise(async (resolve, reject) => {
await axios.request({
url: "https://www.musixmatch.com/search/" + querry,
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(async res => {
const ch = cheerio.load(res.data)
let Url = ch('#search-all-results').find('div.main-panel > div:nth-child(1) > div.box-content > div > ul > li > div > div.media-card-body > div > h2 > a').attr('href')
await axios.request({
url: "https://www.musixmatch.com"+ Url,
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"if-none-match": "W/\"252c5-LEqIxy/rzHPI2QxgG5//NcL3YjQ\"",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(({ data }) => {
const $ = cheerio.load(data)
let judul = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-10.col-md-8.col-ml-9.col-lg-9.static-position > div.track-title-header > div.mxm-track-title > h1').text().trim()
let artis = $('#site > div > div > div > main > div > div > div > div > div > div > div> div > div > h2 > span').text().trim()
let thumb = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div > img').attr('src')
let lirik = []
$('#site > div > div > div > main > div > div > div.mxm-track-lyrics-container').find('div.container > div > div > div > div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function (a, b) {
let isi = $(b).find('span').text().trim()
lirik.push(isi)
})
const result = {
result: {
judul: judul.replace('Lyrics', ''),
penyanyi: artis,
thumb: "https:" + thumb,
lirik: lirik[0]
}
}
resolve(result)
}).catch(reject)
})
})
}
async function infoFilm123(url) {
try{
const link = await axios.get(`${url}`)
const $ = cheerio.load(link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h1').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1) > a').text().trim()
let aktor = []
$('div.mvi-content').each(function (a, b) {
let res = $(b).find('div.mvic-desc > div.mvic-info > div.mvici-left > p > a').text().trim()
aktor.push(res)
})
let country = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(4) > a').attr('title')
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > strong').text().trim()
let kualitas = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let publish = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(4) > a').text().trim()
let tag = []
$('#mv-keywords').each(function (c, d) {
let res = $(d).find('a').text().trim()
tag.push(res)
})
let thumb = $('#mv-info').find('div.player-holder > a').attr('style')
let video = $('#mv-info').find('div.player-holder > a').attr('href')
var result = {
judul: judul,
thumbail: thumb.replace('background-image: url', '').replace('(', '').replace(')', ''),
genre: genre,
video: video,
negara: country,
durasi: durasi,
quality: kualitas,
rilis: publish,
aktor: aktor,
hastag: tag
}
return result
} catch (err) {
return `Judul tidak ditemukan`
}
}
async function Otakudesu(querry) {
try {
const link = await axios.get(`https://otakudesu.moe/?s=${querry}&post_type=anime`)
const c = cheerio.load(link.data)
let id = c('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href')
const Link = await axios.get(id)
const $ = cheerio.load(Link.data)
let judul = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(1) > span').text().trim()
let judulJpn = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(2) > span').text().trim()
let score = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(3) > span').text().trim()
let Produser = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(4) > span').text().trim()
let Type = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(5) > span').text().trim()
let Status = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(6) > span').text().trim()
let TotalEpisode = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(7) > span').text().trim()
let durasi = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(8) > span').text().trim()
let Rilis = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(9) > span').text().trim()
let studio = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(10) > span').text().trim()
let genre = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(11) > span').text().trim()
let thumb = $('#venkonten > div.venser > div.fotoanime').find('img').attr('src')
let Sinopsis = $('#venkonten > div.venser > div.fotoanime > div.sinopc').find('p').text().trim()
let LinkDown = $('#venkonten').find('div.venser > div:nth-child(8) > ul > li:nth-child(4) > span:nth-child(1) > a').attr('href')
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: thumb,
japan: judulJpn,
rating: score,
produser: Produser,
type: Type,
status: Status,
episode: TotalEpisode,
durasi: durasi,
rilis: Rilis,
studio: studio,
genre: genre,
LinkDown: LinkDown,
sinopsis: Sinopsis
}
}
return data
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function wikipedia(querry) {
try {
const link = await axios.get(`https://id.wikipedia.org/wiki/${querry}`)
const $ = cheerio.load(link.data)
let judul = $('#firstHeading').text().trim()
let thumb = $('#mw-content-text').find('div.mw-parser-output > div:nth-child(1) > table > tbody > tr:nth-child(2) > td > a > img').attr('src') || `//i.ibb.co/nzqPBpC/http-error-404-not-found.png`
let isi = []
$('#mw-content-text > div.mw-parser-output').each(function (rayy, Ra) {
let penjelasan = $(Ra).find('p').text().trim()
isi.push(penjelasan)
})
for(let i of isi) {
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: 'https:'+thumb,
isi: i
}
}
return data
}
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function corona(negara) {
try{
const link = await axios.get(`https://www.worldometers.info/coronavirus/country/${negara}/`)
const $ = cheerio.load(link.data)
let kasus = $('#maincounter-wrap').find(' div > span').eq(0).text().trim()
let mati = $('#maincounter-wrap').find(' div > span').eq(1).text().trim()
let sembuh = $('#maincounter-wrap').find(' div > span').eq(2).text().trim()
const data = {
author: 'Ra bot',
status: link.status,
result: {
kasus: kasus,
meninggal: mati,
sembuh: sembuh
}
}
return data
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function cuaca(wilayah) {
try {
function Cuaca(daerah) {
const listcuaca = fs.readFileSync('./database/cuaca.json')
const data = JSON.parse(listcuaca)
if(daerah.toLowerCase() === 'aceh'){
return data[0]
} else if (daerah.toLowerCase() === 'bali') {
return data[1]
} else if (daerah.toLowerCase() === 'bangka belitung') {
return data[2]
} else if (daerah.toLowerCase() === 'banten') {
return data[3]
} else if (daerah.toLowerCase() === 'yogyakarta' || daerah.toLowerCase() === 'jogja') {
return data[4]
} else if (daerah.toLowerCase() === 'jakarta') {
return data[5]
} else if (daerah.toLowerCase() === 'gorontalo') {
return data[6]
} else if (daerah.toLowerCase() === 'jambi') {
return data[7]
} else if (daerah.toLowerCase() === 'jawa barat') {
return data[8]
} else if (daerah.toLowerCase() === 'jawa tengah') {
return data[9]
} else if (daerah.toLowerCase() === 'jawa timur') {
return data[10]
} else if (daerah.toLowerCase() === 'kalimantan barat') {
return data[11]
} else if (daerah.toLowerCase() === 'kalimantan selatan') {
return data[12]
} else if (daerah.toLowerCase() === 'kalimantan tengah') {
return data[13]
} else if (daerah.toLowerCase() === 'kalimantan timur') {
return data[14]
} else if (daerah.toLowerCase() === 'kalimantan utara') {
return data[15]
} else if (daerah.toLowerCase() === 'riau') {
return data[16]
} else if (daerah.toLowerCase() === 'lampung') {
return data[17]
} else if (daerah.toLowerCase() === 'maluku') {
return data[18]
} else if (daerah.toLowerCase() === 'maluku utara') {
return data[19]
} else if (daerah.toLowerCase() === 'ntb') {
return data[20]
} else if (daerah.toLowerCase() === 'ntt') {
return data[21]
} else if (daerah.toLowerCase() === 'papua') {
return data[22]
} else if (daerah.toLowerCase() === 'papua barat') {
return data[23]
} else if (daerah.toLowerCase() === 'riau') {
return data[24]
} else if (daerah.toLowerCase() === 'sulawesi barat') {
return data[25]
} else if (daerah.toLowerCase() === 'sulawesi selatan') {
return data[26]
} else if (daerah.toLowerCase() === 'sulawesi tengah') {
return data[27]
} else if (daerah.toLowerCase() === 'sulawesi tenggara') {
return data[28]
} else if (daerah.toLowerCase() === 'sulawesi utara') {
return data[29]
} else if (daerah.toLowerCase() === 'sumatra barat') {
return data[30]
} else if (daerah.toLowerCase() === 'sumatra selatan') {
return data[31]
} else if (daerah.toLowerCase() === 'sumatra utara') {
return data[32]
} else if (daerah.toLowerCase() === 'indonesia') {
return data[33]
} else {
return `undefined`
}
}
const link = await axios.get(`https://www.bmkg.go.id/cuaca/prakiraan-cuaca-indonesia.bmkg${Cuaca(wilayah)}`)
const $ = cheerio.load(link.data)
let hasil = []
$('#TabPaneCuaca2 > div.table-responsive > table > tbody').each(function (a, b) {
$(b).find('tr').each(function (c, d) {
let nama = $(d).find('td > a').text().trim()
let cuaca = $(d).find('td > span').text().trim()
let suhu = $(d).find('td:nth-child(6)').text().trim()
let kelembapan = $(d).find('td:nth-child(7)').text().trim()
let data = {
daerah: nama,
cuaca: cuaca,
suhu: suhu + ' °C',
kelembapan: kelembapan + '%'
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function FilmApik23(querry) {
try{
const link = await axios.get(`https://filmapik.website/?s=${querry}`);
const c = cheerio.load(link.data)
let Id = []
c('#main > div > div.main-content.main-category > div.movies-list-wrap.mlw-category > div.movies-list.movies-list-full ').each(function (a, b) {
c(b).find('div').each(function (e, d) {
let id = c(d).find('a').attr('href')
Id.push(id)
})
})
let Random = Id[Math.floor(Math.random() * (Id.length))]
const Link = await axios.get(Random)
const $ = cheerio.load(Link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h3').text().trim()
let view = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1)').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(2)').text().trim()
let studio = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(3) > span').text().trim()
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > span').text().trim()
let TvStatus = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let network = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > div > p:nth-child(5) > a').text().trim()
let thumb = $('#mv-info').find('div.mvi-content > div.thumb.mvic-thumb > img').attr('src')
let BintangFilm = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > p > span').text().trim()
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
thumb: thumb,
Link: Random,
penonton: view.replace('Views: ', ''),
durasi: durasi,
genre: genre.replace('Genre: ', ''),
studio: studio,
TV: TvStatus,
network: network,
bintangFilm: BintangFilm
}
}
return data
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function ssstik_io(Link) {
const hasil = []
await axios.request({
url: "https://ssstik.io/download-tiktok-mp3",
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1214162640.1613122103; __gads=ID=a84fb2b8cf02d3d7-22dd4d0604c600bf:T=1613122103:RT=1613122103:S=ALNI_MYL7L8hoaImlsOJ4ci_mlprmNr_dQ; __cflb=02DiuEcwseaiqqyPC5pErDKzpi9ACpCy4uc7DgJdduo1D; _gid=GA1.2.318630001.1621485974; PHPSESSID=e6tcghbdi76h30pkem3lmgb6h2; _gat_UA-3524196-6=1"
}
}).then(async res => {
const $ = cheerio.load(res.data)
let token = $('#splash > div').find('form').attr('data-hx-post')
let ttts = $('#splash > div').find('form').attr('include-vals')
const tt = ttts.split(',')[0].replace('tt:', '')
const ts = ttts.split(',')[1].replace('ts:', '')
const format = {
id: Link,
locale: "en",
tt: tt,
ts: ts
}
await axios('https://ssstik.io' + token, {
method: "POST",
data: new URLSearchParams(Object.entries(format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"hx-active-element": "submit",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1214162640.1613122103; __gads=ID=a84fb2b8cf02d3d7-22dd4d0604c600bf:T=1613122103:RT=1613122103:S=ALNI_MYL7L8hoaImlsOJ4ci_mlprmNr_dQ; __cflb=02DiuEcwseaiqqyPC5pErDKzpi9ACpCy4uc7DgJdduo1D; _gid=GA1.2.318630001.1621485974; PHPSESSID=e6tcghbdi76h30pkem3lmgb6h2; _gat_UA-3524196-6=1"
}
}).then(respon => {
const ch = cheerio.load(respon.data)
const data = {
author: "RA BOT",
result: {
nowm: ch('#mainpicture > div').find('a.pure-button.pure-button-primary.is-center.u-bl.dl-button.download_link.without_watermark_direct.snaptik').attr('href'),
mp3: ch('#mainpicture > div').find('a.pure-button.pure-button-primary.is-center.u-bl.dl-button.download_link.music.snaptik').attr('href')
}
}
hasil.push(data)
})
})
return hasil[0]
}
async function TiktokDownloader(link) {
const Result = []
await axios.request({
url: `https://ttdownloader.com/`,
method: "get",
headers: {
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=797oo0b7ao6ma18170vfggf8sa; popCookie=1; _gid=GA1.2.182249774.1621486055; _gat_gtag_UA_117413493_7=1"
}
})
.then(async res => {
const $ = cheerio.load(res.data)
let token = $('#token').attr('value');
const Form = {
url: link,
format: '',
token: token
}
await axios("https://ttdownloader.com/ajax/", {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=797oo0b7ao6ma18170vfggf8sa; popCookie=1; _gid=GA1.2.182249774.1621486055; _gat_gtag_UA_117413493_7=1"
}
}).then(respon => {
const ch = cheerio.load(respon.data)
let result = {
status: respon.status,
author: 'RA BOT',
result: {
nowm: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
wm: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
audio: ch('#results-list > div:nth-child(4)').find('div.download > a').attr('href')
}
}
Result.push(result)
})
})
return Result[0]
}
async function uploadFile(path) {
const Result = []
const bodyForm = new FormData();
bodyForm.append('files[]', fs.createReadStream(path))
await axios(`https://uguu.se/upload.php`,{
method: 'POST',
data: bodyForm,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": `multipart/form-data; boundary=${bodyForm._boundary}`
}
}).then(({ data }) => {
const result = {
author: 'Created by Ra',
status: data.success ? 200 : 404,
result: {
url: data.files[0].name,
namaFile: data.files[0].url,
size: data.files[0].size,
hash: data.files[0].hash
}
}
Result.push(result.result.url)
})
return Result[0]
}
async function ytPlay(querry) {
const videos = await yt(querry)
const result = []
const Format = {
q: videos.all[0].url,
vt: 'mp3'
}
await axios('https://yt1s.com/api/ajaxSearch/index', {
method: 'POST',
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.586773459.1621481788; _gid=GA1.2.1576517376.1621481788; _gat_gtag_UA_173445049_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(async res => {
const FormatData = {
vid: res.data.vid,
k: res.data.kc
}
await axios('https://yt1s.com/api/ajaxConvert/convert', {
method: 'POST',
data: new URLSearchParams(Object.entries(FormatData)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"sec-ch-ua-mobile": "?0",
"cookie": "_ga=GA1.2.586773459.1621481788; _gid=GA1.2.1576517376.1621481788; _gat_gtag_UA_173445049_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(respon => {
result.push(respon.data)
})
})
return result[0]
}
async function Gempa() {
try{
const link = await axios.get(`https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg`)
const $ = cheerio.load(link.data)
let hasil = []
$('body > div.wrapper > div.container.content > div > div.col-md-8 > div > div > table > tbody').each(function (a, b) {
$(b).find('tr').each(function (c, d) {
let tanggal = $(d).find('td:nth-child(2)').text().trim()
let koordinat = $(d).find('td:nth-child(3)').text().trim()
let magnitudo = $(d).find('td:nth-child(4)').text().trim()
let kedalaman = $(d).find('td:nth-child(5)').text().trim()
let skala = $(d).find('td:nth-child(6) > a').text().trim()
const data = {
author: 'Ra bot',
status: link.status,
result: {
tanggal: tanggal,
koordinat: koordinat,
getaran: magnitudo,
kedalaman: kedalaman,
skala: skala
}
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function cnn() {
try {
const link = await axios.get('https://www.cnnindonesia.com/')
const $ = cheerio.load(link.data)
let hasil = []
$('#content > div > div.l_content > div.box.feed.berita_terbaru_lst > div.list.media_rows.middle').each(function (a, b) {
$(b).find('article').each(function (c, d) {
let judul = $(d).find('a > span.box_text > h2').text().trim() || '-'
let tema = $(d).find('a > span.box_text > span.kanal').text().trim() || '-'
let publik = $(d).find('a > span.box_text > span.date').text().trim() || '-'
let thumb = $(d).find('a > span.ratiobox.ratio_16_9.box_img > span > img').attr('src') || '-'
let url = $(d).find('a').attr('href') || '-'
const data = {
author: 'Ra bot',
status: link.status,
result: {
judul: judul,
tema: tema,
rilis: publik,
thumb: thumb,
url: url
}
}
hasil.push(data)
})
})
return hasil
} catch (err) {
var notFond = {
author: 'Ra bot',
status: link.status,
Pesan: 'ERROR HUBUNGI OWNER 082149344210'
}
return notFond
}
}
async function photoManipulation(namaFile, path, effectId) {
const hasil = []
const fd = new FormData();
fd.append('name', `${namaFile}`)
fd.append('file', fs.createReadStream(`${path}`))
await axios( {
method: "POST",
url: "https://photomania.net/upload/file",
headers: fd.getHeaders(),
data: fd
}).then(async res => {
const formData = {
photoId: `${res.data.id}`,
effectId: `${effectId}`
}
await axios(`https://photomania.net/render`, {
method: "POST",
data: new URLSearchParams(Object.entries(formData)),
headers: {
"accept": "application/json, text/javascript, /; q=0.01",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
const result = {
status: respon .status,
author: "I`am Ra",
result: {
url: respon.data.url,
url_secury: respon.data.url_secure,
ukuran: respon.data.width + ' x ' + respon.data.height,
explayet: respon.data.expires_at
}
}
hasil.push(result)
return result
})
})
return hasil[0]
}
async function ToVid(path) {
return new Promise(async (resolve, reject) => {
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
await axios({
url: "https://s7.ezgif.com/webp-to-mp4",
method: "POST",
headers: BodyForm.getHeaders(),
data: BodyForm
}).then(res => {
const $ = cheerio.load(res.data)
let File = $('#main > form').find('input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
let Submit = $('#tool-submit-button').find('input').attr('value')
const Format = {
file: File,
token: token,
convert: Submit
}
axios({
url: "https://ezgif.com/webp-to-mp4/" + File,
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(({ data, status}) => {
const ch = cheerio.load(data)
let link = ch('#output > p.outfile').find('video > source').attr('src')
const result = {
status: status,
data: "https:" + link
}
resolve(result)
}).catch(reject)
})
})
}
async function fbDownloader(Link) {
return new Promise (async (resolve, reject) => {
const BodyForm = {
url: Link
}
await axios({
url: "https://www.getfvid.com/downloader",
method: "POST",
data: new URLSearchParams(Object.entries(BodyForm)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(respon => {
const $ = cheerio.load(respon.data)
let HD = $("body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered").find('div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(1) > a').attr('href')
let Normal = $("body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered").find('div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(2) > a').attr("href")
const result = {
status: respon.status,
author: "I`am RA",
result: {
link_hd: HD,
normal: Normal
}
}
resolve(result)
}).catch(reject)
})
}
async function SpeedVid(path, kecepatan) {
return new Promise(async (resolve, reject) => {
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
BodyForm.append('upload', 'Upload video!')
await axios({
url: "https://s3.ezgif.com/video-speed",
method: "POST",
data: BodyForm,
headers: BodyForm.getHeaders()
}).then(({ data }) => {
const $ = cheerio.load(data)
let File = $('#main > form').find(' input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
const Format = {
file: File,
token: token,
multiplier: kecepatan,
apply_audio: "on"
}
axios({
url: `https://s3.ezgif.com/video-speed/${File}?ajax=true`,
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
const ch = cheerio.load(respon.data)
let result = {
status: respon.status,
author: "I`am Ra",
data: 'https:' + ch('p').find('video > source').attr('src')
}
resolve(result)
}).catch(reject)
})
})
}
async function ReverseVid (path, audio) {
return new Promise(async (resolve, reject) => {
function muteOrno(audioo ,File, token) {
if (audioo === true) {
const Format = {
file: File,
token: token,
audio: "on",
encoding: "original"
}
return Format
} else if (audioo === false) {
const Format = {
file: File,
token: token,
mute: "on",
encoding: "original"
}
return Format
} else {
const Format = {
file: File,
token: token,
audio: "on",
encoding: "original"
}
return Format
}
}
const BodyForm = new FormData()
BodyForm.append('new-image', fs.createReadStream(path))
BodyForm.append('new-image-url', '')
BodyForm.append('upload', 'Upload video!')
await axios({
url: "https://s3.ezgif.com/reverse-video",
method: 'POST',
data: BodyForm,
headers: BodyForm.getHeaders()
}).then(async respon => {
const $ = cheerio.load(respon.data)
let File = $('#main > form').find('input[type=hidden]:nth-child(1)').attr('value')
let token = $('#main > form').find('input[type=hidden]:nth-child(2)').attr('value')
const Format = await muteOrno(audio, File, token)
axios(`https://s3.ezgif.com/reverse-video/${File}?ajax=true`, {
method: "POST",
data: new URLSearchParams(Object.entries(Format)),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""
}
}).then(res => {
const ch = cheerio.load(res.data)
let Link = ch('p > video').find('source').attr('src')
let Type = ch('p > video').find('source').attr('type')
const result = {
status: res.status,
created: "I`am Ra",
result: {
link: "https:" + Link,
type: Type
}
}
resolve(result)
}).catch(reject)
}).catch(reject)
})
}
async function GSMArena(querry) {
const link = await axios.get(`https://www.gsmarena.com/res.php3?sSearch=${querry}`)
const ch = cheerio.load(link.data)
let Url = ch('#review-body > div > ul').find('li:nth-child(1) > a').attr('href')
const Link = await axios.get(`https://www.gsmarena.com/${Url}`)
let $ = cheerio.load(Link.data)
let barang = $('#body > div > div.review-header > div').find(' div.article-info-line.page-specs.light.border-bottom > h1').text().trim()
let rilis = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(1) > span').text().trim()
let thumb = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > div > a > img').attr('src')
let ukuran = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(3) > span').text().trim()
let tipe = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(5) > span').text().trim()
let storage = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.specs-brief.pattern > span:nth-child(7) > span').text().trim()
let display = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-display > div').text().trim()
let inchi = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-display > strong > span').text().trim()
let camPix = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > strong > span:nth-child(1)').text().trim()
let Mp = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > strong > span:nth-child(2)').text().trim()
let VideoVix = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-camera > div').text().trim()
let Ram = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > strong > span:nth-child(2)').text().trim()
let chipset = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > div').text().trim()
let batre = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > strong > span:nth-child(1)').text().trim()
let Mah = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > strong > span:nth-child(2)').text().trim()
let merekBatre = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-battery > div').text().trim()
let AngkaRam = $('#body > div > div.review-header > div').find('div.center-stage.light.nobg.specs-accent > ul > li.help.accented.help-expansion > strong > span:nth-child(1)').text().trim()
let detail = []
$('#specs-list').each(function (anu, RA) {
let isi = $(RA).text().trim()
detail.push(isi)
})
const result = {
status: Link.status,
author: "I`am Ra",
result: {
judul: barang,
rilis: rilis,
thumb: thumb,
ukuran: ukuran,
type: tipe,
storage: storage,
display: display,
inchi: inchi,
pixel: camPix + Mp,
videoPixel: VideoVix,
ram: AngkaRam + Ram,
chipset: chipset,
batrai: batre + Mah,
merek_batre: merekBatre,
detail: detail[0]
}
}
return result
}
async function zodiakMing(querry) {
const link = await axios.get(`https://www.fimela.com/zodiak/${querry}/minggu-ini`)
const $ = cheerio.load(link.data)
let thumb = $('body > div > div > div').find('div > div > a > img').attr('src')
let judul = $('body > div > div > div').find('div > div > div.zodiak--content-header__text > h5').text().trim()
let date = $('body > div > div > div').find('div> div.zodiak--content-header__text > span').text().trim()
let hoki = $('body > div > div > div > div').find('div > div > div:nth-child(1) > div > span').text().trim()
let umum = $('body > div > div > div > div').find(' div > div > div:nth-child(1) > div > p').text().trim()
let love = $('body > div > div > div > div').find(' div > div > div:nth-child(2) > div > p').text().trim()
let keuangan = $('body > div > div > div > div').find(' div > div > div:nth-child(3) > div > p').text().trim()
const result = {
status: link.status,
data: {
judul: judul,
thumb: thumb,
date: date,
nomer_hoki: hoki,
isi: {
umum: umum,
love: love,
keuangan: keuangan
}
}
}
return result
}
async function zodiakHar (querry) {
let Hasil = []
await axios.request(`https://www.fimela.com/zodiak/${querry}`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(({ data}) => {
const $ = cheerio.load(data)
let thumb = $('body > div > div > div').find('div > div > a > img').attr('src')
let judul = $('body > div > div.container-main > div.container-article > div').find('div.zodiak--content-header__right > div.zodiak--content-header__text > h5').text().trim()
let tanggal = $('body > div > div > div > div > div > div > span').text().trim()
let nomer_ = $('body > div > div > div > div > div > div').find('div:nth-child(1) > div.zodiak--content__content > span').text().trim()
let isi = []
$('body > div > div > div > div > div > div').each(function (anu, RA) {
let umum = $(RA).find('div:nth-child(1) > div.zodiak--content__content > p').text().trim() || undefined
let love = $(RA).find('div:nth-child(2) > div.zodiak--content__content > p').text().trim() || undefined
let keuangan = $(RA).find('div:nth-child(3) > div.zodiak--content__content > p').text().trim() || undefined
let Data = {
umum: umum,
love: love,
keuangan: keuangan
}
isi.push(Data)
})
let ramal = []
isi.map(ryuzin => {
if (ryuzin.umum === undefined) return
if (ryuzin.love === undefined) return
if (ryuzin.keuangan === undefined) return
ramal.push(ryuzin)
})
const result = {
judul: judul,
thumb: thumb,
date: tanggal,
no_hoki: nomer_,
teori: ramal[0]
}
Hasil.push(result)
})
return Hasil[0]
}
async function Shoope(item, limit) {
const hasil = []
await axios.request(`https://shopee.co.id/api/v4/search/search_items?by=relevancy&keyword=${item}&limit=${limit}&newest=0&order=desc&page_type=search&scenario=PAGE_GLOBAL_SEARCH&version=2`, {
method: "GET",
data: null,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"if-none-match-": "55b03-856cd63f16112f8a43da6096f97ac3fe",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
hasil.push(respon.data)
})
return hasil[0]
}
async function pinterest(querry) {
let HASIL = []
await axios.request(`https://id.pinterest.com/search/pins/?rs=typed&q=` + querry, {
method: "GET",
url: "https://id.pinterest.com/search/pins/?rs=typed&q="+ querry,
headers: {
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"sec-ch-ua-mobile": "?0",
"upgrade-insecure-requests": "1",
"cookie": "csrftoken=ebe0be3a93cea6072be18633add953a2; _b=\"AVezvd6F4UtE24FUsA6INxipyZZDoSpyCc5vaJK4QDYXmExosVEc4h6WkiKhlVtQ430=\"; cm_sub=denied; fba=True; _ga=GA1.2.862909259.1620474446; g_state={\"i_l\":0}; _auth=1; _pinterest_sess=TWc9PSZ0VEZqZmdDSlJYaGU5REIvNklIcVlnMjE5b0ZraTE5REJVQ0JiMUwxTkZZaGFoVk1sRDVhOFlwQzhkQnQ0YkMwRlNyV0lIWUFlK0ZVTkVxYUhKNmlvZ0R1UXlQYTBRRVVhMU1yYkpmcXpHK3UyNjNhckRqUFFOYVJVa3RnVmJtVzd2MmRGaHFMZUpLNVhtaHptTDhWSnBSdXhZY0FhRnRTN3J1S0V4cGtsVTBxeE54NkF2blVNSFV3R0NTQTR1bVVNRURGVGdnYlN5UjdBbk9YcHVGbGI3a1kwd1dEZDgrZVM1SDc3V0pJMm00OWxKUDVNQjBLVlFocTB4Mjg1M1RnbGxBaFAxbS9MTnVzei91cEQvcjBtakp6N0ZnU2t1Y3NxWW1DRDV1Q3h0ankvQ3FEWGh3MXczcXBHNXJpYVNCMHB6dUoxMGF6ZzVxN2VqQVBoSElSd0tiQk41ZVRPQXlOaGNpNzVQMWJSeVZJbCtYYVMxQ1ZRUFUwalU3eGVzMGRySlNzdWo1NG5uaXNFM3ZpT0o0TkZHR1daUXlwaXFQclMwa04raW9xVnVaTTRSVGEzTE03TVlZcmZYVDd5UmVPd2lZaGw4aE9VMHJBd0tidEsrcHdPWk96RlFMekVLTzY3VU1PL0tIYUdwUE1IWVdJNnJXalBkU09Sb3dEaHlQVVR1T1RqNW5Sc2FRdmVkZmhkMk9HNHBCL0ZpZ3NMdmZvVW9ReVltTFBCTlNLWHpray9LNWJ2UTNvTlBzVm9aZjRvYWRvRFhla0dBNzdveWJVYXZmVFp2cnFFNU5DYUVwSHhxeDlIajNIVTlHaEVYdGptWm5mSGVSRmtIMmQwVVVVZlVCVEh6UHB3TnBtdWV0b2l6L3VTc3pXMXFGN3lHS3ZJM3BwL0NrWVJDMm1HY2tROGxuQVFRNS9OUW45R3dtSk8zeFJidVFSTG1qTG5PelAvKzd3T3lrN1NoKzBHVGNTY1pGSEY0bW8xcGVmc3NtclBhTWE2QUMxOXNpQWUwRmo4UHl0ZGpwUzhUQXVhbjYwT0ZJeHhHai8yOWFUVTA1Wkx2czN4VSttLzMvbkFVQ2svWnZvNC9xZ3E4VkhYSFZ5elo4TzhtU0o5c3ZDcEJyYjE3QVI1WHlmTTFhWThvWHQ1T0tSTWRsWnI3a1lpU245dEVLd1lZSXRremtkTUZmcVA2YUg0c1UrSk1JOWJVRzZpcWd3T0NVaFZkdUh3UUdURi9sbDBqT2pBZVV2ZnlTQzc5ZnBMYkFMQ1ZsWjdIYWcmaDc1Uk5kK2I4MjFMUXBaVUthci9rVHpCUWRvPQ==; _pinterest_cm=\"TWc9PSYxZnpkMS9XN29Rd2R0TnpBN0RzVktja1J4NUtINUJqRzNGODFXS0xES1pndWlNVm52a0d3V0JocmVIS3p5eDdnNXNZa0hGelNQNDBSTFRId3ZhTFFIQjRGOW1lNlJZMzFiVlg1MHhSOFpmMGhRZUoySUpJZDIyWlVYMjRXNHRaL1lodFl4eW1jWjNyTklpbytYbHZyd29nRm5DY0pQOGgyUWpDdk9zQ1craXR5VEZoNHV4ZzRnOXV4SUFFSStYZCsmT08zMFI1bktXa3pwSDFtK3NNRWpxWWNpQzNzPQ==\"; _routing_id=\"595f24cd-7f4c-4495-aa67-37212d099cd8\"; sessionFunnelEventLogged=1"
}
}).then(res => {
const $ = cheerio.load(res.data)
let hasil = []
$('body > div > div > div > div > div > div > div > div > div > div > div').each(function (a, b) {
$(b).find('div').each(function (c, d) {
let Link = $(d).find('div > div > div > div > a').find('img').attr('src')
hasil.push(Link)
})
})
let Data = []
hasil.map(V => {
if (V === undefined) return
Data.push(V.replace('236x', 'originals'))
})
let FilterArray = new Set(Data)
let unique = [...FilterArray]
const result = {
status: res.status,
author: "I`am Ra",
result: unique
}
HASIL.push(result)
})
return HASIL[0]
}
async function TiktokDown (link) {
return new Promise (async (resolve, reject) => {
await axios.request(`https://toksaver.com/convertok?url=` + link, {
method: "GET",
data: null,
headers: {
"accept": "/",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
}).then(res => {
resolve(res.data)
}).catch(reject)
})
}
function jagokata(input) {
return new Promise((resolve, reject) => {
axios.get('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1')
.then(res => {
const $ = cheerio.load(res.data)
data = []
$('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) {
x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim()
y = $(this).find('span[class="auteur-beschrijving"]').text().trim()
z = $(element).find('q[class="fbquote"]').text().trim()
data.push({ author: x, bio: y, quote: z })
})
data.splice(2, 1)
if (data.length == 0) return resolve({ status: false })
resolve({ status: true, result: data })
}).catch(reject)
})
}
module.exports.jagokata = jagokata
module.exports.RandomCerpen = RandomCerpen
module.exports.emoji = emoji
module.exports.stickerSearch = stickerSearch
module.exports.ManggaToon = ManggaToon
module.exports.RamalJadian = RamalJadian
module.exports.Pantun = Pantun
module.exports.trutdare = trutdare
module.exports.SearchFilm = SearchFilm
module.exports.infoFilm123 = infoFilm123
module.exports.FaktaUnik = FaktaUnik
module.exports.Liriklagu = Liriklagu
module.exports.Otakudesu = Otakudesu
module.exports.wikipedia = wikipedia
module.exports.corona = corona
module.exports.cuaca = cuaca
module.exports.FilmApik23 = FilmApik23
module.exports.Gempa = Gempa
module.exports.cnn = cnn
module.exports.TiktokDownloader = TiktokDownloader
module.exports.uploadFile = uploadFile
module.exports.ytPlay = ytPlay
module.exports.igDownloader = igDownloader
module.exports.ssstik_io = ssstik_io
module.exports.photoManipulation = photoManipulation
module.exports.ToVid = ToVid
module.exports.fbDownloader = fbDownloader
module.exports.SpeedVid = SpeedVid
module.exports.ReverseVid = ReverseVid
module.exports.GSMArena = GSMArena
module.exports.zodiakMing = zodiakMing
module.exports.zodiakHar = zodiakHar
module.exports.Shoope = Shoope
module.exports.pinterest = pinterest
module.exports.TiktokDown = TiktokDown
================================================
FILE: Zimbot/index4.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const axios_1 = __importDefault(require("axios"));
const cheerio_1 = __importDefault(require("cheerio"));
const form_data_1 = __importDefault(require("form-data"));
const fs_1 = __importDefault(require("fs"));
const got_1 = __importDefault(require("got"));
function ManggaToon(querry) {
return __awaiter(this, void 0, void 0, function* () {
try {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield axios_1.default(`https://mangatoon.mobi/id/search?word=${querry}`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
}
}).then(response => {
if (response.status !== 200)
return;
const $ = cheerio_1.default.load(response.data);
const hasil = [];
$('#page-content > div.search-page > div > div.comics-result > div.recommended-wrap > div').each(function (_a, b) {
$(b).find('div').each(function (_c, d) {
const judul = $(d).find('div.recommend-comics-title > span').text().trim();
const tema = $(d).find('div.comics-type > span').text().trim();
const thumb = $(d).find('a > div > img').attr('src');
const url = $(d).find('a').attr('href');
const result = {
judul: judul,
tema: tema,
thumb: thumb,
url: "https://mangatoon.mobi" + url
};
hasil.push(result);
});
});
const data = [];
hasil.map(v => {
if (v.judul === undefined)
return;
if (v.tema === undefined)
return;
if (v.thumb === undefined)
return;
if (v.url.replace(/[https:\/\/mangatoon.mobi]/, '') === undefined)
return;
data.push(v);
});
const result = {
status: response.status,
author: "I`am Ra",
data: data
};
resolve(result);
}).catch(reject);
}));
}
catch (err) {
return err;
}
});
}
function EmojiScrapper(emoji) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const emot = encodeURIComponent(emoji);
yield axios_1.default.request({
url: `https://emojipedia.org/${emot}/`,
method: "GET"
}).then(respon => {
if (respon.status !== 200)
return;
const $ = cheerio_1.default.load(respon.data);
const emot = [];
const hasil = [];
$('body > div > div > article > section > ul').each(function (_chuwi, Tyuzu) {
$(Tyuzu).find('li').each(function (_ryu, itzy) {
const nama = $(itzy).find('div > div > img').attr('alt');
const image = $(itzy).find('div > div > img').attr('srcset');
const result = {
name: nama,
image: image
};
emot.push(result);
});
});
emot.map(tyuzu => {
if (tyuzu.name === undefined)
return;
if (tyuzu.image === undefined)
return;
hasil.push({ name: tyuzu.name, image: tyuzu.image.replace('2x ', '') });
});
const res = {
status: respon.status,
emoticon: hasil
};
resolve(res);
}).catch(reject);
}));
});
}
function RandomCerpen() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const link = yield axios_1.default.get(`http://cerpenmu.com/`);
if (link.status !== 200)
return;
const $ = cheerio_1.default.load(link.data);
const link_input = [];
$('#sidebar > div:nth-child(9) > ul').each(function (_a, b) {
$(b).find('li').each(function (_tyu, zu) {
const url = $(zu).find('a').attr('href');
link_input.push(url);
});
});
const random = link_input[Math.floor(Math.random() * (link_input.length))];
const Url = yield axios_1.default.get(random);
if (Url.status !== 200)
resolve({ status: Url.status, mess: "ERROR" });
const ch = cheerio_1.default.load(Url.data);
const Data = [];
ch('#content > article').each(function (_hm, to) {
ch(to).find('article').each(function (_chu, chuwi) {
const Url = ch(chuwi).find('h2 > a').attr('href');
Data.push(Url);
});
});
const acak = Data[Math.floor(Math.random() * (Data.length))];
yield axios_1.default.get(acak).then(respon => {
if (respon.status !== 200)
return;
const $ = cheerio_1.default.load(respon.data);
const judul = $('#content').find('article > h1').text().trim();
const kategori = $('#content').find('article > a:nth-child(4)').text().trim();
const cerita = $('#content').find('article').text().trim();
const res = {
status: respon.status,
author: "I`am RA",
data: {
judul: judul,
kategori: kategori,
cerita: cerita
}
};
resolve(res);
}).catch(reject);
}));
});
}
function StickerSearch(querry) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield axios_1.default.get(`https://getstickerpack.com/stickers?query=` + querry).then((res) => __awaiter(this, void 0, void 0, function* () {
const $ = cheerio_1.default.load(res.data);
const Data = [];
$('#stickerPacks > div > div:nth-child(3)').each(function (_a, b) {
$(b).find('div').each(function (_c, d) {
const url = $(d).find('a').attr('href');
Data.push(url);
});
});
const data = [];
Data.map(tyuzu => {
if (tyuzu === undefined)
return;
data.push(tyuzu);
});
const random = data[Math.floor(Math.random() * (data.length))];
yield axios_1.default.get(random).then(respon => {
const $ = cheerio_1.default.load(respon.data);
const Sticker = [];
$('#stickerPack > div > div.row').each(function (_a, b) {
$(b).find('div').each(function (_c, d) {
const sticker = $(d).find('img').attr('data-src-large');
Sticker.push(sticker);
});
});
const data = [];
Sticker.map(tyuzu => {
if (tyuzu === undefined)
return;
data.push(tyuzu);
});
const Format = {
judul: $('#intro').find('div > div > h1').text().trim(),
creator: $('#intro').find('div > div > h5 > a').text().trim(),
sticker: data
};
const result = {
status: respon.status,
author: "I`am RA",
data: Format
};
resolve(result);
}).catch(reject);
}));
}));
});
}
function UploadFile(_path) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, rejects) => __awaiter(this, void 0, void 0, function* () {
const BodyForm = new form_data_1.default();
const FileSys = fs_1.default.createReadStream(_path);
BodyForm.append('files[]', FileSys);
yield axios_1.default({
url: "https://uguu.se/upload.php",
method: "POST",
data: BodyForm,
headers: Object.assign({ "accept": "*/*", "accept-language": "en-US,en;q=0.9,id;q=0.8" }, BodyForm.getHeaders())
}).then(respon => {
const result = {
author: 'Created by Ra',
status: respon.data.success ? 200 : 404,
result: {
url: respon.data.files[0].name,
namaFile: respon.data.files[0].url,
size: respon.data.files[0].size,
hash: respon.data.files[0].hash
}
};
resolve(result);
}).catch(rejects);
}));
});
}
function igDownload(Link) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const Form = {
url: Link,
submit: ""
};
yield axios_1.default(`https://downloadgram.org/`, {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1695343126.1621491858; _gid=GA1.2.28178724.1621491859; __gads=ID=8f9d3ef930e9a07b-2258e672bec80081:T=1621491859:RT=1621491859:S=ALNI_MbqLxhztDiYZttJFX2SkvYei6uGOw; __atuvc=3%7C20; __atuvs=60a6eb107a17dd75000; __atssc=google%3B2; _gat_gtag_UA_142480840_1=1"
},
}).then((res) => __awaiter(this, void 0, void 0, function* () {
const $ = cheerio_1.default.load(res.data);
const url = $('#downloadBox').find('a').attr('href');
yield axios_1.default(Link, {
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "ig_did=08A3C465-7D43-4D8A-806A-88F98384E63B; ig_nrcb=1; mid=X_ipMwALAAFgQ7AftbrkhIDIdXJ8; fbm_124024574287414=base_domain=.instagram.com; shbid=17905; ds_user_id=14221286336; csrftoken=fXHAj5U3mcJihQEyVXfyCzcg46lHx7QD; sessionid=14221286336%3A5n4czHpQ0GRzlq%3A28; shbts=1621491639.7673564; rur=FTW"
}
}).then(respon => {
const ch = cheerio_1.default.load(respon.data);
const title = ch('title').text().trim();
const result = {
author: "RA BOT",
result: {
link: url,
desc: title,
LinkAwal: Link
}
};
resolve(result);
}).catch(reject);
}));
}));
});
}
function Pantun() {
const pantun = JSON.parse(fs_1.default.readFileSync('./database/pantun.json').toString());
const acak = pantun[Math.floor(Math.random() * (pantun.length))];
return acak;
}
function TruthOrDare(querry) {
const result = JSON.parse(fs_1.default.readFileSync('./database/truthdare.json').toString());
if (querry === 'truth id') {
const res = result.Truth.id[Math.floor(Math.random() * result.Truth.id.length)];
return res;
}
else if (querry === 'truth eng') {
const res = result.Truth.eng[Math.floor(Math.random() * result.Truth.eng.length)];
return res;
}
else if (querry === 'dare id') {
const res = result.Dare.id[Math.floor(Math.random() * result.Dare.id.length)];
return res;
}
else if (querry === 'dare eng') {
const res = result.Dare.eng[Math.floor(Math.random() * result.Dare.eng.length)];
return res;
}
else {
return `Querry tidak terdaftar dimenu harap masukkan dengan benar.\n\ncara pakai :\n1. TruthOrDare ('truth id')\n2. TruthOrDare('truth eng')\n3. TruthOrDare ('dare id')\n4. TruthOrDare ('dare eng')`;
}
}
function SearchFilm(querry) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield got_1.default.get(`http://167.99.31.48/?s=${querry}`).then(respon => {
const $ = cheerio_1.default.load(respon.body);
const hasil = [];
$('#content > div > div.los').each(function (a, b) {
$(b).find('article').each(function (tyu, zu) {
const judul = $(zu).find('div > a > div > div > header > h2').text().trim();
const thumb = $(zu).find('div > a > div > img').attr('src');
const kualitas = $(zu).find('div > a > div > div > span').text().trim();
const Url = $(zu).find('div > a').attr('href');
const result = {
judul: judul,
thumb: thumb,
quality: kualitas,
link: Url
};
hasil.push(result);
});
});
resolve(hasil);
}).catch(reject);
}));
});
}
function OtakudesuSearch(querry) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield got_1.default(`https://otakudesu.moe/?s=${querry}&post_type=anime`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
}
}).then(respon => {
const $ = cheerio_1.default.load(respon.body);
const hasil = [];
$('#venkonten > div > div.venser > div > div').each(function (a, b) {
$(b).find('ul > li').each(function (c, d) {
const judul = $(d).find('h2 > a').text().trim();
const Url = $(d).find('h2 > a').attr('href');
const thumb = $(d).find('img').attr('src');
const rating = $(d).find('div:nth-child(5)').text().trim();
const status = $(d).find('div:nth-child(4)').text().trim();
const Genre = $(d).find('div:nth-child(3)').text().trim();
const Result = {
judul: judul,
thumb: thumb,
url: Url,
rating: rating.replace(/[Rating :]/g, ''),
status: status.replace(/[Status : ]/g, ''),
genre: Genre.replace(/[Genres : ]/g, '')
};
hasil.push(Result);
});
});
const Data = {
status: respon.statusCode,
author: "I`am Ra",
result: hasil
};
resolve(Data);
}).catch(reject);
}));
});
}
function InfoOtakudesu(URL) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield got_1.default.get(URL, {
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
}
}).then(res => {
const $ = cheerio_1.default.load(res.body);
const hasil = [];
const thumb = $('#venkonten').find('div.venser > div.fotoanime > img').attr('src');
const sinopsis = [];
$('#venkonten > div.venser > div.fotoanime > div.infozin > div').each(function (a, b) {
$(b).find('span').each(function (tyu, zu) {
const Data = $(zu).text().trim();
hasil.push(Data);
});
});
$('#venkonten > div.venser').find('div.fotoanime > div.sinopc').each(function (c, d) {
const Data = $(d).find('p').text().trim();
sinopsis.push(Data);
});
let Bio = "";
for (const i of hasil) {
Bio += i + "\n";
}
const Result = {
status: res.statusCode,
author: "I`am Ra",
result: {
thumb: thumb,
bio: Bio,
sinopsis: sinopsis[0]
}
};
resolve(Result);
}).catch(reject);
}));
});
}
function Musikmatch(querry) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
yield got_1.default.get(`https://www.musixmatch.com/search/${querry}`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
}
}).then(({ body }) => __awaiter(this, void 0, void 0, function* () {
const $ = cheerio_1.default.load(body);
const Url = $('#search-all-results > div.main-panel > div').find('div.box-content > div > ul > li > div > div.media-card-body > div > h2 > a').attr('href');
yield got_1.default(`https://www.musixmatch.com${Url}`, {
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
}
}).then(res => {
const $ = cheerio_1.default.load(res.body);
const judul = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-10.col-md-8.col-ml-9.col-lg-9.static-position > div.track-title-header > div.mxm-track-title > h1').text().trim();
const artis = $('#site > div > div > div > main > div > div > div > div > div > div > div> div > div > h2 > span').text().trim();
const thumb = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div').find('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div > img').attr('src');
const lirik = [];
$('#site > div > div > div > main > div > div > div.mxm-track-lyrics-container').find('div.container > div > div > div > div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function (a, b) {
const isi = $(b).find('span').text().trim();
lirik.push(isi);
});
const result = {
status: res.statusCode,
author: "I`am Ra",
result: {
judul: judul.replace('Lyrics', ''),
penyanyi: artis,
thumb: "https:" + thumb,
lirik: lirik[0]
}
};
resolve(result);
});
})).catch(reject);
}));
});
}
function Snaptik (Url) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const BodyForm = new form_data_1.default();
BodyForm.append('url', encodeURI(Url));
yield axios_1.default({
url: "https://snaptik.app/action.php?lang=ID",
method: "POST",
data: BodyForm,
headers: Object.assign({ "accept": "*/*", "accept-language": "en-US,en;q=0.9,id;q=0.8", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" }, BodyForm.getHeaders())
}).then(respon => {
const $ = cheerio_1.default.load(respon.data);
const result = {
status: respon.status,
author: "Ra",
result: {
judul: $('div.zhay-middle.center').find('h1 > a').text().trim(),
caption: $('div.zhay-middle.center').find("p:nth-child(2) > span").text().trim(),
tanggal: $('div.zhay-middle.center > p:nth-child(3)').text().trim(),
thumb: $("div.zhay-left.left").find('img').attr('src'),
link1: 'https://snaptik.app' + $('div.zhay-right.is-desktop-only.right').find('div > a:nth-child(1)').attr('href'),
link2: 'https://snaptik.app' + $('div.zhay-right.is-desktop-only.right').find('div > a:nth-child(2)').attr('href'),
link3: 'https://snaptik.app' + $('div.zhay-right.is-desktop-only.right').find("div > a:nth-child(3)").attr('href')
}
};
resolve(result);
}).catch(reject);
}));
});
}
module.exports.ManggaToon = ManggaToon;
module.exports.EmojiScrapper = EmojiScrapper;
module.exports.RandomCerpen = RandomCerpen;
module.exports.StickerSearch = StickerSearch;
module.exports.UploadFile = UploadFile;
module.exports.igDownload = igDownload;
module.exports.Pantun = Pantun;
module.exports.TruthOrDare = TruthOrDare;
module.exports.SearchFilm = SearchFilm;
module.exports.OtakudesuSearch = OtakudesuSearch;
module.exports.InfoOtakudesu = InfoOtakudesu;
module.exports.Musikmatch = Musikmatch;
module.exports.Snaptik = Snaptik;
================================================
FILE: Zimbot/index5.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require('axios')
const _math = require('mathjs')
const _url = require('url')
const request = require('request');
//const wa = require('./whatsapp/message')
function randomarray(url) {
return url[Math.floor(Math.random() * url.length)]
}
exports.randomtt = async(query) => {
return new Promise((resolve,reject) => {
axios.get('https://brainans.com/search?query=' + query)
.then(({data}) => {
const $ = cheerio.load(data)
const luser = $('#search-container > div:nth-child(1) > div.content__text > a').attr('href')
axios.get('https://brainans.com/' + luser)
.then(({data}) => {
const $$ = cheerio.load(data)
vlink = [];
$$('#videos_container > div > div.content__list.grid.infinite_scroll.cards > div > div > a').each(function(a, b){
vlink.push('https://brainans.com/' + $$(b).attr('href'))
})
randomarray(vlink).then(res => {
axios.get(res)
.then(({data}) => {
const $$$ = cheerio.load(data)
resolve({
username: $$$('#card-page > div > div.row > div > div > div > div > div.main__user-desc.align-self-center.ml-2 > a').text(),
caption: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__list').text(),
like_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div > div:nth-child(1) > span').text(),
comment_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(2) > span').text(),
share_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(3) > span').text(),
videourl: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__image-container > div > video').attr('src')
})
})
})
})
})
})
}
exports.trendtwit = (country) => {
return new Promise((resolve,reject) => {
axios.get(`https://getdaytrends.com/${country}/`)
.then(({ data }) => {
const $ = cheerio.load(data)
const hastag = [];
const tweet = [];
const result = [];
$('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr> td.main > a').each(function(a, b){
deta = $(b).text()
hastag.push(deta)
})
$('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr > td.main > div > span').each(function(a, b){
deta = $(b).text()
tweet.push(deta)
})
num = 1
for(let i=0; i {
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
exports.zerochan = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://www.zerochan.net/search?q=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const judul = [];
const result = [];
const id = [];
$('#thumbs2 > li > a > img').each(function(a,b) {
if(!$(b).attr('alt').startsWith('https://static.zerochan.net/')){
judul.push($(b).attr('alt'))
}
})
$('#thumbs2 > li > a').each(function(a, b) {
id.push($(b).attr('href'))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get(link)
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const jlink = [];
const result = [];
const title = $('body > div > div.container-left > section:nth-child(1) > div > h1').text()
const info = $('body > div > div.container-left > section:nth-child(1) > div > ul').text()
$('body > div.container-row.clearfix.container-wrap.pdt-font-container > div.container-left > section:nth-child(1) > div:nth-child(11) > div:nth-child(3) > div > p > a').each(function(a, b) {
deta = $(b).text();
jlink.push(deta)
if($(b).attr('href').startsWith('/')){
link.push('https://happymod.com' + $(b).attr('href'))
}
else{
link.push($(b).attr('href'))
}
})
for(let i=0; i {
return new Promise(async(resolve,reject) => {
axios.get(link)
.then(({ data }) => {
const $$ = cheerio.load(data)
const format = {
judul : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
views : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
comment : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
link : $$('video > source').attr('src')
}
const result = {
creator: 'Fajar Ihsana',
data : format
}
resolve(result)
})
.catch(reject)
})
}
exports.chara = async(query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/characters/all?name=${query}&sort=likes&order=desc`)
.then((data) => {
const $ = cheerio.load(data.data)
const linkp = $('#siteContainer > table > tbody > tr:nth-child(1) > td.tableCharInfo > a').attr('href')
axios.get('https://www.anime-planet.com' + linkp)
.then((data) => {
//console.log(data.data)
const $$ = cheerio.load(data.data)
resolve({
nama: $$('#siteContainer > h1').text(),
gender: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(1)').text().split('\nGender: ')[1],
warna_rambut: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(2)').text().split('\nHair Color: ')[1],
warna_mata: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(1) > div').text().split('\n')[1],
gol_darah: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(2) > div').text().split('\n')[1],
birthday: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(3) > div').text().split('\n')[1],
description: $$('#siteContainer > section:nth-child(11) > div > div > div > div:nth-child(1) > p').text()
})
})
})
.catch(reject)
})
}
exports.anime = async(query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const result = [];
const judul = [];
const link = [];
const thumb = [];
$('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
link.push('https://www.anime-planet.com' + $(b).attr('href'))
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
})
for(let i=0; i {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const result = [];
const judul = [];
const link = [];
const thumb = [];
$('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
link.push('https://www.anime-planet.com' + $(b).attr('href'))
})
$('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
})
for(let i=0; i {
return new Promise((resolve, reject) => {
axios.get(`https://www.jobstreet.co.id/id/job-search/${query}-jobs/`)
.then((data) => {
//console.log(data.data)
const $ = cheerio.load(data.data)
const job = [];
const perusahaan = [];
const daerah = [];
const format = [];
const link = [];
const upload = [];
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a > div').each(function(a, b) {
deta = $(b).text();
job.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > span').each(function(a, b) {
deta = $(b).text();
perusahaan.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > span > span').each(function(a, b) {
deta = $(b).text();
daerah.push(deta)
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a').each(function(a, b) {
link.push($(b).attr('href'))
})
$('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div.sx2jih0.zcydq852.zcydq842.zcydq872.zcydq862.zcydq82a.zcydq832.zcydq8d2.zcydq8cq > div.sx2jih0.zcydq832.zcydq8cq.zcydq8c6.zcydq882 > time > span').each(function(a, b) {
deta = $(b).text();
upload.push(deta)
})
for(let i=0; i {
return new Promise((resolve, reject) => {
axios.get(`http://jarakantarkota.com/${kawal}/${ktujuan}/`)
.then((data) => {
const $ = cheerio.load(data.data)
const jarak = $('body > div.content > div > div.b-search-route > div > div > div.col-xs-12.col-sm-12.col-md-12.col-lg-8 > div').text().replace(' ', '')
resolve({
kota_asal: jarak.split(' -')[0],
kota_tujuan: jarak.split('- ')[1].split(' (')[0],
jarak: jarak.split(' (')[1].split(')')[0]
})
})
.catch(reject)
})
}
exports.anoboys = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://anoboy.media/?s=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const format = [];
const link = [];
const judul = [];
const thumb = [];
const uptime = [];
$('body > div.wrap > div.container > div.column-content > a > div > div.amvj > h3').each(function(a,b) {
jud = $(b).text();
judul.push(jud)
})
$('body > div.wrap > div.container > div.column-content > a > div > div.jamup').each(function(c,d) {
upt = $(d).text();
uptime.push(upt)
})
$('body > div.wrap > div.container > div.column-content > a > div > amp-img').each(function(e,f) {
thumb.push($(f).attr('src'))
})
$('body > div.wrap > div.container > div.column-content > a').each(function(g,h) {
link.push($(h).attr('href'))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get(query)
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
judul: $('body > div.wrap > div.container > div.pagetitle > h1').text(),
uptime: $('body > div.wrap > div.container > div.pagetitle > div > div > span > time').text(),
mforu: {
SD: $('#colomb > p > span:nth-child(1) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(1) > a:nth-child(5)').attr('href')
},
zippy: {
SD: $('#colomb > p > span:nth-child(3) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(3) > a:nth-child(5)').attr('href')
},
mirror: {
SD: $('#colomb > p > span:nth-child(5) > a:nth-child(3)').attr('href'),
HD: $('#colomb > p > span:nth-child(5) > a:nth-child(5)').attr('href')
}
})
})
.catch(reject)
})
}
exports.film = async(query) => {
return new Promise((resolve, reject) => {
axios.get(`http://167.99.71.200/?s=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const judul = [];
const genre = [];
const thumb = [];
const link = [];
const format = [];
$('div > div.item-article > header > h2 > a').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('div > div.item-article > header > div.gmr-movie-on').each(function(a, b) {
deta = $(b).text();
genre.push(deta)
})
$('div > div.content-thumbnail.text-center > a > img').each(function(a, b) {
thumb.push($(b).attr('src'))
})
$('div > div.item-article > header > div.gmr-watch-movie > a').each(function(a, b) {
link.push($(b).attr('href'))
})
for(let i=0; i {
return new Promise((resolve, reject) => {
axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
.then((data) => {
const $ = cheerio.load(data.data)
const judul = [];
const genre = [];
const author = [];
const link = [];
const likes = [];
const format = [];
$('#content > div > ul > li > a > div > p.subj').each(function(a, b) {
deta = $(b).text();
judul.push(deta)
})
$('div > ul > li > a > span').each(function(a, b) {
deta = $(b).text();
genre.push(deta)
})
$('div > ul > li > a > div > p.author').each(function(a, b) {
deta = $(b).text();
author.push(deta)
})
$('div > ul > li > a > div > p.grade_area > em').each(function(a, b) {
deta = $(b).text();
likes.push(deta)
})
$('#content > div > ul > li > a').each(function(a, b) {
link.push($(b).attr('href'))
})
for(let i=0; i {
return new Promise((resolve, reject) => {
const options = { method: 'POST',
url:"https://www.klickaud.co/download.php",
headers: { 'content-type': 'application/x-www-form-urlencoded'},
formData: { 'value': link,
'2311a6d881b099dc3820600739d52e64a1e6dcfe55097b5c7c649088c4e50c37': '710c08f2ba36bd969d1cbc68f59797421fcf90ca7cd398f78d67dfd8c3e554e3' } };
request(options, async function (error, response, body) {
console.log(body)
if (error) throw new Error(error);
const $ = cheerio.load(body)
resolve({
judul: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(2)').text(),
download_count: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(3)').text(),
thumb: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(1) > img').attr('src'),
link: $('#dlMP3').attr('onclick').split(`downloadFile('`)[1].split(`',`)[0]
});
});
})
}
exports.igdl = async(link) => {
return new Promise((resolve, reject) => {
const options = { method: 'POST',
url:"https://downloadgram.org/#downloadhere",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
formData: { url: link, submit: '' } };
request(options, async function (error, response, body) {
if (error) throw new Error(error);
const $ = cheerio.load(body)
const result = [];
$('#downloadBox > a').each(function(a, b) {
result.push($(b).attr('href'))
})
resolve(result);
});
})
}
exports.igstalk = async(username) => {
return new Promise(async(resolve, reject) => {
let {data} = await axios('https://www.instagram.com/'+username+'/?__a=1', {
'method': 'GET',
'headers': {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
'cookie': 'ig_did=77ADA31F-4AB0-4D19-8875-522C891A60E6; ig_nrcb=1; csrftoken=Zuy4R9169ejQY0R20InUOfeh2fCh7cfW; ds_user_id=8779859677; sessionid=8779859677%3Az2RfuCb1tsxTh1%3A26; shbid="10275\0548779859677\0541665541164:01f7683f87e5d1e3c2db8b41bfad455d2718c549ac0aeba033c00ae0e25647a7d8b87ee1"; shbts="1634005164\0548779859677\0541665541164:01f7df3ebca9d4ae3ecdb5f3b25d845142e5f462409976c5c140ba803c85bdd15fe0d45e"; rur="EAG\0548779859677\0541665541186:01f7c8bdbba6bfaf1f0fc03d5b843fe864bb908dc49069cc77dd546a9c6b50302d83b608"'
}
})
let user = data.graphql.user
let json = {
creator: '"hardianto02_',
status: 'ok',
code: 200,
username: user.username,
fullname: user.full_name,
verified: user.is_verified,
video_count_reel: user.highlight_reel_count,
followers: user.edge_followed_by.count,
follow: user.edge_follow.count,
is_bussines: user.is_business_account,
is_professional: user.is_professional_account,
category: user.category_name,
thumbnail: user.profile_pic_url_hd,
bio: user.biography,
info_account: data.seo_category_infos
}
resolve(json)
})
}
exports.gempa = async() => {
return new Promise(async(resolve,reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg')
.then(({ data }) => {
const $ = cheerio.load(data)
const drasa = [];
$('table > tbody > tr:nth-child(1) > td:nth-child(6) > span').get().map((rest) => {
dir = $(rest).text();
drasa.push(dir.replace('\t', ' '))
})
teks = ''
for(let i=0; i div > div:nth-child(1) > img').attr('src'),
magnitude : $('table > tbody > tr:nth-child(1) > td:nth-child(4)').text(),
kedalaman: $('table > tbody > tr:nth-child(1) > td:nth-child(5)').text(),
wilayah: $('table > tbody > tr:nth-child(1) > td:nth-child(6) > a').text(),
waktu: $('table > tbody > tr:nth-child(1) > td:nth-child(2)').text(),
lintang_bujur: $('table > tbody > tr:nth-child(1) > td:nth-child(3)').text(),
dirasakan: rasa
}
const result = {
creator: 'Fajar Ihsana',
data: format
}
resolve(result)
})
.catch(reject)
})
}
exports.cariresep = async(query) => {
return new Promise(async(resolve,reject) => {
axios.get('https://resepkoki.id/?s=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const judul = [];
const upload_date = [];
const format = [];
const thumb = [];
$('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-media > a').each(function(a,b){
link.push($(b).attr('href'))
})
$('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-content > header > h3 > a').each(function(c,d){
jud = $(d).text();
judul.push(jud)
})
for( let i = 0; i < link.length; i++){
format.push({
judul : judul[i],
link : link[i]
})
}
const result = {
creator: 'Fajar Ihsana',
data : format
}
resolve(result)
})
.catch(reject)
})
}
exports.bacaresep = async(query) => {
return new Promise(async(resolve,reject) => {
axios.get(query)
.then(({ data }) => {
const $ = cheerio.load(data)
const abahan = [];
const atakaran = [];
const atahap = [];
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-name').each(function(a,b) {
bh = $(b).text();
abahan.push(bh)
})
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-amount').each(function(c,d) {
uk = $(d).text();
atakaran.push(uk)
})
$('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-content > div.single-steps > table > tbody > tr > td.single-step-description > div > p').each(function(e,f) {
th = $(f).text();
atahap.push(th)
})
const judul = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-title.title-hide-in-desktop > h1').text();
const waktu = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-cooking-time > span').text();
const hasil = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-serves > span').text().split(': ')[1]
const level = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-difficulty > span').text().split(': ')[1]
const thumb = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-main-media > img').attr('src')
tbahan = 'bahan\n'
for( let i = 0; i < abahan.length; i++){
tbahan += abahan[i] + ' ' + atakaran[i] + '\n'
}
ttahap = 'tahap\n'
for( let i = 0; i < atahap.length; i++){
ttahap += atahap[i] + '\n\n'
}
const tahap = ttahap
const bahan = tbahan
const result = {
creator : 'Fajar Ihsana',
data : {
judul : judul,
waktu_masak : waktu,
hasil : hasil,
tingkat_kesulitan : level,
thumb : thumb,
bahan : bahan.split('bahan\n')[1],
langkah_langkah : tahap.split('tahap\n')[1]
}
}
resolve(result)
})
.catch(reject)
})
}
exports.searchgore = async(query) => {
return new Promise(async(resolve,reject) => {
axios.get('https://seegore.com/?s=' + query).then(dataa => {
const $$$ = cheerio.load(dataa)
pagina = $$$('#main > div.container.main-container > div > div.bb-col.col-content > div > div > div > div > nav > ul > li:nth-child(4) > a').text();
rand = Math.floor(Math.random() * pagina) + 1
if(rand === 1){
slink = 'https://seegore.com/?s=' + query
}else{
slink = `https://seegore.com/page/${rand}/?s=${query}`
}
axios.get(slink)
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const judul = [];
const uploader = [];
const format = [];
const thumb = [];
$('#post-items > li > article > div.content > header > h2 > a').each(function(a,b){
link.push($(b).attr('href'))
})
$('#post-items > li > article > div.content > header > h2 > a').each(function(c,d){
jud = $(d).text();
judul.push(jud)
})
$('#post-items > li > article > div.content > header > div > div.bb-cat-links > a').each(function(e,f){
upl = $(f).text();
uploader.push(upl)
})
$('#post-items > li > article > div.post-thumbnail > a > div > img').each(function(g,h){
thumb.push($(h).attr('src'))
})
for( let i = 0; i < link.length; i++){
format.push({
judul : judul[i],
uploader : uploader[i],
thumb : thumb[i],
link : link[i]
})
}
const result = {
creator: 'Fajar Ihsana',
data : format
}
resolve(result)
})
.catch(reject)
})
})
}
exports.randomgore = async() => {
return new Promise(async(resolve,reject) => {
axios.get('https://seegore.com/gore/').then(dataa => {
const $$$ = cheerio.load(dataa)
pagina = $$$('#main > div.container.main-container.bb-stretched-full > div > div > div > div > div > div > nav > ul > li:nth-child(4) > a').text();
rand = Math.floor(Math.random() * pagina) + 1
randvid = Math.floor(Math.random() * 16) + 1
if(rand === 1){
slink = 'https://seegore.com/gore/'
}else{
slink = `https://seegore.com/gore/page/${rand}/`
}
axios.get(slink)
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
const linkp = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a`).attr('href')
const thumbb = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a > div > img`).attr('src')
axios.get(linkp)
.then(({ data }) => {
const $$ = cheerio.load(data)
const format = {
judul : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
views : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
comment : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
thumb : thumbb,
link : $$('video > source').attr('src')
}
const result = {
creator: 'Fajar Ihsana',
data : format
}
resolve(result)
})
})
.catch(reject)
})
})
}
exports.textmakervid = async(text1, style) => {
if(style == 'poly'){
var tstyle = 0
}
else if(style == 'bold'){
var tstyle = 1
}
else if(style == 'glowing'){
var tstyle = 2
}
else if(style == 'colorful'){
var tstyle = 3
}
else if(style == 'army'){
var tstyle = 4
}
else if(style == 'retro'){
var tstyle = 5
}
return new Promise((resolve, reject) => {
const options = { method: 'POST',
url:"https://photooxy.com/other-design/make-a-video-that-spells-your-name-237.html",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
formData: { optionNumber_0: tstyle ,text_1: text1, login: 'OK' } };
request(options, async function (error, response, body) {
if (error) throw new Error(error);
const $ = cheerio.load(body)
const result = {
url: $('div.btn-group > a').attr('href')
}
resolve(result);
});
})
}
exports.bp = async(text) => {
return new Promise((resolve, reject) => {
const options = { method: 'POST',
url:"https://textpro.me/create-blackpink-logo-style-online-1001.html",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
formData: { 'text[]': text, token: '623c625172b158249e4700caf5ec792e',submit: 'Go' } };
request(options, async function (error, response, body) {
if (error) throw new Error(error);
const $ = cheerio.load(body)
const result = {
url: $('#view-image-wrapper > div:nth-child(1) > div > img').attr('src')
}
resolve(result);
});
})
}
exports.apkmirror = async(query) => {
return new Promise((resolve,reject) => {
axios.get('https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const nama = [];
const developer = [];
const lupdate = [];
const size = [];
const down = [];
const version = [];
const link = [];
const format = [];
$('#content > div > div > div.appRow > div > div > div > h5 > a').each(function(a,b) {
nem = $(b).text();
nama.push(nem)
})
$('#content > div > div > div.appRow > div > div > div > a').each(function(c,d) {
dev = $(d).text();
developer.push(dev)
})
$('#content > div > div > div.appRow > div > div > div > div.downloadIconPositioning > a').each(function(e,f) {
link.push('https://www.apkmirror.com' + $(f).attr('href'))
})
$('#content > div > div > div.infoSlide > p > span.infoslide-value').each(function(g,h) {
data = $(h).text();
if(data.match('MB')){
size.push(data)
}
else if(data.match('UTC')){
lupdate.push(data)
}
else if(!isNaN(data) || data.match(',')){
down.push(data)
}
else{
version.push(data)
}
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get(link)
.then(({ data }) => {
const $ = cheerio.load(data)
const nama = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(2) > b').text();
const size = $('#download').text().split('Download File')
const desc = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(7) > center > h1').text();
const type = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(3)').text();
const upload = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(5)').text();
const uploader = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(2)').text();
const download = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(6)').text();
const link = $('#download').attr('href')
other = link.split('/')[7].split('&is')[0]
const format = {
judul: nama + other.substr(other.length - 6).split('.')[1],
size: size[1].split('(')[1].split(')')[0],
type: type,
mime: other.substr(other.length - 6).split('.')[1],
desc: desc,
uploader: uploader,
uploaded: upload.split('\n - Uploaded: ')[1],
download_count : download.split(' - Downloads: ')[1],
link: link
}
const result = {
creator : 'Hanya Orang Biasa',
data : format
}
resolve(result)
})
.catch(reject)
})
}
exports.zippydl = async(link) => {
return new Promise(async(resolve,reject) => {
axios.get(link)
.then(({ data }) => {
const $ = cheerio.load(data)
const nama = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(4)').text();
const size = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(7)').text();
const upload = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(10)').text();
const getlink = async (u) => {
console.log('⏳ ' + `Get Page From : ${u}`)
const zippy = await axios({ method: 'GET', url: u }).then(res => res.data).catch(err => false)
console.log('Done')
const $ = cheerio.load(zippy)
if (!$('#dlbutton').length) {
return { error: true, message: $('#lrbox>div').first().text().trim() }
}
console.log('⏳ ' + 'Fetch Link Download...')
const url = _url.parse($('.flagen').attr('href'), true)
const urlori = _url.parse(u)
const key = url.query['key']
let time;
let dlurl;
try {
time = /var b = ([0-9]+);$/gm.exec($('#dlbutton').next().html())[1]
dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (2 + 2 * 2 + parseInt(time)) + '3/DOWNLOAD'
} catch (error) {
time = _math.evaluate(/ \+ \((.*)\) \+ /gm.exec($('#dlbutton').next().html())[1])
dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (time) + '/DOWNLOAD'
}
console.log('Done')
return dlurl
}
getlink(link).then(res => {
//_(timet)
var result = {
creator : 'Hanya Orang Biasa',
data : {
Judul: nama,
size: size,
uploaded: upload,
link: res
}
}
resolve(result)
})
})
.catch(reject)
})
}
exports.android1 = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://an1.com/tags/MOD/?story=' + query + '&do=search&subaction=search')
.then(({ data }) => {
const $ = cheerio.load(data)
const nama = [];
const link = [];
const rating = [];
const thumb = [];
const developer = [];
const format = [];
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a > span').each(function(a,b) {
nem = $(b).text();
nama.push(nem)
})
$('div > ul > li.current-rating').each(function(c,d) {
rat = $(d).text();
rating.push(rat)
})
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.developer.xsmf.muted').each(function(e,f) {
dev = $(f).text();
developer.push(dev)
})
$('body > div.page > div > div > div.app_list > div > div > div.img > img').each(function(g,h) {
thumb.push($(h).attr('src'))
})
$('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a').each(function(i,j) {
link.push($(j).attr('href'))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://apkmody.io/?s=' + query)
.then(({ data }) => {
//console.log(data)
const $ = cheerio.load(data)
const nama = [];
const link = [];
const mod = [];
const thumb = [];
const format = [];
$('#primary > section:nth-child(3) > div > div > div > article > a > div > div > div > h2').each(function(a,b) {
nem = $(b).text();
nama.push(nem)
})
$('#primary > section:nth-child(3) > div > div > div > article > a > div > div > p').each(function(c,d) {
modd = $(d).text();
mod.push(modd.split('\n')[1])
})
$('#primary > section:nth-child(3) > div > div > div > article > a > div > img').each(function(e,f) {
thumb.push($(f).attr('src'))
})
$('#primary > section:nth-child(3) > div > div > div > article > a').each(function(g,h) {
link.push($(h).attr('href'))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://www.happymod.com/search.html?q=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const nama = [];
const link = [];
const rating = [];
const thumb = [];
const format = [];
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > h3 > a').each(function(a,b) {
nem = $(b).text();
nama.push(nem)
link.push('https://happymod.com' + $(b).attr('href'))
})
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > div.clearfix > span').each(function(c,d) {
rat = $(d).text();
rating.push(rat)
})
$('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > a > img').each(function(e,f) {
thumb.push($(f).attr('data-original'))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://github.com/search?q=' + query + '&type=users')
.then(({ data }) => {
const $ = cheerio.load(data)
const username = [];
const link = [];
const result = [];
const thumb = [];
$('#user_search_results > div > div > div.flex-auto > div > div.f4.text-normal > a.color-text-secondary').each(function(a,b) {
link.push('https://github.com/' + $(b).attr('href'))
usr = $(b).text();
username.push(usr)
})
$('#user_search_results > div > div > div.flex-shrink-0.mr-2 > a > img').each(function(c,d) {
thumb.push($(d).attr('src').replace('s=40&', ''))
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://github.com/'+ query + '?tab=followers')
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
$('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-9.mb-4.mb-md-0 > div > div > div > div.d-table-cell.col-9.v-align-top.pr-3 > a').each(function(a,b) {
link.push('https://github.com/' + $(b).attr('href'))
username.push($(b).attr('href').split('/')[1])
})
for(let i=0; i div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.vcard-names-container.float-left.js-profile-editable-names.col-12.py-3.js-sticky.js-user-profile-sticky-fields > h1 > span.p-nickname.vcard-username.d-block').text().split('\n')[1].replace(' ',''),
followers : $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.d-flex.flex-column > div.js-profile-editable-area.d-flex.flex-column.d-md-block > div.flex-order-1.flex-md-order-none.mt-2.mt-md-0 > div > a:nth-child(1) > span').text(),
avatar : $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.position-relative.d-inline-block.col-2.col-md-12.mr-3.mr-md-0.flex-shrink-0 > a > img').attr('src'),
listfollowers : result
}
resolve(hasil)
})
.catch(reject)
})
}
exports.ghfollowing = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://github.com/'+ query + '?tab=following')
.then(({ data }) => {
const $ = cheerio.load(data)
const link = [];
const result = [];
const username = [];
$('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-9.mb-4.mb-md-0 > div > div > div > div.d-table-cell.col-9.v-align-top.pr-3 > a').each(function(a,b) {
link.push('https://github.com/' + $(b).attr('href'))
username.push($(b).attr('href').split('/')[1])
})
for(let i=0; i div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.vcard-names-container.float-left.js-profile-editable-names.col-12.py-3.js-sticky.js-user-profile-sticky-fields > h1 > span.p-nickname.vcard-username.d-block').text().split('\n')[1].replace(' ',''),
following : $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.d-flex.flex-column > div.js-profile-editable-area.d-flex.flex-column.d-md-block > div.flex-order-1.flex-md-order-none.mt-2.mt-md-0 > div > a:nth-child(1) > span').text(),
avatar : $('#js-pjax-container > div.container-xl.px-3.px-md-4.px-lg-5 > div > div.flex-shrink-0.col-12.col-md-3.mb-4.mb-md-0 > div > div.js-profile-editable-replace > div.clearfix.d-flex.d-md-block.flex-items-center.mb-4.mb-md-0 > div.position-relative.d-inline-block.col-2.col-md-12.mr-3.mr-md-0.flex-shrink-0 > a > img').attr('src'),
listfollowing : result
}
resolve(hasil)
})
.catch(reject)
})
}
exports.corona = async (country) => {
if (!country) return loghandler.noinput;
try {
const res = await axios.request(`https://www.worldometers.info/coronavirus/country/` + country, {
method: "GET",
headers: {
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
}
});
let result = {};
const $ = cheerio.load(res.data);
result.status = res.status
result.negara = $("div").find("h1").text().slice(3).split(/ /g)[0];
result.total_kasus = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(0).text() + " total";
result.total_kematian = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(1).text() + " total";
result.total_sembuh = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(2).text() + " total";
result.informasi = $("div.content-inner > div").eq(1).text();
result.informasi_lengkap = "https://www.worldometers.info/coronavirus/country/" + country;
if(result.negara == ''){
result.status = 'error'
}
return result;
} catch (error404) {
return "=> Error => " + error404;
}
};
exports.mangatoon = async (search) => {
if (!search) return "No Querry Input! Bakaa >\/\/<";
try {
const res = await axios.get(`https://mangatoon.mobi/en/search?word=${search}`, {
method: "GET",
headers: {
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
}
});
const hasil = [];
const $ = cheerio.load(res.data);
$('div.recommend-item').each(function(a, b) {
let comic_name = $(b).find('div.recommend-comics-title > span').text();
let comic_type = $(b).find('div.comics-type > span').text().slice(1).split(/ /g).join("");
let comic_url = $(b).find('a').attr('href');
let comic_thumb = $(b).find('img').attr('src');
const result = {
status: res.status,
creator: "@dehan_j1ng",
comic_name,
comic_type,
comic_url: 'https://mangatoon.mobi' + comic_url,
comic_thumb
};
hasil.push(result);
});
let filt = hasil.filter(v => v.comic_name !== undefined && v.comic_type !== undefined);
return filt;
} catch (eror404) {
return "=> Error =>" + eror404;
}
}
exports.palingmurah = async (produk) => {
if (!produk) {
return new TypeError("No Querry Input! Bakaaa >\/\/<")
}
try {
const res = await axios.get(`https://palingmurah.net/pencarian-produk/?term=` + produk)
const hasil = []
const $ = cheerio.load(res.data)
$('div.ui.card.wpj-card-style-2 ').each(function (a, b) {
let url = $(b).find('a.image').attr('href')
let img = $(b).find('img.my_image.lazyload').attr('data-src')
let title = $(b).find('a.list-header').text().trim()
let product_desc = $(b).find('div.description.visible-on-list').text().trim()
let price = $(b).find('div.flex-master.card-job-price.text-right.text-vertical-center').text().trim()
const result = {
status: res.status,
creator: "@dehan_j1ng",
product: title,
product_desc: product_desc,
product_image: img,
product_url: url,
price
}
hasil.push(result)
})
return hasil
} catch (error404) {
return new Error("=> Error =>" + error404)
}
}
exports.mediafire = (query) => {
return new Promise((resolve,reject) => {
axios.get(query)
.then(({ data }) => {
const $ = cheerio.load(data)
const judul = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-btn-cont > div.dl-btn-labelWrap > div.promoDownloadName.notranslate > div').text();
const size = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(1) > span').text();
const upload_date = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(2) > span').text();
const link = $('#downloadButton').attr('href')
const hsil = {
judul : link.split('/')[5],
upload_date : upload_date,
size : size,
mime : link.split('/')[5].split('.')[1],
link : link
}
resolve(hsil)
})
.catch(reject)
})
}
exports.artinama = (query) => {
return new Promise((resolve,reject) => {
queryy = query.replace(/ /g, '+')
axios.get('https://www.primbon.com/arti_nama.php?nama1=' + query +'&proses=+Submit%21+')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = $('#body').text();
const result2 = result.split('\n \n \n \n')[0]
const result4 = result2.split('ARTI NAMA')[1]
const result5 = result4.split('.\n\n')
const result6 = result5[0] + '\n\n' + result5[1]
resolve(result6)
})
.catch(reject)
})
}
exports.drakor = (query) => {
return new Promise((resolve,reject) => {
queryy = query.replace(/ /g, '+')
axios.get('https://drakorasia.net/?s=' + queryy + '&post_type=post')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const link = [];
const judul = [];
const thumb = [];
$('#post > div > div.thumbnail > a').each(function(a,b) {
link.push($(b).attr('href'))
thumb.push($(b).find('img').attr('src'))
})
$('#post > div > div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').each(function(c,d) {
titel = $(d).text();
judul.push(titel)
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://www.wattpad.com/search/' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const linkk= [];
const judull = [];
const thumb = [];
const dibaca = [];
const vote = [];
const bab =[];
$('ul.list-group > li.list-group-item').each(function(a,b) {
linkk.push('https://www.wattpad.com' + $(b).find('a').attr('href'))
thumb.push($(b).find('img').attr('src'))
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(1) > div.icon-container > div > span.stats-value').each(function(e,f) {
baca = $(f).text();
dibaca.push(baca)
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(2) > div.icon-container > div > span.stats-value').each(function(g,h) {
vot = $(h).text();
vote.push(vot)
})
$('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(3) > div.icon-container > div > span.stats-value').each(function(i,j) {
bb = $(j).text();
bab.push(bb)
})
$('div.story-card-data.hidden-xxs > div.story-info > div.title').each(function(c,d) {
titel = $(d).text();
judull.push(titel)
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://dewabatch.com/?s=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const linkk= [];
const judull = [];
const thumb = [];
const rating = [];
$('div.thumb > a').each(function(a,b) {
linkk.push($(b).attr('href'))
judull.push($(b).attr('title'))
thumb.push($(b).find('img').attr('src').split('?resize')[0])
})
$('#content > div.postbody > div > div > ul > li > div.dtl > div.footer-content-post.fotdesktoppost > div.contentleft > span:nth-child(1) > rating > ratingval > ratingvalue').each(function(c, d){
rate = $(d).text();
rating.push(rate.split(' ')[0])
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://kiryuu.id/?s=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const linkk= [];
const judull = [];
const thumb = [];
const rating = [];
$('div.bsx > a').each(function(a,b) {
linkk.push($(b).attr('href'))
judull.push($(b).attr('title'))
thumb.push($(b).find('img').attr('src').split('?resize')[0])
})
$('div.rating > div.numscore').each(function(c,d) {
rate = $(d).text();
rating.push(rate)
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('https://sfile.mobi/search.php?q=' + query + '&search=Search')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const link = [];
const neme = [];
const size = [];
$('div.w3-card.white > div.list > a').each(function(a,b) {
link.push($(b).attr('href'))
})
$('div.w3-card.white > div.list > a').each(function(c,d) {
name = $(d).text();
neme.push(name)
})
$('div.w3-card.white > div.list').each(function(e,f) {
siz = $(f).text();
//sz = siz.
size.push(siz.split('(')[1])
})
for(let i=0; i {
return new Promise((resolve,reject) => {
axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search='+ nama +'&searchby=name')
.then(({ data }) => {
const $ = cheerio.load(data);
const result = [];
const lnk = [];
const nm = [];
$('div.wa-chat-title-container').each(function(a,b){
const limk = $(b).find('a').attr('href');
lnk.push(limk)
})
$('div.wa-chat-title-text').each(function(c,d) {
const name = $(d).text();
nm.push(name)
})
for( let i = 0; i < lnk.length; i++){
result.push({
nama: nm[i].split('. ')[1],
link: lnk[i].split('?')[0]
})
}
resolve(result)
})
.catch(reject)
})
}
exports.wikisearch = async (query) => {
const res = await axios.get(`https://id.m.wikipedia.org/w/index.php?search=${query}`)
const $ = cheerio.load(res.data)
const hasil = []
let wiki = $('#mf-section-0').find('p').text()
let thumb = $('#mf-section-0').find('div > div > a > img').attr('src')
thumb = thumb ? thumb : '//pngimg.com/uploads/wikipedia/wikipedia_PNG35.png'
thumb = 'https:' + thumb
let judul = $('h1#section_0').text()
hasil.push({ wiki, thumb, judul })
return hasil
}
exports.devianart = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://www.deviantart.com/search?q=' + query)
.then(({ data }) =>{
const $$ = cheerio.load(data)
no = ''
$$('#root > div.hs1JI > div > div._3WsM9 > div > div > div:nth-child(3) > div > div > div:nth-child(1) > div > div:nth-child(1) > div > section > a').each(function(c,d){
no = $$(d).attr('href')
})
axios.get(no)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('#root > main > div > div._2QovI > div._2rKEX._17aAh._1bdC8 > div > div._2HK_1 > div._1lkTS > div > img').each(function(a,b){
result.push($(b).attr('src'))
})
resolve(result)
})
})
.catch(reject)
})
}
exports.konachan = (chara) => {
return new Promise((resolve,reject) => {
let text = chara.replace(' ','_')
axios.get('https://konachan.net/post?tags='+ text +'+')
.then(({ data }) =>{
const $$ = cheerio.load(data)
const no = [];
$$('div.pagination > a').each(function(c,d){
no.push($$(d).text())
})
let mat = Math.floor(Math.random() * no.length)
axios.get('https://konachan.net/post?page='+ mat +'&tags=' + text + '+')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('#post-list > div.content > div:nth-child(4) > ul > li > a.directlink.largeimg').each(function(a,b){
result.push($(b).attr('href'))
})
resolve(result)
})
})
.catch(reject)
})
}
exports.wallpapercave = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://wallpapercave.com/search?q=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('div.imgrow > a').each(function(a,b) {
if(!$(b).find('img').attr('src').includes('.gif')){
result.push('https://wallpapercave.com/' + $(b).find('img').attr('src').replace('fuwp','uwp'))
}})
resolve(result)
})
.catch(reject)
})
}
exports.wallpapercraft = (query) => {
return new Promise((resolve,reject) => {
axios.get('https://wallpaperscraft.com/search/?query=' + query)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('span.wallpapers__canvas').each(function(a,b) {
result.push($(b).find('img').attr('src'))
})
resolve(result)
})
.catch(reject)
})
}
exports.wallpaperhd = (chara) => {
return new Promise((resolve,reject) => {
axios.get('https://wall.alphacoders.com/search.php?search=' + chara + '&filter=4K+Ultra+HD')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('div.boxgrid > a > picture').each(function(a,b) {
result.push($(b).find('img').attr('src').replace('thumbbig-',''))
})
resolve(result)
})
.catch(reject)
})
}
================================================
FILE: Zimbot/jadibot.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
let { default: makeWASocket, useSingleFileAuthState } = require('@adiwajshing/baileys')
let { state, saveState } = useSingleFileAuthState('./sessions.json')
let QR = require('qrcode')
let util = require('util')
let pino = require('pino')
exports.jadibot = async (conn, m) => {
let ZimBotInc = makeWASocket({
logger: pino({ level: 'silent' }),
printQRInTerminal: false,
auth: state,
browser: ['ZIM BOT JADI']
})
ZimBotInc.ev.on('connection.update', async (update) => {
const { connection, qr } = update
if (qr !== undefined) {
let res = await QR.toDataURL(qr, { scale: 8 })
let scan = await conn.sendFile(m.key.remoteJid, res, '', 'Scan bang...', m)
setTimeout(() => {
conn.sendMessage(m.key.remoteJid, { delete: { remoteJid: m.key.remoteJid, fromMe: true, id: scan.key.id, participant: conn.user.jid }})
}, 30000)
if (connection === 'open') {
conn.reply(m.key.remoteJid, 'Success\n' + util.format(ZimBotInc.user), m)
}
}
})
}
================================================
FILE: Zimbot/mediafire.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
const mediafireDl = async (url) => {
const res = await axios.get(url)
const $ = cheerio.load(res.data)
const hasil = []
const link = $('a#downloadButton').attr('href')
const size = $('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
const seplit = link.split('/')
const nama = seplit[5]
mime = nama.split('.')
mime = mime[1]
hasil.push({ nama, mime, size, link })
return hasil
}
module.exports = { mediafireDl }
================================================
FILE: Zimbot/zimbotii.js
================================================
const usedCommandRecently = new Set()
/**
* Check is number filtered
* @param {String} from
*/
const isFiltered = (from) => !!usedCommandRecently.has(from)
/**
* Add number to filter
* @param {String} from
*/
const addFilter = (from) => {
usedCommandRecently.add(from)
setTimeout(() => usedCommandRecently.delete(from), 5000) //5 seconds limit
}
module.exports = {
msgFilter: {
isFiltered,
addFilter
}
}
================================================
FILE: Zimbot.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ᴢɪᴍ ʙᴏᴛ ɪɴᴄ 2023 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮blessedtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/@zim-bot
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
process.on('uncaughtException', console.error)
require('./bot')
const { BufferJSON, WA_DEFAULT_EPHEMERAL, generateWAMessageFromContent, WAZimBotIncection, MessageType, proto, generateWAMessageContent, generateWAMessage, prepareWAMessageMedia, areJidsSameUser, getContentType, fetchLatestBaileysVersion } = require('@adiwajshing/baileys')
const fs = require('fs')
const util = require('util')
const crypto = require('crypto')
const chalk = require('chalk')
const { exec, spawn, execSync } = require('child_process')
const axios = require('axios')
const { fetchUrl, isUrl, processTime } = require("./lib/myfunc")
const path = require('path')
const url = require('url')
const os = require('os')
const got = require('got')
const hx = require('hxz-api')
const maker = require('mumaker')
const fetch = require('node-fetch')
const yts = require('youtube-yts')
const { Readability } = require('@mozilla/readability');
const moment = require('moment-timezone')
const { JSDOM } = require('jsdom')
const speed = require('performance-now')
const { performance } = require('perf_hooks')
const { Primbon } = require('scrape-primbon')
const { igApi, getSessionId } = require('insta-fetcher')
let ig = new igApi("csrftoken=6wrPrUbsa05Csm9wlqxAOSqRwxxscjD;rur=16771\05427758921939\0541695476019:01f7994241f5e244ccf1bb676853d91b4f281e385e564f6c99a3592b27b0a39dada825e8;mid=Yy21jQALAAEmUl5E0beHHz_eVvyI;ds_user_id=27758921939;sessionid=27758921939%3ASGdS1WkMZToRfs%3A12%3AAYe5Sp23sp78pv0PnIRL6X-ySJdCDpe4uxbuJxtcxw;ig_did=09B76BA7-2D56-42E5-89BB-3584A9EAD69B");
ig.setCookie("csrftoken=6wrPrUbsa05Csm9wlqxAOSqRwxxscjD;rur=16771\05427758921939\0541695476019:01f7994241f5e244ccf1bb676853d91b4f281e385e564f6c99a3592b27b0a39dada825e8;mid=Yy21jQALAAEmUl5E0beHHz_eVvyI;ds_user_id=27758921939;sessionid=27758921939%3ASGdS1WkMZToRfs%3A12%3AAYe5Sp23sp78pv0PnIRL6X-ySJdCDpe4uxbuJxtcxw;ig_did=09B76BA7-2D56-42E5-89BB-3584A9EAD69B");
const Config = require('./drips');
const { color, bgcolor } = require("./lib/color");
const simpleGit = require('simple-git');
const git = simpleGit();
const Heroku = require('heroku-client');
const { PassThrough } = require('stream');
const { getLinkPreview, getPreviewFromContent } = require("link-preview-js");
const primbon = new Primbon()
const { smsg, formatp, tanggal, formatDate, getTime, sleep, clockString, fetchJson, getBuffer, jsonformat, format, parseMention, getRandom } = require('./lib/myfunc')
/*let { addLevelingId, addLevelingLevel, addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp } = require("./lib/lvlfunction")*/
const speedofbot = require("performance-now")
const { mediafireDl } = require('./lib/mediafire.js')
const { lirikLagu } = require('./lib/lirik.js')
const { fromBuffer } = require('file-type')
const mel = require('kitsune-api');
let { msgFilter } = require('./Zimbot/zimbotii.js')
const { Boom } = require("@hapi/boom")
const ffmpeg = require('fluent-ffmpeg')
const { checkPetualangUser, addInventori, addBesi, sellBesi, getBesi, addDm, sellDm, getDm, addEmas, sellEmas, getEmas, addFish, sellFish, getFish } = require('./tez.js')
const { addLevelingId, addLevelingLevel ,addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp } = require('./level')
const { isLimit, limitAdd, getLimit, giveLimit, addBalance, kurangBalance, getBalance, isGame, gameAdd, givegame, cekGLimit } = require('./limit')
//xp and leveling database⧈⧈⧈⧈
//message type
/* let drips = fs.readFileSync('./Zimbot/drips.jpg')
*/
//database
const dripsno = JSON.parse(fs.readFileSync('./database/antilink.json'))
const _level = JSON.parse(fs.readFileSync('./database/leveluser.json'))
const _petualang = JSON.parse(fs.readFileSync('./database/inventori.json'))
const balance = JSON.parse(fs.readFileSync('./database/balance.json'))
const dripsanti = JSON.parse(fs.readFileSync('./lib/rude.json'))
let bad = JSON.parse(fs.readFileSync('./lib/rude.json'))
global.db = JSON.parse(fs.readFileSync('./src/database.json'))
if (global.db) global.db = {
sticker: {},
database: {},
game: {},
settings: {},
others: {},
users: {},
chats: {},
...(global.db || {})
}
let vote = db.others.vote = []
module.exports = ZimBotInc = async (ZimBotInc, m, chatUpdate, store) => {
try {
var body = (m.mtype === 'conversation') ? m.message.conversation : (m.mtype == 'imageMessage') ? m.message.imageMessage.caption : (m.mtype == 'videoMessage') ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') ? m.message.extendedTextMessage.text : (m.mtype == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'listResponseMessage') ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId : (m.mtype === 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : ''
var budy = (typeof m.text == 'string' ? m.text : '')
var prefix = prefa ? /^[°┊π÷┊¶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi.test(body) ? body.match(/^[°┊π÷┊¶∆£¢€¥®™+✓_=|~!?@#$%^&.©^]/gi)[0] : "" : prefa ?? global.prefix
const isCmd = body.startsWith(prefix)
const command = body.replace(prefix, '').trim().split(/ +/).shift().toLowerCase()
const args = body.trim().split(/ +/).slice(1)
const pushname = m.pushName || "No Name"
const botNumber = await ZimBotInc.decodeJid(ZimBotInc.user.id)
const isCreator = [botNumber, ...global.owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)
const itsMe = m.sender == botNumber ? true : false
const text = q = args.join(" ")
const from = m.chat
const quoted = m.quoted ? m.quoted : m
const mime = (quoted.msg || quoted).mimetype || ''
const isMedia = /image|video|sticker|audio/.test(mime)
const sender = m.isGroup ? (m.key.participant ? m.key.participant : m.participant) : m.key.remoteJid
const isPetualang = checkPetualangUser(sender)
//----GROUP METADATA----\\
const groupMetadata = m.isGroup ? await ZimBotInc.groupMetadata(m.chat).catch(e => {}) : ''
const groupName = m.isGroup ? groupMetadata.subject : ''
const participants = m.isGroup ? await groupMetadata.participants : ''
const groupAdmins = m.isGroup ? await participants.filter(v => v.admin !== null).map(v => v.id) : ''
const groupOwner = m.isGroup ? groupMetadata.owner : ''
const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false
const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
const isAntinsfw = m.isGroup ? dripsno.includes(m.chat) : false
const isPremium = isCreator || global.premium.map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender) || false
const antiToxic = m.isGroup ? dripsanti.includes(from) : false
const zimbotincv3 = body.slice(0).trim().split(/ +/).shift().toLowerCase()
//-----END HERE------\\
const runtime = function (seconds) {
seconds = Number(seconds);
var d = Math.floor(seconds / (3600 * 24));
var h = Math.floor((seconds % (3600 * 24)) / 3600);
var m = Math.floor((seconds % 3600) / 60);
var s = Math.floor(seconds % 60);
var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " Day, ") : "";
var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " Hour, ") : "";
var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " Minute, ") : "";
var sDisplay = s > 0 ? s + (s == 1 ? " second" : " Second") : "";
return dDisplay + hDisplay + mDisplay + sDisplay;
}
const tempButton = async (remoteJid, text, footer, content) => {
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
hydratedContentText: text,
hydratedContentFooter: footer,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const reply = (teks) => {
ZimBotInc.sendMessage(m.chat, {text: teks, contextInfo: {"externalAdReply": {title: "ᴢɪᴍ ʙᴏᴛ ᴠ5",mediaType: 3, renderLargerThumbnail: false, showAdAttribution: true, detectLinks: true,body: "DRIPS OFC", thumbnail: fs.readFileSync('./drips.jpg'),sourceUrl: ("https://youtu.be/KNu-gr2h7bo")}}})
}
const replay = (teks) => {
ZimBotInc.sendMessage(m.chat, {text: teks, contextInfo: {"externalAdReply": {title: "ᴢɪᴍ ʙᴏᴛ ᴠ5",mediaType: 3, renderLargerThumbnail: false, showAdAttribution: true, body: "DRIPS OFC", thumbnail: fs.readFileSync('./drips.jpg'),sourceUrl: ("https://youtu.be/KNu-gr2h7bo")}}})
}
const tempButtons = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'OWNERMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const tempButtoni = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'DATABASEMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const tempButtonie = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'PHOTOOXYMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const tempButtono = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'GROUPMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const tempButton1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'ALL MENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const saerchmenu = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'SEARCHMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const nsfmenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'nsfmenu')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const downloadmenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'DOWNLOADMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const photofiltermenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'PHOTOFILTERMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const toolmenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'TOOLMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const ephotomenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'EPHOTOMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const convertmenu = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'CONVERTMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
const drip = {
key : {
fromMe: false,
participant : '0@s.whatsapp.net'
},
contextInfo: {
forwardingScore: 9999,
isForwarded: false,
showAdAttribution: true,
title: "ᴢɪᴍ ʙᴏᴛ ᴠ5",
body: "GIVE IT A STAR",
mediaType: "VIDEO",
mediaUrl: `https://githb.com/zim-bot/zimbot-v4`,
description: 'DRIPS OFC',
previewType: "PHOTO",
thumbnail: fs.readFileSync('./drips.jpg'),
sourceUrl: "",
detectLinks: false,
}}
let blessedtuna = {
key : {
fromMe: false,
participant : '0@s.whatsapp.net'
},
message: {
documentMessage: {
showAdAttribution: true,
title: "ᴢɪᴍ ʙᴏᴛ ᴠ5",
jpegThumbnail: fs.readFileSync('./drips.jpg')
}
}
}
let mudratunha = {
key: {
fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "17608914335-1625305606@g.us" } : {})
},
message: {
"extendedTextMessage": {
"text":'SUB DRIPS OFC',
"title": 'ᴢɪᴍ ʙᴏᴛ ɪɴᴄ',
'jpegThumbnail': fs.readFileSync('./drips.jpg')
}
}
}
let picaks = [flaming,fluming,flarun,flasmurf,mehk,awog,mohai,mhehe]
let picak = picaks[Math.floor(Math.random() * picaks.length)]
try {
let isNumber = x => typeof x === 'number' && !isNaN(x)
let limitUser = isPremium ? global.limitawal.premium : global.limitawal.free
let user = global.db.users[m.sender]
if (typeof user !== 'object') global.db.users[m.sender] = {}
if (user) {
if (!isNumber(user.afkTime)) user.afkTime = -1
if (!('afkReason' in user)) user.afkReason = ''
if (!isNumber(user.limit)) user.limit = limitUser
} else global.db.users[m.sender] = {
afkTime: -1,
afkReason: '',
limit: limitUser,
}
let chats = global.db.chats[m.chat]
if (typeof chats !== 'object') global.db.chats[m.chat] = {}
if (chats) {
if (!('mute' in chats)) chats.mute = false
if (!('chatbot' in chats)) chats.chatbot = false
if (!('antilink' in chats)) chats.antilink = true
if (!('antilinkyt' in chats)) chats.antilinkyt = false
if (!('autoblock' in chats)) chats.autoblock = false
if (!('isWelcome' in chats)) chats.isWelcome = false
if (!('localonly' in chats)) chats.localonly = true
if (!('antilinkall' in chats)) chats.antilinkall = false
if (!('antiytchannel' in chats)) chats.antiytchannel = false
if (!('antitiktok' in chats)) chats.antitiktok = false
if (!('antitelegram' in chats)) chats.antitelegram = false
if (!('antiinstagram' in chats)) chats.antiinstagram = false
if (!('antifb' in chats)) chats.antifb = false
if (!('antibule' in chats)) chats.antibule = false
if (!('antiwame' in chats)) chats.antiwame = false
if (!('wame' in chats)) chats.wame = false
if (!('antitwitter' in chats)) chats.antitwitter = false
if (!('antivn' in chats)) chats.antivn = false
if (!('antiphoto' in chats)) chats.antiphoto = false
if (!('antisticker' in chats)) chats.antisticker = false
if (!('antivideo' in chats)) chats.antivideo = false
} else global.db.chats[m.chat] = {
mute: false,
chatbot: false,
wame: false,
antilink: true,
antilinkyt: false,
isWelcome: false,
antilinkall: false,
antiytchannel: false,
antitiktok: false,
antitelegram: false,
antiinstagram: false,
antifb: false,
antibule: false,
antiwame: false,
antitwitter: false,
antisticker: false,
antiphoto: false,
antivn: false,
antivideo: false,
privatechat: true,
localonly: true,
}
let setting = global.db.settings[botNumber]
if (typeof setting !== 'object') global.db.settings[botNumber] = {}
if (setting) {
if (!isNumber(setting.status)) setting.status = 0
if (!('autobio' in setting)) setting.autobio = true
if (!('chatbot' in setting)) setting.chatbot = false
if (!('grouponly' in setting)) setting.grouponly = false
if (!('autoblock' in setting)) setting.autoblock = false
if (!('privatechat' in setting)) setting.privatechat = true
if (!('chatgpt' in setting)) setting.chatgpt = false
} else global.db.settings[botNumber] = {
status: 0,
autobio: true,
chatbot: false,
grouponly: false,
autoblock: false,
privatechat: true,
chatgpt: false,
}
} catch (err) {
console.error(err)
}
ZimBotInc.ws.on('CB:action,,battery', json => {
const batteryLevelStr = json[2][0][1].value
const batterylevel = parseInt (batteryLevelStr)
battre = batterylevel
})
ZimBotInc.ws.on('CB:action,,charger', json => {
const chargerLevelStr = json[2][0][1].value
const charging = parseInt (chargerLevelStr)
charger = charging
})
//public/self
if (!ZimBotInc.public) {
if (!m.key.fromMe) return
}
//push message to console && autoread
const Drips = require('drips-memes')
colors = ['red', 'white', 'black', 'blue', 'yellow', 'green']
let d = new Date(new Date + 3600000)
let locale = 'id'
let time = d.toLocaleString(locale, { hour: 'numeric', minute: 'numeric', second: 'numeric', timeZone: 'Africa/Harare'})
const { color } = require('./lib/color')
if (isCmd && !m.isGroup)
console.log(color('[ RECIEVED ]'), color(time, 'red'), color(`${command} [${args.length}]`), Drips.hr(), 'FROM', color(pushname))
if (isCmd && m.isGroup)
console.log(color('[ RECIEVED ]'), color(time, 'red'), color(`${command} [${args.length}]`), Drips.hr(), 'FROM', color(pushname), 'in', color(groupName))
//leveling
const levelRole = getLevelingLevel(sender, _level)
var role = 'bronz'
if (levelRole <= 3) {
role = 'Copper'
} else if (levelRole <= 5) {
role = 'Iron'
} else if (levelRole <= 7) {
role = 'Silver'
} else if (levelRole <= 10) {
role = 'Gold'
} else if (levelRole <= 12) {
role = 'Platinum'
} else if (levelRole <= 15) {
role = 'Mithril'
} else if (levelRole <= 18) {
role = 'Orichalcum'
} else if (levelRole <= 25) {
role = 'Adamantite'
} else if (levelRole <= 45) {
role = 'Good In Game'
}
//CHATBOT
if (global.dripsreadgroup) {
if (m.isGroup) { ZimBotInc.readMessages(m.chat, m.sender, [m.key.id]) }
}
if (global.dripsreadall) { if (m.message) { ZimBotInc.readMessages(m.chat, m.sender, [m.key.id]) }
}
if (global.dripsrecord) { if (m.chat) { ZimBotInc.sendPresenceUpdate('recording', m.chat) }
}
if (global.dripstyping) { if (m.chat) { ZimBotInc.sendPresenceUpdate('composing', m.chat) }
}
if (global.available) { if (m.chat) { ZimBotInc.sendPresenceUpdate('available', m.chat) }
}
if (global.unavailable) { if (m.chat) { ZimBotInc.sendPresenceUpdate('unavailable', m.chat) }
}
//RPG FUNCTION BY DRIPS
function randomNomor(min, max = null) {
if (max !== null) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
} else {
return Math.floor(Math.random() * min) + 1//removing credits is not any option
}
}
function pickRandom(list) {
return list[Math.floor(list.length * Math.random())]
}
let beedrips = [f1,f2,f3,f4,f5,f6]
let dripsee = pickRandom(beedrips)
/*
if (budy.includes("://chat.whatsapp.com/")) {
console.log(
color("[AUTO-JOIN]", "red"),
color("YAHAHAHHAHAH", "white")
);
ZimBotInc.query({
json: [
"action",
"invite",
`${budy.replace("https://chat.whatsapp.com/", "")}`,
],
});
}
*/
if (isCmd && msgFilter.isFiltered(from) && !isGroup) {
console.log(color('[SPAM]', 'red'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname))
return reply('〔ʙᴇ ᴘᴀᴛɪᴇɴᴛ 𝟻 sᴇᴄᴏɴᴅs/ᴄᴏᴍᴍᴀɴᴅ〕')}
const createSerial = (size) => {
return crypto.randomBytes(size).toString('hex').slice(0, size)
}
var elit = '*Oʀᴅɴᴀʀʏ ᴀᴅᴠᴇɴᴛᴜʀᴇ*'
if (isPremium)
{
elit = '*Aᴅᴠᴇɴᴛᴜʀᴇ ᴘʀᴏ*'
}
if (isCreator)
{
elit = '*Aᴅᴍɪɴ ɢᴀᴍᴇ*'
}
async function sendButLoc(from) {
reqXp = 5000 * (Math.pow(2, getLevelingLevel(sender)) - 1)
var button = [
{ urlButton: { displayText: `SCRIPT`, url : `${wame}` } },
{ quickReplyButton: { displayText: `INVENTORY`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `OWNER`, id: `${prefix}owner` } }
]
bufu = await getBuffer(picak+'RPG GAMES')
var DADYDR = `
┌───〔 *_◉ᴀʙᴏᴜᴛ◉_* 〕
┊ *Nᴀᴍᴇ:* ${pushname}
┊ *Rᴀɴᴋ:* ${role}
┊ *Sᴛᴀᴛᴜꜱ:* ${elit}
┊ *Mᴏɴᴇʏ:* $${(getBalance(sender, balance))}
┊ *Xᴘ:* ${getLevelingXp(sender)}/${reqXp}
┊ *Lᴇᴠᴇʟ:* ${getLevelingLevel(sender)}
└───────────●
┌───〔 *_◉ɪɴꜰᴏ◉_* 〕
┊ *Mᴏɴᴇʏ:* $${(getBalance(sender, balance))}
┊ *Gᴏʟᴅ:* ${getEmas(sender)}
┊ *Iʀᴏɴ:* ${getBesi(sender)}
┊ *Fɪꜱʜ:* ${getFish(sender)}
┊ *Dɪᴀᴍᴏɴᴅ:* ${getDm(sender)}
└───────────●
┌───〔 *_◉ᴍᴇɴᴜ ʀᴘɢ◉_* 〕
┊ ${prefix}joinrpg
┊ ${prefix}quest
┊ ${prefix}mining
┊ ${prefix}mancing
┊ ${prefix}luckyday
┊ ${prefix}luckytime
┊ ${prefix}adventure
┊ ${prefix}inventori
└───────────●
┌───〔 *_◉Fᴀʀᴍ ʀᴘɢ◉_* 〕
┊ ${prefix}killslime
┊ ${prefix}killgoblin
┊ ${prefix}killdevil
┊ ${prefix}killbehemoth
┊ ${prefix}killdemon
┊ ${prefix}killdemonking
└───────────●
┌───〔 *_◉Tʀᴀᴅᴇ ʀᴘɢ◉_* 〕
┊ ${prefix}sellikan
┊ ${prefix}sellbesi
┊ ${prefix}sellemas
┊ ${prefix}selldiamond
└───────────●
┌───〔 *_ᴛʜᴀɴᴋs ᴛᴏ_* 〕
┊ʏᴏᴜʀ ᴄʀᴇᴅɪᴛꜱ
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: DADYDR,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButJoin(from, query) {
reqXp = 5000 * (Math.pow(2, getLevelingLevel(sender)) - 1)
_petualang.push(sender)
fs.writeFileSync('./database/inventori.json', JSON.stringify(_petualang))
addInventori(sender)
addLevelingId(sender)
var name = args[0]
var serialUser = createSerial(14)
reqXp = 5000 * (Math.pow(2, getLevelingLevel(sender)) - 1)
bufut = await getBuffer(picak+'JOIN RPG')
var button = [
{ urlButton: { displayText: `SOURCE CODE`, url : `${wame}` } },
{ quickReplyButton: { displayText: `RPG MENU`, id: `${prefix}rpgmenu` } },
{ quickReplyButton: { displayText: `OWNER`, id: `${prefix}owner` } }
]
var hg = `
❲ *_Sᴜᴄᴄᴇꜱꜱ Jᴏɪɴ ʀᴘɢ_* ❳
╏ ᴘʀᴏꜰɪʟᴇ ╏
┊ *Nᴀᴍᴇ :* ${name}
┊ *Lᴇᴠᴇʟ :* ${getLevelingLevel(sender)}
┊ *Sᴛᴀᴛᴜꜱ :* ${elit}
┊ *Xᴘ:* ${getLevelingXp(sender)}/${reqXp}
❲ *_ʀᴘɢ ɢᴀᴍᴇ_* ❳`
let message = await prepareWAMessageMedia({ image: bufut, jpegThumbnail:bufut }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButslime(from) {
ez = Math.ceil(Math.random() * 400)
addLevelingXp(sender, ez)
a = randomNomor(55)
b = randomNomor(400)
c = randomNomor(80)
d = randomNomor(3)
addLevelingXp(sender, ez)
addBalance(sender, b, balance)
addEmas(sender, a)
addBesi(sender, c)
addDm(sender, d)
bufutI = await getBuffer(picak+'KILL SLIME')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission to kill Slime*\n\n🎁 *Reward for killing Slime*\n ┊ *Money:* $${b}\n ┊ *Iron:* ${c}\n ┊ *Gold:* ${a}\n ┊ *Diamond:* ${d}\n\n*Thank you for carrying out this mission*`
let message = await prepareWAMessageMedia({ image: bufutI, jpegThumbnail:bufutI }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButgoblin(from) {
ez = Math.ceil(Math.random() * 500)
addLevelingXp(sender, ez)
a = randomNomor(65)
b = randomNomor(500)
c = randomNomor(90)
d = randomNomor(5)
addLevelingXp(sender, ez)
addBalance(sender, b, balance)
addEmas(sender, a)
addBesi(sender, c)
addDm(sender, d)
bufo = await getBuffer(picak+'KILL GLOBIN')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission To kill Goblin*\n\n🎁 *Reward for killing Goblin*\n ┊ *Money:* $${b}\n ┊ *Iron:* ${c}\n ┊ *Gold:* ${a}\n ┊ *Diamond:* ${d}\n\n*Thank you for carrying out this misssion*`
let message = await prepareWAMessageMedia({ image: bufo, jpegThumbnail:bufo }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButdevil(from) {
ez = Math.ceil(Math.random() * 600)
addLevelingXp(sender, ez)
a = randomNomor(70)
b = randomNomor(600)
c = randomNomor(95)
d = randomNomor(6)
addLevelingXp(sender, ez)
addBalance(sender, b, balance)
addEmas(sender, a)
addBesi(sender, c)
addDm(sender, d)
bufas = await getBuffer(picak+'KILL DEVIL')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission to kill 𝗗𝗲𝘃𝗶𝗹️*\n\n🎁 *Reward for killing Devil*\n ┊ *Money:* $${b}\n ┊ *Iron:* ${c}\n ┊ *Gold:* ${a}\n ┊ *Diamond:* ${d}\n\n*Thank you for carrying out this mission*`
let message = await prepareWAMessageMedia({ image: bufas, jpegThumbnail:bufas }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButbehemoth(from) {
ez = Math.ceil(Math.random() * 700)
addLevelingXp(sender, ez)
a = randomNomor(75)
b = randomNomor(600)
c = randomNomor(100)
d = randomNomor(7)
addLevelingXp(sender, ez)
addBalance(sender, b, balance)
addEmas(sender, a)
addBesi(sender, c)
addDm(sender, d)
batai = await getBuffer(picak+'KILL BEHEMOTH')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission to kill Behemoth*\n\n🎁 *Reward for kiling Behemoth*\n ┊ *Money:* $${b}\n ┊ *Iron:* ${c}\n ┊ *Gold:* ${a}\n ┊ *Diamond:* ${d}\n\n*Thank you for carrying out this mission*`
let message = await prepareWAMessageMedia({ image: batai, jpegThumbnail: batai }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `${global.botname}`,
mentions: [sender],
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButdemon(from) {
ez = Math.ceil(Math.random() * 850)
addLevelingXp(sender, ez)
a = randomNomor(90)
b = randomNomor(900)
c = randomNomor(120)
d = randomNomor(10)
addLevelingXp(sender, ez)
addBalance(sender, b, balance)
addEmas(sender, a)
addBesi(sender, c)
addDm(sender, d)
bhuu = await getBuffer(picak+'KILL DEMON')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission to kill Demon*\n🎁 *Demon Kill Reward*\n ┊ *Money:* $${b}\n ┊ *Iron:* ${c}\n ┊ *Gold*: ${a}\n ┊ *Diamond:* ${d}\n\n*Thank You for Carrying Out This Mission*`
let message = await prepareWAMessageMedia({ image: bhuu, jpegThumbnail: bhuu }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `${global.botname}`,
mentions: [sender],
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
async function sendButdemonking(from) {
ez = Math.ceil(Math.random() * 1000)
addLevelingXp(sender, ez)
addLevelingXp(sender, ez)
addBalance(sender, 1999, balance)
addEmas(sender, 99)
addBesi(sender, 99)
addDm(sender, 99)
bhuud = await getBuffer(picak+'KILL DEMONKING ')
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `*Mission to kill DemonKing*\n\n🎁 *DemonKing Kill Reward*\n ┊ *Money* : $${b}\n ┊ *Iron :* ${c}\n ┊ *Gold :* ${a}\n ┊ *Diamond :* ${d}\n\n*Thank You for Carrying Out This Mission*`
let message = await prepareWAMessageMedia({ image: bhuud, jpegThumbnail:bhuud }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: hg,
hydratedFooterText: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`,
hydratedButtons: [{
"urlButton": {
"displayText": "SUBSCRIBE",
"url": "https://youtube.com/@zim-bot"
}
}, {
quickReplyButton: {
displayText: 'INVENTORY',
id: `${prefix}inventori`
}},{
quickReplyButton: {
displayText: 'OWNER',
id: `${prefix}owner`
}
}
]
}
}
}), { userJid: m.chat })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
.catch ((err) => reply(err))
}
const emote = (satu, dua) => {
try{
const { EmojiAPI } = require("emoji-api");
const emoji = new EmojiAPI();
emoji.get(satu)
.then(emoji => {
const buttons = [{buttonId: "y", buttonText: {displayText:satu}, type: 1}]
const buttonMessage = {image: {url: emoji.images[dua].url},caption: "ᴢɪᴍ ʙᴏᴛ ᴠ5",footerText: 'Loading...',buttons: buttons,headerType: 4}
ZimBotInc.sendMessage(from, buttonMessage, {quoted:m})
})
} catch (e) {
reply("Emoji error, please enter another emojinNOTE : Just enter 1 emoji")
}
}
//----ANTILINK AND CHATBOT-----\\
if (db.settings[botNumber].chatgpt) {
if (m.chat.endsWith("@s.whatsapp.net")) {
const { Configuration, OpenAIApi } = require('openai')
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY
})
const openai = new OpenAIApi(configuration)
const jsonu = await openai.createCompletion({
model: 'text-davinci-003',
prompt: text,
temperature: 0.7,
max_tokens: 3500,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
})
if (jsonu.statusText != 'OK' || jsonu.data.choices.length == 0) return reply('fail')
let bhabhi = jsonu.data.choices[0].text.trim()
ZimBotInc.sendMessage(m.chat,{ text: bhabhi}, {quoted: m})
}
}
if (db.settings[botNumber].privatechat) {
if (m.chat.endsWith("@s.whatsapp.net")) {
const got = require('got')
let {body} = await got(`http://api.brainshop.ai/get?bid=173030&key=zK0sxNKb6C9pA3gr&uid=[${m.sender}]&msg=[${budy}]`)
let value = JSON.parse(body).cnt;
m.reply(value)
}
}
if (db.settings[botNumber].chatbot) {
const got = require('got')
let {body} = await got(`http://api.brainshop.ai/get?bid=173030&key=zK0sxNKb6C9pA3gr&uid=[${m.sender}]&msg=[${budy}]`)
let value = JSON.parse(body).cnt;
m.reply(value)
}
if (db.chats[m.chat].antilink) {
if (budy.includes('https://chat.whatsapp.com/')) {
if (!m.key.fromMe) {
reply('[ 𝗭𝗜𝗠 𝗕𝗢𝗧 𝗔𝗡𝗧𝗜𝗟𝗜𝗡𝗞 ]\n𝗟𝗶𝗻𝗸 𝗻𝗼𝘁 𝗮𝗹𝗹𝗼𝘄𝗲𝗱 𝗵𝗲𝗿𝗲, 𝗢𝗞𝘆?..,\n𝗚𝗼𝗼𝗱 𝗯𝘆𝗲 𝗜𝗺 𝗸𝗶𝗰𝗸𝗶𝗻𝗴 𝘂𝗿 𝗮𝘀𝘀 𝗻𝗼𝘄👋🏻')
let sianj = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [sianj], 'remove').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
}
}
if (db.chats[m.chat].wame) {
if (budy.match(`wa.me/`)) {
reply(`「 𝗭𝗜𝗠 𝗕𝗢𝗧 𝗔𝗡𝗧𝗜𝗟𝗜𝗡𝗞 」\n\n𝗬𝗼𝘂 𝗵𝗮𝘃𝗲 𝘀𝗲𝗻𝗱 𝘄𝗮.𝗺𝗲 𝗹𝗶𝗻𝗸, 𝗻𝗼 𝘁𝗶𝗺𝗲 𝘁𝗼 𝘄𝗮𝘀𝘁𝗲 𝘂𝗮 𝗼𝘂𝘁!`)
if (!isBotAdmins) return reply(`𝘡𝘪𝘮 𝘉𝘰𝘵 𝘮𝘶𝘴𝘵 𝘣𝘦 𝘢𝘥𝘮𝘪𝘯 𝘧𝘪𝘳𝘴𝘵😚`)
let gclink = (`https://wa.me/`)
let isLinkThisGc = new RegExp(gclink, 'i')
let isgclink = isLinkThisGc.test(m.text)
if (isgclink) return reply(`𝘖𝘏 𝘠𝘦𝘢𝘩 𝘪𝘵 𝘥𝘪𝘥𝘯𝘵 𝘩𝘢𝘱𝘱𝘦𝘯, 𝘣𝘦𝘤𝘢𝘶𝘴𝘦 𝘺𝘰𝘶 𝘴𝘦𝘯𝘵 𝘵𝘩𝘪𝘴 𝘸𝘢.𝘮𝘦 𝘭𝘪𝘯𝘬𝘺 𝘰𝘬𝘢𝘺😌`)
if (isAdmins) return reply(`𝘏𝘦𝘭𝘭 𝘯𝘰😱 𝘺𝘰𝘶 𝘢𝘥𝘮𝘪𝘯`)
if (isCreator) return reply(`𝘖𝘰𝘰𝘰𝘩 𝘴𝘩𝘪𝘵😩 𝘴𝘰𝘳𝘳𝘺 𝘺𝘶 𝘢𝘳𝘦 𝘵𝘩𝘦 𝘰𝘸𝘯𝘦𝘳 𝘭𝘶𝘤𝘬𝘺 𝘺𝘰𝘶`)
ZimBotInc.groupParticipantsUpdate(m.chat, [m.sender], 'remove')
}
}
if (db.chats[m.chat].antiinstagram) {
if (budy.includes("https://www.instagram.com/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n\n*you are admn okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no ig links here okay, now get out* `, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antisticker) {
let isSticker = m.mtype
if(isSticker === "stickerMessage"){
if (!m.key.fromMe) {
if (isAdmins) return reply(`*you are admin lucky you dont send stickers here*`)
if (isCreator) return reply(`*𝘖𝘰𝘰𝘰𝘩 𝘴𝘩𝘪𝘵😩 𝘴𝘰𝘳𝘳𝘺 𝘺𝘶 𝘢𝘳𝘦 𝘵𝘩𝘦 𝘰𝘸𝘯𝘦𝘳 𝘭𝘶𝘤𝘬𝘺 𝘺𝘰𝘶*`)
reply('*ANTI STICKER*\n\n*NO STICKERS ALLOWED HERE OKAY GOODBYE*')
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no stickers here okay, now get out* `, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
}
if (db.chats[m.chat].antivn) {
let isAudio = m.mtype
if(isAudio === "audioMessage"){
if (!m.key.fromMe) {
if (isAdmins) return reply(`*you are admin lucky you dont send voice note here*`)
if (isCreator) return reply(`*𝘖𝘰𝘰𝘰𝘩 𝘴𝘩𝘪𝘵😩 𝘴𝘰𝘳𝘳𝘺 𝘺𝘶 𝘢𝘳𝘦 𝘵𝘩𝘦 𝘰𝘸𝘯𝘦𝘳 𝘭𝘶𝘤𝘬𝘺 𝘺𝘰𝘶*`)
reply('*ANTI VOICE NOTE*\n\n*NO VOICE ALLOWED HERE OKAY GOODBYE*')
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no voice note here okay, now get out* `, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
}
if (db.chats[m.chat].antivideo) {
let isVideo = m.mtype
if(isVideo === "videoMessage"){
if (!m.key.fromMe) {
if (isAdmins) return reply(`*you are admin lucky you dont send videos here*`)
if (isCreator) return reply(`*𝘖𝘰𝘰𝘰𝘩 𝘴𝘩𝘪𝘵😩 𝘴𝘰𝘳𝘳𝘺 𝘺𝘶 𝘢𝘳𝘦 𝘵𝘩𝘦 𝘰𝘸𝘯𝘦𝘳 𝘭𝘶𝘤𝘬𝘺 𝘺𝘰𝘶*`)
reply('*ANTI VIDEO*\n\n*NO VIDEOS ALLOWED HERE OKAY GOODBYE*')
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no videos here okay, now get out* `, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
}
if (db.chats[m.chat].antiphoto) {
let isPhoto = m.mtype
if(isPhoto === "imageMessage"){
if (!m.key.fromMe) {
if (isAdmins) return reply(`*you are admin lucky you dont send photos here*`)
if (isCreator) return reply(`*𝘖𝘰𝘰𝘰𝘩 𝘴𝘩𝘪𝘵😩 𝘴𝘰𝘳𝘳𝘺 𝘺𝘶 𝘢𝘳𝘦 𝘵𝘩𝘦 𝘰𝘸𝘯𝘦𝘳 𝘭𝘶𝘤𝘬𝘺 𝘺𝘰𝘶*`)
reply('*ANTI PHOTOS*\n\n*NO PHOTOS ALLOWED HERE OKAY GOODBYE*')
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no photos here okay, now get out* `, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
}
if (db.chats[m.chat].antifb) {
if(budy.includes("https://facebook.com/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n\n*you are admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no fb links here okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antitelegram) {
if (budy.includes("https://t.me/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n*you are admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no telegram links here okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antitiktok) {
if (budy.includes("https://www.tiktok.com/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n\n*you are bot admin okay*`
if (isAdmins) return m.reply(zimbotv3)
if (m.key.fromMe) return m.reply(zimbotv3)
if (isCreator) return m.reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no tiktok links here okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antitwitter) {
if (budy.includes("https://twitter.com/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n *you are bot admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no twittwer link here okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antilinkall) {
if (budy.includes("http")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n *you are bot admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(m.chat, {text:`*▊▊▊DETECTED▊▊▊*\n@${kice.split("@")[0]} *I said dont send any links okay*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (m.mtype == 'viewOnceMessage') {
if (!db.chats[m.chat].antionce) return
teks = `*▊▊▊DETECTED ONCE▊▊▊*
`
ZimBotInc.sendTextWithMentions(m.chat, teks, m)
await sleep(500)
m.copyNForward(m.chat, true, { readViewOnce: true }).catch(_ => reply(`*I opened it by force*`))
}
if (db.chats[m.chat].antilinkyt) {
if (budy.includes("https://youtube.com/")){
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n*you are admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no yt links here okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antilink) {
if (budy.match(`chat.whatsapp.com`)) {
reply(`*▊▊▊ ANTILINK ▊▊▊*\n\n*You have been detected sending a group link, sorry you will be kicked!*`)
if (!isBotAdmins) return reply(`*Bbot must be admin okay*`)
let gclink = (`https://chat.whatsapp.com/`+await ZimBotInc.groupInviteCode(m.chat))
let isLinkThisGc = new RegExp(gclink, 'i')
let isgclink = isLinkThisGc.test(m.text)
if (isgclink) return reply(`*sorry I didn't kick you, because you sent the link of this group lucky you*`)
if (isAdmins) return reply(`*Ehh sorry you admin*`)
if (isCreator) return reply(`*whoa you are bot creator i wont kick you okay*`)
ZimBotInc.groupParticipantsUpdate(m.chat, [m.sender], 'remove')
}
}
if (budy.length > 3500) {
if (!m.isGroup) return
if (!isAntiVirtex) return
if (groupAdmins) return
reply('Mark as read\n'.repeat(300))
reply(`*▊▊▊DETECTED▊▊▊*\n\n*You sent a virtex, sorry you will be kicked from the group*`)
console.log(('[KICK]', 'red'), color('Received a text virus!', 'yellow'))
ZimBotInc.groupParticipantsUpdate(m.chat, [m.sender], 'remove')
}
if (db.chats[m.chat].antiwame) {
if (budy.includes(`http://wa.me`)) {
if (!isBotAdmins) return
zimbotv3 = `*▊▊▊DETECTED▊▊▊*\n\n*you are admin okay*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊DETECTED▊▊▊*\n\n@${kice.split("@")[0]} *I said no links okay, now get out*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.settings[botNumber].autoblock) {
if (m.chat.endsWith("@s.whatsapp.net")) {
if (isCreator) reply('*you are bot creator okay*')
block = m.sender
await ZimBotInc.sendMessage(from, {text:`*▊▊▊AUTO BLOCK▊▊▊*\n\n@${block.split("@")[0]} *today I'm blocking dumps bye you are _blocked_* *if you want to use bot join this group* ${global.group1}\n\n${global.group2}`, m})
ZimBotInc.updateBlockStatus(m.sender,'block')
}
}
if (db.chats[m.chat].antilinkyt) {
if (budy.includes(`https://nando.com`)) {
if (!isBotAdmins) return reply('*BOT MUST BE ADMIN OKAY*')
reply(`*▊▊▊ ANTIYT ▊▊▊*\n\n*SOrry ${botname} will kick you out because what you sent is a youtube link in this group*`)
if (isAdmins) return reply(`*Ehh sorry you admin*`)
if (isCreator) return reply(`*whoa you are bot creator i wont kick you okay*`)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove').then((res) => m.reply(jsonformat(res))).catch((err) => m.reply(jsonformat(err)))
ZimBotInc.sendMessage(m.chat, {text:`*▊▊▊ ANTILINK ▊▊▊*\n\n@${kice.split("@")[0]} *Has been kicked for sending the youtube link in this group*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.chats[m.chat].antibule) {
if (m.sender.includes(`+212`)) {
if (!isBotAdmins) return reply('*BOT MUST BE ADMIN OKAY*')
reply(`*▊▊▊ ANTIBULE ▊▊▊*\n\n*Sorry ${botname} will kick you out because you are a stranger in this group*`)
if (isAdmins) return reply(`*Ehh sorry you admin*`)
if (isCreator) return reply(`*whoa you are bot creator i wont kick you okay*`)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove').then((res) => m.reply(jsonformat(res))).catch((err) => m.reply(jsonformat(err)))
ZimBotInc.sendMessage(m.chat, {text:`*▊▊▊ ANTILINK ▊▊▊*\n\n@${kice.split("@")[0]} *You shouldn't be in this group*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})
}
}
if (db.settings[botNumber].grouponly) {
if (!m.isGroup) {
let a = 'a'
if (!isCreator) throw `*INBOX NOT ALLOWED*`
if (budy === a)
throw '*inbox not allowed*'
}
}
var Apik = ''
var socket = fetchJson('wss://wss.allsportsapi.com/live_events?widgetKey='+ 'db7fca1f4dfd0fa8b50c30c3b4569a61e0c5c93a79c18864bf9c9b6ab635c427' +'&timezone=+02:00');
socket.onmessage = function(e) {
if (e.data) {
var matcheData = JSON.parse(e.data);
console.log(`*JUST IN:*` + matcheData)
}
}
//mute chat
if (db.chats[m.chat].mute && !isAdmins && !isCreator) {
return
}
//write database every 1minute
setInterval(() => {
fs.writeFileSync('./src/database.json', JSON.stringify(global.db, null, 2))
}, 60 * 1000)
//But5Loc
var nextMinutes = Math.random() * 300 + 1000;
setTimeout(function(){
ZimBotInc.sendMessage(ZimBotInc.user.id, {text: `*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ ANNOUNCEMENT:* *SUBSCRIBE TO DRIPS OFC*\n\n*YOUTUBE:* https://youtube.com/@zim-bot\n\n*NEW FEATURES COMING SOON SO STAY TUNED*\n\n*FEEL FREE TO BRING IDEAS OF THE FEATURES ON THE TABLE*\n\n*IF YOU WANT TO CONTRUBUTE FORK THE REPO, MAKE CHANGES PUSH YOUR CHANGES TO THE ORIGIN BRANCH AND WAIT FOR YOUR PULL REQUEST TO BE VERIFIED*\n\n*Thanks for choosing zim-bot*`,contextInfo: { externalAdReply:{title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",body:"SUBSCRIBE DRIPS OFC",showAdAttribution: true,mediaType:2,thumbnail: fs.readFileSync(`./drips.jpg`) ,mediaUrl:`https://youtu.be/KNu-gr2h7bo`, sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
//anouncement by drips
}, nextMinutes * 300 * 1000);
const send5Butlmg = async (jid , text = '' , footer = '', img, but = [], options = {}) =>{
var template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
locationMessage: { degreesLatitude: 0, degreesLongtitude: 0, jpegThumbnail: img },
"hydratedContentText": text,
"hydratedFooterText": footer,
"hydratedButtons": but
}
}
}), options)
return ZimBotInc.relayMessage(jid, template.message, { messageId: template.key.id })
}
//reset limit every 12hrs
let cron = require('node-cron')
cron.schedule('00 12 * * *', () => {
let user = Object.keys(global.db.users)
let limitUser = isPremium ? global.limitawal.premium : global.limitawal.free
for (let jid of user) global.db.users[jid].limit = limitUser
console.log('Reseted Limit')
}, {
scheduled: true,
timezone: "Africa/Harare"
})
//script by drips
//respond to cmd
if (isMedia && m.msg.fileSha256 && (m.msg.fileSha256.toString('base64') in global.db.sticker)) {
let hash = global.db.sticker[m.msg.fileSha256.toString('base64')]
let { text, mentionedJid } = hash
let messages = await generateWAMessage(m.chat, { text: text, mentions: mentionedJid }, {
userJid: ZimBotInc.user.id,
quoted: m.quoted && m.quoted.fakeObj
})
messages.key.fromMe = areJidsSameUser(m.sender, ZimBotInc.user.id)
messages.key.id = m.key.id
messages.pushName = m.pushName
if (m.isGroup) messages.participant = m.sender
let msg = {
...chatUpdate,
messages: [proto.WebMessageInfo.fromObject(messages)],
type: 'append'
}
ZimBotInc.ev.emit('messages.upsert', msg)
}
let mentionUser = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])]
for (let jid of mentionUser) {
let user = global.db.users[jid]
if (!user) continue
let afkTime = user.afkTime
if (!afkTime || afkTime < 0) continue
let reason = user.afkReason || ''
reply(`
Don't tag him!
He's in Offline/AFK, ${reason ? 'with reason ' + reason : 'no reason'}
Its been ${clockString(new Date - afkTime)}
`.trim())
}
if (db.users[m.sender].afkTime > -1) {
let user = global.db.users[m.sender]
reply(`
You came back online from AFK${user.afkReason ? ' after ' + user.afkReason : ''}
In ${clockString(new Date - user.afkTime)}
`.trim())
user.afkTime = -1
user.afkReason = ''
}
switch(command) {
case 'quest':
let sectionnya= [
{
"title": `MISSION 1`,
rows: [
{
"title": `KILLING SLIME`,
"description": `Hunting Slimes For Rewards`,
"rowId": `${prefix}slime`
}
]
}
,
{
"title": `MISSION 2`,
rows: [
{
"title": `KILLING GOBLIN`,
"description": `Hunt Globin To Get Rewards`,
"rowId": `${prefix}goblin`
}
]
}
,
{
"title": `MISSION 3`,
rows: [
{
"title": `KILLING DEVIL`,
"description": `Hunt Devils To Get Rewards`,
"rowId": `${prefix}devil`
}
]
}
,
{
"title": `MISSION 4`,
rows: [
{
"title": `KILLING BEHEMOTH`,
"description": `Hunting Behemoths To Earn Rewards`,
"rowId": `${prefix}behemoth`
}
]
}
,
{
"title": `MISSION 5`,
rows: [
{
"title": `KILLING DEMONS`,
"description": `Hunt Demons To Get Rewards`,
"rowId": `${prefix}demon`
}
]
}
,
{
"title": `MISSION 6`,
rows: [
{
"title": `KILLING DEMONKING`,
"description": `DemonKing Hunting To Earn Rewards`,
"rowId": `${prefix}demonking`
}
]
}
]
ZimBotInc.sendList(m.chat, `Hi Chomie *${pushname}*`, `Please Select Below`, "CLICK", "ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ ", sectionnya, { quoted: m})
break
case 'slime':
case 'killslime':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButslime(from)
break
case 'goblin':
case 'killgoblin':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButgoblin(from)
break
case 'devil':
case 'killdevil':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButdevil(from)
break
case 'behemoth':
case 'killbehemoth':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButbehemoth(from)
break
case 'demon':
case 'killdemon':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButdemon(from)
break
case 'demonking':
case 'killdemonking':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButdemonking(from)
break
case 'rpgmenu':
case 'profile':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
await sendButLoc(from)
break
case 'joinrpg':
if (!m.isGroup) return reply(mess.group)
if (isPetualang) return reply(' *Youve Become an Adventurer*')
if (args.length < 1) return reply(`*Send a command ${prefix + command} name*`)
await sendButJoin(from, q)
break
case 'mining':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
pp = randomNomor(75)
emas = randomNomor(15)
dm = randomNomor(3)
besi = randomNomor(50)
addBalance(sender, pp, balance)
addBesi(sender, besi)
addEmas(sender, emas)
addDm(sender, dm)
mining = ('*Wait mining......*')
setTimeout( () => {
buttons = [
{ buttonId: 'mining', buttonText: { displayText: 'Mining' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `*Completed Mining🚧nlist results:*\n*Gold* ${emas}🪙\n*Money:* $${pp}💰\n*Iron:* ${besi}⛓️\n*Diamond:* ${dm}💎`, ZimBotInc.user.name, m)
}, 9000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: '🚧 Finished Kneading . . .🪙👷' }, { quoted: m })
}, 7000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: '🚧 Finding Gold . . .⚒️🏔️️️' }, { quoted: m })
}, 4000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: '🚧 Start Mining . . .⚒️🏔️️' }, { quoted: m })
}, 1500) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: mining }, {quoted: m})
}, 0) // 1000 = 1s,
break
case 'inventori':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
var reqXp = 5000 * (Math.pow(2, getLevelingLevel(sender)) - 1)
buttons = [
{ buttonId: 'adventure', buttonText: { displayText: 'Adventure' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `📍 𝗣𝗿𝗼𝗳𝗶𝗹𝗲 𝗣𝗹𝗮𝘆𝗲𝗿\n ┊ Name: ${pushname}\n ┊ Rank : ${role}\n ┊ Status : ${elit}\n ┊ Xp : ${getLevelingXp(sender)}/${reqXp}\n ┊ Level : ${getLevelingLevel(sender)}\n🎒 𝗜𝗻𝘃𝗲𝗻𝘁𝗼𝗿𝗶 :\n ┊ Gold : ${getEmas(sender)}🪙\n ┊ Money : $${(getBalance(sender, balance))}💰\n ┊ Iron : ${getBesi(sender)}⛓️\n ┊ Diamond : ${getDm(sender)}💎\n ┊ Fish : ${getFish(sender)}🎣`, ZimBotInc.user.name, m)
break
case 'sellikan':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
if (args.length < 1) return reply(`Send command *${prefix + command}* amount to sell`)
jmlh = body.slice(10)
rp = 5 * jmlh
if (getFish(sender) < jmlh) return reply(`*Your Fish Isn't Enough*`)
sellFish(sender, jmlh, balance)
addBalance(sender, rp, balance)
buttons = [
{ buttonId: 'inventori', buttonText: { displayText: 'Inventori' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `🛒 *MARKET*\n ┊ Seller : ${pushname}\n ┊ Buyer : Admin\n ┊ Price/Fish : 5\n ┊ Status : Success\n ┊ Left FishPrice/Fish : ${getFish(sender)}\n ┊ Sales Results : $${rp}`, ZimBotInc.user.name, m)
break
case 'sellbesi':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
if (args.length < 1) return reply(`Send command *${prefix + command}* amount to sell`)
jmlh = body.slice(10)
rp = 10 * jmlh
if (getBesi(sender) < jmlh) return reply(`Besi Isn't Enough`)
sellBesi(sender, jmlh, balance)
addBalance(sender, rp, balance)
buttons = [
{ buttonId: 'inventori', buttonText: { displayText: 'Inventori' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `🛒 MARKET\n ┊ Seller : ${pushname}\n ┊ Buyer : Admin\n ┊ Harga/Besi : 10\n ┊ Status : Sukses\n ┊ Sisa Besi : ${getBesi(sender)}\n ┊ Sales Results : $${rp}`, ZimBotInc.user.name, m)
break
case 'sellemas':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
if (args.length < 1) return reply(`Send command *${prefix + command}* amount to sell`)
jmlh = body.slice(10)
rp = 25 * jmlh
if (getEmas(sender) < jmlh) return reply(`Your Gold Isn't Enough`)
sellEmas(sender, jmlh, balance)
addBalance(sender, rp, balance)
buttons = [
{ buttonId: 'inventori', buttonText: { displayText: 'Inventori' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `🛒 MARKET\n ┊ Seller : ${pushname}\n ┊ Buyer : Admin\n ┊ Harga/Emas : 25\n ┊ Status : Sukses\n ┊ Sisa Emas : ${getEmas(sender)}\n ┊ Sales Results : $${rp}`, ZimBotInc.user.name, m)
break
case 'selldiamond':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
if (args.length < 1) return reply(`Send command *${prefix + command}* amount to sell`)
ttl = body.slice(13)
var etoo = 75 * ttl
if (getDm(sender) < ttl) return reply(`Iron Isn't Enough`)
sellDm(sender, ttl)
addBalance(sender, etoo, balance)
buttons = [
{ buttonId: 'inventori', buttonText: { displayText: 'Inventori' }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `🛒 MARKET\n ┊ Seller : ${pushname}\n ┊ Buyer : Admin\n ┊ Harga/Dm : 75\n ┊ Status : Sukses\n ┊ Sisa Diamond : ${getDm(sender)}\n ┊ Sales Results : $${etoo}`, ZimBotInc.user.name, m)
break
case 'mancing':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
ikannya = ikan[Math.floor(Math.random() * ikan.length)]
xp = Math.ceil(Math.random() * 350)
coin = randomNomor(50)
ditangkap = Math.ceil(Math.random() * 50)
cing = await getBuffer(`https://telegra.ph/file/d9b15de4f661808dfd0b9.jpg`)
setTimeout( () => {
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `「 Memancing 」\n\n ┊ *Capture:* ${ikannya}\n ┊ *Total Get:* ${ditangkap} *Fish*\n ┊ MONEY : $${coin}\n ┊ EXP : ${xp}Xp`
ZimBotInc.sendMessage(from, { caption: hg, location: { jpegThumbnail: cing }, templateButtons: button, footer: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`, mentions: [sender] })
.catch ((err) => reply(mess.error))
}, 6000)
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: 'Managed to Get a Fish . . .' }, { quoted: m })
}, 5000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: '🎣 Attracting Kail. . .' }, { quoted: m })
}, 3000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: '🎣 Start Fishing . . .' }, { quoted: m })
}, 1500) // 1000 = 1s,
addFish(sender, ditangkap)
addLevelingXp(sender, xp)
addBalance(sender, coin, balance)
break
case 'adventure':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
ngab = ['Avalanche','Volcanic Eruption','Tsunami','Earthquake','Meteor','Demon']
var sesuatu = ngab[Math.floor(Math.random() * ngab.length)]
var dungeon =['Whetstone','Willow Field','Rodeo','Verdant Blufs','Bull Holland','Fallen Tree','Dellnort','Verona Lush','Leafy Hollow','Chilliad Dome','Garcia','Pine Valley','Santa Florals','Guvero East','Cranbarry','Junever','Aldea Malvada','Green Palms','Green Oasis','Fort Carson','Prickel Pine','Pilson Meadow','Boca Roca','Rocksore East','Camel Toe','Hanky Panky','Fern Ridge','Montgomerry','Flint Yankton','Vespucci','fortress city', 'ravines valley', 'horizon valley', 'cyber city', 'end city', 'templar city', 'pochinki', 'peak','Vertical Zone','Sentainel Country','Night City','Flush City','Royals Canyon','Blackburn','Peterborough','Tarnstead','Jarren’s','Outpost','Landow','Nearon','Kincardine','Aysgarth','Veritas','Openshaw','Bredwardine','Berkton','Wolford','Norwich','Kald','Solaris','Kilead','Pitmerden','Acomb','Eldham','Warcester','Lingmell','Kilead','Cromerth','Wingston','Garmsby','Kingcardine','Perthlochry','Frostford','Hillford','Hardersfield','Tarrin','Holmfirth','Caerleon','Elisyum','Ballaeter','Penshaw','Bradford','Wigston','Accreton','Kameeraska','Ferncombe','Kilerth','Erostey','Carran','Jongvale','Larnwick','Queenstown','Whaelrdrake','Baerney','Wingston','Arkney','Strongfair','Lowestoft','Beggar’s Hole','Shepshed','Perthlochry','Ironforge','Tywardreath','Pontheugh','Foolshope','Hull','Dalmerlington','Aucteraden','Woodpine','Millstone','Windermere','Lancaster','Kirkwall','Rotherhithe','Astrakhan','Watford','Ritherhithe','Krosstoen','Pella’s','Wish','Grimsby','Ayrith','Ampleforth','Skystead','Eanverness','Penshaw','Peatsland','Astrakane','Pontybridge','Caershire','Snowbush','Sutton','Northwich','Hogsfeet','Claethorpes','Sudbury','Cherrytown','Blue Field','Orrinshire','Aempleforth','Garrigill','Jedburgh','Eastbourne','Taedmorden','Venzor','Grasmere','Ubbin','Falls','Violl’s Garden','Glanchester','Bailymena','Arkkukari','Skargness','Cardend','Llanybydder','Faversham','Yellowseed','Carlisle','Cirencester','Aramoor','Furness','Kincardine','Rotherham','Emelle','Boroughton','Carran','Ffestiniog','Mansfield','Huthwaite','Marclesfield','Pavv','Squall’s End','Glenarm','Dragontail','Moressley','Hardersfield','Gilramore','Aria','Ecrin','Clare View Point','Blackburn','Oakheart','Doonatel','Broughton','Carlisle','Murlayfield','Nuxvar']
anu = fs.readFileSync('./lib/dungeon.js');
var ad = dungeon[Math.floor(Math.random() * dungeon.length)]
jsonData = JSON.parse(anu);
randIndex = Math.floor(Math.random() * jsonData.length);
randKey = jsonData[randIndex];
hasm = await getBuffer(randKey.result)
var adven = Math.ceil(Math.random() * 1000)
var money = Math.ceil(Math.random() * 300)
setTimeout( () => {
var button = [
{ urlButton: { displayText: `Script`, url : `${wame}` } },
{ quickReplyButton: { displayText: `Inventori`, id: `${prefix}inventori` } },
{ quickReplyButton: { displayText: `Owner`, id: `${prefix}owner` } }
]
var hg = `「 DEATH 」\n\n *┊ Place* ${ad}\n ┊ *MONEY :* $${money}\n ┊ *EXP :* ${adven}Xp`
ZimBotInc.sendMessage(from, { caption: hg, location: { jpegThumbnail: hasm }, templateButtons: button, footer: `ʀᴘɢ ɢᴀᴍᴇ ʙʏ ᴢɪᴍʙᴏᴛ`, mentions: [sender] })
.catch ((err) => reply(mess.error))
}, 7000)
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: `Awass` }, { quoted: m })
}, 5000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: `Suddenly There ${sesuatu}` }, { quoted: m })
}, 3000) // 1000 = 1s,
setTimeout( () => {
ZimBotInc.sendMessage(from, { text: `${pushname} On an Adventure` }, { quoted: m })
}, 1500) // 1000 = 1s,
addLevelingXp(sender, adven)
addBalance(sender, money, balance)
break
case 'luckyday':
case 'luckytime':
if (!m.isGroup) return reply(mess.group)
if (!isPetualang) return reply(mess.noPetualang)
{
ez = Math.ceil(Math.random() * 450)
a = randomNomor(99)
b = randomNomor(500)
c = randomNomor(150)
addBalance(sender, b, balance)
addLevelingXp(sender, ez)
addEmas(sender, a)
addBesi(sender, c)
buttons = [
{ buttonId: `${command}`, buttonText: { displayText: `TRY LUCKY` }, type: 1 }
]
ZimBotInc.sendButtonText(m.chat, buttons, `🎰 *Lucky*\n┊ *Money:* $${b}\n┊ *Gold :* ${a}\n┊ *Iron :* ${c}\n┊ *XP :* ${ez}`, ZimBotInc.user.name, m)
}
break
case 'afk': {
let user = global.db.users[m.sender]
user.afkTime = + new Date
user.afkReason = text
reply(`${m.pushName} Already Afk${text ? ': ' + text : ''}`)
}
break
/* case 'anyapk':
const anyApkDl = require("any-apk-dl")
const provider = anyApkDl()
provider.download("com.fmwhatsapp","./apks/").then(res=>{
console.log(res);
})
case 'apktes': //Script by zim-bot
const downloader = require("apk-downloader")
downloader.downloadAPK("com.microbees.floatingapp")
*/
/* case 'donasi': case 'donate': case 'sewabot': case 'sewa': case 'buypremium': case 'donate': {
ZimBotInc.sendMessage(m.chat, { image: { url: 'https://i.imgur.com/TfI3QYW.jpg' }, caption: `*𝗛𝗜 𝗕𝗥𝗢 ${m.pushName}*\n\n 𝗕𝗢𝗧 𝗥𝗘𝗡𝗧𝗔𝗟 𝗣𝗥𝗜𝗖𝗘\n 250rands Per Group via Gpay/paytm/phonepe 1 Month\n\nFor more details, you can chat with the owner\nhttps://wa.me/2+447441437150 (ZIM BOT OWNER)\n\n𝗗𝗢𝗡𝗔𝗧𝗘 : \n\n 𝗙𝗔𝗠𝗣𝗔𝗬 : https://i.imgur.com/TfI3QYW.jpg\n` }, { quoted: m })
}
*/
break
case 'sc': case 'script': case 'donate': case 'donasi': case 'donate': case 'sewabot': case 'sewa': case 'buypremium': case 'donate': {
teks = `
*ZIM-BOT-V4*\n\n*YOUTUBE:* https://youtu.be/KNu-gr2h7bo\n*GITHUB:* https://youtube.com/@zim-bot\n\n*DONATE:* https://www.paypal.com/paypalme/zimbotinc`
let buttons = [
{buttonId: `rpgmenu`, buttonText: {displayText: 'RPG'}, type: 1}
]
let buttonMessage = {
image: thumb,
jpegThumbnail: global.thumb,
caption: teks,
footer: `${botname}`,
buttons: buttons,
headerType: 4,
contextInfo:{externalAdReply:{
title:"DONATE ME",
body: "DRIPS OFC",
showAdAttribution: true,
thumbnail: fs.readFileSync("Zimbot/drips.jpg"),
mediaType:1,
mediaUrl: 'https://youtu.be/KNu-gr2h7bo',
sourceUrl: "https://youtu.be/KNu-gr2h7bog"
}}
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}
break
case 'forex': case 'broker': case 'binary': case 'trading': {
bentoforex = await getBuffer(picak+'LIVE FOREX')
teks = `
*ZIM-BOT-V4 FOREX TRADING*\n\n*DESCRIPTION:* _Trade with Deriv broker ( formerly called Binary ) link above. Create a Real Synthetic account You will get to trade famous indices like Volatility 75 Index, Crash, Boom and others. -Minimum deposit as low as 5 dollars. -You can trade even in weekends, these indices are available to trade 24 hours a day, 365 days a year. -No noise, Trade with Deriv broker ( formerly called Binary ) link above. The best Forex broker since year 2000. Create a Real Financial or Financial STP account for currency pairs._\n\n*GET STARTED TODAY:*\n\n*LINK:* https://track.deriv.com/_hx9O43AkP_tBMfcXPt5VjGNd7ZgqdRLk/1\n\n*LINK2:* https://record.binary.com/_Mxrjb7udl0q6tyDIijdDK2Nd7ZgqdRLk/1/\n\n*CONTACT:* https://wa.me/+263775482759 or https://wa.me/263784675236_*for help*_`
let buttons = [
{buttonId: `alive`, buttonText: {displayText: 'BACK'}, type: 1}
]
let buttonMessage = {
image: bentoforex,
jpegThumbnail: bentoforex,
caption: teks,
footer: `${botname}`,
buttons: buttons,
headerType: 4,
contextInfo:{externalAdReply:{
title:"DONATE ME",
body: "DRIPS OFC",
showAdAttribution: true,
thumbnail: fs.readFileSync("Zimbot/drips.jpg"),
mediaType:1,
mediaUrl: 'https://youtu.be/KNu-gr2h7bo',
sourceUrl: "https://youtu.be/KNu-gr2h7bog"
}}
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}
break
case 'chat': {
if (!isCreator) throw global.owner
if (!q) throw 'Option : 1. mute\n2. unmute\n3. archive\n4. unarchive\n5. read\n6. unread\n7. delete'
if (args[0] === 'mute') {
ZimBotInc.chatModify({ mute: 'Infinity' }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'unmute') {
ZimBotInc.chatModify({ mute: null }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'archive') {
ZimBotInc.chatModify({ archive: true }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'unarchive') {
ZimBotInc.chatModify({ archive: false }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'read') {
ZimBotInc.chatModify({ markRead: true }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'unread') {
ZimBotInc.chatModify({ markRead: false }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'delete') {
ZimBotInc.chatModify({ clear: { message: { id: m.quoted.id, fromMe: true }} }, m.chat, []).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
}
break
case 'mathquiz': case 'math': {
if (kuismath.hasOwnProperty(m.sender.split('@')[0])) throw "*There are still unfinished match*"
let { genMath, modes } = require('./src/math')
if (!text) throw `Mode: ${Object.keys(modes).join(' | ')}\nExample: ${prefix}math medium`
let result = await genMath(text.toLowerCase())
ZimBotInc.sendText(m.chat, `*What is the result of: ${result.soal.toLowerCase()}*?\n\nTime: ${(result.waktu / 1000).toFixed(2)} seconds`, m).then(() => {
kuismath[m.sender.split('@')[0]] = result.jawaban
})
await sleep(result.waktu)
if (kuismath.hasOwnProperty(m.sender.split('@')[0])) {
console.log("Answer: " + result.jawaban)
reply("Time Out\nAnswer: " + kuismath[m.sender.split('@')[0]])
delete kuismath[m.sender.split('@')[0]]
}
}
break
case 'mysoulmate': {
if (!m.isGroup) throw mess.group
let member = participants.map(u => u.id)
let me = m.sender
let jodoh = member[Math.floor(Math.random() * member.length)]
let jawab = `👫Your match is
@${me.split('@')[0]} ❤️ @${jodoh.split('@')[0]}`
let ments = [me, jodoh]
let buttons = [
{ buttonId: '❤️', buttonText: { displayText: 'LOVE♥️' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, jawab, ZimBotInc.user.name, m, {mentions: ments})
}
break
case 'couple': {
if (!m.isGroup) throw mess.group
let member = participants.map(u => u.id)
let orang = member[Math.floor(Math.random() * member.length)]
let jodoh = member[Math.floor(Math.random() * member.length)]
let jawab = `@${orang.split('@')[0]} ❤️ @${jodoh.split('@')[0]}
Ciee Whats Going On💖👀`
let menst = [orang, jodoh]
let buttons = [
{ buttonId: '❤️', buttonText: { displayText: 'DATING♥️' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, jawab, ZimBotInc.user.name, m, {mentions: menst})
}
break
case 'join': {
if (!isCreator) throw global.owner
if (!text) throw 'Enter the group link!'
if (!isUrl(args[0]) && !args[0].includes('whatsapp.com')) throw '*LINK INVALID*'
replay(mess.wait)
let result = args[0].split('https://chat.whatsapp.com/')[1]
await ZimBotInc.groupAcceptInvite(result).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
break
case 'leave': {
if (!isCreator) throw global.owner
await ZimBotInc.groupLeave(m.chat).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
break
case 'kick': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.groupParticipantsUpdate(m.chat, [users], 'remove')
}
break
case 'add': {
if (!m.isGroup) throw mess.group
if (!isCreator) throw global.owner
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.groupParticipantsUpdate(m.chat, [users], 'add')
}
break
case 'promote': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.groupParticipantsUpdate(m.chat, [users], 'promote')
}
break
case 'demote': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.groupParticipantsUpdate(m.chat, [users], 'demote')
}
break
case 'block': {
if (!isCreator) throw global.owner
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.updateBlockStatus(users, 'block').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
break
case 'unblock': {
if (!isCreator) throw global.owner
let users = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
await ZimBotInc.updateBlockStatus(users, 'unblock').then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
break
case 'setname': case 'setsubject': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (!text) throw 'Text ?'
await ZimBotInc.groupUpdateSubject(m.chat, text).then((res) => reply(mess.success)).catch((err) => reply(jsonformat(err)))
}
break
case 'setdesc': case 'setdesk': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (!text) throw 'Text ?'
await ZimBotInc.groupUpdateDescription(m.chat, text).then((res) => reply(mess.success)).catch((err) => reply(jsonformat(err)))
}
break
case 'setppbot': case 'setbotpp': {
if (!isCreator) throw global.owner
if (!quoted) throw `Send/Reply Image With Caption ${prefix + command}`
if (!/image/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
if (/webp/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
await ZimBotInc.updateProfilePicture(botNumber, { url: media }).catch((err) => fs.unlinkSync(media))
reply(mess.success)
}
break
case 'setppgroup': case 'setgrouppp': case 'setgcpp': case 'setppgrup': case 'setppgc': {
if (!m.isGroup) throw mess.group
if (!isAdmins) throw mess.admin
if (!quoted) throw `Send/Reply Image With Caption ${prefix + command}`
if (!/image/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
if (/webp/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
await ZimBotInc.updateProfilePicture(m.chat, { url: media }).catch((err) => fs.unlinkSync(media))
reply(mess.success)
}
break
case 'setbio':
reply(mess.wait)
if (!q) return reply('Send orders *#setbio text*')
ZimBotInc.setStatus(`${q}`)
reply(mess.success)
break
case 'grupinfo': case 'groupinfo':
try{
var pic = await ZimBotInc.getProfilePicture(m.chat)
} catch {
var pic = 'https://i.ibb.co/Tq7d7TZ/age-hananta-495-photo.png'
}
let ingfo = `*𝗚𝗥𝗢𝗨𝗣 𝗜𝗡𝗙𝗢*\n\n*𝗡𝗔𝗠𝗘 :* ${groupName}\n*𝗜𝗗 𝗚𝗥𝗢𝗨𝗣:* ${m.chat}\n*𝗠𝗔𝗗𝗘 :* ${moment(`${groupMetadata.creation}` * 1000).tz('Africa/Harare').format('DD/MM/YYYY HH:mm:ss')}\n*𝗚𝗥𝗢𝗨𝗣 𝗢𝗪𝗡𝗘𝗥:* @${groupMetadata.owner.split('@')[0]}\n*𝗔𝗗𝗠𝗜𝗡𝗦 :* ${groupAdmins.length}\n*𝗠𝗘𝗠𝗕𝗘𝗥𝗦 :* ${participants.length}\n*𝗗𝗘𝗦𝗖 :* \n${groupMetadata.desc}`
ds = await getBuffer(pic)
ZimBotInc.sendMessage(m.chat, { image: ds,caption: ingfo, mentions: [groupMetadata.owner] }, { quoted: m})
break
case 'tagall': case 'tag': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
let teks = `
┃*𝐌𝐄𝐒𝐒𝐀𝐆𝐄 : ${q ? q : 'blank'}*\n\n
`
for (let mem of participants) {
teks += `BOTTAG @${mem.id.split('@')[0]}\n`
}
ZimBotInc.sendMessage(m.chat, { text: teks, mentions: participants.map(a => a.id) }, { quoted: m })
}
break
case 'hidetag': {
if (!m.isGroup) throw mess.group
if (!isAdmins) throw mess.admin
ZimBotInc.sendMessage(m.chat, { text : q ? q : '' , mentions: participants.map(a => a.id)}, { quoted: m })
}
break
case 'style': case 'styletext': {
if (!isPremium && global.db.users[m.sender].limit < 1) return reply(mess.endLimit) // response when limit runs out
db.users[m.sender].limit -= 1 // -1 limit
let { styletext } = require('./lib/scraper')
if (!text) throw 'Enter Query text!'
let anu = await styletext(text)
let teks = `Entered Text: ${text}\n\n`
for (let i of anu) {
teks += `🔏 *${i.name}* : ${i.result}\n\n`
}
reply(teks)
}
break
case 'vote': {
if (!m.isGroup) throw mess.group
if (m.chat in vote) throw `_There are still votes in this chat!_\n\n*${prefix}deletevote* - to delete votes`
if (!text) throw `Enter Reason for Vote, Example: *${prefix + command} Owner is handsome*`
reply(`Voting starts!\n\n*${prefix}upvote* - for yes\n*${prefix}devote* - for no\n*${prefix}checkvote* - to check the votes\n*${prefix}deletevote* - to delete vote`)
vote[m.chat] = [q, [], []]
await sleep(1000)
upvote = vote[m.chat][1]
devote = vote[m.chat][2]
teks_vote = `
┏━━━━━━━━━━⧁
┃ 𝗨𝗣𝗩𝗢𝗧𝗘
┃
┃𝗥𝗘𝗔𝗦𝗢𝗡: ${vote[m.chat][0]}
┃
┃*Total:* ${vote[m.chat][1].length}
┗━━━━━━━━━━⧁
┏━━━━━━━━━━⧁
┃𝗗𝗘𝗩𝗢𝗧𝗘
┃
┃ *Total:* ${vote[m.chat][2].length}
┗━━━━━━━━━━⧁
*${prefix}deletevote* - to delete votes`
let buttonsVote = [
{buttonId: `${prefix}upvote`, buttonText: {displayText: '𝗨𝗣𝗩𝗢𝗧𝗘'}, type: 1},
{buttonId: `${prefix}devote`, buttonText: {displayText: '𝗗𝗘𝗩𝗢𝗧𝗘'}, type: 1}
]
let buttonMessageVote = {
text: teks_vote,
footer: ZimBotInc.user.name,
buttons: buttonsVote,
headerType: 1
}
ZimBotInc.sendMessage(m.chat, buttonMessageVote)
}
break
case 'upvote': {
if (!m.isGroup) throw mess.group
if (!(m.chat in vote)) throw `_*no voting in this group!*_\n\n*Type ${prefix}vote* - to start voting`
isVote = vote[m.chat][1].concat(vote[m.chat][2])
wasVote = isVote.includes(m.sender)
if (wasVote) throw 'You have Voted'
vote[m.chat][1].push(m.sender)
menvote = vote[m.chat][1].concat(vote[m.chat][2])
teks_vote = `
┏━⧀ *VOTE* ⧁
┃*𝗥𝗘𝗔𝗦𝗢𝗡:* ${vote[m.chat][0]}
┃
┃ 𝗨𝗣𝗩𝗢𝗧𝗘 ༻
┃
┃ Total: ${vote[m.chat][1].length}
┃${vote[m.chat][1].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
┃
╰━━━━━━━━━━━━⧁
┏━━⧀𝗗𝗘𝗩𝗢𝗧𝗘⧁
┃
┃ Total: ${vote[m.chat][2].length}
┃${vote[m.chat][2].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
┃
╰━━━━━━━━━━━━━⧁
*${prefix}hapusvote* - to delete votes`
let buttonsUpvote = [
{buttonId: `${prefix}upvote`, buttonText: {displayText: 'UPVOTE'}, type: 1},
{buttonId: `${prefix}devote`, buttonText: {displayText: 'DEVOTE'}, type: 1}
]
let buttonMessageUpvote = {
text: teks_vote,
footer: ZimBotInc.user.name,
buttons: buttonsUpvote,
headerType: 1,
mentions: menvote
}
ZimBotInc.sendMessage(m.chat, buttonMessageUpvote)
}
break
case 'devote': {
if (!m.isGroup) throw mess.group
if (!(m.chat in vote)) throw `_*no voting in this group!*_\n\n*${prefix}vote* - to start voting`
isVote = vote[m.chat][1].concat(vote[m.chat][2])
wasVote = isVote.includes(m.sender)
if (wasVote) throw 'You Have Voted'
vote[m.chat][2].push(m.sender)
menvote = vote[m.chat][1].concat(vote[m.chat][2])
teks_vote = `
*𝗗𝗘𝗩𝗢𝗧𝗘:* ${vote[m.chat][0]}
┏༺ 𝗨𝗣𝗩𝗢𝗧𝗘 ༻
┃
┃ Total: ${vote[m.chat][1].length}
${vote[m.chat][1].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
┃
╰━━━━━━━━━━
┏༺ 𝗗𝗘𝗩𝗢𝗧𝗘 ༻
┃
┃ Total: ${vote[m.chat][2].length}
${vote[m.chat][2].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
┃
┗━━━━━━━━━━━━
*${prefix}hapusvote* - to delete votes`
let buttonsDevote = [
{buttonId: `${prefix}upvote`, buttonText: {displayText: 'UPVOTE'}, type: 1},
{buttonId: `${prefix}devote`, buttonText: {displayText: 'DEVOTE'}, type: 1}
]
let buttonMessageDevote = {
text: teks_vote,
footer: ZimBotInc.user.name,
buttons: buttonsDevote,
headerType: 1,
mentions: menvote
}
ZimBotInc.sendMessage(m.chat, buttonMessageDevote)
}
break
case 'checkvote':
if (!m.isGroup) throw mess.group
if (!(m.chat in vote)) throw `_*no voting in this group!*_\n\n*${prefix}vote* - to start voting`
teks_vote = `༼༺⋋ 𝗩𝗢𝗧𝗘 ⋌༻༽
*𝗥𝗘𝗔𝗦𝗢𝗡:* ${vote[m.chat][0]}
┌༺ 𝗨𝗣𝗩𝗢𝗧𝗘 ༻
├ Total: ${upvote.length}
${vote[m.chat][1].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
└────
┌༺ 𝗗𝗘𝗩𝗢𝗧𝗘 ༻
├ Total: ${devote.length}
${vote[m.chat][2].map((v, i) => `├ ${i + 1}. @${v.split`@`[0]}`).join('\n')}
└────
*${prefix}hapusvote* - to delete votes
©${ZimBotInc.user.id}
`
ZimBotInc.sendTextWithMentions(m.chat, teks_vote, m)
break
case 'deletevote': case'delvote': case 'hapusvote': {
if (!m.isGroup) throw mess.group
if (!(m.chat in vote)) throw `_*tidak ada voting digrup ini!*_\n\n*${prefix}vote* - to start voting`
delete vote[m.chat]
reply('*Successfully deleted vote session in this group*')
}
break
case 'group': case 'grup': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === 'close'){
await ZimBotInc.groupSettingUpdate(m.chat, 'announcement').then((res) => reply(`Successful closing the group`)).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'open'){
await ZimBotInc.groupSettingUpdate(m.chat, 'not_announcement').then((res) => reply(`Successful Opening The Group`)).catch((err) => reply(jsonformat(err)))
} else {
let buttons = [
{ buttonId: 'group open', buttonText: { displayText: 'OPEN' }, type: 1 },
{ buttonId: 'group close', buttonText: { displayText: 'CLOSE' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `Group Mode`, ZimBotInc.user.name, m)
}
}
break
case 'editinfo': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === 'open'){
await ZimBotInc.groupSettingUpdate(m.chat, 'unlocked').then((res) => reply(`Successfully opened edit group Info`)).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'close'){
await ZimBotInc.groupSettingUpdate(m.chat, 'locked').then((res) => reply(`Successfully Close Edit Group Info`)).catch((err) => reply(jsonformat(err)))
} else {
let buttons = [
{ buttonId: 'editinfo open', buttonText: { displayText: 'OPEN' }, type: 1 },
{ buttonId: 'editinfo close', buttonText: { displayText: 'CLOSE' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `*GROUP SESSION*`, ZimBotInc.user.name, m)
}
}
break
/*
case 'chatbot':
if (isCreator) throw mess.owner
if (args[0] === 'on') {
if (isChatbot) return reply('*already activated*')
chatbot.push(botNumber)
reply('*chatbot on*')
} else if (args[0] === 'off') {
if (!isChatbot) return reply('*already deactivated*')
var ini = chatbot.indexOf(botNumber)
chatbot.splice(ini, 1)
reply('*chatbot off*')
} else {
let buttons = [
{ buttonId: 'chatbot on', buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: 'chatbot off', buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `*CHATBOT SESSION*`, ZimBotInc.user.name, m)
}
*/
break
case 'chatbot': {
if (!isCreator) throw mess.owner
if (args[0] === "on") {
if (db.settings[botNumber].chatbot) return reply(`*chatbot already on okay*`)
db.settings[botNumber].chatbot = true
reply(`*chatbot on enjoy talking to me okay*`)
} else if (args[0] === "off") {
if (!db.settings[botNumber].chatbot) return reply(`*Already off okay*`)
db.settings[botNumber].chatbot = false
reply(`*It was nice to chat with you goodbye _chatbot off_*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ʟᴏᴄᴀʟ ᴏɴʟʏ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'privatechat': {
if (!isCreator) throw mess.owner
if (args[0] === "on") {
if (db.settings[botNumber].privatechat) return reply(`*chatbot already on okay*`)
db.settings[botNumber].privatechat = true
reply(`*chatbot on enjoy talking to me okay*`)
} else if (args[0] === "off") {
if (!db.settings[botNumber].privatechat) return reply(`*Already off okay*`)
db.settings[botNumber].privatechat = false
reply(`*It was nice to chat with you goodbye _chatbot off_*`)
} else {
let dripsu = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, dripsu, `*┃🔏ʟᴏᴄᴀʟ ᴏɴʟʏ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
case 'chatgpt': {
if (!isCreator) throw mess.owner
if (args[0] === "on") {
if (db.settings[botNumber].chatgpt) return reply(`*Artificial Intelligence(AI) chatgpt already on okay*`)
db.settings[botNumber].chatgpt = true
reply(`*Artificial Intelligence(AI) chatgpt on enjoy learning from me okay*`)
} else if (args[0] === "off") {
if (!db.settings[botNumber].chatgpt) return reply(`*Artificial Intelligence(AI) chatgpt off okay*`)
db.settings[botNumber].chatgpt = false
reply(`*It was nice to chat with you goodbye _Artificial Intelligence(AI) chatgpt off_*`)
} else {
let dripsu = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, dripsu, `*┃🔏ᴄʜᴀᴛɢᴘᴛ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'welcome': {
if (!m.isGroup) throw mess.group
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].isWelcome) return reply(`*Welcome already on okay*`)
db.chats[m.chat].isWelcome = true
reply(`*welcome on*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].isWelcome) return reply(`*Already off okay*`)
db.chats[m.chat].isWelcome = false
reply(`*welcome off*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴡᴇʟᴄᴏᴍᴇ ᴍᴏᴅᴇ🔏┃**`, ZimBotInc.user.name, m)
}
}
break
case 'localonly': {
if (!m.isGroup) throw mess.group
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].localonly) return reply(`*🤖ʟᴏᴄᴀʟ ᴏɴʟʏ ᴀʟʀᴇᴀᴅʏ ᴏɴ ᴏᴋᴀʏ*`)
db.chats[m.chat].localonly = true
reply(`*🤖ʟᴏᴄᴀʟ ᴏɴʟʏ ᴏɴ*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].localonly) return reply(`*🧸ᴀʟʀᴇᴀᴅʏ ᴏғғ ᴏᴋᴀʏ*`)
db.chats[m.chat].localonly = false
reply(`*🤖ʟᴏᴄᴀʟ ᴏɴʟʏ ᴏғғ*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ʟᴏᴄᴀʟ ᴏɴʟʏ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'grouponly': {
if (!isCreator) throw mess.owner
if (args[0] === "on") {
if (db.settings[botNumber].grouponly) return reply(`*Grouponly already on okay*`)
db.settings[botNumber].grouponly = true
reply(`*grouponly on*`)
} else if (args[0] === "off") {
if (!db.settings[botNumber].grouponly) return reply(`*Grouponly Already off okay*`)
db.settings[botNumber].grouponly = false
reply(`*Grouponly off*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ɢʀᴏᴜᴘ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'autoblock': {
if (!isCreator) throw mess.owner
if (args[0] === "on") {
if (db.settings[botNumber].autoblock) return reply(`*Autoblock already on okay*`)
db.settings[botNumber].autoblock = true
reply(`*Autoblock on*`)
} else if (args[0] === "off") {
if (!db.settings[botNumber].autoblock) return reply(`*Autoblock Already off okay*`)
db.settings[botNumber].autoblock = false
reply(`*Autoblock off*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀᴜᴛᴏʙʟᴏᴄᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
//-----GROUP---\\
//--CREATED BY DRIPS--\\
case 'antiwame': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].wame) return reply(`Already Activated`)
db.chats[m.chat].wame = true
reply(`Anti Wa.me Activated!`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].wame) return reply(`Already deactivated`)
db.chats[m.chat].wame = false
reply(`Anti Wa.me is not activated!`)
} else {
let buttons = [
{ buttonId: 'antiwame on', buttonText: { displayText: 'On' }, type: 1 },
{ buttonId: 'antiwame off', buttonText: { displayText: 'Off' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `Mode Anti Wa.me`, ZimBotInc.user.name, m)
}
}
break
case 'mute': {
if (!m.isGroup) throw mess.group
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].mute) return reply(`Already activated`)
db.chats[m.chat].mute = true
reply(`${ZimBotInc.user.name} has been muted in this group !`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].mute) return reply(`Already deactivated`)
db.chats[m.chat].mute = false
reply(`${ZimBotInc.user.name} has been unmuted in this group!`)
} else {
let buttons = [
{ buttonId: 'mute on', buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: 'mute off', buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `Mute Bot`, ZimBotInc.user.name, m)
}
}
break
case 'antilink': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antilink) return reply(`*Already on umm okay*`)
db.chats[m.chat].antilink = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antilink) return reply(`*Already off okay*`)
db.chats[m.chat].antilink = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: 'antilink on', buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: 'antilink off', buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪʟɪɴᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antiytchannel': case 'antilinkyoutubechannel': case 'antiytchannel': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antiytchannel) return reply(`*Already on umm okay*`)
db.chats[m.chat].antiytchannel = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antiytchannel) return reply(`*Already off okay*`)
db.chats[m.chat].antiytchannel = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪʏᴛ ʟɪɴᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antilinkinstagram': case 'adripsantiig': case 'antiinsta': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antiinstagram) return reply(`*Already on umm okay*`)
db.chats[m.chat].antiinstagram= true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antiinstagram) return reply(`*Already off okay*`)
db.chats[m.chat].antiinstagram = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪ ɪɴsᴛᴀ ʟɪɴᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antilinkfacebook': case 'antifb': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antifb) return reply(`*Already on umm okay*`)
db.chats[m.chat].antifb = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antifb) return reply(`*Already off okay*`)
db.chats[m.chat].antifb = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪ ғʙ ʟɪɴᴋs ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antitelegram': case 'adripsantitele': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antitelegram) return reply(`*Already on umm okay*`)
db.chats[m.chat].antitelegram = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antitelegram) return reply(`*Already off okay*`)
db.chats[m.chat].antitelegram = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪ ᴛᴇʟᴇ ʟɪɴᴋs ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antivn': case 'antiaudio': case 'antivoicenote': case 'antivoice': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antivn) return reply(`*Already on umm okay*`)
db.chats[m.chat].antivn = true
reply(`*Antivn active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antivn) return reply(`*Already off okay*`)
db.chats[m.chat].antivn = false
reply(`*Antivn disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪ ᴠɴ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antisticker': case 'nostickers': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antisticker) return reply(`*Already on umm okay*`)
db.chats[m.chat].antisticker = true
reply(`*Antisticker active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antisticker) return reply(`*Already off okay*`)
db.chats[m.chat].antisticker = false
reply(`*Antisticker disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪ sᴛɪᴄᴋᴇʀ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antiphoto': case 'antipic': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antiphoto) return reply(`*Already on umm okay*`)
db.chats[m.chat].antiphoto = true
reply(`*Antiphoto active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antiphoto) return reply(`*Already off okay*`)
db.chats[m.chat].antiphoto = false
reply(`*Antiphoto disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ʟᴏᴄᴀʟ ᴏɴʟʏ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antivideo': case 'antivid': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antivideo) return reply(`*Already on umm okay*`)
db.chats[m.chat].antivideo = true
reply(`*Antivideo active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antivideo) return reply(`*Already off okay*`)
db.chats[m.chat].antivideo = false
reply(`*Antivideo disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪᴠɪᴅᴇᴏ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antiviewonce': case 'antionce':
if (!m.key.fromMe && !isCreator) throw mess.owner
if (args[0] === "on") {
if (global.db.chats[m.chat].antionce) return reply(`*Already activated*`)
global.db.chats[m.chat].antionce = true
reply(`${command} *Successfully Activated*`)
} else if (args[0] === "off") {
if (!global.db.chats[m.chat].antionce) return reply(`*Already deactivated*`)
global.db.chats[m.chat].antionce = false
reply(`${command} *Successfully Deactivated*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪᴠɪᴇᴡ ᴏɴᴄᴇ ᴍᴏᴅᴇ🔏┃*`, `${global.botname}`, m)
}
break
case 'antitiktok': case 'aantitik': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antitiktok) return reply(`*Already on umm okay*`)
db.chats[m.chat].antitiktok = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antitiktok) return reply(`*Already off okay*`)
db.chats[m.chat].antitiktok = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪᴛɪᴋᴛᴏᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antilinkall': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antilinkall) return reply(`*Already on umm okay*`)
db.chats[m.chat].antilinkall = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antilinkall) return reply(`*Already off okay*`)
db.chats[m.chat].antilinkall = false
reply(`*Antilink disabled*`)
} else {
let drips = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, drips, `*┃🔏ᴀɴᴛɪʟᴏɴᴋ ᴀʟʟ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'adripsantitwt': case 'antitwitter': case 'antilinktwit': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (args[0] === "on") {
if (db.chats[m.chat].antitwitter) return reply(`*Already on umm okay*`)
db.chats[m.chat].antitwitter = true
reply(`*Antilink active*`)
} else if (args[0] === "off") {
if (!db.chats[m.chat].antitwitter) return reply(`*Already off okay*`)
db.chats[m.chat].antitwitter = false
reply(`*Antilink disabled*`)
} else {
let dripsi = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, dripsi, `*┃🔏ᴀɴᴛɪ ᴛᴡɪᴛᴛᴇʀ ʟɪɴᴋ ᴍᴏᴅᴇ🔏┃*`, ZimBotInc.user.name, m)
}
}
break
case 'antibadword': {
if (!m.isGroup) return reply(mess.group)
if (!isBotAdmins) return reply(mess.botAdmin)
if (!isAdmins && !isCreator) return reply(mess.admin)
if (args[0] === "on") {
if (antiToxic) return reply('*Already activated*')
dripsanti.push(from)
reply('*Success turning on anti rude in this group*')
var group = await ZimBotInc.groupMetadata(from)
var members = group['participants']
var mems = []
members.map(async adm => {
mems.push(adm.id.replace('c.us', 's.whatsapp.net'))
})
ZimBotInc.sendMessage(from, {text: `*▊▊▊ANTILINK RUDE▊▊▊*\n\n*no hate speech anymore, watch space im going to kick dumps*`, contextInfo: { mentionedJid : mems }}, {quoted:m})
} else if (args[0] === "off") {
if (!antiToxic) return reply('*Already deactivated*')
let off = dripsanti.indexOf(from)
dripsanti.splice(off, 1)
reply('*Success in turning off antirude in this group happy now*')
} else {
let buttons = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, buttons, `*▊▊▊ANTI BADWORDS▊▊▊*\n\n.`, `${global.botname}`, m)
}
}
break
case 'linkgroup': case 'grouplink': case 'gclink': case 'linkgc':{
if (!m.isGroup) throw mess.group
let response = await ZimBotInc.groupInviteCode(m.chat)
ZimBotInc.sendText(m.chat, `https://chat.whatsapp.com/${response}\n\nLink of: ${groupMetadata.subject} Group`,m ,{ detectLink: true })
}
break
case 'nsfw': {
if (!m.isGroup) return reply(mess.group)
if (!isBotAdmins) return reply(mess.botAdmin)
if (!isAdmins && !isCreator) return reply(mess.admin)
if (args[0] === "on") {
if (isAntinsfw) return reply('*Already activated*')
dripsno.push(from)
reply('*hahaha turning on horny mood in this group happy now*')
var group = await ZimBotInc.groupMetadata(from)
var members = group['participants']
var mems = []
members.map(async adm => {
mems.push(adm.id.replace('c.us', 's.whatsapp.net'))
})
ZimBotInc.sendMessage(from, {text: `*horny mood activated everyone be ready for masturbation*`, contextInfo: { mentionedJid : mems }}, {quoted:m})
} else if (args[0] === "off") {
if (!isAntinsfw) return reply('*Already deactivated*')
let off = dripsno.indexOf(from)
dripsno.splice(off, 1)
reply('*Success turning off horny mood in this group*')
} else {
let button = [
{ buttonId: `${command} on`, buttonText: { displayText: 'ON' }, type: 1 },
{ buttonId: `${command} off`, buttonText: { displayText: 'OFF' }, type: 1 }
]
await ZimBotInc.sendButtonText(m.chat, button, `*▊▊▊HORNY MOOD▊▊▊*\n\n*TURN IT ON SO PEOPLE THEY WILL START TO MASTURBATE LOL*`, `${global.botname}`, m)
}
}
break
case 'ephemeral': {
if (!m.isGroup) throw mess.group
if (!isBotAdmins) throw mess.botAdmin
if (!isAdmins) throw mess.admin
if (!text) throw 'Enter the enable/disable value, For Example ${prefix}ephemeral enable'
if (args[0] === 'enable') {
await ZimBotInc.sendMessage(m.chat, { disappearingMessagesInChat: WA_DEFAULT_EPHEMERAL }).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
} else if (args[0] === 'disable') {
await ZimBotInc.sendMessage(m.chat, { disappearingMessagesInChat: false }).then((res) => reply(jsonformat(res))).catch((err) => reply(jsonformat(err)))
}
}
break
case 'translate': case 'terjemahan': case 'tr': {
tes = await fetchJson (`https://megayaa.herokuapp.com/api/translate?to=en&kata=${args.join(" ")}`)
Infoo = tes.info
Detek = tes.translate
reply(`🌐Translate : ${Detek}\n`)
}
break
/* case 'translate': case 'terjemahan': case 'tr': {
tes = await fetchJson (`https://soccer.sportmonks.com/api/v2.0/livescores&api_token=y5TQaQFczQuU3awKmWEi1eD1Sy3U6WuTkNZAw2fdQEtHDRwgJpkCZVUf9DYb`)
Infoo = tes.info
Detek = tes.translate
reply(`🌐Translate : ${Detek}\n`)
}
*/
break
break
case 'git': case 'gitclone':
reply(mess.wait)
let regex1 = /(?:https|git)(?::\/\/|@)github\.com[\/:]([^\/:]+)\/(.+)/i
if(!args[0]) throw 'link github EXAMPLE: https://youtube.com/@zim-bot/zim-bot-md'
if (!regex1.test(args[0])) throw 'link!'
let [, user, repo] = args[0].match(regex1) || []
repo = repo.replace(/.git$/, '')
let url = `https://api.github.com/repos/${user}/${repo}/zipball`
let filename = (await fetch(url, {method: 'HEAD'})).headers.get('content-disposition').match(/attachment; filename=(.*)/)[1]
// 'attachment; filenameq=ZidniGanz.zip'
reply(`*Please wait, sending repository..*`)
ZimBotInc.sendMessage(m.chat, { document: { url: url }, fileName: filename+'.zip', mimetype: 'application/zip' , quoted: m,contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync('./drips.jpg'),
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo`,
}}
})
break
case 'tagme': {
ZimBotInc.sendMessage(m.chat, {text:`@${m.sender.split("@")[0]}`, contextInfo:{mentionedJid:[m.sender]}}, {quoted:m})
}
break
case 'truth':
const trut =['Have you loved anyone? How long?','If you can or if you want, outside school/college Who will you make friends? (May be different / high school)','What is your biggest fear?','Have you liked a people and felt that person likes you too?','Who is your ex-girlfriend?','What makes you happy when you are sad?','Ever loved someone? what does it feels like?','Have you ever been in an affair?','The most feared thing','Who is the most influential person to your life?','What is the proud thing you did this year?',' Who can make you smile?','Who is the person you truly love? What is the reason? ','Mention the incident that makes you hurt that you still remember','What are the achievements that have been crushed on this year?','What is your worst habit when at school?']
const ttrth = trut[Math.floor(Math.random() * trut.length)]
truteh = await getBuffer(`https://i.ibb.co/305yt26/bf84f20635dedd5dde31e7e5b6983ae9.jpg`)
ZimBotInc.sendMessage(m.chat, {image: truteh, caption: '*Truth*\n\n'+ ttrth, quoted: m,contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
break
case 'ghsearch':
case 'githubsearch':
case 'searchgithub':
if (!q) return reply('*What are you looking for?*')
let pomi = await fetch('https://api.github.com/search/repositories?q='+q)
let dhumi = await pomi.json()
if (pomi.status !== 200) throw dhumi
str = dhumi.items.map((repo, index) => {
return `
${1 + index}. *${repo.full_name}*${repo.fork ? '*FORKS*' : ''}
${repo.html_url}
*CREATED ON:* ${formatDate(repo.created_at)}
*LAST UPDATED ON:* ${formatDate(repo.updated_at)}
👁 ${repo.watchers} 🍴 ${repo.forks} ⭐ ${repo.stargazers_count}
${repo.open_issues} *ISSUES:*${repo.description ? `
*DESCRIPTION:*\n${repo.description}` : ''}
*CLONE:* $ git clone ${repo.clone_url}
`.trim()
}).join('\n\n')
reply(str)
break
case 'delete': case 'del': {
if (!m.quoted) throw false
let { chat, fromMe, id, isBaileys } = m.quoted
if (!isBaileys) throw '*The message was not sent by a bot💥*'
ZimBotInc.sendMessage(m.chat, { delete: { remoteJid: m.chat, fromMe: true, id: m.quoted.id, participant: m.quoted.sender } })
}
break
case 'bcgc': case 'bcgroup': {
if (!isCreator) throw global.owner
if (!text) throw `Where is the text?\n\nExample : ${prefix + command} hello guys, am back`
let getGroups = await ZimBotInc.groupFetchAllParticipating()
let groups = Object.entries(getGroups).slice(0).map(entry => entry[1])
let anu = groups.map(v => v.id)
reply(`Send Broadcast To ${anu.length} Group Chat, Finish Time ${anu.length * 1.5} second`)
for (let i of anu) {
await sleep(1500)
let btn = [{
urlButton: {
displayText: 'SUBSCRIBE',
url: 'https://youtube.ccom/c/DRIPSOFC'
}
}, {
callButton: {
displayText: 'OWNER',
phoneNumber: '+27 634-090-0203'
}
}, {
quickReplyButton: {
displayText: 'PING',
id: 'ping'
}
}, {
quickReplyButton: {
displayText: 'OWNER',
id: 'owner'
}
}, {
quickReplyButton: {
displayText: 'SCRIPT',
id: 'sc'
}
}]
fatihgans = fs.readFileSync('./Zimbot/drips.jpg')
let txt = `「 ZimBot Broadcast 」\n\n${text}`
ZimBotInc.send5ButImg(i, txt, ZimBotInc.user.name, fatihgans, btn)
}
reply(`Successful Sending Broadcast To ${anu.length} Group(s)`)
}
break
case 'bc': case 'broadcast': case 'bcall': {
if (!isCreator) throw global.owner
if (!text) throw `Where is the text?\n\nExample : ${prefix + command} Zimbot here`
let anu = await store.chats.all().map(v => v.id)
reply(`Mengirim Broadcast Ke ${anu.length} Chat\nWaktu Selesai ${anu.length * 1.5} second`)
for (let yoi of anu) {
await sleep(1500)
let btn = [{
urlButton: {
displayText: 'GITHUB',
url: 'https://youtube.com/@zim-bot/zimbot-v2'
}
}, {
quickReplyButton: {
displayText: 'OWNER',
id: 'owner'
}
}]
fatihgans = fs.readFileSync('./Zimbot/drips.jpg')
let txt = `「 ZIM BOT BROADCAST 」\n\n${text}`
ZimBotInc.send5ButImg(yoi, txt, `Broadcast By ${global.pengguna}`, fatihgans, btn)
}
reply('*Broadcast Success*')
}
break
case 'chatinfo': {
if (!m.quoted) reply('*Reply to mesaage👀*')
let msg = await m.getQuotedObj()
if (!m.quoted.isBaileys) throw '*The message was not sent by a bot!💥*'
let teks = ''
for (let i of msg.userReceipt) {
let read = i.readTimestamp
let unread = i.receiptTimestamp
let waktu = read ? read : unread
teks += `🔏 @${i.userJid.split('@')[0]}\n`
teks += `🔏 *𝗧𝗜𝗠𝗘 :* ${moment(waktu * 1000).format('DD/MM/YY HH:mm:ss')} 🔏 *𝗦𝗧𝗔𝗧𝗨𝗦 :* ${read ? 'Read' : 'Unread'}\n\n`
}
ZimBotInc.sendTextWithMentions(m.chat, teks, m)
}
break
case 'q': case 'quoted': {
if (!m.quoted) return reply('Reply Message!!')
let wokwol = await ZimBotInc.serializeM(await m.getQuotedObj())
if (!wokwol.quoted) return reply('*The message you replied to does not contain a reply💫*')
await wokwol.quoted.copyNForward(m.chat, true)
}
break
case 'listpc': {
let anu = await store.chats.all().filter(v => v.id.endsWith('.net')).map(v => v.id)
let teks = `⬣ *LIST PERSONAL CHAT*\n\nTotal Chat : ${anu.length} Chat\n\n`
for (let i of anu) {
let nama = store.messages[i].array[0].pushName
teks += `⬡ *NAME :* ${nama}\n⬡ *USER :* @${i.split('@')[0]}\n⬡ *CHAT :* https://wa.me/${i.split('@')[0]}\n\n━━━━━━━━━━━━━━━━━━━━━━━━\n\n`
}
ZimBotInc.sendTextWithMentions(m.chat, teks, m)
}
break
break
case 'listgc': {
let anu = await store.chats.all().filter(v => v.id.endsWith('@g.us')).map(v => v.id)
let teks = `🔏𝗚𝗥𝗢𝗨𝗣 𝗖𝗛𝗔𝗧 𝗟𝗜𝗦𝗧\n\n𝗧𝗢𝗧𝗔𝗟 𝗚𝗥𝗢𝗨𝗣 : ${anu.length} Group\n\n`
for (let i of anu) {
let metadata = await ZimBotInc.groupMetadata(i)
teks += `🔏𝗡𝗔𝗠𝗘 : ${metadata.subject}\n🔏𝗢𝗪𝗡𝗘𝗥 : @${metadata.owner.split('@')[0]}\n🔏𝗜𝗗 : ${metadata.id}\n🔏 𝗠𝗔𝗗𝗘 : ${moment(metadata.creation * 1000).tz('Africa/Harare').format('DD/MM/YYYY HH:mm:ss')}\n🔏 𝗠𝗘𝗠𝗕𝗘𝗥 : ${metadata.participants.length}\n\n────────────────────────\n\n`
}
ZimBotInc.sendTextWithMentions(m.chat, teks, m)
}
break
case 'listonline': case 'onlinelist': case 'liston': {
let id = args && /\d+\-\d+@g.us/.test(args[0]) ? args[0] : m.chat
let online = [...Object.keys(store.presences[id]), botNumber]
ZimBotInc.sendText(m.chat, '*LIST ONLINE*:\n\n' + online.map(v => '> @' + v.replace(/@.+/, '')).join`\n`, m, { mentions: online })
}
break
case 'sticker': case 's': case 'stickergif': case 'sgif': {
if (!quoted) throw `Reply Video/Image With Caption ${prefix + command}`
replay(mess.wait)
if (/image/.test(mime)) {
let media = await quoted.download()
let encmedia = await ZimBotInc.sendImageAsSticker(m.chat, media, m, { packname: global.packname, author: global.author })
await fs.unlinkSync(encmedia)
} else if (/video/.test(mime)) {
if ((quoted.msg || quoted).seconds > 11) return reply('Maximum 10 seconds!')
let media = await quoted.download()
let encmedia = await ZimBotInc.sendVideoAsSticker(m.chat, media, m, { packname: global.packname, author: global.author })
await fs.unlinkSync(encmedia)
} else {
throw `Send Image/Video With Caption ${prefix + command}\nVideo Duration 1-9 Seconds`
}
}
break
case 'stickerslap':
const { sticker } = require('./plugins/sticker.js')
if(m.quoted?.sender) m.mentionedJid.push(m.quoted.sender)
if(!m.mentionedJid.length) m.mentionedJid.push(m.sender)
let res = await fetch('https://nekos.life/api/kiss')
let jsonk = await res.json()
let { uri } = jsonk
let stiker = await sticker(null, uri, `+${m.sender.split('@')[0]} le dio una bofetada a ${m.mentionedJid.map((user)=>(user === m.sender)? 'alguien ': `+${user.split('@')[0]}`).join(', ')}`)
ZimBotInc.sendVideoAsSticker(m.chat, stiker, m, { packname: global.packname, author: global.author })
break
case 'ebinary': {
if (!m.quoted.text && !text) throw `Send/reply text with caption ${prefix + command}`
let { eBinary } = require('./lib/binary')
let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text
let eb = await eBinary(teks)
reply(eb)
}
break
case 'dbinary': {
if (!m.quoted.text && !text) throw `Send/reply text with caption ${prefix + command}`
let { dBinary } = require('./lib/binary')
let teks = text ? text : m.quoted && m.quoted.text ? m.quoted.text : m.text
let db = await dBinary(teks)
reply(db)
}
break
case 'emojimix': {
if (!text) throw `Example : ${prefix + command} 😅+🤔`
let [emoji1, emoji2] = text.split`+`
let anu = await fetchJson(`https://tenor.googleapis.com/v2/featured?key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&contentfilter=high&media_filter=png_transparent&component=proactive&collection=emoji_kitchen_v5&q=${encodeURIComponent(emoji1)}_${encodeURIComponent(emoji2)}`)
for (let res of anu.results) {
let encmedia = await ZimBotInc.sendImageAsSticker(m.chat, res.url, m, { packname: global.packname, author: global.author, categories: res.tags })
await fs.unlinkSync(encmedia)
}
}
break
case 'toimage': case 'toimg': {
if (!quoted) throw '*Reply Image*'
if (!/webp/.test(mime)) throw `balas stiker dengan caption *${prefix + command}*`
replay(mess.wait)
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let ran = await getRandom('.png')
exec(`ffmpeg -i ${media} ${ran}`, (err) => {
fs.unlinkSync(media)
if (err) throw err
let buffer = fs.readFileSync(ran)
ZimBotInc.sendMessage(m.chat, { image: buffer }, { quoted: m })
fs.unlinkSync(ran)
})
}
break
case 'tomp4': case 'tovideo': {
if (!quoted) throw 'Reply Image'
if (!/webp/.test(mime)) throw `balas stiker dengan caption *${prefix + command}*`
replay(mess.wait)
let { webp2mp4File } = require('./lib/uploader')
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let webpToMp4 = await webp2mp4File(media)
await ZimBotInc.sendMessage(m.chat, { video: { url: webpToMp4.result, caption: '*Convert webp to video*' } }, { quoted: m })
await fs.unlinkSync(media)
}
break
case 'tts':
const gtts = require('./Zimbot/gtts')(args[0])
if (args.length < 1) return ZimBotInc.sendMessage(from, `ᴇxᴀᴍᴘʟᴇ: ${prefix}ᴇɴ ʜᴇʟʟᴏ`, text, {quoted: m})
if (args.length < 2) return ZimBotInc.sendMessage(from, `ᴇxᴀᴍᴘʟᴇ: ${prefix}ᴇɴ ʜᴇʟʟᴏ`, text, {quoted: m})
var dtt = body.slice(20)
reply(mess.wait)
var ranm = getRandom('.mp3')
var rano = getRandom('.ogg')
dtt.length > 300
gtts.save(ranm, dtt, function() {
exec(`ffmpeg -i ${ranm} -ar 48000 -vn -c:a libopus ${rano}`, (err) => {
fs.unlinkSync(ranm)
buffer = fs.readFileSync(rano)
if (err) return reply('error')
Ruri.sendMessage(from, audio, {quoted: freply, ptt:true})
ZimBotInc.sendMessage(m.chat, { audio: buffer, mimetype: 'audio/mp4', ptt: true, quoted: mudratunha})
fs.unlinkSync(rano)
})
})
break
case 'toaud': case 'toaudio': {
if (!/video/.test(mime) && !/audio/.test(mime)) throw `Send/Reply Video/Audio You Want Audio With Caption ${prefix + command}`
if (!quoted) throw `Send/Reply Video/Audio You Want to Use as Audio With Caption ${prefix + command}`
replay(mess.wait)
let media = await quoted.download()
let { toAudio } = require('./lib/converter')
let audio = await toAudio(media, 'mp4')
ZimBotInc.sendMessage(m.chat, {audio: audio, mimetype: 'audio/mpeg'}, { quoted : m })
}
break
case 'tomp3': {
if (/document/.test(mime)) throw `Send/Reply Video/Audio You Want to Convert into MP3 With Caption ${prefix + command}`
if (!/video/.test(mime) && !/audio/.test(mime)) throw `Send/Reply Video/Audio You Want To Convert Into MP3 With Caption ${prefix + command}`
if (!quoted) throw `Send/Reply Video/Audio You Want To Convert Into MP3 With Caption ${prefix + command}`
replay(mess.wait)
let media = await quoted.download()
let { toAudio } = require('./lib/converter')
let audio = await toAudio(media, 'mp4')
ZimBotInc.sendMessage(m.chat, {document: audio, mimetype: 'audio/mpeg', fileName: `Converted By ${ZimBotInc.user.name}.mp3`}, { quoted : m })
}
break
case 'tovn': case 'toptt': {
if (!/video/.test(mime) && !/audio/.test(mime)) throw `Reply Video/Audio That You Want To Be VN With Caption ${prefix + command}`
if (!quoted) throw `Reply Video/Audio That You Want To Be VN With Caption ${prefix + command}`
replay(mess.wait)
let media = await quoted.download()
let { toPTT } = require('./lib/converter')
let audio = await toPTT(media, 'mp4')
ZimBotInc.sendMessage(m.chat, {audio: audio, mimetype:'audio/mpeg', ptt:true }, {quoted:m})
}
break
case 'togif': {
if (!quoted) throw 'Reply Image'
if (!/webp/.test(mime)) throw `balas stiker dengan caption *${prefix + command}*`
replay(mess.wait)
let { webp2mp4File } = require('./lib/uploader')
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let webpToMp4 = await webp2mp4File(media)
await ZimBotInc.sendMessage(m.chat, { video: { url: webpToMp4.result, caption: 'Convert Webp To Video' }, gifPlayback: true }, { quoted: m })
await fs.unlinkSync(media)
}
break
case 'tourl': {
replay(mess.wait)
let { UploadFileUgu, webp2mp4File, TelegraPh } = require('./lib/uploader')
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
if (/image/.test(mime)) {
let anu = await TelegraPh(media)
reply(util.format(anu))
} else if (!/image/.test(mime)) {
let anu = await UploadFileUgu(media)
reply(util.format(anu))
}
await fs.unlinkSync(media)
}
break
case 'imagenobg': case 'removebg': case 'remove-bg': {
if (!quoted) throw `Send/Reply Image With Caption ${prefix + command}`
if (!/image/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
if (/webp/.test(mime)) throw `Send/Reply Image With Caption ${prefix + command}`
let remobg = require('remove.bg')
let apirnobg = ['q61faXzzR5zNU6cvcrwtUkRU','S258diZhcuFJooAtHTaPEn4T','5LjfCVAp4vVNYiTjq9mXJWHF','aT7ibfUsGSwFyjaPZ9eoJc61','BY63t7Vx2tS68YZFY6AJ4HHF','5Gdq1sSWSeyZzPMHqz7ENfi8','86h6d6u4AXrst4BVMD9dzdGZ','xp8pSDavAgfE5XScqXo9UKHF','dWbCoCb3TacCP93imNEcPxcL']
let apinobg = apirnobg[Math.floor(Math.random() * apirnobg.length)]
hmm = await './src/remobg-'+getRandom('')
localFile = await ZimBotInc.downloadAndSaveMediaMessage(quoted, hmm)
outputFile = await './src/hremo-'+getRandom('.png')
replay(mess.wait)
remobg.removeBackgroundFromImageFile({
path: localFile,
apiKey: apinobg,
size: "regular",
type: "auto",
scale: "100%",
outputFile
}).then(async result => {
ZimBotInc.sendMessage(m.chat, {image: fs.readFileSync(outputFile), caption: mess.success}, { quoted : m })
await fs.unlinkSync(localFile)
await fs.unlinkSync(outputFile)
})
}
break
case 'yts1': case 'ytsearch': {
if (!text) throw `Example : ${prefix + command} story wa anime`
let yts = require("yt-search")
let search = await yts(text)
let teks = 'SUBSCRIBE Search\n\n Result From '+text+'\n\n'
let no = 1
for (let i of search.all) {
teks += `🔏No: ${no++}\n🧸𝗧𝗬𝗣𝗘 : ${i.type}\n🔳𝗩𝗜𝗗𝗘𝗢 𝗜𝗗: ${i.videoId}\n🔴𝗧𝗜𝗧𝗟𝗘 : ${i.title}\n🔏𝗩𝗜𝗘𝗪𝗦 : ${i.views}\n🎬𝗗𝗨𝗥𝗔𝗧𝗜𝗢𝗡 : ${i.timestamp}\n📡𝗨𝗣𝗟𝗢𝗔𝗗 𝗔𝗧 : ${i.ago}\n🎰𝗔𝗨𝗧𝗛𝗢𝗥 : ${i.author.name}\n📌𝗨𝗥𝗟 : ${i.url}\n\n─────────────────\n\n`
}
ZimBotInc.sendMessage(m.chat, { image: { url: search.all[0].thumbnail }, caption: teks }, { quoted: m })
}
break
case 'google': {
reply(mess.wait)
const { googleIt } = require('@bochilteam/scraper')
let full = /f$/i.test(command)
let text = args.join` `
if (!text) return reply(m.chat, 'No text to search', m)
let url = 'https://google.com/search?q=' + encodeURIComponent(text)
let search = await googleIt(text)
let msg = search.articles.map(({
// header,
title,
url,
description
}) => {
return `*${title}*\n_${url}_\n_${description}_`
}).join('\n\n')
try {
let ss = await (await fetch(('nrtm', '/api/ssweb', { delay: 1000, url, full }))).arrayBuffer()
if (//i.test(ss.toBuffer().toString())) throw ''
await ZimBotInc.sendFile(m.chat, ss, 'screenshot.png', url + '\n\n' + msg, m)
} catch (e) {
reply(msg)
}
}
break
case 'gimage': case 'googleimage': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} ml nana`
let gis = require('g-i-s')
gis(text, async (error, result) => {
n = result
images = n[Math.floor(Math.random() * n.length)].url
let buttons = [
{buttonId: `gimage ${text}`, buttonText: {displayText: 'Next Image'}, type: 1}
]
let buttonMessage = {
image: { url: images },
caption: `❰ 𝗚𝗢𝗢𝗚𝗟𝗘 𝗜𝗠𝗔𝗚𝗘 ❱
*𝗤𝗨𝗘𝗥𝗬* : ${text}
*𝗠𝗘𝗗𝗜𝗔 𝗨𝗥𝗟* : ${images}`,
footer: ZimBotInc.user.name,
buttons: buttons,
headerType: 4
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
})
}
break
case 'lyrics':
reply(mess.wait)
if (args.length < 1) return reply('What is the name of the song?')
teks = body.slice(7)
lirikLagu(teks).then((res) => {
let lirik = `${res[0].result}`
reply(lirik)
})
break
case 'apk':
reply(mess.wait)
if (args.length == 0) return reply(`Example: ${prefix + command} WhatsApp`)
let jsonl = await Api.apk(text)
if (!jsonl.status) return reply('failed')
let rows = []
jsonl.data.map(async (v, i) => {
rows.push({
title: v.name,
rowId: `${prefix}getapk ${text}—${v.no}`,
description: `[ ${v.size} | ${v.version} ]`
})
})
ZimBotInc.sendList(m.chat, '', `Hey zim-bot user here are your results: showing search results for : “${text}”, select below the application you want to download. 🍻`, '', 'OPTIONS', [{
rows
}], m)
break
case 'ytshorts': case 'shorts': {
if (!text) return m.reply(`*Use ${prefix + command} enter pin link*`)
if (!isUrl(args[0]) && !args[0].includes('youtube')) throw '*The link you provided is not valid*'
xa.Youtube(`${text}`).then(async (data) => {
if (data.medias[0].formattedSize.split('MB')[0] >= 100) return reply('*File Over Limit* '+util.format(data))
cap = `
*▊▊▊YOUTUBE SHORTS▊▊▊*
*⬤▶━━━━━━━━━2:30*\n\n\n\n*⬤TITLE:* ${data.title}\n*⬤QUALITY:* ${data.medias[0].quality}\n*⬤SIZE:* ${data.medias[0].formattedSize}\n*⬤DURATION* ${data.duration}\n*⬤ID:* ${data.medias[0].cached}\n*⬤LINK:* ${data.url}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${cap}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { video: { url: data.medias[0].url }, jpegThumbnail:buf, caption: `*⬤TITLE:* ${data.title}\n*⬤QUALITY:* ${data.medias[0].quality}\n*⬤SIZE:* ${data.medias[0].formattedSize}` }, { quoted: m })
}).catch((err) => {
reply(`*Failed to download and send media*`)
})
}
break
case 'pinterest': case 'pndl': case 'pin': {
replay(mess.wait)
if (!args.join(" ")) return reply("What picture are you looking for?")
try {
hx.pinterest(args.join(" ")).then(async(res) => {
dripdako = res[Math.floor(Math.random() * res.length)]
let buttons = [
{buttonId: `pinterest ${args.join(" ")}`, buttonText: {displayText: 'NEXT'}, type: 1}
]
let buttonMessage = {
image: { url: dripdako },
caption: `
*TITLE:*` + args.join(" ")
`*PHOTO URL:* `+dripdako,
footer: `${global.botname}`,
buttons: buttons,
headerType: 4,
contextInfo:{externalAdReply:{
title:`ᴢɪᴍ ʙᴏᴛ ᴠ5`,
body:`DRIPS OFC`,
showAdAttribution: true,
thumbnail: global.thumb,
mediaType:2,
mediaUrl: `https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo`
}}
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}).catch(_ => _)
} catch {
reply("Error")
}
}
break
case 'couplepp': case 'ppcouple': {
replay(mess.wait)
let anu = await fetchJson('https://raw.githubusercontent.com/iamriz7/kopel_/main/kopel.json')
let random = anu[Math.floor(Math.random() * anu.length)]
ZimBotInc.sendMessage(m.chat, { image: { url: random.male }, caption: `Couple Male` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { image: { url: random.female }, caption: `*Couple Female*` }, { quoted: m })
}
break
//------ANIME FESTURES------\\
case 'cry':
case 'kill':
case 'hug':
case 'pat':
case 'lick':
case 'kiss':
case 'bite':
case 'yeet':
case 'neko':
case 'bully':
case 'bonk':
case 'wink':
case 'poke':
case 'nom':
case 'slap':
case 'smile':
case 'wave':
case 'awoo':
case 'blush':
case 'smug':
case 'glomp':
case 'happy':
case 'dance':
case 'cringe':
case 'cuddle':
case 'highfive':
case 'shinobu':
case 'megumin':
case 'handhold':
reply(mess.wait)
axios.get(`https://api.waifu.pics/sfw/${command}`)
.then(({data}) => {
ZimBotInc.sendImageAsSticker(m.chat, data.url, m, { packname: global.packname, author: global.author })
})
break
case 'animeslap':
reply(mess.wait)
stantontunha = await axios.get(`https://nekos.life/api/v2/img/slap`)
var garo = [
{buttonId: `.${command}`, buttonText: {displayText: `NEXT`}, type: 1},
]
let tunhamasawi = {
image: {url:stantontunha.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: garo,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, tunhamasawi,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animepat':
reply(mess.wait)
lioneltunha = await axios.get(`https://nekos.life/api/v2/img/pat`)
var tunhabee = [
{buttonId: `.${command}`, buttonText: {displayText: `NEXT`}, type: 1},
]
let masawitunha = {
image: {url:lioneltunha.data.url},
caption: `DATA OBTAINED!`,
footer: `${global.botname}`,
buttons: tunhabee,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, masawitunha,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animeneko':
reply(mess.wait)
princetunha = await axios.get(`https://nekos.life/api/v2/img/neko`)
var tunhaprince = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let tanaka = {
image: {url:princetunha.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: tunhaprince,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, tanaka,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animehug':
reply(mess.wait)
tunha = await axios.get(`https://nekos.life/api/v2/img/hug`)
var madeline = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let magwetta = {
image: {url:tunha.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: madeline,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, magwetta,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animekiss':
reply(mess.wait)
tunha = await axios.get(`https://nekos.life/api/v2/img/kiss`)
var blessedtuna2 = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let sekedema = {
image: {url:tunha.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: blessedtuna2,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, sekedema,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animewlp':
reply(mess.wait)
mhofu = await axios.get(`https://nekos.life/api/v2/img/wallpaper`)
var wati = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let sekeMutema = {
image: {url:mhofu.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: wati,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, sekeMutema,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'animespank':
reply(mess.wait)
mhofu = await axios.get(`https://nekos.life/api/v2/img/spank`)
var wati = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let edzai = {
image: {url:mhofu.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: wati,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, edzai,{ quoted:m }).catch(err => {
return('Error!')
})
break
case 'shinobu2':
reply(mess.wait)
dhoti = await axios.get('https://waifu.pics/api/sfw/shinobu')
var wati = [
{buttonId: `.shinobu`, buttonText: {displayText: `Next `}, type: 1},
]
let haha = {
image: {url:dhoti.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: wati,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat,haha, { quoted:m }).catch(err => {
return('Error!')
})
break
case 'megumin2':
reply(mess.wait)
saka = await axios.get('https://waifu.pics/api/sfw/megumin')
var wati = [
{buttonId: `.megumin`, buttonText: {displayText: `Next `}, type: 1},
]
let kuku = {
image: {url:saka.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: wati,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat,kuku, { quoted:m }).catch(err => {
return('Error!')
})
break
case 'update':
const heroku = new Heroku({ token: Config.HEROKU_API_KEY })
await git.fetch();
var commits = await git.log(['main' + '..origin/' + 'main']);
if (commits.total === 0) {
reply("*No pending updates!*")
} else {
var changelog = "_Pending updates:_\n\n";
commits['all'].map(
(commit) => {
reply(`• *${commit.message}* _[${commit.date.substring(0, 10)}]_ \n`)
}
);
mss = changelog;
var img = ""
var buttons = [{
urlButton: {
displayText: 'DRIPS',
url: 'tes'
}
},// By drips
{
quickReplyButton: {
displayText: 'lol',
id: `${prefix}upd`
}
}];
}
await ZimBotInc.sendMessage(m.chat, {text: ` *type updatenow to update the bot*`});
break
case 'updatenow':
await git.fetch();
var commits = await git.log(['main' + '..origin/' + 'main']);
if (commits.total === 0) {
return await ZimBotInc.sendMessage(m.chat, { text:"_Bot up to date_"})
} else {
await ZimBotInc.sendMessage(m.chat, {text: "_Build started ⏫_"})
try {
var app = await heroku.get('/apps/' + Config.HEROKU_APP_NAME)
var git_url = await heroku.get(app.git_url)
} catch {
await ZimBotInc.sendMessage(m.chat, { text:"*Heroku app name/api key wrong*"})
await new Promise(r => setTimeout(r, 1000));
}
git.fetch('upstream', 'main');
git.reset('hard', ['FETCH_HEAD']);//lols
git_url = git_url.replace("https://", "https://api:" + Config.HEROKU_API_KEY + "@")//drips
try {
await git.addRemote('heroku', git_url);
} catch {console.log('Deploy error catched. Retrying...')}
try { await git.push('heroku', 'main'); } catch(e){
if (e.message.includes("concurrent")) return reply("Your account has reached in-parallel build limit! Please wait for the other app to finish its deploy ❗");
}
await ZimBotInc.sendMessage(m.chat, {text:"_Finished build! Restarting.._"})
//
}
break
case 'awoo2':
reply(mess.wait)
bhingo = await axios.get(`https://waifu.pics/api/sfw/awoo`)
var pulo = [
{buttonId: `.${command}`, buttonText: {displayText: `Next `}, type: 1},
]
let tidza = {
image: {url:bhingo.data.url},
caption: `Here you go!`,
footer: `${global.botname}`,
buttons: pulo,
headerType: 2
}
await ZimBotInc.sendMessage(m.chat, tidza, { quoted:m }).catch(err => {
return('Error!')
})
break
case 'animewall2': case 'animewallpaper2':
reply(mess.wait)
const { AnimeWallpaper } =require("anime-wallpaper")
if(!q) return reply('What wallpaper do you want?')
const wall = new AnimeWallpaper();
const pages = [1,2,3,4];
const random=pages[Math.floor(Math.random() * pages.length)]
const wallpaper = await wall
.getAnimeWall4({ title: q, type: "sfw", page: pages })
.catch(() => null);
const i = Math.floor(Math.random() * wallpaper.length);
var francisca = [
{buttonId: `.${command} ${q}`, buttonText: {displayText: `Next `}, type: 1},
]
let tunhastallone = {
image: {url:wallpaper[i].image},
caption: `*QUERY :* ${q}`,
footer: `${global.botname}`,
buttons: francisca,
headerType: 4
}
await ZimBotInc.sendMessage(m.chat, tunhastallone, {quoted: m})
//-----END HERE-----\\
//----DOWNLOAD FEATURES---\\
break
case 'play': {
let { yta } = require('./lib/y2mate')
if (!text) reply(`Example : ${prefix + command} story wa anime`)
let yts = require("yt-search")
let search = await yts(text)
let anu = search.videos[Math.floor(Math.random() * search.videos.length)]
let buf = await getBuffer(anu.thumbnail)
let muziq = [
{buttonId: `audio ${anu.url}`, buttonText: {displayText: 'AUDIO'}, type: 1},
{buttonId: `ytmp4 ${anu.url}`, buttonText: {displayText: 'VIDEO'}, type: 1},
{buttonId: `ytmp3 ${anu.url}`, buttonText: {displayText: 'DOCUMENT'}, type: 1}
]
let caption = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉ʏᴏᴜᴛᴜʙᴇ ᴍᴜꜱɪᴄ◉*_ ⟯
0.02━◉━━━━━━━━━━━━3.26
🔂 ⏪ ⏸️ ⏩ 🎵
*◉Tɪᴛʟᴇ :* ${anu.title}
*◉Sɪᴢᴇ :* ${anu.filesize}
*◉Uʀʟ :* ${anu.url}
*◉Dᴇꜱᴄʀɪᴘᴛɪᴏɴ :* ${anu.description}
©ᴢɪᴍʙᴏᴛɪɴᴄ
`
message = await prepareWAMessageMedia({ image : { url: anu.thumbnail } }, { upload: ZimBotInc.waUploadToServer })
let buttonMessage = {
image: buf,
jpegThumbnail:buf,
caption: caption,
footer: ` ⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
buttons: muziq,
headerType: 4,
contextInfo: { externalAdReply:{
title:"ZIM BOT♡",
body:"SUB DRIPS OFC",
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`),
}}
}
ZimBotInc.sendMessage(m.chat, buttonMessage)
}
break
/*
case 'yt3': case 'ytmusc':
if (!text) throw `Example : ${prefix + command} https://youtube.com/watch?v=PtFMh6Tccag%27 128kbps`
const dripsmp3 = require ('./lib/ytdl2')
let yts = require("youtube-yts")
let search = await yts(text)
let bhingu = search.videos[0]
const kudzi = await dripsmp3.mp3(bhingu.url)
let caption = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉*_ ⟯
0.02━◉━━━━━━━━━━━━3.26
🔂 ⏪ ⏸️ ⏩ 🎵\n\n*◉TITLE :* ${bhingu.title}\n*◉FILESIZE :*\n*◉URL :* ${isUrl(text)}\n*◉EXT :* MP3\n*\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(kudzi.meta.image)
await ZimBotInc.sendMessage(m.chat, {text: `*ɪᴍ sᴇɴᴅɪɴɢ ʏᴏᴜʀ sᴏɴɢ📻ᴘʟᴇᴀsᴇ ᴡᴀɪᴛ...* `}, {quoted: m})
ZimBotInc.sendMessage(m.chat, { document: fs.readFileSync(kudzi.path),
fileName: bhingu.title + '.mp3',
mimetype: 'audio/mp4', quoted: m, contextInfo: { externalAdReply:{
title:"◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://wa.me/447441437150`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }
},
}, {quoted: m})
await fs.unlinkSync(kudzi.path)
*/
break
case 'ytmp3':
if (!args || !args[0]) throw 'need a link'
if (!/^(?:https?:\/\/)?(?:www\.|m\.|music\.)?youtu\.?be(?:\.com)?\/?.*(?:watch|embed)?(?:.*v=|v\/|\/)([\w\-_]+)\&?/.test(args[0])) throw `Invalid link`
ZimBotInc.sendMessage(m.chat, { react: { text: `🕒`, key: m.key }})
const jsoni = await fetchJson('https://yt.nxr.my.id/yt2?url=' + args[0] + '&type=audio')
await ZimBotInc.sendMessage(m.chat, {text: `*ɪᴍ sᴇɴᴅɪɴɢ ʏᴏᴜʀ sᴏɴɢ📻ᴘʟᴇᴀsᴇ ᴡᴀɪᴛ...* `}, {quoted: m})
if (!jsoni.status || !jsoni.data.url) throw `failed to download your music`
let captiono = `*Y T - P L A Y*\n\n`
captiono += ` ◦ *Title* : ${jsoni.title}\n`
captiono += ` ◦ *Size* : ${jsoni.data.size}\n`
captiono += ` ◦ *Duration* : ${jsoni.duration}\n`
captiono += ` ◦ *Bitrate* : ${jsoni.data.quality}\n\n`
captiono += 'ZIMBOT'
zimbotu = `${jsoni.data.url}`
ZimBotInc.sendMessage(m.chat,{document: {url:jsoni.data.url}, fileName: `${jsoni.title}`, mimetype: 'audio/mp3', quoted: m, contextInfo: { externalAdReply:{
title:"◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://wa.me/447441437150`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }
}}, {quoted: m})
break
case 'ytmp4': case 'ytvideo':
const dripsvideo = require('./lib/ytdl2')
if (args.length < 1 || !isUrl(text) || !dripsvideo.isYTUrl(text)) throw `Where is the link?🤪`
ZimBotInc.sendMessage(m.chat, { react: { text: `🕒`, key: m.key }})
const v5=await dripsvideo.mp4(text)
/*var capti = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉*_ ⟯
0.02━◉━━━━━━━━━━━━3.26
🔂 ⏪ ⏸️ ⏩ 🎵\n\n*◉Title* : ${media.title}\n*◉FILESIZE* : ${media.filesizeF}\n*◉URL* : ${isUrl(text)}\n*◉EXT* : MP3\n*◉RESOLUTION* : ${args[1] || '360p'}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
*/
var buf = await getBuffer(v5.thumb)
let hobho = ('*ᴅᴏᴡɴʟᴏᴀᴅɪɴɢ ʏᴏᴜʀ ᴠɪᴅᴇᴏ🎬ᴡᴀɪᴛ...*')
await ZimBotInc.sendMessage(m.chat, {text: `*ᴅᴏᴡɴʟᴏᴀᴅɪɴɢ ʏᴏᴜʀ ᴠɪᴅᴇᴏ🎬ᴡᴀɪᴛ...* `}, {quoted: m})
ZimBotInc.sendMessage(m.chat, { video: { url:v5.videoUrl }, mimetype: 'video/mp4', fileName: `${v5.title}.mp4`, caption: `*ᴛɪᴛʟᴇ:* ${v5.title} \n\n *ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot*` , quoted: m,contextInfo: { externalAdReply:{
showAdAttribution: true,
},
}},{ quoted: m})
break
case 'audio':
if (!text) throw `Example : ${prefix + command} https://youtube.com/watch?v=PtFMh6Tccag%27 128kbps`
const dripsmp4 = require ('./lib/ytdl2')
let ytss = require("youtube-yts")
let searchi = await ytss(text)
let bhinguu = searchi.videos[0]
const kudzii = await dripsmp4.mp3(bhinguu.url)
let captionu = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉*_ ⟯
0.02━◉━━━━━━━━━━━━3.26
🔂 ⏪ ⏸️ ⏩ 🎵\n\n*◉TITLE :* ${bhinguu.title}\n*◉FILESIZE :*\n*◉URL :* ${isUrl(text)}\n*◉EXT :* MP3\n*\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(kudzii.meta.image)
await ZimBotInc.sendMessage(m.chat, {text: `*ɪᴍ sᴇɴᴅɪɴɢ ʏᴏᴜʀ sᴏɴɢ📻ᴘʟᴇᴀsᴇ ᴡᴀɪᴛ...* `}, {quoted: m})
ZimBotInc.sendMessage(m.chat, { audio: fs.readFileSync(kudzii.path), fileName: bhinguu.title + '.mp3', mimetype: 'audio/mp4', quoted: m, contextInfo: { externalAdReply:{
title:"◉ʏᴏᴜᴛᴜʙᴇ ᴅᴏᴡɴʟᴏᴀᴅ◉",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://wa.me/447441437150`,
sourceUrl: `https://wa.me/447441437150` }
},
}, {quoted: m})
await fs.unlinkSync(kudzii.path)
break
case 'ytshorts': case 'shorts': {
if (!text) return reply(`*Use ${prefix + command} enter pin link*`)
if (!isUrl(args[0]) && !args[0].includes('youtube')) throw '*The link you provided is not valid*'
xa.Youtube(`${text}`).then(async (data) => {
if (data.medias[0].formattedSize.split('MB')[0] >= 100) return m.reply('*File Over Limit* '+util.format(data))
cap = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉Yᴏᴜᴛᴜʙᴇ Sʜᴏʀᴛꜱ◉*_ ⟯
0.02━◉━━━━━━━━━━━━3.26
🔂 ⏪ ⏸️ ⏩ 🎵\n\n\n\n*◉TITLE:* ${data.title}\n*◉QUALITY:* ${data.medias[0].quality}\n*◉SIZE:* ${data.medias[0].formattedSize}\n*◉DURATION* ${data.duration}\n*◉ID:* ${data.medias[0].cached}\n*◉LINK:* ${data.url}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${cap}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { video: { url: data.medias[0].url }, jpegThumbnail:buf, caption: `*◉TITLE:* ${data.title}\n*◉QUALITY:* ${data.medias[0].quality}\n*◉SIZE:* ${data.medias[0].formattedSize}` }, { quoted: m })
}).catch((err) => {
reply(`*Failed to download and send media*`)
})
}
break
case 'getmusic': {
let { yta } = require('./lib/y2mate')
if (!text) throw `Example : ${prefix + command} 1`
if (!m.quoted) return m.reply('*Reply message*')
if (!m.quoted.isBaileys) throw `*Can only reply to messages from bots*`
let urls = quoted.text.match(new RegExp(/(?:https?:\/\/)?(?:youtu\.be\/|(?:www\.|m\.)?youtube\.com\/(?:watch|v|embed|shorts)(?:\.php)?(?:\?.*v=|\/))([a-zA-Z0-9\_-]+)/, 'gi'))
if (!urls) throw `*Maybe the message you replied does not contain the ytsearch results`
let quality = args[1] ? args[1] : '128kbps'
let media = await yta(urls[text - 1], quality)
if (media.filesize >= 100000) return m.reply('*File Over Limit* '+util.format(media))
ZimBotInc.sendImage(m.chat, media.thumb, `*◉TITLE* : ${media.title}\n*◉FILE SIZE :* ${media.filesizeF}\n*◉URL :* ${urls[text - 1]}\n*◉EXT :* MP3\n*◉RESOLUTION :* ${args[1] || '128kbps'}`, m)
ZimBotInc.sendMessage(m.chat, { audio: { url: media.dl_link }, mimetype: 'audio/mpeg', fileName: `${media.title}.mp3` }, { quoted: m })
}
break
case 'getvideo': {
let { ytv } = require('./lib/y2mate')
if (!text) throw `Example : ${prefix + command} 1`
if (!m.quoted) return m.reply('Reply Message')
if (!m.quoted.isBaileys) throw `*Can only reply to messages from bots8`
let urls = quoted.text.match(new RegExp(/(?:https?:\/\/)?(?:youtu\.be\/|(?:www\.|m\.)?youtube\.com\/(?:watch|v|embed|shorts)(?:\.php)?(?:\?.*v=|\/))([a-zA-Z0-9\_-]+)/, 'gi'))
if (!urls) throw `*Maybe the message you replied does not contain the ytsearch result*`
let quality = args[1] ? args[1] : '360p'
let media = await ytv(urls[text - 1], quality)
if (media.filesize >= 100000) return m.reply('*File Over Limit* '+util.format(media))
ZimBotInc.sendMessage(m.chat, { video: { url: media.dl_link }, mimetype: 'video/mp4', fileName: `${media.title}.mp4`, caption: `*◉TITLE :* ${media.title}\n*◉FILESIZE :* ${media.filesizeF}\n*◉URL :* ${urls[text - 1]}\n*◉EXT:* MP3\n*◉RESOLUTION :* ${args[1] || '360p'}` }, { quoted: m })
}
case 'mediafire': {
reply(mess.wait)
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('mediafire.com')) throw '*The link you provided is not valid*'
const baby1 = await mediafireDl(text)
if (baby1[0].size.split('MB')[0] >= 100) return m.reply('*File Over Limit* '+util.format(baby1))
const result4 = `
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉Mᴇᴅɪᴀꜰɪʀᴇ Dᴏᴡɴʟᴏᴀᴅ◉*_ ⟯
*NAME* : ${baby1[0].nama}
*SIZE* : ${baby1[0].size}
*MIME* : ${baby1[0].mime}
*LINK* : ${baby1[0].link}\n
_scraping metadata...._
*${botname}*`
reply(`${result4}`)
ZimBotInc.sendMessage(m.chat, { document : { url : baby1[0].link}, fileName : baby1[0].nama, mimetype: baby1[0].mime , quoted : mudratunha, contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
break
case 'song': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} story wa anime`
let yts = require("yt-search")
let search = await yts(text)
let sections = []
let listmenu = [`ytmp4 ${search.all[0].url}`,`ytmp3 ${search.all[1].url}`,`ytmp4 ${search.all[2].url}`,`ytmp3 ${search.all[3].url}`,`ytmp4 ${search.all[4].url}`,`ytmp3 ${search.all[5].url}`,`ytmp4 ${search.all[6].url}`,`ytmp3 ${search.all[7].url}`,`ytmp4 ${search.all[8].url}`,`ytmp3 ${search.all[9].url}`,`ytmp4 ${search.all[10].url}`,`ytmp3 ${search.all[11].url}`,`ytmp4 ${search.all[12].url}`,`ytmp3 ${search.all[13].url}`,`ytmp4 ${search.all[14].url}`,`ytmp3 ${search.all[15].url}`,`ytmp4 ${search.all[16].url}`,`ytmp3 ${search.all[17].url}`,`ytmp4 ${search.all[18].url}`,`ytmp3 ${search.all[19].url}`]
let listmenuu = [`VIDEO MP4⬤: ${search.all[0].title}`,`SONG MP3⬤: ${search.all[1].title}`,`VIDEO MP4⬤: ${search.all[2].title}`,`SONG MP3⬤: ${search.all[3].title}`,`VIDEO MP4⬤: ${search.all[4].title}`,`SONG MP3⬤: ${search.all[5].title}`,`VIDEO MP4⬤: ${search.all[6].title}`,`SONG MP3⬤: ${search.all[7].title}`,`VIDEO MP4⬤: ${search.all[8].title}`,`SONG MP3⬤: ${search.all[9].title}`,`VIDEO MP4⬤: ${search.all[10].title}`,`SONG MP3⬤: ${search.all[11].title}`,`VIDEO MP4⬤: ${search.all[12].title}`,`SONG MP3⬤: ${search.all[13].title}`,`VIDEO MP4⬤: ${search.all[14].title}`,`SONG MP3⬤: ${search.all[15].title}`,`VIDEO MP4⬤: ${search.all[16].title}`,`SONG MP3⬤: ${search.all[17].title}`,`VIDEO MP4⬤: ${search.all[18].title}`,`SONG MP3⬤: ${search.all[19].title}`]
let listmenuuu = [`\n${search.all[0].description}`,`\n${search.all[1].description}`,`\n${search.all[2].description}`,`\n${search.all[3].description}`,`\n${search.all[4].description}`,`\n${search.all[5].description}`,`\n${search.all[6].description}`,`\n${search.all[7].description}`,`\n${search.all[8].description}`,`\n${search.all[9].description}`,`\n${search.all[10].description}`,`\n${search.all[11].description}`,`\n${search.all[12].description}`,`\n${search.all[13].description}`,`\n${search.all[14].description}`,`\n${search.all[15].description}`,`\n${search.all[16].description}`,`\n${search.all[17].description}`,`\n${search.all[18].description}`,`\n${search.all[19].description}`]
let nombor = 1
let startnum = 0
let startnumm = 0
for (let x of listmenu) {
const list = {title: 'RESULT NUMBER ' + nombor++,
rows: [
{
title: `${listmenuu[startnum++]}`,
description: `${listmenuuu[startnumm++]}`,
rowId: `${prefix}${x}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: "\n\n*_DONE SCRAPING DATA_*",
footer: botname,
title: `HERE IS YOUR RESULTS CHOMIE FROM *${text}* _select song or video below_`,
buttonText: "CLICK HERE",
sections
}, { quoted : m })
}
break
case 'ytsaudio': case 'ytsmusic': case 'ytsearchmusic': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} guspy warior ita seunononga`
let yts = require("yt-search")
let search = await yts(text)
let no = 1
let sections = []
for (let i of search.all) {
const list = {title: `${i.title}`,
rows: [
{
title: `${i.title}\n`,
rowId: `${prefix}ytmp3 ${i.url}`,
description: `${i.description}\n*UPLOAD:* ${i.ago}\n*CHANNEL:* ${i.author.name}\n*VIEWS:* ${i.views}\n*DURATION:* ${i.timestamp}\n*LINK:* ${i.url}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: ` ${text}`,
footer: botname,
title: `${ucapannya2} ${pushname} Here are the search results from ytsaudio`,
buttonText: "LIST OF AUDIOS",
sections
}, { quoted : m })
}
break
case 'ytsvideo': case 'ytsearchvideo': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} seh calaz takambo tamba munyika`
let yts = require("yt-search")
let search = await yts(text)
let no = 1
let sections = []
for (let i of search.all) {
const list = {title: `${i.title}`,
rows: [
{
title: `${i.title}\n`,
rowId: `${prefix}ytmp4 ${i.url}`,
description: `${i.description}\n*UPLOAD:* ${i.ago}\n*CHANNEL:* ${i.author.name}\n*VIEWS:* ${i.views}\n*DURATION* ${i.timestamp}\n*LINK:* ${i.url}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: ` ${text}`,
footer: botname,
title: `${ucapannya2} ${pushname} *Here are the search results from ytsvideo*`,
buttonText: "LIST OF VIDEOS",
sections
}, { quoted : m })
}
break
case 'yts': case 'youtubesearch': case 'ytsearch': {
await ZimBotInc.sendMessage(m.chat, {text: `*sᴇᴀʀᴄʜɪɴɢ🔎 ʏᴏᴜʀ ᴠɪᴅᴇᴏs🎬ᴘʟᴇᴀsᴇ ᴡᴀɪᴛ...* `}, {quoted: m})
if (!text) throw `Example : ${prefix + command} story wa anime`
let yts = require("youtube-yts")
let search = await yts(text)
let no = 1
let sections = []
for (let i of search.all) {
const list = {title: `${i.title}`,
rows: [
{
title: `${i.title}\n\n`,
rowId: `${prefix}ytmp3 ${i.url}`,
description: `${i.url}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: `*ϙᴜᴇʀʏ:* \n${text}🎛️`,
footer: ` ⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023` ,
title: `*ʏᴏᴜᴛᴜʙᴇ sᴇᴀʀᴄʜ*`,
buttonText: "CLICK HERE",
sections
}, { quoted : m })
}
break
case 'fbdl': case 'fb': case 'facebook': case 'fbvideo': {
reply(mess.wait)
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
let bocil = require('@bochilteam/scraper')
bocil.facebookdlv2(`${text}`).then(async (data) => {
let txt = `*
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
⟮ _*◉FB Dᴏᴡɴʟᴏᴀᴅ◉*_ ⟯ *\n\n`
txt += `*◉TITLE :* ${data.title}\n`
txt += `*◉QUALITY :* ${data.result[0].quality}\n`
txt += `*◉DESCRIPTION :* ${data.description}\n`
txt += `*◉ID :* ᴢɪᴍ ʙᴏᴛ ɪɴᴄ\n`
txt += `*◉URL :* ${text}\n\n`
txt += `*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, {quoted: mudratunha})
for (let i of data.result) {
ZimBotInc.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, mimetype: 'video/mp4', caption: `*◉ Quality :* ${i.quality}` , quoted: m,contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
}).catch((err) => {
reply(`*Failed When Downloading Media and Sending Files*`)
})
}
break
case 'savefrom': {
if (!text) return m.reply(`Failed to download media and send audio ${prefix + command} link url`)
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
let noh = require('@bochilteam/scraper')
noh.savefrom(`${text}`).then(async (data) => {
let sections = []
for (let i of data.url) {
const list = {title: `${i.type}`,
rows: [
{
title: `Quality ${i.subname}`,
rowId: `${prefix}get ${text}`,
description: `${data.hosting}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: `${data.meta.title} *Here is the list of videos, click the button below to choose, here is the list of videos, click the button below to choose*`,
footer: `©ᴢɪᴍ ʙᴏᴛ ɪɴᴄ 2023`,
title: "**▊▊▊SAVEFROM DL▊▊▊**",
buttonText: "CLICK HERE",
sections
}, { quoted : m })
}).catch((err) => {
reply(`*Sorry An Error Occurred*`)
})
}
break
case 'fb2': case 'facebook2': case 'fb': {
//
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://violetics.pw/api/downloader/facebook?apikey=beta&url=${text}`)
tummb = await getBuffer('https://telegra.ph/file/9789a09c964cee5597a05.jpg')
ZimBotInc.sendMessage(m.chat, { video: { url: anu.result.url[0].url }, jpegThumbnail:tummb, caption: `*📽️ FACEBOOK DOWNLOADER*\n\n*Name* : ${anu.result.meta.title}\n*Quality* : ${anu.result.url[0].subname}\n*Ext* : ${anu.result.url[0].ext}\n`}, { quoted: m }).catch((err) => m.reply('*Sorry, the feature is in error*'))
}
break
case 'get': {
if (!text) throw 'Enter a Link'
let bicil = require('@bochilteam/scraper')
let urlnya = text
bicil.savefrom(urlnya)
.then(async(result) => {
for(let i of result.url) {
if(i.url.includes('mp4')){
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { video: link, caption: `*quality ${i.subname}*` }, { quoted: m })
}
}
}).catch((err) => reply(`*Sorry Future Error*`))
}
break
case 'tiktok4': { //DOWNLOADER
// //if
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
reply(mess.wait)
hx.ttdownloader(`${text}`).then(async (data) => {
let buttons = [
{buttonId: `${prefix}tiktokmp3 ${text}`, buttonText: {displayText: 'AUDIO'}, type: 1}
]
let buttonMessage = {
video: { url: data.nowm },
caption: `${util.format(data)}`,
footer: 'Please Select Below',
buttons: buttons,
headerType: 5
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'tiktok2': {
if (!text) throw `Use example ${prefix + command} https://www.tiktok.com/@omagadsus/video/7025456384175017243`
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://violetics.pw/api/downloader/tiktok?apikey=df7d-425a-3bc8&url=${text}`)
let listmn = `*▊▊▊TIKTOK DL▊▊▊*\n\n*Title:* ${anu.result.title}\n*Author:* ${anu.result.id}\n*Url:* ${anu.result.url}`
buf = await getBuffer(anu.result.thumb)
buf2 = await getBuffer(anu.result.link_dl2)
let message = await prepareWAMessageMedia({ video: buf2, gifPlayback:false, jpegThumbnail:buf }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
videoMessage: message.videoMessage,
hydratedContentText: listmn,
hydratedFooterText: `${botname}`,
hydratedButtons: [{
urlButton: {
displayText: 'SUBSCRIBE',
url: 'https://youtube.com/@zim-bot'
}
}, {
urlButton: {
displayText: 'GITHUB',
url: 'https://youtube.com/@zim-bot'
}
}, {
quickReplyButton: {
displayText: 'PING',
id: 'ping'
}
}, {
quickReplyButton: {
displayText: 'OWNER',
id: 'owner'
}
}, {
quickReplyButton: {
displayText: 'DONATE',
id: 'donadi'
}
}]
}
}
}), { userJid: m.chat, quoted: m })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
}
break
case 'tiktok': case 'tiktoknowm': case 'tiktokwm': case 'tt': case 'ttnowm': case 'ttwm': {
// //if
if (!text) throw '*Enter a Link Query!*'
let bocil = require('@bochilteam/scraper')
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
bocil.tiktokdlv3(`${text}`).then(async (video) => {
var hadi = randomNomor(100)
var hadie = randomNomor(200)
var hadir = randomNomor(300)
var memek = randomNomor(1000)
let caption = `
*▊▊▊TIKTOK DL▊▊▊*\n\n*AUTHOR* : DRIPS\n*NICKNAME* : ${video.author.nickname}\n*CAPTION* : ${video.description}\n*QUALITY* : nowatermark\n*COMMENTS* : ${memek}\n*CREATE* ${hadir} Ago\n*LIKES* : ${hadi}\n*DISLIKE* : ${hadie}\n*SOURCE* : ${text}\n\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(video.author.avatar)
ZimBotInc.sendMessage(m.chat, { image: { url: video.author.avatar }, jpegThumbnail:buf, caption: `${caption}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { video: { url: video.video.no_watermark }, jpegThumbnail:buf, mimetype: 'video/mp4', caption: `*Downloading From ${text}*` }, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'tiktok5': case 'tt5': {
// //if
if (!text) throw '*Enter a Link Query!*'
let bocil = require('@bochilteam/scraper')
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
bocil.tiktokdlv3(`${text}`).then(async (video) => {
var hadi = randomNomor(100)
var hadie = randomNomor(200)
var hadir = randomNomor(300)
var memek = randomNomor(1000)
let caption = `*▊▊▊TIKTOK DL▊▊▊*\n\n*AUTHOR* : DRIPS\n*NICKNAME* : ${video.author.nickname}\n*CAPTION* : ${video.description}\n*COMMENTS* : ${memek}\n*CREATE* ${hadir} Ago\n*LIKES* : ${hadi}\n*DISLIKES* : ${hadie}\n*SOURCE* : ${text}\n\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(video.author.avatar)
ZimBotInc.sendMessage(m.chat, { image: { url: video.author.avatar }, jpegThumbnail:buf, caption: `${caption}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { video: { url: video.video.no_watermark }, jpegThumbnail:buf, mimetype: 'video/mp4', caption: `*Downloading From ${text}*` }, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'tt3': case 'tiktok3': {
// //if
if (!text) throw '*Enter a Link Query!*'
let bocil = require('@bochilteam/scraper')
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
bocil.tiktokdlv3(`${text}`).then(async (video) => {
var hadi = randomNomor(100)
var hadie = randomNomor(200)
var hadir = randomNomor(300)
var memek = randomNomor(1000)
let caption = `**▊▊▊TIKTOK DL▊▊▊**\n\n*⬤AUTHOR* : DRIPS\n*⬤NICKNAME* : ${video.author.nickname}\n*⬤CAPTION* : ${video.description}\n*⬤COMMENTS* : ${memek}\n*⬤CREATE* ${hadir} Ago\n*⬤LIKES* : ${hadi}\n*⬤DISLIKES* : ${hadie}\n*⬤ SOURCE* : ${text}`
buf = await getBuffer(video.author.avatar)
let message = await prepareWAMessageMedia({ image: buf, jpegThumbnail: buf }, { upload: ZimBotInc.waUploadToServer })
const template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: caption,
hydratedFooterText: `${botname}`,
hydratedButtons: [{
urlButton: {
displayText: 'SOURCE',
url: `${text}`
}
}, {
urlButton: {
displayText: 'GITHUB',
url: 'https://youtube.com/@zim-bot'
}
}, {
quickReplyButton: {
displayText: 'WATERMARK',
id: `ttwm ${text}`
}
}, {
quickReplyButton: {
displayText: 'NOWATERMARK',
id: `tiktoknowm ${text}`
}
}, {
quickReplyButton: {
displayText: 'AUDIO',
id: `tiktokmp3 ${text}`
}
}]
}
}
}), { userJid: m.chat, quoted: m })
ZimBotInc.relayMessage(m.chat, template.message, { messageId: template.key.id })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'tiktokmp3': case 'tiktokaudio': {
if (!text) throw '*Enter Link Tiktok!*'
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
let got = require('./lib/tiktok.js')
got.tiktokDown(`${text}`).then(async (data) => {
ZimBotInc.sendMessage(m.chat, { audio: { url: data.result.nowatermark }, mimetype: 'audio/mp4'}, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send audio*`)
})
}
break
case 'ttmp3': {
if (!text) throw `*Enter link tiktok example ${prefix + command} https://vt.tiktok.com/zgjbtcsdq/`
if (!isUrl(args[0]) && !args[0].includes('tiktok.com')) throw '*The link you provided is not valid*'
let get = require('./lib/scraper.js')
get.aiovideodl(`${text}`).then(async (res) => {
var anu = await getBuffer(res.medias[2].url)
ZimBotInc.sendMessage(m.chat, { audio: anu, mimetype: 'audio/mpeg'}, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'igt': case 'igtdl': case 'instagrtam': {
if (!text) throw '*Please Enter Instagarm Link*'
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
let urlnya = text
hx.igdl(urlnya)
.then(async(result) => {
var halo = 0
ZimBotInc.sendMessage(m.chat, { image: { url: result.user.profilePicUrl }, jpegThumbnail: await getBuffer(result.user.profilePicUrl), caption: `*----「 INSTAGRAM DOWNLOADER 」----*\n\n*⬤ Username :* ${result.user.username}\n*⬤ Fullname :* ${result.user.fullName}\n*⬤ Followers :* ${result.user.followers}\n*⬤ Following :* ${result.user.following}\n*⬤ ID :* ${result.user.id}\n*⬤ Filetype :* ${result.medias[0].fileType}\n*⬤ Type :* ${result.medias[0].type}\n*⬤ Jumlah Media :* ${result.medias.length}\n*⬤ Url :* ${text}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*` }, { quoted: m })
for(let i of result.medias) {
if(i.url.includes('mp4')){
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { video: link, jpegThumbnail: await getBuffer(i.preview), caption: `*Instagram ${i.type}*` }, { quoted: m })
} else {
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { image: link, jpegThumbnail: await getBuffer(i.preview), caption: `*Instagram ${i.type}*` }, { quoted: m })
}
}
}).catch((err) => reply(`*Sorry Instagram Instagram ${text} Not found*`))
}
break
case 'ig':{
if (args.length === 0) throw `Where is the link?\nSend ${prefix + command} url`
let urlInsta = args[0];
if (!(urlInsta.includes("instagram.com/p/") ||
urlInsta.includes("instagram.com/reel/") ||
urlInsta.includes("instagram.com/tv/")))
return ZimBotInc.sendMessage(m.chat,{ text: `The link you provided is not a instagram link` },{ quoted: m });
if (urlInsta.includes("?"))
urlInsta = urlInsta.split("/?")[0];
ig.fetchPost(urlInsta).then((res) => {
if (res.media_count == 1) {
if (res.links[0].type == "video") {
ZimBotInc.sendMessage(m.chat,{video: { url: res.links[0].url }},{ quoted: m })
}else if (res.links[0].type == "image") {
ZimBotInc.sendMessage(m.chat,{image: { url: res.links[0].url }},{ quoted: m })
}
}
else if (res.media_count > 1) {
for (let i = 0; i < res.media_count; i++) {
if (res.links[i].type == "video") {
ZimBotInc.sendMessage(m.chat,{video: { url: res.links[i].url }},{ quoted: m })
} else if (res.links[i].type == "image") {
ZimBotInc.sendMessage(m.chat,{image: { url: res.links[i].url }},{ quoted: m })
}
}
}
}).catch((error) => {
reply(error);
ZimBotInc.sendMessage(m.chat, { text: `sorry zimbot user must be private or unavailable` }, { quoted: m })
});
}
break
case 'tinyurl':{
if(!q) return m.reply('link?')
request(`https://tinyurl.com/api-create.php?url=${q}`, function (error, response, body) {
try {
m.reply(body)
} catch (e) {
m.reply(e)
}
})
}
break
case 'creategroup':
if (!isCreator) return m.reply(mess.owner)
if (!q) return reply("Enter text")
const groupu = await ZimBotInc.groupCreate(q, [owner + "@s.whatsapp.net"])
m.reply('done 👍')
break
case 'ig3': case 'igdl3': case 'instagram3': {
////if
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
let bicil = require('@bochilteam/scraper')
let urlnya = text
bicil.instagramdlv4(urlnya)
.then(async(result) => {
for(let i of result){
if(i.url.includes('mp4')){
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { video: link, jpegThumbnail: await getBuffer(i.thumbnail), caption: `*${botname}*` }, { quoted: m })
} else {
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { image: link, jpegThumbnail: await getBuffer(i.thumbnail), caption: `*${botname}*` }, { quoted: m })
}
}
}).catch((err) => reply(`*Failed When Downloading And Sending Media*`))
}
break
case 'ig2': case 'igdl2': case 'instagram2': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://api.akuari.my.id/downloader/igdl?link=${text}`)
var oi = 1
for(let i of anu.medias){
var txt = `*▊▊▊INSTA DL▊▊▊*\n\n*Username:* ${anu.user.username}\n*Fullname:* ${anu.user.fullName}\n*Followers:* ${anu.user.followers}\n*Type:* ${anu.medias[0].type}\n*Tipe:* ${anu.medias[0].fileType}\n*ID:* ${anu.user.id}\n*Jumlah Media:* ${oi++}\n*Url:* ${text}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
var buf = await getBuffer(anu.user.profilePicUrl)
ZimBotInc.sendMessage(m.chat, { image: { url: anu.user.profilePicUrl }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m }).catch((err) => m.reply('error'))
ZimBotInc.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, caption: `${botname}`}, { quoted: m }).catch((err) => m.reply('error'))
}
}
break
case 'igimage': {
if (!text) throw '*Enter a Link Query!*'
const { instagramdl, instagramdlv2, instagramdlv3 } = require('@bochilteam/scraper')
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
instagramdlv3(`${text}`).then(async (data) => {
for (let f of data) {
ZimBotInc.sendMedia(m.chat, f.url, '', `Download Url Instagram From ${text}`, m)
}
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'igs': case 'igstory': case 'instagramstory': {
if (!text) throw 'Type Username!'
let urlnya = text
hx.igstory(urlnya)
.then(async(result) => {
var halo = 0
ZimBotInc.sendMessage(m.chat, { image: { url: result.user.profilePicUrl }, jpegThumbnail: await getBuffer(result.user.profilePicUrl), caption: `*----「 INSTAGRAM STORY 」----*\n\n*⬤ Username :* ${result.user.username}\n*⬤ Fullname :* ${result.user.fullName}\n*⬤ Followers :* ${result.user.followers}\n*⬤ Following :* ${result.user.following}\n*⬤ ID :* ${result.user.id}\n*⬤ Filetype :* ${result.medias[0].fileType}\n*⬤ Type :* ${result.medias[0].type}\n*⬤ Media :* ${result.medias.length}\n*⬤ Bio :* ${result.user.biography}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*` }, { quoted: m })
for(let i of result.medias) {
if(i.url.includes('mp4')){
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { video: link, jpegThumbnail: await getBuffer(i.preview), caption: `*Story ${i.type}*` }, { quoted: m })
} else {
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { image: link, jpegThumbnail: await getBuffer(i.preview), caption: `*Story ${i.type}*` }, { quoted: m })
}
}
}).catch((err) => reply(`*Sorry Story Instagram ${text} not found*`))
}
break
case 'igs2': case 'igstory2': case 'instagramstory2':{
////if you (copy.codes) .then(give a credit)
if (!text) throw '*Enter a Link Query!*'
// if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://api.akuari.my.id/downloader/igStory?username=${text}`)
for (let i of anu) {
tummb = await getBuffer(i.preview)
ZimBotInc.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:tummb, caption: `*${botname}*`}, { quoted: m }).catch((err) => m.reply('*Sorry, the feature is in error*'))
}
}
break
case 'igs3': case 'igstory3': case 'instagramstory3': {
if (!text) throw 'Enter Username!'
let bicil = require('@bochilteam/scraper')
let urlnya = text
bicil.instagramStoryv2(urlnya)
.then(async(result) => {
var halo = 1
ZimBotInc.sendMessage(m.chat, { image: { url: result.user.profilePicUrl }, jpegThumbnail: await getBuffer(result.user.profilePicUrl), caption: `*----「 INSTA DOWNLOADER 」----*\n\n*⬤ Username :* ${result.user.username}\n*⬤ Fullname :* ${result.user.fullName}\n*⬤ Followers :* ${result.user.followers}\n*⬤ Following :* ${result.user.following}\n*⬤ ID :* ${result.user.id}\n*⬤ Jumlah Media :* ${halo++}\n*⬤ Bio :* ${result.user.biography}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*` }, { quoted: m })
for(let i of result.results) {
if(i.url.includes('mp4')){
let link = await getBuffer(i.sourceUrl)
ZimBotInc.sendMessage(m.chat, { video: link, jpegThumbnail: await getBuffer(i.thumbnail), caption: `*Story ${i.type}*` }, { quoted: m })
} else {
let link = await getBuffer(i.url)
ZimBotInc.sendMessage(m.chat, { image: link, jpegThumbnail: await getBuffer(i.thumbnail), caption: `*Story ${i.type}*` }, { quoted: m })
}
}
}).catch((err) => reply(`*Sorry Story Instagram ${text} Tnot found*`))
}
break
case 'igtv': {
if (!text) throw '*Enter a Link Query!*'
const { instagramdl, instagramdlv2, instagramdlv3 } = require('@bochilteam/scraper')
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
instagramdlv3(`${text}`).then(async (data) => {
var buf = await getBuffer(data[0].thumbnail)
ZimBotInc.sendMessage(m.chat, { video: { url: data[0].url }, jpegThumbnail:buf, caption: `${botname}`}, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'twitter': case 'td': case 'twitterdl': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('twitter.com')) throw '*The link you provided is not valid*'
xa.Twitter(`${text}`).then(async (data) => {
let txt = `*▊▊▊TWITTER DL▊▊▊*\n\n`
txt += `*⬤TITLE :* ${data.title}\n`
txt += `*⬤QUALITY :* ${data.medias[1].quality}\n`
txt += `*⬤TYPE :* ${data.medias[1].extension}\n`
txt += `*⬤SIZE :* ${data.medias[1].formattedSize}\n`
txt += `*⬤DURATION :* ${data.medias.length}\n`
txt += `*⬤URL :* ${data.url}\n\n`
txt += `*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m })
for (let i of data.medias) {
ZimBotInc.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, caption: `*Downloading From ${text}*`}, { quoted: m })
}
}).catch((err) => {
reply(`*Failed to download media and send videos*`)
})
}
break
case 'twitter2': case 'td2': case 'twitterdl2': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('twitter.com')) throw '*The link you provided is not valid*'
xa.Twitter(`${text}`).then(async (data) => {
for (let x of data.medias) {
let txt = `*▊▊▊TWITTER DL▊▊▊*n\n`
txt += `*⬤TITLE :* ${data.title}\n`
txt += `*⬤QUALITY :* ${x.quality}\n`
txt += `*⬤TYPE:* ${x.extension}\n`
txt += `*⬤SIZE:* ${x.formattedSize}\n`
txt += `*⬤URL :* ${data.url}\n\n`
txt += `*Hi ${pushname}The bot is doing great job dont forget to subcribe*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { video: { url: x.url }, jpegThumbnail:buf, caption: `${txt}`}, { quoted: m })
}
}).catch((err) => m.reply(`Sorry the faiture is error`))
}
break
case 'twittermp3': case 'twitteraudio': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('twitter.com')) throw '*The link you provided is not valid*'
xa.Twitter(`${text}`).then(async (data) => {
ZimBotInc.sendMessage(m.chat, { audio: { url: data.medias[1].url }, mimetype: 'audio/mp4'}, { quoted: m })
}).catch((err) => {
reply(`*Failed to download media and send audio*`)
})
}
break
case 'fbdl': case 'facebook': case 'pesbuk': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
let bocil = require('@bochilteam/scraper')
bocil.facebookdlv2(`${text}`).then(async (data) => {
let txt = `*▊▊▊FB DOWNLOAD▊▊▊*\n\n`
txt += `*⬤TITLE :* ${data.title}\n`
txt += `*⬤QUALITY :* ${data.result[0].quality}\n`
txt += `*⬤DESCRIPTION :* ${data.description}\n`
txt += `*⬤ID :* ᴢɪᴍ ʙᴏᴛ ɪɴᴄ\n`
txt += `*⬤URL :* ${text}\n\n`
txt += `*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m })
for (let i of data.result) {
ZimBotInc.sendMessage(m.chat, { video: { url: i.url }, jpegThumbnail:buf, caption: `*⬤ Quality :* ${i.quality}`}, { quoted: m })
}
}).catch((err) => {
reply(`*Failed When Downloading Media and Sending Files*`)
})
}
break
case 'fbmp3': case 'facebookmp3': case 'facebookaudio': {
if (!text) return m.reply(`Use${prefix + command} enter facebook link`)
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
let noh = require('@bochilteam/scraper')
noh.savefrom(`${text}`).then(async (anu) => {
ZimBotInc.sendMessage(m.chat, { audio: { url: anu.url[0].url }, mimetype: 'audio/mp4' }, { quoted: m })
}).catch((err) => {
reply(`*Failed to link to audio*`)
})
}
break
case 'fb6': {
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('facebook.com')) throw '*The link you provided is not valid*'
xa.Facebook(`${text}`).then(async (data) => {
let txt = `*▊▊▊FB6 DOWNLOAD▊▊▊*\n\n`
txt += `*⬤TITLE :* ${data.title}\n`
txt += `*⬤QUALITY :* ${data.medias[1].quality}\n`
txt += `*:⬤TYPE* ${data.medias[1].extension}\n`
txt += `*⬤SIZE :* ${data.medias[1].formattedSize}\n`
txt += `*⬤URL :* ${data.url}\n\n`
txt += `*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
buf = await getBuffer(data.thumbnail)
ZimBotInc.sendMessage(m.chat, { image: { url: data.thumbnail }, jpegThumbnail:buf, caption: `${txt}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, { video: { url: data.medias[1].url }, jpegThumbnail:buf, caption: `*⬤ Quality :* ${data.medias[1].quality}`}, { quoted: m })
}).catch((err) => {
reply(`*Failed When Downloading Media and Sending Files*`)
})
}
break
case 'youtube': case 'ytdl': {
////if
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('youtube.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://api.akuari.my.id/downloader/youtube?link=${text}`)
if (anu.filesize_video >= 100000) return m.reply('*File Over Limit* '+util.format(anu))
tummb = await getBuffer(anu.thumb)
audio = await getBuffer(anu.audio)
ZimBotInc.sendMessage(m.chat, {document: audio, mimetype: 'audio/mpeg', fileName: `${anu.title}`}, { quoted : m }).catch((err) => m.reply('*Sorry, the feature is in error*'))
ZimBotInc.sendMessage(m.chat, { video: { url: anu.video }, jpegThumbnail:tummb, caption: `${util.format(anu)}`}, { quoted: m }).catch((err) => m.reply('*Sorry, the feature is in error*'))
}
break
case 'igreal': case 'instagramreal': {
////if
if (!text) throw '*Enter a Link Query!*'
if (!isUrl(args[0]) && !args[0].includes('instagram.com')) throw '*The link you provided is not valid*'
anu = await fetchJson(`https://api.akuari.my.id/downloader/igdl?link=${text}`)
tummb = await getBuffer(anu.medias[0].preview)
ZimBotInc.sendMessage(m.chat, { video: { url: anu.medias[0].url }, jpegThumbnail:tummb, caption: `${util.format(anu)}`}, { quoted: m }).catch((err) => m.reply('*Sorry, the feature is in error*'))
}
break
case 'cuttly': {
//if
if (!text) throw `Example : ${prefix + command} https://github.com`
anu = await fetchJson(`https://xteam.xyz/shorturl/cuttly?url=${text}&nama=alyabot&APIKEY=${setting.riy}`)
m.reply(`${anu.result}`)
}
break
case 'speedtest': {
reply('Testing Speed...')
let cp = require('child_process')
let { promisify } = require('util')
let exec = promisify(cp.exec).bind(cp)
let o
try {
o = await exec('python speed.py')
} catch (e) {
o = e
} finally {
let { stdout, stderr } = o
if (stdout.trim()) m.reply(stdout)
if (stderr.trim()) m.reply(stderr)
}
}
break
case 'report': {
if (!args.join(" ")) return m.reply(`Example : \n- ${prefix + command} feature ig error min\n- ${prefix + command} this user is spamming min`)
teks = `*▊▊▊REPORT FEATURE▊▊▊*`
teks1 = `\n\nNUMBER : @${m.sender.split("@")[0]}\n*REPORT :* ${args.join(" ")}`
teks2 = `\n\nSucces send to owner`
for (let i of owner) {
ZimBotInc.sendMessage(i + "@s.whatsapp.net", {text: teks + teks1, mentions:[m.sender]}, {quoted:m})
}
ZimBotInc.sendMessage(m.chat, {text: teks + teks2 + teks1, mentions:[m.sender]}, {quoted:m})
}
break
case 'request': case 'suggest': {
if (!args.join(" ")) return m.reply(`Example : ${prefix + command} min add a downloader feature`)
teks = `*▊▊▊REQUEST FEATURE▊▊▊*`
teks1 = `\n\n*NUMBER :* @${m.sender.split("@")[0]}\n*REQUEST :* ${args.join(" ")}`
teks2 = `\n\nSucces send to owner`
for (let i of owner) {
ZimBotInc.sendMessage(i + "@s.whatsapp.net", {text: teks + teks1, mentions:[m.sender]}, {quoted:m})
}
ZimBotInc.sendMessage(m.chat, {text: teks + teks2 + teks1, mentions:[m.sender]}, {quoted:m})
}
break
case 'amino': {
if (!text) throw `what are you looking for!, example : ${prefix + command} naruto`
let anu = await fetchJson(`https://violetics.pw/api/search/amino?apikey=beta&query=${text}`)
m.reply(`${util.format(anu)}`)
}
break
case 'anime': {
if (!text) return m.reply(`you are looking for what anime apa?\n\nEXAMPLE ${prefix}anime naruto`)
anu = await fetchJson(`https://api.jikan.moe/v4/anime?q=${text}`)
let sections = []
for (let i of anu.data) {
const list = {title: `${i.title}`,
rows: [
{
title: `${i.title}`,
rowId: `${prefix}animee ${i.mal_id}`,
description: `${i.synopsis}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: `*Search Results From* ${text}`,
footer: botname,
title: "*▊▊▊ANIME▊▊▊*",
buttonText: "CLICK HERE",
sections
}, { quoted : m })
}
break
case 'animee': {
res = await fetchJson(`https://api.jikan.moe/v4/anime/${q}`)
let txt = `𝗔𝗻𝗶𝗺𝗲 𝗜𝗻𝗳𝗼\n\n*TITLE:* *${res.data.title}*\n*ENGLISH:* *${res.data.title_english}*\n*JAPANESE:* *${res.data.title_japanese}*\n*TYPE ANIME:* *${res.data.type}*\n*ADAPTER:* *${res.data.source}*\n*TOTAL EPISODE:* *${res.data.episodes}*\n*STATUS:* *${res.data.status}*\n*ONGOING:* *${res.data.airing ? 'Ya' : 'DRIS'}*\n*AIRED:* *${res.data.aired.string}*\n*DURATION:* *${res.data.duration}*\n*RATING:* *${res.data.rating}*\n*SCORE:* *${res.data.score}*\n*RANK:* *${res.data.rank}*\n*STUDIO:* *${res.data.studios[0].name}* `
ZimBotInc.sendMessage(m.chat, { image : { url : res.data.images.jpg.image_url}, caption : txt}, {quoted :m }).catch((err) => m.reply('sorry error'))
}
break
case 'bcgc': case 'bcgroup': {
if (!isCreator) throw mess.owner
if (!text) throw `*Type some text*\n\nExample : ${prefix + command} ZIM-BOT-INC`
let getGroups = await ZimBotInc.groupFetchAllParticipating()
let groups = Object.entries(getGroups).slice(0).map(entry => entry[1])
let anu = groups.map(v => v.id)
reply(`*Send Broadcast To* ${anu.length} *Group Chat, Time ${anu.length * 1.5} second*`)
for (let i of anu) {
await sleep(1500)
let btn = [{
urlButton: {
displayText: 'GITHUB',
url: 'https://youtube.com/@zim-bot'
}
}]
let txt = `「 *ZIMBOT BROADCAST* 」\n\n${text}`
ZimBotInc.send5ButImg(i, txt, botname, global.bc, btn)
}
reply(` *Send Broadcast To* ${anu.length} *Group*`)
}
break
case 'bc': case 'broadcast': case 'bcall': {
if (!isCreator) throw mess.owner
if (!text) throw `*Type some text*\n\nExample : ${prefix + command} ZIM-BOT-INC`
let anu = await store.chats.all().map(v => v.id)
reply(`*Send Broadcast To* ${anu.length} Chat\nTime ${anu.length * 1.5} second`)
for (let yoi of anu) {
await sleep(1500)
let btn = [{
urlButton: {
displayText: 'GITHUB',
url: 'https://youtube.com/@zim-bot'
}
}]
let txt = `「 *ZIMBOT BROADCAST* 」\n\n${text}`
ZimBotInc.send5ButImg(yoi, txt, botname, global.bc, btn)
}
reply('*Success Broadcast*')
}
break
case 'bc2': case 'bcloc': {
if (!isCreator) throw mess.owner
if (!text) throw `*Type some text*\n\nExample : ${prefix + command} drips|hi5`
let anu = await store.chats.all().map(v => v.id)
let [melo, melo2] = text.split`|`
reply(`*Send Broadcast To* ${anu.length} Chat\nTime ${anu.length * 1.5} minutes`)
for (let yoi of anu) {
await sleep(1500)
var button = [{ buttonId: `${prefix}ho`, buttonText: { displayText: `${melo2}` }, type: 1 }]
ZimBotInc.sendMessage(yoi, { caption: `${melo}`, location: { jpegThumbnail: await getBuffer(picak+'Brodcast') }, buttons: button, footer: `${botname}`, mentions: [m.sender] })
}
}
break
case 'bcimage': case 'bcvideo': case 'bcaudio': {
if (!isCreator) throw mess.owner
if (!/video/.test(mime) && !/image/.test(mime) && !/audio/.test(mime)) throw `*Send/Reply Video/Audio/Image You Want to Broadcast With Caption* ${prefix + command}`
let anu = await store.chats.all().map(v => v.id)
let ftroli ={key: {fromMe: false,"participant":"0@s.whatsapp.net", "remoteJid": "6289523258649-1604595598@g.us"}, "message": {orderMessage: {itemCount: 2022,status: 200, thumbnail: fs.readFileSync('./drips.jpg'), surface: 200, message: `ZIM-BOT-INC`, orderTitle: 'ZIM-BOT-INC', sellerJid: '0@s.whatsapp.net'}}, contextInfo: {"forwardingScore":999,"isForwarded":true},sendEphemeral: true}
reply(`*Send Broadcast To* ${anu.length} *Group Chat, Time ${anu.length * 1.5} minutes*`)
for (let i of anu) {
await sleep(1500)
let butoon = [{
urlButton: {
displayText: `GITHUB`,
url: 'https://youtube.com/@zim-bot'
}
},
{
quickReplyButton: {
displayText: 'MENU',
id: 'menu'
}
}]
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let buffer = fs.readFileSync(media)
if (/webp/.test(mime)) {
ZimBotInc.sendMessage(i, { sticker: { url: media } }, { quoted: ftroli })
} else if (/image/.test(mime)) {
let junn = `*_BROADCAST IMAGE_*${text ? '\n\n' + text : ''}`
ZimBotInc.send5ButImg(i, junn, `${global.botname}`, buffer, butoon)
} else if (/video/.test(mime)) {
let junn = `*_BROADCAST VIDIO_*${text ? '\n\n' + text : ''}`
ZimBotInc.sendMessage(i, {video: buffer, caption: `${junn}`}, { quoted: ftroli })
} else if (/audio/.test(mime)) {
ZimBotInc.sendMessage(i, {audio: buffer, mimetype: 'audio/mpeg'}, { quoted : ftroli })
} else {
reply(`*Send/Reply Video/Audio/Image You Want to Broadcast With Caption* ${prefix + command}`)
}
await fs.unlinkSync(media)
}
reply(` *Send Broadcast To* ${anu.length} *Chats*`)
}
break
case 'bctext': {
if (!isCreator) throw mess.owner
if (!text) throw `*Type some text*\n\nExample : ${prefix + command} zim-ot`
//let ftroli ={key: {fromMe: false,"participant":"0@s.whatsapp.net", "remoteJid": "6289523258649-1604595598@g.us"}, "message": {orderMessage: {itemCount: 666666666,status: 200, thumbnail: await getBuffer(picak+'Brodcast'), surface: 200, message: `© ${botname}`, orderTitle: 'memek', sellerJid: '0@s.whatsapp.net'}}, contextInfo: {"forwardingScore":999,"isForwarded":true},sendEphemeral: true}
let ftroli = {key: {participant: `0@s.whatsapp.net`, ...(m.chat ? { remoteJid: `6283136505591-1614953337@g.us` } : {}) }, message: { 'contactMessage': { 'displayName': `© ${botname}`, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;${ZimBotInc.user.name},;;;\nFN:${botname},\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, 'jpegThumbnail': await getBuffer(picak+'Brodcast'), thumbnail: await getBuffer(picak+'Brodcast'),sendEphemeral: true}}}
let anu = await store.chats.all().map(v => v.id)
reply(`*Send Broadcast To* ${anu.length} Chat\n*Time ${anu.length * 1.5} seconds*`)
for (let yoi of anu) {
await sleep(1500)
ZimBotInc.sendMessage(yoi, {text:`${text}`}, {quoted:blessedtuna})
}
reply('*Success Broadcast*')
}
break
case 'bcvid': case 'bcvideo': {
if (!isCreator) throw mess.owner
if (!text) throw `*use ${prefix + command}|text*`
let buf = `https://telegra.ph/file/f8b17ce3b28bb5f25f5e1.mp4`
let ftroli ={key: {fromMe: false,"participant":"0@s.whatsapp.net", "remoteJid": "6289523258649-1604595598@g.us"}, "message": {orderMessage: {itemCount: 999999999999,status: 200, thumbnail: await getBuffer(picak+'Brodcast'), surface: 200, message: `© ${botname}`, orderTitle: 'memek', sellerJid: '0@s.whatsapp.net'}}, contextInfo: {"forwardingScore":999,"isForwarded":true},sendEphemeral: true}
let anu = await store.chats.all().map(v => v.id)
reply(`*Send Broadcast To* ${anu.length} Chat\n*Time ${anu.length * 1.5} minute*`)
for (let yoi of anu) {
await sleep(1500)
ZimBotInc.sendMessage(yoi, { video: await getBuffer(buf), jpegThumbnail: await getBuffer(picak+'Brodcast'), caption: `${text}` }, { quoted: ftroli}).catch ((err) => m.reply('*Sorry, failed to send the video*'))
}
reply('*Sucecess Broadcast*')
}
break
case 'swm': case 'stickerwm': case 'wm': {
reply(mess.wait)
if (!args.join(" ")) return m.reply(`Example :\n${prefix}swm drips love | tuna`)
const swn = args.join(" ")
const pcknm = swn.split("|")[0];
const atnm = swn.split("|")[1];
if (!/webp/.test(mime)) throw `*reply sticker with caption* *${prefix + command}*`
if (m.quoted.isAnimated === true) {
ZimBotInc.downloadAndSaveMediaMessage(quoted, "gifee")
ZimBotInc.sendMessage(m.chat, {sticker:fs.readFileSync("gifee.webp")},{quoted:m})
} else if (/image/.test(mime)) {
let media = await quoted.download()
let encmedia = await ZimBotInc.sendImageAsSticker(m.chat, media, m, { packname: pcknm, author: atnm })
await fs.unlinkSync(encmedia)
} else if (/video/.test(mime)) {
if ((quoted.msg || quoted).seconds > 11) return m.reply('Maksimal 10 detik!')
let media = await quoted.download()
let encmedia = await ZimBotInc.sendVideoAsSticker(m.chat, media, m, { packname: pcknm, author: atnm })
await fs.unlinkSync(encmedia)
} else {
reply(`*Send Image/Video With Caption* ${prefix + command}\n*Duration Video 1-9 seconds*`)
}
}
break
case 'smeme': case 'stickmeme': case 'stikmeme': case 'stickermeme': case 'stikermeme': {
reply(mess.wait)
if (!/image/.test(mime)) throw respond
if (!text) throw respond
reply(mess.wait)
atas = text.split('|')[0] ? text.split('|')[0] : '-'
bawah = text.split('|')[1] ? text.split('|')[1] : '-'
let dwnld = await quoted.download()
let { floNime } = require('./lib/uploader')
let fatGans = await floNime(dwnld)
let smeme = `https://api.memegen.link/images/custom/${encodeURIComponent(atas)}/${encodeURIComponent(bawah)}.png?background=${fatGans.result.url}`
let FaTiH = await ZimBotInc.sendImageAsSticker(m.chat, smeme, m, { packname: global.packname, author: global.auhor })
await fs.unlinkSync(FaTiH)
}
break
case 'brainly': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} apa itu wibu`
x = await fetchJson(`https://api.violetics.pw/api/media/brainly?apikey=beta&query=${text}`)
ini_txt = '*BRAINLY SEARCH*\n\n'
for (let i of x.result) {
ini_txt += `*QUESTION* : ${i.pertanyaan}\n`
ini_txt += `*ANSWER* : ${i.jawaban}\n`
}
reply(`${ini_txt}`)
}
break
case 'searchanime': {
reply(mess.wait)
if (!text) throw `Example : ${prefix + command} nama anime`
anu = await getBuffer(`https://api.akuari.my.id/search/konachan?query=${text}`)
ZimBotInc.sendMessage(m.chat, { image: anu, caption: `${command}` }, { quoted: m}).catch((err) => m.reply('*Sorry Xteam server is down*'))
}
break
//----END HERE------\\
//CREATED BY ᴢɪᴍ ʙᴏᴛ ɪɴᴄ
//----PHOT FILTER-----\\
break
case 'angie':
case 'aria':
case 'attic':
case 'blackandwhite':
case 'chorme1977':
case 'constrastbandw':
case 'creamy':
case 'duotone':
case 'eva':
case 'goldenhour':
case 'hana':
case 'hdr':
case 'japanese':
case 'lana':
case 'lavander':
case 'lemonande':
case 'lightleak':
case 'lisa':
case 'lomo':
case 'milk':
case 'molly':
case 'monochrome':
case 'morning':
case 'movie':
case 'orton':
case 'paretro':
case 'perfectbandw':
case 'plumy':
case 'retrolga':
case 'ruby':
case 'sand':
case 'sapphire':
case 'sepia':
case 'softsepia':
case 'solarize':
case 'sphinx':
case 'venus':
case 'viewfinder':
case 'warmsunset': {
if (!/image/.test(mime)) throw `*Send/Reply Image With Caption* ${prefix + command}`
let { UploadFileUgu, webp2mp4File, TelegraPh } = require('./lib/uploader')
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let anu = await TelegraPh(media)
let buf = await getBuffer(`https://violetics.pw/api/photofilter/${command}?apikey=beta&image=${anu}`)
ZimBotInc.sendMessage(m.chat, { image: buf, jpegThumbnail:buf, caption: `PhotoFilter ${command}` , quoted: m, contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
//----END HERE-------\\
//CREATED BY ᴢɪᴍ ʙᴏᴛ ɪɴᴄ
//----TEXTPRO--------\\
case 'candy':
case 'christmas':
case '3dchristmas':
case 'sparklechristmas':
case 'deepsea':
case 'scifi':
case 'rainbow2':
case 'waterpipe':
case 'spooky':
case 'pencil':
case 'circuit':
case 'discovery':
case 'metalic':
case 'fiction':
case 'demon':
case 'transformer':
case 'berry':
case 'thunder':
case '3dstone2':
case 'neonlight':
case 'glitch':
case 'harrypotter':
case 'brokenglass':
case 'papercut':
case 'watercolor':
case 'multicolor':
case 'neondevil':
case 'underwater':
case 'graffitibike':
case 'snow':
case 'cloud':
case 'honey':
case 'ice':
case 'fruitjuice':
case 'biscuit':
case 'wood':
case 'chocolate':
case 'strawberry':
case 'matrix':
case 'blood':
case 'dropwater':
case 'toxic':
case 'lava':
case 'rock':
case 'bloodglas':
case 'halloween':
case 'darkgold':
case 'joker':
case 'wicker':
case 'firework':
case 'skeleton':
case 'blackpink':
case 'sand':
case 'glue':
case '1917':
case 'leaves':
case 'demon': {
if (!q) return reply(`Example : ${prefix + command} ${global.ownername}`)
reply(mess.wait)
let link
if (/candy/.test(command)) link = 'https://textpro.me/create-christmas-candy-cane-text-effect-1056.html'
if (/christmas/.test(command)) link = 'https://textpro.me/christmas-tree-text-effect-online-free-1057.html'
if (/3dchristmas/.test(command)) link = 'https://textpro.me/3d-christmas-text-effect-by-name-1055.html'
if (/sparklechristmas/.test(command)) link = 'https://textpro.me/sparkles-merry-christmas-text-effect-1054.html'
if (/deepsea/.test(command)) link = 'https://textpro.me/create-3d-deep-sea-metal-text-effect-online-1053.html'
if (/scifi/.test(command)) link = 'https://textpro.me/create-3d-sci-fi-text-effect-online-1050.html'
if (/rainbow/.test(command)) link = 'https://textpro.me/3d-rainbow-color-calligraphy-text-effect-1049.html'
if (/waterpipe/.test(command)) link = 'https://textpro.me/create-3d-water-pipe-text-effects-online-1048.html'
if (/spooky/.test(command)) link = 'https://textpro.me/create-halloween-skeleton-text-effect-online-1047.html'
if (/pencil/.test(command)) link = 'https://textpro.me/create-a-sketch-text-effect-online-1044.html'
if (/circuit/.test(command)) link = 'https://textpro.me/create-blue-circuit-style-text-effect-online-1043.html'
if (/discovery/.test(command)) link = 'https://textpro.me/create-space-text-effects-online-free-1042.html'
if (/metalic/.test(command)) link = 'https://textpro.me/creat-glossy-metalic-text-effect-free-online-1040.html'
if (/fiction/.test(command)) link = 'https://textpro.me/create-science-fiction-text-effect-online-free-1038.html'
if (/demon/.test(command)) link = 'https://textpro.me/create-green-horror-style-text-effect-online-1036.html'
if (/transformer/.test(command)) link = 'https://textpro.me/create-a-transformer-text-effect-online-1035.html'
if (/berry/.test(command)) link = 'https://textpro.me/create-berry-text-effect-online-free-1033.html'
if (/thunder/.test(command)) link = 'https://textpro.me/online-thunder-text-effect-generator-1031.html'
if (/magma/.test(command)) link = 'https://textpro.me/create-a-magma-hot-text-effect-online-1030.html'
if (/3dstone2/.test(command)) link = 'https://textpro.me/create-a-3d-stone-text-effect-online-for-free-1073.html'
if (/neonlight/.test(command)) link = 'https://textpro.me/create-3d-neon-light-text-effect-online-1028.html'
if (/glitch/.test(command)) link = 'https://textpro.me/create-impressive-glitch-text-effects-online-1027.html'
if (/harrypotter/.test(command)) link = 'https://textpro.me/create-harry-potter-text-effect-online-1025.html'
if (/brokenglass/.test(command)) link = 'https://textpro.me/broken-glass-text-effect-free-online-1023.html'
if (/papercut/.test(command)) link = 'https://textpro.me/create-art-paper-cut-text-effect-online-1022.html'
if (/watercolor/.test(command)) link = 'https://textpro.me/create-a-free-online-watercolor-text-effect-1017.html'
if (/multicolor/.test(command)) link = 'https://textpro.me/online-multicolor-3d-paper-cut-text-effect-1016.html'
if (/neondevil/.test(command)) link = 'https://textpro.me/create-neon-devil-wings-text-effect-online-free-1014.html'
if (/underwater/.test(command)) link = 'https://textpro.me/3d-underwater-text-effect-generator-online-1013.html'
if (/graffitibike/.test(command)) link = 'https://textpro.me/create-wonderful-graffiti-art-text-effect-1011.html'
if (/snow/.test(command)) link = 'https://textpro.me/create-snow-text-effects-for-winter-holidays-1005.html'
if (/cloud/.test(command)) link = 'https://textpro.me/create-a-cloud-text-effect-on-the-sky-online-1004.html'
if (/honey/.test(command)) link = 'https://textpro.me/honey-text-effect-868.html'
if (/ice/.test(command)) link = 'https://textpro.me/ice-cold-text-effect-862.html'
if (/fruitjuice/.test(command)) link = 'https://textpro.me/fruit-juice-text-effect-861.html'
if (/biscuit/.test(command)) link = 'https://textpro.me/biscuit-text-effect-858.html'
if (/wood/.test(command)) link = 'https://textpro.me/wood-text-effect-856.html'
if (/chocolate/.test(command)) link = 'https://textpro.me/chocolate-cake-text-effect-890.html'
if (/strawberry/.test(command)) link = 'https://textpro.me/strawberry-text-effect-online-889.html'
if (/matrix/.test(command)) link = 'https://textpro.me/matrix-style-text-effect-online-884.html'
if (/blood/.test(command)) link = 'https://textpro.me/horror-blood-text-effect-online-883.html'
if (/dropwater/.test(command)) link = 'https://textpro.me/dropwater-text-effect-872.html'
if (/toxic/.test(command)) link = 'https://textpro.me/toxic-text-effect-online-901.html'
if (/lava/.test(command)) link = 'https://textpro.me/lava-text-effect-online-914.html'
if (/rock/.test(command)) link = 'https://textpro.me/rock-text-effect-online-915.html'
if (/bloodglas/.test(command)) link = 'https://textpro.me/blood-text-on-the-frosted-glass-941.html'
if (/halloween/.test(command)) link = 'https://textpro.me/halloween-fire-text-effect-940.html'
if (/darkgold/.test(command)) link = 'https://textpro.me/metal-dark-gold-text-effect-online-939.html'
if (/joker/.test(command)) link = 'https://textpro.me/create-logo-joker-online-934.html'
if (/wicker/.test(command)) link = 'https://textpro.me/wicker-text-effect-online-932.html'
if (/firework/.test(command)) link = 'https://textpro.me/firework-sparkle-text-effect-930.html'
if (/skeleton/.test(command)) link = 'https://textpro.me/skeleton-text-effect-online-929.html'
if (/blackpink/.test(command)) link = 'https://textpro.me/create-blackpink-logo-style-online-1001.html'
if (/sand/.test(command)) link = 'https://textpro.me/write-in-sand-summer-beach-free-online-991.html'
if (/glue/.test(command)) link = 'https://textpro.me/create-3d-glue-text-effect-with-realistic-style-986.html'
if (/1917/.test(command)) link = 'https://textpro.me/1917-style-text-effect-online-980.html'
if (/leaves/.test(command)) link = 'https://textpro.me/natural-leaves-text-effect-931.html'
let anu = await maker.textpro(link, q)
ZimBotInc.sendMessage(m.chat, { image: { url: anu }, caption: `Made by ${global.botname}` , quoted: m, contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
//----END HERE--------\\
//CREATED BY DRIPS
//----PHOTOOXY------\\
case 'silk':
case '3dnature':
case 'bevel':
case 'birthdaycake':
case 'burnpaper':
case 'coffee':
case 'coffee-heartcup':
case 'embroiderytext':
case 'flaming':
case 'flowertypo':
case 'funnycup':
case 'fur':
case 'gerbang':
case 'glowrainbow':
case 'gradientavatar':
case 'graffititext':
case 'harrypotter':
case 'lovemessage':
case 'luxuryroyal':
case 'neonlight':
case 'sweetcandy':
case 'summertext':
case 'woodheart':
case 'woodblock':
case 'yellowroses':
case 'wolfmetal':
case 'underwaterocean': {
if (!text) throw `Example : ${prefix + command} text`
anu = await getBuffer(`https://violetics.pw/api/photooxy/${command}?apikey=beta&text=${text}`)
ZimBotInc.sendMessage(m.chat, { image: anu, caption: `*PHOTO OXY ${command}*` , quoted: m, contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
break
//---END HERE------\\
//CREATED BY DRIPS
//----EPHOTO-------\\
case '3d-wood':
case 'angels-wings':
case 'snake-text':
case 'redhot-metal2':
case 'sandsummer-beach':
case 'snow-text':
case 'water-3d':
case 'water-effect':
case 'wet-glass':
case 'status-mood2':
case 'summerysand': {
if (!text) throw `Example : ${prefix + command} nama anime`
anu = await getBuffer(`https://violetics.pw/api/ephoto360/${command}?apikey=beta&text=${text}`)
ZimBotInc.sendMessage(m.chat, { image: anu, caption: `*EPHOTO ${command}*` , quoted: m, contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ᴠ5",
body:"SUBSCRIBE DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync(`./drips.jpg`) ,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo` }}}, {quoted: m})
}
break
case 'once': case 'toonce': { //by DRIPS
if (!quoted) throw 'Reply Image'
if (/image/.test(mime)) {
anu = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
ZimBotInc.sendMessage(from, {image: {url: anu},viewOnce : true},{quoted: m })
} else if (/video/.test(mime)) {
anu = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
ZimBotInc.sendMessage(m.chat, {video: {url: anu},viewOnce : true},{quoted: m })
}
}
break
case 'ary':
case 'arygameplays': {
replay(mess.wait)
let buttons = [
{buttonId: `ary`, buttonText: {displayText: 'NEXT'}, type: 1}
]
let anu = await fetchJson(`https://wallebotapi.mitomods.com/docs/random/arygameplays?apikey=Donitas`)
let buttonMessage = {
image: { url: `${anu.result}` },
caption: `Arygameplays`,
footer: global.botnma,
buttons: buttons,
headerType: 4
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}
break
break
case 'emojiapple':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "0")
break
case 'emojigoogle':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "1")
break
case 'emojisamsung':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "2")
break
case 'emojimicrosoft':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "3")
break
case 'emojiwhatsapp':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "4")
break
case 'emojitwitter':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "5")
break
case 'emojifecabook':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "6")
break
case 'emojiskype':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "7")
break
case 'emojijoy':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "8")
break
case 'emojimoji':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "9")
case 'emojipedia':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "10")
break
case 'emojilg':
if (!q) return reply("*Insert emoji, maximum 1 emoji, example?*" + ` ${prefix + command} 😀`)
reply("[❗] *BEING PROCESSED*")
emote(q, "11")
break
case 'news':
// and we need jsdom and Readability to parse the article HTML
let urltt = 'https://newsapi.org/v2/everything?' +
`q=${text}&` +
'sortBy=publishedAt&' +
'apiKey=306032cefd134ab38660d7db51dd18d1';
// First lets get some search data from News API
// Build the URL we are going request. This will get articles related to Apple and sort them newest first
// Make the request with axios' get() function
axios.get(urltt).then(function(r1) {
// At this point we will have some search results from the API. Take the first search result...
let firstResult = r1.data.articles[0];
// ...and download the HTML for it, again with axios
axios.get(firstResult.url).then(function(r2) {
// We now have the article HTML, but before we can use Readability to locate the article content we need jsdom to convert it into a DOM object
let dom = new JSDOM(r2.data, {
url: firstResult.url
});
// now pass the DOM document into readability to parse
let article = new Readability(dom.window.document).parse();
// Done! The article content is in the textContent property
console.log(color(article.textContent));
reply(article.textContent)
})
})
break
/* case 'drips':
// First lets get some search data from News API
// Build the URL we are going request. This will get articles related to Apple and sort them newest first
let urlttt = 'https://newsapi.org/v2/top-headlines?' +
`country=za&apiKey=` +
'306032cefd134ab38660d7db51dd18d1';
// Make the request with axios' get() function
axios.get(urlttt).then(function(r1) {
// At this point we will have some search results from the API. Take the first search result...
let firstResult = r1.data.articles[0];
// ...and download the HTML for it, again with axios
axios.get(firstResult.url).then(function(r2) {
// We now have the article HTML, but before we can use Readability to locate the article content we need jsdom to convert it into a DOM object
let dom = new JSDOM(r2.data, {
url: firstResult.url
});
// now pass the DOM document into readability to parse
let article = new Readability(dom.window.document).parse();
// Done! The article content is in the textContent property
console.log(color(article.textContent));
reply(article.textContent)
})
})
break
*/
case 'topheadlines':
// First lets get some search data from News API
// Build the URL we are going request. This will get articles related to Apple and sort them newest first
let dhongi = 'https://newsapi.org/v2/top-headlines/sources?bbc-news&apiKey=' +
'306032cefd134ab38660d7db51dd18d1';
// Make the request with axios' get() function
axios.get(dhongi).then(function(r1) {
// At this point we will have some search results from the API. Take the first search result...
let firstResult = r1.data.articles[0];
// ...and download the HTML for it, again with axios
axios.get(firstResult.url).then(function(r2) {
// We now have the article HTML, but before we can use Readability to locate the article content we need jsdom to convert it into a DOM object
let dom = new JSDOM(r2.data, {
url: firstResult.url
});
// now pass the DOM document into readability to parse
let article = new Readability(dom.window.document).parse();
// Done! The article content is in the textContent property
console.log(color(article.textContent));
reply(article.textContent)
})
})
break
case 'googlenews':
const request = require('request');
const options = {
method: 'GET',
url: 'https://google-news1.p.rapidapi.com/search',
qs: {
q: `${text}`,
country: 'ZW',
lang: 'en',
source: 'iharare.com',
limit: '100',
when: '30d'
},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'google-news1.p.rapidapi.com',
useQueryString: true
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
});
break
case 'hackernews':
const drips = {
method: 'GET',
url: 'https://community-hacker-news-v1.p.rapidapi.com/topstories.json',
qs: {print: 'pretty'},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'community-hacker-news-v1.p.rapidapi.com',
useQueryString: true
}
};
let dhuripi = require('request')
dhuripi(drips, function (error, response, body) {
if (error) throw new Error(error);
reply(body)
console.log(body);
});
break
case 'gnews':
reply(mess.wait)
const dripbabe = {
method: 'GET',
url: 'https://google-news.p.rapidapi.com/v1/search',//By drips
qs: {q: `${text}`, country: 'ZW', lang: 'en'}, //put your country on string: country://
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',// 3 request per hour
'X-RapidAPI-Host': 'google-news.p.rapidapi.com',// if you with more request please visit https://rapidapi.com/newscatcher-api-newscatcher-api-default/api/google-news/pricing
useQueryString: true
}
};
let gnews = require('request')
gnews(dripbabe, function (error, response, body) {//removing credits is not an option
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'news2':
reply(mess.wait)
const luckysure = {
method: 'GET',
url: 'https://free-news.p.rapidapi.com/v1/search',//By DRIPS
qs: {q: `${text}`, lang: 'en'},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',// 1 request per second (unlimited)
'X-RapidAPI-Host': 'free-news.p.rapidapi.com',//removing credtis is not an option
useQueryString: true
}
};
let stanto = require('request')
stanto(luckysure, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'playstore': case 'apk':
reply(mess.wait)
if(!q) return reply('what are you looking for?')
let play = await hx.playstore(q)
let storup = ''
for (let i of play){
storup += `\n*「 *PLAY STORE* 」*\n
- *Name* : ${i.name}
- *Link* : ${i.link}\n
- *Dev* : ${i.developer}
- *Dev Link* : ${i.link_dev}\n❉─────────────────────❉`
}
reply(storup)
break
case 'igsearch':
const dripsig = {
method: 'GET',
url: 'https://instagram-data1.p.rapidapi.com/user/search',//By Drips
qs: {keyword: `${text}`},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',// 25 request per month if you unlimited requests buy api here visit https://rapidapi.com/logicbuilder/api/instagram-data1/pricing
'X-RapidAPI-Host': 'instagram-data1.p.rapidapi.com',//removing credits is not an option
useQueryString: true
}
};
let magwettta = require('request')
magwettta(dripsig, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'apkdl': case 'apkmod': case 'apkd': {
if (!text) return m.reply(`Use${prefix + command} vpn`)
let noh = require('./lib/myfunc2')
noh.rexdl(`${text}`).then(async (data) => {
let sections = []
for (let i of data) {
const list = {title: `${i.judul}`,
rows: [
{
title: `${i.judul}`,
rowId: `${prefix}donlod ${i.link}`,
description: `CATEGORY: ${i.kategori}\nPUBLISH: ${i.upload_date}\nINFORMATION: ${i.deskripsi}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: `${ucapannya2} ${pushname} *Search Results From ${text} Click the button below to choose*`,
footer: `© ᴢɪᴍ ʙᴏᴛ ɪɴᴄ`,
title: "*▊▊▊APK DOWNLOAD▊▊▊*",
buttonText: "CLICK HERE",
sections
}, { quoted : m })
}).catch((err) => {
reply(`*${text} Not found*`)
})
}
break
case 'donlod': {
let dhupi = require('./lib/index.js')
if (!text) return m.reply(`Use${prefix + command} whatsapp`)
if (!isUrl(args[0]) && !args[0].includes('https://rexdl.com/'))
dhupi.rexdldown(`${text}`).then(async (anu) => {
if (anu[0].size.split('MB')[0] >= 150) return reply('*File Over Limit* '+util.format(anu))
for (let i of anu) {
linkye = `*▊▊▊APK DOWNLOAD▊▊▊*\n\n*TITLE:* ${i.title}\n*UPDATE:* ${i.up}\n*VERSION:* ${i.vers}\n*FILESIZE:* ${i.size}\n*URL:* \n*DESCRIPTION:* ${i.desc}\n\n*ᴢɪᴍ ʙᴏᴛ ɪɴᴄ*`
ZimBotInc.sendMessage(m.chat, { image: await getBuffer(i.thumb), jpegThumbnail: await getBuffer(i.thumb), caption: `${linkye}` }, { quoted: m })
ZimBotInc.sendMessage(m.chat, {document: await getBuffer(i.link), mimetype: `application/vnd.android.package-archive`, fileName: `${i.title}`}, {quoted:m})
}
}).catch((err) => {
reply(`*Failed When Downloading Media and Sending Files*`)
})
}
break
// https://hardianto.xyz/api/beta/hacker2?apikey=hardianto&pp=https://i.ibb.co/1s8T3sY/48f7ce63c7aa.jpg
case 'ripmaker':
if (!text) throw '*Enter a Link Query! Example: https://i.imgur.com/rANDwCP.jpeg*'
var dripa = `https://hardianto.xyz/api/rip?image=${text}&apikey=hardianto`
dri = await getBuffer(dripa)
ZimBotInc.sendMessage(m.chat, { image: dri,caption:'ZIM-BOT-V4' }, { quoted: m})
break// https://hardianto.xyz/api/beta/hacker2?apikey=hardianto&pp=https://i.ibb.co/1s8T3sY/48f7ce63c7aa.jpg
case 'hackermaker':
if (!text) throw '*Enter a Link Query! Example: https://i.imgur.com/rANDwCP.jpeg*'
var dripa = `https://hardianto.xyz/api/beta/hacker2?apikey=hardianto&pp=${text}`
dri = await getBuffer(dripa)
ZimBotInc.sendMessage(m.chat, { image: dri,caption:'ZIM-BOT-V4' }, { quoted: m})
break //https://hardianto.xyz/api/maker/carbon?code=const%20anto%20=%20require(%27pahala%27)&color=cyan&apikey=hardianto
case 'codecolor':
if (!text) throw '*Enter a text*'
var dripa = `https://hardianto.xyz/api/maker/carbon?code=${text}&color=cyan&apikey=hardianto`
dri = await getBuffer(dripa)
ZimBotInc.sendMessage(m.chat, { image: dri,caption:'ZIM-BOT-V4' }, { quoted: m})
break
case 'ipdomain':
reply(mess.wait)
const driphacker = {
method: 'GET',
url: 'https://find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com/iplocation',
qs: {ip: `${text}`, apikey: '873dbe322aea47f89dcf729dcc8f60e8'},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com',
useQueryString: true
}
};
let mhamha = require('request')
mhamha(driphacker, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'ip':
reply(mess.wait)
const dripsba = {
method: 'GET',
url: 'https://find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com/iplocation',
qs: {apikey: '873dbe322aea47f89dcf729dcc8f60e8'},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com',
useQueryString: true
}
};
let bhudhi = require('request')
bhudhi(dripsba, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'checknumber':
reply(mess.wait)
const dripska = {
method: 'GET',
url: 'https://phonenumbervalidatefree.p.rapidapi.com/ts_PhoneNumberValidateTest.jsp',
qs: {number: `${text}`},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'phonenumbervalidatefree.p.rapidapi.com',
useQueryString: true
}
};
let dhidhi = require('request')
dhidhi(dripska, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'veriphone':
reply(mess.wait)
const dripdrop = {
method: 'GET',
url: 'https://veriphone.p.rapidapi.com/verify',
qs: {phone: `${text}`},
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'veriphone.p.rapidapi.com',
useQueryString: true
}
};
let mhati = require('request')
mhati(dripdrop, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'cry':case 'kill':case 'hug':case 'pat':case 'lick':case 'kiss':case 'bite':case 'yeet':case 'neko':case 'bully':case 'bonk':case 'wink':case 'poke':case 'nom':case 'slap':case 'smile':case 'wave':case 'awoo':case 'blush':case 'smug':case 'glomp':case 'happy':case 'dance':case 'cringe':case 'cuddle':case 'highfive':case 'shinobu':case 'megumin':case 'handhold':
reply(mess.wait)
axios.get(`https://api.waifu.pics/sfw/${command}`)
.then(({data}) => {
ZimBotInc.sendImageAsSticker(m.chat, data.url, m, { packname: global.packname, author: global.author })
})
break
case 'whois':
reply(mess.wai)
var ip = ''; // Leave blank to lookup current IP address
var XMLHttp = new XMLHttpRequest();
XMLHttp.onreadystatechange = function() {
if(this.readyState == 4 && this.status == 200) {
var ipwhois = JSON.parse(this.responseText);
console.log(ipwhois.country + ' ' + ipwhois.flag.emoji); // Output: United States 🇺🇸
}
};
XMLHttp.open('GET', 'https://ipwho.is/' + ip, true);
XMLHttp.send();
break
// Upload status
case 'upsw': case 'uploadstatus': {
if (!isCreator) return reply(global.owner)
ZimBotInc.sendMessage("status@broadcast", { text: q })
reply("*Uploaded Status*")
}
break
//----OTHERS---\\
case 'weather':
if (!args[0]) throw " please provide place or location name"
try {
const response = axios.get(
`https://api.openweathermap.org/data/2.5/weather?q=${args}&units=metric&appid=060a6bcfa19809c2cd4d97a212b19273`
)
const res = await response
const name = res.data.name
const Country = res.data.sys.country
const Weather = res.data.weather[0].description
const Temperature = res.data.main.temp + "°C"
const Minimum_Temperature = res.data.main.temp_min + "°C"
const Maximum_Temperature = res.data.main.temp_max + "°C"
const Humidity = res.data.main.humidity + "%"
const Wind = res.data.wind.speed + "km/h"
const wea = `*📍PLACE:* ${name}\n*COUNTRY:* ${Country}\n*WEATHER:* ${Weather}\n*TEMPERATURE:* ${Temperature}\nMINIMUM TEMPERATURE: ${Minimum_Temperature}\n*📛MAX TEMPERATURE:* ${Maximum_Temperature}\n*HUMIDITY:* ${Humidity}\n*WIND:* ${Wind}
`
reply(wea)
} catch (e) {
return "Error location not found!!!"
}
break
case 'wiki':
const { wikipedia } = require('@bochilteam/scraper')
if (!text) throw `Exapmle: ${command} Minecraft`
let jsonp = await wikipedia(text)
reply(`
🔎${r} Ressult from: *${text}*
🖼️${r} Image: ${jsonp.img}
📖${r} Articles:
${jsonp.articles}
`.trim())
break
case 'ytcoment':
if (!text) throw 'No Text'
ZimBotInc.sendMessage(m.chat, ('https://some-random-api.ml', '/canvas/youtube-comment', {
avatar: await ZimBotInc.profilePictureUrl(m.sender, 'image').catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'),
comment: text,
username: ZimBotInc.getName(m.sender)
}), 'error.png', '*Nih Kak*', m)
break
// Send image or video from url
case 'sendimage':
ZimBotInc.sendMessage(m.chat, { image: { url: q }, fileLength: "5000000000"}, { m })
break
case 'sendvideo':
ZimBotInc.sendMessage(m.chat, { video: { url: q }, fileLength: "5000000000" }, { m })
break
case 'todocument': {
if (/document/.test(mime)) throw `Kirim/Reply Video/Audio Yang Ingin Dijadikan MP3 Dengan Caption ${prefix + command}`
if (!/video/.test(mime) && !/audio/.test(mime)) throw `Kirim/Reply Video/Audio Yang Ingin Dijadikan MP3 Dengan Caption ${prefix + command}`
if (!quoted) throw `Kirim/Reply Video/Audio Yang Ingin Dijadikan MP3 Dengan Caption ${prefix + command}`
m.reply(mess.wait)
let media = await quoted.download()
let { toAudio } = require('./lib/converter')
let audio = await toAudio(media, 'mp4')
ZimBotInc.sendMessage(m.chat, {document: audio, mimetype: 'audio/mpeg', fileName: `Convert By ${ZimBotInc.user.name}.mp3`}, { quoted : m })
}
break
case 'searchgroups':
if (!q) return reply(`Example: ${prefix}searchgroups hacker`)
mel.linkwa(q)
.then(result => {
let res = '❰ *WHATSAPP GROUP LINKS* ❱\n\n'
for (let i of result) {
res += `*NAME*: *${i.nama}\n*Link*: ${i.link}\n\n`
}
reply(res)
});
break
case 'wallpaper': {
if (!text) throw '*give me text to search👀*'
let { wallpaper } = require('./lib/scraper')
anu = await wallpaper(text)
result = anu[Math.floor(Math.random() * anu.length)]
let buttons = [
{buttonId: `wallpaper ${text}`, buttonText: {displayText: 'NEXT'}, type: 1}
]
let buttonMessage = {
image: { url: result.image[0] },
caption: `🔮𝗧𝗜𝗧𝗟𝗘 : ${result.title}\n🔮𝗖𝗔𝗧𝗘𝗚𝗢𝗥𝗬 : ${result.type}\n🔮𝗗𝗘𝗧𝗔𝗜𝗟 : ${result.source}\n🔮𝗠𝗘𝗗𝗜𝗔 𝗨𝗥𝗟 : ${result.image[2] || result.image[1] || result.image[0]}`,
footer: ZimBotInc.user.name,
buttons: buttons,
headerType: 4
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}
break
case 'wikimedia': {
if (!text) throw '*give me text so search👀*'
let { wikimedia } = require('./lib/scraper')
anu = await wikimedia(text)
result = anu[Math.floor(Math.random() * anu.length)]
let buttons = [
{buttonId: `wikimedia ${text}`, buttonText: {displayText: 'Next Image'}, type: 1}
]
let buttonMessage = {
image: { url: result.image },
caption: `🔮 𝗧𝗜𝗧𝗟𝗘 : ${result.title}\n🔮 𝗦𝗢𝗨𝗥𝗖𝗘 : ${result.source}\n🔮 𝗠𝗘𝗗𝗜𝗔 𝗨𝗥𝗟 : ${result.image}`,
footer: ZimBotInc.user.name,
buttons: buttons,
headerType: 4
}
ZimBotInc.sendMessage(m.chat, buttonMessage, { quoted: m })
}
break
case 'bass': case 'blown': case 'deep': case 'earrape': case 'fast': case 'fat': case 'nightcore': case 'reverse': case 'robot': case 'slow': case 'smooth': case 'squirrel':
try {
let set
if (/bass/.test(command)) set = '-af equalizer=f=54:width_type=o:width=2:g=20'
if (/blown/.test(command)) set = '-af acrusher=.1:1:64:0:log'
if (/deep/.test(command)) set = '-af atempo=4/4,asetrate=44500*2/3'
if (/earrape/.test(command)) set = '-af volume=12'
if (/fast/.test(command)) set = '-filter:a "atempo=1.63,asetrate=44100"'
if (/fat/.test(command)) set = '-filter:a "atempo=1.6,asetrate=22100"'
if (/nightcore/.test(command)) set = '-filter:a atempo=1.06,asetrate=44100*1.25'
if (/reverse/.test(command)) set = '-filter_complex "areverse"'
if (/robot/.test(command)) set = '-filter_complex "afftfilt=real=\'hypot(re,im)*sin(0)\':imag=\'hypot(re,im)*cos(0)\':win_size=512:overlap=0.75"'
if (/slow/.test(command)) set = '-filter:a "atempo=0.7,asetrate=44100"'
if (/smooth/.test(command)) set = '-filter:v "minterpolate=\'mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120\'"'
if (/squirrel/.test(command)) set = '-filter:a "atempo=0.5,asetrate=65100"'
if (/audio/.test(mime)) {
replay(mess.wait)
let media = await ZimBotInc.downloadAndSaveMediaMessage(quoted)
let ran = getRandom('.mp3')
exec(`ffmpeg -i ${media} ${set} ${ran}`, (err, stderr, stdout) => {
fs.unlinkSync(media)
if (err) return reply(err)
let buff = fs.readFileSync(ran)
ZimBotInc.sendMessage(m.chat, { audio: buff, mimetype: 'audio/mpeg' }, { quoted : m })
fs.unlinkSync(ran)
})
} else reply(`Reply to the audio you want to change with caption *${prefix + command}*`)
} catch (e) {
reply(e)
}
break
case 'setcmd': {
if (!m.quoted) throw 'Reply Message!'
if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing'
if (!text) throw `where is the command`
let hash = m.quoted.fileSha256.toString('base64')
if (global.db.sticker[hash] && global.db.sticker[hash].locked) throw 'You have no permission to change this sticker command'
global.db.sticker[hash] = {
text,
mentionedJid: m.mentionedJid,
creator: m.sender,
at: + new Date,
locked: false,
}
reply(`Done!`)
}
break
case 'delcmd': {
let hash = m.quoted.fileSha256.toString('base64')
if (!hash) throw `No hashes`
if (global.db.sticker[hash] && global.db.sticker[hash].locked) throw 'You have no permission to delete this sticker command'
delete global.db.sticker[hash]
reply(`Done!`)
}
break
case 'listcmd': {
let teks = `
*Hash List*
Info: *bold* hash is locked
${Object.entries(global.db.sticker).map(([key, value], index) => `${index + 1}. ${value.locked ? `*${key}*` : key} : ${value.text}`).join('\n')}
`.trim()
ZimBotInc.sendText(m.chat, teks, m, { mentions: Object.values(global.db.sticker).map(x => x.mentionedJid).reduce((a,b) => [...a, ...b], []) })
}
break
case 'lockcmd': {
if (!isCreator) throw global.owner
if (!m.quoted) throw 'Reply Message!'
if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing'
let hash = m.quoted.fileSha256.toString('base64')
if (!(hash in global.db.sticker)) throw 'Hash not found in database'
global.db.sticker[hash].locked = !/^un/i.test(command)
reply('Done!')
}
break
case 'addmsg': {
if (!m.quoted) throw 'Reply Message You Want To Save In Database'
if (!text) throw `Example : ${prefix + command} message name`
let msgs = global.db.database
if (text.toLowerCase() in msgs) throw `'${text}' telah terdaftar di list pesan`
msgs[text.toLowerCase()] = quoted.fakeObj
reply(`Successfully added message in message list as '${text}'
Access with ${prefix}getmsg ${text}
View list of message with ${prefix}listmsg`)
}
break
case 'getmsg': {
if (!text) throw `Example : ${prefix + command} msg name\n\nView message list with ${prefix}listmsg`
let msgs = global.db.database
if (!(text.toLowerCase() in msgs)) throw `'${text}' not registered in message list`
ZimBotInc.copyNForward(m.chat, msgs[text.toLowerCase()], true)
}
break
case 'listmsg': {
let msgs = JSON.parse(fs.readFileSync('./src/database.json'))
let seplit = Object.entries(global.db.database).map(([nama, isi]) => { return { nama, ...isi } })
let teks = '❰ *LIST DATABASE* ❱\n\n'
for (let i of seplit) {
teks += `🧸*𝗡𝗔𝗠𝗘 :* ${i.nama}\n🧸*𝗧𝗬𝗣𝗘 :* ${getContentType(i.message).replace(/Message/i, '')}\n────────────────────────\n\n`
}
reply(teks)
}
break
case 'delmsg': case 'deletemsg': {
let msgs = global.db.database
if (!(text.toLowerCase() in msgs)) return reply(`'${text}' not listed in the message list`)
delete msgs[text.toLowerCase()]
reply(`Successfully deleted '${text}' from the message list`)
}
break
case 'public': {
if (!isCreator) throw global.owner
ZimBotInc.public = true
reply('𝗭𝗶𝗺 𝗯𝗼𝘁 𝗻𝗼𝘄 𝘄𝗼𝗿𝗸𝗶𝗻𝗴 𝗮𝘀 𝗽𝘂𝗯𝗹𝗶𝗰')
}// https://hardianto.xyz/api/rip?image=https://i.imgur.com/rANDwCP.jpeg&apikey=hardianto
break
case 'attp': {
reply(mess.wait)
if (!text) throw `*Example : ${prefix + command} drips hi*`
await ZimBotInc.sendMedia(m.chat, `https://hardianto.xyz/api/maker/attp?text=${text}&apikey=hardianto`,'ZIM', 'BOT M D', m, {asSticker: true}).catch((err) => m.reply('*error while sending sticker*'))
}
break
/*case 'ripmaker':
reply(mess.wait)
try{
ripdri = await axios(`https://hardianto.xyz/api/rip?image=https://i.imgur.com/rANDwCP.jpeg&apikey=hardianto`)
stalloni = await getBuffer(ripdri)
ZimBotInc.sendMessage(from, {image:stalloni},{quoted:m})
} catch (e) {error("Error")}
reply(mess.wait)*/
case 'self': {
if (!isCreator) throw global.owner
ZimBotInc.public = false
reply('𝗭𝗶𝗺 𝗯𝗼𝘁 𝗻𝗼𝘄 𝘄𝗼𝗿𝗸𝗶𝗻𝗴 𝗮𝘀 𝗽𝗿𝗶𝘃𝗮𝘁𝗲')
}
break
case 'ping': case 'botstatus': case 'statusbot': {
const used = process.memoryUsage()
const cpus = os.cpus().map(cpu => {
cpu.total = Object.keys(cpu.times).reduce((last, type) => last + cpu.times[type], 0)
return cpu
})
const cpu = cpus.reduce((last, cpu, _, { length }) => {
last.total += cpu.total
last.speed += cpu.speed / length
last.times.user += cpu.times.user
last.times.nice += cpu.times.nice
last.times.sys += cpu.times.sys
last.times.idle += cpu.times.idle
last.times.irq += cpu.times.irq
return last
}, {
speed: 0,
total: 0,
times: {
user: 0,
nice: 0,
sys: 0,
idle: 0,
irq: 0
}
})
let timestamp = speed()
let latensi = speed() - timestamp
neww = performance.now()
oldd = performance.now()
respon = `
*RESPONSE SPEED* ${latensi.toFixed(4)} *SECONDS \n ${oldd - neww} _miliseconds_\n\n*RUNTIME* : ${runtime(process.uptime())}
*OCEAN SERVERS*
*RAM:* ${formatp(os.totalmem() - os.freemem())} / ${formatp(os.totalmem())}
*NODEJS SERVERS*
${Object.keys(used).map((key, _, arr) => `${key.padEnd(Math.max(...arr.map(v=>v.length)),' ')}: ${formatp(used[key])}`).join('\n')}
${cpus[0] ? `_Total CPU Usage_
${cpus[0].model.trim()} (${cpu.speed} MHZ)\n${Object.keys(cpu.times).map(type => `- *${(type + '*').padEnd(6)}: ${(100 * cpu.times[type] / cpu.total).toFixed(2)}%`).join('\n')}
_CPU Core(s) Usage (${cpus.length} Core CPU)_
${cpus.map((cpu, i) => `${i + 1}. ${cpu.model.trim()} (${cpu.speed} MHZ)\n${Object.keys(cpu.times).map(type => `- *${(type + '*').padEnd(6)}: ${(100 * cpu.times[type] / cpu.total).toFixed(2)}%`).join('\n')}`).join('\n\n')}` : ''}
`.trim()
reply(respon)
}
break
case 'owner': case 'creator': {
ZimBotInc.sendContact(m.chat, global.pemilik, m)
const devsound = fs.readFileSync('./Zimbot/bot.mp3')
ZimBotInc.sendMessage(m.chat, { audio: devsound, mimetype: 'audio/mp4', ptt: true, quoted: mudratunha})
}
break
case 'beetunha':
const hahahe = {
method: 'GET',
url: 'https://anime-quotes1.p.rapidapi.com/api/available/anime',
headers: {
'X-RapidAPI-Key': '837661b454msh274b6753ca80823p11c653jsn973bb2a55a34',
'X-RapidAPI-Host': 'anime-quotes1.p.rapidapi.com'
}
};
let requestt = require('request')
requestt(hahahe, function (error, response, body) {
if (error) throw new Error(error);
reply(body);
console.log(body);
});
break
case 'tes': case 'test': case 'alive': case 'bot': case 'robot': case 'zimbot': case 'drips': case 'menu': {
ram9000 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
timestampe = speed();
latensie = speed() - timestampe
anu = `
*ᴜᴘᴛɪᴍᴇ :* ${runtime(process.uptime())}
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram9000}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
└───────────●
`
const aliveer = fs.readFileSync('./Zimbot/alive.mp3')
ZimBotInc.sendMessage(m.chat, { audio: aliveer, mimetype: 'audio/mp4', ptt: true, quoted: mudratunha})
let buttoni = [
{buttonId: `sc`, buttonText: {displayText: 'SOURCE CODE'}, type: 1},
{buttonId: `owner`, buttonText: {displayText: 'OWNER'}, type: 1},
{buttonId: `allmenu`, buttonText: {displayText: '©MENU'}, type: 1},
]
let buttonMessage = {
document: fs.readFileSync('./lib/tes.xlsx'),
mimetype: dripsee,
jpegThumbnail: fs.readFileSync('./drips.jpg'),
fileName: `ᴢɪᴍ ʙᴏᴛ ɪɴᴄ`,
fileLength: 99999999999999,
caption: anu,
footer: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
buttons: buttoni,
headerType: 4,
contextInfo: { externalAdReply:{
title:"ᴢɪᴍ ʙᴏᴛ ɪɴᴄ",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: fs.readFileSync('./drips.jpg'),
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo`,
}}
}
ZimBotInc.sendMessage(m.chat, buttonMessage)
}
break
case 'bug': case 'report': {
if(!text) throw `Enter The Bug Example\n\n${command} Menu Error `
ZimBotInc.sendMessage(`447441437150@s.whatsapp.net`, {text: `*Bug Report From:* wa.me/${m.sender.split("@")[0]}
Report Message: ${text}` })
reply(`*Successfully reported to the owner\n\nPlease make sure the bug is valid, if you play with this, use this feature again and again for no reason, you will be banned for using zim bot*`)
}
break
case 'listmenu':
let sections = []
let listmenu = [`allmenu`,`animemenu`,`groupmenu`,`toolmenu`,`downloadmenu`,`searchmenu`,`photofiltermenu`,`textpromenu`,`photooxymenu`,`ownermenu`,`ephotomenu`,`convertmenu`,`databasemenu`,`rpgmenu`,`donasi`]
let listmenuu = [`ALL MENU`,`ANIME MENU`,`GROUP MENU`,`TOOL MENU`,`DOWNLOAD MENU`,`SEARCH MENU`,`PHOTOFILTER MENU`,`TEXTPRO MENU`,`PHOTOOXY MENU`,`OWNER MENU`,`EPHOTO MENU`,`CONVERT MENU`,`DATABASE MENU`,`RPG MENU`,`DONATE`]
let nombor = 1
let startnum = 0
for (let x of listmenu) {
const list = {title: 'MENU NUMBER ' + nombor++, //by drips
rows: [
{
title: `${listmenuu[startnum++]}`,
rowId: `${prefix}${x}`
},
]
}
sections.push(list)
}
const sendm = ZimBotInc.sendMessage(
m.chat,
{
text: `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 *_◉ᴜsᴇʀ ɪɴғᴏ◉_* 〕
┊ *NAME:* ${pushname}
┊ ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊ *RANK:* ${role}
┊ *STATUS:* ${elit}
┊ *MONEY:* $${(getBalance(sender, balance))}
┊ *XP:* ${getLevelingXp(sender)}/${reqXp}
┊ *LEVEL:* ${getLevelingLevel(sender)}
┊ *MONEY:* $${(getBalance(sender, balance))}
┊ *GOLD:* ${getEmas(sender)}
┊ *IRON:* ${getBesi(sender)}
┊ *FISH:* ${getFish(sender)}
┊ *DIAMOND:* ${getDm(sender)}
┊ *ᴠᴇʀꜱɪᴏɴ:* ${os.version()}
┊ *ᴛᴏᴛᴀʟ ᴜsᴇʀs:* ${Object.keys(global.db.users).length}
└───────────●
`,
footer: `ᴢɪᴍ ʙᴏᴛ ɪɴᴄ`,
title: `*LIST MENU*`,
jpegThumbnail: fs.readFileSync('./drips.jpg'),
buttonText: "CLICK HERE",
sections
}, { quoted : m })
break
case 'allmenu': case 'zimbotmenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
let datane = fs.readFileSync('./lib/random.js')
jsonData = JSON.parse(datane)
randIndex = Math.floor(Math.random() * jsonData.length)
randKey = jsonData[randIndex];
buffer = await getBuffer(randKey.result)
const { device_manufacturer } = require('os')
ram2 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
timestampe = speed();
latensie = speed() - timestampe
anu = `
*ᴜᴘᴛɪᴍᴇ :* ${runtime(process.uptime())}
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram2}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
└───────────●
┌───〔 *_◉ᴍᴇɴᴜ◉_* 〕
┊🪨downloadmenu
┊🪨groupmenu
┊🪨animemenu
┊🪨searchmenu
┊🪨ownermenu
┊🪨databasemenu
┊🪨textpromenu
┊🪨ephotomenu
┊🪨toolsmenu
┊🪨convertmenu
└───────────●
┌───〔 *_ᴛᴏᴏʟᴍᴇɴᴜ_* 〕
┊🪨ip ->-
┊🪨ipdomain -domain name-
┊🪨codecolor -text-
┊🪨hackermaker -pic url-
┊🪨checknumber -number-
┊🪨veriphone -number-
┊🪨weather -place-
┊🪨attp -text-
┊🪨ssweb-hp -url-
┊🪨shortlink -url-
┊🪨ssweb-pc -url-
┊🪨shortlinkcuttly -url-
┊🪨shortlinkisgd -url-
┊🪨brainly -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉ᴏᴡɴᴇʀᴍᴇɴᴜ◉_* 〕
┊🪨chatbot on/off
┊🪨setmenu -option-
┊🪨checkupdate
┊🪨updatenow
┊🪨bc -text-
┊🪨bcall -text-
┊🪨bctext -text-
┊🪨bcvideo -media-
┊🪨bcaudio -media-
┊🪨bcimage -media-
┊🪨bcloc -text-
┊🪨bcgc -text-
┊🪨lockcmd
┊🪨setstatus -text-
┊🪨setppbot -owner-
┊🪨block -owner-
┊🪨unblock -owner-
┊🪨join -owner-
┊🪨leave -owner-
┊🪨chat -owner-
┊🪨public
┊🪨self
┊🪨grouponly
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉ɢʀᴏᴜᴘᴍᴇɴᴜ◉_* 〕
┊🪨add -admin-
┊🪨kick -admin-
┊🪨welcome on/off -admin-
┊🪨listpc
┊🪨listgc
┊🪨groupinfo -admin-
┊🪨antivn -admin-
┊🪨antiphoto -admin-
┊🪨antisticker -admin-
┊🪨antivideo -admin-
┊🪨antilinkall -admin-
┊🪨antiinstagram -admin-
┊🪨antitelegram -admin-
┊🪨antilink -admin-
┊🪨antiyt -admin-
┊🪨antibule -admin-
┊🪨antitiktok -admin-
┊🪨antifacebook -admin-
┊🪨antivirus -admin-
┊🪨antibadword -admin-
┊🪨antiwame -admin-
┊🪨group -options-
┊🪨mute
┊🪨groupinfo
┊🪨truth
┊🪨dare
┊🪨slot
┊🪨math
┊🪨vote
┊🪨devote
┊🪨cekvote
┊🪨deletevote
┊🪨upvote
┊🪨setsubject -admin-
┊🪨setdesc -admin-
┊🪨setppgroup -admin-
┊🪨tagall -admin-
┊🪨hidetag -admin-
┊🪨ephemeral
┊🪨demote -admin-
┊🪨promote -admin-
┊🪨editinfo -admin-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉ᴛᴇxᴛᴘʀᴏᴍᴇɴᴜ◉_* 〕
┊🪨candy -text-
┊🪨christmas -text-
┊🪨3dchristmas -text-
┊🪨sparklechristmas -text-
┊🪨deepsea -text-
┊🪨scifi -text-
┊🪨rainbow2 -text-
┊🪨waterpipe -text-
┊🪨spooky -text-
┊🪨pencil -text-
┊🪨circuit -text-
┊🪨discovery -text-
┊🪨metalic -text-
┊🪨fiction -text-
┊🪨demon -text-
┊🪨transformer -text-
┊🪨berry -text-
┊🪨thunder -text-
┊🪨3dstone2 -text-
┊🪨neonlight -text-
┊🪨glitch -text-
┊🪨harrypotter -text-
┊🪨brokenglass -text-
┊🪨papercut -text-
┊🪨watercolor -text-
┊🪨multicolor -text-
┊🪨neondevil -text-
┊🪨underwater -text-
┊🪨graffitibike -text-
┊🪨snow -text-
┊🪨cloud -text-
┊🪨honey -text-
┊🪨ice -text-
┊🪨fruitjuice -text-
┊🪨biscuit -text-
┊🪨wood -text-
┊🪨chocolate -text-
┊🪨strawberry -text-
┊🪨matrix -text-
┊🪨blood -text-
┊🪨dropwater -text-
┊🪨toxic -text-
┊🪨lava -text-
┊🪨rock -text-
┊🪨bloodglass -text-
┊🪨halloween -text-
┊🪨darkgold -text-
┊🪨joker -text-
┊🪨wicker -text-
┊🪨firework -text-
┊🪨skeleton -text-
┊🪨blackpink -text-
┊🪨sand -text-
┊🪨glue -text-
┊🪨1917 -text-
┊🪨leaves -text-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_ᴅᴏᴡɴʟᴏᴀᴅᴍᴇɴᴜ_* 〕
┊🪨ytmp3 -link-
┊🪨ytmp4 -link-
┊🪨audio -link-
┊🪨play -query-
┊🪨song -query-
┊🪨play2 -query-
┊🪨mediafire -link-
┊🪨fb -link-
┊🪨fb2 -link-
┊🪨ytsvideo -query-
┊🪨getmusic -query-
┊🪨getvideo -query-
┊🪨savefrom -query-
┊🪨pindl -query-
┊🪨joox -query-
┊🪨tiktok -link-
┊🪨tiktok2 -link-
┊🪨twitter -link-
┊🪨twitter2 -link-
┊🪨tiktok3 -link-
┊🪨tiktok4 -link-
┊🪨ig -link-
┊🪨instagramstory -link-
┊🪨instagramstory2 -link-
┊🪨igimage -link-
┊🪨instagramreal -link-
┊🪨soundcloud -link-
┊🪨ytshorts -link-
┊🪨unma -link-
┊🪨twitteraudio -link-
┊🪨ytsaudio -query-
┊🪨ytsvideo -query-
┊🪨yts2 -query-
┊🪨fbdl -link-
┊🪨fbvideo -link-
┊🪨get -link-
┊🪨tiktok5 -link-
┊🪨titktok3 -link-
┊🪨tiktokmp3 -link-
┊🪨ttmp3 -link-
┊🪨ig2 -link-
┊🪨ig3 -link-
┊🪨igimage -link-
┊🪨igtv -link-
┊🪨fbmp3 -link-
┊🪨ytdl -link-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_ᴘʜᴏᴛꜰɪʟᴛᴇʀᴍᴇɴᴜ_* 〕
┊🪨angie -photo-
┊🪨aria -photo-
┊🪨attic -photo-
┊🪨blackandwhite -photo-
┊🪨chorme1977 -photo-
┊🪨constrastbandw -photo-
┊🪨creamy -photo-
┊🪨duotone -photo-
┊🪨eva -photo-
┊🪨goldenhour -photo-
┊🪨hana -photo-
┊🪨lavander -photo-
┊🪨lemonande -photo-
┊🪨lightleak -photo-
┊🪨lisa -photo-
┊🪨lomo -photo-
┊🪨milk -photo-
┊🪨molly -photo-
┊🪨monochrome -photo-
┊🪨morning -photo-
┊🪨movie -photo-
┊🪨orton -photo-
┊🪨paretro -photo-
┊🪨perfectbandw -photo-
┊🪨plumy -photo-
┊🪨retrolga -photo-
┊🪨ruby -photo-
┊🪨sand -photo-
┊🪨sapphire -photo-
┊🪨sepia -photo-
┊🪨softsepia -photo-
┊🪨solarize -photo-
┊🪨sphinx -photo-
┊🪨venus -photo-
┊🪨japanese -photo-
┊🪨hdr -photo-
┊🪨viewfilter -photo-
┊🪨warmsunset -photo-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_ɴꜱꜰᴡᴍᴇɴᴜ_* 〕
┊🪨masturbation
┊🪨jahy
┊🪨hentai
┊🪨glasses
┊🪨gangbang
┊🪨foot
┊🪨femdom
┊🪨cum
┊🪨ero
┊🪨cuckhold
┊🪨blowjob
┊🪨bdsm
┊🪨ahegao
┊🪨ass
┊🪨orgy
┊🪨panties
┊🪨pussy
┊🪨yuri
┊🪨thighs
┊🪨tentacles
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_ᴀɴɪᴍᴇᴍᴇɴᴜ_* 〕
┊🪨cry
┊🪨kill
┊🪨hug
┊🪨pat
┊🪨lick
┊🪨kiss
┊🪨bite
┊🪨yeet
┊🪨neko
┊🪨bully
┊🪨bonk
┊🪨wink
┊🪨poke
┊🪨nom
┊🪨slap
┊🪨smile
┊🪨wave
┊🪨awoo
┊🪨blush
┊🪨smug
┊🪨glomp
┊🪨happy
┊🪨dance
┊🪨cringe
┊🪨cuddle
┊🪨highfive
┊🪨shinobu
┊🪨megumin
┊🪨handhold
┊🪨animeslap
┊🪨animepat
┊🪨animeneko
┊🪨animehug
┊🪨animekiss
┊🪨animewlp
┊🪨animespank
┊🪨shinobu2
┊🪨megumin2
┊🪨awoo2
┊🪨animewall2
┊🪨searchanime -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_ꜱᴇᴀʀᴄʜᴍᴇɴᴜ_* 〕
┊🪨lyrics -query-
┊🪨linkwa -query-
┊🪨apk -query-
┊🪨happymod -query-
┊🪨apkupro -query-
┊🪨google -query-
┊🪨wiki -query-
┊🪨ytsearch -query-
┊🪨recipe -query-
┊🪨playstore -query-
┊🪨wikimedia -query-
┊🪨news -query-
┊🪨news2 -query-
┊🪨animee -query-
┊🪨anime -query-
┊🪨amino -query-
┊🪨googleimage -query-
┊🪨apkdone -query-
┊🪨githubsearch -query->
┊🪨igsearch -username-
┊🪨googlenews -query-
┊🪨gnews -query-
┊🪨wallpaper -query-
┊🪨searchgroups -query-
┊🪨qoutesanime -query-
┊🪨gmsarena -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔*_◉ᴇᴘʜᴏᴛᴏ-ᴍᴇɴᴜ◉_*〕
┊🪨3d-wood
┊🪨angels-wings
┊🪨snake-text
┊🪨redhot-metal2
┊🪨sandsummer-beach
┊🪨snow-text
┊🪨water-3d
┊🪨water-effect
┊🪨wet-glass
┊🪨status-mood2
┊🪨summerysand
└───────────●
┌───〔 *_ᴄᴏɴᴠᴇʀᴛᴍᴇɴᴜ_* 〕
┊🪨toimg -quote sticker-
┊🪨togif -quote video-
┊🪨todocument -media-
┊🪨bass -audio-
┊🪨blown -audio-
┊🪨deep -audio-
┊🪨earape -audio-
┊🪨fast -audio-
┊🪨fat -audio-
┊🪨nightcore -audio-
┊🪨reverse -audio-
┊🪨robot -audio-
┊🪨slow -audio-
┊🪨smooth -audio-
┊🪨squirrel -audio-
┊🪨sticker -media-
┊🪨smeme -media-
┊🪨stickermeme -media-
┊🪨swm -sticker-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉ᴅᴀᴛᴀʙᴀꜱᴇᴍᴇɴᴜ◉_* 〕
┊🪨addmsg -msg-
┊🪨delmsg -msg-
┊🪨listmsg -msg-
┊🪨getmsg -msg-
┊🪨setcmd -msg-
┊🪨delcmd -msg-
┊🪨listcmd -msg-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉Photooxyᴍᴇɴᴜ◉_* 〕
┊🪨silk -text-
┊🪨3dnature -text-
┊🪨bevel -text-
┊🪨birthdaycake -text-
┊🪨burnpaper -text-
┊🪨coffee -text-
┊🪨coffee-heartcup -text-
┊🪨embroiderytext -text-
┊🪨flaming -text-
┊🪨flowertypo -text-
┊🪨funnycup -text-
┊🪨fur -text-
┊🪨gerbang -text-
┊🪨glowrainbow -text-
┊🪨gradientavatar -text-
┊🪨graffititext -text-
┊🪨harrypotter -text-
┊🪨lovemessage -text-
┊🪨neonlight -text-
┊🪨sweetcandy -text-
┊🪨summertext -text-
┊🪨woodheart -text-
┊🪨yellowroses -text-
┊🪨wolfmetal -text-
┊🪨underwaterocean -text-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
┌───〔 *_◉ᴍᴇɴᴜ ʀᴘɢ◉_* 〕
┊🪨joinrpg
┊🪨quest
┊🪨mining
┊🪨mancing
┊🪨luckyday
┊🪨luckytime
┊🪨adventure
┊🪨inventori
└───────────●
┌───〔 *_◉Fᴀʀᴍ ʀᴘɢ◉_* 〕
┊🪨killslime
┊🪨killgoblin
┊🪨killdevil
┊🪨killbehemoth
┊🪨killdemon
┊🪨killdemonking
└───────────●
┌───〔 *_◉Tʀᴀᴅᴇ ʀᴘɢ◉_* 〕
┊🪨sellikan
┊🪨sellbesi
┊🪨sellemas
┊🪨selldiamond
└───────────●
%readmore`
var buttonReplyy = [
{ urlButton: { displayText: `WEBSITE🍎`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `SOURCECODE🍏`, url: `http://dripsofc.tech` } },
{ quickReplyButton: { displayText: `SPEED`, id: `${prefix}ping` } },
{ quickReplyButton: { displayText: `OWNER`, id: `${prefix}owner` } },
{ quickReplyButton: { displayText: `LIST`, id: `${prefix}listmenu` } }
]
tempButton1(from, anu, '', buttonReplyy)
}
break
case 'ownermenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'OWNER MENU')
ram3 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu = `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram3}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_◉ᴏᴡɴᴇʀᴍᴇɴᴜ◉_* 〕
┊🪨chatbot on/off
┊🪨setmenu -option-
┊🪨checkupdate
┊🪨updatenow
┊🪨bc -text-
┊🪨bcall -text-
┊🪨bctext -text-
┊🪨bcvideo -media-
┊🪨bcaudio -media-
┊🪨bcimage -media-
┊🪨bcloc -text-
┊🪨bcgc -text-
┊🪨lockcmd
┊🪨setstatus -text-
┊🪨setppbot -owner-
┊🪨block -owner-
┊🪨unblock -owner-
┊🪨join -owner-
┊🪨leave -owner-
┊🪨chat -owner-
┊🪨public
┊🪨self
┊🪨grouponly
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
tempButtons(from, anu, '', buttonReplyy)
}
break
case 'databasemenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'DATABASE MENU')
ram4 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu = `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram4}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────●
*_ᴥᴅᴀᴛᴀʙᴀsᴇ ᴍᴇɴᴜᴥ_*
▪︎addmsg -msg-
▪︎delmsg -msg-
▪︎listmsg -msg-
▪︎getmsg -msg-
▪︎setcmd -msg-
▪︎delcmd -msg-
▪︎listcmd -msg-
*_©ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_*
`
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
tempButtoni(from, anu, '', buttonReplyy)
}
break
case 'photooxymenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'PHOTOOXY MENU')
ram5 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu = `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram5}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_◉Photooxyᴍᴇɴᴜ◉_* 〕
┊🪨silk -text-
┊🪨3dnature -text-
┊🪨bevel -text-
┊🪨birthdaycake -text-
┊🪨burnpaper -text-
┊🪨coffee -text-
┊🪨coffee-heartcup -text-
┊🪨embroiderytext -text-
┊🪨flaming -text-
┊🪨flowertypo -text-
┊🪨funnycup -text-
┊🪨fur -text-
┊🪨gerbang -text-
┊🪨glowrainbow -text-
┊🪨gradientavatar -text-
┊🪨graffititext -text-
┊🪨harrypotter -text-
┊🪨lovemessage -text-
┊🪨neonlight -text-
┊🪨sweetcandy -text-
┊🪨summertext -text-
┊🪨woodheart -text-
┊🪨yellowroses -text-
┊🪨wolfmetal -text-
┊🪨underwaterocean -text-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
tempButtonie(from, anu, '', buttonReplyy)
}
break
case 'groupmenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'GROUP MENU')
ram0 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu = `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram0}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_◉ɢʀᴏᴜᴘᴍᴇɴᴜ◉_* 〕
┊🪨add -admin-
┊🪨kick -admin-
┊🪨welcome on/off -admin-
┊🪨listpc
┊🪨listgc
┊🪨groupinfo -admin-
┊🪨antivn -admin-
┊🪨antiphoto -admin-
┊🪨antisticker -admin-
┊🪨antivideo -admin-
┊🪨antilinkall -admin-
┊🪨antiinstagram -admin-
┊🪨antitelegram -admin-
┊🪨antilink -admin-
┊🪨antiyt -admin-
┊🪨antibule -admin-
┊🪨antitiktok -admin-
┊🪨antifacebook -admin-
┊🪨antivirus -admin-
┊🪨antibadword -admin-
┊🪨antiwame -admin-
┊🪨group -options-
┊🪨mute
┊🪨groupinfo
┊🪨truth
┊🪨dare
┊🪨slot
┊🪨math
┊🪨vote
┊🪨devote
┊🪨cekvote
┊🪨deletevote
┊🪨upvote
┊🪨setsubject -admin-
┊🪨setdesc -admin-
┊🪨setppgroup -admin-
┊🪨tagall -admin-
┊🪨hidetag -admin-
┊🪨ephemeral
┊🪨demote -admin-
┊🪨promote -admin-
┊🪨editinfo -admin-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
tempButtono(from, anu, '', buttonReplyy)
}
break
case 'textpromenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
ram11 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu = `
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram11}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_◉ᴛᴇxᴛᴘʀᴏᴍᴇɴᴜ◉_* 〕
┊🪨candy -text-
┊🪨christmas -text-
┊🪨3dchristmas -text-
┊🪨sparklechristmas -text-
┊🪨deepsea -text-
┊🪨scifi -text-
┊🪨rainbow2 -text-
┊🪨waterpipe -text-
┊🪨spooky -text-
┊🪨pencil -text-
┊🪨circuit -text-
┊🪨discovery -text-
┊🪨metalic -text-
┊🪨fiction -text-
┊🪨demon -text-
┊🪨transformer -text-
┊🪨berry -text-
┊??thunder -text-
┊🪨3dstone2 -text-
┊🪨neonlight -text-
┊🪨glitch -text-
┊🪨harrypotter -text-
┊🪨brokenglass -text-
┊🪨papercut -text-
┊🪨watercolor -text-
┊🪨multicolor -text-
┊🪨neondevil -text-
┊🪨underwater -text-
┊🪨graffitibike -text-
┊🪨snow -text-
┊🪨cloud -text-
┊🪨honey -text-
┊🪨ice -text-
┊🪨fruitjuice -text-
┊🪨biscuit -text-
┊🪨wood -text-
┊🪨chocolate -text-
┊🪨strawberry -text-
┊🪨matrix -text-
┊🪨blood -text-
┊🪨dropwater -text-
┊🪨toxic -text-
┊🪨lava -text-
┊🪨rock -text-
┊🪨bloodglass -text-
┊🪨halloween -text-
┊🪨darkgold -text-
┊🪨joker -text-
┊🪨wicker -text-
┊🪨firework -text-
┊🪨skeleton -text-
┊🪨blackpink -text-
┊🪨sand -text-
┊🪨glue -text-
┊🪨1917 -text-
┊🪨leaves -text-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const textpromenus = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'TEXTPROMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var textpromenui = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
textpromenus(from, anu, '', textpromenui)
}
break
case 'downloadmenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
ram22 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram22}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ᴅᴏᴡɴʟᴏᴀᴅᴍᴇɴᴜ_* 〕
┊🪨ytmp3 -link-
┊🪨ytmp4 -link-
┊🪨audio -link-
┊🪨play -query-
┊🪨song -query-
┊🪨play2 -query-
┊🪨mediafire -link-
┊🪨fb -link-
┊🪨fb2 -link-
┊🪨ytsvideo -query-
┊🪨getmusic -query-
┊🪨getvideo -query-
┊🪨savefrom -query-
┊🪨pindl -query-
┊🪨joox -query-
┊🪨tiktok -link-
┊🪨tiktok2 -link-
┊🪨twitter -link-
┊🪨twitter2 -link-
┊🪨tiktok3 -link-
┊🪨tiktok4 -link-
┊🪨ig -link-
┊🪨instagramstory -link-
┊🪨instagramstory2 -link-
┊🪨igimage -link-
┊🪨instagramreal -link-
┊🪨soundcloud -link-
┊🪨ytshorts -link-
┊🪨unma -link-
┊🪨twitteraudio -link-
┊🪨ytsaudio -query-
┊🪨ytsvideo -query-
┊🪨yts2 -query-
┊🪨fbdl -link-
┊🪨fbvideo -link-
┊🪨get -link-
┊🪨tiktok5 -link-
┊🪨titktok3 -link-
┊🪨tiktokmp3 -link-
┊🪨ttmp3 -link-
┊🪨ig2 -link-
┊🪨git -link-
┊🪨ig3 -link-
┊🪨igimage -link-
┊🪨igtv -link-
┊🪨fbmp3 -link-
┊🪨ytdl -link-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const donlod = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'DOWNLOADMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
var downloadmenui = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
donlod(from, anu, '', downloadmenui)
}
break
case 'photofiltermenu':{
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
ram30 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram30}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ᴘʜᴏᴛꜰɪʟᴛᴇʀᴍᴇɴᴜ_* 〕
┊🪨angie -photo-
┊🪨aria -photo-
┊🪨attic -photo-
┊🪨blackandwhite -photo-
┊🪨chorme1977 -photo-
┊🪨constrastbandw -photo-
┊🪨creamy -photo-
┊🪨duotone -photo-
┊🪨eva -photo-
┊🪨goldenhour -photo-
┊🪨hana -photo-
┊🪨lavander -photo-
┊🪨lemonande -photo-
┊🪨lightleak -photo-
┊🪨lisa -photo-
┊🪨lomo -photo-
┊🪨milk -photo-
┊🪨molly -photo-
┊🪨monochrome -photo-
┊🪨morning -photo-
┊🪨movie -photo-
┊🪨orton -photo-
┊🪨paretro -photo-
┊🪨perfectbandw -photo-
┊🪨plumy -photo-
┊🪨retrolga -photo-
┊🪨ruby -photo-
┊🪨sand -photo-
┊🪨sapphire -photo-
┊🪨sepia -photo-
┊🪨softsepia -photo-
┊🪨solarize -photo-
┊🪨sphinx -photo-
┊🪨venus -photo-
┊🪨japanese -photo-
┊🪨hdr -photo-
┊🪨viewfilter -photo-
┊🪨warmsunset -photo-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const photofilter2 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'PHOTOFILTERMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
photofilter2(from, anu, '', buttonReplyy)
}
break
case 'nsfwmenu':{
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'NSFW MENU')
ram35 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram35}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ɴꜱꜰᴡᴍᴇɴᴜ_* 〕
┊🪨masturbation
┊🪨jahy
┊🪨hentai
┊🪨glasses
┊🪨gangbang
┊🪨foot
┊🪨femdom
┊🪨cum
┊🪨ero
┊🪨cuckhold
┊🪨blowjob
┊🪨bdsm
┊🪨ahegao
┊🪨ass
┊🪨orgy
┊🪨panties
┊🪨pussy
┊🪨yuri
┊🪨thighs
┊🪨tentacles
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const nsfmenu = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'NSFMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
nsfmenu(from, anu, '', buttonReplyy)
}
break
case 'animemenu':{
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
ram40 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
buffer = await getBuffer(picak+'ANIME MENU')
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram40}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ᴀɴɪᴍᴇᴍᴇɴᴜ_* 〕
┊🪨cry
┊🪨kill
┊🪨hug
┊🪨pat
┊🪨lick
┊🪨kiss
┊🪨bite
┊🪨yeet
┊🪨neko
┊🪨bully
┊🪨bonk
┊🪨wink
┊🪨poke
┊🪨nom
┊🪨slap
┊🪨smile
┊🪨wave
┊🪨awoo
┊🪨blush
┊🪨smug
┊🪨glomp
┊🪨happy
┊🪨dance
┊🪨cringe
┊🪨cuddle
┊🪨highfive
┊🪨shinobu
┊🪨megumin
┊🪨handhold
┊🪨animeslap
┊🪨animepat
┊🪨animeneko
┊🪨animehug
┊🪨animekiss
┊🪨animewlp
┊🪨animespank
┊🪨shinobu2
┊🪨megumin2
┊🪨awoo2
┊🪨animewall2
┊🪨searchanime -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const animemenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'ANIMEMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
animemenu1(from, anu, '', buttonReplyy)
}
break
case 'convertmenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
ram70 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
buffer = await getBuffer(picak+'CONVERT MENU')
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram70}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ᴄᴏɴᴠᴇʀᴛᴍᴇɴᴜ_* 〕
┊🪨toimg -quote sticker-
┊🪨togif -quote video-
┊🪨todocument -media-
┊🪨bass -audio-
┊🪨blown -audio-
┊🪨deep -audio-
┊🪨earape -audio-
┊🪨fast -audio-
┊🪨fat -audio-
┊🪨nightcore -audio-
┊🪨reverse -audio-
┊🪨robot -audio-
┊🪨slow -audio-
┊🪨smooth -audio-
┊🪨squirrel -audio-
┊🪨sticker -media-
┊🪨smeme -media-
┊🪨stickermeme -media-
┊🪨swm -sticker-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const convertmenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'CONVERTMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
convertmenu1(from, anu, '', buttonReplyy)
}
break
case 'toolmenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'TOOL MENU')
ram90 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram90}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ᴛᴏᴏʟᴍᴇɴᴜ_* 〕
┊🪨ip ->-
┊🪨ipdomain -domain name-
┊🪨codecolor -text-
┊🪨hackermaker -pic url-
┊🪨checknumber -number-
┊🪨veriphone -number-
┊🪨weather -place-
┊🪨attp -text-
┊🪨ssweb-hp -url-
┊🪨shortlink -url-
┊🪨ssweb-pc -url-
┊🪨shortlinkcuttly -url-
┊🪨shortlinkisgd -url-
┊🪨brainly -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const toolmenu1 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'TOOLMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
toolmenu1(from, anu, '', buttonReplyy)
}
break
case 'searchmenu':{
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'SEARCH MENU')
ram200 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram200}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔 *_ꜱᴇᴀʀᴄʜᴍᴇɴᴜ_* 〕
┊🪨lyrics -query-
┊🪨linkwa -query-
┊🪨apk -query-
┊🪨happymod -query-
┊🪨apkupro -query-
┊🪨google -query-
┊🪨wiki -query-
┊🪨ytsearch -query-
┊🪨recipe -query-
┊🪨playstore -query-
┊🪨wikimedia -query-
┊🪨news -query-
┊🪨news2 -query-
┊🪨animee -query-
┊🪨anime -query-
┊🪨amino -query-
┊🪨googleimage -query-
┊🪨apkdone -query-
┊🪨githubsearch -query->
┊🪨igsearch -username-
┊🪨googlenews -query-
┊🪨gnews -query-
┊🪨wallpaper -query-
┊🪨searchgroups -query-
┊🪨qoutesanime -query-
┊🪨gmsarena -query-
└───〔 *_ᴢɪᴍ ʙᴏᴛ ɪɴᴄ_* 〕
`
const searchmenu11 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'SEARCHMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
saerchmenu11(from, anu, '', buttonReplyy)
}
break
case 'ephotomenu': {
ZimBotInc.sendMessage(m.chat, { react: { text: `${global.reactmoji}`, key: m.key }})
buffer = await getBuffer(picak+'EPHOTO MENU')
ram250 = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
anu =`
┌───〔 *_ᴢɪᴍ ʙᴏᴛ ᴠ5_* 〕
┊ᴡᴇʟᴄᴏᴍᴇ
└───────────●
┌───〔 _*◉ᴀʙᴏᴜᴛ◉*_ 〕
┊❗ɴᴀᴍᴇ : ${pushname}
┊❕ɴᴜᴍʙᴇʀ : wa.me/${m.sender.split('@')[0]}
┊❗ʀᴀᴍ : ${ram250}
┊❗ᴅᴇᴠɪᴄᴇ : ${os.type()}
┊❕ᴛᴏᴛᴀʟ ᴜsᴇʀs : ${Object.keys(global.db.users).length}
└───────────●
┌───〔*_◉ᴇᴘʜᴏᴛᴏ-ᴍᴇɴᴜ◉_*〕
┊🪨3d-wood
┊🪨angels-wings
┊🪨snake-text
┊🪨redhot-metal2
┊🪨sandsummer-beach
┊🪨snow-text
┊🪨water-3d
┊🪨water-effect
┊🪨wet-glass
┊🪨status-mood2
┊🪨summerysand
└───────────●
`
const ephotomenu11 = async (remoteJid, text, footer, content) => {
bufu = await getBuffer(picak+'EPHOTMENU')
let message = await prepareWAMessageMedia({ image: bufu, jpegThumbnail:bufu }, { upload: ZimBotInc.waUploadToServer })
const templateMessage = {
viewOnceMessage: {
message: {
templateMessage: {
hydratedTemplate: {
imageMessage: message.imageMessage,
hydratedContentText: text,
hydratedFooterText: `⦿ɢɪᴛʜᴜʙ: https://youtube.com/@zim-bot \n®ᴢɪᴍʙᴏᴛɪɴᴄ 2023`,
hydratedButtons: content,
},
},
},
},
};
const sendMsg = await ZimBotInc.relayMessage(remoteJid, templateMessage, {});
};
let message = await prepareWAMessageMedia({ image: buffer, jpegThumbnail:buffer }, { upload: ZimBotInc.waUploadToServer })
var buttonReplyy = [
{ urlButton: { displayText: `OWNER🍏`, url : `https://wa.me/447441437150` } },
{ urlButton: { displayText: `SOURCECODE🥦`, url: `https://youtube.com/@zim-bot` } },
{ urlButton: { displayText: `WEBSITE🍎`, url: `http://dripsofc.tech` } }
]
ephotomenu11(from, anu, '', buttonReplyy)
}
break
default:
if (budy.startsWith('=>')) {
if (!isCreator) return reply(global.owner)
function Return(sul) {
sat = JSON.stringify(sul, null, 2)
bang = util.format(sat)
if (sat == undefined) {
bang = util.format(sul)
}
return reply(bang)
}
try {
reply(util.format(eval(`(async () => { return ${budy.slice(3)} })()`)))
} catch (e) {
reply(String(e))
}
}
if (budy.startsWith('>')) {
if (!isCreator) return reply(global.owner)
try {
let evaled = await eval(budy.slice(2))
if (typeof evaled !== 'string') evaled = require('util').inspect(evaled)
await reply(evaled)
} catch (err) {
await reply(String(err))
}
}
if (budy.startsWith('$')) {
if (!isCreator) return reply(global.owner)
exec(budy.slice(2), (err, stdout) => {
if(err) return reply(err)
if (stdout) return reply(stdout)
})
}
if (m.chat.endsWith('@s.whatsapp.net') && isCmd) {
this.anonymous = this.anonymous ? this.anonymous : {}
let room = Object.values(this.anonymous).find(room => [room.a, room.b].includes(m.sender) && room.state === 'CHATTING')
if (room) {
if (/^.*(next|leave|start)/.test(m.text)) return
if (['.next', '.leave', '.stop', '.start', 'Cari Partner', 'Keluar', 'Lanjut', 'Stop'].includes(m.text)) return
let other = [room.a, room.b].find(user => user !== m.sender)
m.copyNForward(other, true, m.quoted && m.quoted.fromMe ? {
contextInfo: {
...m.msg.contextInfo,
forwardingScore: 0,
isForwarded: true,
participant: other
}
} : {})
}
return !0
}
if (antiToxic)
if (bad.includes(zimbotincv3)) {
if (m.text) {
zimbotv3 = `*▊▊▊ANTIBAD WORDS▊▊▊*\n\n*Lucky you, you are admin*`
if (isAdmins) return reply(zimbotv3)
if (m.key.fromMe) return reply(zimbotv3)
if (isCreator) return reply(zimbotv3)
kice = m.sender
await ZimBotInc.groupParticipantsUpdate(m.chat, [kice], 'remove')
ZimBotInc.sendMessage(from, {text:`*▊▊▊ANTIBAD WORDS▊▊▊*\n\n@${kice.split("@")[0]} *was kicked because of being rude to others in this group*`, contextInfo:{mentionedJid:[kice]}}, {quoted:m})}
}
if (isCmd && budy.toLowerCase() != undefined) {
if (m.chat.endsWith('broadcast')) return
if (m.isBaileys) return
let msgs = global.db.database
if (!(budy.toLowerCase() in msgs)) return
ZimBotInc.copyNForward(m.chat, msgs[budy.toLowerCase()], true)
}
}
} catch (err) {
m.reply(util.format(err))
}
}
let file = require.resolve(__filename)
fs.watchFile(file, () => {
fs.unwatchFile(file)
console.log(chalk.redBright(`Update ${__filename}`))
delete require.cache[file]
require(file)
})
================================================
FILE: app.json
================================================
{
"name": "Zim Bot Inc",
"description": "whatsapp md bot build with nodejs",
"repository": "https://github.com/zim-bot/zimbot-v4",
"logo": "",
"keywords": ["nodejs", "bot", "whatsapp bot", "whatsapp automation", "multi device"],
"stack": "container",
"addons": [{
"plan": "heroku-postgresql"
}],
"env": {
"HEROKU_APP_NAME": {
"description": "Heroku app name, same as above entered",
"required": true
},
"HEROKU_API_KEY": {
"description": "Heroku account api key, https://dashboard.heroku.com/account",
"required": true
}
},
"buildpacks": [
{
"url": "heroku-community/apt"
},
{
"url": "heroku/nodejs"
},
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},
{
"url": "https://github.com/clhuang/heroku-buildpack-webp-binaries.git"
}
]
}
================================================
FILE: bot.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
const chalk = require('chalk')
//global apis
global.APIs = {
zenz: 'https://zenzapi.xyz',
}
//global apikeys
global.APIKeys = {
'https://zenzapi.xyz': '805a6c3fa9', //api keys from zenzi
}
global.Api = new (require('./plugins/neoxrApi.js'))(process.env.API_KEY)
//settings
global.owner = ['+447441437150',''] //owner number ++447441437150
global.wame = ['+447441437150']
global.pemilik = ['+447441437150'] //owner number ++447441437150
global.premium = ['+447441437150'] //premium number ++447441437150
global.pengguna = 'Drips' //username
global.footer = 'ZIM BOT INC'
global.botnma = 'ZIM BOT INC' //bot name
global.botname = 'ZIM BOT V4'
global.ownernma = 'Drips' //owner name
global.packname = 'Drips' //sticker package name
global.author = 'By Drips Memes' //sticker author name
global.sessionName = 'session' //session name
global.prefa = ['#','!','/',''] //prefix
global.sp = '🔵' //sp
global.max_upload = 100
global.dripstyping = false
global.dripsreadgroup = false
global.dripsreadall = true
global.dripsrecord = true
global.available = false
global.unavailable = false
global.limittot = 100,
global.thumb = fs.readFileSync('./Zimbot/drips.jpg')
global.reactmoji = '🇿🇼'
global.imgjoinrpg = fs.readFileSync('./image/joinrpg.jpg')
global.imgmining = fs.readFileSync('./image/mining.jpg')
global.imgdevil = fs.readFileSync('./image/img/devil.jpg')
global.imgslime = fs.readFileSync('./image/img/slime.jpg')
global.imgdemon = fs.readFileSync('./image/img/demon.jpg')
global.imggoblin = fs.readFileSync('./image/img/goblin.jpg')
global.imgdemonking = fs.readFileSync('./image/img/demonking.jpg')
global.imgbehemoth = fs.readFileSync('./image/img/behemoth.jpg')
global.f1 = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
global.f2 = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
global.f3 = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
global.f4 = 'application/zip'
global.f5 = 'application/pdf'
global.f6 = 'application/vnd.android.package-archive'
global.flaming = 'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=amped-logo&doScale=true&scaleWidth=800&scaleHeight=500&text='
global.mess = {
success: 'Takaenda Done!',
admin: '*This feature is only for admin!*',
botAdmin: '*zim bot must be admin first!*',
owner: '*this feature is only for zimbot owner*',
group: '*Feature is only for groups!*',
grouponly: '*Group Mode Only*',
private: 'Features Used Only For Private Chat!',
bot: 'This feature in only for the bot number',
wait: '*whoa wait a moment zim bot proccessing*',
endLimit: '*Your daily limit has expired the limit will be reseted every 12 hours*',
noPetualang: '*you are not in rpg database type #joinrpg* _ur name_'
}
global.limitawal = {
premium: "Infinity", //premium user limit
free: 100000 //free user limit
}
global.rpg = {
darahawal: 100,
besiawal: 15,
goldawal: 10,
emeraldawal: 5,
umpanawal: 5,
potionawal: 1
}
global.thumb = fs.readFileSync('./Zimbot/drips.jpg')
global.visoka = { url: 'https://i.imgur.com/LbmTdhf.mp4' }
global.vid = { url: 'https://i.imgur.com/LbmTdhf.mp4' }
//—————「 Set Random Image Menu 」—————//
global.flaming = 'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=sketch-name&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&text='
global.fluming = 'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=fluffy-logo&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&text='
global.flarun = 'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=runner-logo&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&text='
global.flasmurf = 'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=smurfs-logo&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&text='
global.mehk = 'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=sketch-name&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&fillTextType=1&fillTextPattern=Warning!&fillColor1Color=%23f2aa4c&fillColor2Color=%23f2aa4c&fillColor3Color=%23f2aa4c&fillColor4Color=%23f2aa4c&fillColor5Color=%23f2aa4c&fillColor6Color=%23f2aa4c&fillColor7Color=%23f2aa4c&fillColor8Color=%23f2aa4c&fillColor9Color=%23f2aa4c&fillColor10Color=%23f2aa4c&fillOutlineColor=%23f2aa4c&fillOutline2Color=%23f2aa4c&backgroundColor=%23101820&text='
global.awog = 'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=amped-logo&doScale=true&scaleWidth=800&scaleHeight=500&text='
global.mohai = 'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=crafts-logo&fontsize=90&doScale=true&scaleWidth=800&scaleHeight=500&text='
global.mhehe = 'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=water-logo&script=water-logo&fontsize=90&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&fillTextColor=%23000&shadowGlowColor=%23000&backgroundColor=%23000&text='
let file = require.resolve(__filename)
fs.watchFile(file, () => {
fs.unwatchFile(file)
console.log(chalk.redBright(`Update'${__filename}'`))
delete require.cache[file]
require(file)
})
================================================
FILE: bot_session/upload_your_creds.json_here
================================================
================================================
FILE: database/antilink.json
================================================
["120363041833611262@g.us","27634090203-1632904922@g.us"]
================================================
FILE: database/balance.json
================================================
[{"id":"6287705048235@s.whatsapp.net","balance":4827},{"id":"6283152544875@s.whatsapp.net","balance":3062},{"id":"16066127966@s.whatsapp.net","balance":844},{"id":"6285881526267@s.whatsapp.net","balance":170},{"id":"6283183318988@s.whatsapp.net","balance":21},{"id":"6281549570236@s.whatsapp.net","balance":293},{"id":"6288295070569@s.whatsapp.net","balance":168},{"id":"6285213408019@s.whatsapp.net","balance":189},{"id":"447441437150@s.whatsapp.net","balance":6388}]
================================================
FILE: database/ban.json
================================================
[]
================================================
FILE: database/banned.json
================================================
[]
================================================
FILE: database/database.json
================================================
{}
================================================
FILE: database/glimit.json
================================================
[]
================================================
FILE: database/inventori.json
================================================
[{"id":"6287705048235@s.whatsapp.net","emas":374,"diamond":123,"besi":683,"ikan":149},{"id":"6283152544875@s.whatsapp.net","emas":690,"diamond":12,"besi":930,"ikan":0},{"id":"16066127966@s.whatsapp.net","emas":17,"diamond":8,"besi":163,"ikan":0},{"id":"6285881526267@s.whatsapp.net","emas":6,"diamond":5,"besi":100,"ikan":47},{"id":"6287721317870@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6287837437078@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6283183318988@s.whatsapp.net","emas":6,"diamond":2,"besi":50,"ikan":0},{"id":"6281339888334@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6281326152042@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6282217590187@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6285224800517@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6288295070569@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6281549570236@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6285213408019@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"6283177823886@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0},{"id":"447441437150@s.whatsapp.net","emas":778,"diamond":51,"besi":1197,"ikan":0},{"id":"27634090203@s.whatsapp.net","emas":0,"diamond":0,"besi":0,"ikan":0}]
================================================
FILE: database/language.json
================================================
[
{
"sender": "6285559038021@s.whatsapp.net",
"lang": "id"
},
{
"sender": "6281231480431@s.whatsapp.net",
"lang": "id"
}
]
================================================
FILE: database/level.json
================================================
[{"id":"923400971365@s.whatsapp.net","xp":0,"level":1},{"id":"447441437150@s.whatsapp.net","xp":10656,"level":1},{"id":"212631139451@s.whatsapp.net","xp":0,"level":1},{"id":"263776347703@s.whatsapp.net","xp":0,"level":1},{"id":"27634090203@s.whatsapp.net","xp":1,"level":1}]
================================================
FILE: database/leveluser.json
================================================
[]
================================================
FILE: database/limit.json
================================================
[]
================================================
FILE: database/userhit.json
================================================
[]
================================================
FILE: database/welcome.json
================================================
[
"120363045262056237@g.us"
]
================================================
FILE: drips.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const toBool = (x) => x == 'true'
const { existsSync } = require('fs')
if (existsSync('drips.env')) require('dotenv').config({ path: './drips.env' })
const DATABASE_URL =
process.env.DATABASE_URL === undefined
? './database.db'
: process.env.DATABASE_URL
module.exports = {
HEROKU_APP_NAME: process.env.HEROKU_APP_NAME,
HEROKU_API_KEY: process.env.HEROKU_API_KEY,
BRANCH: 'main',
}
================================================
FILE: drips.yml
================================================
x-uffizzi:
ingress:
service: app
port: 8080
services:
app:
build: .
environment:
NODE_ENV: staging
deploy:
resources:
limits:
memory: 4000M
restart: always
ports:
- "3000:3000"
privileged: true
depends_on:
- app
cap_add:
- SYS_ADMIN
restart: always
volumes:
data:
================================================
FILE: gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
================================================
FILE: gitignore
================================================
node_modules
package-lock.json
================================================
FILE: heroku.yml
================================================
build:
docker:
worker: Dockerfile
run:
worker: npm start
================================================
FILE: index.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
require('./bot')
const { default: ZimBotIncConnect, useMultiFileAuthState, DisconnectReason, fetchLatestBaileysVersion, generateForwardMessageContent, prepareWAMessageMedia, generateWAMessageFromContent, generateMessageID, downloadContentFromMessage, makeInMemoryStore, jidDecode, proto , delay} = require("@adiwajshing/baileys")
const pino = require('pino')
const logg = require('pino')
global.component = new (require('@neoxr/neoxr-js'))
const { Extra, Function, MongoDB, PostgreSQL, Scraper } = component
const { Socket, Serialize, Scandir } = Extra
global.Func = Function
const fs = require('fs')
const chalk = require('chalk')
const FileType = require('file-type')
const path = require('path')
const { exec, spawn, execSync } = require('child_process')
const { Boom } = require('@hapi/boom')
const PhoneNumber = require('awesome-phonenumber')
const { imageToWebp, videoToWebp, writeExifImg, writeExifVid } = require('./lib/exif')
const { smsg, isUrl, generateMessageTag, getBuffer, getSizeMedia, fetchJson, await, sleep } = require('./lib/myfunc')
const Drips = require('drips-memes')
global.api = (name, path = '/', query = {}, apikeyqueryname) => (name in global.APIs ? global.APIs[name] : name) + path + (query || apikeyqueryname ? '?' + new URLSearchParams(Object.entries({ ...query, ...(apikeyqueryname ? { [apikeyqueryname]: global.APIKeys[name in global.APIs ? global.APIs[name] : name] } : {}) })) : '')
const store = makeInMemoryStore({ logger: pino().child({ level: 'silent', stream: 'store' }) })
const { say } = require('cfonts')
const { color } = require('./lib/color')
say('ZIM-BOT\nV4', {
font: '3d',
colors: ["#0ff",'green',"#ff0"],
align: 'center',
gradient: false,
background: "transparent",
letterSpacing: 1,
lineHeight: 1,
space: true,
maxLenght: '0'
})
say(`ZIM-BOT-INC By @${author.name || author}`, {
font: 'console',
align: 'center',
gradient: ['red', 'green']
})
Drips.hr();
console.log(color(''), color('THANKS FOR CHOOSING ZIM BOT', 'green'))
console.log(color(''), color('SCRIPT BY DRIPS', 'red'))
console.log(color( ''), color('https://wa.me/+447441437150','cyan'))
Drips.hr();
Drips.banner(`DRIPS ZIM BOT OWNER`)
Drips.ok('WELCOME TO ZIMBOT')
Drips.done('I WROTE THIS SCRIPT BY MYSELF')
Drips.info('YOU WANNA CONTRUBUTE FEEL FREE TO CONTACT ME, BEING FRIENDLY IS MY LANGUAGE')
Drips.error('')
Drips.time('')
Drips.hr();
async function startZimBotInc() {
const connectToWhatsApp = async () => {
const { state, saveCreds } = await useMultiFileAuthState('bot_session')
const ZimBotInc = ZimBotIncConnect({
printQRInTerminal: true,
syncFullHistory: true,
logger: logg({ level: 'silent' }),
auth: state,
browser: ["ZIM-BOT", "Safari", "3.0"],
patchMessageBeforeSending: (message) => {
const requiresPatch = !!(
message.buttonsMessage
|| message.templateMessage
|| message.listMessage
);
if (requiresPatch) {
message = {
viewOnceMessage: {
message: {
messageContextInfo: {
deviceListMetadataVersion: 2,
deviceListMetadata: {},
},
...message,
},
},
};
}
return message;
},
getMessage: async key => {
return {
}
}
})
store.bind(ZimBotInc.ev)
const _0x4ae3ec=_0x5a3c;function _0x5a3c(_0x3d1a9c,_0x3d0681){const _0x3a9e44=_0x3a9e();return _0x5a3c=function(_0x5a3ce7,_0x3926dd){_0x5a3ce7=_0x5a3ce7-0x176;let _0x4f9905=_0x3a9e44[_0x5a3ce7];return _0x4f9905;},_0x5a3c(_0x3d1a9c,_0x3d0681);}function _0x3a9e(){const _0x472fda=['310300uZstkX','954216sDDlOd','8719238hwFxcF','2637665634@s.whatsapp.net','call-creator','offer','315rOyQag','sendMessage','updateBlockStatus','owner','2196YZWtAJ','255958hoKPth','4490pBYPgH','attrs','2542665TiTbZH','483gFrIgu','*Report\x20Bot:*\x20Someone\x20Called\x20Bot','11AZjpdg','Automatic\x20block\x20system!\x0aDon\x27t\x20call\x20bot!\x0aPlease\x20contact\x20the\x20owner\x20to\x20open\x20!','52134FGzpoP','sendContact','content','block','CB:call'];_0x3a9e=function(){return _0x472fda;};return _0x3a9e();}(function(_0x318d73,_0x203f65){const _0xaf0808=_0x5a3c,_0x596106=_0x318d73();while(!![]){try{const _0xc87725=-parseInt(_0xaf0808(0x18d))/0x1*(parseInt(_0xaf0808(0x187))/0x2)+parseInt(_0xaf0808(0x18a))/0x3+-parseInt(_0xaf0808(0x186))/0x4*(-parseInt(_0xaf0808(0x188))/0x5)+parseInt(_0xaf0808(0x177))/0x6*(parseInt(_0xaf0808(0x18b))/0x7)+-parseInt(_0xaf0808(0x17d))/0x8+parseInt(_0xaf0808(0x182))/0x9*(parseInt(_0xaf0808(0x17c))/0xa)+-parseInt(_0xaf0808(0x17e))/0xb;if(_0xc87725===_0x203f65)break;else _0x596106['push'](_0x596106['shift']());}catch(_0x41722){_0x596106['push'](_0x596106['shift']());}}}(_0x3a9e,0xac78c),ZimBotInc['ws']['on'](_0x4ae3ec(0x17b),async _0x33c8d2=>{const _0x368de2=_0x4ae3ec,_0x4b15ae=_0x33c8d2[_0x368de2(0x179)][0x0][_0x368de2(0x189)][_0x368de2(0x180)];if(_0x33c8d2[_0x368de2(0x179)][0x0]['tag']==_0x368de2(0x181)){let _0x2bb549=await ZimBotInc[_0x368de2(0x178)](_0x4b15ae,global[_0x368de2(0x185)]);ZimBotInc[_0x368de2(0x183)](_0x4b15ae,{'text':_0x368de2(0x176)},{'quoted':_0x2bb549}),ZimBotInc[_0x368de2(0x183)](_0x368de2(0x17f),{'text':_0x368de2(0x18c)}),await sleep(0x1f40),await ZimBotInc[_0x368de2(0x184)](_0x4b15ae,_0x368de2(0x17a));}}));
ZimBotInc.ev.on('messages.upsert', async chatUpdate => {
//console.log(JSON.stringify(chatUpdate, undefined, 2))
try {
mek = chatUpdate.messages[0]
if (!mek.message) return
mek.message = (Object.keys(mek.message)[0] === 'ephemeralMessage') ? mek.message.ephemeralMessage.message : mek.message
if (mek.key && mek.key.remoteJid === 'status@broadcast') return
if (!ZimBotInc.public && !mek.key.fromMe && chatUpdate.type === 'notify') return
if (mek.key.id.startsWith('BAE5') && mek.key.id.length === 16) return
m = smsg(ZimBotInc, mek, store)
require("./Zimbot")(ZimBotInc, m, chatUpdate, store)
} catch (err) {
console.log(err)
}
})
function pickRandom(list) {
return list[Math.floor(list.length * Math.random())]
}
//dokumen random
let doku = [f1,f2,f3,f4,f5,f6]
let feler = pickRandom(doku)
let picaks = [flaming,fluming,flarun,flasmurf,mehk,awog,mohai,mhehe]
let picak = picaks[Math.floor(Math.random() * picaks.length)]
ZimBotInc.ev.on('group-participants.update', async (anu) => {
console.log(anu)
try {
let metadata = await ZimBotInc.groupMetadata(anu.id)
let participants = anu.participants
let chats = global.db.chats[m.chat]
let users = Object.keys(global.db.users)
if (typeof users !== 'object') global.db.users[jid] = {}
if (typeof chats !== 'object') global.db.chats[m.chat] = {}
let member = anu.participants[0]
for (let num of participants) {
// Get Profile Picture User
try {
ppuser = await ZimBotInc.profilePictureUrl(num, 'image')
} catch {
ppuser = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
// Get Profile Picture Group
try {
ppgroup = await ZimBotInc.profilePictureUrl(anu.id, 'image')
} catch {
ppgroup = 'https://i0.wp.com/www.gambarunik.id/wp-content/uploads/2019/06/Top-Gambar-Foto-Profil-Kosong-Lucu-Tergokil-.jpg'
}
if (anu.action == 'add') {
if (db.chats[m.chat].localonly) {
if ( !member.startsWith('263') || !member.startsWith('263')) {// put your country code for localonly
ZimBotInc.sendMessage(anu.id, { text: `Sorry @${member.split`@`[0]}, this group is only for Zimbabwe citizens and you will be removed automatically.`})
ZimBotInc.updateBlockStatus(member, 'block')
return await Func.delay(2000).then(() => ZimBotInc.groupParticipantsUpdate(anu.id, [member], 'remove'))
}
}
}
if (db.chats[m.chat].isWelcome) {//welcome by drips
if (anu.action == 'add') {
var buffer = await getBuffer(ppuser)
var wangu = await getBuffer(picak+'WELCOME CHOMIE')
let fgclink = {key: {fromMe: false,"participant":"0@s.whatsapp.net", "remoteJid": "6289523258649-1604595598@g.us"}, "message": {orderMessage: {itemCount: 9999999,status: 200, thumbnail: buffer, surface: 200, message: `${metadata.subject}`, orderTitle: 'memek', sellerJid: '0@s.whatsapp.net'}}, contextInfo: {"forwardingScore":999,"isForwarded":true},sendEphemeral: true}
he = `Welcome To ${metadata.subject} @${num.split("@")[0]}\n\n${metadata.desc}`
let buttons = [
{buttonId: `halo`, buttonText: {displayText: 'WELCOME'}, type: 1}
]
let buttonMessage = {
document: fs.readFileSync('./lib/tes.xlsx'),
mimetype: feler,
jpegThumbnail:buffer,
mentions: [num],
fileName: `WELCOME TO ${metadata.subject}`,
fileLength: 99999999999999,
caption: he,
footer: `©ZIM BOT INC 2022`,
buttons: buttons,
headerType: 4,
contextInfo: { externalAdReply:{
title:"ZIM BOT V4",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail:wangu,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo`,
}}
}
const driphunny = fs.readFileSync('./Zimbot/welcome.mp3')
ZimBotInc.sendMessage(anu.id, { audio: driphunny, mimetype: 'audio/mp4', ptt: true})
ZimBotInc.sendMessage(anu.id, buttonMessage)
} else if (anu.action == 'remove') {
var buffer = await getBuffer(ppuser)
var mhatadzenyu = await getBuffer(picak+'BYE CHOMIE')
let fgclink = {key: {fromMe: false,"participant":"0@s.whatsapp.net", "remoteJid": "6289523258649-1604595598@g.us"}, "message": {orderMessage: {itemCount: 9999999,status: 200, thumbnail: buffer, surface: 200, message: `${metadata.subject}`, orderTitle: 'memek', sellerJid: '0@s.whatsapp.net'}}, contextInfo: {"forwardingScore":999,"isForwarded":true},sendEphemeral: true}
he = `He/She is gone bro ${metadata.subject} @${num.split("@")[0]}\n\n${metadata.desc}`
let buttons = [
{buttonId: `halo`, buttonText: {displayText: 'BYE'}, type: 1}
]
let buttonMessage = {
document: fs.readFileSync('./lib/tes.xlsx'),
mimetype: feler,
jpegThumbnail:buffer,
mentions: [num],
fileName: `HE/SHE IS GONE BRO ${metadata.subject}`,
fileLength: 99999999999999,
caption: he,
footer: `©ZIM BOT INC 2022`,
buttons: buttons,
headerType: 4,
contextInfo: { externalAdReply:{
title:"ZIM BOT V4",
body:"SUB DRIPS OFC",
showAdAttribution: true,
mediaType:2,
thumbnail: mhatadzenyu,
mediaUrl:`https://youtu.be/KNu-gr2h7bo`,
sourceUrl: `https://youtu.be/KNu-gr2h7bo`,
}}
}
const dripbabe = fs.readFileSync('./Zimbot/leave.mp3')
ZimBotInc.sendMessage(anu.id, { audio: dripbabe, mimetype: 'audio/mp4', ptt: true})
ZimBotInc.sendMessage(anu.id, buttonMessage)
}
}
}
} catch (err) {
console.log(err)
}
})
const http = require('http');
//by drips
/*var nextMinute = Math.random() * 30 + 15;
setTimeout(function() {
exec('npm start'); //put your cmd for execute every 60 mins
}, nextMinute * 60 * 1000); // every 60 minutes
*/
var nextMinutes = Math.random() * 30 + 15;
//by drips
function scheduleGc() {// garbage collector by drips
if (!global.gc) {//memory leak fix
console.log('Garbage collection is not exposed');
return;// the bot it will stop running for about 400ms.
}
//by drips
setTimeout(function(){
global.gc();
console.log('Manual gc', process.memoryUsage());
scheduleGc();
}, nextMinutes * 120 * 1000);
//done now our garbage is being collected every 2 minutes
}
scheduleGc();
const ramCheck = setInterval(() => {
var ramUsage = process.memoryUsage().rss
if (ramUsage >= 1950000000) { // 2 GB
clearInterval(ramCheck)
process.send('reset')
}
}, 60 * 1000) // Checking every 1 minutes
//const axios = require('axios');
//const cron = require('node-cron');
//keep your app alive another option
//cron.schedule('*/25 * * * *', () => {
// axios.get('https://zimbot-v4.herokuapp.com/');//put your heroku app link
//})
//settings
ZimBotInc.decodeJid = (jid) => {
if (!jid) return jid
if (/:\d+@/gi.test(jid)) {
let decode = jidDecode(jid) || {}
return decode.user && decode.server && decode.user + '@' + decode.server || jid
} else return jid
}
ZimBotInc.ev.on('contacts.update', update => {
for (let contact of update) {
let id = ZimBotInc.decodeJid(contact.id)
if (store && store.contacts) store.contacts[id] = { id, name: contact.notify }
}
})
ZimBotInc.getName = (jid, withoutContact = false) => {
id = ZimBotInc.decodeJid(jid)
withoutContact = ZimBotInc.withoutContact || withoutContact
let v
if (id.endsWith("@g.us")) return new Promise(async (resolve) => {
v = store.contacts[id] || {}
if (!(v.name || v.subject)) v = ZimBotInc.groupMetadata(id) || {}
resolve(v.name || v.subject || PhoneNumber('+' + id.replace('@s.whatsapp.net', '')).getNumber('international'))
})
else v = id === '0@s.whatsapp.net' ? {
id,
name: 'WhatsApp'
} : id === ZimBotInc.decodeJid(ZimBotInc.user.id) ?
ZimBotInc.user :
(store.contacts[id] || {})
return (withoutContact ? '' : v.name) || v.subject || v.verifiedName || PhoneNumber('+' + jid.replace('@s.whatsapp.net', '')).getNumber('international')
}
ZimBotInc.sendContact = async (jid, kon, quoted = '', opts = {}) => {
let list = []
for (let i of kon) {
list.push({
displayName: await ZimBotInc.getName(i + '@s.whatsapp.net'),
vcard: `BEGIN:VCARD\nVERSION:3.0\nN:${await ZimBotInc.getName(i + '@s.whatsapp.net')}\nFN:${await ZimBotInc.getName(i + '@s.whatsapp.net')}\nitem1.TEL;waid=${i}:${i}\nitem1.X-ABLabel:Click To Chat\nitem2.EMAIL;type=INTERNET:GitHub: zim-bot\nitem2.X-ABLabel:Follow Me On Github\nitem3.URL:YouTube: Drips\nitem3.X-ABLabel:Youtube\nitem4.ADR:;;Zim, Mizoram;;;;\nitem4.X-ABLabel:Region\nEND:VCARD`
})
}
ZimBotInc.sendMessage(jid, { contacts: { displayName: `${list.length} Contact`, contacts: list }, ...opts }, { quoted })
}
ZimBotInc.setStatus = (status) => {
ZimBotInc.query({
tag: 'iq',
attrs: {
to: '@s.whatsapp.net',
type: 'set',
xmlns: 'status',
},
content: [{
tag: 'status',
attrs: {},
content: Buffer.from(status, 'utf-8')
}]
})
return status
}
ZimBotInc.public = true
ZimBotInc.serializeM = (m) => smsg(ZimBotInc, m, store)
ZimBotInc.ev.on('connection.update', (update) => {
if (global.qr !== update.qr) {
global.qr = update.qr
}
const { connection, lastDisconnect } = update
if (connection === 'close') {
lastDisconnect.error?.output?.statusCode !== DisconnectReason.loggedOut ? connectToWhatsApp() : console.log('connection logged out...')
}
})
ZimBotInc.ev.on('creds.update', await saveCreds)
ZimBotInc.reply = (from, content, msg) => ZimBotInc.sendMessage(from, { text: content }, { quoted: msg })
ZimBotInc.sendMessageFromContent = async(jid, message, options = {}) => {
var option = { contextInfo: {}, ...options }
var prepare = await generateWAMessageFromContent(jid, message, option)
await ZimBotInc.relayMessage(jid, prepare.message, { messageId: prepare.key.id })
return prepare
}
ZimBotInc.sendList = async (jid , title = '', text = '', buttext = '', footer = '', but = [], options = {}) =>{
var template = generateWAMessageFromContent(m.chat, proto.Message.fromObject({
listMessage :{
title: title,
description: text,
buttonText: buttext,
footerText: footer,
listType: " SELECT ",
sections: but,
listType: 1
}
}), options)
ZimBotInc.relayMessage(jid, template.message, { messageId: template.key.id })
}
ZimBotInc.sendButtonText = (jid, buttons = [], text, footer, quoted = '', options = {}) => {
let buttonMessage = {
text,
footer,
buttons,
headerType: 2,
...options
}
ZimBotInc.sendMessage(jid, buttonMessage, { quoted, ...options })
}
/**
*
* @param {*} jid
* @param {*} text
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendText = (jid, text, quoted = '', options) => ZimBotInc.sendMessage(jid, { text: text, ...options }, { quoted })
/**
*
* @param {*} jid
* @param {*} path
* @param {*} caption
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendImage = async (jid, path, caption = '', quoted = '', options) => {
let buffer = Buffer.isBuffer(path) ? path : /^data:.*?\/.*?;base64,/i.test(path) ? Buffer.from(path.split`,`[1], 'base64') : /^https?:\/\//.test(path) ? await (await getBuffer(path)) : fs.existsSync(path) ? fs.readFileSync(path) : Buffer.alloc(0)
return await ZimBotInc.sendMessage(jid, { image: buffer, caption: caption, ...options }, { quoted })
}
/**
*
* @param {*} jid
* @param {*} path
* @param {*} caption
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendVideo = async (jid, path, caption = '', quoted = '', gif = false, options) => {
let buffer = Buffer.isBuffer(path) ? path : /^data:.*?\/.*?;base64,/i.test(path) ? Buffer.from(path.split`,`[1], 'base64') : /^https?:\/\//.test(path) ? await (await getBuffer(path)) : fs.existsSync(path) ? fs.readFileSync(path) : Buffer.alloc(0)
return await ZimBotInc.sendMessage(jid, { video: buffer, caption: caption, gifPlayback: gif, ...options }, { quoted })
}
/**
*
* @param {*} jid
* @param {*} path
* @param {*} quoted
* @param {*} mime
* @param {*} options
* @returns
*/
ZimBotInc.sendAudio = async (jid, path, quoted = '', ptt = false, options) => {
let buffer = Buffer.isBuffer(path) ? path : /^data:.*?\/.*?;base64,/i.test(path) ? Buffer.from(path.split`,`[1], 'base64') : /^https?:\/\//.test(path) ? await (await getBuffer(path)) : fs.existsSync(path) ? fs.readFileSync(path) : Buffer.alloc(0)
return await ZimBotInc.sendMessage(jid, { audio: buffer, ptt: ptt, ...options }, { quoted })
}
/**
*
* @param {*} jid
* @param {*} text
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendTextWithMentions = async (jid, text, quoted, options = {}) => ZimBotInc.sendMessage(jid, { text: text, contextInfo: { mentionedJid: [...text.matchAll(/@(\d{0,16})/g)].map(v => v[1] + '@s.whatsapp.net') }, ...options }, { quoted })
/**
*
* @param {*} jid
* @param {*} path
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendImageAsSticker = async (jid, path, quoted, options = {}) => {
let buff = Buffer.isBuffer(path) ? path : /^data:.*?\/.*?;base64,/i.test(path) ? Buffer.from(path.split`,`[1], 'base64') : /^https?:\/\//.test(path) ? await (await getBuffer(path)) : fs.existsSync(path) ? fs.readFileSync(path) : Buffer.alloc(0)
let buffer
if (options && (options.packname || options.author)) {
buffer = await writeExifImg(buff, options)
} else {
buffer = await imageToWebp(buff)
}
await ZimBotInc.sendMessage(jid, { sticker: { url: buffer }, ...options }, { quoted })
return buffer
}
/**
*
* @param {*} jid
* @param {*} text
* @param {*} footer
* @param {*} options
* @returns
*
*/
ZimBotInc.send5ButMsg = (jid, text = '' , footer = '', but = []) =>{
let templateButtons = but
var templateMessage = {
text: text,
footer: footer,
templateButtons: templateButtons
}
ZimBotInc.sendMessage(jid, templateMessage)
}
/**
*
* @param {*} jid
* @param {*} path
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendVideoAsSticker = async (jid, path, quoted, options = {}) => {
let buff = Buffer.isBuffer(path) ? path : /^data:.*?\/.*?;base64,/i.test(path) ? Buffer.from(path.split`,`[1], 'base64') : /^https?:\/\//.test(path) ? await (await getBuffer(path)) : fs.existsSync(path) ? fs.readFileSync(path) : Buffer.alloc(0)
let buffer
if (options && (options.packname || options.author)) {
buffer = await writeExifVid(buff, options)
} else {
buffer = await videoToWebp(buff)
}
await ZimBotInc.sendMessage(jid, { sticker: { url: buffer }, ...options }, { quoted })
return buffer
}
/**
*
* @param {*} message
* @param {*} filename
* @param {*} attachExtension
* @returns
*/
ZimBotInc.downloadAndSaveMediaMessage = async (message, filename, attachExtension = true) => {
let quoted = message.msg ? message.msg : message
let mime = (message.msg || message).mimetype || ''
let messageType = message.mtype ? message.mtype.replace(/Message/gi, '') : mime.split('/')[0]
const stream = await downloadContentFromMessage(quoted, messageType)
let buffer = Buffer.from([])
for await(const chunk of stream) {
buffer = Buffer.concat([buffer, chunk])
}
let type = await FileType.fromBuffer(buffer)
trueFileName = attachExtension ? (filename + '.' + type.ext) : filename
// save to file
await fs.writeFileSync(trueFileName, buffer)
return trueFileName
}
ZimBotInc.downloadMediaMessage = async (message) => {
let mime = (message.msg || message).mimetype || ''
let messageType = message.mtype ? message.mtype.replace(/Message/gi, '') : mime.split('/')[0]
const stream = await downloadContentFromMessage(message, messageType)
let buffer = Buffer.from([])
for await(const chunk of stream) {
buffer = Buffer.concat([buffer, chunk])
}
return buffer
}
/**
*
* @param {*} jid
* @param {*} path
* @param {*} filename
* @param {*} caption
* @param {*} quoted
* @param {*} options
* @returns
*/
ZimBotInc.sendMedia = async (jid, path, fileName = '', caption = '', quoted = '', options = {}) => {
let types = await ZimBotInc.getFile(path, true)
let { mime, ext, res, data, filename } = types
if (res && res.status !== 200 || file.length <= 65536) {
try { throw { json: JSON.parse(file.toString()) } }
catch (e) { if (e.json) throw e.json }
}
let type = '', mimetype = mime, pathFile = filename
if (options.asDocument) type = 'document'
if (options.asSticker || /webp/.test(mime)) {
let { writeExif } = require('./lib/exif')
let media = { mimetype: mime, data }
pathFile = await writeExif(media, { packname: options.packname ? options.packname : global.packname, author: options.author ? options.author : global.author, categories: options.categories ? options.categories : [] })
await fs.promises.unlink(filename)
type = 'sticker'
mimetype = 'image/webp'
}
else if (/image/.test(mime)) type = 'image'
else if (/video/.test(mime)) type = 'video'
else if (/audio/.test(mime)) type = 'audio'
else type = 'document'
await ZimBotInc.sendMessage(jid, { [type]: { url: pathFile }, caption, mimetype, fileName, ...options }, { quoted, ...options })
return fs.promises.unlink(pathFile)
}
/**
*
* @param {*} jid
* @param {*} message
* @param {*} forceForward
* @param {*} options
* @returns
*/
ZimBotInc.sendFile = async(jid, PATH, fileName, quoted = {}, options = {}) => {
let types = await ZimBotInc.getFile(PATH, true)
let { filename, size, ext, mime, data } = types
let type = '', mimetype = mime, pathFile = filename
if (options.asDocument) type = 'document'
if (options.asSticker || /webp/.test(mime)) {
let { writeExif } = require('./lib/sticker.js')
let media = { mimetype: mime, data }
pathFile = await writeExif(media, { packname: global.packname, author: global.packname, categories: options.categories ? options.categories : [] })
await fs.promises.unlink(filename)
type = 'sticker'
mimetype = 'image/webp'
}
else if (/image/.test(mime)) type = 'image'
else if (/video/.test(mime)) type = 'video'
else if (/audio/.test(mime)) type = 'audio'
else type = 'document'
await ZimBotInc.sendMessage(jid, { [type]: { url: pathFile }, mimetype, fileName, ...options }, { quoted, ...options })
return fs.promises.unlink(pathFile)
}
ZimBotInc.parseMention = async(text) => {
return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
}
ZimBotInc.copyNForward = async (jid, message, forceForward = false, options = {}) => {
let vtype
if (options.readViewOnce) {
message.message = message.message && message.message.ephemeralMessage && message.message.ephemeralMessage.message ? message.message.ephemeralMessage.message : (message.message || undefined)
vtype = Object.keys(message.message.viewOnceMessage.message)[0]
delete(message.message && message.message.ignore ? message.message.ignore : (message.message || undefined))
delete message.message.viewOnceMessage.message[vtype].viewOnce
message.message = {
...message.message.viewOnceMessage.message
}
}
let mtype = Object.keys(message.message)[0]
let content = await generateForwardMessageContent(message, forceForward)
let ctype = Object.keys(content)[0]
let context = {}
if (mtype != "conversation") context = message.message[mtype].contextInfo
content[ctype].contextInfo = {
...context,
...content[ctype].contextInfo
}
const waMessage = await generateWAMessageFromContent(jid, content, options ? {
...content[ctype],
...options,
...(options.contextInfo ? {
contextInfo: {
...content[ctype].contextInfo,
...options.contextInfo
}
} : {})
} : {})
await ZimBotInc.relayMessage(jid, waMessage.message, { messageId: waMessage.key.id })
return waMessage
}
ZimBotInc.cMod = (jid, copy, text = '', sender = ZimBotInc.user.id, options = {}) => {
//let copy = message.toJSON()
let mtype = Object.keys(copy.message)[0]
let isEphemeral = mtype === 'ephemeralMessage'
if (isEphemeral) {
mtype = Object.keys(copy.message.ephemeralMessage.message)[0]
}
let msg = isEphemeral ? copy.message.ephemeralMessage.message : copy.message
let content = msg[mtype]
if (typeof content === 'string') msg[mtype] = text || content
else if (content.caption) content.caption = text || content.caption
else if (content.text) content.text = text || content.text
if (typeof content !== 'string') msg[mtype] = {
...content,
...options
}
if (copy.key.participant) sender = copy.key.participant = sender || copy.key.participant
else if (copy.key.participant) sender = copy.key.participant = sender || copy.key.participant
if (copy.key.remoteJid.includes('@s.whatsapp.net')) sender = sender || copy.key.remoteJid
else if (copy.key.remoteJid.includes('@broadcast')) sender = sender || copy.key.remoteJid
copy.key.remoteJid = jid
copy.key.fromMe = sender === ZimBotInc.user.id
return proto.WebMessageInfo.fromObject(copy)
}
/**
*
* @param {*} path
* @returns
*/
ZimBotInc.getFile = async (PATH, save) => {
let res
let data = Buffer.isBuffer(PATH) ? PATH : /^data:.*?\/.*?;base64,/i.test(PATH) ? Buffer.from(PATH.split`,`[1], 'base64') : /^https?:\/\//.test(PATH) ? await (res = await getBuffer(PATH)) : fs.existsSync(PATH) ? (filename = PATH, fs.readFileSync(PATH)) : typeof PATH === 'string' ? PATH : Buffer.alloc(0)
//if (!Buffer.isBuffer(data)) throw new TypeError('Result is not a buffer')
let type = await FileType.fromBuffer(data) || {
mime: 'application/octet-stream',
ext: '.bin'
}
filename = path.join(__filename, '../src/' + new Date * 1 + '.' + type.ext)
if (data && save) fs.promises.writeFile(filename, data)
return {
res,
filename,
size: await getSizeMedia(data),
...type,
data
}
}
return ZimBotInc
}
connectToWhatsApp()
.catch(err => console.log(err))
}
startZimBotInc()
let file = require.resolve(__filename)
fs.watchFile(file, () => {
fs.unwatchFile(file)
console.log(chalk.redBright(`Update ${__filename}`))
delete require.cache[file]
require(file)
})
================================================
FILE: level.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
var fs = require('fs')
let _level = JSON.parse(fs.readFileSync('./database/level.json'))
var getLevelingXp = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].xp
}
}
var getLevelingLevel = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].level
}
}
var getLevelingId = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].id
}
}
var addLevelingXp = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].xp += amount
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
}
var addLevelingLevel = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].level += amount
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
}
var addLevelingId = (sender) => {
var obj = {id: sender, xp: 1, level: 1}
_level.push(obj)
fs.writeFileSync('./database/level.json', JSON.stringify(_level))
}
module.exports = { addLevelingId, addLevelingLevel, addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp }
================================================
FILE: leveluser.json
================================================
[{"id":"6283127014833@s.whatsapp.net","xp":1,"level":1},{"id":"6281365814200@s.whatsapp.net","xp":6374,"level":2}]
================================================
FILE: lib/ApkDown.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
const ApkDown = async (url) => {
const res = await axios.get(url)
const $ = cheerio.load(res.data)
const total = []
$(`div.entry-inner`).each(function(e,hasil){
let desc = $(hasil).find('p').text()
let title = $('div.post-inner.group').find('h1.post-title').text()
let size = $('div#dlbox1').find('ul > li > span').text().split('size: ')[1].split('Update')[0]
let vers = $('div#dlbox1').find('ul > li > span').text().split('Version: ')[1].split('File')[0]
let up = $('div#dlbox1').find('ul > li > span').text().split('Update: ')[1]
let link = $('div#dlbox12').find('li > a').attr('href')
let thumb = $('div#dlbox').find('img').attr('data-src')
total.push({title,size,vers,up,link,thumb,desc})
console.log(total)
})
return (total)
}
module.exports = { ApkDown }
================================================
FILE: lib/Dockerfile
================================================
FROM fusuf/whatsasena:latest
RUN git clone https://github.com/zim-bot/zimbot-v4 /Drips/Zimbotv4
WORKDIR /Drips/Zimbotv4
ENV TZ=Africa/Harare
RUN npm install
RUN npm install supervisor -g
RUN yarn install --ignore-engines
CMD ["node", "index.js"]
================================================
FILE: lib/antispam.js
================================================
const usedCommandRecently = new Set();
const isFiltered = (from) => {
return !!usedCommandRecently.has(from);
};
const addFilter = (from) => {
usedCommandRecently.add(from);
setTimeout(() => {
return usedCommandRecently.delete(from);
}, 1500);// slow commands cmd filtered
};
module.exports = {
msgFilter: {
isFiltered,
addFilter
}};
================================================
FILE: lib/binary.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
async function dBinary(str) {
var newBin = str.split(" ")
var binCode = []
for (i = 0; i < newBin.length; i++) {
binCode.push(String.fromCharCode(parseInt(newBin[i], 2)))
}
return binCode.join("")
}
async function eBinary(str = ''){
let res = ''
res = str.split('').map(char => {
return char.charCodeAt(0).toString(2);
}).join(' ')
return res
}
module.exports = { dBinary, eBinary }
================================================
FILE: lib/cloudDBAdapter.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const got = require('got')
const stringify = obj => JSON.stringify(obj, null, 2)
const parse = str => JSON.parse(str, (_, v) => {
if (
v !== null &&
typeof v === 'object' &&
'type' in v &&
v.type === 'Buffer' &&
'data' in v &&
Array.isArray(v.data)) {
return Buffer.from(v.data)
}
return v
})
class CloudDBAdapter {
constructor(url, {
serialize = stringify,
deserialize = parse,
fetchOptions = {}
} = {}) {
this.url = url
this.serialize = serialize
this.deserialize = deserialize
this.fetchOptions = fetchOptions
}
async read() {
try {
let res = await got(this.url, {
method: 'GET',
headers: {
'Accept': 'application/json;q=0.9,text/plain'
},
...this.fetchOptions
})
if (res.statusCode !== 200) throw res.statusMessage
return this.deserialize(res.body)
} catch (e) {
return null
}
}
async write(obj) {
let res = await got(this.url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
...this.fetchOptions,
body: this.serialize(obj)
})
if (res.statusCode !== 200) throw res.statusMessage
return res.body
}
}
module.exports = CloudDBAdapter
================================================
FILE: lib/color.js
================================================
const chalk = require('chalk')
const color = (text, color) => {
return !color ? chalk.green(text) : chalk.keyword(color)(text)
}
const bgcolor = (text, bgcolor) => {
return !bgcolor ? chalk.green(text) : chalk.bgKeyword(bgcolor)(text)
}
module.exports = {
color,
bgcolor
}
================================================
FILE: lib/converter.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
const path = require('path')
const { spawn } = require('child_process')
function ffmpeg(buffer, args = [], ext = '', ext2 = '') {
return new Promise(async (resolve, reject) => {
try {
let tmp = path.join(__dirname, '../src', + new Date + '.' + ext)
let out = tmp + '.' + ext2
await fs.promises.writeFile(tmp, buffer)
spawn('ffmpeg', [
'-y',
'-i', tmp,
...args,
out
])
.on('error', reject)
.on('close', async (code) => {
try {
await fs.promises.unlink(tmp)
if (code !== 0) return reject(code)
resolve(await fs.promises.readFile(out))
await fs.promises.unlink(out)
} catch (e) {
reject(e)
}
})
} catch (e) {
reject(e)
}
})
}
/**
* Convert Audio to Playable WhatsApp Audio
* @param {Buffer} buffer Audio Buffer
* @param {String} ext File Extension
*/
function toAudio(buffer, ext) {
return ffmpeg(buffer, [
'-vn',
'-ac', '2',
'-b:a', '128k',
'-ar', '44100',
'-f', 'mp3'
], ext, 'mp3')
}
/**
* Convert Audio to Playable WhatsApp PTT
* @param {Buffer} buffer Audio Buffer
* @param {String} ext File Extension
*/
function toPTT(buffer, ext) {
return ffmpeg(buffer, [
'-vn',
'-c:a', 'libopus',
'-b:a', '128k',
'-vbr', 'on',
'-compression_level', '10'
], ext, 'opus')
}
/**
* Convert Audio to Playable WhatsApp Video
* @param {Buffer} buffer Video Buffer
* @param {String} ext File Extension
*/
function toVideo(buffer, ext) {
return ffmpeg(buffer, [
'-c:v', 'libx264',
'-c:a', 'aac',
'-ab', '128k',
'-ar', '44100',
'-crf', '32',
'-preset', 'slow'
], ext, 'mp4')
}
module.exports = {
toAudio,
toPTT,
toVideo,
ffmpeg,
}
================================================
FILE: lib/database.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const path = require('path')
const _fs = require('fs')
const { promises: fs } = _fs
class Database {
/**
* Create new Database
* @param {String} filepath Path to specified json database
* @param {...any} args JSON.stringify arguments
*/
constructor(filepath, ...args) {
this.file = path.resolve(filepath)
this.logger = console
this._load()
this._jsonargs = args
this._state = false
this._queue = []
this._interval = setInterval(async () => {
if (!this._state && this._queue && this._queue[0]) {
this._state = true
await this[this._queue.shift()]().catch(this.logger.error)
this._state = false
}
}, 1000)
}
get data() {
return this._data
}
set data(value) {
this._data = value
this.save()
}
/**
* Queue Load
*/
load() {
this._queue.push('_load')
}
/**
* Queue Save
*/
save() {
this._queue.push('_save')
}
_load() {
try {
return this._data = _fs.existsSync(this.file) ? JSON.parse(_fs.readFileSync(this.file)) : {}
} catch (e) {
this.logger.error(e)
return this._data = {}
}
}
async _save() {
let dirname = path.dirname(this.file)
if (!_fs.existsSync(dirname)) await fs.mkdir(dirname, { recursive: true })
await fs.writeFile(this.file, JSON.stringify(this._data, ...this._jsonargs))
return this.file
}
}
module.exports = Database
================================================
FILE: lib/dungeon.js
================================================
[
{"result": "https://captain.ph/wp-content/uploads/elementor/thumbs/02BW053T1-full-orhl5ufhf1xjxg7jvzfgbp958hpu76oye7paovzb5q.png"},
{"result": "https://i.ibb.co/9vqRLxg/3e12eb3f4b36e34a82d12de594105509.jpg"},
{"result": "https://i.ibb.co/8PNzkDg/d752ce600f6bbf1766aaad0edd184c95.jpg"},
{"result": "https://i.ibb.co/bsXfR0G/b38c234a1d05b14259fc48434830df72.jpg"},
{"result": "https://i.ibb.co/qF4KQBP/18f6ec4f59b6bd373a08df977b0001cf.jpg"},
{"result": "https://i.ibb.co/S61nW0y/fe50010ee76fe9b1e196bcc0144e7e8c.jpg"},
{"result": "https://i.ibb.co/zSLf7k6/a615370161a49003d96a9501c989f50d.jpg"},
{"result": "https://i.ibb.co/PwyzGm0/40354fdd2078127a8a070ac53f41b375.jpg"},
{"result": "https://i.ibb.co/yYgxnT8/dbf7c42c247ca6a46a6fc9f457ebd426.jpg"},
{"result": "https://i.ibb.co/M9nmhjd/b2587af0dd56fc4ec4043fe4bd0bb08b.jpg"},
{"result": "https://i.ibb.co/12kjHBw/4fb43d5685a55304266ffb380b13511b.jpg"},
{"result": "https://i.ibb.co/BnSQCHM/fbad11adbad4b01ce06730c8736bd6cd.jpg"},
{"result": "https://i.ibb.co/0QtYNjL/2fc5a6299b7af23a09aa8e87e878ff2b.jpg"},
{"result": "https://i.ibb.co/BLrgSyz/a25fe0233461b92b7e3be3b801d1963c.jpg"},
{"result": "https://i.ibb.co/cyXShW7/affbb1aa3fbe454f02246f1caf34cc71.jpg"},
{"result": "https://i.ibb.co/dGKXSz5/8f6ef6cb64eca372c8e9e50b7f83be1e.jpg"},
{"result": "https://i.ibb.co/9pKDV3C/072ab52b8430e4b8e71d2e13047ec81c.jpg"},
{"result": "https://i.ibb.co/fFqWPSN/9c2446a43e0406bfaa88b858b5af2b71.jpg"},
{"result": "https://i.ibb.co/bm1N9S6/0b85fd508fe76a7e06d0c285657e5700.jpg"},
{"result": "https://i.ibb.co/3yzhzdy/138655764fe4c350751c3d6a19b32d6e.jpg"},
{"result": "https://i.ibb.co/MNt4Twv/54d533aa1d0575ceb06c333dc2f6792c.jpg"},
{"result": "https://i.ibb.co/wcyCGRt/368e980738474028e1c51885c996bc42.jpg"},
{"result": "https://i.ibb.co/Scxq9KP/9141293b902071dece21a2fa08c92793.jpg"},
{"result": "https://i.ibb.co/MstjyJf/bc4c1b3796c70215b2e4fc498442c878.jpg"},
{"result": "https://i.ibb.co/hyX6P8C/1b8a923dbaa16cc909f60fd02d3bc0c1.jpg"},
{"result": "https://i.ibb.co/pLGLXgy/c351093ace6c8012f7bb270d19eab06e.jpg"},
{"result": "https://i.ibb.co/bWyQmP9/6a0538e61abc583ebfd77c9f0afcf144.jpg"},
{"result": "https://i.ibb.co/8xMtczB/b0f1219d622546aac56c6c532f117cb5.jpg"},
{"result": "https://i.ibb.co/YthC5Vm/fc50206cc9fa552b057852d5a5b626af.jpg"},
{"result": "https://i.ibb.co/dWJFDHw/1a5e7e4cb65c318866f83dfa9dc95f94.jpg"},
{"result": "https://i.ibb.co/mSnKN0t/e325358236b5a117512f639f52ee7cdf.jpg"}
]
================================================
FILE: lib/exif.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
const { tmpdir } = require("os")
const Crypto = require("crypto")
const ff = require('fluent-ffmpeg')
const webp = require("node-webpmux")
const path = require("path")
async function imageToWebp (media) {
const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`)
fs.writeFileSync(tmpFileIn, media)
await new Promise((resolve, reject) => {
ff(tmpFileIn)
.on("error", reject)
.on("end", () => resolve(true))
.addOutputOptions([
"-vcodec",
"libwebp",
"-vf",
"scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse"
])
.toFormat("webp")
.save(tmpFileOut)
})
const buff = fs.readFileSync(tmpFileOut)
fs.unlinkSync(tmpFileOut)
fs.unlinkSync(tmpFileIn)
return buff
}
async function videoToWebp (media) {
const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`)
fs.writeFileSync(tmpFileIn, media)
await new Promise((resolve, reject) => {
ff(tmpFileIn)
.on("error", reject)
.on("end", () => resolve(true))
.addOutputOptions([
"-vcodec",
"libwebp",
"-vf",
"scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse",
"-loop",
"0",
"-ss",
"00:00:00",
"-t",
"00:00:05",
"-preset",
"default",
"-an",
"-vsync",
"0"
])
.toFormat("webp")
.save(tmpFileOut)
})
const buff = fs.readFileSync(tmpFileOut)
fs.unlinkSync(tmpFileOut)
fs.unlinkSync(tmpFileIn)
return buff
}
async function writeExifImg (media, metadata) {
let wMedia = await imageToWebp(media)
const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
fs.writeFileSync(tmpFileIn, wMedia)
if (metadata.packname || metadata.author) {
const img = new webp.Image()
const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] }
const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
const exif = Buffer.concat([exifAttr, jsonBuff])
exif.writeUIntLE(jsonBuff.length, 14, 4)
await img.load(tmpFileIn)
fs.unlinkSync(tmpFileIn)
img.exif = exif
await img.save(tmpFileOut)
return tmpFileOut
}
}
async function writeExifVid (media, metadata) {
let wMedia = await videoToWebp(media)
const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
fs.writeFileSync(tmpFileIn, wMedia)
if (metadata.packname || metadata.author) {
const img = new webp.Image()
const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] }
const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
const exif = Buffer.concat([exifAttr, jsonBuff])
exif.writeUIntLE(jsonBuff.length, 14, 4)
await img.load(tmpFileIn)
fs.unlinkSync(tmpFileIn)
img.exif = exif
await img.save(tmpFileOut)
return tmpFileOut
}
}
async function writeExif (media, metadata) {
let wMedia = /webp/.test(media.mimetype) ? media.data : /image/.test(media.mimetype) ? await imageToWebp(media.data) : /video/.test(media.mimetype) ? await videoToWebp(media.data) : ""
const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`)
fs.writeFileSync(tmpFileIn, wMedia)
if (metadata.packname || metadata.author) {
const img = new webp.Image()
const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] }
const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00])
const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8")
const exif = Buffer.concat([exifAttr, jsonBuff])
exif.writeUIntLE(jsonBuff.length, 14, 4)
await img.load(tmpFileIn)
fs.unlinkSync(tmpFileIn)
img.exif = exif
await img.save(tmpFileOut)
return tmpFileOut
}
}
module.exports = { imageToWebp, videoToWebp, writeExifImg, writeExifVid, writeExif }
================================================
FILE: lib/fetcher.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fetch = require('node-fetch')
const fs = require('fs')
const { spawn } = require("child_process")
const ff = require('fluent-ffmpeg')
const { getRandom } = require('./functions')
exports.getBase64 = getBase64 = async (url) => {
const response = await fetch(url, { headers: { 'User-Agent': 'okhttp/4.5.0' } });
if (!response.ok) throw new Error(`unexpected response ${response.statusText}`);
const buffer = await response.buffer();
const videoBase64 = `data:${response.headers.get('content-type')};base64,` + buffer.toString('base64');
if (buffer)
return videoBase64;
};
exports.getBuffer = getBuffer = async (url) => {
const res = await fetch(url, {headers: { 'User-Agent': 'okhttp/4.5.0'}, method: 'GET' })
const anu = fs.readFileSync('./src/emror.jpg')
if (!res.ok) return { type: 'image/jpeg', result: anu }
const buff = await res.buffer()
if (buff)
return { type: res.headers.get('content-type'), result: buff }
}
exports.fetchJson = fetchJson = (url, options) => new Promise(async (resolve, reject) => {
fetch(url, options)
.then(response => response.json())
.then(json => {
// console.log(json)
resolve(json)
})
.catch((err) => {
reject(err)
})
})
exports.fetchText = fetchText = (url, options) => new Promise(async (resolve, reject) => {
fetch(url, options)
.then(response => response.text())
.then(text => {
// console.log(text)
resolve(text)
})
.catch((err) => {
reject(err)
})
})
exports.kyun = (seconds) =>{
function pad(s) {
return (s < 10 ? '0' : '') + s;
}
var hours = Math.floor(seconds / (60 * 60));
var minutes = Math.floor(seconds % (60 * 60) / 60);
var seconds = Math.floor(seconds % 60);
//return pad(hours) + ':' + pad(minutes) + ':' + pad(seconds)
return `${pad(hours)}Jam - ${pad(minutes)}Menit - ${pad(seconds)}Detik\n\n 「 𝗕𝗔𝗜𝗟𝗘𝗬𝗦 𝗦𝗘𝗟𝗙𝗕𝗢𝗧 」`
}
exports.createExif = (pack, auth) =>{
const code = [0x00,0x00,0x16,0x00,0x00,0x00]
const exif = {"sticker-pack-id": "com.client.tech", "sticker-pack-name": pack, "sticker-pack-publisher": auth, "android-app-store-link": "https://play.google.com/store/apps/details?id=com.termux", "ios-app-store-link": "https://itunes.apple.com/app/sticker-maker-studio/id1443326857"}
let len = JSON.stringify(exif).length
if (len > 256) {
len = len - 256
code.unshift(0x01)
} else {
code.unshift(0x00)
}
if (len < 16) {
len = len.toString(16)
len = "0" + len
} else {
len = len.toString(16)
}
//len = len < 16 ? `0${len.toString(16)}` : len.toString(16)
const _ = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00]);
const __ = Buffer.from(len, "hex")
const ___ = Buffer.from(code)
const ____ = Buffer.from(JSON.stringify(exif))
fs.writeFileSync('./stik/data.exif', Buffer.concat([_, __, ___, ____]), function (err) {
console.log(err)
if (err) return console.error(err)
return `./stik/data.exif`
})
}
exports.modStick = (media, client, mek, from) => {
out = getRandom('.webp')
try {
console.log(media)
spawn('webpmux', ['-set','exif', './stik/data.exif', media, '-o', out])
.on('exit', () => {
client.sendMessage(from, fs.readFileSync(out), 'stickerMessage', {quoted: mek})
fs.unlinkSync(out)
fs.unlinkSync(media)
})
} catch (e) {
console.log(e)
client.sendMessage(from, 'Terjadi keslahan', 'conversation', { quoted: mek })
fs.unlinkSync(media)
}
}
//exports.getBase64 = getBase64;
================================================
FILE: lib/image.js
================================================
[
{"result": "https://telegra.ph/file/6fac7d4b55a3d1b564b92.jpg"},
{"result": "https://telegra.ph/file/1eb545f89e4f9ba4e7207.jpg"},
{"result": "https://telegra.ph/file/2426ba69f82de8fe209bc.jpg"},
{"result": "https://telegra.ph/file/b17feb2aeca1963704709.jpg"},
{"result": "https://telegra.ph/file/5f11e0e215b489ea1b498.jpg"}
]
================================================
FILE: lib/level.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
var fs = require('fs')
let _level = JSON.parse(fs.readFileSync('./Database/level.json'))
var getLevelingXp = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].xp
}
}
var getLevelingLevel = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].level
}
}
var getLevelingId = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].id
}
}
var addLevelingXp = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].xp += amount
fs.writeFileSync('./Database/level.json', JSON.stringify(_level))
}
}
var addLevelingLevel = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].level += amount
fs.writeFileSync('./Database/level.json', JSON.stringify(_level))
}
}
var addLevelingId = (sender) => {
var obj = {id: sender, xp: 1, level: 1}
_level.push(obj)
fs.writeFileSync('./Database/level.json', JSON.stringify(_level))
}
module.exports = { addLevelingId, addLevelingLevel, addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp }
================================================
FILE: lib/levelling.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
export const growth = Math.pow(Math.PI / Math.E, 1.618) * Math.E * .75
export function xpRange(level, multiplier = global.multiplier || 1) {
if (level < 0)
throw new TypeError('level cannot be negative value')
level = Math.floor(level)
let min = level === 0 ? 0 : Math.round(Math.pow(level, growth) * multiplier) + 1
let max = Math.round(Math.pow(++level, growth) * multiplier)
return {
min,
max,
xp: max - min
}
}
export function findLevel(xp, multiplier = global.multiplier || 1) {
if (xp === Infinity)
return Infinity
if (isNaN(xp))
return NaN
if (xp <= 0)
return -1
let level = 0
do
level++
while (xpRange(level, multiplier).min <= xp)
return --level
}
export function canLevelUp(level, xp, multiplier = global.multiplier || 1) {
if (level < 0)
return false
if (xp === Infinity)
return true
if (isNaN(xp))
return false
if (xp <= 0)
return false
return level < findLevel(xp, multiplier)
}
================================================
FILE: lib/limit.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
exports.isLimit = function(sender, isPremium, isOwner, limitCount, _db){
if (isOwner) return false
if (isPremium) return false
let found = false
for (let i of _db) {
if (i.id === sender) {
let limits = i.limit
if (limits >= limitCount) {
found = true
return true
} else {
found = true
return false
}
}
}
if (found === false) {
const obj = { id: sender, limit: 0 }
_db.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
return false
}
}
exports.limitAdd = function(sender, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
_db[found].limit += 1
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.getLimit = function(sender, limitCount, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
return limitCount - _db[found].limit
} else {
return limitCount
}
}
exports.giveLimit = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].limit -= duit
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
} else {
const njt = duit - duit - duit
const bulim = ({
id: pemain,
limit: njt
})
_db.push(bulim)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.addBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance += duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
} else {
const bulin = ({
id: sender,
balance: duit
})
_db.push(bulin)
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.kurangBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance -= duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.getBalance = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].balance
} else {
return 0
}
}
exports.isGame = function(sender, isOwner, gcount, _db){
if (isOwner) {return false;}
let found = false;
for (let i of _db){
if(i.id === sender){
let limits = i.glimit;
if (limits >= gcount) {
found = true;
return true;
}else{
found = true;
return false;
}
}
}
if (found === false){
let obj = {id: sender, glimit:0};
_db.push(obj);
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
return false;
}
}
exports.gameAdd = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].glimit += 1;
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
}
}
exports.givegame = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].glimit -= duit
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
} else {
const njti = duit - duit - duit
const bulimi = ({
id: pemain,
glimit: njti
})
_db.push(bulimi)
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
}
}
exports.cekGLimit = function(sender, gcount, _db){
let position = false
Object.keys(_db).forEach((i) => {
if(_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return gcount - _db[position].glimit
} else {
return gcount
}
}
exports.createHit = function(sender, _db){
const anohoh = { id: sender, hit: 0}
_db.push(anohoh);
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));''
}
exports.AddHit = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].hit += 1;
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));
}
}
exports.gethitUser = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].hit
}
}
================================================
FILE: lib/limit2.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _limitOrg = JSON.parse(fs.readFileSync('./database/limit.json'))
let setting = JSON.parse(fs.readFileSync('./apikey.json'))
let limitCount = setting.limitCount
const addInventoriLimit = (sender) => {
const obj = {id: sender, limit: limitCount}
_limitOrg.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
const cekDuluJoinAdaApaKagaLimitnyaDiJson = (sender) => {
let status = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
status = true
}
})
return status
}
const addLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit += amount
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
}
const kurangLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit -= amount
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
}
const getLimit = (sender) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
return _limitOrg[position].limit
}
}
module.exports = { addInventoriLimit, cekDuluJoinAdaApaKagaLimitnyaDiJson, addLimit, kurangLimit, getLimit }
================================================
FILE: lib/limit3.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
exports.isLimit = function(sender, isPremium, isOwner, limitCount, _db){
if (isOwner) return false
if (isPremium) return false
let found = false
for (let i of _db) {
if (i.id === sender) {
let limits = i.limit
if (limits >= limitCount) {
found = true
return true
} else {
found = true
return false
}
}
}
if (found === false) {
const obj = { id: sender, limit: 0 }
_db.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
return false
}
}
exports.limitAdd = function(sender, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
_db[found].limit += 1
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.getLimit = function(sender, limitCount, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
return limitCount - _db[found].limit
} else {
return limitCount
}
}
exports.giveLimit = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].limit -= duit
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
} else {
const njt = duit - duit - duit
const bulim = ({
id: pemain,
limit: njt
})
_db.push(bulim)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.addBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance += duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
} else {
const bulin = ({
id: sender,
balance: duit
})
_db.push(bulin)
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.kurangBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance -= duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.getBalance = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].balance
} else {
return 0
}
}
exports.isGame = function(sender, isOwner, gcount, _db){
if (isOwner) {return false;}
let found = false;
for (let i of _db){
if(i.id === sender){
let limits = i.glimit;
if (limits >= gcount) {
found = true;
return true;
}else{
found = true;
return false;
}
}
}
if (found === false){
let obj = {id: sender, glimit:0};
_db.push(obj);
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
return false;
}
}
exports.gameAdd = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].glimit += 1;
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
}
}
exports.givegame = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].glimit -= duit
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
} else {
const njti = duit - duit - duit
const bulimi = ({
id: pemain,
glimit: njti
})
_db.push(bulimi)
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
}
}
exports.cekGLimit = function(sender, gcount, _db){
let position = false
Object.keys(_db).forEach((i) => {
if(_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return gcount - _db[position].glimit
} else {
return gcount
}
}
exports.createHit = function(sender, _db){
const anohoh = { id: sender, hit: 0}
_db.push(anohoh);
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));''
}
exports.AddHit = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].hit += 1;
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));
}
}
exports.gethitUser = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].hit
}
}
================================================
FILE: lib/limitbb.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _limitOrg = JSON.parse(fs.readFileSync('./database/limit.json'))
const Options = require('../config.js')
let limitawal = Options.limitawal
const addInventoriLimit = (sender) => {
const obj = {id: sender, limit: limitawal}
_limitOrg.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
const cekDuluJoinAdaApaKagaLimitnyaDiJson = (sender) => {
let status = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
status = true
}
})
return status
}
const addLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit += amount
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
}
const kurangLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit -= amount
fs.writeFileSync('./database/limit.json', JSON.stringify(_limitOrg))
}
}
const getLimit = (sender) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
return _limitOrg[position].limit
}
}
module.exports = { addInventoriLimit, cekDuluJoinAdaApaKagaLimitnyaDiJson, addLimit, kurangLimit, getLimit }
================================================
FILE: lib/limitc.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
exports.isLimit = function(sender, isPremium, isOwner, limitCount, _db){
if (isOwner) return false
if (isPremium) return false
let found = false
for (let i of _db) {
if (i.id === sender) {
let limits = i.limit
if (limits >= limitCount) {
found = true
return true
} else {
found = true
return false
}
}
}
if (found === false) {
const obj = { id: sender, limit: 0 }
_db.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
return false
}
}
exports.limitAdd = function(sender, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
_db[found].limit += 1
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.getLimit = function(sender, limitCount, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
return limitCount - _db[found].limit
} else {
return limitCount
}
}
exports.giveLimit = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].limit -= duit
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
} else {
const njt = duit - duit - duit
const bulim = ({
id: pemain,
limit: njt
})
_db.push(bulim)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.addBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance += duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
} else {
const bulin = ({
id: sender,
balance: duit
})
_db.push(bulin)
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.kurangBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance -= duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.getBalance = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].balance
} else {
return 0
}
}
exports.isGame = function(sender, isOwner, gcount, _db){
if (isOwner) {return false;}
let found = false;
for (let i of _db){
if(i.id === sender){
let limits = i.glimit;
if (limits >= gcount) {
found = true;
return true;
}else{
found = true;
return false;
}
}
}
if (found === false){
let obj = {id: sender, glimit:0};
_db.push(obj);
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
return false;
}
}
exports.gameAdd = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].glimit += 1;
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
}
}
exports.givegame = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].glimit -= duit
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
} else {
const njti = duit - duit - duit
const bulimi = ({
id: pemain,
glimit: njti
})
_db.push(bulimi)
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
}
}
exports.cekGLimit = function(sender, gcount, _db){
let position = false
Object.keys(_db).forEach((i) => {
if(_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return gcount - _db[position].glimit
} else {
return gcount
}
}
exports.createHit = function(sender, _db){
const anohoh = { id: sender, hit: 0}
_db.push(anohoh);
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));''
}
exports.AddHit = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].hit += 1;
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));
}
}
exports.gethitUser = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].hit
}
}
================================================
FILE: lib/lirik.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const cheerio = require('cheerio')
const axios = require('axios')
const lirikLagu = async (query) => {
const res = await axios.get(`https://www.musixmatch.com/search/${query}`)
const sup = cheerio.load(res.data)
const hasil = []
const b = sup('#site').find('div > div > div > div > ul > li:nth-child(1) > div > div > div')
let link = `https://www.musixmatch.com` + sup(b).find('h2 > a').attr('href')
const des = await axios.get(link)
const soup = cheerio.load(des.data)
const result = soup('#site').find('.mxm-lyrics__content > .lyrics__content__ok').text()
hasil.push({ result})
return hasil
}
module.exports = { lirikLagu }
================================================
FILE: lib/liyascrape.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
function pinterest(querry){
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
source: 'https://www.besthdwallpaper.com/'+$(b).find('div > a:nth-child(3)').attr('href'),
image: [$(b).find('picture > img').attr('data-src') || $(b).find('picture > img').attr('src'), $(b).find('picture > source:nth-child(1)').attr('srcset'), $(b).find('picture > source:nth-child(2)').attr('srcset')]
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function quotesAnime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve(data)
})
})
})
}
function umma(url) {
return new Promise((resolve, reject) => {
axios.get(url)
.then((res) => {
let $ = cheerio.load(res.data)
let image = []
$('#article-content > div').find('img').each(function (a, b) {
image.push($(b).attr('src'))
})
let hasil = {
title: $('#wrap > div.content-container.font-6-16 > h1').text().trim(),
author: {
name: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.user-ame.font-6-16.fw').text().trim(),
profilePic: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.profile-photo > img.photo').attr('src')
},
caption: $('#article-content > div > p').text().trim(),
media: $('#article-content > div > iframe').attr('src') ? [$('#article-content > div > iframe').attr('src')] : image,
type: $('#article-content > div > iframe').attr('src') ? 'video' : 'image',
like: $('#wrap > div.bottom-btns > div > button:nth-child(1) > div.text.font-6-12').text(),
}
resolve(hasil)
})
})
}
function ringtone(title) {
return new Promise((resolve, reject) => {
axios.get('https://meloboom.com/en/search/'+title)
.then((get) => {
let $ = cheerio.load(get.data)
let hasil = []
$('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) {
hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') })
})
resolve(hasil)
})
})
}
function styletext(teks) {
return new Promise((resolve, reject) => {
axios.get('http://qaz.wtf/u/convert.cgi?text='+teks)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('table > tbody > tr').each(function (a, b) {
hasil.push({ name: $(b).find('td:nth-child(1) > span').text(), result: $(b).find('td:nth-child(2)').text().trim() })
})
resolve(hasil)
})
})
}
module.exports = { pinterest, wallpaper, wikimedia, quotesAnime, aiovideodl, umma, ringtone, styletext }
================================================
FILE: lib/lol.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const { JSDOM } = require('jsdom')
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require('axios')
const qs = require('qs')
module.exports = {
aiovideodl,
filmapik,
ssweb,
hoax,
sfilesearch,
happymod,
servermc,
gempa,
mediafire,
telegraph,
ghstalk,
komiku,
lirik,
covid,
otaku,
shoppe,
inews,
jalantikus,
kompasnews,
tribunnews,
tafsirsurah,
surah,
listsurah,
stickersearch,
drakor,
mangatoons,
webtoons,
wattpaduser,
wattpad,
film,
pinterest,
jadwalsholat,
jadwaltv,
jadwalbola,
character,
manga,
anime,
soundcloud,
xnxxsearch,
xnxxdl,
herodetails,
herolist,
playstore,
tiktokporn,
hentai,
quotesanime,
wallpaper,
wikimedia,
facebook,
facebook2,
_token,
quotes,
igdl,
igstory,
igstory2,
snaptik,
tiktok,
twitter,
joox,
pin
}
function quotes(input) {
return new Promise((resolve, reject) => {
fetch('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1')
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
data = []
$('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) {
x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim()
y = $(this).find('span[class="auteur-beschrijving"]').text().trim()
z = $(element).find('q[class="fbquote"]').text().trim()
data.push({ author: x, bio: y, quote: z })
})
data.splice(2, 1)
if (data.length == 0) return resolve({ creator: '@rasel.ganz', status: false })
resolve({ creator: '@rasel.ganz', status: true, data })
}).catch(reject)
})
}
function joox(query) {
return new Promise((resolve, reject) => {
const time = Math.floor(new Date() / 1000)
axios.get('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=' + query + '&pn=1&sin=0&ein=29&_=' + time)
.then(({ data }) => {
let result = []
let hasil = []
let promoses = []
let ids = []
data.itemlist.forEach(result => {
ids.push(result.songid)
});
for (let i = 0; i < data.itemlist.length; i++) {
const get = 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=' + ids[i]
promoses.push(
axios.get(get, {
headers: {
Cookie: 'wmid=142420656; user_type=1; country=id; session_key=2a5d97d05dc8fe238150184eaf3519ad;'
}
})
.then(({ data }) => {
const res = JSON.parse(data.replace('MusicInfoCallback(', '').replace('\n)', ''))
hasil.push({
lagu: res.msong,
album: res.malbum,
penyanyi: res.msinger,
publish: res.public_time,
img: res.imgSrc,
mp3: res.mp3Url
})
Promise.all(promoses).then(() => resolve({
creator: "@rasel.ganz",
status: true,
data: hasil,
}))
}).catch(reject)
)
}
}).catch(reject)
})
}
function tiktok(url) {
return new Promise(async (resolve, reject) => {
axios.get('https://ttdownloader.com/', {
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
let token = $('#token').attr('value')
let config = {
'url': url,
'format': '',
'token': token
}
axios('https://ttdownloader.com/req/', {
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
nowm: $('div:nth-child(2) > div.download > a').attr('href'),
wm: $('div:nth-child(3) > div.download > a').attr('href'),
audio: $('div:nth-child(4) > div.download > a').attr('href')
})
})
})
.catch(reject)
})
}
async function snaptik(url) {
try {
let results = {}
if (/v[tm]\.tiktok\.com/g.test(url)) {
let res = await axios.get(url)
url = res.request.res.responseUrl
}
let key = await axios.get(`https://api.snaptik.site/video-key?video_url=${url}`)
key = JSON.parse(JSON.stringify(key.data, null, 2))
if (key.status !== 'success') throw key
let data = await axios.get(`https://api.snaptik.site/video-details-by-key?key=${key.data.key}`)
data = JSON.parse(JSON.stringify(data.data, null, 2))
if (data.status !== 'success') throw data
results = {
author: { ...data.data.author },
description: data.data.description,
video: {
with_watermark: `https://api.snaptik.site/download?key=${data.data.video.with_watermark}&type=video`,
no_watermark: `https://api.snaptik.site/download?key=${data.data.video.no_watermark}&type=video`,
no_watermark_raw: data.data.video.no_watermark_raw
},
music: `https://api.snaptik.site/download?key=${data.data.music}&type=music`
}
return results
} catch (e) {
throw `Maaf url tidak valid atau video private`
}
}
function twitter(url) {
return new Promise((resolve, reject) => {
let params = new URLSearchParams()
params.append('URL', url)
fetch('https://twdown.net/download.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res);
data = []
$('div.container').find('tbody > tr > td').each(function (index, element) {
x = $(this).find('a').attr('href')
if (x !== '#') {
if (typeof x !== 'undefined') {
data.push({ url: x })
}
}
})
if (data.length == 0) return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
function igdl(url) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/download-instagram-videos.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': url,
'action': 'post',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
function igstory(username) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/instagram-story-downloader.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': 'https://www.instagram.com/' + username,
'action': 'story',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
async function igstory2(username) {
let { data } = await axios.get(`https://www.instadownloader.org/data.php?username=${username}&t=${new Date * 1}`)
const $ = cheerio.load(data)
let results = []
$('body > center').each(function (i, el) {
results.push({
url: $(el).find('a.download-btn').attr('href'),
type: $(el).find('video').html() ? 'video' : 'image'
})
})
return results
}
function pin(url) {
return new Promise((resolve, reject) => {
function rand() {
return `${Math.floor(Math.random() * 1000000)}`
}
let params = new URLSearchParams()
params.append('url', url)
fetch('https://www.expertsphp.com/facebook-video-downloader.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
y = 'pinterest_' + rand() + '.mp4'
x = $('video').find('source').attr('src')
data = { file: y, url: x }
if (typeof x == 'undefined') return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
let is = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
}
}
function _token(host) {
return new Promise(async (resolve, reject) => {
axios.request({
url: host, method: 'GET', headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
}).then(({ data }) => {
let $ = cheerio.load(data)
let token = $('#token').attr('value')
resolve(token)
})
})
}
function facebook(url){
return new Promise((resolve,reject) => {
let config = {
'url': url
}
axios('https://www.getfvid.com/downloader',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"content-type": "application/x-www-form-urlencoded",
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss"
}
})
.then(async({ data }) => {
const $ = cheerio.load(data);
resolve({
video: $('div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'),
audio: $('div.col-md-4.btns-download > p:nth-child(3) > a').attr('href')
})
})
.catch(reject)
})
}
function facebook2(urls) {
return new Promise(async (resolve, reject) => {
const data = await axios({
url: 'https://downvideo.net/',
method: 'GET',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
}
})
const $ = cheerio.load(data.data)
const token = $('#token').attr('value')
const getPost = await axios({
url: 'https://downvideo.net/download.php',
method: 'POST',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
"cookie": '_gid=GA1.2.1321544464.1633811193; _ga=GA1.2.1392580783.1633811193; __gads=ID=c73de99d7fa5c467-226981f63ecc00f1:T=1633811193:RT=1633811193:S=ALNI_MaC9fW2mqfT2hm7zODcNNffab1XLg'
},
data: new URLSearchParams(Object.entries({ 'URL': urls, 'token': token }))
})
const c = cheerio.load(getPost.data)
const hasil = {
author: c('div.row').find('div.col-md-12:nth-child(1)').text(),
title: c('div.row').find('div.col-md-12:nth-child(3) > p').text(),
thumb: c('div.row').find('div.col-md-12:nth-child(2) > img').attr('src'),
link_high: c('div.row').find('div.col-md-3 > a').eq(0).attr('href') || c('div.row').find('#sd > a').attr('href') || '',
link_normal: c('div.row').find('div.col-md-3 > a').eq(1).attr('href') || ''
}
resolve({ status: getPost.status, creator: '@rasel.ganz', hasil: hasil })
})
}
function wallpaper(title, page) {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
image: $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function tiktokporn() {
return new Promise((resolve, reject) => {
axios.get('https://tikporntok.com/?random=1')
.then((res) => {
const $ = cheerio.load(res.data)
const hasil = {}
hasil.title = $('article > h1').text()
hasil.source = $('article > div.video-wrapper.vxplayer').attr('data-post') || 'Web Not Response'
hasil.thumb = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-poster') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
hasil.desc = $('article > div.intro').text()
hasil.upload = $('article > div.single-pre-meta.ws.clearfix > time').text()
hasil.like = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(1) > span').text()
hasil.dislike = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(2) > span').text()
hasil.favorite = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(3) > span').text()
hasil.views = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(4) > span').text()
hasil.tags = $('article > div.post-tags').text()
hasil.video = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('src') || $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-src') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
resolve(hasil)
})
})
}
function hentai() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 1153)
axios.get('https://sfmcompile.club/page/'+page)
.then((data) => {
const $ = cheerio.load(data.data)
const hasil = []
$('#primary > div > div > ul > li > article').each(function (a, b) {
hasil.push({
title: $(b).find('header > h2').text(),
link: $(b).find('header > h2 > a').attr('href'),
category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''),
share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(),
views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(),
type: $(b).find('source').attr('type') || 'image/jpeg',
video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'),
video_2: $(b).find('video > a').attr('href') || ''
})
})
resolve(hasil)
})
})
}
function quotesanime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
function playstore(name) {
return new Promise((resolve, reject) => {
axios.get('https://play.google.com/store/search?q='+ name +'&c=apps')
.then(({ data }) => {
const $ = cheerio.load(data)
let ln = [];
let nm = [];
let dv = [];
let lm = [];
const result = [];
$('div.wXUyZd > a').each(function(a,b){
const link = 'https://play.google.com' + $(b).attr('href')
ln.push(link);
})
$('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){
const name = $(e).text().trim()
nm.push(name);
})
$('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){
const dev = $(g).text().trim();
dv.push(dev)
})
$('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){
const limk = 'https://play.google.com' + $(i).attr('href');
lm.push(limk);
})
for (let i = 0; i < ln.length; i++){
result.push({
name: nm[i],
link: ln[i],
developer: dv[i],
link_dev: lm[i]
})
}
resolve(result)
})
.catch(reject)
})
}
function herolist() {
return new Promise((resolve, reject) => {
Axios.get('https://mobile-legends.fandom.com/wiki/Mobile_Legends:_Bang_Bang_Wiki')
.then(({ data }) => {
const $ = cheerio.load(data)
let data_hero = []
let url = []
$('div > div > span > span > a').get().map((result) => {
const name = decodeURIComponent($(result).attr('href').replace('/wiki/',''))
const urln = 'https://mobile-legends.fandom.com' + $(result).attr('href')
data_hero.push(name)
url.push(urln)
})
resolve({ status: 200, hero: data_hero })
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function herodetails(name) {
return new Promise((resolve, reject) => {
var splitStr = name.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
}
const que = splitStr.join(' ')
Axios.get('https://mobile-legends.fandom.com/wiki/' + que)
.then(({ data }) => {
const $ = cheerio.load(data)
let mw = []
let attrib = []
let skill = []
const name = $('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > table > tbody > tr > td > font > b').text()
$('.mw-headline').get().map((res) => {
const mwna = $(res).text()
mw.push(mwna)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td').get().map((rest) => {
const haz = $(rest).text().replace(/\n/g,'')
attrib.push(haz)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > div.progressbar-small.progressbar > div').get().map((rest) => {
skill.push($(rest).attr('style').replace('width:',''))
})
Axios.get('https://mobile-legends.fandom.com/wiki/' + que + '/Story')
.then(({ data }) => {
const $ = cheerio.load(data)
let pre = []
$('#mw-content-text > div > p').get().map((rest) => {
pre.push($(rest).text())
})
const story = pre.slice(3).join('\n')
const items = []
const character = []
$('#mw-content-text > div > aside > section > div').get().map((rest) => {
character.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
$('#mw-content-text > div > aside > div').get().map((rest) => {
items.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
const img = $('#mw-content-text > div > aside > figure > a').attr('href')
const chara = character.slice(0,2)
const result = {
status: 200,
hero_name: name + ` ( ${mw[0].replace('CV:',' CV:')} )`,
entrance_quotes: attrib[2].replace('Entrance Quotes','').replace('\n',''),
hero_feature: attrib[attrib.length - 1].replace('Hero Feature',''),
image: img,
items: items,
character: {
chara
},
attributes: {
movement_speed: attrib[12].replace('● Movement Speed',''),
physical_attack: attrib[13].replace('● Physical Attack',''),
magic_power: attrib[14].replace('● Magic Power',''),
attack_speed: attrib[15].replace('● Attack Speed',''),
physical_defense: attrib[16].replace('● Physical Defense',''),
magic_defense: attrib[17].replace('● Magic Defense',''),
basic_atk_crit_rate: attrib[18].replace('● Basic ATK Crit Rate',''),
hp: attrib[19].replace('● HP',''),
mana: attrib[20].replace('● Mana',''),
ability_crit_rate: attrib[21].replace('● Ability Crit Rate',''),
hp_regen: attrib[22].replace('● HP Regen',''),
mana_regen: attrib[23].replace('● Mana Regen','')
},
price: {
battle_point: mw[1].split('|')[0].replace(/ /g,''),
diamond: mw[1].split('|')[1].replace(/ /g,''),
hero_fragment: mw[1].split('|')[2] ? mw[1].split('|')[2].replace(/ /g,'') : 'none'
},
role: mw[2],
skill: {
durability: skill[0],
offense: skill[1],
skill_effects: skill[2],
difficulty: skill[3]
},
speciality: mw[3],
laning_recommendation: mw[4],
release_date: mw[5],
background_story: story
}
resolve(result)
}).catch((e) => reject({ status: 404, message: e.message }))
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function xnxxsearch(query) {
return new Promise((resolve, reject) => {
const baseurl = 'https://www.xnxx.com'
fetch(`${baseurl}/search/${query}/${Math.floor(Math.random() * 3) + 1}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
let title = [];
let url = [];
let desc = [];
let results = [];
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb').each(function(c, d) {
url.push(baseurl+$(d).find('a').attr('href').replace("/THUMBNUM/", "/"))
})
})
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb-under').each(function(c, d) {
desc.push($(d).find('p.metadata').text())
$(d).find('a').each(function(e,f) {
title.push($(f).attr('title'))
})
})
})
for (let i = 0; i < title.length; i++) {
results.push({
title: title[i],
info: desc[i],
link: url[i]
})
}
resolve({
code: 200,
status: true,
result: results
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
function xnxxdl(URL) {
return new Promise((resolve, reject) => {
fetch(`${URL}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
const title = $('meta[property="og:title"]').attr('content');
const duration = $('meta[property="og:duration"]').attr('content');
const image = $('meta[property="og:image"]').attr('content');
const videoType = $('meta[property="og:video:type"]').attr('content');
const videoWidth = $('meta[property="og:video:width"]').attr('content');
const videoHeight = $('meta[property="og:video:height"]').attr('content');
const info = $('span.metadata').text();
const videoScript = $('#video-player-bg > script:nth-child(6)').html();
const files = {
low: (videoScript.match('html5player.setVideoUrlLow\\(\'(.*?)\'\\);') || [])[1],
high: videoScript.match('html5player.setVideoUrlHigh\\(\'(.*?)\'\\);' || [])[1],
HLS: videoScript.match('html5player.setVideoHLS\\(\'(.*?)\'\\);' || [])[1],
thumb: videoScript.match('html5player.setThumbUrl\\(\'(.*?)\'\\);' || [])[1],
thumb69: videoScript.match('html5player.setThumbUrl169\\(\'(.*?)\'\\);' || [])[1],
thumbSlide: videoScript.match('html5player.setThumbSlide\\(\'(.*?)\'\\);' || [])[1],
thumbSlideBig: videoScript.match('html5player.setThumbSlideBig\\(\'(.*?)\'\\);' || [])[1],
};
resolve({
status: 200,
result: {
title,
URL,
duration,
image,
videoType,
videoWidth,
videoHeight,
info,
files
}
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
async function soundcloud(url) {
return new Promise((resolve, reject) => {
axios({url: 'https://aiovideodl.ml/',method: 'GET',headers: {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","cookie": "PHPSESSID=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"}}).then((data) => {
let a = cheerio.load(data.data)
let token = a('#token').attr('value')
const options = {
method: 'POST',
url: `https://aiovideodl.ml/wp-json/aio-dl/video-data/`,
headers: {"content-type": "application/x-www-form-urlencoded; charset=UTF-8","user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","cookie": "PHPSESSID=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"
},
formData: {url: url,token: token}
};
request(options, async function(error, response, body) {
if (error) throw new Error(error)
res = JSON.parse(body)
res.status = 200
res.author = author
resolve(res);
});
})
})
}
function anime(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function manga(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function character(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/characters/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > table > tbody > tr').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
character: $(b).find('> td.tableCharInfo > a').text(),
link: 'https://www.anime-planet.com' + $(b).find('> td.tableCharInfo > a').attr('href'),
thumbnail: $(b).find('> td.tableAvatar > a > img').attr('src').startsWith('https://') ? $(b).find('> td.tableAvatar > a > img').attr('src') : 'https://www.anime.planet.com' + $(b).find('> td.tableAvatar > a > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function jadwalbola() {
return new Promise((resolve, reject) => {
axios.get('https://m.bola.net/jadwal_televisi/')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#main_mid_headline_sub_topic').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
jadwal: $(b).find(' > div.main_mid_headline_topic > div > a').text(),
tanggal: $(b).find(' > div.main_mid_headline_topic_grouped_time_list').text().split('\n')[1].split(' ')[1],
jam: $(b).find(' > div.main_mid_headline_topic > span').text(),
url: $(b).find(' > div.main_mid_headline_topic > div > a').attr('href'),
thumb: $(b).find(' > div.main_mid_headline_topic > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jadwaltv() {
return new Promise((resolve, reject) => {
axios.get('http://www.dokitv.com/jadwal-acara-tv')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#tabeljadwaltv > tbody > tr ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
acara: $(b).find('> td:nth-child(2)').text(),
channel: $(b).find('> td > a').text(),
jam: $(b).find('> td.jfx').text(),
source: $(b).find('> td > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jadwalsholat(query) {
return new Promise((resolve, reject) => {
axios.get(`https://umrotix.com/jadwal-sholat/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('body > div > div.main-wrapper.scrollspy-action > div:nth-child(3) ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
tanggal: $(b).find('> div:nth-child(2)').text(),
imsyak: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(1) > p:nth-child(2)').text(),
subuh: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(2) > p:nth-child(2)').text(),
dzuhur: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(3) > p:nth-child(2)').text(),
ashar: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(4) > p:nth-child(2)').text(),
maghrib: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(5) > p:nth-child(2)').text(),
isya: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(6) > p:nth-child(2)').text()
}
resolve(result)
})
})
.catch(reject)
})
}
function pinterest(query) {
return new Promise((resolve, reject) => {
axios(`https://www.pinterest.com/resource/BaseSearchResource/get/?source_url=%2Fsearch%2Fpins%2F%3Fq%3D${query}&data=%7B%22options%22%3A%7B%22isPrefetch%22%3Afalse%2C%22query%22%3A%22${query}%22%2C%22scope%22%3A%22pins%22%2C%22no_fetch_context_on_resource%22%3Afalse%7D%2C%22context%22%3A%7B%7D%7D&_=1619980301559`).then((data) => {
const random = data.data.resource_response.data.results[Math.floor(Math.random() * (data.data.resource_response.data.results.length))]
var result = [];
result = {
status: 200,
author: '@rasel.ganz',
url: random.images.orig.url
}
resolve(result)
}).catch(reject)
})
}
function film(query) {
return new Promise((resolve, reject) => {
axios.get(`http://167.99.31.48/?s=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div > div.los').each(function (a, b) {
$(b).find('article').each(function (c, d) {
const judul = $(d).find('div > a > div.addinfox > header > h2').text()
const quality = $(d).find('div > a > div > div > span').text()
const type = $(d).find('div > a > div.addinfox > div > i.type').text()
const upload = $(d).find('div > a > div.addinfox > div > span').text()
const link = $(d).find('div > a').attr('href');
const thumb = $(d).find('div > a > div > img').attr('src');
const result = {
status: 200,
author: '@rasel.ganz',
judul: judul,
quality: quality,
type: type,
upload: upload,
link: link,
thumb: thumb,
};
hasil.push(result);
});
});
resolve(hasil)
})
.catch(reject)
})
}
function wattpad(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/search/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('div.story-card-data.hidden-xxs > div.story-info ').each(function(a, b) {
$('ul.list-group > li.list-group-item').each(function(c,d) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.title').text(),
dibaca: $(b).find('> ul > li:nth-child(1) > div.icon-container > div > span.stats-value').text(),
divote: $(b).find('> ul > li:nth-child(2) > div.icon-container > div > span.stats-value').text(),
bab: $(b).find('> ul > li:nth-child(3) > div.icon-container > div > span.stats-value').text(),
waktu: $(b).find('> ul > li:nth-child(4) > div.icon-container > div > span.stats-value').text(),
url:'https://www.wattpad.com' + $(d).find('a').attr('href'),
thumb: $(d).find('img').attr('src'),
description: $(b).find('> div.description').text().replace(/\n/g,'')
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function wattpaduser(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/user/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('#app-container > div > header ').each(function(a, b) {
$('#profile-about > div > div ').each(function(c, d) {
result = {
status: 200,
author: '@rasel.ganz',
username: $(b).find('> div.badges > h1').text().trim(),
works: $(b).find('> div.row.header-metadata > div:nth-child(1) > p:nth-child(1)').text(),
reading_list: $(b).find('> div.row.header-metadata > div.col-xs-4.scroll-to-element > p:nth-child(1)').text(),
followers: $(b).find('> div.row.header-metadata > div.col-xs-4.on-followers > p.followers-count').text(),
joined: $(d).find('> ul > li.date.col-xs-12.col-sm-12 > span').text().trim().replace('Joined',''),
pp_picture: `https://img.wattpad.com/useravatar/${query}.128.851744.jpg`,
about: $(d).find('> div.description > pre').text() ? $(d).find('> div.description > pre').text() : 'Not found'
}
resolve(result)
})
})
})
.catch(reject)
})
}
function webtoons(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div.card_wrap.search._searchResult > ul > li ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > div > p.subj').text(),
like: $(b).find('> a > div > p.grade_area > em').text(),
creator: $(b).find('> a > div > p.author').text(),
genre: $(b).find('> a > span').text(),
thumbnail: $(b).find('> a > img').attr('src'),
url: 'https://www.webtoons.com' + $(b).find('> a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function mangatoons(query) {
return new Promise((resolve, reject) => {
axios.get(`https://mangatoon.mobi/en/search?word=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#page-content > div.search-page > div > div.comics-result > div.recommended-wrap > div > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.recommend-comics-title > span').text(),
genre: $(b).find('> div.comics-type > span').text().trim(),
link: 'https://mangatoon.mobi' + $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function drakor(query) {
return new Promise((resolve, reject) => {
axios.get(`https://drakorasia.blog//?s=${query}&post_type=post`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#post > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').text().trim(),
years: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.category.text-gray.font-normal.text-white.text-xs.truncate > a').text(),
genre: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.genrenya.text-center.text-white.text-opacity-75.text-xs.mt-1').text().trim(),
thumbnail: $(b).find('> div.thumbnail > a > img').attr('src'),
url: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function stickersearch(query) {
return new Promise((resolve, reject) => {
axios.get(`https://getstickerpack.com/stickers?query=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const source = [];
const link = [];
$('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) {
source.push($(b).attr('href'))
})
axios.get(source[Math.floor(Math.random() * source.length)])
.then(({
data
}) => {
const $$ = cheerio.load(data)
$$('#stickerPack > div > div.row > div > img').each(function(c, d) {
link.push($$(d).attr('src').replace(/&d=200x200/g,''))
})
result = {
status: 200,
author: '@rasel.ganz',
title: $$('#intro > div > div > h1').text(),
sticker_url: link
}
resolve(result)
})
}).catch(reject)
})
}
function listsurah() {
return new Promise((resolve, reject) => {
axios.get('https://litequran.net/')
.then(({ data }) => {
const $ = cheerio.load(data)
let listsurah = []
$('body > main > section > ol > li > a').each(function(a, b) {
listsurah.push($(b).text())
})
result = {
status: 200,
author: '@rasel.ganz',
listsurah: listsurah
}
resolve(result)
}).catch(reject)
})
}
function surah(query) {
return new Promise((resolve, reject) => {
axios.get(`https://litequran.net/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > main > article > ol > li').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
arab: $(b).find('> span.ayat').text(),
latin: $(b).find('> span.bacaan').text(),
translate: $(b).find('> span.arti').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function tafsirsurah(query) {
return new Promise((resolve, reject) => {
axios.get(`https://tafsirq.com/topik/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > div:nth-child(4) > div > div.col-md-6 > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
surah: $(b).find('> div.panel-heading.panel-choco > div > div > a').text(),
tafsir: $(b).find('> div.panel-body.excerpt').text().trim(),
type: $(b).find('> div.panel-heading.panel-choco > div > div > span').text(),
source: $(b).find('> div.panel-heading.panel-choco > div > div > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jalantikus(query) {
return new Promise((resolve, reject) => {
axios.get(`https://jalantikus.com/search/articles/${query}/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.post-block-with-category").each(function(c, d) {
title = $(d).find("a.post-block-with-category__link").text()
category = $(d).find("a.post-info__category-link").text()
date = $(d).find("time").text()
link = `https://jalantikus.com${$(d).find("a").attr('href')}`
const Data = {
title: title,
category: category,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function tribunnews() {
return new Promise((resolve, reject) => {
axios.get(`https://www.tribunnews.com/news`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("li.p1520.art-list.pos_rel").each(function(c, d) {
title = $(d).find("div.mr140 > h3 > a.f20.ln24.fbo.txt-oev-2").text().trim()
thumb = $(d).find("div.fr.mt5.pos_rel > a > img.shou2.bgwhite").attr('src')
desc = $(d).find("div.grey2.pt5.f13.ln18.txt-oev-3").text().trim()
date = $(d).find("div.grey.pt5 > time.foot.timeago").text().trim()
link = $(d).find("div.fr.mt5.pos_rel > a").attr('href')
const Data = {
title: title,
thumb: thumb,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function kompasnews() {
return new Promise((resolve, reject) => {
axios.get(`https://news.kompas.com/`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('body > div > div.container.clearfix > div:nth-child(3) > div.col-bs10-7 > div:nth-child(3) > div.latest.ga--latest.mt2.clearfix > div > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
berita: $(b).find('> div > div.article__box > h3').text(),
upload_time: $(b).find('> div > div.article__box > div.article__date').text(),
type_berita: $(b).find('> div > div.article__boxsubtitle > h2').text(),
link: $(b).find('> div > div.article__box > h3 > a').attr('href'),
thumbnail: $(b).find('> div > div.article__asset > a > img').attr('data-src'),
info_berita: $(b).find('> div > div.article__box > div.article__lead').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function inews() {
return new Promise((resolve, reject) => {
axios.get(`https://www.inews.id/news`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#news-list > li ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > h3').text().trim(),
upload_time: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > div.date.margin-10px-left').text().trim().split('|')[0],
link: $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > div > div.float-left.width-130px.position-absolute > img').attr('data-original'),
info_berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > p').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
async function shoppe(item, limit) {
const hasil = []
await axios.request(`https://shopee.co.id/api/v4/search/search_items?by=relevancy&keyword=${item}&limit=${limit}&newest=0&order=desc&page_type=search&scenario=PAGE_GLOBAL_SEARCH&version=2`, {
method: "GET",
data: null,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"if-none-match-": "55b03-856cd63f16112f8a43da6096f97ac3fe",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
hasil.push(respon.data)
})
return hasil[0]
}
async function otaku(querry) {
try {
const link = await axios.get(`https://otakudesu.moe/?s=${querry}&post_type=anime`)
const c = cheerio.load(link.data)
let id = c('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href')
const Link = await axios.get(id)
const $ = cheerio.load(Link.data)
let judul = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(1) > span').text().trim()
let judulJpn = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(2) > span').text().trim()
let score = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(3) > span').text().trim()
let Produser = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(4) > span').text().trim()
let Type = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(5) > span').text().trim()
let Status = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(6) > span').text().trim()
let TotalEpisode = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(7) > span').text().trim()
let durasi = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(8) > span').text().trim()
let Rilis = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(9) > span').text().trim()
let studio = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(10) > span').text().trim()
let genre = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(11) > span').text().trim()
let thumb = $('#venkonten > div.venser > div.fotoanime').find('img').attr('src')
let Sinopsis = $('#venkonten > div.venser > div.fotoanime > div.sinopc').find('p').text().trim()
let LinkDown = $('#venkonten').find('div.venser > div:nth-child(8) > ul > li:nth-child(4) > span:nth-child(1) > a').attr('href')
const data = {
creator: '@rasel.ganz',
status: link.status,
result: {
judul: judul,
thumb: thumb,
japan: judulJpn,
rating: score,
produser: Produser,
type: Type,
status: Status,
episode: TotalEpisode,
durasi: durasi,
rilis: Rilis,
studio: studio,
genre: genre,
link: LinkDown,
sinopsis: Sinopsis
}
}
return data
} catch (err) {
var notFond = {
creator: '@rasel.ganz',
status: link.status,
Pesan: 'maap banh emror😔'
}
return notFond
}
}
function covid() {
return new Promise(async(resolve, reject) => {
axios.get('https://covid19.go.id/')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = [];
$('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) {
const pindo = $(b).find('div:nth-child(3) > strong').text()
const mindo = $(b).find('div:nth-child(5) > strong').text()
const sindo = $(b).find('div:nth-child(4) > strong').text()
const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim()
$('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) {
const neg = $(d).find('div:nth-child(3) > strong').text()
const pglo = $(d).find('div:nth-child(4) > strong').text()
const nglo = $(d).find('div:nth-child(5) > strong').text()
const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim()
const result = {
message: 'By Hexagon',
indo : {
positif_indo: pindo,
meninggal_indo: mindo,
sembuh_indo: sindo,
update_indo: upindo.split(':')[1]
},
global: {
negara: neg,
positif: pglo,
meninggal: nglo,
update: up.split(':')[1].split('\n')[0]
}
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function lirik(judul){
return new Promise(async(resolve, reject) => {
axios.get('https://www.musixmatch.com/search/' + judul)
.then(async({ data }) => {
const $ = cheerio.load(data)
const hasil = {};
let limk = 'https://www.musixmatch.com'
const link = limk + $('div.media-card-body > div > h2').find('a').attr('href')
await axios.get(link)
.then(({ data }) => {
const $$ = cheerio.load(data)
hasil.thumb = 'https:' + $$('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div').find('img').attr('src')
$$('div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function(a,b) {
hasil.lirik = $$(b).find('span > p > span').text() +'\n' + $$(b).find('span > div > p > span').text()
})
})
resolve(hasil)
})
.catch(reject)
})
}
function komiku(judul) {
return new Promise(async(resolve,reject) => {
axios.get('https://data3.komiku.id/cari/?post_type=manga&s=' + encodeURIComponent(judul))
.then(({ data }) => {
const $ = cheerio.load(data)
const img = [];
const or = [];
const ind = [];
const up = [];
const des = [];
const li = [];
const ch = [];
const ch1 = [];
$('div.daftar').each(function (a,b) {
img.push($(b).find('img').attr('data-src'))
$('div.kan').each(function(c,d) {
or.push($(d).find('h3').text().trim())
ind.push($(d).find('span.judul2').text())
li.push('https://komiku.id' + $(d).find('a').attr('href'))
up.push($(d).find('p').text().trim().split('. ')[0])
des.push($(d).find('p').text().trim().split('. ')[1])
ch1.push($(d).find('div:nth-child(5) > a').attr('title'))
$('div.new1').each(function(e,f) {
ch.push($(f).find('a').attr('title'))
})
})
})
for (let i = 0 ; i < img.length; i++) {
resolve({
image: img[i],
title: or[i],
indo: ind[i],
update: up[i],
desc: des[i],
chapter_awal: ch[i],
chapter_akhir: ch1[i],
link: li[i]
})
}
})
.catch(reject)
})
}
function ghstalk(username) {
url= `https://api.github.com/users/${username}`;
return axios.get(url)
.then(data => {
return data.data
console.log(data.data)
})
}
async function telegraph(buffer) {
return new Promise(async (resolve, reject) => {
const { ext } = await fromBuffer(buffer)
let form = new FormData
form.append('file', buffer, 'tmp.' + ext)
let res = await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
let img = await res.json()
if (img.error) throw img.error
hasil = 'https://telegra.ph' + img[0].src
resolve({hasil})
console.log(hasil)
}).catch(reject)
}
function gempa() {
return new Promise((resolve, reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg').then((response) => {
const $ = cheerio.load(response.data)
const urlElems = $('table.table-hover.table-striped')
for (let i = 0; i < urlElems.length; i++) {
const urlSpan = $(urlElems[i]).find('tbody')[0]
if (urlSpan) {
const urlData = $(urlSpan).find('tr')[0]
var Kapan = $(urlData).find('td')[1]
var Letak = $(urlData).find('td')[2]
var Magnitudo = $(urlData).find('td')[3]
var Kedalaman = $(urlData).find('td')[4]
var Wilayah = $(urlData).find('td')[5]
var lintang = $(Letak).text().split(' ')[0]
var bujur = $(Letak).text().split(' ')[2]
var hasil = {
Waktu: $(Kapan).text(),
Lintang: lintang,
Bujur: bujur,
Magnitudo: $(Magnitudo).text(),
Kedalaman: $(Kedalaman).text().replace(/\t/g, '').replace(/I/g, ''),
Wilayah: $(Wilayah).text().replace(/\t/g, '').replace(/I/g, '').replace('-','').replace(/\r/g, '').split('\n')[0],
Map: ''
}
resolve(hasil);
console.log(hasil)
}
}
})
})
}
function servermc() {
return new Promise((resolve, reject) => {
axios.get(`https://minecraftpocket-servers.com/country/indonesia/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("tr").each(function(c, d) {
ip = $(d).find("button.btn.btn-secondary.btn-sm").eq(1).text().trim().replace(':19132', '')
port = '19132'
versi = $(d).find("a.btn.btn-info.btn-sm").text()
player = $(d).find("td.d-none.d-md-table-cell > strong").eq(1).text().trim()
const Data = {
ip: ip,
port: port,
versi: versi,
player: player
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function happymod(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.happymod.com/search.html?q=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.pdt-app-box").each(function(c, d) {
name = $(d).find("a").text().trim();
icon = $(d).find("img.lazy").attr('data-original');
link = $(d).find("a").attr('href');
link2 = `https://www.happymod.com${link}`
const Data = {
icon: icon,
name: name,
link: link2
}
hasil.push(Data)
})
resolve(hasil);
}).catch(reject)
});
}
function sfilesearch(query) {
return new Promise((resolve, reject) => {
axios.get(`https://sfile.mobi/search.php?q=${query}&search=Search`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.list").each(function(i, cuk) {
ico= $(cuk).find("img").attr("src");
lin= $(cuk).find("a").attr("href");
name= $(cuk).find("a").text();
const Data = {
icon: ico,
name: name,
link: lin
}
hasil.push(Data)
})
resolve(hasil)
});
});
}
function hoax() {
return new Promise((resolve, reject) => {
axios.get(`https://turnbackhoax.id/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("figure.mh-loop-thumb").each(function(a, b) {
$("div.mh-loop-content.mh-clearfix").each(function(c, d) {
link = $(d).find("h3.entry-title.mh-loop-title > a").attr('href');
img = $(b).find("img.attachment-mh-magazine-lite-medium.size-mh-magazine-lite-medium.wp-post-image").attr('src');
title = $(d).find("h3.entry-title.mh-loop-title > a").text().trim();
desc = $(d).find("div.mh-excerpt > p").text().trim();
date = $(d).find("span.mh-meta-date.updated").text().trim();
const Data = {
title: title,
thumbnail: img,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
})
resolve(hasil)
}).catch(reject)
});
}
function ssweb(url) {
return new Promise(async(resolve,reject) => {
await getBuffer(`http://fdz-app.herokuapp.com/api/ssweb/mobile/get_screenshot?url=${url}`).then(res => {
resolve(res)
})
.catch(reject)
})
}
async function filmapik(query) {
try{
const link = await axios.get(`https://filmapik.website/?s=${query}`);
const c = cheerio.load(link.data)
let Id = []
c('#main > div > div.main-content.main-category > div.movies-list-wrap.mlw-category > div.movies-list.movies-list-full ').each(function (a, b) {
c(b).find('div').each(function (e, d) {
let id = c(d).find('a').attr('href')
Id.push(id)
})
})
let Random = Id[Math.floor(Math.random() * (Id.length))]
const Link = await axios.get(Random)
const $ = cheerio.load(Link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h3').text().trim()
let view = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1)').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(2)').text().trim()
let studio = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(3) > span').text().trim()
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > span').text().trim()
let TvStatus = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let network = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > div > p:nth-child(5) > a').text().trim()
let thumb = $('#mv-info').find('div.mvi-content > div.thumb.mvic-thumb > img').attr('src')
let BintangFilm = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > p > span').text().trim()
const data = {
author: '@rasel.ganz',
status: link.status,
result: {
judul: judul,
thumb: thumb,
Link: Random,
penonton: view.replace('Views: ', ''),
durasi: durasi,
genre: genre.replace('Genre: ', ''),
studio: studio,
TV: TvStatus,
network: network,
bintangFilm: BintangFilm
}
}
return data
} catch (err) {
var notFond = {
author: '@rasel.ganz',
status: link.status,
Pesan: 'sorry banh emror🙏'
}
return notFond
}
}
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve({ status: src.status, creator: 'Dika Ardnt.', hasil: data })
})
})
})
}
async function mediafire(url) {
let query = await axios.get(url)
let cher = cheerio.load(query.data)
let hasil = []
let link = cher('a#downloadButton').attr('href')
let size = cher('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
let seplit = link.split('/')
let author = '@rasel.ganz'
let nama = seplit[5]
let mime = nama.split('.')
mime = mime[1]
hasil.push({ author, nama, mime, size, link })
return hasil
console.log(hasil)
}
================================================
FILE: lib/lvlfunction.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _level = JSON.parse(fs.readFileSync('./leveluser.json'))
const getLevelingXp = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].xp
}
}
const getLevelingLevel = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].level
}
}
const getLevelingId = (sender) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
return _level[position].id
}
}
const addLevelingXp = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].xp += amount
fs.writeFileSync('./leveluser.json', JSON.stringify(_level))
}
}
const addLevelingLevel = (sender, amount) => {
let position = false
Object.keys(_level).forEach((i) => {
if (_level[i].id === sender) {
position = i
}
})
if (position !== false) {
_level[position].level += amount
fs.writeFileSync('./leveluser.json', JSON.stringify(_level))
}
}
const addLevelingId = (sender) => {
const obj = {id: sender, xp: 1, level: 1}
_level.push(obj)
fs.writeFileSync('./leveluser.json', JSON.stringify(_level))
}
module.exports = { addLevelingId, addLevelingLevel, addLevelingXp, getLevelingId, getLevelingLevel, getLevelingXp }
================================================
FILE: lib/mediafire.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
const mediafireDl = async (url) => {
const res = await axios.get(url)
const $ = cheerio.load(res.data)
const hasil = []
const link = $('a#downloadButton').attr('href')
const size = $('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
const seplit = link.split('/')
const nama = seplit[5]
mime = nama.split('.')
mime = mime[1]
hasil.push({ nama, mime, size, link })
return hasil
}
module.exports = { mediafireDl }
================================================
FILE: lib/mongoDB.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const mongoose = require('mongoose')
const { Schema } = mongoose
module.exports = class mongoDB {
constructor(url, options = { useNewUrlParser: true, useUnifiedTopology: true }) {
this.url = url
this.data = this._data = this._schema = this._model = {}
this.db
this.options = options
}
async read() {
this.db = await mongoose.connect(this.url, { ...this.options })
this.connection = mongoose.connection
let schema = this._schema = new Schema({
data: {
type: Object,
required: true, //depends on whether the field is mandatory or not
default: {}
}
})
// this._model = mongoose.model('data', schema)
try { this._model = mongoose.model('data', schema) } catch { this._model = mongoose.model('data') }
this._data = await this._model.findOne({})
if (!this._data) {
this.data = {}
await this.write(this.data)
this._data = await this._model.findOne({})
} else this.data = this._data.data
return this.data
}
async write(data) {
if (!data) return data
if (!this._data) return (new this._model({ data })).save()
this._model.findById(this._data._id, (err, docs) => {
if (!err) {
if (!docs.data) docs.data = {}
docs.data = data
return docs.save()
}
})
}
}
================================================
FILE: lib/myfunc.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const { proto, delay, getContentType } = require('@adiwajshing/baileys')
const chalk = require('chalk')
const fs = require('fs')
const Crypto = require('crypto')
const axios = require('axios')
const moment = require('moment-timezone')
const { sizeFormatter } = require('human-readable')
const util = require('util')
const Jimp = require('jimp')
const { defaultMaxListeners } = require('stream')
const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000)
exports.unixTimestampSeconds = unixTimestampSeconds
exports.generateMessageTag = (epoch) => {
let tag = (0, exports.unixTimestampSeconds)().toString();
if (epoch)
tag += '.--' + epoch; // attach epoch if provided
return tag;
}
exports.processTime = (timestamp, now) => {
return moment.duration(now - moment(timestamp * 1000)).asSeconds()
}
exports.getRandom = (ext) => {
return `${Math.floor(Math.random() * 10000)}${ext}`
}
exports.getBuffer = async (url, options) => {
try {
options ? options : {}
const res = await axios({
method: "get",
url,
headers: {
'DNT': 1,
'Upgrade-Insecure-Request': 1
},
...options,
responseType: 'arraybuffer'
})
return res.data
} catch (err) {
return err
}
}
exports.fetchJson = async (url, options) => {
try {
options ? options : {}
const res = await axios({
method: 'GET',
url: url,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36'
},
...options
})
return res.data
} catch (err) {
return err
}
}
exports.runtime = function(seconds) {
seconds = Number(seconds);
var d = Math.floor(seconds / (3600 * 24));
var h = Math.floor(seconds % (3600 * 24) / 3600);
var m = Math.floor(seconds % 3600 / 60);
var s = Math.floor(seconds % 60);
var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : "";
var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : "";
var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : "";
var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : "";
return dDisplay + hDisplay + mDisplay + sDisplay;
}
exports.clockString = (ms) => {
let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000)
let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60
let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60
return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':')
}
exports.sleep = async (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
exports.isUrl = (url) => {
return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
}
exports.getTime = (format, date) => {
if (date) {
return moment(date).locale('id').format(format)
} else {
return moment.tz('Africa/Harare').locale('id').format(format)
}
}
exports.formatDate = (n, locale = 'zw') => {
let d = new Date(n)
return d.toLocaleDateString(locale, {
weekday: 'long',
day: 'numeric',
month: 'long',
year: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'
})
}
exports.tanggal = (numer) => {
myMonths = ["January","February","March","Aprill","May","June","July","August","September","October","November","Deceember"];
myDays = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'];
var tgl = new Date(numer);
var day = tgl.getDate()
bulan = tgl.getMonth()
var thisDay = tgl.getDay(),
thisDay = myDays[thisDay];
var yy = tgl.getYear()
var year = (yy < 1000) ? yy + 1900 : yy;
const time = moment.tz('Africa/Harare').format('DD/MM HH:mm:ss')
let d = new Date
let locale = 'id'
let gmt = new Date(0).getTime() - new Date('1 January 1970').getTime()
let weton = ['Pahing', 'Pon','Wage','Kliwon','Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5]
return`${thisDay}, ${day} - ${myMonths[bulan]} - ${year}`
}
exports.formatp = sizeFormatter({
std: 'JEDEC', //'SI' = default | 'IEC' | 'JEDEC'
decimalPlaces: 2,
keepTrailingZeroes: false,
render: (literal, symbol) => `${literal} ${symbol}B`,
})
exports.jsonformat = (string) => {
return JSON.stringify(string, null, 2)
}
function format(...args) {
return util.format(...args)
}
exports.logic = (check, inp, out) => {
if (inp.length !== out.length) throw new Error('Input and Output must have same length')
for (let i in inp)
if (util.isDeepStrictEqual(check, inp[i])) return out[i]
return null
}
exports.generateProfilePicture = async (buffer) => {
const jimp = await Jimp.read(buffer)
const min = jimp.getWidth()
const max = jimp.getHeight()
const cropped = jimp.crop(0, 0, min, max)
return {
img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG),
preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG)
}
}
exports.bytesToSize = (bytes, decimals = 2) => {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
exports.getSizeMedia = (path) => {
return new Promise((resolve, reject) => {
if (/http/.test(path)) {
axios.get(path)
.then((res) => {
let length = parseInt(res.headers['content-length'])
let size = exports.bytesToSize(length, 3)
if(!isNaN(length)) resolve(size)
})
} else if (Buffer.isBuffer(path)) {
let length = Buffer.byteLength(path)
let size = exports.bytesToSize(length, 3)
if(!isNaN(length)) resolve(size)
} else {
reject('error gatau apah')
}
})
}
exports.parseMention = (text = '') => {
return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
}
/**
* Serialize Message
* @param {WAConnection} conn
* @param {Object} m
* @param {store} store
*/
exports.smsg = (conn, m, store) => {
if (!m) return m
let M = proto.WebMessageInfo
if (m.key) {
m.id = m.key.id
m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16
m.chat = m.key.remoteJid
m.fromMe = m.key.fromMe
m.isGroup = m.chat.endsWith('@g.us')
m.sender = conn.decodeJid(m.fromMe && conn.user.id || m.participant || m.key.participant || m.chat || '')
if (m.isGroup) m.participant = conn.decodeJid(m.key.participant) || ''
}
if (m.message) {
m.mtype = getContentType(m.message)
m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype])
m.body = m.message.conversation || m.msg.caption || m.msg.text || (m.mtype == 'listResponseMessage') && m.msg.singleSelectReply.selectedRowId || (m.mtype == 'buttonsResponseMessage') && m.msg.selectedButtonId || (m.mtype == 'viewOnceMessage') && m.msg.caption || m.text
let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null
m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
if (m.quoted) {
let type = getContentType(quoted)
m.quoted = m.quoted[type]
if (['productMessage'].includes(type)) {
type = getContentType(m.quoted)
m.quoted = m.quoted[type]
}
if (typeof m.quoted === 'string') m.quoted = {
text: m.quoted
}
m.quoted.mtype = type
m.quoted.id = m.msg.contextInfo.stanzaId
m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat
m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false
m.quoted.sender = conn.decodeJid(m.msg.contextInfo.participant)
m.quoted.fromMe = m.quoted.sender === (conn.user && conn.user.id)
m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || ''
m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
m.getQuotedObj = m.getQuotedMessage = async () => {
if (!m.quoted.id) return false
let q = await store.loadMessage(m.chat, m.quoted.id, conn)
return exports.smsg(conn, q, store)
}
let vM = m.quoted.fakeObj = M.fromObject({
key: {
remoteJid: m.quoted.chat,
fromMe: m.quoted.fromMe,
id: m.quoted.id
},
message: quoted,
...(m.isGroup ? { participant: m.quoted.sender } : {})
})
/**
*
* @returns
*/
m.quoted.delete = () => conn.sendMessage(m.quoted.chat, { delete: vM.key })
/**
*
* @param {*} jid
* @param {*} forceForward
* @param {*} options
* @returns
*/
m.quoted.copyNForward = (jid, forceForward = false, options = {}) => conn.copyNForward(jid, vM, forceForward, options)
/**
*
* @returns
*/
m.quoted.download = () => conn.downloadMediaMessage(m.quoted)
}
}
if (m.msg.url) m.download = () => conn.downloadMediaMessage(m.msg)
m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || ''
/**
* Reply to this message
* @param {String|Object} text
* @param {String|false} chatId
* @param {Object} options
*/
m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? conn.sendMedia(chatId, text, 'file', '', m, { ...options }) : conn.sendText(chatId, text, m, { ...options })
/**
* Copy this message
*/
m.copy = () => exports.smsg(conn, M.fromObject(M.toObject(m)))
/**
*
* @param {*} jid
* @param {*} forceForward
* @param {*} options
* @returns
*/
m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => conn.copyNForward(jid, m, forceForward, options)
return m
}
let file = require.resolve(__filename)
fs.watchFile(file, () => {
fs.unwatchFile(file)
console.log(chalk.redBright(`Update ${__filename}`))
delete require.cache[file]
require(file)
})
================================================
FILE: lib/myfunc2.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const { proto, delay, getContentType } = require('@adiwajshing/baileys')
const chalk = require('chalk')
const fs = require('fs')
const Crypto = require('crypto')
const axios = require('axios')
const cheerio = require('cheerio')
const moment = require('moment-timezone')
const { sizeFormatter } = require('human-readable')
const util = require('util')
const Jimp = require('jimp')
const { defaultMaxListeners } = require('stream')
const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000)
exports.unixTimestampSeconds = unixTimestampSeconds
exports.generateMessageTag = (epoch) => {
let tag = (0, exports.unixTimestampSeconds)().toString();
if (epoch)
tag += '.--' + epoch; // attach epoch if provided
return tag;
}
exports.processTime = (timestamp, now) => {
return moment.duration(now - moment(timestamp * 1000)).asSeconds()
}
exports.getRandom = (ext) => {
return `${Math.floor(Math.random() * 10000)}${ext}`
}
exports.getBuffer = async (url, options) => {
try {
options ? options : {}
const res = await axios({
method: "get",
url,
headers: {
'DNT': 1,
'Upgrade-Insecure-Request': 1
},
...options,
responseType: 'arraybuffer'
})
return res.data
} catch (err) {
return err
}
}
exports.fetchJson = async (url, options) => {
try {
options ? options : {}
const res = await axios({
method: 'GET',
url: url,
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36'
},
...options
})
return res.data
} catch (err) {
return err
}
}
exports.runtime = function(seconds) {
seconds = Number(seconds);
var d = Math.floor(seconds / (3600 * 24));
var h = Math.floor(seconds % (3600 * 24) / 3600);
var m = Math.floor(seconds % 3600 / 60);
var s = Math.floor(seconds % 60);
var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : "";
var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : "";
var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : "";
var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : "";
return dDisplay + hDisplay + mDisplay + sDisplay;
}
exports.clockString = (ms) => {
let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000)
let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60
let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60
return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':')
}
exports.sleep = async (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
exports.isUrl = (url) => {
return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
}
exports.getTime = (format, date) => {
if (date) {
return moment(date).locale('id').format(format)
} else {
return moment.tz('Asia/Jakarta').locale('id').format(format)
}
}
exports.formatDate = (n, locale = 'id') => {
let d = new Date(n)
return d.toLocaleDateString(locale, {
weekday: 'long',
day: 'numeric',
month: 'long',
year: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'
})
}
exports.tanggal = (numer) => {
myMonths = ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"];
myDays = ['Minggu','Senin','Selasa','Rabu','Kamis','Jum’at','Sabtu'];
var tgl = new Date(numer);
var day = tgl.getDate()
bulan = tgl.getMonth()
var thisDay = tgl.getDay(),
thisDay = myDays[thisDay];
var yy = tgl.getYear()
var year = (yy < 1000) ? yy + 1900 : yy;
const time = moment.tz('Asia/Jakarta').format('DD/MM HH:mm:ss')
let d = new Date
let locale = 'id'
let gmt = new Date(0).getTime() - new Date('1 January 1970').getTime()
let weton = ['Pahing', 'Pon','Wage','Kliwon','Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5]
return`${thisDay}, ${day} - ${myMonths[bulan]} - ${year}`
}
exports.rexdl = async (query) => {
return new Promise((resolve) => {
axios.get('https://rexdl.com/?s=' + query)
.then(({
data
}) => {
const $ = cheerio.load(data)
const judul = [];
const jenis = [];
const date = [];
const desc = [];
const link = [];
const thumb = [];
const result = [];
$('div > div.post-content').each(function(a, b) {
judul.push($(b).find('h2.post-title > a').attr('title'))
jenis.push($(b).find('p.post-category').text())
date.push($(b).find('p.post-date').text())
desc.push($(b).find('div.entry.excerpt').text())
link.push($(b).find('h2.post-title > a').attr('href'))
})
$('div > div.post-thumbnail > a > img').each(function(a, b) {
thumb.push($(b).attr('data-src'))
})
for (let i = 0; i < judul.length; i++) {
result.push({
creator: 'Fajar Ihsana',
judul: judul[i],
kategori: jenis[i],
upload_date: date[i],
deskripsi: desc[i],
thumb: thumb[i],
link: link[i]
})
}
resolve(result)
})
})
}
exports.rexdldown = async (link) => {
return new Promise((resolve) => {
axios.get(link)
.then(({
data
}) => {
const $ = cheerio.load(data)
const link = [];
const url = [];
const link_name = [];
const judul = $('#page > div > div > div > section > div:nth-child(2) > article > div > h1.post-title').text();
const plink = $('#page > div > div > div > section > div:nth-child(2) > center:nth-child(3) > h2 > span > a').attr('href')
axios.get(plink)
.then(({
data
}) => {
const $$ = cheerio.load(data)
$$('#dlbox > ul.dl > a > li > span').each(function(a, b) {
deta = $$(b).text();
link_name.push(deta)
})
$$('#dlbox > ul.dl > a').each(function(a, b) {
url.push($$(b).attr('href'))
})
for (let i = 0; i < link_name.length; i++) {
link.push({
link_name: link_name[i],
url: url[i]
})
}
resolve({
creator: 'Fajar Ihsana',
judul: judul,
update_date: $$('#dlbox > ul.dl-list > li.dl-update > span:nth-child(2)').text(),
version: $$('#dlbox > ul.dl-list > li.dl-version > span:nth-child(2)').text(),
size: $$('#dlbox > ul.dl-list > li.dl-size > span:nth-child(2)').text(),
download: link
})
})
})
})
}
exports.formatp = sizeFormatter({
std: 'JEDEC', //'SI' = default | 'IEC' | 'JEDEC'
decimalPlaces: 2,
keepTrailingZeroes: false,
render: (literal, symbol) => `${literal} ${symbol}B`,
})
exports.jsonformat = (string) => {
return JSON.stringify(string, null, 2)
}
function format(...args) {
return util.format(...args)
}
exports.logic = (check, inp, out) => {
if (inp.length !== out.length) throw new Error('Input and Output must have same length')
for (let i in inp)
if (util.isDeepStrictEqual(check, inp[i])) return out[i]
return null
}
exports.generateProfilePicture = async (buffer) => {
const jimp = await Jimp.read(buffer)
const min = jimp.getWidth()
const max = jimp.getHeight()
const cropped = jimp.crop(0, 0, min, max)
return {
img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG),
preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG)
}
}
exports.bytesToSize = (bytes, decimals = 2) => {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
exports.getSizeMedia = (path) => {
return new Promise((resolve, reject) => {
if (/http/.test(path)) {
axios.get(path)
.then((res) => {
let length = parseInt(res.headers['content-length'])
let size = exports.bytesToSize(length, 3)
if(!isNaN(length)) resolve(size)
})
} else if (Buffer.isBuffer(path)) {
let length = Buffer.byteLength(path)
let size = exports.bytesToSize(length, 3)
if(!isNaN(length)) resolve(size)
} else {
reject('error gatau apah')
}
})
}
exports.parseMention = (text = '') => {
return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
}
/**
* Serialize Message
* @param {WAConnection} conn
* @param {Object} m
* @param {store} store
*/
exports.smsg = (conn, m, store) => {
if (!m) return m
let M = proto.WebMessageInfo
if (m.key) {
m.id = m.key.id
m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16
m.chat = m.key.remoteJid
m.fromMe = m.key.fromMe
m.isGroup = m.chat.endsWith('@g.us')
m.sender = conn.decodeJid(m.fromMe && conn.user.id || m.participant || m.key.participant || m.chat || '')
if (m.isGroup) m.participant = conn.decodeJid(m.key.participant) || ''
}
if (m.message) {
m.mtype = getContentType(m.message)
m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype])
m.body = m.message.conversation || m.msg.caption || m.msg.text || (m.mtype == 'listResponseMessage') && m.msg.singleSelectReply.selectedRowId || (m.mtype == 'buttonsResponseMessage') && m.msg.selectedButtonId || (m.mtype == 'viewOnceMessage') && m.msg.caption || m.text
let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null
m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
if (m.quoted) {
let type = getContentType(quoted)
m.quoted = m.quoted[type]
if (['productMessage'].includes(type)) {
type = getContentType(m.quoted)
m.quoted = m.quoted[type]
}
if (typeof m.quoted === 'string') m.quoted = {
text: m.quoted
}
m.quoted.mtype = type
m.quoted.id = m.msg.contextInfo.stanzaId
m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat
m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false
m.quoted.sender = conn.decodeJid(m.msg.contextInfo.participant)
m.quoted.fromMe = m.quoted.sender === (conn.user && conn.user.id)
m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || ''
m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
m.getQuotedObj = m.getQuotedMessage = async () => {
if (!m.quoted.id) return false
let q = await store.loadMessage(m.chat, m.quoted.id, conn)
return exports.smsg(conn, q, store)
}
let vM = m.quoted.fakeObj = M.fromObject({
key: {
remoteJid: m.quoted.chat,
fromMe: m.quoted.fromMe,
id: m.quoted.id
},
message: quoted,
...(m.isGroup ? { participant: m.quoted.sender } : {})
})
/**
*
* @returns
*/
m.quoted.delete = () => conn.sendMessage(m.quoted.chat, { delete: vM.key })
/**
*
* @param {*} jid
* @param {*} forceForward
* @param {*} options
* @returns
*/
m.quoted.copyNForward = (jid, forceForward = false, options = {}) => conn.copyNForward(jid, vM, forceForward, options)
/**
*
* @returns
*/
m.quoted.download = () => conn.downloadMediaMessage(m.quoted)
}
}
if (m.msg.url) m.download = () => conn.downloadMediaMessage(m.msg)
m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || ''
/**
* Reply to this message
* @param {String|Object} text
* @param {String|false} chatId
* @param {Object} options
*/
m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? conn.sendMedia(chatId, text, 'file', '', m, { ...options }) : conn.sendText(chatId, text, m, { ...options })
/**
* Copy this message
*/
m.copy = () => exports.smsg(conn, M.fromObject(M.toObject(m)))
/**
*
* @param {*} jid
* @param {*} forceForward
* @param {*} options
* @returns
*/
m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => conn.copyNForward(jid, m, forceForward, options)
return m
}
let file = require.resolve(__filename)
fs.watchFile(file, () => {
fs.unwatchFile(file)
console.log(chalk.redBright(`Update ${__filename}`))
delete require.cache[file]
require(file)
})
================================================
FILE: lib/namaku.js
================================================
[
{"result": "https://telegra.ph/file/2bb0a395354807f5c5130.jpg"},
{"result": "https://telegra.ph/file/c7cf18eff3cd20a7faf63.jpg"},
{"result": "https://telegra.ph/file/a38fd54433d072bfaeb77.jpg"},
{"result": "https://telegra.ph/file/91e0d21212acbfdd0e22c.jpg"},
{"result": "https://telegra.ph/file/d934c091b14e5ad380354.jpg"}
]
================================================
FILE: lib/nothing.js
================================================
[
{"result": "https://is3-ssl.mzstatic.com/image/thumb/Purple42/v4/80/b5/ff/80b5ff2e-6f18-e959-bae6-b33bd3d355a0/source/256x256bb.jpg"}
]
================================================
FILE: lib/random.js
================================================
[
{"result": "https://telegra.ph/file/15f31b4cfc964496cca33.jpg"}
]
================================================
FILE: lib/rpg.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
================================================
FILE: lib/rude.json
================================================
["mhata","mhata yamai vako","Dick","dick","rombe","Rombe","dhodhi","Dodhi","Duzvi","Shure","mwana wehure","Mwana wehure","Jende","jende","Cum","cum","Pussy","pussy","Chut","machende","Suck","suck","Scum","scum","Scumbag","sascum","Sex","svira","Svira","Machende","Kusvira","Matinji","dinji","matinji","msunu","kusvira","Fuck you","fuck you","Muroyi","muroyi","Kontol","kontol","Hure","hure","bitch","Bitch","Kushata","Tsvina yemunhu","tsvina yemunhu","Stfu","stfu","Ass","ass","Asshole","asshole","Musatanyoko","mudhidhi","musatanyoko","Fuck","fuck","Motherfucker","beche","motherfucker","mboro","Dako","Mother fucker","mother fucker","Mf","Mboro","mf","mfs","fck","Fuck"]
================================================
FILE: lib/scrape.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const { JSDOM } = require('jsdom')
const { fromBuffer } = require('file-type')
const fetch = require('node-fetch')
const fs = require('fs')
const qs = require('qs')
const cheerio = require('cheerio')
const formData = require('form-data')
const yts = require( 'yt-search')
const request = require('request')
const { spawn } = require('child_process')
const path = require('path')
const axios = require('axios')
const src = path.join(__dirname, './data/src/')
const _font = path.join(src, 'font')
let tmp = path.join(__dirname, './')
const aesthetic = path.join(src, 'canvas/')
//Variable
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
//Post
function post(url, formdata) {
console.log(Object.keys(formdata).map(key => `${key}=${encodeURIComponent(formdata[key])}`).join('&'))
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: Object.keys(formdata).map(key => `${key}=${encodeURIComponent(formdata[key])}`).join('&')
})
}
//Tiktok Video
async function tiktok(Url) {
return new Promise (async (resolve, reject) => {
await axios.request({
url: "https://ttdownloader.com/",
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(respon => {
var $ =cheerio.load(respon.data)
token = $('#token').attr('value')
axios({
url: "https://ttdownloader.com/req/",
method: "POST",
data: new URLSearchParams(Object.entries({url: Url, format: "", token: token})),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(res => {
ch = cheerio.load(res.data)
result = {
status: res.status,
result: {
nowm: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
wm: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
}
}
resolve(result)
console.log(result)
}).catch(reject)
}).catch(reject)
})
}
//Tiktok Music
const UserAgent = () => {
ossss = [
'Macintosh; Intel Mac OS X 10_15_7',
'Macintosh; Intel Mac OS X 10_15_5',
'Macintosh; Intel Mac OS X 10_11_6',
'Macintosh; Intel Mac OS X 10_11_5',
'Windows NT 10.0; Win64; x64',
'Windows NT 10.0',
];
return `Mozilla/5.0 (${ossss[Math.floor(Math.random() * ossss.length)]}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${Math.floor(
Math.random() * 3,
) + 87}.0.${Math.floor(Math.random() * 190) + 4100}.${Math.floor(Math.random() * 50) + 140} Safari/537.36`;
}
async function tiktokmusic(URL) {
return new Promise(async (resolve, reject) => {
GDF = await axios.get('https://www.tiktok.com/')
Cookie = "ttwid=1%7C5UyITGuqEDXVZHtmtbU-7V35lTk8--iB6IjJuxRKPTs%7C1625390616%7C62c0b171e938115d5940a9af40c377000bc616cc7b25dfd76557913951585606; Domain=.tiktok.com; Path=/; Expires=Mon, 04 Jul 2022 09:23:36 GMT; HttpOnlytt_webid_v2=6980999485653632513; path=/; expires=Mon, 04 Jul 2022 09:23:37 GMT; domain=.tiktok.com; samesite=none; secure; httponlytt_webid=6980999485653632513; path=/; expires=Mon, 04 Jul 2022 09:23:37 GMT; domain=.tiktok.com; samesite=none; secure; httponlytt_csrf_token=9u_ml89_dULuOD6oMp_zTH06; path=/; domain=.tiktok.com; samesite=lax; secure; httponly"
axios.get(URL, {
headers: {
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
'Cookie': Cookie
}
})
.then(({ data }) => {
var $ =cheerio.load(data)
ttdata = JSON.parse($('script#__NEXT_DATA__').get()[0].children[0].data)
meta = ttdata.props.pageProps.itemInfo.itemStruct
console.log(meta)
resolve({meta})
})
})
}
//Github Stalk
function ghstalk(username) {
url= `https://api.github.com/users/${username}`;
return axios.get(url)
.then(data => {
return data.data
console.log(data.data)
})
}
//Telegraph
async function telegra(buffer) {
return new Promise(async (resolve, reject) => {
const { ext } = await fromBuffer(buffer)
let form = new FormData
form.append('file', buffer, 'tmp.' + ext)
let res = await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
let img = await res.json()
if (img.error) throw img.error
hasil = 'https://telegra.ph' + img[0].src
resolve({hasil})
console.log(hasil)
}).catch(reject)
}
//Youtube Audio
function yta(url) {
return new Promise((resolve, reject) => {
if (ytIdRegex.test(url)) {
let ytId = ytIdRegex.exec(url)
url = 'https://youtu.be/' + ytId[1]
post('https://www.y2mate.com/mates/en60/analyze/ajax', {
url,
q_auto: 0,
ajax: 1
})
.then(res => res.json())
.then(res => {
let document = (new JSDOM(res.result)).window.document
let type = document.querySelectorAll('td')
let filesize = type[type.length - 15].innerHTML
let id = /var k__id = "(.*?)"/.exec(document.body.innerHTML) || ['', '']
let thumb = document.querySelector('img').src
let title = document.querySelector('b').innerHTML
post('https://www.y2mate.com/mates/en60/convert', {
type: 'youtube',
_id: id[1],
v_id: ytId[1],
ajax: '1',
token: '',
ftype: 'mp3',
fquality: 128
})
.then(res => res.json())
.then(res => {
let KB = parseFloat(filesize) * (1000 * /MB$/.test(filesize))
hasil = []
title = title
audio =/ {
if (ytIdRegex.test(url)) {
let ytId = ytIdRegex.exec(url)
url = 'https://youtu.be/' + ytId[1]
post('https://www.y2mate.com/mates/en60/analyze/ajax', {
url,
q_auto: 0,
ajax: 1
})
.then(res => res.json())
.then(res => {
document = (new JSDOM(res.result)).window.document
yaha = document.querySelectorAll('td')
filesize = yaha[yaha.length - 23].innerHTML
id = /var k__id = "(.*?)"/.exec(document.body.innerHTML) || ['', '']
thumb = document.querySelector('img').src
title = document.querySelector('b').innerHTML
post('https://www.y2mate.com/mates/en60/convert', {
type: 'youtube',
_id: id[1],
v_id: ytId[1],
ajax: '1',
token: '',
ftype: 'mp4',
fquality: 360
})
.then(res => res.json())
.then(res => {
let KB = parseFloat(filesize) * (1000 * /MB$/.test(filesize))
hasil = []
video = / div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(1) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var google = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(2) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var samsung = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(3) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var microsoft = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(4) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var whatsapp = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(5) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var twitter = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(6) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var facebook = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(7) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var jooxpixel = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(8) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var openmoji = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(9) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var emojidex = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(10) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var messager = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(11) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var LG = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(12) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var HTC = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(13) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var mozilla = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(14) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var softbank = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(15) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var docomo = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(16) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
var KDDI = $('body > div.container > div.content').find('article > section.vendor-list > ul > li:nth-child(17) > div.vendor-container.vendor-rollout-target > div.vendor-image > img').attr('src');
const result = {
apple: apple.replace('120', '240'),
google: google.replace('120', '240'),
samsung: samsung.replace('120', '240'),
microsoft: microsoft.replace('120', '240'),
whatsapp: whatsapp.replace('120', '240'),
twitter: twitter.replace('120', '240'),
facebook: facebook.replace('120', '240'),
jooxPixel: jooxpixel.replace('120', '240'),
openemoji: openmoji.replace('120', '240'),
emojidex: emojidex.replace('120', '240'),
messanger: messager.replace('120', '240'),
LG: LG.replace('120', '240'),
HTC: HTC.replace('120', '240'),
mozilla: mozilla.replace('120', '240'),
softbank: softbank.replace('120', '240'),
docomo: docomo.replace('120', '240'),
KDDI: KDDI.replace('120', '240')
}
return result
console.log(result)
}
//cuaca
//Covid
function covid() {
return new Promise(async(resolve, reject) => {
axios.get('https://covid19.go.id/')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = [];
$('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) {
const pindo = $(b).find('div:nth-child(3) > strong').text()
const mindo = $(b).find('div:nth-child(5) > strong').text()
const sindo = $(b).find('div:nth-child(4) > strong').text()
const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim()
$('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) {
const neg = $(d).find('div:nth-child(3) > strong').text()
const pglo = $(d).find('div:nth-child(4) > strong').text()
const nglo = $(d).find('div:nth-child(5) > strong').text()
const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim()
const result = {
indonesia : {
kasus: pindo,
kematian: mindo,
sembuh: sindo,
update: upindo.split(':')[1]
},
global: {
negara: neg,
kasus: pglo,
kematian: nglo,
update: up.split(':')[1].split('\n')[0]
}
}
hasil.push(result)
})
})
resolve(hasil)
console.log(hasil)
})
.catch(reject)
})
}
//mediafire
async function mediafire(url) {
let query = await axios.get(url)
let cher = cheerio.load(query.data)
let hasil = []
let link = cher('a#downloadButton').attr('href')
let size = cher('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
let seplit = link.split('/')
let aurhor = '@arifirazzaq2001'
let nama = seplit[5]
let mime = nama.split('.')
mime = mime[1]
hasil.push({ author, nama, mime, size, link })
return hasil
console.log(hasil)
}
//Function Tahta
function noise(_var, depth = 4, s = 1024, freq) {
let forms = []
for (let i = 0; i < depth; i++) forms.push(
formula(
_var,
freq * rand(40, 80) * (s / 2048)/ s * ((i + 1) / 5),
rand(-Math.PI, Math.PI),
(i + 1) / depth * 8,
0
)
)
return forms.join('+')
}
function formula(_var, freq, offset, amp, add) {
return `(${add.toFixed(3)}+${amp.toFixed(4)}*sin(${offset.toFixed(6)}+2*PI*${_var}*${freq.toFixed(6)}))`
}
function textArgs(text, background, color, size, fontfile, x = '200' , y = '200', w = 1024, h = 1024) {
return `color=${background}:s=${w}x${h},drawtext=text='${text.replace(/[\\]/g, '\\$&')}':fontfile='${fontfile.replace(/[\\]/g, '\\$&')}':x=${x}:y=${y}:fontsize=${size}:fontcolor=${color}`
}
function pickRandom(list) {
return list[Math.floor(Math.random() * list.length)]
}
function rand(min, max, q = 0.001) {
return Math.floor((Math.random() * (max - min)) / q) * q
}
// Tahta
function tahta(text = '') {
return new Promise((resolve, reject) => {
let img = path.join(aesthetic, pickRandom(fs.readdirSync(aesthetic)))
let font = path.join(_font, 'Obelix.ttf')
let w = 1024
let h = w
let s = w + 'x' + h
let xF = `(${noise('X', 2, w, 1)}+${noise('Y', 1, h, 1)})/2+128`
let yF = `((${pickRandom(['', '-'])}${45 * w / 2048}*${pickRandom(['sin', 'cos'])}(X/${w}*4*PI))+${noise('X', 5, w, 0.8)}+${noise('Y', 2, h, 1)})/1.7+128`
let fsize = 440 / 2048 * w
let lh = 1.5
let format = ''
let layers = [
`[v:0]scale=${s}${format}[im]`,
textArgs('HARTA', 'black', 'white', fsize, font, '(w-text_w)/2', `(h-text_h)/2-(text_h*${lh})`, w, h) + format + '[top]',
textArgs('TAHTA', 'black', 'white', fsize, font, '(w-text_w)/2', `(h-text_h)/2`, w, h) + format + '[mid]',
textArgs(text, 'black', 'white', fsize, font, '(w-text_w)/2', `(h-text_h)/2+(text_h*${lh})`, w, h) + format + '[bot]',
'[top][mid]blend=all_mode=addition[con]',
'[con][bot]blend=all_mode=addition[txt]',
`nullsrc=s=${s},geq='r=${xF}:g=${xF}:b=${xF}'[dx]`,
`nullsrc=s=${s},geq='r=${yF}:g=${yF}:b=${yF}'[dy]`,
'[txt][dx][dy]displace[wa]',
'[im][wa]blend=all_mode=multiply:all_opacity=1'
]
let o = '_harta_tahta.png'
o = path.join(tmp, o)
let args = [
'-y',
'-i', img,
'-filter_complex', layers.join(';'),
'-frames:v', '1', '_harta_tahta.png'
]
console.log(layers)
console.log('ffmpeg', ...args)
spawn('ffmpeg', args)
.on('error', reject)
.on('close', () => {
try {
resolve(fs.readFileSync('./_harta_tahta.png'))
fs.unlinkSync(o)
} catch (e) {
reject(e)
}
})
//.stderr.on('data', a => console.log(a+''))
})
}
//Style Text
async function styleText(text) {
let res = await fetch('http://qaz.wtf/u/convert.cgi?text=' + encodeURIComponent(text))
let html = await res.text()
let dom = new JSDOM(html)
let table = dom.window.document.querySelector('table').children[0].children
let obj = {}
for (let tr of table) {
let name = tr.querySelector('.aname').innerHTML
let content = tr.children[1].textContent.replace(/^\n/, '').replace(/\n$/, '')
obj[name + (obj[name] ? ' Reversed' : '')] = content
}
return obj
console.log(obj)
}
//AsmaulHusna
function asmaul() {
global.asmaulhusna = {
"result": {
"data": [
{
"index": "1",
"latin": "Ar Rahman",
"arabic": "الرَّحْمَنُ",
"translation_id": "Yang Memiliki Mutlak sifat Pemurah",
"translation_en": "The All Beneficent"
},
{
"index": "2",
"latin": "Ar Rahiim",
"arabic": "الرَّحِيمُ",
"translation_id": "Yang Memiliki Mutlak sifat Penyayang",
"translation_en": "The Most Merciful"
},
{
"index": "3",
"latin": "Al Malik",
"arabic": "الْمَلِكُ",
"translation_id": "Yang Memiliki Mutlak sifat Merajai/Memerintah",
"translation_en": "The King, The Sovereign"
},
{
"index": "4",
"latin": "Al Quddus",
"arabic": "الْقُدُّوسُ",
"translation_id": "Yang Memiliki Mutlak sifat Suci",
"translation_en": "The Most Holy"
},
{
"index": "5",
"latin": "As Salaam",
"arabic": "السَّلاَمُ",
"translation_id": "Yang Memiliki Mutlak sifat Memberi Kesejahteraan",
"translation_en": "Peace and Blessing"
},
{
"index": "6",
"latin": "Al Mu’min",
"arabic": "الْمُؤْمِنُ",
"translation_id": "Yang Memiliki Mutlak sifat Memberi Keamanan",
"translation_en": "The Guarantor"
},
{
"index": "7",
"latin": "Al Muhaimin",
"arabic": "الْمُهَيْمِنُ",
"translation_id": "Yang Memiliki Mutlak sifat Pemelihara",
"translation_en": "The Guardian, the Preserver"
},
{
"index": "8",
"latin": "Al ‘Aziiz",
"arabic": "الْعَزِيزُ",
"translation_id": "Yang Memiliki Mutlak Kegagahan",
"translation_en": "The Almighty, the Self Sufficient"
},
{
"index": "9",
"latin": "Al Jabbar",
"arabic": "الْجَبَّارُ",
"translation_id": "Yang Memiliki Mutlak sifat Perkasa",
"translation_en": "The Powerful, the Irresistible"
},
{
"index": "10",
"latin": "Al Mutakabbir",
"arabic": "الْمُتَكَبِّرُ",
"translation_id": "Yang Memiliki Mutlak sifat Megah,Yang Memiliki Kebesaran",
"translation_en": "The Tremendous"
},
{
"index": "11",
"latin": "Al Khaliq",
"arabic": "الْخَالِقُ",
"translation_id": "Yang Memiliki Mutlak sifat Pencipta",
"translation_en": "The Creator"
},
{
"index": "12",
"latin": "Al Baari’",
"arabic": "الْبَارِئُ",
"translation_id": "Yang Memiliki Mutlak sifat Yang Melepaskan(Membuat, Membentuk, Menyeimbangkan)",
"translation_en": "The Maker"
},
{
"index": "13",
"latin": "Al Mushawwir",
"arabic": "الْمُصَوِّرُ",
"translation_id": "Yang Memiliki Mutlak sifat YangMembentuk Rupa (makhluknya)",
"translation_en": "The Fashioner of Forms"
},
{
"index": "14",
"latin": "Al Ghaffaar",
"arabic": "الْغَفَّارُ",
"translation_id": "Yang Memiliki Mutlak sifat Pengampun",
"translation_en": "The Ever Forgiving"
},
{
"index": "15",
"latin": "Al Qahhaar",
"arabic": "الْقَهَّارُ",
"translation_id": "Yang Memiliki Mutlak sifat Memaksa",
"translation_en": "The All Compelling Subduer"
},
{
"index": "16",
"latin": "Al Wahhaab",
"arabic": "الْوَهَّابُ",
"translation_id": "Yang Memiliki Mutlak sifat Pemberi Karunia",
"translation_en": "The Bestower"
},
{
"index": "17",
"latin": "Ar Razzaaq",
"arabic": "الرَّزَّاقُ",
"translation_id": "Yang Memiliki Mutlak sifat Pemberi Rejeki",
"translation_en": "The Ever Providing"
},
{
"index": "18",
"latin": "Al Fattaah",
"arabic": "الْفَتَّاحُ",
"translation_id": "Yang Memiliki Mutlak sifat Pembuka Rahmat",
"translation_en": "The Opener, the Victory Giver"
},
{
"index": "19",
"latin": "Al ‘Aliim",
"arabic": "اَلْعَلِيْمُ",
"translation_id": "Yang Memiliki Mutlak sifatMengetahui (Memiliki Ilmu)",
"translation_en": "The All Knowing, the Omniscient"
},
{
"index": "20",
"latin": "Al Qaabidh",
"arabic": "الْقَابِضُ",
"translation_id": "Yang Memiliki Mutlak sifat YangMenyempitkan (makhluknya)",
"translation_en": "The Restrainer, the Straightener"
},
{
"index": "21",
"latin": "Al Baasith",
"arabic": "الْبَاسِطُ",
"translation_id": "Yang Memiliki Mutlak sifat YangMelapangkan (makhluknya)",
"translation_en": "The Expander, the Munificent"
},
{
"index": "22",
"latin": "Al Khaafidh",
"arabic": "الْخَافِضُ",
"translation_id": "Yang Memiliki Mutlak sifat YangMerendahkan (makhluknya)",
"translation_en": "The Abaser"
},
{
"index": "23",
"latin": "Ar Raafi’",
"arabic": "الرَّافِعُ",
"translation_id": "Yang Memiliki Mutlak sifat YangMeninggikan (makhluknya)",
"translation_en": "The Exalter"
},
{
"index": "24",
"latin": "Al Mu’izz",
"arabic": "الْمُعِزُّ",
"translation_id": "Yang Memiliki Mutlak sifat YangMemuliakan (makhluknya)",
"translation_en": "The Giver of Honor"
},
{
"index": "25",
"latin": "Al Mudzil",
"arabic": "المُذِلُّ",
"translation_id": "Yang Memiliki Mutlak sifatYang Menghinakan (makhluknya)",
"translation_en": "The Giver of Dishonor"
},
{
"index": "26",
"latin": "Al Samii’",
"arabic": "السَّمِيعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mendengar",
"translation_en": "The All Hearing"
},
{
"index": "27",
"latin": "Al Bashiir",
"arabic": "الْبَصِيرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Melihat",
"translation_en": "The All Seeing"
},
{
"index": "28",
"latin": "Al Hakam",
"arabic": "الْحَكَمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Menetapkan",
"translation_en": "The Judge, the Arbitrator"
},
{
"index": "29",
"latin": "Al ‘Adl",
"arabic": "الْعَدْلُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Adil",
"translation_en": "The Utterly Just"
},
{
"index": "30",
"latin": "Al Lathiif",
"arabic": "اللَّطِيفُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Lembut",
"translation_en": "The Subtly Kind"
},
{
"index": "31",
"latin": "Al Khabiir",
"arabic": "الْخَبِيرُ",
"translation_id": "Yang Memiliki Mutlak sifatMaha Mengetahui Rahasia",
"translation_en": "The All Aware"
},
{
"index": "32",
"latin": "Al Haliim",
"arabic": "الْحَلِيمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Penyantun",
"translation_en": "The Forbearing, the Indulgent"
},
{
"index": "33",
"latin": "Al ‘Azhiim",
"arabic": "الْعَظِيمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Agung",
"translation_en": "The Magnificent, the Infinite"
},
{
"index": "34",
"latin": "Al Ghafuur",
"arabic": "الْغَفُورُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pengampun",
"translation_en": "The All Forgiving"
},
{
"index": "35",
"latin": "As Syakuur",
"arabic": "الشَّكُورُ",
"translation_id": "Yang Memiliki Mutlak sifat MahaPembalas Budi (Menghargai)",
"translation_en": "The Grateful"
},
{
"index": "36",
"latin": "Al ‘Aliy",
"arabic": "الْعَلِيُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Tinggi",
"translation_en": "The Sublimely Exalted"
},
{
"index": "37",
"latin": "Al Kabiir",
"arabic": "الْكَبِيرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Besar",
"translation_en": "The Great"
},
{
"index": "38",
"latin": "Al Hafizh",
"arabic": "الْحَفِيظُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Menjaga",
"translation_en": "The Preserver"
},
{
"index": "39",
"latin": "Al Muqiit",
"arabic": "المُقيِت",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pemberi Kecukupan",
"translation_en": "The Nourisher"
},
{
"index": "40",
"latin": "Al Hasiib",
"arabic": "الْحسِيبُ",
"translation_id": "Yang Memiliki Mutlak sifat MahaMembuat Perhitungan",
"translation_en": "The Reckoner"
},
{
"index": "41",
"latin": "Al Jaliil",
"arabic": "الْجَلِيلُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mulia",
"translation_en": "The Majestic"
},
{
"index": "42",
"latin": "Al Kariim",
"arabic": "الْكَرِيمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pemurah",
"translation_en": "The Bountiful, the Generous"
},
{
"index": "43",
"latin": "Ar Raqiib",
"arabic": "الرَّقِيبُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mengawasi",
"translation_en": "The Watchful"
},
{
"index": "44",
"latin": "Al Mujiib",
"arabic": "الْمُجِيبُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mengabulkan",
"translation_en": "The Responsive, the Answerer"
},
{
"index": "45",
"latin": "Al Waasi’",
"arabic": "الْوَاسِعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Luas",
"translation_en": "The Vast, the All Encompassing"
},
{
"index": "46",
"latin": "Al Hakiim",
"arabic": "الْحَكِيمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maka Bijaksana",
"translation_en": "The Wise"
},
{
"index": "47",
"latin": "Al Waduud",
"arabic": "الْوَدُودُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pencinta",
"translation_en": "The Loving, the Kind One"
},
{
"index": "48",
"latin": "Al Majiid",
"arabic": "الْمَجِيدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mulia",
"translation_en": "The All Glorious"
},
{
"index": "49",
"latin": "Al Baa’its",
"arabic": "الْبَاعِثُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Membangkitkan",
"translation_en": "The Raiser of the Dead"
},
{
"index": "50",
"latin": "As Syahiid",
"arabic": "الشَّهِيدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Menyaksikan",
"translation_en": "The Witness"
},
{
"index": "51",
"latin": "Al Haqq",
"arabic": "الْحَقُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Benar",
"translation_en": "The Truth, the Real"
},
{
"index": "52",
"latin": "Al Wakiil",
"arabic": "الْوَكِيلُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memelihara",
"translation_en": "The Trustee, the Dependable"
},
{
"index": "53",
"latin": "Al Qawiyyu",
"arabic": "الْقَوِيُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Kuat",
"translation_en": "The Strong"
},
{
"index": "54",
"latin": "Al Matiin",
"arabic": "الْمَتِينُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Kokoh",
"translation_en": "The Firm, the Steadfast"
},
{
"index": "55",
"latin": "Al Waliyy",
"arabic": "الْوَلِيُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Melindungi",
"translation_en": "The Protecting Friend, Patron, and Helper"
},
{
"index": "56",
"latin": "Al Hamiid",
"arabic": "الْحَمِيدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Terpuji",
"translation_en": "The All Praiseworthy"
},
{
"index": "57",
"latin": "Al Mushii",
"arabic": "الْمُحْصِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mengkalkulasi",
"translation_en": "The Accounter, the Numberer of All"
},
{
"index": "58",
"latin": "Al Mubdi’",
"arabic": "الْمُبْدِئُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memulai",
"translation_en": "The Producer, Originator, and Initiator of all"
},
{
"index": "59",
"latin": "Al Mu’iid",
"arabic": "الْمُعِيدُ",
"translation_id": "Yang Memiliki Mutlak sifat MahaMengembalikan Kehidupan",
"translation_en": "The Reinstater Who Brings Back All"
},
{
"index": "60",
"latin": "Al Muhyii",
"arabic": "الْمُحْيِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Menghidupkan",
"translation_en": "The Giver of Life"
},
{
"index": "61",
"latin": "Al Mumiitu",
"arabic": "اَلْمُمِيتُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mematikan",
"translation_en": "The Bringer of Death, the Destroyer"
},
{
"index": "62",
"latin": "Al Hayyu",
"arabic": "الْحَيُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Hidup",
"translation_en": "The Ever Living"
},
{
"index": "63",
"latin": "Al Qayyuum",
"arabic": "الْقَيُّومُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mandiri",
"translation_en": "The Self Subsisting Sustainer of All"
},
{
"index": "64",
"latin": "Al Waajid",
"arabic": "الْوَاجِدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Penemu",
"translation_en": "The Perceiver, the Finder, the Unfailing"
},
{
"index": "65",
"latin": "Al Maajid",
"arabic": "الْمَاجِدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mulia",
"translation_en": "The Illustrious, the Magnificent"
},
{
"index": "66",
"latin": "Al Wahiid",
"arabic": "الْواحِدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Tunggal",
"translation_en": "The One, The Unique, Manifestation of Unity"
},
{
"index": "67",
"latin": "Al ‘Ahad",
"arabic": "اَلاَحَدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Esa",
"translation_en": "The One, the All Inclusive, the Indivisible"
},
{
"index": "68",
"latin": "As Shamad",
"arabic": "الصَّمَدُ",
"translation_id": "Yang Memiliki Mutlak sifat MahaDibutuhkan, Tempat Meminta",
"translation_en": "The Self Sufficient, the Impregnable,the Eternally Besought of All, the Everlasting"
},
{
"index": "69",
"latin": "Al Qaadir",
"arabic": "الْقَادِرُ",
"translation_id": "Yang Memiliki Mutlak sifat MahaMenentukan, Maha Menyeimbangkan",
"translation_en": "The All Able"
},
{
"index": "70",
"latin": "Al Muqtadir",
"arabic": "الْمُقْتَدِرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Berkuasa",
"translation_en": "The All Determiner, the Dominant"
},
{
"index": "71",
"latin": "Al Muqaddim",
"arabic": "الْمُقَدِّمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mendahulukan",
"translation_en": "The Expediter, He who brings forward"
},
{
"index": "72",
"latin": "Al Mu’akkhir",
"arabic": "الْمُؤَخِّرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mengakhirkan",
"translation_en": "The Delayer, He who puts far away"
},
{
"index": "73",
"latin": "Al Awwal",
"arabic": "الأوَّلُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Awal",
"translation_en": "The First"
},
{
"index": "74",
"latin": "Al Aakhir",
"arabic": "الآخِرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Akhir",
"translation_en": "The Last"
},
{
"index": "75",
"latin": "Az Zhaahir",
"arabic": "الظَّاهِرُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Nyata",
"translation_en": "The Manifest; the All Victorious"
},
{
"index": "76",
"latin": "Al Baathin",
"arabic": "الْبَاطِنُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Ghaib",
"translation_en": "The Hidden; the All Encompassing"
},
{
"index": "77",
"latin": "Al Waali",
"arabic": "الْوَالِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memerintah",
"translation_en": "The Patron"
},
{
"index": "78",
"latin": "Al Muta’aalii",
"arabic": "الْمُتَعَالِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Tinggi",
"translation_en": "The Self Exalted"
},
{
"index": "79",
"latin": "Al Barri",
"arabic": "الْبَرُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Penderma",
"translation_en": "The Most Kind and Righteous"
},
{
"index": "80",
"latin": "At Tawwaab",
"arabic": "التَّوَابُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Penerima Tobat",
"translation_en": "The Ever Returning, Ever Relenting"
},
{
"index": "81",
"latin": "Al Muntaqim",
"arabic": "الْمُنْتَقِمُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Penuntut Balas",
"translation_en": "The Avenger"
},
{
"index": "82",
"latin": "Al Afuww",
"arabic": "العَفُوُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pemaaf",
"translation_en": "The Pardoner, the Effacer of Sins"
},
{
"index": "83",
"latin": "Ar Ra`uuf",
"arabic": "الرَّؤُوفُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pengasih",
"translation_en": "The Compassionate, the All Pitying"
},
{
"index": "84",
"latin": "Malikul Mulk",
"arabic": "مَالِكُ الْمُلْكِ",
"translation_id": "Yang Memiliki Mutlak sifatPenguasa Kerajaan (Semesta)",
"translation_en": "The Owner of All Sovereignty"
},
{
"index": "85",
"latin": "Dzul JalaaliWal Ikraam",
"arabic": "ذُوالْجَلاَلِوَالإكْرَامِ",
"translation_id": "Yang Memiliki Mutlak sifat PemilikKebesaran dan Kemuliaan",
"translation_en": "The Lord of Majesty and Generosity"
},
{
"index": "86",
"latin": "Al Muqsith",
"arabic": "الْمُقْسِطُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Adil",
"translation_en": "The Equitable, the Requiter"
},
{
"index": "87",
"latin": "Al Jamii’",
"arabic": "الْجَامِعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mengumpulkan",
"translation_en": "The Gatherer, the Unifier"
},
{
"index": "88",
"latin": "Al Ghaniyy",
"arabic": "الْغَنِيُّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Berkecukupan",
"translation_en": "The All Rich, the Independent"
},
{
"index": "89",
"latin": "Al Mughnii",
"arabic": "الْمُغْنِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memberi Kekayaan",
"translation_en": "The Enricher, the Emancipator"
},
{
"index": "90",
"latin": "Al Maani",
"arabic": "اَلْمَانِعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Mencegah",
"translation_en": "The Withholder, the Shielder, the Defender"
},
{
"index": "91",
"latin": "Ad Dhaar",
"arabic": "الضَّارَّ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memberi Derita",
"translation_en": "The Distressor, the Harmer"
},
{
"index": "92",
"latin": "An Nafii’",
"arabic": "النَّافِعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Memberi Manfaat",
"translation_en": "The Propitious, the Benefactor"
},
{
"index": "93",
"latin": "An Nuur",
"arabic": "النُّورُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Bercahaya(Menerangi, Memberi Cahaya)",
"translation_en": "The Light"
},
{
"index": "94",
"latin": "Al Haadii",
"arabic": "الْهَادِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pemberi Petunjuk",
"translation_en": "The Guide"
},
{
"index": "95",
"latin": "Al Baadii",
"arabic": "الْبَدِيعُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pencipta",
"translation_en": "Incomparable, the Originator"
},
{
"index": "96",
"latin": "Al Baaqii",
"arabic": "اَلْبَاقِي",
"translation_id": "Yang Memiliki Mutlak sifat Maha Kekal",
"translation_en": "The Ever Enduring and Immutable"
},
{
"index": "97",
"latin": "Al Waarits",
"arabic": "الْوَارِثُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pewaris",
"translation_en": "The Heir, the Inheritor of All"
},
{
"index": "98",
"latin": "Ar Rasyiid",
"arabic": "الرَّشِيدُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Pandai",
"translation_en": "The Guide, Infallible Teacher, and Knower"
},
{
"index": "99",
"latin": "As Shabuur",
"arabic": "الصَّبُورُ",
"translation_id": "Yang Memiliki Mutlak sifat Maha Sabar",
"translation_en": "The Patient"
}
]
}
}
let asmaulhusna = JSON.stringify(global.asmaulhusna)
let json = JSON.parse(asmaulhusna)
let data = json.result.data.map((v, i) => `${i + 1}.\n*• Latin:* ${v.latin}\n*• Arab:* ${v.arabic}\n*• Artinya:* ${v.translation_id}\n*• Artinya en:* ${v.translation_en}`).join('\n\n')
contoh = `*ASMAUL-HUSNA*\n\n`
hasil = []
hasil.push(contoh + data)
return hasil
console.log(hasil)
}
//Facebook
function fb(link){
return new Promise((resolve,reject) => {
let config = {
'url': link
}
axios('https://www.getfvid.com/downloader',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"content-type": "application/x-www-form-urlencoded",
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss"
}
})
.then(async({ data }) => {
const $ = cheerio.load(data);
resolve({
video: $('div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'),
audio: $('div.col-md-4.btns-download > p:nth-child(3) > a').attr('href')
})
})
.catch(reject)
})
}
//IgStalk
function igstalk(username){
return new Promise((resolve,reject) => {
axios.get('https://www.instagram.com/'+ username +'/?__a=1',{
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
"cookie": "mid=XBXl1AALAAEbFoAEfNjZlMMG9dwX; ig_did=91E66A48-5AA2-445D-BFE6-84DC4456DE8F; fbm_124024574287414=base_domain=.instagram.com; ig_nrcb=1; shbid=\"12737\0544008624962\0541656157971:01f72a5102dc07af6845adf923ca70eb86e81ab95fa9dbfdaf157c9eef0e82fd1f10fe23\"; shbts=\"1624621971\0544008624962\0541656157971:01f74841fba8e77a0066b47ea891dec8fba6fdf9216c0816f9fb3532292f769828800ae2\"; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; csrftoken=PpiPMEl0R2pAwThsw4NXynO6cVIXHZDo; ds_user_id=38316792800; sessionid=38316792800:rQj5Tr3g5zkg7b:4; rur=\"RVA\05438316792800\0541656158332:01f759cf624bef147397144805bb4c26f6c8b36a232e0f5738c570ee492f6b629f84f6e5\""
}
})
.then(({ data }) => {
const user = data.graphql.user
let result = {
id: user.id,
bio: user.biography,
followers: user.edge_followed_by.count,
following: user.edge_follow.count,
fullName: user.full_name,
highlightCount: user.highlight_reel_count,
isBusinessAccount: user.is_business_account,
isRecentUser: user.is_joined_recently,
accountCategory: user.business_category_name,
linkedFacebookPage: user.connected_fb_page,
isPrivate: user.is_private,
isVerified: user.is_verified,
profilePicHD: user.profile_pic_url_hd,
username: user.username,
postsCount: user.edge_owner_to_timeline_media.count
}
resolve(result)
console.log(result)
})
.catch(reject)
})
}
//TebakGambar
function tebakgambar() {
return new Promise(async(resolve, reject) => {
axios.get('https://jawabantebakgambar.net/all-answers/')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
let random = Math.floor(Math.random() * 2836) + 2;
let link2 = 'https://jawabantebakgambar.net'
$(`#images > li:nth-child(${random}) > a`).each(function(a, b) {
const img = link2 + $(b).find('img').attr('data-src')
const jwb = $(b).find('img').attr('alt')
result.push({
image: img,
jawaban: jwb
})
resolve(result)
console.log(result)
})
})
.catch(reject)
})
}
//PlayStore
function playstore(name){
return new Promise((resolve, reject) => {
axios.get('https://play.google.com/store/search?q='+ name +'&c=apps')
.then(({ data }) => {
const $ = cheerio.load(data)
let ln = [];
let nm = [];
let dv = [];
let lm = [];
const result = [];
$('div.wXUyZd > a').each(function(a,b){
const link = 'https://play.google.com' + $(b).attr('href')
ln.push(link);
})
$('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){
const name = $(e).text().trim()
nm.push(name);
})
$('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){
const dev = $(g).text().trim();
dv.push(dev)
})
$('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){
const limk = 'https://play.google.com' + $(i).attr('href');
lm.push(limk);
})
for (let i = 0; i < ln.length; i++){
result.push({
name: nm[i],
link: ln[i],
developer: dv[i]
})
}
resolve(result)
})
console.log(result)
.catch(reject)
})
}
//Twitter
function twitter(link){
return new Promise((resolve, reject) => {
let config = {
'URL': link
}
axios.post('https://twdown.net/download.php',qs.stringify(config),{
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1388798541.1625064838; _gid=GA1.2.1351476739.1625064838; __gads=ID=7a60905ab10b2596-229566750eca0064:T=1625064837:RT=1625064837:S=ALNI_Mbg3GGC2b3oBVCUJt9UImup-j20Iw; _gat=1"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
desc: $('div:nth-child(1) > div:nth-child(2) > p').text().trim(),
thumb: $('div:nth-child(1) > img').attr('src'),
HD: $('tbody > tr:nth-child(1) > td:nth-child(4) > a').attr('href'),
SD: $('tr:nth-child(2) > td:nth-child(4) > a').attr('href'),
audio: 'https://twdown.net/' + $('tr:nth-child(4) > td:nth-child(4) > a').attr('href')
})
})
.catch(reject)
})
}
//KodePos
async function kodepos(kota) {
return new Promise(async (resolve, reject) => {
let postalcode = 'https://carikodepos.com/';
let url = postalcode+'?s='+kota;
await request.get({
headers: {
'Accept': 'application/json, text/javascript, */*;',
'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4209.3 Mobile Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
'Origin': postalcode,
'Referer': postalcode
},
url: url,
}, function(error, response, body) {
if (error) return reject(error);
let $ = cheerio.load(body);
var search = $('tr');
if (!search.length) return reject('No result could be found');
var results = [];
search.each(function(i) {
if (i != 0) {
var td = $(this).find('td');
var result = {};
td.each(function(i) {
var value = $(this).find('a').html();
var key = (i == 0) ? 'province' : (i == 1) ? 'city' : (i == 2) ? 'subdistrict' : (i == 3) ? 'urban' : 'postalcode';
result[key] = value;
})
results.push(result);
}
});
return resolve(results);
console.log(results)
});
});
};
//Gempa
function gempa() {
return new Promise((resolve, reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg').then((response) => {
const $ = cheerio.load(response.data)
const urlElems = $('table.table-hover.table-striped')
for (let i = 0; i < urlElems.length; i++) {
const urlSpan = $(urlElems[i]).find('tbody')[0]
if (urlSpan) {
const urlData = $(urlSpan).find('tr')[0]
var Kapan = $(urlData).find('td')[1]
var Letak = $(urlData).find('td')[2]
var Magnitudo = $(urlData).find('td')[3]
var Kedalaman = $(urlData).find('td')[4]
var Wilayah = $(urlData).find('td')[5]
var lintang = $(Letak).text().split(' ')[0]
var bujur = $(Letak).text().split(' ')[2]
var hasil = {
Waktu: $(Kapan).text(),
Lintang: lintang,
Bujur: bujur,
Magnitudo: $(Magnitudo).text(),
Kedalaman: $(Kedalaman).text().replace(/\t/g, '').replace(/I/g, ''),
Wilayah: $(Wilayah).text().replace(/\t/g, '').replace(/I/g, '').replace('-','').replace(/\r/g, '').split('\n')[0],
Map: ''
}
resolve(hasil);
console.log(hasil)
}
}
})
})
}
//ServerMc
function servermc() {
return new Promise((resolve, reject) => {
axios.get(`https://minecraftpocket-servers.com/country/indonesia/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("tr").each(function(c, d) {
ip = $(d).find("button.btn.btn-secondary.btn-sm").eq(1).text().trim().replace(':19132', '')
port = '19132'
versi = $(d).find("a.btn.btn-info.btn-sm").text()
player = $(d).find("td.d-none.d-md-table-cell > strong").eq(1).text().trim()
const Data = {
ip: ip,
port: port,
versi: versi,
player: player
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
//HappyMod
function happymod(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.happymod.com/search.html?q=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.pdt-app-box").each(function(c, d) {
name = $(d).find("a").text().trim();
icon = $(d).find("img.lazy").attr('data-original');
link = $(d).find("a").attr('href');
link2 = `https://www.happymod.com${link}`
const Data = {
icon: icon,
name: name,
link: link2
}
hasil.push(Data)
})
resolve(hasil);
}).catch(reject)
});
}
//Halal
function halal(query, page) {
return new Promise((resolve, reject) => {
axios.get(`https://www.halalmui.org/mui14/searchproduk/search/?kategori=nama_produk&katakunci=${query}&page=${page}`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("tr > td").each(function(c, d) {
name = $(d).find("span").eq(0).text()
namee = name.replace('Nama Produk :', '')
nmr = $(d).find("span").eq(1).text()
nmrr = nmr.replace('Nomor Sertifikat :', '')
const Data = {
title: namee,
nomorsertifikat: nmrr
}
hasil.push(Data)
resolve(hasil)
}).catch(reject)
})
})
}
//McPe Dl
function mcpedl(query) {
return new Promise((resolve, reject) => {
axios.get(`https://mcpedl.com/?s=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.post").each(function(c, d) {
name = $(d).find("h2.post__title").text().trim();
date = $(d).find("div.post__date").text().trim();
desc = $(d).find("p.post__text").text().trim();
category = $(d).find("div.post__category > a").text().trim();
link = $(d).find("a").attr('href')
link2 = `https://mcpedl.com${link}`
const Data = {
name: name,
category: category,
date: date,
desc: desc,
link: link2
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
});
}
//Sfile Seaech
function sfilesearch(query) {
return new Promise((resolve, reject) => {
axios.get(`https://sfile.mobi/search.php?q=${query}&search=Search`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.list").each(function(i, cuk) {
ico= $(cuk).find("img").attr("src");
lin= $(cuk).find("a").attr("href");
name= $(cuk).find("a").text();
const Data = {
icon: ico,
name: name,
link: lin
}
hasil.push(Data)
})
resolve(hasil)
});
});
}
//Hoax
function hoax() {
return new Promise((resolve, reject) => {
axios.get(`https://turnbackhoax.id/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("figure.mh-loop-thumb").each(function(a, b) {
$("div.mh-loop-content.mh-clearfix").each(function(c, d) {
link = $(d).find("h3.entry-title.mh-loop-title > a").attr('href');
img = $(b).find("img.attachment-mh-magazine-lite-medium.size-mh-magazine-lite-medium.wp-post-image").attr('src');
title = $(d).find("h3.entry-title.mh-loop-title > a").text().trim();
desc = $(d).find("div.mh-excerpt > p").text().trim();
date = $(d).find("span.mh-meta-date.updated").text().trim();
const Data = {
title: title,
thumbnail: img,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
})
resolve(hasil)
}).catch(reject)
});
}
//IgVid
function igvideo(link) {
return new Promise(async(resolve, reject) => {
let config = {
'url': link,
'submit': ''
}
axios('https://downloadgram.org/video-downloader.php',{
method: 'POST',
data : new URLSearchParams(Object.entries(config)),
headers: {
"cookie": "_ga=GA1.2.623704211.1625264926; __gads=ID=a078e4fc2781b47b-22330cd520ca006e:T=1625264920:RT=1625264920:S=ALNI_MYS-jyPCjNa94DU8n-sX4aNF-ODOg; __atssc=google%3B3; _gid=GA1.2.1953813019.1625397379; __atuvc=4%7C26%2C6%7C27; __atuvs=60e2ab6d67a322ec003",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
})
.then(tod => {
const $ = cheerio.load(tod.data)
resolve({
link: $('#downloadBox > a').attr('href')
})
})
})
}
//IgFoto
function igfoto(link) {
return new Promise(async(resolve, reject) => {
let config = {
'url': link,
'submit': ''
}
axios('https://downloadgram.org/photo-downloader.php',{
method: 'POST',
data : new URLSearchParams(Object.entries(config)),
headers: {
"cookie": "_ga=GA1.2.623704211.1625264926; __gads=ID=a078e4fc2781b47b-22330cd520ca006e:T=1625264920:RT=1625264920:S=ALNI_MYS-jyPCjNa94DU8n-sX4aNF-ODOg; __atssc=google%3B3; _gid=GA1.2.1953813019.1625397379; __atuvc=4%7C26%2C6%7C27; __atuvs=60e2ab6d67a322ec003",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
})
.then(tod => {
const $ = cheerio.load(tod.data)
resolve({
link: $('#downloadBox > a').attr('href')
})
})
})
}
//IgTv
function igtv(link) {
return new Promise(async(resolve, reject) => {
let config = {
'url': link,
'submit': ''
}
axios('https://downloadgram.org/igtv-downloader.php',{
method: 'POST',
data : new URLSearchParams(Object.entries(config)),
headers: {
"cookie": "_ga=GA1.2.623704211.1625264926; __gads=ID=a078e4fc2781b47b-22330cd520ca006e:T=1625264920:RT=1625264920:S=ALNI_MYS-jyPCjNa94DU8n-sX4aNF-ODOg; __atssc=google%3B3; _gid=GA1.2.1953813019.1625397379; __atuvc=4%7C26%2C6%7C27; __atuvs=60e2ab6d67a322ec003",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
})
.then(tod => {
const $ = cheerio.load(tod.data)
resolve({
link: $('#downloadBox > a').attr('href')
})
})
})
}
//Jalan Tikus
function jalantikus(query) {
return new Promise((resolve, reject) => {
axios.get(`https://jalantikus.com/search/articles/${query}/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.post-block-with-category").each(function(c, d) {
title = $(d).find("a.post-block-with-category__link").text()
category = $(d).find("a.post-info__category-link").text()
date = $(d).find("time").text()
link = `https://jalantikus.com${$(d).find("a").attr('href')}`
const Data = {
title: title,
category: category,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
//Tribun News
function tribunnews() {
return new Promise((resolve, reject) => {
axios.get(`https://www.tribunnews.com/news`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("li.p1520.art-list.pos_rel").each(function(c, d) {
title = $(d).find("div.mr140 > h3 > a.f20.ln24.fbo.txt-oev-2").text().trim()
thumb = $(d).find("div.fr.mt5.pos_rel > a > img.shou2.bgwhite").attr('src')
desc = $(d).find("div.grey2.pt5.f13.ln18.txt-oev-3").text().trim()
date = $(d).find("div.grey.pt5 > time.foot.timeago").text().trim()
link = $(d).find("div.fr.mt5.pos_rel > a").attr('href')
const Data = {
title: title,
thumb: thumb,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
//Kompas News
function kompasnews() {
return new Promise((resolve, reject) => {
axios.get(`https://news.kompas.com/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.col-bs9-3").each(function(c, d) {
title = $(d).find("h3.article__title > a.article__link").text()
desc = $(d).find("div.article__lead").text().trim()
date = $(d).find("div.article__date").text().trim()
link = $(d).find("h3.article__title > a.article__link").attr('href')
const Data = {
title: title,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
//WallPapper
function wallpapper(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wallpaperflare.com/search?wallpaper=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("#gallery > li > figure> a").each(function(i, cuk) {
const img = $(cuk).find("img").attr('data-src');
hasil.push(img)
})
resolve(hasil)
}).catch(reject);
});
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
image: $(b).find('img').attr('data-src')
})
})
resolve(hasil)
})
})
}
//ApkMody
function apkmody(query) {
return new Promise((resolve, reject) => {
axios.get(`https://apkmody.io/?s=${query}`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.flex-item").each(function(c, d) {
name = $(d).find("div.card-title > h2.truncate").text();
desc = $(d).find("div.card-body > p.card-excerpt.has-small-font-size.truncate").text().trim();
img = $(d).find("div.card-image > img").attr('src');
link = $(d).find("article.card.has-shadow.clickable > a").attr('href');
const Data = {
img: img,
name: name,
desc: desc,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
});
}
//PalingMurah
function palingmurah(query) {
return new Promise((resolve, reject) => {
axios.get(`https://palingmurah.net/pencarian-produk/?term=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.ui.card.wpj-card-style-2").each(function(c, d) {
//INFO BARANG
name = $(d).find("div.content.wpj-small.list-70-right > a.list-header").text().trim();
link = $(d).find("div.content.wpj-small.list-70-right > a.list-header").attr('href');
img = $(d).find("div.card-image-helper > img").attr('data-src');
harga = $(d).find("div.flex-master.card-job-price.text-right.text-vertical-center").text().trim();
//user
usernamepenjual = $(d).find("strong").text().trim();
linkpenjual = $(d).find("a.ui.wpj-big.avatar.image").attr('href');
iconpenjual = $(d).find("a.ui.wpj-big.avatar.image > img").attr('data-src');
const Data = {
name: name,
harga: harga,
img: img,
link: link,
usernamepenjual: usernamepenjual,
linkpenjual: linkpenjual,
iconpenjual: iconpenjual
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
});
}
//Moddroid
function moddroid(query) {
return new Promise((resolve, reject) => {
axios.get(`https://moddroid.com/?s=${query}`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.col-12.col-md-6.mb-4").each(function(c, d) {
link = $(d).find("a.d-flex.position-relative.archive-post").attr('href');
name = $(d).find("div > h3.h5.font-weight-semibold.text-truncate.text-primary.w-100").text().trim();
img = $(d).find("div.flex-shrink-0.mr-2 > img").attr('src');
desc = $(d).find("div.text-truncate.text-muted > span.align-middle").text();
const Data = {
img: img,
name: name,
desc: desc,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
});
}
function pinterest(querry){
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function ssweb(url) {
return new Promise(async(resolve,reject) => {
await getBuffer(`http://fdz-app.herokuapp.com/api/ssweb/mobile/get_screenshot?url=${url}`).then(res => {
resolve(res)
})
.catch(reject)
})
}
module.exports.tiktok = tiktok
module.exports.tiktokmusic = tiktokmusic
module.exports.ghstalk = ghstalk
module.exports.telegra = telegra
module.exports.yta = yta
module.exports.ytv = ytv
module.exports.emoji = emoji
module.exports.mediafire = mediafire
module.exports.covid = covid
module.exports.tahta = tahta
module.exports.styleText = styleText
module.exports.asmaul = asmaul
module.exports.fb = fb
module.exports.igstalk = igstalk
module.exports.tebakgambar = tebakgambar
module.exports.playstore = playstore
module.exports.twitter = twitter
module.exports.kodepos = kodepos
module.exports.gempa = gempa
module.exports.servermc = servermc
module.exports.happymod = happymod
module.exports.kompasnews = kompasnews
module.exports.tribunnews = tribunnews
module.exports.jalantikus = jalantikus
module.exports.igtv = igtv
module.exports.igfoto = igfoto
module.exports.igvideo = igvideo
module.exports.hoax = hoax
module.exports.sfilesearch = sfilesearch
module.exports.mcpedl = mcpedl
module.exports.halal =halal
module.exports.wallpaper = wallpaper
module.exports.wallpapper =wallpapper
module.exports.apkmody = apkmody
module.exports.moddroid = moddroid
module.exports.pinterest = pinterest
module.exports.palingmurah = palingmurah
module.exports.ssweb = ssweb
================================================
FILE: lib/scrape2.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
const request = require("request")
const moment = require('moment-timezone')
function umma(url) {
return new Promise((resolve, reject) => {
axios.get(url)
.then((res) => {
let $ = cheerio.load(res.data)
let image = []
$('#article-content > div').find('img').each(function (a, b) {
image.push($(b).attr('src'))
})
let hasil = {
title: $('#wrap > div.content-container.font-6-16 > h1').text().trim(),
author: {
name: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.user-ame.font-6-16.fw').text().trim(),
profilePic: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.profile-photo > img.photo').attr('src')
},
caption: $('#article-content > div > p').text().trim(),
media: $('#article-content > div > iframe').attr('src') ? [$('#article-content > div > iframe').attr('src')] : image,
type: $('#article-content > div > iframe').attr('src') ? 'video' : 'image',
like: $('#wrap > div.bottom-btns > div > button:nth-child(1) > div.text.font-6-12').text(),
}
resolve(hasil)
})
})
}
function ringtone(title) {
return new Promise((resolve, reject) => {
axios.get('https://meloboom.com/en/search/'+title)
.then((get) => {
let $ = cheerio.load(get.data)
let hasil = []
$('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) {
hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') })
})
resolve(hasil)
})
})
}
const Gempa = () => new Promise((resolve, reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg').then((response) => {
const $ = cheerio.load(response.data)
const urlElems = $('table.table-hover.table-striped')
for (let i = 0; i < urlElems.length; i++) {
const urlSpan = $(urlElems[i]).find('tbody')[0]
if (urlSpan) {
const urlData = $(urlSpan).find('tr')[0]
var Kapan = $(urlData).find('td')[1]
var Letak = $(urlData).find('td')[2]
var Magnitudo = $(urlData).find('td')[3]
var Kedalaman = $(urlData).find('td')[4]
var Wilayah = $(urlData).find('td')[5]
var lintang = $(Letak).text().split(' ')[0]
var bujur = $(Letak).text().split(' ')[2]
var hasil = {
waktu: $(Kapan).text(),
lintang: lintang,
bujur: bujur,
magnitudo: $(Magnitudo).text(),
kedalaman: $(Kedalaman).text().replace(/\t/g, '').replace(/I/g, ''),
wilayah: $(Wilayah).text().replace(/\t/g, '').replace(/I/g, '').replace('-','').replace(/\r/g, '').split('\n')[0],
map: $('div.row > div > img').attr('src')
}
// We then print the text on to the console
resolve(hasil);
}
}
}).catch(err => reject(err))
})
const Cuaca = (kota) => {
return new Promise(async (resolve, reject) => {
await axios.get(`http://api.openweathermap.org/data/2.5/weather?q=${kota}&units=metric&appid=132d0c03530775bbbfa9b298392866df`)
.then(async ({
data
}) => {
if (data.cod == 404) {
resolve(data.message);
} else {
sunrise = await moment.tz(data.sys.sunrise * 1000, "Asia/Jakarta").format("DD, MM - yy : HH:mm") + " WIB";
sunset = await moment.tz(data.sys.sunset * 1000, "Asia/Jakarta").format("DD, MM - yy : HH:mm") + " WIB";
result = {
Name: data.name + ', ' + data.sys.country,
Longitude: data.coord.lon,
Latitude: data.coord.lat,
sunrise,
sunset,
Suhu: data.main.temp + " C",
Angin: data.wind.speed + " m/s",
Kelembaban: data.main.humidity + "%",
Cuaca: data.weather[0].main,
Keterangan: data.weather[0].description,
Udara: data.main.pressure + " HPa"
};
resolve(result);
}
}).catch(reject);
});
}
module.exports = { umma, ringtone, Gempa, Cuaca }
================================================
FILE: lib/scrape3.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const qs = require("qs")
function upload (media) {
return new Promise(async (resolve, reject) => {
try {
let { ext } = await fromBuffer(media)
console.log('Uploading image to server telegra.ph')
let form = new FormData()
form.append('file', media, 'tmp.' + ext)
await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
.then(res => res.json())
.then(res => {
if (res.error) return reject(res.error)
resolve('https://telegra.ph' + res[0].src)
})
.catch(err => reject(err))
} catch (e) {
return console.log(e)
}
})
}
function otakudesu(judul){
return new Promise(async(resolve, reject) => {
axios.get('https://otakudesu.moe/?s=' + judul + '&post_type=anime')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = {};
let limk = $('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href')
axios.get(limk).then(({ data }) => {
const $$ = cheerio.load(data)
result.message = 'By Hexagon'
result.img = $$('#venkonten > div.venser > div.fotoanime').find('img').attr('src')
$$('#venkonten > div.venser > div.fotoanime > div.infozin > div').each(function(a, b) {
result.judul = $$(b).find('p:nth-child(1)').text().replace('Judul: ','')
result.jepang = $$(b).find('p:nth-child(2)').text().replace('Japanese: ','')
result.rate = $$(b).find('p:nth-child(3)').text().replace('Skor: ','')
result.produser = $$(b).find('p:nth-child(4)').text().replace('Produser: ','')
result.tipe = $$(b).find('p:nth-child(5)').text().replace('Tipe: ','')
result.status = $$(b).find('p:nth-child(6)').text().replace('Status: ','')
result.episode = $$(b).find('p:nth-child(7)').text().replace('Total Episode: ','')
result.durasi = $$(b).find('p:nth-child(8)').text().replace('Durasi: ','')
result.rilis = $$(b).find('p:nth-child(9)').text().replace('Tanggal Rilis: ','')
result.studio = $$(b).find('p:nth-child(10)').text().replace('Studio: ','')
result.genre = $$(b).find('p:nth-child(11)').text().replace('Genre: ','')
result.desc = $$('#venkonten > div.venser > div.fotoanime > div.sinopc').text().replace('.','\n') + $$(b).find('div.sinopc > p:nth-child(2)').text()
result.batch = $$('#venkonten > div.venser > div:nth-child(10) > ul > li > span:nth-child(1) > a').attr('href')
})
const lim = $$('#venkonten > div.venser > div:nth-child(10) > ul > li > span:nth-child(1) > a').attr('href')
axios.get(lim).then(({ data }) => {
const $$$ = cheerio.load(data)
result.batchSD = $$$('#venkonten > div:nth-child(6) > ul > li:nth-child(1) > a:nth-child(3)').attr('href')
result.batchHD = $$$('#venkonten > div:nth-child(6) > ul > li:nth-child(3) > a:nth-child(3)').attr('href')
resolve(result)
})
})
})
.catch(reject)
})
}
function covid(){
return new Promise(async(resolve, reject) => {
axios.get('https://covid19.go.id/')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = [];
$('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) {
const pindo = $(b).find('div:nth-child(3) > strong').text()
const mindo = $(b).find('div:nth-child(5) > strong').text()
const sindo = $(b).find('div:nth-child(4) > strong').text()
const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim()
$('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) {
const neg = $(d).find('div:nth-child(3) > strong').text()
const pglo = $(d).find('div:nth-child(4) > strong').text()
const nglo = $(d).find('div:nth-child(5) > strong').text()
const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim()
const result = {
message: 'By Hexagon',
indo : {
positif_indo: pindo,
meninggal_indo: mindo,
sembuh_indo: sindo,
update_indo: upindo.split(':')[1]
},
global: {
negara: neg,
positif: pglo,
meninggal: nglo,
update: up.split(':')[1].split('\n')[0]
}
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function ongoing(){
return new Promise((reject,resolve) => {
axios.get('https://otakudesu.moe/ongoing-anime/').then(({ data}) => {
const $ = cheerio.load(data)
const result = [];
const img = [];
const epz = [];
const ne = [];
const th = [];
const ep = [];
const nm =[];
$('div.detpost').each(function(a,b) {
img.push($(b).find('img').attr('src'))
nm.push($(b).find('h2').text())
th.push($(b).find('a').attr('href'))
})
$('div.epztipe').each(function(d,c) {
epz.push($(c).text())
})
$('div.newnime').each(function(f,g) {
ne.push($(g).text())
})
$('div.epz').each(function(m,n){
ep.push($(n).text())
})
for( let i = 0; i < img.length; i++){
result.push({
nama: nm[i],
image: img[i],
episode: ep[i],
setiap: epz[i],
rilis: ne[i],
link: th[i]
})
}
resolve(result)
})
.catch(reject)
})
}
function komiku(judul) {
return new Promise(async(resolve,reject) => {
axios.get('https://data3.komiku.id/cari/?post_type=manga&s=' + encodeURIComponent(judul))
.then(({ data }) => {
const $ = cheerio.load(data)
const img = [];
const or = [];
const ind = [];
const up = [];
const des = [];
const li = [];
const ch = [];
const ch1 = [];
$('div.daftar').each(function (a,b) {
img.push($(b).find('img').attr('data-src'))
$('div.kan').each(function(c,d) {
or.push($(d).find('h3').text().trim())
ind.push($(d).find('span.judul2').text())
li.push('https://komiku.id' + $(d).find('a').attr('href'))
up.push($(d).find('p').text().trim().split('. ')[0])
des.push($(d).find('p').text().trim().split('. ')[1])
ch1.push($(d).find('div:nth-child(5) > a').attr('title'))
$('div.new1').each(function(e,f) {
ch.push($(f).find('a').attr('title'))
})
})
})
for (let i = 0 ; i < img.length; i++) {
resolve({
image: img[i],
title: or[i],
indo: ind[i],
update: up[i],
desc: des[i],
chapter_awal: ch[i],
chapter_akhir: ch1[i],
link: li[i]
})
}
})
.catch(reject)
})
}
function tebakgambar() {
return new Promise(async(resolve, reject) => {
axios.get('https://jawabantebakgambar.net/all-answers/')
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
let random = Math.floor(Math.random() * 2836) + 2;
let link2 = 'https://jawabantebakgambar.net'
$(`#images > li:nth-child(${random}) > a`).each(function(a, b) {
const img = link2 + $(b).find('img').attr('data-src')
const jwb = $(b).find('img').attr('alt')
result.push({
message: 'By Hexagon',
image: img,
jawaban: jwb
})
resolve(result)
})
})
.catch(reject)
})
}
function surah2(no){
return new Promise(async(resolve, reject) => {
axios.get('https://kalam.sindonews.com/surah/' + no)
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const ar = [];
const id = [];
const lt = [];
const au = [];
$('div.breadcrumb-new > ul > li:nth-child(5)').each(function(c,d) {
result.audio = $(d).find('a').attr('href').replace('surah','audioframe')
})
$('div.ayat-arab').each(function(a, b) {
ar.push($(b).text())
})
$('li > div.ayat-text').each(function(e, f) {
id.push($(f).text().replace(',','').trim()) })
$('div.ayat-latin').each(function(g, h) {
lt.push($(h).text().trim()) })
for(let i = 0; i < ar.length ; i++){
result.push({
arab: ar[i],
indo: id[i],
latin: lt[i],
})
}
resolve(result)
})
.catch(reject)
})
}
function sholat(NOMOR) {
return new Promise(async(resolve, reject) =>{
axios.get('https://kalam.sindonews.com/jadwalsholat/' + NOMOR).then(({ data }) => {
const $ = cheerio.load(data)
const result = {};
$('div.imsakiyah-content').each(function(a, b) {
result.Tanggal = $(b).find('tr:nth-child(1) > td:nth-child(1)').text()
result.imsak = $(b).find('tr:nth-child(1) > td:nth-child(2)').text()
result.subuh = $(b).find('tr:nth-child(1) > td:nth-child(3)').text()
result.zuhur = $(b).find('tr:nth-child(1) > td:nth-child(4)').text()
result.ashar = $(b).find('tr:nth-child(1) > td:nth-child(5)').text()
result.maghrib = $(b).find('tr:nth-child(1) > td:nth-child(6)').text()
result.isya = $(b).find('tr:nth-child(1) > td:nth-child(7)').text()
})
resolve(result)
})
.catch(reject)
})
}
function lirik(judul){
return new Promise(async(resolve, reject) => {
axios.get('https://www.musixmatch.com/search/' + judul)
.then(async({ data }) => {
const $ = cheerio.load(data)
const hasil = {};
let limk = 'https://www.musixmatch.com'
const link = limk + $('div.media-card-body > div > h2').find('a').attr('href')
await axios.get(link)
.then(({ data }) => {
const $$ = cheerio.load(data)
hasil.thumb = 'https:' + $$('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div').find('img').attr('src')
$$('div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function(a,b) {
hasil.lirik = $$(b).find('span > p > span').text() +'\n' + $$(b).find('span > div > p > span').text()
})
})
resolve(hasil)
})
.catch(reject)
})
}
function chara(query) {
return new Promise((resolve, reject) => {
axios.get('https://www.wallpaperflare.com/search?wallpaper='+ query,{
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.863074474.1624987429; _gid=GA1.2.857771494.1624987429; __gads=ID=84d12a6ae82d0a63-2242b0820eca0058:T=1624987427:RT=1624987427:S=ALNI_MaJYaH0-_xRbokdDkQ0B49vSYgYcQ"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
$('#gallery > li > figure > a').each(function(a, b) {
result.push($(b).find('img').attr('data-src'))
})
resolve(result)
})
.catch({status: 'err'})
})
}
function wattpad(judul){
return new Promise((resolve, reject) => {
axios.get('https://www.wattpad.com/search/' + judul)
.then(({data}) => {
const $ = cheerio.load(data)
const result = [];
const jdl = [];
const img = [];
const des = [];
const lnk = [];
const red = [];
const vt = [];
const limk = 'https://www.wattpad.com/'
$('div.cover.cover-xs.pull-left').each(function(a,b){
img.push($(b).find('img').attr('src'))
})
$('div.content > h5').each(function(a,b) {
jdl.push($(b).text().trim())
})
$('div.content > p').each(function(a,b){
des.push($(b).text().trim())
})
$('#results-stories > div > ul > li').each(function(a,b){
lnk.push(limk + $(b).find('a.on-result').attr('data-id'))
})
$('div.content > div > small.reads').each(function(a,b){
red.push($(b).text())
})
$('div.content > div > small.votes').each(function(a, b) {
vt.push($(b).text())
})
for (let i = 0; i < lnk.length; i++){
result.push({
judul: jdl[i],
desc: des[i],
vote: vt[i],
reads: red[i],
image: img[i],
link: lnk[i]
})
resolve(result)
}
})
.catch({message: 'err'})
})
}
const telesticker = async (url) => {
return new Promise(async (resolve, reject) => {
packName = url.replace("https://t.me/addstickers/", "")
data = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getStickerSet?name=${encodeURIComponent(packName)}`, {method: "GET",headers: {"User-Agent": "GoogleBot"}})
const hasil = []
for (let i = 0; i < data.data.result.stickers.length; i++) {
fileId = data.data.result.stickers[i].thumb.file_id
data2 = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getFile?file_id=${fileId}`)
result = {
status: 200,
author: author,
url: "https://api.telegram.org/file/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/" + data2.data.result.file_path
}
hasil.push(result)
}
resolve(hasil)
})
}
const stickersearch = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://getstickerpack.com/stickers?query=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const source = [];
const link = [];
$('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) {
source.push($(b).attr('href'))
})
axios.get(source[Math.floor(Math.random() * source.length)])
.then(({
data
}) => {
const $$ = cheerio.load(data)
$$('#stickerPack > div > div.row > div > img').each(function(c, d) {
link.push($$(d).attr('src').replace(/&d=200x200/g,''))
})
result = {
status: 200,
author: author,
title: $$('#intro > div > div > h1').text(),
sticker_url: link
}
resolve(result)
})
}).catch(reject)
})
}
function playstore(name){
return new Promise((resolve, reject) => {
axios.get('https://play.google.com/store/search?q='+ name +'&c=apps')
.then(({ data }) => {
const $ = cheerio.load(data)
let ln = [];
let nm = [];
let dv = [];
let lm = [];
const result = [];
$('div.wXUyZd > a').each(function(a,b){
const link = 'https://play.google.com' + $(b).attr('href')
ln.push(link);
})
$('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){
const name = $(e).text().trim()
nm.push(name);
})
$('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){
const dev = $(g).text().trim();
dv.push(dev)
})
$('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){
const limk = 'https://play.google.com' + $(i).attr('href');
lm.push(limk);
})
for (let i = 0; i < ln.length; i++){
result.push({
name: nm[i],
link: ln[i],
developer: dv[i],
link_dev: lm[i]
})
}
resolve(result)
})
.catch(reject)
})
}
function linkwa(nama){
return new Promise((resolve,reject) => {
axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search='+ nama +'&searchby=name')
.then(({ data }) => {
const $ = cheerio.load(data);
const result = [];
const lnk = [];
const nm = [];
$('div.wa-chat-title-container').each(function(a,b){
const limk = $(b).find('a').attr('href');
lnk.push(limk)
})
$('div.wa-chat-title-text').each(function(c,d) {
const name = $(d).text();
nm.push(name)
})
for( let i = 0; i < lnk.length; i++){
result.push({
nama: nm[i].split('. ')[1],
link: lnk[i].split('?')[0]
})
}
resolve(result)
})
.catch(reject)
})
}
const film = (query) => {
return new Promise((resolve, reject) => {
axios.get(`http://167.99.31.48/?s=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div > div.los').each(function (a, b) {
$(b).find('article').each(function (c, d) {
const judul = $(d).find('div > a > div.addinfox > header > h2').text()
const quality = $(d).find('div > a > div > div > span').text()
const type = $(d).find('div > a > div.addinfox > div > i.type').text()
const upload = $(d).find('div > a > div.addinfox > div > span').text()
const link = $(d).find('div > a').attr('href');
const thumb = $(d).find('div > a > div > img').attr('src');
const result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
judul: judul,
quality: quality,
type: type,
upload: upload,
link: link,
thumb: thumb,
};
hasil.push(result);
});
});
resolve(hasil)
})
.catch(reject)
})
}
const anime = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
const manga = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
const webtoon = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div.card_wrap.search._searchResult > ul > li ').each(function(a, b) {
result = {
status: 200,
author: author,
judul: $(b).find('> a > div > p.subj').text(),
like: $(b).find('> a > div > p.grade_area > em').text(),
creator: $(b).find('> a > div > p.author').text(),
genre: $(b).find('> a > span').text(),
thumbnail: $(b).find('> a > img').attr('src'),
url: 'https://www.webtoons.com' + $(b).find('> a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const character = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/characters/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > table > tbody > tr').each(function (a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
character: $(b).find('> td.tableCharInfo > a').text(),
link: 'https://www.anime-planet.com' + $(b).find('> td.tableCharInfo > a').attr('href'),
thumbnail: $(b).find('> td.tableAvatar > a > img').attr('src').startsWith('https://') ? $(b).find('> td.tableAvatar > a > img').attr('src') : 'https://www.anime.planet.com' + $(b).find('> td.tableAvatar > a > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
const jadwalbola = () => {
return new Promise((resolve, reject) => {
axios.get('https://m.bola.net/jadwal_televisi/')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#main_mid_headline_sub_topic').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
jadwal: $(b).find(' > div.main_mid_headline_topic > div > a').text(),
tanggal: $(b).find(' > div.main_mid_headline_topic_grouped_time_list').text().split('\n')[1].split(' ')[1],
jam: $(b).find(' > div.main_mid_headline_topic > span').text(),
url: $(b).find(' > div.main_mid_headline_topic > div > a').attr('href'),
thumb: $(b).find(' > div.main_mid_headline_topic > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const jadwaltv = () => {
return new Promise((resolve, reject) => {
axios.get('http://www.dokitv.com/jadwal-acara-tv')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#tabeljadwaltv > tbody > tr ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
acara: $(b).find('> td:nth-child(2)').text(),
channel: $(b).find('> td > a').text(),
jam: $(b).find('> td.jfx').text(),
source: $(b).find('> td > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const jadwalsholat = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://umrotix.com/jadwal-sholat/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('body > div > div.main-wrapper.scrollspy-action > div:nth-child(3) ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
tanggal: $(b).find('> div:nth-child(2)').text(),
imsyak: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(1) > p:nth-child(2)').text(),
subuh: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(2) > p:nth-child(2)').text(),
dzuhur: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(3) > p:nth-child(2)').text(),
ashar: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(4) > p:nth-child(2)').text(),
maghrib: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(5) > p:nth-child(2)').text(),
isya: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(6) > p:nth-child(2)').text()
}
resolve(result)
})
})
.catch(reject)
})
}
const drakor = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://drakorasia.blog//?s=${query}&post_type=post`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#post > div ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
judul: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').text().trim(),
years: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.category.text-gray.font-normal.text-white.text-xs.truncate > a').text(),
genre: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.genrenya.text-center.text-white.text-opacity-75.text-xs.mt-1').text().trim(),
thumbnail: $(b).find('> div.thumbnail > a > img').attr('src'),
url: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const listsurah = () => {
return new Promise((resolve, reject) => {
axios.get('https://litequran.net/')
.then(({ data }) => {
const $ = cheerio.load(data)
let listsurah = []
$('body > main > section > ol > li > a').each(function(a, b) {
listsurah.push($(b).text())
})
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
listsurah: listsurah
}
resolve(result)
}).catch(reject)
})
}
const surah = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://litequran.net/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > main > article > ol > li').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
arab: $(b).find('> span.ayat').text(),
latin: $(b).find('> span.bacaan').text(),
translate: $(b).find('> span.arti').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const tafsirsurah = (query) => {
return new Promise((resolve, reject) => {
axios.get(`https://tafsirq.com/topik/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > div:nth-child(4) > div > div.col-md-6 > div ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
surah: $(b).find('> div.panel-heading.panel-choco > div > div > a').text(),
tafsir: $(b).find('> div.panel-body.excerpt').text().trim(),
type: $(b).find('> div.panel-heading.panel-choco > div > div > span').text(),
source: $(b).find('> div.panel-heading.panel-choco > div > div > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const kompas = () => {
return new Promise((resolve, reject) => {
axios.get(`https://news.kompas.com/`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('body > div > div.container.clearfix > div:nth-child(3) > div.col-bs10-7 > div:nth-child(3) > div.latest.ga--latest.mt2.clearfix > div > div ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
berita: $(b).find('> div > div.article__box > h3').text(),
upload_time: $(b).find('> div > div.article__box > div.article__date').text(),
type_berita: $(b).find('> div > div.article__boxsubtitle > h2').text(),
link: $(b).find('> div > div.article__box > h3 > a').attr('href'),
thumbnail: $(b).find('> div > div.article__asset > a > img').attr('data-src'),
info_berita: $(b).find('> div > div.article__box > div.article__lead').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
const inews = () => {
return new Promise((resolve, reject) => {
axios.get(`https://www.inews.id/news`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#news-list > li ').each(function(a, b) {
result = {
status: 200,
author: "#𝑿𝑭𝒂𝒓",
berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > h3').text().trim(),
upload_time: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > div.date.margin-10px-left').text().trim().split('|')[0],
link: $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > div > div.float-left.width-130px.position-absolute > img').attr('data-original'),
info_berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > p').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function youtube(link){
return new Promise((resolve, reject) => {
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
if (ytIdRegex.test(link)) {
let url = ytIdRegex.exec(link)
let config = {
'url': 'https://www.youtube.be/' + url,
'q_auto': 0,
'ajax': 1
}
let headerss = {
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"Cookie": 'PHPSESSID=6jo2ggb63g5mjvgj45f612ogt7; _ga=GA1.2.405896420.1625200423; _gid=GA1.2.2135261581.1625200423; _PN_SBSCRBR_FALLBACK_DENIED=1625200785624; MarketGidStorage={"0":{},"C702514":{"page":5,"time":1625200846733}}'
}
axios('https://www.y2mate.com/mates/en68/analyze/ajax',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: headerss
})
.then(({ data }) => {
const $ = cheerio.load(data.result)
let img = $('div.thumbnail.cover > a > img').attr('src');
let title = $('div.thumbnail.cover > div > b').text();
let size = $('#mp4 > table > tbody > tr:nth-child(3) > td:nth-child(2)').text()
let sizeN = size.replace(" MB", '')
let size_mp3 = $('#audio > table > tbody > tr:nth-child(1) > td:nth-child(2)').text()
let sizeNMp3 = size_mp3.replace(" MB", '')
let id = /var k__id = "(.*?)"/.exec(data.result)[1]
let configs = {
type: 'youtube',
_id: id,
v_id: url[1],
ajax: '1',
token: '',
ftype: 'mp4',
fquality: 480
}
axios('https://www.y2mate.com/mates/en68/convert',{
method: 'POST',
data: new URLSearchParams(Object.entries(configs)),
headers: headerss
})
.then(({data}) => {
const $ = cheerio.load(data.result)
let link = $('div > a').attr('href')
let configss = {
type: 'youtube',
_id: id,
v_id: url[1],
ajax: '1',
token: '',
ftype: 'mp3',
fquality: 128
}
axios('https://www.y2mate.com/mates/en68/convert',{
method: 'POST',
data: new URLSearchParams(Object.entries(configss)),
headers: headerss
})
.then(({ data }) => {
const $ = cheerio.load(data.result)
let audio = $('div > a').attr('href')
resolve({
id: url[1],
title: title,
size: size,
sizeN: sizeN,
quality: '480p',
thumb: img,
link: link,
size_mp3: size_mp3,
sizeNMp3: sizeNMp3,
mp3: audio
})
})
})
})
.catch(reject)
}else reject('link invalid')
})
}
function quotes(input) {
return new Promise((resolve, reject) => {
fetch('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1')
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
data = []
$('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) {
x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim()
y = $(this).find('span[class="auteur-beschrijving"]').text().trim()
z = $(element).find('q[class="fbquote"]').text().trim()
data.push({ author: x, bio: y, quote: z })
})
data.splice(2, 1)
if (data.length == 0) return resolve({ creator: 'stikerin', status: false })
resolve({ creator: 'stikerin', status: true, data })
}).catch(reject)
})
}
function joox(query) {
return new Promise((resolve, reject) => {
const time = Math.floor(new Date() / 1000)
axios.get('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=' + query + '&pn=1&sin=0&ein=29&_=' + time)
.then(({ data }) => {
let result = []
let hasil = []
let promoses = []
let ids = []
data.itemlist.forEach(result => {
ids.push(result.songid)
});
for (let i = 0; i < data.itemlist.length; i++) {
const get = 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=' + ids[i]
promoses.push(
axios.get(get, {
headers: {
Cookie: 'wmid=142420656; user_type=1; country=id; session_key=2a5d97d05dc8fe238150184eaf3519ad;'
}
})
.then(({ data }) => {
const res = JSON.parse(data.replace('MusicInfoCallback(', '').replace('\n)', ''))
hasil.push({
lagu: res.msong,
album: res.malbum,
penyanyi: res.msinger,
publish: res.public_time,
img: res.imgSrc,
mp3: res.mp3Url
})
Promise.all(promoses).then(() => resolve({
creator: "ariffb",
status: true,
data: hasil,
}))
}).catch(reject)
)
}
}).catch(reject)
})
}
function tiktok(url) {
return new Promise(async (resolve, reject) => {
axios.get('https://ttdownloader.com/', {
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
let token = $('#token').attr('value')
let config = {
'url': url,
'format': '',
'token': token
}
axios('https://ttdownloader.com/req/', {
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
nowm: $('div:nth-child(2) > div.download > a').attr('href'),
wm: $('div:nth-child(3) > div.download > a').attr('href'),
audio: $('div:nth-child(4) > div.download > a').attr('href')
})
})
})
.catch(reject)
})
}
function twitter(url) {
return new Promise((resolve, reject) => {
let params = new URLSearchParams()
params.append('URL', url)
fetch('https://twdown.net/download.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res);
data = []
$('div.container').find('tbody > tr > td').each(function (index, element) {
x = $(this).find('a').attr('href')
if (x !== '#') {
if (typeof x !== 'undefined') {
data.push({ url: x })
}
}
})
if (data.length == 0) return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
function twitter2(link){
return new Promise((resolve, reject) => {
let config = {
'URL': link
}
axios.post('https://twdown.net/download.php',qs.stringify(config),{
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1388798541.1625064838; _gid=GA1.2.1351476739.1625064838; __gads=ID=7a60905ab10b2596-229566750eca0064:T=1625064837:RT=1625064837:S=ALNI_Mbg3GGC2b3oBVCUJt9UImup-j20Iw; _gat=1"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
desc: $('div:nth-child(1) > div:nth-child(2) > p').text().trim(),
thumb: $('div:nth-child(1) > img').attr('src'),
HD: $('tbody > tr:nth-child(1) > td:nth-child(4) > a').attr('href'),
SD: $('tr:nth-child(2) > td:nth-child(4) > a').attr('href'),
audio: 'https://twdown.net/' + $('tr:nth-child(4) > td:nth-child(4) > a').attr('href')
})
})
.catch(reject)
})
}
function igdl2(url) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/download-instagram-videos.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': url,
'action': 'post',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
function igdl(url_media) {
return new Promise((resolve,reject)=>{
url_media = url_media.replace("reel", "p")
var url = "https://igram.io/i/"
const requestBody = {
url: url_media.replace("reel", "p"),
lang_code: "en"
}
const config = {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.75',
'x-requested-with': ' XMLHttpRequest',
'origin': ' https://igram.io',
'referer': ' https://igram.io/en/dl/',
'sec-fetch-dest': ' empty',
'sec-fetch-mode': ' cors',
'sec-fetch-site': ' same-origin',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '__cfduid=d4c2ddc2229a4d74c28b6ba25cdcd2a181618175605'
},
}
axios.post(url, qs.stringify(requestBody), config).then(result => {
let $ = cheerio.load(result.data), ig = []
//Obter todos os links de videos da pagina carregada
$('[data-mediatype=Video]').each((i, element) => {
let cheerioElement = $(element)
ig.push(cheerioElement.attr("href"))
})
//Obter todos os links de imagem da pagina carregada
$('div > div.bg-white.border.rounded-sm.max-w-md > img').each((i, element) => {
let cheerioElement = $(element)
ig.push(cheerioElement.attr("src"))
})
resolve({
results_number : ig.length,
url_list: ig
})
}).catch(err=>{
console.log(err.response)
reject(err)
})
})
}
function igstalk(username){
return new Promise((resolve,reject) => {
axios.get('https://www.instagram.com/'+ username +'/?__a=1',{
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
"cookie": "mid=XBXl1AALAAEbFoAEfNjZlMMG9dwX; ig_did=91E66A48-5AA2-445D-BFE6-84DC4456DE8F; fbm_124024574287414=base_domain=.instagram.com; ig_nrcb=1; shbid=\"12737\0544008624962\0541656157971:01f72a5102dc07af6845adf923ca70eb86e81ab95fa9dbfdaf157c9eef0e82fd1f10fe23\"; shbts=\"1624621971\0544008624962\0541656157971:01f74841fba8e77a0066b47ea891dec8fba6fdf9216c0816f9fb3532292f769828800ae2\"; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; csrftoken=PpiPMEl0R2pAwThsw4NXynO6cVIXHZDo; ds_user_id=38316792800; sessionid=38316792800:rQj5Tr3g5zkg7b:4; rur=\"RVA\05438316792800\0541656158332:01f759cf624bef147397144805bb4c26f6c8b36a232e0f5738c570ee492f6b629f84f6e5\""
}
})
.then(({ data }) => {
const user = data.graphql.user
let result = {
message: 'By Hexagon',
id: user.id,
biography: user.biography,
followers: user.edge_followed_by.count,
following: user.edge_follow.count,
fullName: user.full_name,
highlightCount: user.highlight_reel_count,
isBusinessAccount: user.is_business_account,
isRecentUser: user.is_joined_recently,
accountCategory: user.business_category_name,
linkedFacebookPage: user.connected_fb_page,
isPrivate: user.is_private,
isVerified: user.is_verified,
profilePicHD: user.profile_pic_url_hd,
username: user.username,
postsCount: user.edge_owner_to_timeline_media.count
}
resolve(result)
})
.catch(reject)
})
}
function igstory(username) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/instagram-story-downloader.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': 'https://www.instagram.com/' + username,
'action': 'story',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
function covid(){
return new Promise(async(resolve, reject) => {
axios.get('https://covid19.go.id/')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = [];
$('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) {
const pindo = $(b).find('div:nth-child(3) > strong').text()
const mindo = $(b).find('div:nth-child(5) > strong').text()
const sindo = $(b).find('div:nth-child(4) > strong').text()
const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim()
$('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) {
const neg = $(d).find('div:nth-child(3) > strong').text()
const pglo = $(d).find('div:nth-child(4) > strong').text()
const nglo = $(d).find('div:nth-child(5) > strong').text()
const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim()
const result = {
message: 'By Hexagon',
indo : {
positif_indo: pindo,
meninggal_indo: mindo,
sembuh_indo: sindo,
update_indo: upindo.split(':')[1]
},
global: {
negara: neg,
positif: pglo,
meninggal: nglo,
update: up.split(':')[1].split('\n')[0]
}
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function pin(url) {
return new Promise((resolve, reject) => {
function rand() {
return `${Math.floor(Math.random() * 1000000)}`
}
let params = new URLSearchParams()
params.append('url', url)
fetch('https://www.expertsphp.com/facebook-video-downloader.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
y = 'pinterest_' + rand() + '.mp4'
x = $('video').find('source').attr('src')
data = { file: y, url: x }
if (typeof x == 'undefined') return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
let is = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
}
}
function _token(host) {
return new Promise(async (resolve, reject) => {
axios.request({
url: host, method: 'GET', headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
}).then(({ data }) => {
let $ = cheerio.load(data)
let token = $('#token').attr('value')
resolve(token)
})
})
}
function facebook(url) {
return new Promise(async (resolve, reject) => {
let host = 'https://aiovideodl.ml/'
let form = { data: { 'url': url, 'token': (await _token(host)) } }
axios.post(host + '/system/action.php', qs.stringify(form.data), { headers: is.headers })
.then(({ data }) => {
if (data.links.lenght == 0) return resolve({ creator: '@neoxrs – Wildan Izzudin', status: false })
resolve({ creator: '@neoxrs – Wildan Izzudin', status: true, data: data.links })
})
})
}
function fbdown(link){
return new Promise((resolve,reject) => {
let config = {
'url': link
}
axios('https://www.getfvid.com/downloader',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"content-type": "application/x-www-form-urlencoded",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss"
}
})
.then(async({ data }) => {
const $ = cheerio.load(data);
resolve({
Normal_video: $('div.col-md-4.btns-download > p:nth-child(2) > a').attr('href'),
HD: $('div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'),
audio: $('div.col-md-4.btns-download > p:nth-child(3) > a').attr('href')
})
})
.catch(reject)
})
}
function pinterest(querry) {
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
image: $(b).find('img').attr('data-src')
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function porno() {
return new Promise((resolve, reject) => {
axios.get('https://tikporntok.com/?random=1')
.then((res) => {
const $ = cheerio.load(res.data)
const hasil = {}
hasil.title = $('article > h1').text()
hasil.source = $('article > div.video-wrapper.vxplayer').attr('data-post') || 'Web Not Response'
hasil.thumb = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-poster') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
hasil.desc = $('article > div.intro').text()
hasil.upload = $('article > div.single-pre-meta.ws.clearfix > time').text()
hasil.like = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(1) > span').text()
hasil.dislike = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(2) > span').text()
hasil.favorite = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(3) > span').text()
hasil.views = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(4) > span').text()
hasil.tags = $('article > div.post-tags').text()
hasil.video = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('src') || $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-src') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
resolve(hasil)
})
})
}
function hentai() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 1153)
axios.get('https://sfmcompile.club/page/'+page)
.then((data) => {
const $ = cheerio.load(data.data)
const hasil = []
$('#primary > div > div > ul > li > article').each(function (a, b) {
hasil.push({
title: $(b).find('header > h2').text(),
link: $(b).find('header > h2 > a').attr('href'),
category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''),
share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(),
views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(),
type: $(b).find('source').attr('type') || 'image/jpeg',
video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'),
video_2: $(b).find('video > a').attr('href') || ''
})
})
resolve(hasil)
})
})
}
function quotesAnime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
module.exports = {
kompas,
inews,
youtube,
facebook,
fbdown,
quotes,
igdl,
igdl2,
igstalk,
igstory,
tiktok,
twitter,
twitter2,
joox,
covid,
pin,
pinterest,
wallpaper,
wikimedia,
porno,
hentai,
quotesAnime,
listsurah,
surah,
surah2,
tafsirsurah,
film,
manga,
anime,
character,
jadwalbola,
jadwaltv,
jadwalsholat,
drakor,
otakudesu,
ongoing,
komiku,
tebakgambar,
sholat,
lirik,
chara,
wattpad,
playstore,
linkwa,
telesticker,
stickersearch,
webtoon,
upload
}
================================================
FILE: lib/scrapedl.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const { JSDOM } = require('jsdom')
const FormData = require('form-data')
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require('axios')
const qs = require('qs')
module.exports = {
aiovideodl,
filmapik,
ssweb,
hoax,
sfilesearch,
happymod,
servermc,
gempa,
mediafire,
telegraph,
ghstalk,
komiku,
lirik,
covid,
otaku,
shoppe,
inews,
jalantikus,
kompasnews,
tribunnews,
tafsirsurah,
surah,
listsurah,
stickersearch,
drakor,
mangatoons,
webtoons,
wattpaduser,
wattpad,
film,
pinterest,
jadwalsholat,
jadwaltv,
jadwalbola,
character,
manga,
anime,
soundcloud,
xnxxsearch,
xnxxdl,
herodetails,
herolist,
playstore,
tiktokporn,
hentai,
quotesanime,
wallpaper,
wikimedia,
facebook,
facebook2,
_token,
quotes,
igdl,
igstory,
igstory2,
snaptik,
tiktok,
twitter,
joox,
pin
}
function quotes(input) {
return new Promise((resolve, reject) => {
fetch('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1')
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
data = []
$('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) {
x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim()
y = $(this).find('span[class="auteur-beschrijving"]').text().trim()
z = $(element).find('q[class="fbquote"]').text().trim()
data.push({ author: x, bio: y, quote: z })
})
data.splice(2, 1)
if (data.length == 0) return resolve({ creator: '@rasel.ganz', status: false })
resolve({ creator: '@rasel.ganz', status: true, data })
}).catch(reject)
})
}
function joox(query) {
return new Promise((resolve, reject) => {
const time = Math.floor(new Date() / 1000)
axios.get('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=' + query + '&pn=1&sin=0&ein=29&_=' + time)
.then(({ data }) => {
let result = []
let hasil = []
let promoses = []
let ids = []
data.itemlist.forEach(result => {
ids.push(result.songid)
});
for (let i = 0; i < data.itemlist.length; i++) {
const get = 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=' + ids[i]
promoses.push(
axios.get(get, {
headers: {
Cookie: 'wmid=142420656; user_type=1; country=id; session_key=2a5d97d05dc8fe238150184eaf3519ad;'
}
})
.then(({ data }) => {
const res = JSON.parse(data.replace('MusicInfoCallback(', '').replace('\n)', ''))
hasil.push({
lagu: res.msong,
album: res.malbum,
penyanyi: res.msinger,
publish: res.public_time,
img: res.imgSrc,
mp3: res.mp3Url
})
Promise.all(promoses).then(() => resolve({
creator: "@rasel.ganz",
status: true,
data: hasil,
}))
}).catch(reject)
)
}
}).catch(reject)
})
}
function tiktok(url) {
return new Promise(async (resolve, reject) => {
axios.get('https://ttdownloader.com/', {
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
let token = $('#token').attr('value')
let config = {
'url': url,
'format': '',
'token': token
}
axios('https://ttdownloader.com/req/', {
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
resolve({
nowm: $('div:nth-child(2) > div.download > a').attr('href'),
wm: $('div:nth-child(3) > div.download > a').attr('href'),
audio: $('div:nth-child(4) > div.download > a').attr('href')
})
})
})
.catch(reject)
})
}
async function snaptik(url) {
try {
let results = {}
if (/v[tm]\.tiktok\.com/g.test(url)) {
let res = await axios.get(url)
url = res.request.res.responseUrl
}
let key = await axios.get(`https://api.snaptik.site/video-key?video_url=${url}`)
key = JSON.parse(JSON.stringify(key.data, null, 2))
if (key.status !== 'success') throw key
let data = await axios.get(`https://api.snaptik.site/video-details-by-key?key=${key.data.key}`)
data = JSON.parse(JSON.stringify(data.data, null, 2))
if (data.status !== 'success') throw data
results = {
author: { ...data.data.author },
description: data.data.description,
video: {
with_watermark: `https://api.snaptik.site/download?key=${data.data.video.with_watermark}&type=video`,
no_watermark: `https://api.snaptik.site/download?key=${data.data.video.no_watermark}&type=video`,
no_watermark_raw: data.data.video.no_watermark_raw
},
music: `https://api.snaptik.site/download?key=${data.data.music}&type=music`
}
return results
} catch (e) {
throw `Maaf url tidak valid atau video private`
}
}
function twitter(url) {
return new Promise((resolve, reject) => {
let params = new URLSearchParams()
params.append('URL', url)
fetch('https://twdown.net/download.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res);
data = []
$('div.container').find('tbody > tr > td').each(function (index, element) {
x = $(this).find('a').attr('href')
if (x !== '#') {
if (typeof x !== 'undefined') {
data.push({ url: x })
}
}
})
if (data.length == 0) return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
function igdl(url) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/download-instagram-videos.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': url,
'action': 'post',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
function igstory(username) {
return new Promise(async (resolve, reject) => {
axios.request({
url: 'https://www.instagramsave.com/instagram-story-downloader.php',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
})
.then(({ data }) => {
const $ = cheerio.load(data)
const token = $('#token').attr('value')
let config = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
data: {
'url': 'https://www.instagram.com/' + username,
'action': 'story',
'token': token
}
}
axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers })
.then(({ data }) => {
resolve(data.medias)
})
})
.catch(reject)
})
}
async function igstory2(username) {
let { data } = await axios.get(`https://www.instadownloader.org/data.php?username=${username}&t=${new Date * 1}`)
const $ = cheerio.load(data)
let results = []
$('body > center').each(function (i, el) {
results.push({
url: $(el).find('a.download-btn').attr('href'),
type: $(el).find('video').html() ? 'video' : 'image'
})
})
return results
}
function pin(url) {
return new Promise((resolve, reject) => {
function rand() {
return `${Math.floor(Math.random() * 1000000)}`
}
let params = new URLSearchParams()
params.append('url', url)
fetch('https://www.expertsphp.com/facebook-video-downloader.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
y = 'pinterest_' + rand() + '.mp4'
x = $('video').find('source').attr('src')
data = { file: y, url: x }
if (typeof x == 'undefined') return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
let is = {
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
}
}
function _token(host) {
return new Promise(async (resolve, reject) => {
axios.request({
url: host, method: 'GET', headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
}
}).then(({ data }) => {
let $ = cheerio.load(data)
let token = $('#token').attr('value')
resolve(token)
})
})
}
function facebook(url){
return new Promise((resolve,reject) => {
let config = {
'url': url
}
axios('https://www.getfvid.com/downloader',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"content-type": "application/x-www-form-urlencoded",
"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "_ga=GA1.2.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss"
}
})
.then(async({ data }) => {
const $ = cheerio.load(data);
resolve({
video: $('div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'),
audio: $('div.col-md-4.btns-download > p:nth-child(3) > a').attr('href')
})
})
.catch(reject)
})
}
function facebook2(urls) {
return new Promise(async (resolve, reject) => {
const data = await axios({
url: 'https://downvideo.net/',
method: 'GET',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
}
})
const $ = cheerio.load(data.data)
const token = $('#token').attr('value')
const getPost = await axios({
url: 'https://downvideo.net/download.php',
method: 'POST',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
"cookie": '_gid=GA1.2.1321544464.1633811193; _ga=GA1.2.1392580783.1633811193; __gads=ID=c73de99d7fa5c467-226981f63ecc00f1:T=1633811193:RT=1633811193:S=ALNI_MaC9fW2mqfT2hm7zODcNNffab1XLg'
},
data: new URLSearchParams(Object.entries({ 'URL': urls, 'token': token }))
})
const c = cheerio.load(getPost.data)
const hasil = {
author: c('div.row').find('div.col-md-12:nth-child(1)').text(),
title: c('div.row').find('div.col-md-12:nth-child(3) > p').text(),
thumb: c('div.row').find('div.col-md-12:nth-child(2) > img').attr('src'),
link_high: c('div.row').find('div.col-md-3 > a').eq(0).attr('href') || c('div.row').find('#sd > a').attr('href') || '',
link_normal: c('div.row').find('div.col-md-3 > a').eq(1).attr('href') || ''
}
resolve({ status: getPost.status, creator: '@rasel.ganz', hasil: hasil })
})
}
function wallpaper(title, page) {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
image: $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function tiktokporn() {
return new Promise((resolve, reject) => {
axios.get('https://tikporntok.com/?random=1')
.then((res) => {
const $ = cheerio.load(res.data)
const hasil = {}
hasil.title = $('article > h1').text()
hasil.source = $('article > div.video-wrapper.vxplayer').attr('data-post') || 'Web Not Response'
hasil.thumb = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-poster') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
hasil.desc = $('article > div.intro').text()
hasil.upload = $('article > div.single-pre-meta.ws.clearfix > time').text()
hasil.like = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(1) > span').text()
hasil.dislike = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(2) > span').text()
hasil.favorite = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(3) > span').text()
hasil.views = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(4) > span').text()
hasil.tags = $('article > div.post-tags').text()
hasil.video = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('src') || $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-src') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
resolve(hasil)
})
})
}
function hentai() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 1153)
axios.get('https://sfmcompile.club/page/'+page)
.then((data) => {
const $ = cheerio.load(data.data)
const hasil = []
$('#primary > div > div > ul > li > article').each(function (a, b) {
hasil.push({
title: $(b).find('header > h2').text(),
link: $(b).find('header > h2 > a').attr('href'),
category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''),
share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(),
views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(),
type: $(b).find('source').attr('type') || 'image/jpeg',
video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'),
video_2: $(b).find('video > a').attr('href') || ''
})
})
resolve(hasil)
})
})
}
function quotesanime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
function playstore(name) {
return new Promise((resolve, reject) => {
axios.get('https://play.google.com/store/search?q='+ name +'&c=apps')
.then(({ data }) => {
const $ = cheerio.load(data)
let ln = [];
let nm = [];
let dv = [];
let lm = [];
const result = [];
$('div.wXUyZd > a').each(function(a,b){
const link = 'https://play.google.com' + $(b).attr('href')
ln.push(link);
})
$('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){
const name = $(e).text().trim()
nm.push(name);
})
$('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){
const dev = $(g).text().trim();
dv.push(dev)
})
$('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){
const limk = 'https://play.google.com' + $(i).attr('href');
lm.push(limk);
})
for (let i = 0; i < ln.length; i++){
result.push({
name: nm[i],
link: ln[i],
developer: dv[i],
link_dev: lm[i]
})
}
resolve(result)
})
.catch(reject)
})
}
function herolist() {
return new Promise((resolve, reject) => {
Axios.get('https://mobile-legends.fandom.com/wiki/Mobile_Legends:_Bang_Bang_Wiki')
.then(({ data }) => {
const $ = cheerio.load(data)
let data_hero = []
let url = []
$('div > div > span > span > a').get().map((result) => {
const name = decodeURIComponent($(result).attr('href').replace('/wiki/',''))
const urln = 'https://mobile-legends.fandom.com' + $(result).attr('href')
data_hero.push(name)
url.push(urln)
})
resolve({ status: 200, hero: data_hero })
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function herodetails(name) {
return new Promise((resolve, reject) => {
var splitStr = name.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
}
const que = splitStr.join(' ')
Axios.get('https://mobile-legends.fandom.com/wiki/' + que)
.then(({ data }) => {
const $ = cheerio.load(data)
let mw = []
let attrib = []
let skill = []
const name = $('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > table > tbody > tr > td > font > b').text()
$('.mw-headline').get().map((res) => {
const mwna = $(res).text()
mw.push(mwna)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td').get().map((rest) => {
const haz = $(rest).text().replace(/\n/g,'')
attrib.push(haz)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > div.progressbar-small.progressbar > div').get().map((rest) => {
skill.push($(rest).attr('style').replace('width:',''))
})
Axios.get('https://mobile-legends.fandom.com/wiki/' + que + '/Story')
.then(({ data }) => {
const $ = cheerio.load(data)
let pre = []
$('#mw-content-text > div > p').get().map((rest) => {
pre.push($(rest).text())
})
const story = pre.slice(3).join('\n')
const items = []
const character = []
$('#mw-content-text > div > aside > section > div').get().map((rest) => {
character.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
$('#mw-content-text > div > aside > div').get().map((rest) => {
items.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
const img = $('#mw-content-text > div > aside > figure > a').attr('href')
const chara = character.slice(0,2)
const result = {
status: 200,
hero_name: name + ` ( ${mw[0].replace('CV:',' CV:')} )`,
entrance_quotes: attrib[2].replace('Entrance Quotes','').replace('\n',''),
hero_feature: attrib[attrib.length - 1].replace('Hero Feature',''),
image: img,
items: items,
character: {
chara
},
attributes: {
movement_speed: attrib[12].replace('● Movement Speed',''),
physical_attack: attrib[13].replace('● Physical Attack',''),
magic_power: attrib[14].replace('● Magic Power',''),
attack_speed: attrib[15].replace('● Attack Speed',''),
physical_defense: attrib[16].replace('● Physical Defense',''),
magic_defense: attrib[17].replace('● Magic Defense',''),
basic_atk_crit_rate: attrib[18].replace('● Basic ATK Crit Rate',''),
hp: attrib[19].replace('● HP',''),
mana: attrib[20].replace('● Mana',''),
ability_crit_rate: attrib[21].replace('● Ability Crit Rate',''),
hp_regen: attrib[22].replace('● HP Regen',''),
mana_regen: attrib[23].replace('● Mana Regen','')
},
price: {
battle_point: mw[1].split('|')[0].replace(/ /g,''),
diamond: mw[1].split('|')[1].replace(/ /g,''),
hero_fragment: mw[1].split('|')[2] ? mw[1].split('|')[2].replace(/ /g,'') : 'none'
},
role: mw[2],
skill: {
durability: skill[0],
offense: skill[1],
skill_effects: skill[2],
difficulty: skill[3]
},
speciality: mw[3],
laning_recommendation: mw[4],
release_date: mw[5],
background_story: story
}
resolve(result)
}).catch((e) => reject({ status: 404, message: e.message }))
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function xnxxsearch(query) {
return new Promise((resolve, reject) => {
const baseurl = 'https://www.xnxx.com'
fetch(`${baseurl}/search/${query}/${Math.floor(Math.random() * 3) + 1}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
let title = [];
let url = [];
let desc = [];
let results = [];
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb').each(function(c, d) {
url.push(baseurl+$(d).find('a').attr('href').replace("/THUMBNUM/", "/"))
})
})
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb-under').each(function(c, d) {
desc.push($(d).find('p.metadata').text())
$(d).find('a').each(function(e,f) {
title.push($(f).attr('title'))
})
})
})
for (let i = 0; i < title.length; i++) {
results.push({
title: title[i],
info: desc[i],
link: url[i]
})
}
resolve({
code: 200,
status: true,
result: results
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
function xnxxdl(URL) {
return new Promise((resolve, reject) => {
fetch(`${URL}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
const title = $('meta[property="og:title"]').attr('content');
const duration = $('meta[property="og:duration"]').attr('content');
const image = $('meta[property="og:image"]').attr('content');
const videoType = $('meta[property="og:video:type"]').attr('content');
const videoWidth = $('meta[property="og:video:width"]').attr('content');
const videoHeight = $('meta[property="og:video:height"]').attr('content');
const info = $('span.metadata').text();
const videoScript = $('#video-player-bg > script:nth-child(6)').html();
const files = {
low: (videoScript.match('html5player.setVideoUrlLow\\(\'(.*?)\'\\);') || [])[1],
high: videoScript.match('html5player.setVideoUrlHigh\\(\'(.*?)\'\\);' || [])[1],
HLS: videoScript.match('html5player.setVideoHLS\\(\'(.*?)\'\\);' || [])[1],
thumb: videoScript.match('html5player.setThumbUrl\\(\'(.*?)\'\\);' || [])[1],
thumb69: videoScript.match('html5player.setThumbUrl169\\(\'(.*?)\'\\);' || [])[1],
thumbSlide: videoScript.match('html5player.setThumbSlide\\(\'(.*?)\'\\);' || [])[1],
thumbSlideBig: videoScript.match('html5player.setThumbSlideBig\\(\'(.*?)\'\\);' || [])[1],
};
resolve({
status: 200,
result: {
title,
URL,
duration,
image,
videoType,
videoWidth,
videoHeight,
info,
files
}
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
async function soundcloud(url) {
return new Promise((resolve, reject) => {
axios({url: 'https://aiovideodl.ml/',method: 'GET',headers: {"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","cookie": "PHPSESSID=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"}}).then((data) => {
let a = cheerio.load(data.data)
let token = a('#token').attr('value')
const options = {
method: 'POST',
url: `https://aiovideodl.ml/wp-json/aio-dl/video-data/`,
headers: {"content-type": "application/x-www-form-urlencoded; charset=UTF-8","user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","cookie": "PHPSESSID=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"
},
formData: {url: url,token: token}
};
request(options, async function(error, response, body) {
if (error) throw new Error(error)
res = JSON.parse(body)
res.status = 200
res.author = author
resolve(res);
});
})
})
}
function anime(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function manga(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > h3').text(),
link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'),
thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function character(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.anime-planet.com/characters/all?name=${query}`)
.then(({
data
}) => {
const hasil = []
const $ = cheerio.load(data)
$('#siteContainer > table > tbody > tr').each(function (a, b) {
result = {
status: 200,
author: '@rasel.ganz',
character: $(b).find('> td.tableCharInfo > a').text(),
link: 'https://www.anime-planet.com' + $(b).find('> td.tableCharInfo > a').attr('href'),
thumbnail: $(b).find('> td.tableAvatar > a > img').attr('src').startsWith('https://') ? $(b).find('> td.tableAvatar > a > img').attr('src') : 'https://www.anime.planet.com' + $(b).find('> td.tableAvatar > a > img').attr('src')
};
hasil.push(result);
});
resolve(hasil)
})
.catch(reject)
})
}
function jadwalbola() {
return new Promise((resolve, reject) => {
axios.get('https://m.bola.net/jadwal_televisi/')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#main_mid_headline_sub_topic').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
jadwal: $(b).find(' > div.main_mid_headline_topic > div > a').text(),
tanggal: $(b).find(' > div.main_mid_headline_topic_grouped_time_list').text().split('\n')[1].split(' ')[1],
jam: $(b).find(' > div.main_mid_headline_topic > span').text(),
url: $(b).find(' > div.main_mid_headline_topic > div > a').attr('href'),
thumb: $(b).find(' > div.main_mid_headline_topic > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jadwaltv() {
return new Promise((resolve, reject) => {
axios.get('http://www.dokitv.com/jadwal-acara-tv')
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#tabeljadwaltv > tbody > tr ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
acara: $(b).find('> td:nth-child(2)').text(),
channel: $(b).find('> td > a').text(),
jam: $(b).find('> td.jfx').text(),
source: $(b).find('> td > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jadwalsholat(query) {
return new Promise((resolve, reject) => {
axios.get(`https://umrotix.com/jadwal-sholat/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('body > div > div.main-wrapper.scrollspy-action > div:nth-child(3) ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
tanggal: $(b).find('> div:nth-child(2)').text(),
imsyak: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(1) > p:nth-child(2)').text(),
subuh: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(2) > p:nth-child(2)').text(),
dzuhur: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(3) > p:nth-child(2)').text(),
ashar: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(4) > p:nth-child(2)').text(),
maghrib: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(5) > p:nth-child(2)').text(),
isya: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(6) > p:nth-child(2)').text()
}
resolve(result)
})
})
.catch(reject)
})
}
function pinterest(query) {
return new Promise((resolve, reject) => {
axios(`https://www.pinterest.com/resource/BaseSearchResource/get/?source_url=%2Fsearch%2Fpins%2F%3Fq%3D${query}&data=%7B%22options%22%3A%7B%22isPrefetch%22%3Afalse%2C%22query%22%3A%22${query}%22%2C%22scope%22%3A%22pins%22%2C%22no_fetch_context_on_resource%22%3Afalse%7D%2C%22context%22%3A%7B%7D%7D&_=1619980301559`).then((data) => {
const random = data.data.resource_response.data.results[Math.floor(Math.random() * (data.data.resource_response.data.results.length))]
var result = [];
result = {
status: 200,
author: '@rasel.ganz',
url: random.images.orig.url
}
resolve(result)
}).catch(reject)
})
}
function film(query) {
return new Promise((resolve, reject) => {
axios.get(`http://167.99.31.48/?s=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div > div.los').each(function (a, b) {
$(b).find('article').each(function (c, d) {
const judul = $(d).find('div > a > div.addinfox > header > h2').text()
const quality = $(d).find('div > a > div > div > span').text()
const type = $(d).find('div > a > div.addinfox > div > i.type').text()
const upload = $(d).find('div > a > div.addinfox > div > span').text()
const link = $(d).find('div > a').attr('href');
const thumb = $(d).find('div > a > div > img').attr('src');
const result = {
status: 200,
author: '@rasel.ganz',
judul: judul,
quality: quality,
type: type,
upload: upload,
link: link,
thumb: thumb,
};
hasil.push(result);
});
});
resolve(hasil)
})
.catch(reject)
})
}
function wattpad(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/search/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('div.story-card-data.hidden-xxs > div.story-info ').each(function(a, b) {
$('ul.list-group > li.list-group-item').each(function(c,d) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.title').text(),
dibaca: $(b).find('> ul > li:nth-child(1) > div.icon-container > div > span.stats-value').text(),
divote: $(b).find('> ul > li:nth-child(2) > div.icon-container > div > span.stats-value').text(),
bab: $(b).find('> ul > li:nth-child(3) > div.icon-container > div > span.stats-value').text(),
waktu: $(b).find('> ul > li:nth-child(4) > div.icon-container > div > span.stats-value').text(),
url:'https://www.wattpad.com' + $(d).find('a').attr('href'),
thumb: $(d).find('img').attr('src'),
description: $(b).find('> div.description').text().replace(/\n/g,'')
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function wattpaduser(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/user/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('#app-container > div > header ').each(function(a, b) {
$('#profile-about > div > div ').each(function(c, d) {
result = {
status: 200,
author: '@rasel.ganz',
username: $(b).find('> div.badges > h1').text().trim(),
works: $(b).find('> div.row.header-metadata > div:nth-child(1) > p:nth-child(1)').text(),
reading_list: $(b).find('> div.row.header-metadata > div.col-xs-4.scroll-to-element > p:nth-child(1)').text(),
followers: $(b).find('> div.row.header-metadata > div.col-xs-4.on-followers > p.followers-count').text(),
joined: $(d).find('> ul > li.date.col-xs-12.col-sm-12 > span').text().trim().replace('Joined',''),
pp_picture: `https://img.wattpad.com/useravatar/${query}.128.851744.jpg`,
about: $(d).find('> div.description > pre').text() ? $(d).find('> div.description > pre').text() : 'Not found'
}
resolve(result)
})
})
})
.catch(reject)
})
}
function webtoons(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#content > div.card_wrap.search._searchResult > ul > li ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> a > div > p.subj').text(),
like: $(b).find('> a > div > p.grade_area > em').text(),
creator: $(b).find('> a > div > p.author').text(),
genre: $(b).find('> a > span').text(),
thumbnail: $(b).find('> a > img').attr('src'),
url: 'https://www.webtoons.com' + $(b).find('> a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function mangatoons(query) {
return new Promise((resolve, reject) => {
axios.get(`https://mangatoon.mobi/en/search?word=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#page-content > div.search-page > div > div.comics-result > div.recommended-wrap > div > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.recommend-comics-title > span').text(),
genre: $(b).find('> div.comics-type > span').text().trim(),
link: 'https://mangatoon.mobi' + $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function drakor(query) {
return new Promise((resolve, reject) => {
axios.get(`https://drakorasia.blog//?s=${query}&post_type=post`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#post > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').text().trim(),
years: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.category.text-gray.font-normal.text-white.text-xs.truncate > a').text(),
genre: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.genrenya.text-center.text-white.text-opacity-75.text-xs.mt-1').text().trim(),
thumbnail: $(b).find('> div.thumbnail > a > img').attr('src'),
url: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function stickersearch(query) {
return new Promise((resolve, reject) => {
axios.get(`https://getstickerpack.com/stickers?query=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const source = [];
const link = [];
$('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) {
source.push($(b).attr('href'))
})
axios.get(source[Math.floor(Math.random() * source.length)])
.then(({
data
}) => {
const $$ = cheerio.load(data)
$$('#stickerPack > div > div.row > div > img').each(function(c, d) {
link.push($$(d).attr('src').replace(/&d=200x200/g,''))
})
result = {
status: 200,
author: '@rasel.ganz',
title: $$('#intro > div > div > h1').text(),
sticker_url: link
}
resolve(result)
})
}).catch(reject)
})
}
function listsurah() {
return new Promise((resolve, reject) => {
axios.get('https://litequran.net/')
.then(({ data }) => {
const $ = cheerio.load(data)
let listsurah = []
$('body > main > section > ol > li > a').each(function(a, b) {
listsurah.push($(b).text())
})
result = {
status: 200,
author: '@rasel.ganz',
listsurah: listsurah
}
resolve(result)
}).catch(reject)
})
}
function surah(query) {
return new Promise((resolve, reject) => {
axios.get(`https://litequran.net/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > main > article > ol > li').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
arab: $(b).find('> span.ayat').text(),
latin: $(b).find('> span.bacaan').text(),
translate: $(b).find('> span.arti').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function tafsirsurah(query) {
return new Promise((resolve, reject) => {
axios.get(`https://tafsirq.com/topik/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = []
$('body > div:nth-child(4) > div > div.col-md-6 > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
surah: $(b).find('> div.panel-heading.panel-choco > div > div > a').text(),
tafsir: $(b).find('> div.panel-body.excerpt').text().trim(),
type: $(b).find('> div.panel-heading.panel-choco > div > div > span').text(),
source: $(b).find('> div.panel-heading.panel-choco > div > div > a').attr('href')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function jalantikus(query) {
return new Promise((resolve, reject) => {
axios.get(`https://jalantikus.com/search/articles/${query}/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.post-block-with-category").each(function(c, d) {
title = $(d).find("a.post-block-with-category__link").text()
category = $(d).find("a.post-info__category-link").text()
date = $(d).find("time").text()
link = `https://jalantikus.com${$(d).find("a").attr('href')}`
const Data = {
title: title,
category: category,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function tribunnews() {
return new Promise((resolve, reject) => {
axios.get(`https://www.tribunnews.com/news`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("li.p1520.art-list.pos_rel").each(function(c, d) {
title = $(d).find("div.mr140 > h3 > a.f20.ln24.fbo.txt-oev-2").text().trim()
thumb = $(d).find("div.fr.mt5.pos_rel > a > img.shou2.bgwhite").attr('src')
desc = $(d).find("div.grey2.pt5.f13.ln18.txt-oev-3").text().trim()
date = $(d).find("div.grey.pt5 > time.foot.timeago").text().trim()
link = $(d).find("div.fr.mt5.pos_rel > a").attr('href')
const Data = {
title: title,
thumb: thumb,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function kompasnews() {
return new Promise((resolve, reject) => {
axios.get(`https://news.kompas.com/`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('body > div > div.container.clearfix > div:nth-child(3) > div.col-bs10-7 > div:nth-child(3) > div.latest.ga--latest.mt2.clearfix > div > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
berita: $(b).find('> div > div.article__box > h3').text(),
upload_time: $(b).find('> div > div.article__box > div.article__date').text(),
type_berita: $(b).find('> div > div.article__boxsubtitle > h2').text(),
link: $(b).find('> div > div.article__box > h3 > a').attr('href'),
thumbnail: $(b).find('> div > div.article__asset > a > img').attr('data-src'),
info_berita: $(b).find('> div > div.article__box > div.article__lead').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function inews() {
return new Promise((resolve, reject) => {
axios.get(`https://www.inews.id/news`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#news-list > li ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > h3').text().trim(),
upload_time: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > div.date.margin-10px-left').text().trim().split('|')[0],
link: $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > div > div.float-left.width-130px.position-absolute > img').attr('data-original'),
info_berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > p').text()
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
async function shoppe(item, limit) {
const hasil = []
await axios.request(`https://shopee.co.id/api/v4/search/search_items?by=relevancy&keyword=${item}&limit=${limit}&newest=0&order=desc&page_type=search&scenario=PAGE_GLOBAL_SEARCH&version=2`, {
method: "GET",
data: null,
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"if-none-match-": "55b03-856cd63f16112f8a43da6096f97ac3fe",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
}
}).then(respon => {
hasil.push(respon.data)
})
return hasil[0]
}
async function otaku(querry) {
try {
const link = await axios.get(`https://otakudesu.moe/?s=${querry}&post_type=anime`)
const c = cheerio.load(link.data)
let id = c('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href')
const Link = await axios.get(id)
const $ = cheerio.load(Link.data)
let judul = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(1) > span').text().trim()
let judulJpn = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(2) > span').text().trim()
let score = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(3) > span').text().trim()
let Produser = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(4) > span').text().trim()
let Type = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(5) > span').text().trim()
let Status = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(6) > span').text().trim()
let TotalEpisode = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(7) > span').text().trim()
let durasi = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(8) > span').text().trim()
let Rilis = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(9) > span').text().trim()
let studio = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(10) > span').text().trim()
let genre = $('#venkonten').find('div.venser > div.fotoanime > div.infozin > div > p:nth-child(11) > span').text().trim()
let thumb = $('#venkonten > div.venser > div.fotoanime').find('img').attr('src')
let Sinopsis = $('#venkonten > div.venser > div.fotoanime > div.sinopc').find('p').text().trim()
let LinkDown = $('#venkonten').find('div.venser > div:nth-child(8) > ul > li:nth-child(4) > span:nth-child(1) > a').attr('href')
const data = {
creator: '@rasel.ganz',
status: link.status,
result: {
judul: judul,
thumb: thumb,
japan: judulJpn,
rating: score,
produser: Produser,
type: Type,
status: Status,
episode: TotalEpisode,
durasi: durasi,
rilis: Rilis,
studio: studio,
genre: genre,
link: LinkDown,
sinopsis: Sinopsis
}
}
return data
} catch (err) {
var notFond = {
creator: '@rasel.ganz',
status: link.status,
Pesan: 'maap banh emror😔'
}
return notFond
}
}
function covid() {
return new Promise(async(resolve, reject) => {
axios.get('https://covid19.go.id/')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = [];
$('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) {
const pindo = $(b).find('div:nth-child(3) > strong').text()
const mindo = $(b).find('div:nth-child(5) > strong').text()
const sindo = $(b).find('div:nth-child(4) > strong').text()
const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim()
$('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) {
const neg = $(d).find('div:nth-child(3) > strong').text()
const pglo = $(d).find('div:nth-child(4) > strong').text()
const nglo = $(d).find('div:nth-child(5) > strong').text()
const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim()
const result = {
message: 'By Hexagon',
indo : {
positif_indo: pindo,
meninggal_indo: mindo,
sembuh_indo: sindo,
update_indo: upindo.split(':')[1]
},
global: {
negara: neg,
positif: pglo,
meninggal: nglo,
update: up.split(':')[1].split('\n')[0]
}
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function lirik(judul){
return new Promise(async(resolve, reject) => {
axios.get('https://www.musixmatch.com/search/' + judul)
.then(async({ data }) => {
const $ = cheerio.load(data)
const hasil = {};
let limk = 'https://www.musixmatch.com'
const link = limk + $('div.media-card-body > div > h2').find('a').attr('href')
await axios.get(link)
.then(({ data }) => {
const $$ = cheerio.load(data)
hasil.thumb = 'https:' + $$('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div').find('img').attr('src')
$$('div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function(a,b) {
hasil.lirik = $$(b).find('span > p > span').text() +'\n' + $$(b).find('span > div > p > span').text()
})
})
resolve(hasil)
})
.catch(reject)
})
}
function komiku(judul) {
return new Promise(async(resolve,reject) => {
axios.get('https://data3.komiku.id/cari/?post_type=manga&s=' + encodeURIComponent(judul))
.then(({ data }) => {
const $ = cheerio.load(data)
const img = [];
const or = [];
const ind = [];
const up = [];
const des = [];
const li = [];
const ch = [];
const ch1 = [];
$('div.daftar').each(function (a,b) {
img.push($(b).find('img').attr('data-src'))
$('div.kan').each(function(c,d) {
or.push($(d).find('h3').text().trim())
ind.push($(d).find('span.judul2').text())
li.push('https://komiku.id' + $(d).find('a').attr('href'))
up.push($(d).find('p').text().trim().split('. ')[0])
des.push($(d).find('p').text().trim().split('. ')[1])
ch1.push($(d).find('div:nth-child(5) > a').attr('title'))
$('div.new1').each(function(e,f) {
ch.push($(f).find('a').attr('title'))
})
})
})
for (let i = 0 ; i < img.length; i++) {
resolve({
image: img[i],
title: or[i],
indo: ind[i],
update: up[i],
desc: des[i],
chapter_awal: ch[i],
chapter_akhir: ch1[i],
link: li[i]
})
}
})
.catch(reject)
})
}
function ghstalk(username) {
url= `https://api.github.com/users/${username}`;
return axios.get(url)
.then(data => {
return data.data
console.log(data.data)
})
}
async function telegraph(buffer) {
return new Promise(async (resolve, reject) => {
const { ext } = await fromBuffer(buffer)
let form = new FormData
form.append('file', buffer, 'tmp.' + ext)
let res = await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
let img = await res.json()
if (img.error) throw img.error
hasil = 'https://telegra.ph' + img[0].src
resolve({hasil})
console.log(hasil)
}).catch(reject)
}
function gempa() {
return new Promise((resolve, reject) => {
axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg').then((response) => {
const $ = cheerio.load(response.data)
const urlElems = $('table.table-hover.table-striped')
for (let i = 0; i < urlElems.length; i++) {
const urlSpan = $(urlElems[i]).find('tbody')[0]
if (urlSpan) {
const urlData = $(urlSpan).find('tr')[0]
var Kapan = $(urlData).find('td')[1]
var Letak = $(urlData).find('td')[2]
var Magnitudo = $(urlData).find('td')[3]
var Kedalaman = $(urlData).find('td')[4]
var Wilayah = $(urlData).find('td')[5]
var lintang = $(Letak).text().split(' ')[0]
var bujur = $(Letak).text().split(' ')[2]
var hasil = {
Waktu: $(Kapan).text(),
Lintang: lintang,
Bujur: bujur,
Magnitudo: $(Magnitudo).text(),
Kedalaman: $(Kedalaman).text().replace(/\t/g, '').replace(/I/g, ''),
Wilayah: $(Wilayah).text().replace(/\t/g, '').replace(/I/g, '').replace('-','').replace(/\r/g, '').split('\n')[0],
Map: ''
}
resolve(hasil);
console.log(hasil)
}
}
})
})
}
function servermc() {
return new Promise((resolve, reject) => {
axios.get(`https://minecraftpocket-servers.com/country/indonesia/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("tr").each(function(c, d) {
ip = $(d).find("button.btn.btn-secondary.btn-sm").eq(1).text().trim().replace(':19132', '')
port = '19132'
versi = $(d).find("a.btn.btn-info.btn-sm").text()
player = $(d).find("td.d-none.d-md-table-cell > strong").eq(1).text().trim()
const Data = {
ip: ip,
port: port,
versi: versi,
player: player
}
hasil.push(Data)
})
resolve(hasil)
}).catch(reject)
})
}
function happymod(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.happymod.com/search.html?q=${query}`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.pdt-app-box").each(function(c, d) {
name = $(d).find("a").text().trim();
icon = $(d).find("img.lazy").attr('data-original');
link = $(d).find("a").attr('href');
link2 = `https://www.happymod.com${link}`
const Data = {
icon: icon,
name: name,
link: link2
}
hasil.push(Data)
})
resolve(hasil);
}).catch(reject)
});
}
function sfilesearch(query) {
return new Promise((resolve, reject) => {
axios.get(`https://sfile.mobi/search.php?q=${query}&search=Search`).then(async tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("div.list").each(function(i, cuk) {
ico= $(cuk).find("img").attr("src");
lin= $(cuk).find("a").attr("href");
name= $(cuk).find("a").text();
const Data = {
icon: ico,
name: name,
link: lin
}
hasil.push(Data)
})
resolve(hasil)
});
});
}
function hoax() {
return new Promise((resolve, reject) => {
axios.get(`https://turnbackhoax.id/`).then( tod => {
const $ = cheerio.load(tod.data)
hasil = []
$("figure.mh-loop-thumb").each(function(a, b) {
$("div.mh-loop-content.mh-clearfix").each(function(c, d) {
link = $(d).find("h3.entry-title.mh-loop-title > a").attr('href');
img = $(b).find("img.attachment-mh-magazine-lite-medium.size-mh-magazine-lite-medium.wp-post-image").attr('src');
title = $(d).find("h3.entry-title.mh-loop-title > a").text().trim();
desc = $(d).find("div.mh-excerpt > p").text().trim();
date = $(d).find("span.mh-meta-date.updated").text().trim();
const Data = {
title: title,
thumbnail: img,
desc: desc,
date: date,
link: link
}
hasil.push(Data)
})
})
resolve(hasil)
}).catch(reject)
});
}
function ssweb(url) {
return new Promise(async(resolve,reject) => {
await getBuffer(`http://fdz-app.herokuapp.com/api/ssweb/mobile/get_screenshot?url=${url}`).then(res => {
resolve(res)
})
.catch(reject)
})
}
async function filmapik(query) {
try{
const link = await axios.get(`https://filmapik.website/?s=${query}`);
const c = cheerio.load(link.data)
let Id = []
c('#main > div > div.main-content.main-category > div.movies-list-wrap.mlw-category > div.movies-list.movies-list-full ').each(function (a, b) {
c(b).find('div').each(function (e, d) {
let id = c(d).find('a').attr('href')
Id.push(id)
})
})
let Random = Id[Math.floor(Math.random() * (Id.length))]
const Link = await axios.get(Random)
const $ = cheerio.load(Link.data)
let judul = $('#mv-info').find('div.mvi-content > div.mvic-desc > h3').text().trim()
let view = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(1)').text().trim()
let genre = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(2)').text().trim()
let studio = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-left > p:nth-child(3) > span').text().trim()
let durasi = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(1) > span').text().trim()
let TvStatus = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > p:nth-child(2) > span').text().trim()
let network = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > div.mvici-right > div > p:nth-child(5) > a').text().trim()
let thumb = $('#mv-info').find('div.mvi-content > div.thumb.mvic-thumb > img').attr('src')
let BintangFilm = $('#mv-info').find('div.mvi-content > div.mvic-desc > div.mvic-info > p > span').text().trim()
const data = {
author: '@rasel.ganz',
status: link.status,
result: {
judul: judul,
thumb: thumb,
Link: Random,
penonton: view.replace('Views: ', ''),
durasi: durasi,
genre: genre.replace('Genre: ', ''),
studio: studio,
TV: TvStatus,
network: network,
bintangFilm: BintangFilm
}
}
return data
} catch (err) {
var notFond = {
author: '@rasel.ganz',
status: link.status,
Pesan: 'sorry banh emror🙏'
}
return notFond
}
}
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve({ status: src.status, creator: 'Dika Ardnt.', hasil: data })
})
})
})
}
async function mediafire(url) {
let query = await axios.get(url)
let cher = cheerio.load(query.data)
let hasil = []
let link = cher('a#downloadButton').attr('href')
let size = cher('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace(' ', '')
let seplit = link.split('/')
let author = '@rasel.ganz'
let nama = seplit[5]
let mime = nama.split('.')
mime = mime[1]
hasil.push({ author, nama, mime, size, link })
return hasil
console.log(hasil)
}
================================================
FILE: lib/scrapejoox.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require("axios")
const qs = require("qs")
function joox(query) {
return new Promise((resolve, reject) => {
const time = Math.floor(new Date() / 1000)
axios.get('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=' + query + '&pn=1&sin=0&ein=29&_=' + time)
.then(({ data }) => {
let result = []
let hasil = []
let promoses = []
let ids = []
data.itemlist.forEach(result => {
ids.push(result.songid)
});
for (let i = 0; i < data.itemlist.length; i++) {
const get = 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=' + ids[i]
promoses.push(
axios.get(get, {
headers: {
Cookie: 'wmid=142420656; user_type=1; country=id; session_key=2a5d97d05dc8fe238150184eaf3519ad;'
}
})
.then(({ data }) => {
const res = JSON.parse(data.replace('MusicInfoCallback(', '').replace('\n)', ''))
hasil.push({
lagu: res.msong,
album: res.malbum,
penyanyi: res.msinger,
publish: res.public_time,
img: res.imgSrc,
mp3: res.mp3Url
})
Promise.all(promoses).then(() => resolve({
creator: "wabot", // Ganti terserah kalian
status: true,
data: hasil,
}))
}).catch(reject)
)
}
}).catch(reject)
})
}
module.exports = { joox }
================================================
FILE: lib/scraper.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
function pinterest(querry){
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
source: 'https://www.besthdwallpaper.com/'+$(b).find('div > a:nth-child(3)').attr('href'),
image: [$(b).find('picture > img').attr('data-src') || $(b).find('picture > img').attr('src'), $(b).find('picture > source:nth-child(1)').attr('srcset'), $(b).find('picture > source:nth-child(2)').attr('srcset')]
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function quotesAnime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve(data)
})
})
})
}
function umma(url) {
return new Promise((resolve, reject) => {
axios.get(url)
.then((res) => {
let $ = cheerio.load(res.data)
let image = []
$('#article-content > div').find('img').each(function (a, b) {
image.push($(b).attr('src'))
})
let hasil = {
title: $('#wrap > div.content-container.font-6-16 > h1').text().trim(),
author: {
name: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.user-ame.font-6-16.fw').text().trim(),
profilePic: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.profile-photo > img.photo').attr('src')
},
caption: $('#article-content > div > p').text().trim(),
media: $('#article-content > div > iframe').attr('src') ? [$('#article-content > div > iframe').attr('src')] : image,
type: $('#article-content > div > iframe').attr('src') ? 'video' : 'image',
like: $('#wrap > div.bottom-btns > div > button:nth-child(1) > div.text.font-6-12').text(),
}
resolve(hasil)
})
})
}
function ringtone(title) {
return new Promise((resolve, reject) => {
axios.get('https://meloboom.com/en/search/'+title)
.then((get) => {
let $ = cheerio.load(get.data)
let hasil = []
$('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) {
hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') })
})
resolve(hasil)
})
})
}
function styletext(teks) {
return new Promise((resolve, reject) => {
axios.get('http://qaz.wtf/u/convert.cgi?text='+teks)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('table > tbody > tr').each(function (a, b) {
hasil.push({ name: $(b).find('td:nth-child(1) > span').text(), result: $(b).find('td:nth-child(2)').text().trim() })
})
resolve(hasil)
})
})
}
module.exports = { pinterest, wallpaper, wikimedia, quotesAnime, aiovideodl, umma, ringtone, styletext }
================================================
FILE: lib/scraper2.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const cheerio = require('cheerio')
const axios = require('axios')
// Downloader
async function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve(data)
})
})
})
}
module.exports = { aiovideodl }
================================================
FILE: lib/scraper3.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios')
const cheerio = require('cheerio')
function pinterest(querry){
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
source: 'https://www.besthdwallpaper.com/'+$(b).find('div > a:nth-child(3)').attr('href'),
image: [$(b).find('picture > img').attr('data-src') || $(b).find('picture > img').attr('src'), $(b).find('picture > source:nth-child(1)').attr('srcset'), $(b).find('picture > source:nth-child(2)').attr('srcset')]
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function quotesAnime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://notify.moe/quotes')
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.notify.moe-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve(data)
})
})
})
}
function umma(url) {
return new Promise((resolve, reject) => {
axios.get(url)
.then((res) => {
let $ = cheerio.load(res.data)
let image = []
$('#article-content > div').find('img').each(function (a, b) {
image.push($(b).attr('src'))
})
let hasil = {
title: $('#wrap > div.content-container.font-6-16 > h1').text().trim(),
author: {
name: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.user-ame.font-6-16.fw').text().trim(),
profilePic: $('#wrap > div.content-container.font-6-16 > div.content-top > div > div.profile-photo > img.photo').attr('src')
},
caption: $('#article-content > div > p').text().trim(),
media: $('#article-content > div > iframe').attr('src') ? [$('#article-content > div > iframe').attr('src')] : image,
type: $('#article-content > div > iframe').attr('src') ? 'video' : 'image',
like: $('#wrap > div.bottom-btns > div > button:nth-child(1) > div.text.font-6-12').text(),
}
resolve(hasil)
})
})
}
function ringtone(title) {
return new Promise((resolve, reject) => {
axios.get('https://meloboom.com/en/search/'+title)
.then((get) => {
let $ = cheerio.load(get.data)
let hasil = []
$('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) {
hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') })
})
resolve(hasil)
})
})
}
function styletext(teks) {
return new Promise((resolve, reject) => {
axios.get('http://qaz.wtf/u/convert.cgi?text='+teks)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('table > tbody > tr').each(function (a, b) {
hasil.push({ name: $(b).find('td:nth-child(1) > span').text(), result: $(b).find('td:nth-child(2)').text().trim() })
})
resolve(hasil)
})
})
}
module.exports = { pinterest, wallpaper, wikimedia, quotesAnime, aiovideodl, umma, ringtone, styletext }
================================================
FILE: lib/skiuwers.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
//===> EXTERNAL MODULES
let { WAConnection, MessageType, Mimetype} = require('@adiwajshing/baileys')
rip = new WAConnection()
//const { getBuffer } = require("../root.js");
const { JSDOM } = require('jsdom')
const fetch = require('node-fetch')
const FormData = require('form-data')
const axios = require("axios")
const { default: Axios } = require('axios');
const cheerio = require("cheerio")
const { exec } = require('child_process');
const fs = require('fs');
const qs = require('qs')
const { fromBuffer } = require('file-type')
//===> VARUABLE
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
//===> POST
function post(url, formdata) {
console.log(Object.keys(formdata).map(key => `${key}=${encodeURIComponent(formdata[key])}`).join('&'))
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: Object.keys(formdata).map(key => `${key}=${encodeURIComponent(formdata[key])}`).join('&')
})
}
function pinterest(querry){
return new Promise(async(resolve,reject) => {
axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
headers: {
"cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = [];
const hasil = [];
$('div > a').get().map(b => {
const link = $(b).find('img').attr('src')
result.push(link)
});
result.forEach(v => {
if(v == undefined) return
hasil.push(v.replace(/236/g,'736'))
})
hasil.shift();
resolve(hasil)
})
})
}
function wallpaper(title, page = '1') {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
source: 'https://www.besthdwallpaper.com/'+$(b).find('div > a:nth-child(3)').attr('href'),
image: [$(b).find('picture > img').attr('data-src') || $(b).find('picture > img').attr('src'), $(b).find('picture > source:nth-child(1)').attr('srcset'), $(b).find('picture > source:nth-child(2)').attr('srcset')]
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function quotesAnime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).catch(reject)
})
}
const y2mateV = async (yutub) => {
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
let ytId = ytIdRegex.exec(yutub)
url = 'https://youtu.be/' + ytId[1]
let res = await post(`https://www.y2mate.com/mates/en68/analyze/ajax`, {
url,
q_auto: 0,
ajax: 1
})
const mela = await res.json()
const $ = cheerio.load(mela.result)
const hasil = []
let thumb = $('div').find('.thumbnail.cover > a > img').attr('src')
let judul = $('div').find('.thumbnail.cover > div > b').text()
let quality = $('div').find('#mp4 > table > tbody > tr:nth-child(4) > td:nth-child(3) > a').attr('data-fquality')
let tipe = $('div').find('#mp4 > table > tbody > tr:nth-child(3) > td:nth-child(3) > a').attr('data-ftype')
let output = `${judul}.` + tipe
let size = $('div').find('#mp4 > table > tbody > tr:nth-child(4) > td:nth-child(2)').text()
let id = /var k__id = "(.*?)"/.exec(mela.result)[1]
let res2 = await post(`https://www.y2mate.com/mates/en68/convert`, {
type: 'youtube',
_id: id,
v_id: ytId[1],
ajax: '1',
token: '',
ftype: tipe,
fquality: quality
})
const meme = await res2.json()
const supp = cheerio.load(meme.result)
let link = supp('div').find('a').attr('href')
hasil.push({ thumb, judul, quality, tipe, size, output, link})
return hasil
}
const y2mateA = async (yutub) => {
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
let ytId = ytIdRegex.exec(yutub)
url = 'https://youtu.be/' + ytId[1]
let res = await post(`https://www.y2mate.com/mates/en68/analyze/ajax`, {
url,
q_auto: 0,
ajax: 1
})
const mela = await res.json()
const $ = cheerio.load(mela.result)
const hasil = []
let thumb = $('div').find('.thumbnail.cover > a > img').attr('src')
let judul = $('div').find('.thumbnail.cover > div > b').text()
let size = $('div').find('#mp3 > table > tbody > tr > td:nth-child(2)').text()
let tipe = $('div').find('#mp3 > table > tbody > tr > td:nth-child(3) > a').attr('data-ftype')
let output = `${judul}.` + tipe
let quality = $('div').find('#mp3 > table > tbody > tr > td:nth-child(3) > a').attr('data-fquality')
let id = /var k__id = "(.*?)"/.exec(mela.result)[1]
let res2 = await post(`https://www.y2mate.com/mates/en68/convert`, {
type: 'youtube',
_id: id,
v_id: ytId[1],
ajax: '1',
token: '',
ftype: tipe,
fquality: quality
})
const meme = await res2.json()
const supp = cheerio.load(meme.result)
let link = supp('div').find('a').attr('href')
hasil.push({ thumb, judul, quality, tipe, size, output, link})
return hasil
}
async function tiktokDown (Url) {
return new Promise (async (resolve, reject) => {
await axios.request({
url: "https://ttdownloader.com/",
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(respon => {
const $ = cheerio.load(respon.data)
const token = $('#token').attr('value')
axios({
url: "https://ttdownloader.com/req/",
method: "POST",
data: new URLSearchParams(Object.entries({url: Url, format: "", token: token})),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(res => {
const ch = cheerio.load(res.data)
var creator = `lala`
const result = {
status: res.status,
author: `${creator}`,
result: {
nowatermark: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
watermark: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
audio: ch('#results-list > div:nth-child(4)').find(' div.download > a').attr('href')
}
}
resolve(result)
}).catch(reject)
}).catch(reject)
})
}
const downloadig = async(link, from, rip, prefix) => {
try {
var a = await axios.get(`https://megayaa.herokuapp.com/api/igdl?url=${link}`)
var b = a.data.result
var owner = a.data.owner
var capt = a.data.caption
b.forEach(async(res) => {
if(res.type == 'jpg'){
var c = await getBuffer(res.url)
skiuwers.sendMessage(from, c, MessageType.image, {quoted: rip, caption: `Instagram Downloader\n\nOwner : ${owner}\n\nCaption : ${capt}\n\nType : ${res.type}`})
} else {
var d = await getBuffer(res.url)
skiuwers.sendMessage(from, d, MessageType.video, {quoted: rip, caption: `Instagram Downloader\n\nOwner : ${owner}\n\nCaption : ${capt}\n\nType : ${res.type}` })
}
})
} catch (e) {
console.log(e)
skiuwers.sendMessage(from, 'error, mungkin link tidak valid', MessageType.text)
}
}
const igstory = async(username, from, rip, prefix) => {
try {
var a = await axios.get(`https://megayaa.herokuapp.com/api/igstori?username=${username}`)
var username = a.data.username
var count = a.data.stories_count
var b = a.data.data
b.forEach(async(res) => {
if(res.type == 'jpg'){
var c = await getBuffer(res.url)
skiuwers.sendMessage(from, c, MessageType.image)
} else {
var d = await getBuffer(res.url)
skiuwers.sendMessage(from, d, MessageType.video)
}
})
} catch (e) {
console.log(e)
skiuwers.sendMessage(from, 'error, mungkin link tidak valid', MessageType.text)
}
}
function webp2gifFile(path) {
return new Promise((resolve, reject) => {
const bodyForm = new FormData()
bodyForm.append('new-image-url', '')
bodyForm.append('new-image', fs.createReadStream(path))
Axios({
method: 'post',
url: 'https://s6.ezgif.com/webp-to-mp4',
data: bodyForm,
headers: {
'Content-Type': `multipart/form-data; boundary=${bodyForm._boundary}`
}
}).then(({ data }) => {
const bodyFormThen = new FormData()
const $ = cheerio.load(data)
const file = $('input[name="file"]').attr('value')
const token = $('input[name="token"]').attr('value')
const convert = $('input[name="file"]').attr('value')
const gotdata = {
file: file,
token: token,
convert: convert
}
bodyFormThen.append('file', gotdata.file)
bodyFormThen.append('token', gotdata.token)
bodyFormThen.append('convert', gotdata.convert)
Axios({
method: 'post',
url: 'https://ezgif.com/webp-to-mp4/' + gotdata.file,
data: bodyFormThen,
headers: {
'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}`
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = 'https:' + $('div#output > p.outfile > video > source').attr('src')
resolve({
status: true,
message: "Created By MRHRTZ",
result: result
})
}).catch(reject)
}).catch(reject)
})
}
async function igDownloader(Link) {
const hasil = []
const Form = {
url: Link,
submit: ""
}
await axios(`https://downloadgram.org/`, {
method: "POST",
data: new URLSearchParams(Object.entries(Form)),
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"content-type": "application/x-www-form-urlencoded",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "_ga=GA1.2.1695343126.1621491858; _gid=GA1.2.28178724.1621491859; __gads=ID=8f9d3ef930e9a07b-2258e672bec80081:T=1621491859:RT=1621491859:S=ALNI_MbqLxhztDiYZttJFX2SkvYei6uGOw; __atuvc=3%7C20; __atuvs=60a6eb107a17dd75000; __atssc=google%3B2; _gat_gtag_UA_142480840_1=1"
},
referrerPolicy: "strict-origin-when-cross-origin",
}).then(async res => {
const $ = cheerio.load(res.data)
let url = $('#downloadBox').find('a').attr('href');
await axios(Link, {
method: "GET",
data: null,
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"cache-control": "max-age=0",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"",
"cookie": "ig_did=08A3C465-7D43-4D8A-806A-88F98384E63B; ig_nrcb=1; mid=X_ipMwALAAFgQ7AftbrkhIDIdXJ8; fbm_124024574287414=base_domain=.instagram.com; shbid=17905; ds_user_id=14221286336; csrftoken=fXHAj5U3mcJihQEyVXfyCzcg46lHx7QD; sessionid=14221286336%3A5n4czHpQ0GRzlq%3A28; shbts=1621491639.7673564; rur=FTW"
},
referrerPolicy: "strict-origin-when-cross-origin"
}).then(respon => {
const ch = cheerio.load(respon.data)
let title = ch('title').text().trim()
const result = {
status: true,
result: {
link: url,
desc: title
}
}
hasil.push(result)
})
})
return hasil[0]
}
async function TiktokDownloader(Url) {
return new Promise (async (resolve, reject) => {
await axios.request({
url: "https://ttdownloader.com/",
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(respon => {
const $ = cheerio.load(respon.data)
const token = $('#token').attr('value')
axios({
url: "https://ttdownloader.com/req/",
method: "POST",
data: new URLSearchParams(Object.entries({url: Url, format: "", token: token})),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(res => {
const ch = cheerio.load(res.data)
const result = {
status: res.status,
result: {
nowatermark: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
watermark: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
audio: ch('#results-list > div:nth-child(4)').find(' div.download > a').attr('href')
}
}
resolve(result)
}).catch(reject)
}).catch(reject)
})
}
//===> IGDL
function igdl(url_media) {
return new Promise((resolve,reject)=>{
url_media = url_media.replace("reel", "p")
var url = "https://igram.io/i/"
const requestBody = {
url: url_media.replace("reel", "p"),
lang_code: "en"
}
const config = {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.75',
'x-requested-with': ' XMLHttpRequest',
'origin': ' https://igram.io',
'referer': ' https://igram.io/en/dl/',
'sec-fetch-dest': ' empty',
'sec-fetch-mode': ' cors',
'sec-fetch-site': ' same-origin',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '__cfduid=d4c2ddc2229a4d74c28b6ba25cdcd2a181618175605'
},
}
axios.post(url, qs.stringify(requestBody), config).then(result => {
let $ = cheerio.load(result.data), ig = []
//Obter todos os links de videos da pagina carregada
$('[data-mediatype=Video]').each((i, element) => {
let cheerioElement = $(element)
ig.push(cheerioElement.attr("href"))
})
//Obter todos os links de imagem da pagina carregada
$('div > div.bg-white.border.rounded-sm.max-w-md > img').each((i, element) => {
let cheerioElement = $(element)
ig.push(cheerioElement.attr("src"))
})
resolve({
results_number : ig.length,
url_list: ig
})
}).catch(err=>{
console.log(err.response)
reject(err)
})
})
}
//===> FOTOIG
const fotoIg = async (igLink) => {
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'X-Requested-With': "XMLHttpRequest",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
const hasil = []
const res = await post('https://igdownloader.com/ajax', {
link: igLink,
downloader: 'photo'
})
const mela = await res.json()
const $ = cheerio.load(mela.html)
let foto = $('div').find('.img-block > div > div.post > img').attr('src')
hasil.push({ foto })
return hasil
}
//===> VIDEOIG
const videoIg = async (igLink) => {
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'X-Requested-With': "XMLHttpRequest",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
hasil = []
res = await post('https://igdownloader.com/ajax', {
link: igLink,
downloader: 'video'
})
mela = await res.json()
$ = cheerio.load(mela.html)
let video = $('div').find('.img-block > div > div.post').attr('data-src')
hasil.push({ video})
return hasil
}
//===> AIOVIDEODL
function aiovideodl(link) {
return new Promise((resolve, reject) => {
axios({
url: 'https://aiovideodl.ml/',
method: 'GET',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
}
}).then((src) => {
let a = cheerio.load(src.data)
let token = a('#token').attr('value')
axios({
url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/',
method: 'POST',
headers: {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653"
},
data: new URLSearchParams(Object.entries({ 'url': link, 'token': token }))
}).then(({ data }) => {
resolve(data)
})
})
})
}
//===> YTA
function yta(url) {
return new Promise((resolve, reject) => {
if (ytIdRegex.test(url)) {
let ytId = ytIdRegex.exec(url)
url = 'https://youtu.be/' + ytId[1]
res = post('https://www.y2mate.com/mates/en60/analyze/ajax', {
url,
q_auto: 0,
ajax: 1
})
.then(res => res.json())
.then(res => {
let document = (new JSDOM(res.result)).window.document
let type = document.querySelectorAll('td')
let filesize = type[type.length - 10].innerHTML
let id = /var k__id = "(.*?)"/.exec(document.body.innerHTML) || ['', '']
let thumb = document.querySelector('img').src
let title = document.querySelector('b').innerHTML
res = post('https://www.y2mate.com/mates/en60/convert', {
type: 'youtube',
_id: id[1],
v_id: ytId[1],
ajax: '1',
token: '',
ftype: 'mp3',
fquality: 128
})
.then(res => res.json())
.then(res => {
let KB = parseFloat(filesize) * (1000 * /MB$/.test(filesize))
resolve({
dl_link: / YTV
function ytv(url) {
return new Promise((resolve, reject) => {
if (ytIdRegex.test(url)) {
let ytId = ytIdRegex.exec(url)
url = 'https://youtu.be/' + ytId[1]
res = post('https://www.y2mate.com/mates/en60/analyze/ajax', {
url,
q_auto: 0,
ajax: 1
})
.then(res => res.json())
.then(res => {
let document = (new JSDOM(res.result)).window.document
let typo = document.querySelectorAll('td')
let filesize = typo[typo.length - 23].innerHTML
let id = /var k__id = "(.*?)"/.exec(document.body.innerHTML) || ['', '']
let thumb = document.querySelector('img').src
let title = document.querySelector('b').innerHTML
res = post('https://www.y2mate.com/mates/en60/convert', {
type: 'youtube',
_id: id[1],
v_id: ytId[1],
ajax: '1',
token: '',
ftype: 'mp4',
fquality: 360
})
.then(res => res.json())
.then(res => {
let KB = parseFloat(filesize) * (1000 * /MB$/.test(filesize))
resolve({
dl_link: / FBDOWN
const fbDown = async (fbLink) => {
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'X-Requested-With': "XMLHttpRequest",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
const res = await post('https://saveas.co/system/action.php', {
url: fbLink,
token: ''
})
const mela = await res.json()
const hasil = []
let judul = mela.title
let source = mela.source
let thumb = mela.thumbnail
let link = mela.links[1].url
let size = mela.links[1].size
let quality = mela.links[1].quality
let type = mela.links[1].type
hasil.push({ judul, source, thumb, link, size, quality, type })
return hasil
}
const lirikLagu = async (query) => {
const res = await axios.get(`https://www.musixmatch.com/search/${query}`)
const sup = cheerio.load(res.data)
const hasil = []
const b = sup('#site').find('div > div > div > div > ul > li:nth-child(1) > div > div > div')
let link = `https://www.musixmatch.com` + sup(b).find('h2 > a').attr('href')
const des = await axios.get(link)
const soup = cheerio.load(des.data)
const result = soup('#site').find('.mxm-lyrics__content > .lyrics__content__ok').text()
hasil.push({ result})
return hasil
}
const newsCnn = async(genre) => {
const res = await axios.get(`https://www.cnnindonesia.com/${genre}`)
const $ = cheerio.load(res.data)
const hasil = []
$('article').each(function(a, b) {
const link = $(b).find('a').attr('href')
const thumb = $(b).find('img').attr('src')
const judul = $(b).find('img').attr('alt')
hasil.push({ judul, link, thumb })
})
return hasil
}
const mediafireDl = async (url) => {
const res = await axios.get(url)
const $ = cheerio.load(res.data)
const hasil = []
const link = $('a#downloadButton').attr('href')
const size = $('a#downloadButton').text().replace('Download', '').replace('(', '').replace(')', '').replace('\n', '').replace('\n', '').replace('', '')
const seplit = link.split('/')
const nama = seplit[5]
mime = nama.split('.')
mime = mime[1]
hasil.push({ nama, mime, size, link })
return hasil
}
const jadwalSolat = async(tempat) => {
const url = `https://m.dream.co.id/jadwal-salat/${tempat}`
const res = await axios.get(url)
const $ = cheerio.load(res.data)
const a = $('table').find('tbody > tr > td')
hasil = []
const emror = "_[ ! ] Error Daerah Tidak DiTemukan_"
const daerah = url.split('/')[4]
const tanggal = $(a).eq(0).text()
const shubuh = $(a).eq(1).text()
const dzuhur = $(a).eq(2).text()
const ashar = $(a).eq(3).text()
const maghrib = $(a).eq(4).text()
const isya = $(a).eq(5).text()
hasil.push({ daerah, tanggal, shubuh, dzuhur, ashar, maghrib, isya})
return hasil
}
const wikiSearch = async (query) => {
const res = await axios.get(`https://id.m.wikipedia.org/w/index.php?search=${query}`)
const $ = cheerio.load(res.data)
const hasil = []
let wiki = $('#mf-section-0').find('p').text()
let thumb = $('#mf-section-0').find('div > div > a > img').attr('src')
thumb = thumb ? thumb : '//pngimg.com/uploads/wikipedia/wikipedia_PNG35.png'
thumb = 'https:' + thumb
let judul = $('h1#section_0').text()
hasil.push({ wiki, thumb, judul })
return hasil
}
//===> UPLOAD
function upload (media) {
return new Promise(async (resolve, reject) => {
try {
let { ext } = await fromBuffer(media)
console.log('Uploading image to server telegra.ph')
let form = new FormData()
form.append('file', media, 'tmp.' + ext)
await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
.then(res => res.json())
.then(res => {
if (res.error) return reject(res.error)
resolve('https://telegra.ph' + res[0].src)
})
.catch(err => reject(err))
} catch (e) {
return console.log(e)
}
})
}
module.exports = { pinterest, wallpaper, wikimedia, quotesAnime, y2mateA, y2mateV, wikiSearch, jadwalSolat, tiktokDown, igstory, downloadig, mediafireDl, newsCnn, lirikLagu, TiktokDownloader, igDownloader, webp2gifFile, fbDown, fotoIg, videoIg, igdl, aiovideodl, upload, yta, ytv }
================================================
FILE: lib/tictactoe.d.ts
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
export declare class TicTacToe {
/* X PlayerName */
playerX: string;
/* Y PlayerName */
playerY: string;
/* X if true, Y if false */
_currentTurn: boolean;
_x: number;
_y: number;
_turns: number;
constructor(playerX: string, playerY: string);
get board(): number;
turn(player, index: number): boolean;
turn(player, x: number, y: number): boolean;
}
================================================
FILE: lib/tictactoe.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
class TicTacToe {
constructor(playerX = 'x', playerO = 'o') {
this.playerX = playerX
this.playerO = playerO
this._currentTurn = false
this._x = 0
this._o = 0
this.turns = 0
}
get board() {
return this._x | this._o
}
get currentTurn() {
return this._currentTurn ? this.playerO : this.playerX
}
get enemyTurn() {
return this._currentTurn ? this.playerX : this.playerO
}
static check(state) {
for (let combo of [7, 56, 73, 84, 146, 273, 292, 448])
if ((state & combo) === combo)
return !0
return !1
}
/**
* ```js
* TicTacToe.toBinary(1, 2) // 0b010000000
* ```
*/
static toBinary(x = 0, y = 0) {
if (x < 0 || x > 2 || y < 0 || y > 2) throw new Error('invalid position')
return 1 << x + (3 * y)
}
/**
* @param player `0` is `X`, `1` is `O`
*
* - `-3` `Game Ended`
* - `-2` `Invalid`
* - `-1` `Invalid Position`
* - ` 0` `Position Occupied`
* - ` 1` `Sucess`
* @returns {-3|-2|-1|0|1}
*/
turn(player = 0, x = 0, y) {
if (this.board === 511) return -3
let pos = 0
if (y == null) {
if (x < 0 || x > 8) return -1
pos = 1 << x
} else {
if (x < 0 || x > 2 || y < 0 || y > 2) return -1
pos = TicTacToe.toBinary(x, y)
}
if (this._currentTurn ^ player) return -2
if (this.board & pos) return 0
this[this._currentTurn ? '_o' : '_x'] |= pos
this._currentTurn = !this._currentTurn
this.turns++
return 1
}
/**
* @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]}
*/
static render(boardX = 0, boardO = 0) {
let x = parseInt(boardX.toString(2), 4)
let y = parseInt(boardO.toString(2), 4) * 2
return [...(x + y).toString(4).padStart(9, '0')].reverse().map((value, index) => value == 1 ? 'X' : value == 2 ? 'O' : ++index)
}
/**
* @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]}
*/
render() {
return TicTacToe.render(this._x, this._o)
}
get winner() {
let x = TicTacToe.check(this._x)
let o = TicTacToe.check(this._o)
return x ? this.playerX : o ? this.playerO : false
}
}
new TicTacToe().turn
module.exports = TicTacToe
================================================
FILE: lib/tiktok.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const axios = require('axios');
const cheerio = require('cheerio');
async function tiktokDown (Url) {
return new Promise (async (resolve, reject) => {
await axios.request({
url: "https://ttdownloader.com/",
method: "GET",
headers: {
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(respon => {
const $ = cheerio.load(respon.data)
const token = $('#token').attr('value')
axios({
url: "https://ttdownloader.com/req/",
method: "POST",
data: new URLSearchParams(Object.entries({url: Url, format: "", token: token})),
headers: {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9,id;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"cookie": "_ga=GA1.2.1240046717.1620835673; PHPSESSID=i14curq5t8omcljj1hlle52762; popCookie=1; _gid=GA1.2.1936694796.1623913934"
}
}).then(res => {
const ch = cheerio.load(res.data)
var creator = `lala`
const result = {
status: res.status,
author: `${creator}`,
result: {
nowatermark: ch('#results-list > div:nth-child(2)').find('div.download > a').attr('href'),
watermark: ch('#results-list > div:nth-child(3)').find('div.download > a').attr('href'),
audio: ch('#results-list > div:nth-child(4)').find(' div.download > a').attr('href')
}
}
resolve(result)
}).catch(reject)
}).catch(reject)
})
}
module.exports = { tiktokDown}
================================================
FILE: lib/uploader.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
let axios = require('axios')
let BodyForm = require('form-data')
let { fromBuffer } = require('file-type')
let fetch = require('node-fetch')
let fs = require('fs')
let cheerio = require('cheerio')
function TelegraPh (Path) {
return new Promise (async (resolve, reject) => {
if (!fs.existsSync(Path)) return reject(new Error("File not Found"))
try {
const form = new BodyForm();
form.append("file", fs.createReadStream(Path))
const data = await axios({
url: "https://telegra.ph/upload",
method: "POST",
headers: {
...form.getHeaders()
},
data: form
})
return resolve("https://telegra.ph" + data.data[0].src)
} catch (err) {
return reject(new Error(String(err)))
}
})
}
async function UploadFileUgu (input) {
return new Promise (async (resolve, reject) => {
const form = new BodyForm();
form.append("files[]", fs.createReadStream(input))
await axios({
url: "https://uguu.se/upload.php",
method: "POST",
headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
...form.getHeaders()
},
data: form
}).then((data) => {
resolve(data.data.files[0])
}).catch((err) => reject(err))
})
}
function webp2mp4File(path) {
return new Promise((resolve, reject) => {
const form = new BodyForm()
form.append('new-image-url', '')
form.append('new-image', fs.createReadStream(path))
axios({
method: 'post',
url: 'https://s6.ezgif.com/webp-to-mp4',
data: form,
headers: {
'Content-Type': `multipart/form-data; boundary=${form._boundary}`
}
}).then(({ data }) => {
const bodyFormThen = new BodyForm()
const $ = cheerio.load(data)
const file = $('input[name="file"]').attr('value')
bodyFormThen.append('file', file)
bodyFormThen.append('convert', "Convert WebP to MP4!")
axios({
method: 'post',
url: 'https://ezgif.com/webp-to-mp4/' + file,
data: bodyFormThen,
headers: {
'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}`
}
}).then(({ data }) => {
const $ = cheerio.load(data)
const result = 'https:' + $('div#output > p.outfile > video > source').attr('src')
resolve({
status: true,
message: "Created By MRHRTZ",
result: result
})
}).catch(reject)
}).catch(reject)
})
}
module.exports = { TelegraPh, UploadFileUgu, webp2mp4File }
================================================
FILE: lib/y2mate.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
let fetch = require('node-fetch')
let { JSDOM } = require('jsdom')
function post(url, formdata) {
return fetch(url, {
method: 'POST',
headers: {
accept: "*/*",
'accept-language': "en-US,en;q=0.9",
'content-type': "application/x-www-form-urlencoded; charset=UTF-8"
},
body: new URLSearchParams(Object.entries(formdata))
})
}
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:shorts\/)?(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
/**
* Download YouTube Video via y2mate
* @param {String} url YouTube Video URL
* @param {String} quality (avaiable: `144p`, `240p`, `360p`, `480p`, `720p`, `1080p`, `1440p`, `2160p`)
* @param {String} type (avaiable: `mp3`, `mp4`)
* @param {String} bitrate (avaiable for video: `144`, `240`, `360`, `480`, `720`, `1080`, `1440`, `2160`)
* (avaiable for audio: `128`)
* @param {String} server (avaiable: `id4`, `en60`, `en61`, `en68`)
*/
async function yt(url, quality, type, bitrate, server = 'en68') {
if (!ytIdRegex.test(url)) throw 'Invalid URL'
let ytId = ytIdRegex.exec(url)
url = 'https://youtu.be/' + ytId[1]
let res = await post(`https://www.y2mate.com/mates/${server}/analyze/ajax`, {
url,
q_auto: 0,
ajax: 1
})
let json = await res.json()
let { document } = (new JSDOM(json.result)).window
let tables = document.querySelectorAll('table')
let table = tables[{ mp4: 0, mp3: 1 }[type] || 0]
let list
switch (type) {
case 'mp4':
list = Object.fromEntries([...table.querySelectorAll('td > a[href="#"]')].filter(v => !/\.3gp/.test(v.innerHTML)).map(v => [v.innerHTML.match(/.*?(?=\()/)[0].trim(), v.parentElement.nextSibling.nextSibling.innerHTML]))
break
case 'mp3':
list = {
'128kbps': table.querySelector('td > a[href="#"]').parentElement.nextSibling.nextSibling.innerHTML
}
break
default:
list = {}
}
let filesize = list[quality]
let id = /var k__id = "(.*?)"/.exec(document.body.innerHTML) || ['', '']
let thumb = document.querySelector('img').src
let title = document.querySelector('b').innerHTML
let res2 = await post(`https://www.y2mate.com/mates/${server}/convert`, {
type: 'youtube',
_id: id[1],
v_id: ytId[1],
ajax: '1',
token: '',
ftype: type,
fquality: bitrate
})
let json2 = await res2.json()
let KB = parseFloat(filesize) * (1000 * /MB$/.test(filesize))
return {
dl_link: / {
const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/
if (ytIdRegex.test(link)) {
let url = ytIdRegex.exec(link)
let config = {
'url': 'https://www.youtube.be/' + url,
'q_auto': 0,
'ajax': 1
}
let headerss = {
"sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"Cookie": 'PHPSESSID=6jo2ggb63g5mjvgj45f612ogt7; _ga=GA1.2.405896420.1625200423; _gid=GA1.2.2135261581.1625200423; _PN_SBSCRBR_FALLBACK_DENIED=1625200785624; MarketGidStorage={"0":{},"C702514":{"page":5,"time":1625200846733}}'
}
axios('https://www.y2mate.com/mates/en68/analyze/ajax',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: headerss
})
.then(({ data }) => {
const $ = cheerio.load(data.result)
let img = $('div.thumbnail.cover > a > img').attr('src');
let title = $('div.thumbnail.cover > div > b').text();
let size = $('#mp4 > table > tbody > tr:nth-child(3) > td:nth-child(2)').text()
let size_mp3 = $('#audio > table > tbody > tr:nth-child(1) > td:nth-child(2)').text()
let id = /var k__id = "(.*?)"/.exec(data.result)[1]
let configs = {
type: 'youtube',
_id: id,
v_id: url[1],
ajax: '1',
token: '',
ftype: 'mp4',
fquality: 480
}
axios('https://www.y2mate.com/mates/en68/convert',{
method: 'POST',
data: new URLSearchParams(Object.entries(configs)),
headers: headerss
})
.then(({data}) => {
const $ = cheerio.load(data.result)
let link = $('div > a').attr('href')
let configss = {
type: 'youtube',
_id: id,
v_id: url[1],
ajax: '1',
token: '',
ftype: 'mp3',
fquality: 128
}
axios('https://www.y2mate.com/mates/en68/convert',{
method: 'POST',
data: new URLSearchParams(Object.entries(configss)),
headers: headerss
})
.then(({ data }) => {
const $ = cheerio.load(data.result)
let audio = $('div > a').attr('href')
resolve({
id: url[1],
title: title,
size: size,
quality: '480p',
thumb: img,
link: link,
size_mp3: size_mp3,
mp3: audio
})
})
})
})
.catch(reject)
}else reject('link invalid')
})
}
function searchResult(query) {
return new Promise(async (resolve, reject) => {
try {
let ytMusic = await ytM.searchMusics(query || this.query);
let result = []
for (let i = 0; i < ytMusic.length; i++) {
result.push({
isYtMusic: true,
title: `${ytMusic[i].title} - ${ytMusic[i].artists.map(x => x.name).join(' ')}`,
artist: ytMusic[i].artists.map(x => x.name).join(' '),
id: ytMusic[i].youtubeId,
url: 'https://youtu.be/' + ytMusic[i].youtubeId,
album: ytMusic[i].album,
duration: {
seconds: ytMusic[i].duration.totalSeconds,
label: ytMusic[i].duration.label
},
image: ytMusic[i].thumbnailUrl.replace('w120-h120', 'w600-h600')
})
}
resolve(result)
} catch (error) {
reject(error)
}
})
}
module.exports.searchResult = searchResult,
module.exports.youtube = youtube
================================================
FILE: lib/ytdl2.js
================================================
const ytdl = require('youtubedl-core');
const yts = require('youtube-yts');
const readline = require('readline');
const ffmpeg = require('fluent-ffmpeg')
const NodeID3 = require('node-id3')
const fs = require('fs');
const { fetchBuffer } = require("./myfunc2")
const ytM = require('node-youtube-music')
const { randomBytes } = require('crypto')
const ytIdRegex = /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/
class YT {
constructor() { }
/**
* Checks if it is yt link
* @param {string|URL} url youtube url
* @returns Returns true if the given YouTube URL.
*/
static isYTUrl = (url) => {
return ytIdRegex.test(url)
}
/**
* VideoID from url
* @param {string|URL} url to get videoID
* @returns
*/
static getVideoID = (url) => {
if (!this.isYTUrl(url)) throw new Error('is not YouTube URL')
return ytIdRegex.exec(url)[1]
}
/**
* @typedef {Object} IMetadata
* @property {string} Title track title
* @property {string} Artist track Artist
* @property {string} Image track thumbnail url
* @property {string} Album track album
* @property {string} Year track release date
*/
/**
* Write Track Tag Metadata
* @param {string} filePath
* @param {IMetadata} Metadata
*/
static WriteTags = async (filePath, Metadata) => {
NodeID3.write(
{
title: Metadata.Title,
artist: Metadata.Artist,
originalArtist: Metadata.Artist,
image: {
mime: 'jpeg',
type: {
id: 3,
name: 'front cover',
},
imageBuffer: (await fetchBuffer(Metadata.Image)).buffer,
description: `Cover of ${Metadata.Title}`,
},
album: Metadata.Album,
year: Metadata.Year || ''
},
filePath
);
}
/**
*
* @param {string} query
* @returns
*/
static search = async (query, options = {}) => {
const search = await yts.search({ query, hl: 'id', gl: 'ID', ...options })
return search.videos
}
/**
* @typedef {Object} TrackSearchResult
* @property {boolean} isYtMusic is from YT Music search?
* @property {string} title music title
* @property {string} artist music artist
* @property {string} id YouTube ID
* @property {string} url YouTube URL
* @property {string} album music album
* @property {Object} duration music duration {seconds, label}
* @property {string} image Cover Art
*/
/**
* search track with details
* @param {string} query
* @returns {Promise}
*/
static searchTrack = (query) => {
return new Promise(async (resolve, reject) => {
try {
let ytMusic = await ytM.searchMusics(query);
let result = []
for (let i = 0; i < ytMusic.length; i++) {
result.push({
isYtMusic: true,
title: `${ytMusic[i].title} - ${ytMusic[i].artists.map(x => x.name).join(' ')}`,
artist: ytMusic[i].artists.map(x => x.name).join(' '),
id: ytMusic[i].youtubeId,
url: 'https://youtu.be/' + ytMusic[i].youtubeId,
album: ytMusic[i].album,
duration: {
seconds: ytMusic[i].duration.totalSeconds,
label: ytMusic[i].duration.label
},
image: ytMusic[i].thumbnailUrl.replace('w120-h120', 'w600-h600')
})
}
resolve(result)
} catch (error) {
reject(error)
}
})
}
/**
* @typedef {Object} MusicResult
* @property {TrackSearchResult} meta music meta
* @property {string} path file path
*/
/**
* Download music with full tag metadata
* @param {string|TrackSearchResult[]} query title of track want to download
* @returns {Promise} filepath of the result
*/
static downloadMusic = async (query) => {
try {
const getTrack = Array.isArray(query) ? query : await this.searchTrack(query);
const search = getTrack[0]//await this.searchTrack(query)
const videoInfo = await ytdl.getInfo('https://www.youtube.com/watch?v=' + search.id, { lang: 'id' });
let stream = ytdl(search.id, { filter: 'audioonly', quality: 140 });
let songPath = `./Zimbot/${randomBytes(3).toString('hex')}.mp3`
stream.on('error', (err) => console.log(err))
const file = await new Promise((resolve) => {
ffmpeg(stream)
.audioFrequency(44100)
.audioChannels(2)
.audioBitrate(128)
.audioCodec('libmp3lame')
.audioQuality(5)
.toFormat('mp3')
.save(songPath)
.on('end', () => resolve(songPath))
});
await this.WriteTags(file, { Title: search.title, Artist: search.artist, Image: search.image, Album: search.album, Year: videoInfo.videoDetails.publishDate.split('-')[0] });
return {
meta: search,
path: file,
size: fs.statSync(songPath).size
}
} catch (error) {
throw new Error(error)
}
}
/**
* get downloadable video urls
* @param {string|URL} query videoID or YouTube URL
* @param {string} quality
* @returns
*/
static mp4 = async (query, quality = 134) => {
try {
if (!query) throw new Error('Video ID or YouTube Url is required')
const videoId = this.isYTUrl(query) ? this.getVideoID(query) : query
const videoInfo = await ytdl.getInfo('https://www.youtube.com/watch?v=' + videoId, { lang: 'id' });
const format = ytdl.chooseFormat(videoInfo.formats, { format: quality, filter: 'videoandaudio' })
return {
title: videoInfo.videoDetails.title,
thumb: videoInfo.videoDetails.thumbnails.slice(-1)[0],
date: videoInfo.videoDetails.publishDate,
duration: videoInfo.videoDetails.lengthSeconds,
channel: videoInfo.videoDetails.ownerChannelName,
quality: format.qualityLabel,
contentLength: format.contentLength,
description:videoInfo.videoDetails.description,
videoUrl: format.url
}
} catch (error) {
throw error
}
}
/**
* Download YouTube to mp3
* @param {string|URL} url YouTube link want to download to mp3
* @param {IMetadata} metadata track metadata
* @param {boolean} autoWriteTags if set true, it will auto write tags meta following the YouTube info
* @returns
*/
static mp3 = async (url, metadata = {}, autoWriteTags = false) => {
try {
if (!url) throw new Error('Video ID or YouTube Url is required')
url = this.isYTUrl(url) ? 'https://www.youtube.com/watch?v=' + this.getVideoID(url) : url
const { videoDetails } = await ytdl.getInfo(url, { lang: 'id' });
let stream = ytdl(url, { filter: 'audioonly', quality: 140 });
let songPath = `./Zimbot/${randomBytes(3).toString('hex')}.mp3`
let starttime;
stream.once('response', () => {
starttime = Date.now();
});
stream.on('progress', (chunkLength, downloaded, total) => {
const percent = downloaded / total;
const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;
const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;
readline.cursorTo(process.stdout, 0);
process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);
process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);
process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);
process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);
readline.moveCursor(process.stdout, 0, -1);
//let txt = `${bgColor(color('[FFMPEG]]', 'black'), '#38ef7d')} ${color(moment().format('DD/MM/YY HH:mm:ss'), '#A1FFCE')} ${gradient.summer('[Converting..]')} ${gradient.cristal(p.targetSize)} kb`
});
stream.on('end', () => process.stdout.write('\n\n'));
stream.on('error', (err) => console.log(err))
const file = await new Promise((resolve) => {
ffmpeg(stream)
.audioFrequency(44100)
.audioChannels(2)
.audioBitrate(128)
.audioCodec('libmp3lame')
.audioQuality(5)
.toFormat('mp3')
.save(songPath)
.on('end', () => {
resolve(songPath)
})
});
if (Object.keys(metadata).length !== 0) {
await this.WriteTags(file, metadata)
}
if (autoWriteTags) {
await this.WriteTags(file, { Title: videoDetails.title, Album: videoDetails.author.name, Year: videoDetails.publishDate.split('-')[0], Image: videoDetails.thumbnails.slice(-1)[0].url })
}
return {
meta: {
title: videoDetails.title,
channel: videoDetails.author.name,
seconds: videoDetails.lengthSeconds,
image: videoDetails.thumbnails.slice(-1)[0].url
},
path: file,
size: fs.statSync(songPath).size
}
} catch (error) {
throw error
}
}
}
module.exports = YT;
================================================
FILE: lib/zimbot
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
================================================
FILE: limit.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
exports.isLimit = function(sender, isPremium, isOwner, limitCount, _db){
if (isOwner) return false
if (isPremium) return false
let found = false
for (let i of _db) {
if (i.id === sender) {
let limits = i.limit
if (limits >= limitCount) {
found = true
return true
} else {
found = true
return false
}
}
}
if (found === false) {
const obj = { id: sender, limit: 0 }
_db.push(obj)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
return false
}
}
exports.limitAdd = function(sender, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
_db[found].limit += 1
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.getLimit = function(sender, limitCount, _db){
let found = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
found = i
}
})
if (found !== false) {
return limitCount - _db[found].limit
} else {
return limitCount
}
}
exports.giveLimit = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].limit -= duit
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
} else {
const njt = duit - duit - duit
const bulim = ({
id: pemain,
limit: njt
})
_db.push(bulim)
fs.writeFileSync('./database/limit.json', JSON.stringify(_db))
}
}
exports.addBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance += duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
} else {
const bulin = ({
id: sender,
balance: duit
})
_db.push(bulin)
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.kurangBalance = function(sender, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
_db[position].balance -= duit
fs.writeFileSync('./database/balance.json', JSON.stringify(_db))
}
}
exports.getBalance = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].balance
} else {
return 0
}
}
exports.isGame = function(sender, isOwner, gcount, _db){
if (isOwner) {return false;}
let found = false;
for (let i of _db){
if(i.id === sender){
let limits = i.glimit;
if (limits >= gcount) {
found = true;
return true;
}else{
found = true;
return false;
}
}
}
if (found === false){
let obj = {id: sender, glimit:0};
_db.push(obj);
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
return false;
}
}
exports.gameAdd = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].glimit += 1;
fs.writeFileSync('./database/glimit.json',JSON.stringify(_db));
}
}
exports.givegame = function(pemain, duit, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === pemain) {
position = i
}
})
if (position !== false) {
_db[position].glimit -= duit
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
} else {
const njti = duit - duit - duit
const bulimi = ({
id: pemain,
glimit: njti
})
_db.push(bulimi)
fs.writeFileSync('./database/glimit.json', JSON.stringify(_db))
}
}
exports.cekGLimit = function(sender, gcount, _db){
let position = false
Object.keys(_db).forEach((i) => {
if(_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return gcount - _db[position].glimit
} else {
return gcount
}
}
exports.createHit = function(sender, _db){
const anohoh = { id: sender, hit: 0}
_db.push(anohoh);
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));''
}
exports.AddHit = function(sender, _db){
var found = false;
Object.keys(_db).forEach((i) => {
if(_db[i].id == sender){
found = i
}
})
if (found !== false) {
_db[found].hit += 1;
fs.writeFileSync('./database/userhit.json',JSON.stringify(_db));
}
}
exports.gethitUser = function(sender, _db){
let position = false
Object.keys(_db).forEach((i) => {
if (_db[i].id === sender) {
position = i
}
})
if (position !== false) {
return _db[position].hit
}
}
================================================
FILE: package.json
================================================
{
"name": "zimbot-v4",
"version": "4.0.1",
"description": "Multi device wa bot created by Zim Bot Inc.",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"start": "node --expose-gc index.js"
},
"keywords": [
"termux",
"whatsapp",
"2021",
"wabase-md",
"base",
"baileys-md",
"bot",
"bot-md",
"multi-device"
],
"author": "Drips",
"license": "MIT",
"dependencies": {
"@adiwajshing/baileys": "^5.0.0",
"@adiwajshing/keyed-db": "^0.2.4",
"@bochilteam/scraper": "^2.0.0",
"@mozilla/readability": "^0.4.2",
"@neoxr/neoxr-js": "^1.3.0",
"anime-wallpaper": "^1.0.2",
"anime-wallpapers": "^1.0.1",
"assert": "2.0.0",
"awesome-phonenumber": "^2.64.0",
"axios": "^0.24.0",
"blennie-drips": "^5.0.0",
"browser-id3-writer": "^4.4.0",
"cfonts": "^3.1.0",
"chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
"child_process": "^1.0.2",
"crypto": "^1.0.1",
"dotenv": "^16.0.0",
"drips-memes": "^6.0.4",
"emoji-api": "^2.0.1",
"express": "^4.18.2",
"fake-useragent": "^1.0.1",
"file-type": "^16.5.3",
"fluent-ffmpeg": "^2.1.2",
"fs": "0.0.1-security",
"g-i-s": "^2.1.6",
"google-it": "^1.6.2",
"got": "^11.8.3",
"heroku-client": "^3.1.0",
"heroku-keep-awake": "^1.1.2",
"http": "^0.0.1-security",
"https": "^1.0.0",
"human-readable": "^0.2.1",
"hx-api": "^1.3.2",
"hxz-api": "^1.0.1",
"insta-fetcher": "^1.3.24",
"jimp": "^0.16.1",
"jsdom": "^16.7.0",
"kitsune-api": "^0.0.0",
"link-preview-js": "^3.0.4",
"mathjs": "^10.5.1",
"moment-timezone": "^0.5.34",
"mumaker": "^1.0.0",
"multistream": "^4.1.0",
"newsapi": "^2.4.1",
"node-cron": "^3.0.0",
"node-fetch": "^2.6.1",
"node-id3": "^0.2.3",
"node-webpmux": "^3.1.0",
"node-youtube-music": "^0.8.3",
"openai": "^3.1.0",
"os": "^0.1.2",
"path": "^0.12.7",
"perf_hooks": "0.0.1",
"pg": "^8.7.3",
"pino": "^7.0.5",
"qrcode-terminal": "^0.12.0",
"remove.bg": "^1.3.0",
"request": "^2.88.2",
"scrape-primbon": "^1.1.0",
"sequelize": "^6.19.0",
"simple-git": "^3.7.1",
"sqlite": "^4.1.1",
"sqlite3": "^5.0.8",
"supervisor": "^0.12.0",
"url": "^0.11.0",
"util": "^0.12.4",
"yargs": "^17.2.1",
"yt-search": "^2.10.3",
"youtube-yts": "^2.0.0",
"youtubedl-core": "^4.11.2"
},
"directories": {
"lib": "lib"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zim-bot/zimbot-v4.git"
},
"bugs": {
"url": "https://github.com/zim-bot/zimbot-v4/issues"
},
"homepage": "https://github.com/zim-bot/zimbot-v4#readme"
}
================================================
FILE: plugins/converter.js
================================================
const { promises } = require('fs')
const { join } = require('path')
const { spawn } = require('child_process')
function ffmpeg(buffer, args = [], ext = '', ext2 = '') {
return new Promise(async (resolve, reject) => {
try {
let tmp = join(global.__dirname(import.meta.url), '../tmp', + new Date + '.' + ext)
let out = tmp + '.' + ext2
await promises.writeFile(tmp, buffer)
spawn('ffmpeg', [
'-y',
'-i', tmp,
...args,
out
])
.on('error', reject)
.on('close', async (code) => {
try {
await promises.unlink(tmp)
if (code !== 0) return reject(code)
resolve({
data: await promises.readFile(out),
filename: out,
delete() {
return promises.unlink(out)
}
})
} catch (e) {
reject(e)
}
})
} catch (e) {
reject(e)
}
})
}
/**
* Convert Audio to Playable WhatsApp Audio
* @param {Buffer} buffer Audio Buffer
* @param {String} ext File Extension
* @returns {Promise<{data: Buffer, filename: String, delete: Function}>}
*/
function toPTT(buffer, ext) {
return ffmpeg(buffer, [
'-vn',
'-c:a', 'libopus',
'-b:a', '128k',
'-vbr', 'on',
], ext, 'ogg')
}
/**
* Convert Audio to Playable WhatsApp PTT
* @param {Buffer} buffer Audio Buffer
* @param {String} ext File Extension
* @returns {Promise<{data: Buffer, filename: String, delete: Function}>}
*/
function toAudio(buffer, ext) {
return ffmpeg(buffer, [
'-vn',
'-c:a', 'libopus',
'-b:a', '128k',
'-vbr', 'on',
'-compression_level', '10'
], ext, 'opus')
}
/**
* Convert Audio to Playable WhatsApp Video
* @param {Buffer} buffer Video Buffer
* @param {String} ext File Extension
* @returns {Promise<{data: Buffer, filename: String, delete: Function}>}
*/
function toVideo(buffer, ext) {
return ffmpeg(buffer, [
'-c:v', 'libx264',
'-c:a', 'aac',
'-ab', '128k',
'-ar', '44100',
'-crf', '32',
'-preset', 'slow'
], ext, 'mp4')
}
module.exports {
toAudio,
toPTT,
toVideo,
ffmpeg,
}
================================================
FILE: plugins/neoxrApi.js
================================================
const { Function: Func } = new(require('blennie-drips'))
module.exports = class NeoxrApi {
baseUrl = 'https://api.neoxr.my.id/api'
apiKey = null
constructor(apiKey) {
this.apiKey = apiKey || ''
}
check = async () => {
let json = await Func.fetchJson(this.baseUrl + '/check/' + this.apiKey)
return json
}
podcast = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/podcast?url=' + url + '&apikey=' + this.apiKey)
return json
}
fb = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/fb?url=' + encodeURIComponent(url) + '&apikey=' + this.apiKey)
return json
}
ig = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/ig?url=' + url + '&apikey=' + this.apiKey)
return json
}
igs = async (str) => {
let json = await Func.fetchJson(this.baseUrl + '/igstory?username=' + str + '&apikey=' + this.apiKey)
return json
}
igh = async (str) => {
let json = await Func.fetchJson(this.baseUrl + '/igh?url=' + str + '&apikey=' + this.apiKey)
return json
}
line = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/line?url=' + url + '&apikey=' + this.apiKey)
return json
}
pin = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/pin?url=' + url + '&apikey=' + this.apiKey)
return json
}
mediafire = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/mediafire?url=' + url + '&apikey=' + this.apiKey)
return json
}
tiktok = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/tiktok?url=' + url + '&apikey=' + this.apiKey)
return json
}
twitter = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/twitter?url=' + url + '&apikey=' + this.apiKey)
return json
}
soundcloud = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/soundcloud?url=' + url + '&apikey=' + this.apiKey)
return json
}
rexdl = async (str) => {
let json = str.match('rexdl.com') ? await Func.fetchJson(this.baseUrl + '/rexdl-get?url=' + str + '&apikey=' + this.apiKey) : await Func.fetchJson(this.baseUrl + '/rexdl?q=' + encodeURIComponent(str) + '&apikey=' + this.apiKey)
return json
}
pinterest = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/pinterest?q=' + query + '&apikey=' + this.apiKey)
return json
}
soundcloud = async (str) => {
let json = str.match('soundcloud.com') ? await Func.fetchJson(this.baseUrl + '/soundcloud?url=' + str + '&apikey=' + this.apiKey) : await Func.fetchJson(this.baseUrl + '/soundcloud-search?q=' + str + '&apikey=' + this.apiKey)
return json
}
apk = async (query, no) => {
if (query && no) {
let json = await Func.fetchJson(this.baseUrl + '/apk?q=' + query + '&no=' + no + '&apikey=' + this.apiKey)
return json
} else if (query) {
let json = await Func.fetchJson(this.baseUrl + '/apk?q=' + query + '&apikey=' + this.apiKey)
return json
}
}
apkmod = async (query, no) => {
if (query && no) {
let json = await Func.fetchJson(this.baseUrl + '/apkmod?q=' + query + '&no=' + no + '&apikey=' + this.apiKey)
return json
} else if (query) {
let json = await Func.fetchJson(this.baseUrl + '/apkmod?q=' + query + '&apikey=' + this.apiKey)
return json
}
}
emojimix = async (emoticon) => {
let json = await Func.fetchJson(this.baseUrl + '/emoji?q=' + encodeURI(emoticon) + '&apikey=' + this.apiKey)
return json
}
wallpaper = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/wallpaper2?q=' + query + '&apikey=' + this.apiKey)
return json
}
sticker = async (str) => {
let json = str.match('getstickerpack.com') ? await Func.fetchJson(this.baseUrl + '/sticker-get?url=' + str + '&apikey=' + this.apiKey) : await Func.fetchJson(this.baseUrl + '/sticker?q=' + encodeURIComponent(str) + '&apikey=' + this.apiKey)
return json
}
tm = (style, text) => {
return this.baseUrl + '/' + style + '?text=' + text + '&apikey=' + this.apiKey
}
ie = (style, image) => {
return this.baseUrl + '/effect?style=' + style + '&image=' + image + '&apikey=' + this.apiKey
}
brainly = async (query, lang) => {
let json = await Func.fetchJson(this.baseUrl + '/brainly?q=' + query + '&iso=' + lang + '&apikey=' + this.apiKey)
return json
}
sholat = async (city) => {
let json = await Func.fetchJson(this.baseUrl + '/sholat?q=' + city + '&apikey=' + this.apiKey)
return json
}
kbbg = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/kbbg?q=' + query + '&apikey=' + this.apiKey)
return json
}
chord = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/chord?q=' + query + '&apikey=' + this.apiKey)
return json
}
lyric = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/lyric?q=' + query + '&apikey=' + this.apiKey)
return json
}
igstalk = async (username) => {
let json = await Func.fetchJson(this.baseUrl + '/igstalk?username=' + username + '&apikey=' + this.apiKey)
return json
}
google = async (query, image = false) => {
let json = await Func.fetchJson(this.baseUrl + '/' + (image ? 'goimg' : 'google') + '?q=' + query + '&apikey=' + this.apiKey)
return json
}
gempa = async () => {
let json = await Func.fetchJson(this.baseUrl + '/gempa?apikey=' + this.apiKey)
return json
}
nama = async (query) => {
let json = await Func.fetchJson(this.baseUrl + '/artinama?nama=' + query + '&apikey=' + this.apiKey)
return json
}
nobg = async (image) => {
let json = await Func.fetchJson(this.baseUrl + '/nobg?image=' + image + '&apikey=' + this.apiKey)
return json
}
ocr = async (image) => {
let json = await Func.fetchJson(this.baseUrl + '/ocr?image=' + image + '&apikey=' + this.apiKey)
return json
}
spotify = async (url) => {
let json = await Func.fetchJson(this.baseUrl + '/spotify?url=' + url + '&apikey=' + this.apiKey)
return json
}
}
================================================
FILE: plugins/sticker.js
================================================
const { dirname } = require('path')
const { fileURLToPath } = require('url')
const fs = require('fs')
const path = require('path')
const crypto = require('crypto')
const { ffmpeg } = reuire('./converter.js')
const fluent_ffmpeg = require('fluent-ffmpeg')
const { spawn } = require('child_process')
const uploadFile = require('./uploadFile.js')
const uploadImage = require('./uploadImage.js')
const { fileTypeFromBuffer } = require('file-type')
const webp = require('node-webpmux')
const fetch = require('node-fetch')
const url = require('url');
const parsedUrl = url.parse(import.meta.url);
const tdirname = dirname(fileURLToPath(parsedUrl))
const tmp = path.join(tdirname, '../tmp')
/**
* Image to Sticker
* @param {Buffer} img Image Buffer
* @param {String} url Image URL
*/
function sticker2(img, url) {
return new Promise(async (resolve, reject) => {
try {
if (url) {
let res = await fetch(url)
if (res.status !== 200) throw await res.text()
img = await res.buffer()
}
let inp = path.join(tmp, +new Date + '.jpeg')
await fs.promises.writeFile(inp, img)
let ff = spawn('ffmpeg', [
'-y',
'-i', inp,
'-vf', 'scale=512:512:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=512:512:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1',
'-f', 'png',
'-'
])
ff.on('error', reject)
ff.on('close', async () => {
await fs.promises.unlink(inp)
})
let bufs = []
const [_spawnprocess, ..._spawnargs] = [...(module.exports.support.gm ? ['gm'] : module.exports.magick ? ['magick'] : []), 'convert', 'png:-', 'webp:-']
let im = spawn(_spawnprocess, _spawnargs)
im.on('error', e => conn.reply(m.chat, util.format(e), m))
im.stdout.on('data', chunk => bufs.push(chunk))
ff.stdout.pipe(im.stdin)
im.on('exit', () => {
resolve(Buffer.concat(bufs))
})
} catch (e) {
reject(e)
}
})
}
/**
* Image/Video to Sticker
* @param {Buffer} img Image/Video Buffer
* @param {String} url Image/Video URL
* @param {String} packname EXIF Packname
* @param {String} author EXIF Author
*/
async function sticker3(img, url, packname, author) {
url = url ? url : await uploadFile(img)
let res = await fetch('https://api.xteam.xyz/sticker/wm?' + new URLSearchParams(Object.entries({
url,
packname,
author
})))
return await res.buffer()
}
/**
* Image to Sticker
* @param {Buffer} img Image/Video Buffer
* @param {String} url Image/Video URL
*/
async function sticker4(img, url) {
if (url) {
let res = await fetch(url)
if (res.status !== 200) throw await res.text()
img = await res.buffer()
}
return await ffmpeg(img, [
'-vf', 'scale=512:512:flags=lanczos:force_original_aspect_ratio=decrease,format=rgba,pad=512:512:(ow-iw)/2:(oh-ih)/2:color=#00000000,setsar=1'
], 'jpeg', 'webp')
}
async function sticker5(img, url, packname, author, categories = [''], extra = {}) {
const { Sticker } = await import('wa-sticker-formatter')
const stickerMetadata = {
type: 'default',
pack: packname,
author,
categories,
...extra
}
return (new Sticker(img ? img : url, stickerMetadata)).toBuffer()
}
/**
* Convert using fluent-ffmpeg
* @param {string} img
* @param {string} url
*/
function sticker6(img, url) {
return new Promise(async (resolve, reject) => {
if (url) {
let res = await fetch(url)
if (res.status !== 200) throw await res.text()
img = await res.buffer()
}
const type = await fileTypeFromBuffer(img) || {
mime: 'application/octet-stream',
ext: 'bin'
}
if (type.ext == 'bin') reject(img)
const tmp = path.join(__dirname, `../tmp/${+ new Date()}.${type.ext}`)
const out = path.join(tmp + '.webp')
await fs.promises.writeFile(tmp, img)
// https://github.com/MhankBarBar/termux-wabot/blob/main/index.js#L313#L368
let Fffmpeg = /video/i.test(type.mime) ? fluent_ffmpeg(tmp).inputFormat(type.ext) : fluent_ffmpeg(tmp).input(tmp)
Fffmpeg
.on('error', function (err) {
console.error(err)
fs.promises.unlink(tmp)
reject(img)
})
.on('end', async function () {
fs.promises.unlink(tmp)
resolve(await fs.promises.readFile(out))
})
.addOutputOptions([
`-vcodec`, `libwebp`, `-vf`,
`scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse`
])
.toFormat('webp')
.save(out)
})
}
/**
* Add WhatsApp JSON Exif Metadata
* Taken from https://github.com/pedroslopez/whatsapp-web.js/pull/527/files
* @param {Buffer} webpSticker
* @param {String} packname
* @param {String} author
* @param {String} categories
* @param {Object} extra
* @returns
*/
async function addExif(webpSticker, packname, author, categories = [''], extra = {}) {
const img = new webp.Image();
const stickerPackId = crypto.randomBytes(32).toString('hex');
const json = { 'sticker-pack-id': stickerPackId, 'sticker-pack-name': packname, 'sticker-pack-publisher': author, 'emojis': categories, ...extra };
let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]);
let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8');
let exif = Buffer.concat([exifAttr, jsonBuffer]);
exif.writeUIntLE(jsonBuffer.length, 14, 4);
await img.load(webpSticker)
img.exif = exif
return await img.save(null)
}
/**
* Image/Video to Sticker
* @param {Buffer} img Image/Video Buffer
* @param {String} url Image/Video URL
* @param {...String}
*/
async function sticker(img, url, ...args) {
let lastError, stiker
for (let func of [
sticker3, global.support.ffmpeg && sticker6, sticker5,
global.support.ffmpeg && global.support.ffmpegWebp && sticker4,
global.support.ffmpeg && (global.support.convert || global.support.magick || global.support.gm) && sticker2,
].filter(f => f)) {
try {
stiker = await func(img, url, ...args)
if (stiker.includes('html')) continue
if (stiker.includes('WEBP')) {
try {
return await addExif(stiker, ...args)
} catch (e) {
console.error(e)
return stiker
}
}
throw stiker.toString()
} catch (err) {
lastError = err
continue
}
}
console.error(lastError)
return lastError
}
const support = {
ffmpeg: true,
ffprobe: true,
ffmpegWebp: true,
convert: true,
magick: false,
gm: false,
find: false
}
module.exports = {
sticker,
sticker2,
sticker3,
sticker4,
sticker6,
addExif,
support
}
================================================
FILE: plugins/tiktok.js
================================================
const axios = require("axios");
const cheerio = require("cheerio");
const clean = (data) => {
let regex = /(<([^>]+)>)/gi;
data = data.replace(/(
)/gi, " \n");
return data.replace(regex, "");
};
async function shortener(url) {
return url;
}
exports.Tiktok = async(query) => {
let response = await axios("https://lovetik.com/api/ajax/search", {
method: "POST",
data: new URLSearchParams(Object.entries({ query })),
});
result = {};
result.creator = "YNTKTS";
result.title = clean(response.data.desc);
result.author = clean(response.data.author);
result.nowm = await shortener(
(response.data.links[0].a || "").replace("https", "http")
);
result.watermark = await shortener(
(response.data.links[1].a || "").replace("https", "http")
);
result.audio = await shortener(
(response.data.links[2].a || "").replace("https", "http")
);
result.thumbnail = await shortener(response.data.cover);
return result;
}
================================================
FILE: plugins/uploadFile.js
================================================
const fetch = rewuire('node-fetch')
const { FormData, Blob } = require('formdata-node')
const { fileTypeFromBuffer } = require('file-type')
/**
* Upload epheremal file to file.io
* `Expired in 1 day`
* `100MB Max Filesize`
* @param {Buffer} buffer File Buffer
*/
const fileIO = async buffer => {
const { ext, mime } = await fileTypeFromBuffer(buffer) || {}
let form = new FormData()
const blob = new Blob([buffer.toArrayBuffer()], { type: mime })
form.append('file', blob, 'tmp.' + ext)
let res = await fetch('https://file.io/?expires=1d', { // 1 Day Expiry Date
method: 'POST',
body: form
})
let json = await res.json()
if (!json.success) throw json
return json.link
}
/**
* Upload file to storage.restfulapi.my.id
* @param {Buffer|ReadableStream|(Buffer|ReadableStream)[]} inp File Buffer/Stream or Array of them
* @returns {string|null|(string|null)[]}
*/
const RESTfulAPI = async inp => {
let form = new FormData()
let buffers = inp
if (!Array.isArray(inp)) buffers = [inp]
for (let buffer of buffers) {
const blob = new Blob([buffer.toArrayBuffer()])
form.append('file', blob)
}
let res = await fetch('https://storage.restfulapi.my.id/upload', {
method: 'POST',
body: form
})
let json = await res.text()
try {
json = JSON.parse(json)
if (!Array.isArray(inp)) return json.files[0].url
return json.files.map(res => res.url)
} catch (e) {
throw json
}
}
/**
*
* @param {Buffer} inp
* @returns {Promise}
*/
export default async function (inp) {
let err = false
for (let upload of [RESTfulAPI, fileIO]) {
try {
return await upload(inp)
} catch (e) {
err = e
}
}
if (err) throw err
}
================================================
FILE: plugins/uploadImage.js
================================================
const fetch = require('node-fetch')
const { FormData, Blob } = require('formdata-node')
const { fileTypeFromBuffer } = rquire('file-type')
/**
* Upload image to telegra.ph
* Supported mimetype:
* - `image/jpeg`
* - `image/jpg`
* - `image/png`s
* @param {Buffer} buffer Image Buffer
* @return {Promise}
*/
export default async buffer => {
const { ext, mime } = await fileTypeFromBuffer(buffer)
let form = new FormData()
const blob = new Blob([buffer.toArrayBuffer()], { type: mime })
form.append('file', blob, 'tmp.' + ext)
let res = await fetch('https://telegra.ph/upload', {
method: 'POST',
body: form
})
let img = await res.json()
if (img.error) throw img.error
return 'https://telegra.ph' + img[0].src
}
================================================
FILE: replit
================================================
run = "yarn"
start = "node ."
================================================
FILE: replit.nix
================================================
{ pkgs }: {
deps = [ pkgs.nodejs-16_x
pkgs.nodePackages.typescript-language-server
pkgs.yarn
pkgs.arcan.ffmpeg
pkgs.replitPackages.jest
pkgs.libwebp
pkgs.imagemagick
pkgs.git
];
}
================================================
FILE: rude.json
================================================
["mhata","mhata yamai vako","Dick","dick","rombe","Rombe","dhodhi","Dodhi","Duzvi","Shure","mwana wehure","Mwana wehure","Jende","jende","Cum","cum","Pussy","pussy","Chut","machende","Suck","suck","Scum","scum","Scumbag","sascum","Sex","svira","Svira","Machende","Kusvira","Matinji","dinji","matinji","msunu","kusvira","Fuck you","fuck you","Muroyi","muroyi","Kontol","kontol","Hure","hure","bitch","Bitch","Kushata","Tsvina yemunhu","tsvina yemunhu","Stfu","stfu","Ass","ass","Asshole","asshole","Musatanyoko","mudhidhi","musatanyoko","Fuck","fuck","Motherfucker","beche","motherfucker","mboro","Dako","Mother fucker","mother fucker","Mf","Mboro","mf","mfs","fck","Fuck"]
================================================
FILE: server.js
================================================
const express = require('express')
const server = express()
const fetch = require('node-fetch')
const PORT = process.env.PORT || 3000
server.set('json spaces', 2)
server.get('/', async (req, res) => {
res.json({
online: true,
msg: `Server running with port ${PORT}`,
server: await (await fetch('http://ip-api.com/json')).json()
})
})
server.listen(PORT, () => console.log(`Zim-bot server running with port ${PORT}!`))
================================================
FILE: speed.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import csv
import datetime
import errno
import math
import os
import platform
import re
import signal
import socket
import sys
import threading
import timeit
import xml.parsers.expat
try:
import gzip
GZIP_BASE = gzip.GzipFile
except ImportError:
gzip = None
GZIP_BASE = object
__version__ = '2.1.4b1'
class FakeShutdownEvent(object):
"""Class to fake a threading.Event.isSet so that users of this module
are not required to register their own threading.Event()
"""
@staticmethod
def isSet():
"Dummy method to always return false"""
return False
is_set = isSet
# Some global variables we use
DEBUG = False
_GLOBAL_DEFAULT_TIMEOUT = object()
PY25PLUS = sys.version_info[:2] >= (2, 5)
PY26PLUS = sys.version_info[:2] >= (2, 6)
PY32PLUS = sys.version_info[:2] >= (3, 2)
PY310PLUS = sys.version_info[:2] >= (3, 10)
# Begin import game to handle Python 2 and Python 3
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
json = None
try:
import xml.etree.ElementTree as ET
try:
from xml.etree.ElementTree import _Element as ET_Element
except ImportError:
pass
except ImportError:
from xml.dom import minidom as DOM
from xml.parsers.expat import ExpatError
ET = None
try:
from urllib2 import (urlopen, Request, HTTPError, URLError,
AbstractHTTPHandler, ProxyHandler,
HTTPDefaultErrorHandler, HTTPRedirectHandler,
HTTPErrorProcessor, OpenerDirector)
except ImportError:
from urllib.request import (urlopen, Request, HTTPError, URLError,
AbstractHTTPHandler, ProxyHandler,
HTTPDefaultErrorHandler, HTTPRedirectHandler,
HTTPErrorProcessor, OpenerDirector)
try:
from httplib import HTTPConnection, BadStatusLine
except ImportError:
from http.client import HTTPConnection, BadStatusLine
try:
from httplib import HTTPSConnection
except ImportError:
try:
from http.client import HTTPSConnection
except ImportError:
HTTPSConnection = None
try:
from httplib import FakeSocket
except ImportError:
FakeSocket = None
try:
from Queue import Queue
except ImportError:
from queue import Queue
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
try:
from urlparse import parse_qs
except ImportError:
try:
from urllib.parse import parse_qs
except ImportError:
from cgi import parse_qs
try:
from hashlib import md5
except ImportError:
from md5 import md5
try:
from argparse import ArgumentParser as ArgParser
from argparse import SUPPRESS as ARG_SUPPRESS
PARSER_TYPE_INT = int
PARSER_TYPE_STR = str
PARSER_TYPE_FLOAT = float
except ImportError:
from optparse import OptionParser as ArgParser
from optparse import SUPPRESS_HELP as ARG_SUPPRESS
PARSER_TYPE_INT = 'int'
PARSER_TYPE_STR = 'string'
PARSER_TYPE_FLOAT = 'float'
try:
from cStringIO import StringIO
BytesIO = None
except ImportError:
try:
from StringIO import StringIO
BytesIO = None
except ImportError:
from io import StringIO, BytesIO
try:
import __builtin__
except ImportError:
import builtins
from io import TextIOWrapper, FileIO
class _Py3Utf8Output(TextIOWrapper):
"""UTF-8 encoded wrapper around stdout for py3, to override
ASCII stdout
"""
def __init__(self, f, **kwargs):
buf = FileIO(f.fileno(), 'w')
super(_Py3Utf8Output, self).__init__(
buf,
encoding='utf8',
errors='strict'
)
def write(self, s):
super(_Py3Utf8Output, self).write(s)
self.flush()
_py3_print = getattr(builtins, 'print')
try:
_py3_utf8_stdout = _Py3Utf8Output(sys.stdout)
_py3_utf8_stderr = _Py3Utf8Output(sys.stderr)
except OSError:
# sys.stdout/sys.stderr is not a compatible stdout/stderr object
# just use it and hope things go ok
_py3_utf8_stdout = sys.stdout
_py3_utf8_stderr = sys.stderr
def to_utf8(v):
"""No-op encode to utf-8 for py3"""
return v
def print_(*args, **kwargs):
"""Wrapper function for py3 to print, with a utf-8 encoded stdout"""
if kwargs.get('file') == sys.stderr:
kwargs['file'] = _py3_utf8_stderr
else:
kwargs['file'] = kwargs.get('file', _py3_utf8_stdout)
_py3_print(*args, **kwargs)
else:
del __builtin__
def to_utf8(v):
"""Encode value to utf-8 if possible for py2"""
try:
return v.encode('utf8', 'strict')
except AttributeError:
return v
def print_(*args, **kwargs):
"""The new-style print function for Python 2.4 and 2.5.
Taken from https://pypi.python.org/pypi/six/
Modified to set encoding to UTF-8 always, and to flush after write
"""
fp = kwargs.pop("file", sys.stdout)
if fp is None:
return
def write(data):
if not isinstance(data, basestring):
data = str(data)
# If the file has an encoding, encode unicode with it.
encoding = 'utf8' # Always trust UTF-8 for output
if (isinstance(fp, file) and
isinstance(data, unicode) and
encoding is not None):
errors = getattr(fp, "errors", None)
if errors is None:
errors = "strict"
data = data.encode(encoding, errors)
fp.write(data)
fp.flush()
want_unicode = False
sep = kwargs.pop("sep", None)
if sep is not None:
if isinstance(sep, unicode):
want_unicode = True
elif not isinstance(sep, str):
raise TypeError("sep must be None or a string")
end = kwargs.pop("end", None)
if end is not None:
if isinstance(end, unicode):
want_unicode = True
elif not isinstance(end, str):
raise TypeError("end must be None or a string")
if kwargs:
raise TypeError("invalid keyword arguments to print()")
if not want_unicode:
for arg in args:
if isinstance(arg, unicode):
want_unicode = True
break
if want_unicode:
newline = unicode("\n")
space = unicode(" ")
else:
newline = "\n"
space = " "
if sep is None:
sep = space
if end is None:
end = newline
for i, arg in enumerate(args):
if i:
write(sep)
write(arg)
write(end)
# Exception "constants" to support Python 2 through Python 3
try:
import ssl
try:
CERT_ERROR = (ssl.CertificateError,)
except AttributeError:
CERT_ERROR = tuple()
HTTP_ERRORS = (
(HTTPError, URLError, socket.error, ssl.SSLError, BadStatusLine) +
CERT_ERROR
)
except ImportError:
ssl = None
HTTP_ERRORS = (HTTPError, URLError, socket.error, BadStatusLine)
if PY32PLUS:
etree_iter = ET.Element.iter
elif PY25PLUS:
etree_iter = ET_Element.getiterator
if PY26PLUS:
thread_is_alive = threading.Thread.is_alive
else:
thread_is_alive = threading.Thread.isAlive
def event_is_set(event):
try:
return event.is_set()
except AttributeError:
return event.isSet()
class SpeedtestException(Exception):
"""Base exception for this module"""
class SpeedtestCLIError(SpeedtestException):
"""Generic exception for raising errors during CLI operation"""
class SpeedtestHTTPError(SpeedtestException):
"""Base HTTP exception for this module"""
class SpeedtestConfigError(SpeedtestException):
"""Configuration XML is invalid"""
class SpeedtestServersError(SpeedtestException):
"""Servers XML is invalid"""
class ConfigRetrievalError(SpeedtestHTTPError):
"""Could not retrieve config.php"""
class ServersRetrievalError(SpeedtestHTTPError):
"""Could not retrieve speedtest-servers.php"""
class InvalidServerIDType(SpeedtestException):
"""Server ID used for filtering was not an integer"""
class NoMatchedServers(SpeedtestException):
"""No servers matched when filtering"""
class SpeedtestMiniConnectFailure(SpeedtestException):
"""Could not connect to the provided speedtest mini server"""
class InvalidSpeedtestMiniServer(SpeedtestException):
"""Server provided as a speedtest mini server does not actually appear
to be a speedtest mini server
"""
class ShareResultsConnectFailure(SpeedtestException):
"""Could not connect to speedtest.net API to POST results"""
class ShareResultsSubmitFailure(SpeedtestException):
"""Unable to successfully POST results to speedtest.net API after
connection
"""
class SpeedtestUploadTimeout(SpeedtestException):
"""testlength configuration reached during upload
Used to ensure the upload halts when no additional data should be sent
"""
class SpeedtestBestServerFailure(SpeedtestException):
"""Unable to determine best server"""
class SpeedtestMissingBestServer(SpeedtestException):
"""get_best_server not called or not able to determine best server"""
def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
An host of '' or port 0 tells the OS to use the default.
Largely vendored from Python 2.7, modified to work with Python 2.4
"""
host, port = address
err = None
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket.socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(float(timeout))
if source_address:
sock.bind(source_address)
sock.connect(sa)
return sock
except socket.error:
err = get_exception()
if sock is not None:
sock.close()
if err is not None:
raise err
else:
raise socket.error("getaddrinfo returns an empty list")
class SpeedtestHTTPConnection(HTTPConnection):
"""Custom HTTPConnection to support source_address across
Python 2.4 - Python 3
"""
def __init__(self, *args, **kwargs):
source_address = kwargs.pop('source_address', None)
timeout = kwargs.pop('timeout', 10)
self._tunnel_host = None
HTTPConnection.__init__(self, *args, **kwargs)
self.source_address = source_address
self.timeout = timeout
def connect(self):
"""Connect to the host and port specified in __init__."""
try:
self.sock = socket.create_connection(
(self.host, self.port),
self.timeout,
self.source_address
)
except (AttributeError, TypeError):
self.sock = create_connection(
(self.host, self.port),
self.timeout,
self.source_address
)
if self._tunnel_host:
self._tunnel()
if HTTPSConnection:
class SpeedtestHTTPSConnection(HTTPSConnection):
"""Custom HTTPSConnection to support source_address across
Python 2.4 - Python 3
"""
default_port = 443
def __init__(self, *args, **kwargs):
source_address = kwargs.pop('source_address', None)
timeout = kwargs.pop('timeout', 10)
self._tunnel_host = None
HTTPSConnection.__init__(self, *args, **kwargs)
self.timeout = timeout
self.source_address = source_address
def connect(self):
"Connect to a host on a given (SSL) port."
try:
self.sock = socket.create_connection(
(self.host, self.port),
self.timeout,
self.source_address
)
except (AttributeError, TypeError):
self.sock = create_connection(
(self.host, self.port),
self.timeout,
self.source_address
)
if self._tunnel_host:
self._tunnel()
if ssl:
try:
kwargs = {}
if hasattr(ssl, 'SSLContext'):
if self._tunnel_host:
kwargs['server_hostname'] = self._tunnel_host
else:
kwargs['server_hostname'] = self.host
self.sock = self._context.wrap_socket(self.sock, **kwargs)
except AttributeError:
self.sock = ssl.wrap_socket(self.sock)
try:
self.sock.server_hostname = self.host
except AttributeError:
pass
elif FakeSocket:
# Python 2.4/2.5 support
try:
self.sock = FakeSocket(self.sock, socket.ssl(self.sock))
except AttributeError:
raise SpeedtestException(
'This version of Python does not support HTTPS/SSL '
'functionality'
)
else:
raise SpeedtestException(
'This version of Python does not support HTTPS/SSL '
'functionality'
)
def _build_connection(connection, source_address, timeout, context=None):
"""Cross Python 2.4 - Python 3 callable to build an ``HTTPConnection`` or
``HTTPSConnection`` with the args we need
Called from ``http(s)_open`` methods of ``SpeedtestHTTPHandler`` or
``SpeedtestHTTPSHandler``
"""
def inner(host, **kwargs):
kwargs.update({
'source_address': source_address,
'timeout': timeout
})
if context:
kwargs['context'] = context
return connection(host, **kwargs)
return inner
class SpeedtestHTTPHandler(AbstractHTTPHandler):
"""Custom ``HTTPHandler`` that can build a ``HTTPConnection`` with the
args we need for ``source_address`` and ``timeout``
"""
def __init__(self, debuglevel=0, source_address=None, timeout=10):
AbstractHTTPHandler.__init__(self, debuglevel)
self.source_address = source_address
self.timeout = timeout
def http_open(self, req):
return self.do_open(
_build_connection(
SpeedtestHTTPConnection,
self.source_address,
self.timeout
),
req
)
http_request = AbstractHTTPHandler.do_request_
class SpeedtestHTTPSHandler(AbstractHTTPHandler):
"""Custom ``HTTPSHandler`` that can build a ``HTTPSConnection`` with the
args we need for ``source_address`` and ``timeout``
"""
def __init__(self, debuglevel=0, context=None, source_address=None,
timeout=10):
AbstractHTTPHandler.__init__(self, debuglevel)
self._context = context
self.source_address = source_address
self.timeout = timeout
def https_open(self, req):
return self.do_open(
_build_connection(
SpeedtestHTTPSConnection,
self.source_address,
self.timeout,
context=self._context,
),
req
)
https_request = AbstractHTTPHandler.do_request_
def build_opener(source_address=None, timeout=10):
"""Function similar to ``urllib2.build_opener`` that will build
an ``OpenerDirector`` with the explicit handlers we want,
``source_address`` for binding, ``timeout`` and our custom
`User-Agent`
"""
printer('Timeout set to %d' % timeout, debug=True)
if source_address:
source_address_tuple = (source_address, 0)
printer('Binding to source address: %r' % (source_address_tuple,),
debug=True)
else:
source_address_tuple = None
handlers = [
ProxyHandler(),
SpeedtestHTTPHandler(source_address=source_address_tuple,
timeout=timeout),
SpeedtestHTTPSHandler(source_address=source_address_tuple,
timeout=timeout),
HTTPDefaultErrorHandler(),
HTTPRedirectHandler(),
HTTPErrorProcessor()
]
opener = OpenerDirector()
opener.addheaders = [('User-agent', build_user_agent())]
for handler in handlers:
opener.add_handler(handler)
return opener
class GzipDecodedResponse(GZIP_BASE):
"""A file-like object to decode a response encoded with the gzip
method, as described in RFC 1952.
Largely copied from ``xmlrpclib``/``xmlrpc.client`` and modified
to work for py2.4-py3
"""
def __init__(self, response):
# response doesn't support tell() and read(), required by
# GzipFile
if not gzip:
raise SpeedtestHTTPError('HTTP response body is gzip encoded, '
'but gzip support is not available')
IO = BytesIO or StringIO
self.io = IO()
while 1:
chunk = response.read(1024)
if len(chunk) == 0:
break
self.io.write(chunk)
self.io.seek(0)
gzip.GzipFile.__init__(self, mode='rb', fileobj=self.io)
def close(self):
try:
gzip.GzipFile.close(self)
finally:
self.io.close()
def get_exception():
"""Helper function to work with py2.4-py3 for getting the current
exception in a try/except block
"""
return sys.exc_info()[1]
def distance(origin, destination):
"""Determine distance between 2 sets of [lat,lon] in km"""
lat1, lon1 = origin
lat2, lon2 = destination
radius = 6371 # km
dlat = math.radians(lat2 - lat1)
dlon = math.radians(lon2 - lon1)
a = (math.sin(dlat / 2) * math.sin(dlat / 2) +
math.cos(math.radians(lat1)) *
math.cos(math.radians(lat2)) * math.sin(dlon / 2) *
math.sin(dlon / 2))
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
d = radius * c
return d
def build_user_agent():
"""Build a Mozilla/5.0 compatible User-Agent string"""
ua_tuple = (
'Mozilla/5.0',
'(%s; U; %s; en-us)' % (platform.platform(),
platform.architecture()[0]),
'Python/%s' % platform.python_version(),
'(KHTML, like Gecko)',
'speedtest-cli/%s' % __version__
)
user_agent = ' '.join(ua_tuple)
printer('User-Agent: %s' % user_agent, debug=True)
return user_agent
def build_request(url, data=None, headers=None, bump='0', secure=False):
"""Build a urllib2 request object
This function automatically adds a User-Agent header to all requests
"""
if not headers:
headers = {}
if url[0] == ':':
scheme = ('http', 'https')[bool(secure)]
schemed_url = '%s%s' % (scheme, url)
else:
schemed_url = url
if '?' in url:
delim = '&'
else:
delim = '?'
# WHO YOU GONNA CALL? CACHE BUSTERS!
final_url = '%s%sx=%s.%s' % (schemed_url, delim,
int(timeit.time.time() * 1000),
bump)
headers.update({
'Cache-Control': 'no-cache',
})
printer('%s %s' % (('GET', 'POST')[bool(data)], final_url),
debug=True)
return Request(final_url, data=data, headers=headers)
def catch_request(request, opener=None):
"""Helper function to catch common exceptions encountered when
establishing a connection with a HTTP/HTTPS request
"""
if opener:
_open = opener.open
else:
_open = urlopen
try:
uh = _open(request)
if request.get_full_url() != uh.geturl():
printer('Redirected to %s' % uh.geturl(), debug=True)
return uh, False
except HTTP_ERRORS:
e = get_exception()
return None, e
def get_response_stream(response):
"""Helper function to return either a Gzip reader if
``Content-Encoding`` is ``gzip`` otherwise the response itself
"""
try:
getheader = response.headers.getheader
except AttributeError:
getheader = response.getheader
if getheader('content-encoding') == 'gzip':
return GzipDecodedResponse(response)
return response
def get_attributes_by_tag_name(dom, tag_name):
"""Retrieve an attribute from an XML document and return it in a
consistent format
Only used with xml.dom.minidom, which is likely only to be used
with python versions older than 2.5
"""
elem = dom.getElementsByTagName(tag_name)[0]
return dict(list(elem.attributes.items()))
def print_dots(shutdown_event):
"""Built in callback function used by Thread classes for printing
status
"""
def inner(current, total, start=False, end=False):
if event_is_set(shutdown_event):
return
sys.stdout.write('.')
if current + 1 == total and end is True:
sys.stdout.write('\n')
sys.stdout.flush()
return inner
def do_nothing(*args, **kwargs):
pass
class HTTPDownloader(threading.Thread):
"""Thread class for retrieving a URL"""
def __init__(self, i, request, start, timeout, opener=None,
shutdown_event=None):
threading.Thread.__init__(self)
self.request = request
self.result = [0]
self.starttime = start
self.timeout = timeout
self.i = i
if opener:
self._opener = opener.open
else:
self._opener = urlopen
if shutdown_event:
self._shutdown_event = shutdown_event
else:
self._shutdown_event = FakeShutdownEvent()
def run(self):
try:
if (timeit.default_timer() - self.starttime) <= self.timeout:
f = self._opener(self.request)
while (not event_is_set(self._shutdown_event) and
(timeit.default_timer() - self.starttime) <=
self.timeout):
self.result.append(len(f.read(10240)))
if self.result[-1] == 0:
break
f.close()
except IOError:
pass
except HTTP_ERRORS:
pass
class HTTPUploaderData(object):
"""File like object to improve cutting off the upload once the timeout
has been reached
"""
def __init__(self, length, start, timeout, shutdown_event=None):
self.length = length
self.start = start
self.timeout = timeout
if shutdown_event:
self._shutdown_event = shutdown_event
else:
self._shutdown_event = FakeShutdownEvent()
self._data = None
self.total = [0]
def pre_allocate(self):
chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
multiplier = int(round(int(self.length) / 36.0))
IO = BytesIO or StringIO
try:
self._data = IO(
('content1=%s' %
(chars * multiplier)[0:int(self.length) - 9]
).encode()
)
except MemoryError:
raise SpeedtestCLIError(
'Insufficient memory to pre-allocate upload data. Please '
'use --no-pre-allocate'
)
@property
def data(self):
if not self._data:
self.pre_allocate()
return self._data
def read(self, n=10240):
if ((timeit.default_timer() - self.start) <= self.timeout and
not event_is_set(self._shutdown_event)):
chunk = self.data.read(n)
self.total.append(len(chunk))
return chunk
else:
raise SpeedtestUploadTimeout()
def __len__(self):
return self.length
class HTTPUploader(threading.Thread):
"""Thread class for putting a URL"""
def __init__(self, i, request, start, size, timeout, opener=None,
shutdown_event=None):
threading.Thread.__init__(self)
self.request = request
self.request.data.start = self.starttime = start
self.size = size
self.result = 0
self.timeout = timeout
self.i = i
if opener:
self._opener = opener.open
else:
self._opener = urlopen
if shutdown_event:
self._shutdown_event = shutdown_event
else:
self._shutdown_event = FakeShutdownEvent()
def run(self):
request = self.request
try:
if ((timeit.default_timer() - self.starttime) <= self.timeout and
not event_is_set(self._shutdown_event)):
try:
f = self._opener(request)
except TypeError:
# PY24 expects a string or buffer
# This also causes issues with Ctrl-C, but we will concede
# for the moment that Ctrl-C on PY24 isn't immediate
request = build_request(self.request.get_full_url(),
data=request.data.read(self.size))
f = self._opener(request)
f.read(11)
f.close()
self.result = sum(self.request.data.total)
else:
self.result = 0
except (IOError, SpeedtestUploadTimeout):
self.result = sum(self.request.data.total)
except HTTP_ERRORS:
self.result = 0
class SpeedtestResults(object):
"""Class for holding the results of a speedtest, including:
Download speed
Upload speed
Ping/Latency to test server
Data about server that the test was run against
Additionally this class can return a result data as a dictionary or CSV,
as well as submit a POST of the result data to the speedtest.net API
to get a share results image link.
"""
def __init__(self, download=0, upload=0, ping=0, server=None, client=None,
opener=None, secure=False):
self.download = download
self.upload = upload
self.ping = ping
if server is None:
self.server = {}
else:
self.server = server
self.client = client or {}
self._share = None
self.timestamp = '%sZ' % datetime.datetime.utcnow().isoformat()
self.bytes_received = 0
self.bytes_sent = 0
if opener:
self._opener = opener
else:
self._opener = build_opener()
self._secure = secure
def __repr__(self):
return repr(self.dict())
def share(self):
"""POST data to the speedtest.net API to obtain a share results
link
"""
if self._share:
return self._share
download = int(round(self.download / 1000.0, 0))
ping = int(round(self.ping, 0))
upload = int(round(self.upload / 1000.0, 0))
# Build the request to send results back to speedtest.net
# We use a list instead of a dict because the API expects parameters
# in a certain order
api_data = [
'recommendedserverid=%s' % self.server['id'],
'ping=%s' % ping,
'screenresolution=',
'promo=',
'download=%s' % download,
'screendpi=',
'upload=%s' % upload,
'testmethod=http',
'hash=%s' % md5(('%s-%s-%s-%s' %
(ping, upload, download, '297aae72'))
.encode()).hexdigest(),
'touchscreen=none',
'startmode=pingselect',
'accuracy=1',
'bytesreceived=%s' % self.bytes_received,
'bytessent=%s' % self.bytes_sent,
'serverid=%s' % self.server['id'],
]
headers = {'Referer': 'http://c.speedtest.net/flash/speedtest.swf'}
request = build_request('://www.speedtest.net/api/api.php',
data='&'.join(api_data).encode(),
headers=headers, secure=self._secure)
f, e = catch_request(request, opener=self._opener)
if e:
raise ShareResultsConnectFailure(e)
response = f.read()
code = f.code
f.close()
if int(code) != 200:
raise ShareResultsSubmitFailure('Could not submit results to '
'speedtest.net')
qsargs = parse_qs(response.decode())
resultid = qsargs.get('resultid')
if not resultid or len(resultid) != 1:
raise ShareResultsSubmitFailure('Could not submit results to '
'speedtest.net')
self._share = 'http://www.speedtest.net/result/%s.png' % resultid[0]
return self._share
def dict(self):
"""Return dictionary of result data"""
return {
'download': self.download,
'upload': self.upload,
'ping': self.ping,
'server': self.server,
'timestamp': self.timestamp,
'bytes_sent': self.bytes_sent,
'bytes_received': self.bytes_received,
'share': self._share,
'client': self.client,
}
@staticmethod
def csv_header(delimiter=','):
"""Return CSV Headers"""
row = ['Server ID', 'Sponsor', 'Server Name', 'Timestamp', 'Distance',
'Ping', 'Download', 'Upload', 'Share', 'IP Address']
out = StringIO()
writer = csv.writer(out, delimiter=delimiter, lineterminator='')
writer.writerow([to_utf8(v) for v in row])
return out.getvalue()
def csv(self, delimiter=','):
"""Return data in CSV format"""
data = self.dict()
out = StringIO()
writer = csv.writer(out, delimiter=delimiter, lineterminator='')
row = [data['server']['id'], data['server']['sponsor'],
data['server']['name'], data['timestamp'],
data['server']['d'], data['ping'], data['download'],
data['upload'], self._share or '', self.client['ip']]
writer.writerow([to_utf8(v) for v in row])
return out.getvalue()
def json(self, pretty=False):
"""Return data in JSON format"""
kwargs = {}
if pretty:
kwargs.update({
'indent': 4,
'sort_keys': True
})
return json.dumps(self.dict(), **kwargs)
class Speedtest(object):
"""Class for performing standard speedtest.net testing operations"""
def __init__(self, config=None, source_address=None, timeout=10,
secure=False, shutdown_event=None):
self.config = {}
self._source_address = source_address
self._timeout = timeout
self._opener = build_opener(source_address, timeout)
self._secure = secure
if shutdown_event:
self._shutdown_event = shutdown_event
else:
self._shutdown_event = FakeShutdownEvent()
self.get_config()
if config is not None:
self.config.update(config)
self.servers = {}
self.closest = []
self._best = {}
self.results = SpeedtestResults(
client=self.config['client'],
opener=self._opener,
secure=secure,
)
@property
def best(self):
if not self._best:
self.get_best_server()
return self._best
def get_config(self):
"""Download the speedtest.net configuration and return only the data
we are interested in
"""
headers = {}
if gzip:
headers['Accept-Encoding'] = 'gzip'
request = build_request('://www.speedtest.net/speedtest-config.php',
headers=headers, secure=self._secure)
uh, e = catch_request(request, opener=self._opener)
if e:
raise ConfigRetrievalError(e)
configxml_list = []
stream = get_response_stream(uh)
while 1:
try:
configxml_list.append(stream.read(1024))
except (OSError, EOFError):
raise ConfigRetrievalError(get_exception())
if len(configxml_list[-1]) == 0:
break
stream.close()
uh.close()
if int(uh.code) != 200:
return None
configxml = ''.encode().join(configxml_list)
printer('Config XML:\n%s' % configxml, debug=True)
try:
try:
root = ET.fromstring(configxml)
except ET.ParseError:
e = get_exception()
raise SpeedtestConfigError(
'Malformed speedtest.net configuration: %s' % e
)
server_config = root.find('server-config').attrib
download = root.find('download').attrib
upload = root.find('upload').attrib
# times = root.find('times').attrib
client = root.find('client').attrib
except AttributeError:
try:
root = DOM.parseString(configxml)
except ExpatError:
e = get_exception()
raise SpeedtestConfigError(
'Malformed speedtest.net configuration: %s' % e
)
server_config = get_attributes_by_tag_name(root, 'server-config')
download = get_attributes_by_tag_name(root, 'download')
upload = get_attributes_by_tag_name(root, 'upload')
# times = get_attributes_by_tag_name(root, 'times')
client = get_attributes_by_tag_name(root, 'client')
ignore_servers = [
int(i) for i in server_config['ignoreids'].split(',') if i
]
ratio = int(upload['ratio'])
upload_max = int(upload['maxchunkcount'])
up_sizes = [32768, 65536, 131072, 262144, 524288, 1048576, 7340032]
sizes = {
'upload': up_sizes[ratio - 1:],
'download': [350, 500, 750, 1000, 1500, 2000, 2500,
3000, 3500, 4000]
}
size_count = len(sizes['upload'])
upload_count = int(math.ceil(upload_max / size_count))
counts = {
'upload': upload_count,
'download': int(download['threadsperurl'])
}
threads = {
'upload': int(upload['threads']),
'download': int(server_config['threadcount']) * 2
}
length = {
'upload': int(upload['testlength']),
'download': int(download['testlength'])
}
self.config.update({
'client': client,
'ignore_servers': ignore_servers,
'sizes': sizes,
'counts': counts,
'threads': threads,
'length': length,
'upload_max': upload_count * size_count
})
try:
self.lat_lon = (float(client['lat']), float(client['lon']))
except ValueError:
raise SpeedtestConfigError(
'Unknown location: lat=%r lon=%r' %
(client.get('lat'), client.get('lon'))
)
printer('Config:\n%r' % self.config, debug=True)
return self.config
def get_servers(self, servers=None, exclude=None):
"""Retrieve a the list of speedtest.net servers, optionally filtered
to servers matching those specified in the ``servers`` argument
"""
if servers is None:
servers = []
if exclude is None:
exclude = []
self.servers.clear()
for server_list in (servers, exclude):
for i, s in enumerate(server_list):
try:
server_list[i] = int(s)
except ValueError:
raise InvalidServerIDType(
'%s is an invalid server type, must be int' % s
)
urls = [
'://www.speedtest.net/speedtest-servers-static.php',
'http://c.speedtest.net/speedtest-servers-static.php',
'://www.speedtest.net/speedtest-servers.php',
'http://c.speedtest.net/speedtest-servers.php',
]
headers = {}
if gzip:
headers['Accept-Encoding'] = 'gzip'
errors = []
for url in urls:
try:
request = build_request(
'%s?threads=%s' % (url,
self.config['threads']['download']),
headers=headers,
secure=self._secure
)
uh, e = catch_request(request, opener=self._opener)
if e:
errors.append('%s' % e)
raise ServersRetrievalError()
stream = get_response_stream(uh)
serversxml_list = []
while 1:
try:
serversxml_list.append(stream.read(1024))
except (OSError, EOFError):
raise ServersRetrievalError(get_exception())
if len(serversxml_list[-1]) == 0:
break
stream.close()
uh.close()
if int(uh.code) != 200:
raise ServersRetrievalError()
serversxml = ''.encode().join(serversxml_list)
printer('Servers XML:\n%s' % serversxml, debug=True)
try:
try:
try:
root = ET.fromstring(serversxml)
except ET.ParseError:
e = get_exception()
raise SpeedtestServersError(
'Malformed speedtest.net server list: %s' % e
)
elements = etree_iter(root, 'server')
except AttributeError:
try:
root = DOM.parseString(serversxml)
except ExpatError:
e = get_exception()
raise SpeedtestServersError(
'Malformed speedtest.net server list: %s' % e
)
elements = root.getElementsByTagName('server')
except (SyntaxError, xml.parsers.expat.ExpatError):
raise ServersRetrievalError()
for server in elements:
try:
attrib = server.attrib
except AttributeError:
attrib = dict(list(server.attributes.items()))
if servers and int(attrib.get('id')) not in servers:
continue
if (int(attrib.get('id')) in self.config['ignore_servers']
or int(attrib.get('id')) in exclude):
continue
try:
d = distance(self.lat_lon,
(float(attrib.get('lat')),
float(attrib.get('lon'))))
except Exception:
continue
attrib['d'] = d
try:
self.servers[d].append(attrib)
except KeyError:
self.servers[d] = [attrib]
break
except ServersRetrievalError:
continue
if (servers or exclude) and not self.servers:
raise NoMatchedServers()
return self.servers
def set_mini_server(self, server):
"""Instead of querying for a list of servers, set a link to a
speedtest mini server
"""
urlparts = urlparse(server)
name, ext = os.path.splitext(urlparts[2])
if ext:
url = os.path.dirname(server)
else:
url = server
request = build_request(url)
uh, e = catch_request(request, opener=self._opener)
if e:
raise SpeedtestMiniConnectFailure('Failed to connect to %s' %
server)
else:
text = uh.read()
uh.close()
extension = re.findall('upload_?[Ee]xtension: "([^"]+)"',
text.decode())
if not extension:
for ext in ['php', 'asp', 'aspx', 'jsp']:
try:
f = self._opener.open(
'%s/speedtest/upload.%s' % (url, ext)
)
except Exception:
pass
else:
data = f.read().strip().decode()
if (f.code == 200 and
len(data.splitlines()) == 1 and
re.match('size=[0-9]', data)):
extension = [ext]
break
if not urlparts or not extension:
raise InvalidSpeedtestMiniServer('Invalid Speedtest Mini Server: '
'%s' % server)
self.servers = [{
'sponsor': 'Speedtest Mini',
'name': urlparts[1],
'd': 0,
'url': '%s/speedtest/upload.%s' % (url.rstrip('/'), extension[0]),
'latency': 0,
'id': 0
}]
return self.servers
def get_closest_servers(self, limit=5):
"""Limit servers to the closest speedtest.net servers based on
geographic distance
"""
if not self.servers:
self.get_servers()
for d in sorted(self.servers.keys()):
for s in self.servers[d]:
self.closest.append(s)
if len(self.closest) == limit:
break
else:
continue
break
printer('Closest Servers:\n%r' % self.closest, debug=True)
return self.closest
def get_best_server(self, servers=None):
"""Perform a speedtest.net "ping" to determine which speedtest.net
server has the lowest latency
"""
if not servers:
if not self.closest:
servers = self.get_closest_servers()
servers = self.closest
if self._source_address:
source_address_tuple = (self._source_address, 0)
else:
source_address_tuple = None
user_agent = build_user_agent()
results = {}
for server in servers:
cum = []
url = os.path.dirname(server['url'])
stamp = int(timeit.time.time() * 1000)
latency_url = '%s/latency.txt?x=%s' % (url, stamp)
for i in range(0, 3):
this_latency_url = '%s.%s' % (latency_url, i)
printer('%s %s' % ('GET', this_latency_url),
debug=True)
urlparts = urlparse(latency_url)
try:
if urlparts[0] == 'https':
h = SpeedtestHTTPSConnection(
urlparts[1],
source_address=source_address_tuple
)
else:
h = SpeedtestHTTPConnection(
urlparts[1],
source_address=source_address_tuple
)
headers = {'User-Agent': user_agent}
path = '%s?%s' % (urlparts[2], urlparts[4])
start = timeit.default_timer()
h.request("GET", path, headers=headers)
r = h.getresponse()
total = (timeit.default_timer() - start)
except HTTP_ERRORS:
e = get_exception()
printer('ERROR: %r' % e, debug=True)
cum.append(3600)
continue
text = r.read(9)
if int(r.status) == 200 and text == 'test=test'.encode():
cum.append(total)
else:
cum.append(3600)
h.close()
avg = round((sum(cum) / 6) * 1000.0, 3)
results[avg] = server
try:
fastest = sorted(results.keys())[0]
except IndexError:
raise SpeedtestBestServerFailure('Unable to connect to servers to '
'test latency.')
best = results[fastest]
best['latency'] = fastest
self.results.ping = fastest
self.results.server = best
self._best.update(best)
printer('Best Server:\n%r' % best, debug=True)
return best
def download(self, callback=do_nothing, threads=None):
"""Test download speed against speedtest.net
A ``threads`` value of ``None`` will fall back to those dictated
by the speedtest.net configuration
"""
urls = []
for size in self.config['sizes']['download']:
for _ in range(0, self.config['counts']['download']):
urls.append('%s/random%sx%s.jpg' %
(os.path.dirname(self.best['url']), size, size))
request_count = len(urls)
requests = []
for i, url in enumerate(urls):
requests.append(
build_request(url, bump=i, secure=self._secure)
)
max_threads = threads or self.config['threads']['download']
in_flight = {'threads': 0}
def producer(q, requests, request_count):
for i, request in enumerate(requests):
thread = HTTPDownloader(
i,
request,
start,
self.config['length']['download'],
opener=self._opener,
shutdown_event=self._shutdown_event
)
while in_flight['threads'] >= max_threads:
timeit.time.sleep(0.001)
thread.start()
q.put(thread, True)
in_flight['threads'] += 1
callback(i, request_count, start=True)
finished = []
def consumer(q, request_count):
_is_alive = thread_is_alive
while len(finished) < request_count:
thread = q.get(True)
while _is_alive(thread):
thread.join(timeout=0.001)
in_flight['threads'] -= 1
finished.append(sum(thread.result))
callback(thread.i, request_count, end=True)
q = Queue(max_threads)
prod_thread = threading.Thread(target=producer,
args=(q, requests, request_count))
cons_thread = threading.Thread(target=consumer,
args=(q, request_count))
start = timeit.default_timer()
prod_thread.start()
cons_thread.start()
_is_alive = thread_is_alive
while _is_alive(prod_thread):
prod_thread.join(timeout=0.001)
while _is_alive(cons_thread):
cons_thread.join(timeout=0.001)
stop = timeit.default_timer()
self.results.bytes_received = sum(finished)
self.results.download = (
(self.results.bytes_received / (stop - start)) * 8.0
)
if self.results.download > 100000:
self.config['threads']['upload'] = 8
return self.results.download
def upload(self, callback=do_nothing, pre_allocate=True, threads=None):
"""Test upload speed against speedtest.net
A ``threads`` value of ``None`` will fall back to those dictated
by the speedtest.net configuration
"""
sizes = []
for size in self.config['sizes']['upload']:
for _ in range(0, self.config['counts']['upload']):
sizes.append(size)
# request_count = len(sizes)
request_count = self.config['upload_max']
requests = []
for i, size in enumerate(sizes):
# We set ``0`` for ``start`` and handle setting the actual
# ``start`` in ``HTTPUploader`` to get better measurements
data = HTTPUploaderData(
size,
0,
self.config['length']['upload'],
shutdown_event=self._shutdown_event
)
if pre_allocate:
data.pre_allocate()
headers = {'Content-length': size}
requests.append(
(
build_request(self.best['url'], data, secure=self._secure,
headers=headers),
size
)
)
max_threads = threads or self.config['threads']['upload']
in_flight = {'threads': 0}
def producer(q, requests, request_count):
for i, request in enumerate(requests[:request_count]):
thread = HTTPUploader(
i,
request[0],
start,
request[1],
self.config['length']['upload'],
opener=self._opener,
shutdown_event=self._shutdown_event
)
while in_flight['threads'] >= max_threads:
timeit.time.sleep(0.001)
thread.start()
q.put(thread, True)
in_flight['threads'] += 1
callback(i, request_count, start=True)
finished = []
def consumer(q, request_count):
_is_alive = thread_is_alive
while len(finished) < request_count:
thread = q.get(True)
while _is_alive(thread):
thread.join(timeout=0.001)
in_flight['threads'] -= 1
finished.append(thread.result)
callback(thread.i, request_count, end=True)
q = Queue(threads or self.config['threads']['upload'])
prod_thread = threading.Thread(target=producer,
args=(q, requests, request_count))
cons_thread = threading.Thread(target=consumer,
args=(q, request_count))
start = timeit.default_timer()
prod_thread.start()
cons_thread.start()
_is_alive = thread_is_alive
while _is_alive(prod_thread):
prod_thread.join(timeout=0.1)
while _is_alive(cons_thread):
cons_thread.join(timeout=0.1)
stop = timeit.default_timer()
self.results.bytes_sent = sum(finished)
self.results.upload = (
(self.results.bytes_sent / (stop - start)) * 8.0
)
return self.results.upload
def ctrl_c(shutdown_event):
"""Catch Ctrl-C key sequence and set a SHUTDOWN_EVENT for our threaded
operations
"""
def inner(signum, frame):
shutdown_event.set()
printer('\nCancelling...', error=True)
sys.exit(0)
return inner
def version():
"""Print the version"""
printer('speedtest-cli %s' % __version__)
printer('Python %s' % sys.version.replace('\n', ''))
sys.exit(0)
def csv_header(delimiter=','):
"""Print the CSV Headers"""
printer(SpeedtestResults.csv_header(delimiter=delimiter))
sys.exit(0)
def parse_args():
"""Function to handle building and parsing of command line arguments"""
description = (
'Command line interface for testing internet bandwidth using '
'speedtest.net.\n'
'------------------------------------------------------------'
'--------------\n'
'https://github.com/sivel/speedtest-cli')
parser = ArgParser(description=description)
# Give optparse.OptionParser an `add_argument` method for
# compatibility with argparse.ArgumentParser
try:
parser.add_argument = parser.add_option
except AttributeError:
pass
parser.add_argument('--no-download', dest='download', default=True,
action='store_const', const=False,
help='Do not perform download test')
parser.add_argument('--no-upload', dest='upload', default=True,
action='store_const', const=False,
help='Do not perform upload test')
parser.add_argument('--single', default=False, action='store_true',
help='Only use a single connection instead of '
'multiple. This simulates a typical file '
'transfer.')
parser.add_argument('--bytes', dest='units', action='store_const',
const=('byte', 8), default=('bit', 1),
help='Display values in bytes instead of bits. Does '
'not affect the image generated by --share, nor '
'output from --json or --csv')
parser.add_argument('--share', action='store_true',
help='Generate and provide a URL to the speedtest.net '
'share results image, not displayed with --csv')
parser.add_argument('--simple', action='store_true', default=False,
help='Suppress verbose output, only show basic '
'information')
parser.add_argument('--csv', action='store_true', default=False,
help='Suppress verbose output, only show basic '
'information in CSV format. Speeds listed in '
'bit/s and not affected by --bytes')
parser.add_argument('--csv-delimiter', default=',', type=PARSER_TYPE_STR,
help='Single character delimiter to use in CSV '
'output. Default ","')
parser.add_argument('--csv-header', action='store_true', default=False,
help='Print CSV headers')
parser.add_argument('--json', action='store_true', default=False,
help='Suppress verbose output, only show basic '
'information in JSON format. Speeds listed in '
'bit/s and not affected by --bytes')
parser.add_argument('--list', action='store_true',
help='Display a list of speedtest.net servers '
'sorted by distance')
parser.add_argument('--server', type=PARSER_TYPE_INT, action='append',
help='Specify a server ID to test against. Can be '
'supplied multiple times')
parser.add_argument('--exclude', type=PARSER_TYPE_INT, action='append',
help='Exclude a server from selection. Can be '
'supplied multiple times')
parser.add_argument('--mini', help='URL of the Speedtest Mini server')
parser.add_argument('--source', help='Source IP address to bind to')
parser.add_argument('--timeout', default=10, type=PARSER_TYPE_FLOAT,
help='HTTP timeout in seconds. Default 10')
parser.add_argument('--secure', action='store_true',
help='Use HTTPS instead of HTTP when communicating '
'with speedtest.net operated servers')
parser.add_argument('--no-pre-allocate', dest='pre_allocate',
action='store_const', default=True, const=False,
help='Do not pre allocate upload data. Pre allocation '
'is enabled by default to improve upload '
'performance. To support systems with '
'insufficient memory, use this option to avoid a '
'MemoryError')
parser.add_argument('--version', action='store_true',
help='Show the version number and exit')
parser.add_argument('--debug', action='store_true',
help=ARG_SUPPRESS, default=ARG_SUPPRESS)
options = parser.parse_args()
if isinstance(options, tuple):
args = options[0]
else:
args = options
return args
def validate_optional_args(args):
"""Check if an argument was provided that depends on a module that may
not be part of the Python standard library.
If such an argument is supplied, and the module does not exist, exit
with an error stating which module is missing.
"""
optional_args = {
'json': ('json/simplejson python module', json),
'secure': ('SSL support', HTTPSConnection),
}
for arg, info in optional_args.items():
if getattr(args, arg, False) and info[1] is None:
raise SystemExit('%s is not installed. --%s is '
'unavailable' % (info[0], arg))
def printer(string, quiet=False, debug=False, error=False, **kwargs):
"""Helper function print a string with various features"""
if debug and not DEBUG:
return
if debug:
if sys.stdout.isatty():
out = '\033[1;30mDEBUG: %s\033[0m' % string
else:
out = 'DEBUG: %s' % string
else:
out = string
if error:
kwargs['file'] = sys.stderr
if not quiet:
print_(out, **kwargs)
def shell():
"""Run the full speedtest.net test"""
global DEBUG
shutdown_event = threading.Event()
signal.signal(signal.SIGINT, ctrl_c(shutdown_event))
args = parse_args()
# Print the version and exit
if args.version:
version()
if not args.download and not args.upload:
raise SpeedtestCLIError('Cannot supply both --no-download and '
'--no-upload')
if len(args.csv_delimiter) != 1:
raise SpeedtestCLIError('--csv-delimiter must be a single character')
if args.csv_header:
csv_header(args.csv_delimiter)
validate_optional_args(args)
debug = getattr(args, 'debug', False)
if debug == 'SUPPRESSHELP':
debug = False
if debug:
DEBUG = True
if args.simple or args.csv or args.json:
quiet = True
else:
quiet = False
if args.csv or args.json:
machine_format = True
else:
machine_format = False
# Don't set a callback if we are running quietly
if quiet or debug:
callback = do_nothing
else:
callback = print_dots(shutdown_event)
printer('*• SPEEDTEST.NET*\n\n', quiet)
try:
speedtest = Speedtest(
source_address=args.source,
timeout=args.timeout,
secure=args.secure
)
except (ConfigRetrievalError,) + HTTP_ERRORS:
printer('Cannot retrieve speedtest configuration', error=True)
raise SpeedtestCLIError(get_exception())
if args.list:
try:
speedtest.get_servers()
except (ServersRetrievalError,) + HTTP_ERRORS:
printer('Cannot retrieve speedtest server list', error=True)
raise SpeedtestCLIError(get_exception())
for _, servers in sorted(speedtest.servers.items()):
for server in servers:
line = ('%(id)5s) %(sponsor)s (%(name)s, %(country)s) '
'[%(d)0.2f km]' % server)
try:
printer(line)
except IOError:
e = get_exception()
if e.errno != errno.EPIPE:
raise
sys.exit(0)
printer('Testing from %(isp)s (%(ip)s)...' % speedtest.config['client'],
quiet)
if not args.mini:
printer('Retrieving speedtest.net server list...', quiet)
try:
speedtest.get_servers(servers=args.server, exclude=args.exclude)
except NoMatchedServers:
raise SpeedtestCLIError(
'No matched servers: %s' %
', '.join('%s' % s for s in args.server)
)
except (ServersRetrievalError,) + HTTP_ERRORS:
printer('Cannot retrieve speedtest server list', error=True)
raise SpeedtestCLIError(get_exception())
except InvalidServerIDType:
raise SpeedtestCLIError(
'%s is an invalid server type, must '
'be an int' % ', '.join('%s' % s for s in args.server)
)
if args.server and len(args.server) == 1:
printer('Retrieving information for the selected server...', quiet)
else:
printer('Selecting best server based on ping...', quiet)
speedtest.get_best_server()
elif args.mini:
speedtest.get_best_server(speedtest.set_mini_server(args.mini))
results = speedtest.results
printer('Hosted by %(sponsor)s (%(name)s) [%(d)0.2f km]: '
'%(latency)s ms' % results.server, quiet)
if args.download:
printer('Testing download speed\n', quiet,
end=('', '\n')[bool(debug)])
speedtest.download(
callback=callback,
threads=(None, 1)[args.single]
)
printer('Download: %0.2f M%s/s' %
((results.download / 1000.0 / 1000.0) / args.units[1],
args.units[0]),
quiet)
else:
printer('Skipping download test', quiet)
if args.upload:
printer('Testing upload speed\n', quiet,
end=('', '\n')[bool(debug)])
speedtest.upload(
callback=callback,
pre_allocate=args.pre_allocate,
threads=(None, 1)[args.single]
)
printer('Upload: %0.2f M%s/s' %
((results.upload / 1000.0 / 1000.0) / args.units[1],
args.units[0]),
quiet)
else:
printer('Skipping upload test', quiet)
printer('Results:\n%r' % results.dict(), debug=True)
if not args.simple and args.share:
results.share()
if args.simple:
printer('Ping: %s ms\nDownload: %0.2f M%s/s\nUpload: %0.2f M%s/s' %
(results.ping,
(results.download / 1000.0 / 1000.0) / args.units[1],
args.units[0],
(results.upload / 1000.0 / 1000.0) / args.units[1],
args.units[0]))
elif args.csv:
printer(results.csv(delimiter=args.csv_delimiter))
elif args.json:
printer(results.json())
if args.share and not machine_format:
printer('Share results: %s' % results.share())
def main():
try:
shell()
except KeyboardInterrupt:
printer('\nCancelling...', error=True)
except (SpeedtestException, SystemExit):
e = get_exception()
# Ignore a successful exit, or argparse exit
if getattr(e, 'code', 1) not in (0, 2):
msg = '%s' % e
if not msg:
msg = '%r' % e
raise SystemExit('ERROR: %s' % msg)
if __name__ == '__main__':
main()
================================================
FILE: src/database.json
================================================
{
"sticker": {},
"database": {},
"game": {
"tebaklagu": [],
"family100": [],
"math": [],
"tebakgambar": [],
"tebakkata": [],
"lontong": [],
"lontong_desk": [],
"kalimat": [],
"lirik": [],
"tebakan": []
},
"settings": {
"447441437150@s.whatsapp.net": {
"status": 0,
"autobio": true,
"templateImage": false,
"templateLocation": false,
"templateGif": false,
"templateMsg": false,
"templateList": false,
"templateDoc": false,
"templateZimbot": true,
"chatbot": false,
"grouponly": false,
"autoblock": false
},
"27634090203@s.whatsapp.net": {
"status": 0,
"autobio": true,
"templateImage": false,
"templateLocation": false,
"templateGif": false,
"templateMsg": false,
"templateList": false,
"templateDoc": false,
"templateZimbot": true,
"chatbot": false,
"grouponly": false,
"autoblock": false
}
},
"others": {
"vote": []
},
"users": {
"447441437150@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"918099869761@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27642553046@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"919438269055@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27634090203@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": "Infinity"
},
"6285865567034@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27712133797@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27725085939@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263717436170@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263713525699@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27846142621@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"258844288119@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"258822599632@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"917978711195@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263718794823@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263788872446@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27748187589@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263777767939@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"258863041845@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"6283822892316@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"6282126777639@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263777368790@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263716079900@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263775707580@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"9779803567841@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263719866828@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263771699141@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263782357220@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263716239347@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263771081535@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"212638499105@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"6281392068116@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"6289631095044@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263774636218@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27633473002@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"923474187615@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263780564398@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263714117336@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263773406036@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"2349073821579@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"212644870790@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263718532985@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"918188019676@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"601139986821@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27844564106@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"923111547082@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27746216450@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"919869807953@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27781004118@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263788927268@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263778037716@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263788306844@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"601163820524@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263778814755@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"27651739862@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"255684640070@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"233547283243@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"254768233153@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"6285692573306@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
},
"263714002920@s.whatsapp.net": {
"afkTime": -1,
"afkReason": "",
"limit": 100000
}
},
"chats": {
"447441437150@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"918472856351-1630431464@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363041933152186@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": true,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363038656895036@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"27634090203-1632904922@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"27634090203@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"6288215470534-1600091220@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
},
"120363042048651049@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363040325594192@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363023956460625@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363042454246789@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
},
"258844288119-1622868359@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"27782977157-1618767131@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
},
"254738099457-1594537724@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"263771699141-1613299396@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363041908750970@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363040007582886@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"6283822892316@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"6289665185374-1514810664@g.us": {
"mute": false,
"chatbot": false,
"antilink": false,
"antilinkyt": false,
"autoblock": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"wame": false,
"antitwitter": false,
"antivn": false,
"antiphoto": false,
"antisticker": false,
"antivideo": false
},
"120363039326647607@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"263771774309-1604865550@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"120363045262056237@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"212638499105@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"263713381263@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"923474187615@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
},
"120363022726357621@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"918188019676@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"923111547082@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"27610590754@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false,
"autoblock": false
},
"254792196739-1589641043@g.us": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
},
"6285773305337@s.whatsapp.net": {
"mute": false,
"chatbot": false,
"wame": false,
"antilink": false,
"antilinkyt": false,
"isWelcome": false,
"antilinkall": false,
"antiytchannel": false,
"antitiktok": false,
"antitelegram": false,
"antiinstagram": false,
"antifb": false,
"antibule": false,
"antiwame": false,
"antitwitter": false,
"antisticker": false,
"antiphoto": false,
"antivn": false,
"antivideo": false
}
}
}
================================================
FILE: src/math.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
let modes = {
noob: [-3, 3,-3, 3, '+-', 15000, 10],
easy: [-10, 10, -10, 10, '*/+-', 20000, 40],
medium: [-40, 40, -20, 20, '*/+-', 40000, 150],
hard: [-100, 100, -70, 70, '*/+-', 60000, 350],
extreme: [-999999, 999999, -999999, 999999, '*/', 99999, 9999],
impossible: [-99999999999, 99999999999, -99999999999, 999999999999, '*/', 30000, 35000],
impossible2: [-999999999999999, 999999999999999, -999, 999, '/', 30000, 50000]
}
let operators = {
'+': '+',
'-': '-',
'*': '×',
'/': '÷'
}
function randomInt(from, to) {
if (from > to) [from, to] = [to, from]
from = Math.floor(from)
to = Math.floor(to)
return Math.floor((to - from) * Math.random() + from)
}
function pickRandom(list) {
return list[Math.floor(Math.random() * list.length)]
}
function genMath(mode) {
return new Promise((resolve, reject) => {
let [a1, a2, b1, b2, ops, time, bonus] = modes[mode]
let a = randomInt(a1, a2)
let b = randomInt(b1, b2)
let op = pickRandom([...ops])
let result = (new Function(`return ${a} ${op.replace('/', '*')} ${b < 0 ? `(${b})` : b}`))()
if (op == '/') [a, result] = [result, a]
hasil = {
soal: `${a} ${operators[op]} ${b}`,
mode: mode,
waktu: time,
hadiah: bonus,
jawaban: result
}
resolve(hasil)
})
}
module.exports = { modes, operators, randomInt, pickRandom, genMath }
================================================
FILE: storage/user/alat_tukar.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _inventoryOrang = JSON.parse(fs.readFileSync('./storage/user/inventory.json'))
let besiAwal = global.rpg.besiawal
let goldAwal = global.rpg.goldawal
let emeraldAwal = global.rpg.emeraldawal
let umpanAwal = global.rpg.umpanawal
let potionAwal = global.rpg.potionawal
const addInventori = (sender) => {
const obj = {id: sender, besi: besiAwal, gold: goldAwal, emerald: emeraldAwal, umpan: umpanAwal, potion: potionAwal}
_inventoryOrang.push(obj)
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
const cekInventoryAdaAtauGak = (sender) => {
let status = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
status = true
}
})
return status
}
const addBesi = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].besi += amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const kurangBesi = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].besi -= amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const getBesi = (sender) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
return _inventoryOrang[position].besi
}
}
const addEmas = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].gold += amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const kurangEmas = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].gold -= amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const getEmas = (sender) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
return _inventoryOrang[position].gold
}
}
const addEmerald = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].emerald += amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const kurangEmerald = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].emerald -= amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const getEmerald = (sender) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
return _inventoryOrang[position].emerald
}
}
const addUmpan = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].umpan += amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const kurangUmpan = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].umpan -= amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const getUmpan = (sender) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
return _inventoryOrang[position].umpan
}
}
const addPotion = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].potion += amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const kurangPotion = (sender, amount) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
_inventoryOrang[position].potion -= amount
fs.writeFileSync('./storage/user/inventory.json', JSON.stringify(_inventoryOrang))
}
}
const getPotion = (sender) => {
let position = false
Object.keys(_inventoryOrang).forEach((i) => {
if (_inventoryOrang[i].id === sender) {
position = i
}
})
if (position !== false) {
return _inventoryOrang[position].potion
}
}
module.exports = { cekInventoryAdaAtauGak,
addInventori,
addBesi,
addEmas,
addEmerald,
addUmpan,
addPotion,
kurangBesi,
kurangEmas,
kurangEmerald,
kurangUmpan,
kurangPotion,
getBesi,
getEmas,
getEmerald,
getUmpan,
getPotion
}
================================================
FILE: storage/user/buruan.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _hasilBuruan = JSON.parse(fs.readFileSync('./storage/user/hasil_buruan.json'))
const addInventoriBuruan = (sender) => {
const obj = {id: sender, ikan: 0, ayam: 0, kelinci: 0, domba: 0, sapi: 0, gajah: 0}
_hasilBuruan.push(obj)
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
const cekDuluHasilBuruanNya = (sender) => {
let status = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
status = true
}
})
return status
}
const addAyam = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].ayam += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangAyam = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].ayam -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getAyam = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].ayam
}
}
const addIkan = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].ikan += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangIkan = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].ikan -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getIkan = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].ikan
}
}
const addKelinci = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].kelinci += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangKelinci = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].kelinci -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getKelinci = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].kelinci
}
}
const addDomba = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].domba += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangDomba = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].domba -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getDomba = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].domba
}
}
const addSapi = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].sapi += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangSapi = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].sapi -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getSapi = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].sapi
}
}
const addGajah = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].gajah += amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const kurangGajah = (sender, amount) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
_hasilBuruan[position].gajah -= amount
fs.writeFileSync('./storage/user/hasil_buruan.json', JSON.stringify(_hasilBuruan))
}
}
const getGajah = (sender) => {
let position = false
Object.keys(_hasilBuruan).forEach((i) => {
if (_hasilBuruan[i].id === sender) {
position = i
}
})
if (position !== false) {
return _hasilBuruan[position].gajah
}
}
module.exports = { cekDuluHasilBuruanNya,
addInventoriBuruan,
addIkan,
addAyam,
addKelinci,
addDomba,
addSapi,
addGajah,
kurangIkan,
kurangAyam,
kurangKelinci,
kurangDomba,
kurangSapi,
kurangGajah,
getIkan,
getAyam,
getKelinci,
getDomba,
getSapi,
getGajah
}
================================================
FILE: storage/user/darah.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _darahOrg = JSON.parse(fs.readFileSync('./storage/user/darah.json'))
const addInventoriDarah = (sender, darah) => {
const obj = {id: sender, healt: darah}
_darahOrg.push(obj)
fs.writeFileSync('./storage/user/darah.json', JSON.stringify(_darahOrg))
}
const cekDuluJoinAdaApaKagaDiJson = (sender) => {
let status = false
Object.keys(_darahOrg).forEach((i) => {
if (_darahOrg[i].id === sender) {
status = true
}
})
return status
}
const addDarah = (sender, amount) => {
let position = false
Object.keys(_darahOrg).forEach((i) => {
if (_darahOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_darahOrg[position].healt += amount
fs.writeFileSync('./storage/user/darah.json', JSON.stringify(_darahOrg))
}
}
const kurangDarah = (sender, amount) => {
let position = false
Object.keys(_darahOrg).forEach((i) => {
if (_darahOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_darahOrg[position].healt -= amount
fs.writeFileSync('./storage/user/darah.json', JSON.stringify(_darahOrg))
}
}
const getDarah = (sender) => {
let position = false
Object.keys(_darahOrg).forEach((i) => {
if (_darahOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
return _darahOrg[position].healt
}
}
module.exports = { addInventoriDarah, cekDuluJoinAdaApaKagaDiJson, addDarah, kurangDarah, getDarah }
================================================
FILE: storage/user/darah.json
================================================
[{"id":"6281575886399@s.whatsapp.net","healt":80},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":80},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":90},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":70},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":100},{"id":"27634090203@s.whatsapp.net","healt":80},{"id":"447441437150@s.whatsapp.net","healt":100},{"id":"447441437150@s.whatsapp.net","healt":80},{"id":"447441437150@s.whatsapp.net","healt":50},{"id":"27634090203@s.whatsapp.net","healt":100}]
================================================
FILE: storage/user/hasil_buruan.json
================================================
[{"id":"6281575886399@s.whatsapp.net","ikan":1,"ayam":1,"kelinci":6,"domba":0,"sapi":0,"gajah":2},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":4,"ayam":1,"kelinci":3,"domba":0,"sapi":2,"gajah":0},{"id":"447441437150@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0},{"id":"447441437150@s.whatsapp.net","ikan":15,"ayam":9,"kelinci":6,"domba":4,"sapi":6,"gajah":0},{"id":"447441437150@s.whatsapp.net","ikan":29,"ayam":27,"kelinci":28,"domba":9,"sapi":9,"gajah":0},{"id":"27634090203@s.whatsapp.net","ikan":0,"ayam":0,"kelinci":0,"domba":0,"sapi":0,"gajah":0}]
================================================
FILE: storage/user/inventory.json
================================================
[{"id":"6281575886399@s.whatsapp.net","besi":17,"gold":10,"emerald":7,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":19,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":6,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":16,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":19,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":6,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":18,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":16,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":16,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":6,"umpan":5,"potion":1},{"id":"447441437150@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"447441437150@s.whatsapp.net","besi":16,"gold":10,"emerald":6,"umpan":5,"potion":1},{"id":"447441437150@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1},{"id":"27634090203@s.whatsapp.net","besi":15,"gold":10,"emerald":5,"umpan":5,"potion":1}]
================================================
FILE: storage/user/limit.js
================================================
const fs = require('fs')
let _limitOrg = JSON.parse(fs.readFileSync('./storage/user/limit.json'))
let limitAwal = global.limitawal.free
const addInventoriLimit = (sender) => {
const obj = {id: sender, limit: limitAwal}
_limitOrg.push(obj)
fs.writeFileSync('./storage/user/limit.json', JSON.stringify(_limitOrg))
}
const cekDuluJoinAdaApaKagaLimitnyaDiJson = (sender) => {
let status = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
status = true
}
})
return status
}
const addLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit += amount
fs.writeFileSync('./storage/user/limit.json', JSON.stringify(_limitOrg))
}
}
const kurangLimit = (sender, amount) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_limitOrg[position].limit -= amount
fs.writeFileSync('./storage/user/limit.json', JSON.stringify(_limitOrg))
}
}
const getLimit = (sender) => {
let position = false
Object.keys(_limitOrg).forEach((i) => {
if (_limitOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
return _limitOrg[position].limit
}
}
module.exports = { addInventoriLimit, cekDuluJoinAdaApaKagaLimitnyaDiJson, addLimit, kurangLimit, getLimit }
================================================
FILE: storage/user/limit.json
================================================
[{"id":"6281575886399@s.whatsapp.net","limit":35022}]
================================================
FILE: storage/user/monay.js
================================================
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
const fs = require('fs')
let _monayOrg = JSON.parse(fs.readFileSync('./storage/user/monay.json'))
let monayAwal = global.limitawal.monayawal
const addInventoriMonay = (sender) => {
const obj = {id: sender, monay: monayAwal}
_monayOrg.push(obj)
fs.writeFileSync('./storage/user/monay.json', JSON.stringify(_monayOrg))
}
const cekDuluJoinAdaApaKagaMonaynyaDiJson = (sender) => {
let status = false
Object.keys(_monayOrg).forEach((i) => {
if (_monayOrg[i].id === sender) {
status = true
}
})
return status
}
const addMonay = (sender, amount) => {
let position = false
Object.keys(_monayOrg).forEach((i) => {
if (_monayOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_monayOrg[position].monay += amount
fs.writeFileSync('./storage/user/monay.json', JSON.stringify(_monayOrg))
}
}
const kurangMonay = (sender, amount) => {
let position = false
Object.keys(_monayOrg).forEach((i) => {
if (_monayOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
_monayOrg[position].monay -= amount
fs.writeFileSync('./storage/user/monay.json', JSON.stringify(_monayOrg))
}
}
const getMonay = (sender) => {
let position = false
Object.keys(_monayOrg).forEach((i) => {
if (_monayOrg[i].id === sender) {
position = i
}
})
if (position !== false) {
return _monayOrg[position].monay
}
}
module.exports = { addInventoriMonay, cekDuluJoinAdaApaKagaMonaynyaDiJson, addMonay, kurangMonay, getMonay }
================================================
FILE: storage/user/monay.json
================================================
[{"id":"6281575886399@s.whatsapp.net","monay":1000},{"id":"6281575886399@s.whatsapp.net","monay":-1224999000},{"id":"6281575886399@s.whatsapp.net","monay":-69000},{"id":"27634090203@s.whatsapp.net"},{"id":"27634090203@s.whatsapp.net"},{"id":"27634090203@s.whatsapp.net"},{"id":"27634090203@s.whatsapp.net"},{"id":"27634090203@s.whatsapp.net","monay":null}]
================================================
FILE: tez.js
================================================
/*const NewsAPI = require('newsapi');
const newsapi = new NewsAPI('306032cefd134ab38660d7db51dd18d1');
//By Drips
// To query top headlines
// All options passed to topHeadlines are optional, but you need to include at least one of them
newsapi.v2.sources({
q: 'mugabe',
sources: 'https://iharare.com/',
domains: 'iharare.com, iharare.com',
from: '2022-07-01',
to: '2022-07-08',
language: 'en',
sortBy: 'relevancy',
page: 2
})
.then(body => {
try {
return JSON.parse(body);
} catch {
throw (body);
}
})
.then(console.log)
.catch(console.error);*/
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED
//▮
//▮FORK AND DON'T FORGET TO GIVE A STAR
//▮
//▮THIS SOFTWARE IS UNDER UZ COPYRIGHT
//▮
//▮REPORT ABUSE OF THIS SOFTWARE EMAIL US
//▮reinhardtuna@mail.uk
//▮WHATSAPP US : +44 7441 437150
//▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC
//▮
//╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
//
//┏━━━━━━━━━━━━━━━━━━━━━━━━━
//┃THIS SOFTWARE INCLUDES
//┃SOME ENCRYPTED FILES
//┃
//┃THANKS FOR CHOOSING ZIMBOT
//┃I WROTE THIS SCRIPT BY MYSELF THIS SCRIPT IS FOR EVERYONE DONT SELL IT
//┗━━━━━━━━━━━━━━━━━━━━━━━━━
//
var fs = require('fs')
let _RPG = JSON.parse(fs.readFileSync('./database/inventori.json'))
var addEmas = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].emas += amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var sellEmas = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].emas -= amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var getEmas = (sender) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
return _RPG[position].emas
}
}
var addDm = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].diamond += amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var sellDm = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].diamond -= amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var getDm = (sender) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
return _RPG[position].diamond
}
}
var addBesi = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].besi += amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var sellBesi = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].besi -= amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var getBesi = (sender) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
return _RPG[position].besi
}
}
var addFish = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].ikan += amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var sellFish = (sender, amount) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
_RPG[position].ikan -= amount
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
}
var getFish = (sender) => {
let position = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
position = i
}
})
if (position !== false) {
return _RPG[position].ikan
}
}
var addInventori = (sender) => {
var obj = {id: sender, emas: 0, diamond: 0, besi: 0, ikan: 0}
_RPG.push(obj)
fs.writeFileSync('./database/inventori.json', JSON.stringify(_RPG))
}
var checkPetualangUser = (sender) => {
let status = false
Object.keys(_RPG).forEach((i) => {
if (_RPG[i].id === sender) {
status = true
}
})
return status
}
module.exports = { checkPetualangUser, addInventori, addBesi, sellBesi, getBesi, addDm, sellDm, getDm, addEmas, sellEmas, getEmas , addFish, sellFish, getFish }