Commited backup

This commit is contained in:
2025-07-10 21:02:34 +03:00
parent 952c1001e3
commit da0b80823e
1310 changed files with 254133 additions and 41 deletions

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is 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. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
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 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. Use with the GNU Affero General Public License.
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 Affero 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 special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 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 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 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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
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 GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -0,0 +1,2 @@
# MyHikkaModules
Just my Hikka Modules

View File

@@ -0,0 +1,77 @@
# ------------------------------------------------------------
# Module: Audio2Text
# Description: Module for speech-to-text conversion.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .audio2text
# scope: hikka_only
# meta banner: https://i.ibb.co/7k4sJRR/5ad271ae-ec1b-4803-a714-5d6628ee8f50.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
import requests
import asyncio
__version__ = (1, 0, 1)
@loader.tds
class Audio2TextMod(loader.Module):
"""Module for speech-to-text conversion"""
strings = {
"name": "Audio2Text",
"processing": "<emoji document_id=5332600281970517875>🫥</emoji> <b>Converting audio to text...</b>",
"success": "<emoji document_id=5897554554894946515>🎤</emoji> <b>Text recognized!</b>\n\n<emoji document_id=6048354593279053992>🗣</emoji> <code>{}</code>",
"no_reply": "Reply to a voice message!",
"error": "An error occurred!"
}
strings_ru = {
"name": "Audio2Text",
"processing": "<emoji document_id=5332600281970517875>🫥</emoji> <b>Распознаю текст из аудио...</b>",
"success": "<emoji document_id=5897554554894946515>🎤</emoji> <b>Текст распознан!</b>\n\n<emoji document_id=6048354593279053992>🗣</emoji> <code>{}</code>",
"no_reply": "Ответьте на аудиосообщение!",
"error": "Произошла ошибка!"
}
async def client_ready(self, client, db):
self.client = client
@loader.command(ru_doc="Преобразовать аудио в текст (ответом на аудиосообщение)",
en_doc="Convert audio to text (reply to voice message)")
async def audio2text(self, message):
reply = await message.get_reply_message()
if not reply or not reply.media:
await utils.answer(message, self.strings["no_reply"])
return
await utils.answer(message, self.strings["processing"])
try:
audio_data = await reply.download_media(bytes)
files = {'audio': ('audio.mp3', audio_data, 'audio/mp3')}
response = requests.post(
"http://theksenon.pro/api/audio2text/generate",
files=files
)
if response.status_code == 200:
result = response.json()
if 'text' in result:
await utils.answer(
message,
self.strings["success"].format(result['text'])
)
else:
await utils.answer(message, self.strings["error"])
else:
await utils.answer(message, self.strings["error"])
except Exception as e:
await utils.answer(message, f"{self.strings['error']}: {str(e)}")

View File

@@ -0,0 +1,594 @@
heroku_security:
invalid_name: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Nome inválido</b>"
no_command: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Comando</b> <code>{}</code> <b>não encontrado!</b>"
permissions: "🔐 <b>Aqui você pode configurar as permissões para o comando</b> <code>{}{}</code>"
close_menu: "🙈 Fechar este menu"
global: "🔐 <b>Aqui você pode configurar a máscara de exclusão global. Se o interruptor estiver desligado aqui, ele estará desligado para todos os comandos</b>"
owner: "😎 Proprietário"
group_owner: "🧛‍♂️ Proprietário do grupo"
group_admin_add_admins: "🧑‍⚖️ Admin (adicionar membros)"
group_admin_change_info: "🧑‍⚖️ Admin (alterar informações)"
group_admin_ban_users: "🧑‍⚖️ Admin (banir)"
group_admin_delete_messages: "🧑‍⚖️ Admin (excluir mensagens)"
group_admin_pin_messages: "🧑‍⚖️ Admin (fixar)"
group_admin_invite_users: "🧑‍⚖️ Admin (convidar)"
group_admin: "🧑‍⚖️ Admin (qualquer)"
group_member: "👥 No grupo"
pm: "🤙 No privado"
owner_list: "<emoji document_id=5386399931378440814>😎</emoji> <b>Usuários do grupo</b> <code>owner</code><b>:</b>\n\n{}"
no_owner: "<emoji document_id=5386399931378440814>😎</emoji> <b>Não há usuários no grupo</b> <code>owner</code>"
no_user: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Especifique para quem dar direitos</b>"
not_a_user: "<emoji document_id=5447644880824181073>⚠️</emoji> <b>O alvo especificado não é um usuário</b>"
cancel: "🚫 Cancelar"
confirm: "👑 Confirmar"
self: "<emoji document_id=5447644880824181073>⚠️</emoji> <b>Você não pode gerenciar seus próprios direitos!</b>"
warning: "⚠️ <b>Você realmente deseja adicionar <a href=\"tg://user?id={}\">{}</a> ao grupo</b> <code>{}</code><b>!\nEsta ação pode dar acesso parcial ou total ao userbot para este usuário!</b>"
suggest_nonick: "🔰 <i>Você quer ativar o NoNick para este usuário?</i>"
user_nn: '🔰 <b>NoNick para <a href="tg://user?id={}">{}</a> ativado</b>'
enable_nonick_btn: "🔰 Ativar"
owner_added: '<emoji document_id="5386399931378440814">😎</emoji> <b><a href="tg://user?id={}">{}</a> adicionado ao grupo</b> <code>owner</code>'
owner_removed: '<emoji document_id="5386399931378440814">😎</emoji> <b><a href="tg://user?id={}">{}</a> removido do grupo</b> <code>owner</code>'
_cls_doc: "Gerenciar configurações de segurança"
what: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Você precisa especificar o tipo de alvo como primeiro argumento (</b><code>user</code> <b>ou</b> <code>chat</code><b>)</b>"
no_target: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Nenhum alvo de regra de segurança especificado</b>"
no_rule: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Nenhuma regra de segurança especificada (módulo ou comando)</b>"
confirm_rule: "🔐 <b>Por favor, confirme que você deseja dar a {} <a href='{}'>{}</a> o direito de usar {}</b> <code>{}</code> <b>{}</b>"
multiple_rules: "🔐 <b>Não foi possível reconhecer as regras de segurança de forma inequívoca. Selecione aquela que você quis dizer:</b>\n\n{}"
rule_added: "🔐 <b>Você deu a {} <a href='{}'>{}</a> o direito de usar {}</b> <code>{}</code> <b>{}</b>"
rules: "<emoji document_id=5472308992514464048>🔐</emoji> <b>Regras de segurança direcionadas:</b>\n\n{}"
no_rules: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Não há regras de segurança direcionadas</b>"
owner_target: "<emoji document_id=5447644880824181073>⚠️</emoji> <b>Este usuário é o proprietário, seus direitos não podem ser gerenciados por segurança direcionada</b>"
rules_removed: '<emoji document_id=5472308992514464048>🔐</emoji> <b>Regras de segurança direcionadas para <a href="{}">{}</a> removidas</b>'
rule_removed: '<emoji document_id=5472308992514464048>🔐</emoji> <b>Regra de segurança removida para <a href="{}">{}</a> (</b><code>{}</code><b>)</b>'
chat_inline: "⚠️ <b>Você não pode criar uma regra de comando inline para chats!</b>"
for: "para"
forever: "para sempre"
command: "comando"
module: "módulo"
inline: "comando inline"
chat: "chat"
user: "usuário"
day: "dia"
days: "dias"
hour: "hora"
hours: "horas"
minute: "minuto"
minutes: "minutos"
second: "segundo"
seconds: "segundos"
_cmd_doc_inlinesec: "[comando] - Configurar permissões para comando inline"
_cmd_doc_owneradd: "<usuário> - Adicionar usuário ao grupo `owner`"
_cmd_doc_ownerlist: "Mostrar lista de usuários no grupo `owner`"
_cmd_doc_ownerrm: "<usuário> - Remover usuário do grupo `owner`"
_cmd_doc_security: "[comando] - Configurar permissões para comando"
_cmd_doc_tsec: "<\"user\"/\"chat\"/\"sgroup\"> [alvo do usuário ou chat] [regra (comando/módulo)] [tempo] - Adicionar nova regra de segurança direcionada\nPor exemplo: .tsec user ban 1d, .tsec chat weather 1h, .tsec user HikariChat"
_cmd_doc_tsecclr: "<\"user\"/\"chat\"/\"sgroup\"> - Limpar regras de segurança direcionadas\nPor exemplo: .tsecclr user, .tsecclr chat"
_cmd_doc_tsecrm: "<\"user\"/\"chat\"/\"sgroup\"> <regra - módulo ou comando> - Remover regra de segurança direcionada\nPor exemplo: .tsecrm user ban, .tsecrm chat HikariChat"
until: "até"
sgroup: "grupo de segurança"
sgroup_info: "<emoji document_id=5870704313440932932>🔒</emoji> <b>Informações sobre o grupo de segurança</b> <code>{}</code>:\n\n{}\n{}"
created_sgroup: "<emoji document_id=5870704313440932932>🔒</emoji> <b>Grupo de segurança criado</b> <code>{}</code>"
sgroup_already_exists: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O grupo de segurança</b> <code>{}</code> <b>já existe</b>"
no_args: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Nenhum argumento especificado</b>"
sgroup_not_found: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Grupo de segurança</b> <code>{}</code> <b>não encontrado</b>"
no_users: "<emoji document_id=5870772616305839506>👥</emoji> <b>Não há usuários</b>"
users_list: "<emoji document_id=5870772616305839506>👥</emoji> <b>Usuários:</b>\n{}\n"
no_permissions: "<emoji document_id=5870450390679425417>🗒</emoji> <b>Não há permissões</b>"
permissions_list: "<emoji document_id=5870450390679425417>🗒</emoji> <b>Direitos de acesso:</b>\n{}\n"
sgroup_li: "<emoji document_id=4974264756668990388>▫️</emoji> <code>{}</code> · <b>{} usuário(s)</b> · <b>{} regra(s)</b>"
sgroups_list: "<emoji document_id=5870704313440932932>🔒</emoji> <b>Grupos de segurança:</b>\n\n{}"
deleted_sgroup: "<emoji document_id=5870704313440932932>🔒</emoji> <b>Grupo de segurança</b> <code>{}</code> <b>removido</b>"
user_already_in_sgroup: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O usuário</b> <code>{}</code> <b>já está no grupo de segurança</b> <code>{}</code>"
user_added_to_sgroup: "<emoji document_id=5870704313440932932>🔒</emoji> <b>O usuário</b> <code>{}</code> <b>foi adicionado ao grupo de segurança</b> <code>{}</code>"
user_not_in_sgroup: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O usuário</b> <code>{}</code> <b>não está no grupo de segurança</b> <code>{}</code>"
user_removed_from_sgroup: "<emoji document_id=5870704313440932932>🔒</emoji> <b>O usuário</b> <code>{}</code> <b>foi removido do grupo</b> <code>{}</code>"
_cmd_doc_delsgroup: "<nome> - Remover grupo de segurança"
_cmd_doc_sgroup: "<nome> - Mostrar informações sobre o grupo de segurança"
_cmd_doc_sgroups: "Lista de grupos de segurança"
_cmd_doc_newsgroup: "<nome> - Criar novo grupo de segurança"
_cmd_doc_sgroupadd: "<nome> [usuário ou resposta] - Adicionar usuário ao grupo de segurança"
_cmd_doc_sgroupdel: "<nome> [usuário ou resposta] - Remover usuário do grupo de segurança"
heroku_settings:
watchers: "<emoji document_id=5424885441100782420>👀</emoji> <b>Observadores:</b>\n\n<b>{}</b>"
mod404: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Observador {} não encontrado</b>"
disabled: "<emoji document_id=5424885441100782420>👀</emoji> <b>Observador {} agora está <u>desligado</u></b>"
enabled: "<emoji document_id=5424885441100782420>👀</emoji> <b>Observador {} agora está <u>ligado</u></b>"
args: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Especifique o nome do observador</b>"
user_nn: "<emoji document_id=5469791106591890404>🪄</emoji> <b>Status do NoNick para este usuário: {}</b>"
no_cmd: "<emoji document_id=5469791106591890404>🪄</emoji> <b>Especifique o comando para o qual você precisa ativar/desativar o NoNick</b>"
cmd_nn: "<emoji document_id=5469791106591890404>🪄</emoji> <b>Status do NoNick para</b> <code>{}</code><b>: {}</b>"
cmd404: "<emoji document_id=5469791106591890404>🪄</emoji> <b>Comando não encontrado</b>"
inline_settings: "⚙️ <b>Aqui você pode gerenciar as configurações do Heroku</b>"
confirm_update: "🧭 <b>Confirme a atualização. O userbot será reiniciado</b>"
confirm_restart: "🔄 <b>Confirme a reinicialização</b>"
suggest_fs: "✅ Sugerir salvar módulos"
do_not_suggest_fs: "🚫 Não sugerir salvar módulos"
use_fs: "✅ Sempre salvar módulos"
do_not_use_fs: "🚫 Nunca salvar módulos"
btn_restart: "🔄 Reiniciar"
btn_update: "🧭 Atualizar"
close_menu: "😌 Fechar menu"
custom_emojis: "✅ Emojis personalizados"
no_custom_emojis: "🚫 Emojis personalizados"
suggest_subscribe: "✅ Sugerir inscrição no canal"
do_not_suggest_subscribe: "🚫 Não sugerir inscrição no canal"
private_not_allowed: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Este comando precisa ser executado em um chat</b>"
_cls_doc: "Configurações adicionais do Heroku"
nonick_warning: "Atenção! Você ativou o NoNick com o prefixo padrão! Você pode ser silenciado em chats do Heroku. Altere o prefixo ou desative o NoNick global!"
reply_required: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Responda à mensagem do usuário para quem você precisa ativar o NoNick</b>"
deauth_confirm: "⚠️ <b>Esta ação removerá completamente o Heroku desta conta! Não pode ser desfeita</b>\n\n<i>- Todos os chats associados ao Heroku serão removidos\n- A sessão do Heroku será redefinida\n- O bot inline do Heroku será removido</i>"
deauth_confirm_step2: "⚠️ <b>Você tem certeza de que deseja remover o Heroku?</b>"
deauth_yes: "Tenho certeza"
deauth_no_1: "Não tenho certeza"
deauth_no_2: "Não exatamente"
deauth_no_3: "Não"
deauth_cancel: "🚫 Cancelar"
deauth_confirm_btn: "😢 Remover"
uninstall: "😢 <b>Removendo o Heroku...</b>"
uninstalled: "😢 <b>Heroku removido. A interface web ainda está ativa, você pode adicionar outras contas!</b>"
cmd_nn_list: "<emoji document_id=5469791106591890404>🪄</emoji> <b>NoNick ativado para estes comandos:</b>\n\n{}"
user_nn_list: "<emoji document_id=5469791106591890404>🪄</emoji> <b>NoNick ativado para estes usuários:</b>\n\n{}"
chat_nn_list: "<emoji document_id=5469791106591890404>🪄</emoji> <b>NoNick ativado para estes chats:</b>\n\n{}"
nothing: "<emoji document_id=5427052514094619126>🤷‍♀️</emoji> <b>Nada para mostrar...</b>"
privacy_leak: "⚠️ <b>Este comando dá acesso à interface web do Heroku. Executá-lo em chats públicos é uma ameaça à segurança. É preferível executá-lo em <a href='tg://openmessage?user_id={}'>Mensagens Salvas</a>. Execute</b> <code>{}proxypass force_insecure</code> <b>para desativar este aviso</b>"
privacy_leak_nowarn: "⚠️ <b>Este comando dá acesso à interface web do Heroku. Executá-lo em chats públicos é uma ameaça à segurança. É preferível executá-lo em <a href='tg://openmessage?user_id={}'>Mensagens Salvas</a>.</b>"
opening_tunnel: "🔁 <b>Abrindo túnel para a interface web do Heroku...</b>"
tunnel_opened: "🎉 <b>Túnel aberto. Este link estará ativo por no máximo uma hora</b>"
web_btn: "🌍 Interface web"
btn_yes: "🚸 Abrir mesmo assim"
btn_no: "🔻 Fechar"
lavhost_web: "✌️ <b>Este link o levará à interface web do Heroku no lavHost</b>\n\n<i>💡 Você precisará fazer login usando os dados especificados ao configurar o lavHost</i>"
disable_debugger: "✅ Depurador ativado"
enable_debugger: "🚫 Depurador desativado"
_cmd_doc_nonickchat: "Ativar NoNick para um chat específico"
_cmd_doc_nonickchats: "Mostrar lista de chats NoNick ativos"
_cmd_doc_nonickcmd: "<comando> - Ativar NoNick para um comando específico"
_cmd_doc_nonickcmds: "Mostrar lista de comandos NoNick ativos"
_cmd_doc_nonickuser: "Ativar NoNick para um usuário específico"
_cmd_doc_nonickusers: "Mostrar lista de usuários NoNick ativos"
_cmd_doc_settings: "Mostrar configurações"
_cmd_doc_uninstall_hikka: "Remover Heroku"
_cmd_doc_watcherbl: "<módulo> - Ativar/desativar observador no chat atual"
_cmd_doc_watcher: "<módulo> - Gerenciar regras globais do observador\nArgumentos:\n[-c - apenas em chats]\n[-p - apenas em mensagens privadas]\n[-o - apenas mensagens de saída]\n[-i - apenas mensagens de entrada]"
_cmd_doc_watchers: "Mostrar observadores ativos"
_cmd_doc_weburl: "Abrir túnel para a interface web do Heroku"
core_protection_already_removed: "<emoji document_id=6003424016977628379>🔒</emoji> <b>A proteção do núcleo já foi removida</b>"
core_protection_confirm: "⚠️ <b>LEIA ATENTAMENTE!</b>\n\nAo remover a proteção do núcleo, você confirma que sabe o que é e para que serve. Em um cenário normal, você <b>não precisa</b>. Se você não é um desenvolvedor, você <b>não precisa</b>. Se você não tem certeza, você <b>não precisa</b>.\n\n<b>Você tem certeza de que deseja remover a proteção do núcleo?</b>"
core_protection_btn: "🔓 Remover proteção do núcleo"
core_protection_removed: "🔓 <b>Proteção do núcleo removida com sucesso</b>"
terminal:
fw_protect: "Atraso entre edições"
what_to_kill: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Responda ao comando em execução para finalizá-lo</b>"
kill_fail: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Não consigo matar o processo</b>"
killed: "<b>Morto</b>"
no_cmd: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Não há comando em execução nesta mensagem</b>"
running: "<emoji document_id=5472111548572900003>⌨️</emoji><b> Comando do sistema</b> <code>{}</code>"
finished: "\n<b>Código de saída </b> <code>{}</code>"
stdout: "\n<b>📼 Stdout:</b>\n<pre><code class=\"language-stdout\">"
stderr: "</code></pre>\n\n<b><emoji document_id=5210952531676504517>🚫</emoji> Stderr:</b>\n<pre><code class=\"language-stderr\">"
end: "</code></pre>"
auth_fail: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Autenticação falhou, tente novamente</b>"
auth_needed: '<emoji document_id=5472308992514464048>🔐</emoji><a href="tg://user?id={}"> Autenticação necessária</a>'
auth_msg: "<emoji document_id=5472308992514464048>🔐</emoji> <b>Por favor, edite esta mensagem com a senha de root para</b> <code>{}</code> <b>para executar</b> <code>{}</code>"
auth_locked: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Autenticação falhou. Tente novamente mais tarde</b>"
auth_ongoing: "<emoji document_id=5213452215527677338>⏳</emoji> <b>Autenticando...</b>"
done: "<emoji document_id=5314250708508220914>✅</emoji> <b>Uau</b>"
_cmd_doc_apt: "Abreviatura para '.terminal apt'"
_cmd_doc_terminal: "<comando> - Executar comando no sistema"
_cmd_doc_terminate: "[-f para forçar a finalização] - Responda à mensagem para matar o processo"
heroku_backup:
period: "⌚️ <b>Unidade «ALPHA»</b> cria backups regulares. Essas configurações podem ser alteradas posteriormente.\n\nPor favor, selecione a frequência de backup"
saved: "✅ Frequência salva! Pode ser alterada usando .set_backup_period"
never: "✅ Não farei backups automáticos. Pode ser cancelado usando .set_backup_period"
invalid_args: "🚫 <b>Especifique a frequência correta em horas, ou `0` para desativar</b>"
backup_caption: '<emoji document_id=5469718869536940860>👆</emoji> <b>Este é o seu backup do banco de dados. Não o compartilhe com ninguém, ele contém informações pessoais. Se você precisar restaurá-lo, use</b> <pre><code class="language-heroku">{prefix}restoredb</code></pre> <b>em resposta a este arquivo.</b>'
reply_to_file: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Responda a um arquivo .json ou .zip</b>"
db_restored: "<emoji document_id=5774134533590880843>🔄</emoji> <b>Banco de dados atualizado, reiniciando...</b>"
modules_backup: "<emoji document_id=5431736674147114227>🗂</emoji> <b>Backup de módulos ({})</b>\n\n<b>Você pode restaurá-lo usando:</b>\n<pre><code class=\"language-heroku\">{}restoremods</code></pre>"
mods_restored: "<emoji document_id=5774134533590880843>🔄</emoji> <b>Módulos restaurados, reiniciando</b>"
backup_sent: "<emoji document_id=5431736674147114227>🗂</emoji> <b>Backup enviado para mensagens salvas</b>"
_cls_doc: "Processa backups de banco de dados e módulos"
_cmd_doc_backupdb: "Criar backup do banco de dados [será enviado no privado]"
_cmd_doc_backupmods: "Criar backup de mods [será enviado no privado]"
_cmd_doc_restoredb: "Restaurar banco de dados de um arquivo"
_cmd_doc_restoremods: "<resposta ao arquivo> - Restaurar mods de um backup"
_cmd_doc_set_backup_period: "<tempo em horas> - Definir frequência de backups"
presets:
_fun_title: "🪩 Módulos de entretenimento"
_fun_desc: "Módulos divertidos - animações, spam, jogos e outros."
_chat_title: "👥 Módulos de administração de chat"
_chat_desc: "Coleção de módulos que o ajudarão a administrar o chat - filtros, notas, reconhecimento de fala e outros."
_service_title: "⚙️ Módulos úteis"
_service_desc: "Módulos realmente úteis - gerenciamento de contas, encurtador de links, mecanismo de busca e outros."
_downloaders_title: "📥 Downloaders"
_downloaders_desc: "Coleção de módulos que o ajudarão a baixar arquivos de/para várias fontes - YouTube, TikTok, Instagram, Spotify, VK Music e outros."
welcome: "👋 <b>Olá! Cansado de rolar por inúmeros módulos em canais? Posso lhe oferecer alguns conjuntos prontos. Se você precisar chamar este menu novamente, envie-me o comando /presets</b>"
preset: "<b>{}:</b>\n <i>{}</i>\n\n⚒ <b>Módulos neste conjunto:</b>\n\n{}"
back: "🔙 Voltar"
install: "📦 Instalar"
installing: "<emoji document_id=5451732530048802485>⏳</emoji> <b>Instalando o conjunto </b><code>{}</code><b>...</b>"
installing_module: "<emoji document_id=5451732530048802485>⏳</emoji> <b>Instalando o conjunto</b> <code>{}</code> <b>({}/{} módulos)...</b>\n\n<emoji document_id=5188377234380954537>🪐</emoji> <i>Instalando o módulo {}...</i>"
installed: "<emoji document_id=5436040291507247633>🎉</emoji> <b>Conjunto</b> <code>{}</code> <b>instalado!</b>"
already_installed: "✅ [Instalado]"
settings:
installation: '<emoji document_id=5363805650327450240>▪️</emoji> A instalação é muito fácil! basta escrever no terminal do seu servidor:
<pre><code class="language-bash">sudo apt update && sudo apt upgrade -y && sudo apt install git && sudo apt install python3-pip && git clone https://github.com/coddrago/Heroku && cd Heroku && pip install -r requirements.txt && python3 -m hikka</code></pre>
<emoji document_id=5299027123913105700>😐</emoji> Se você não tiver acesso ao sudo, basta remover as ações iniciais.
<emoji document_id=5300777464820145682>🥳</emoji> Vamos entender um pouco os argumentos:
<emoji document_id=5787313834012184077>🔐</emoji> O argumento <code>--root</code> - permite que você execute o Heroku como <b>usuário root</b>
<emoji document_id=5785209342986817408>🌎</emoji> O argumento <code>--no-web</code> - abre o processo de login em sua conta <b>no próprio terminal, e não por meio de um link</b> <code>{}.lhr.life</code>
<emoji document_id=5471895949804575096>🤲</emoji> No entanto, se você quiser migrar do hikka do hikariatama, você deve baixar este módulo:
<pre><code class="language-heroku">{prefix}dlm https://raw.githubusercontent.com/coddrago/modules/main/SwitchToHeroku.py</code></pre>
É absolutamente seguro e o ajudará a migrar do Hikka para o Heroku'
too_many_args: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Muitos argumentos</b>"
blacklisted: "<emoji document_id=5197474765387864959>👍</emoji> <b>O chat {} foi adicionado à lista negra do userbot</b>"
unblacklisted: "<emoji document_id=5197474765387864959>👍</emoji> <b>O chat {} foi removido da lista negra do userbot</b>"
user_blacklisted: "<emoji document_id=5197474765387864959>👍</emoji> <b>O usuário {} foi adicionado à lista negra do userbot</b>"
user_unblacklisted: "<emoji document_id=5197474765387864959>👍</emoji> <b>O usuário {} foi removido da lista negra do userbot</b>"
what_prefix: "<emoji document_id=5382187118216879236>❓</emoji> <b>E qual prefixo colocar?</b>"
prefix_incorrect: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O prefixo deve consistir em apenas um caractere</b>"
prefix_set: "{} <b>O prefixo dos comandos foi atualizado. Use o seguinte comando para alterá-lo de volta:</b>\n<pre><code class=\"language-heroku\">{newprefix}setprefix {oldprefix}</code></pre>"
alias_created: "<emoji document_id=5197474765387864959>👍</emoji> <b>Alias criado. Use-o através de</b> <code>{}</code>"
aliases: "<b>🔗 Aliases:</b>\n"
no_command: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O comando</b> <code>{}</code> <b>não existe</b>"
unstable: "\n\n<emoji document_id=5355133243773435190>❕</emoji> <b>Você está usando um branch instável</b> <code>{}</code><b>!</b>"
alias_args: "<emoji document_id=5210952531676504517>🚫</emoji> <b>É necessário inserir um comando e um alias para ele</b>"
delalias_args: "<emoji document_id=5210952531676504517>🚫</emoji> <b>É necessário o nome do alias</b>"
alias_removed: "<emoji document_id=5197474765387864959>👍</emoji> <b>Alias</b> <code>{}</code> <b>removido</b>."
no_alias: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Alias</b> <code>{}</code> <b>não existe</b>"
db_cleared: "<emoji document_id=5197474765387864959>👍</emoji> <b>Banco de dados limpo hikka: "{} <b>{}.{}.{}</b> <i>{}</i>\n\n<b><emoji document_id=5289608677244811430>📁</emoji> <b>Telethon:</b> <i>1.37.0</i>\n\n<emoji document_id=5228879218363872764>⌨</emoji> <b>Desenvolvedor: t.me/codrago</b>\n<emoji document_id=5375368793209972850>🖋</emoji> <b>Designer: t.me/tr4mq</b>"
_cls_doc: "Gerenciar configurações básicas do userbot"
confirm_cleardb: "⚠️ <b>Você tem certeza de que deseja redefinir o banco de dados?</b>"
cleardb_confirm: "🗑 Limpar banco de dados"
cancel: "🚫 Cancelar"
who_to_blacklist: "<emoji document_id=5382187118216879236>❓</emoji> <b>Quem bloquear?</b>"
who_to_unblacklist: "<emoji document_id=5382187118216879236>❓</emoji> <b>Quem desbloquear?</b>"
_cmd_doc_addalias: "Definir alias para um comando"
_cmd_doc_aliases: "Mostrar lista de aliases"
_cmd_doc_blacklist: "[chat] [módulo] - Desativar bot em algum lugar"
_cmd_doc_blacklistuser: "[usuário] - Impedir que o usuário execute comandos"
_cmd_doc_cleardb: "Limpar banco de dados"
_cmd_doc_delalias: "Remover alias para um comando"
_cmd_doc_hikka: "Mostrar versão do Heroku"
_cmd_doc_setprefix: "<prefixo> - Definir prefixo de comandos"
_cmd_doc_unblacklist: "[chat] - Ativar bot em algum lugar"
_cmd_doc_unblacklistuser: "[usuário] - Permitir que o usuário execute comandos"
heroku_config:
choose_core: "⚙️ <b>Selecione uma categoria</b>"
configure: "⚙️ <b>Selecione um módulo para configurar</b>"
configure_lib: "📦 <b>Selecione uma biblioteca para configurar</b>"
configuring_mod: "⚙️ <b>Selecione um parâmetro para o módulo</b> <code>{}</code>\n\n<b>Configurações atuais:</b>\n\n{}"
configuring_lib: "📦 <b>Selecione um parâmetro para a biblioteca</b> <code>{}</code>\n\n<b>Configurações atuais:</b>\n\n{}"
configuring_option: "⚙️ <b>Gerenciando o parâmetro</b> <code>{}</code> <b>do módulo</b> <code>{}</code>\n<i> {}</i>\n\n<b>Padrão: {}</b>\n\n<b>Atual: {}</b>\n\n{}"
configuring_option_lib: "📦 <b>Gerenciando o parâmetro</b> <code>{}</code> <b>da biblioteca</b> <code>{}</code>\n<i> {}</i>\n\n<b>Padrão: {}</b>\n\n<b>Atual: {}</b>\n\n{}"
option_saved: "<emoji document_id=5318933532825888187>⚙️</emoji> <b>Parâmetro</b> <code>{}</code> <b>do módulo</b> <code>{}</code><b> salvo!</b>\n<b>Atual: {}</b>"
option_saved_lib: "<emoji document_id=5431736674147114227>📦</emoji> <b>Parâmetro</b> <code>{}</code> <b>da biblioteca</b> <code>{}</code><b> salvo!</b>\n<b>Atual: {}</b>"
option_reset: "♻️ <b>Parâmetro</b> <code>{}</code> <b>do módulo</b> <code>{}</code><b> redefinido para o valor padrão</b>\n<b>Atual: {}</b>"
option_reset_lib: "♻️ <b>Parâmetro</b> <code>{}</code> <b>da biblioteca</b> <code>{}</code><b> redefinido para o valor padrão</b>\n<b>Atual: {}</b>"
_cls_doc: "Configurador interativo do Heroku"
args: "🚫 <b>Você especificou argumentos inválidos</b>"
no_mod: "🚫 <b>O módulo não existe</b>"
no_option: "🚫 <b>O módulo não tem tal valor de configuração</b>"
validation_error: "🚫 <b>Valor de configuração inválido inserido.\nErro: {}</b>"
try_again: "🔁 Tentar novamente"
typehint: "🕵️ <b>Deve ser {}</b>"
set: "definir"
set_default_btn: "♻️ Valor padrão"
enter_value_btn: "✍️ Inserir valor"
enter_value_desc: "✍️ Insira um novo valor para este parâmetro"
add_item_desc: "✍️ Insira o item que você deseja adicionar"
remove_item_desc: "✍️ Insira o item que você deseja remover"
back_btn: "👈 Voltar"
close_btn: "🔻 Fechar"
add_item_btn: " Adicionar item"
remove_item_btn: " Remover item"
show_hidden: "🚸 Mostrar valor"
hide_value: "🔒 Ocultar valor"
builtin: "🛰 Integrados"
external: "🛸 Externos"
libraries: "📦 Bibliotecas"
_cmd_doc_config: "Configurar módulos"
_cmd_doc_fconfig: "<módulo> <configuração> <valor> - definir valor de configuração para o módulo"
inline_stuff:
bot_username_invalid: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Nome de usuário do bot inválido. Deve terminar com</b> <code>bot</code> <b>e ter pelo menos 5 caracteres</b>"
bot_username_occupied: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Este nome de usuário do bot já está em uso</b>"
bot_updated: "<emoji document_id=6318792204118656433>🎉</emoji> <b>Configurações salvas. Para aplicá-las, você precisa reiniciar o userbot</b>"
this_is_hikka: "🪐 <b>Olá! Este é o Heroku - um poderoso userbot modular do Telegram. Você pode instalá-lo em sua conta!</b>\n\n<b>🌍 <a href=\"https://github.com/coddrago/Heroku\">GitHub</a></b>\n<b>👥 <a href=\"https://t.me/heroku_talks\">Chat de suporte</a></b>"
_cmd_doc_ch_hikka_bot: "<nome de usuário> - Alterar nome de usuário do bot inline"
test:
set_loglevel: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Especifique o nível de log por número ou string</b>"
no_logs: "<emoji document_id=5363948200291998612>🤷‍♀️</emoji> <b>Você não tem logs do nível</b> <code>{}</code><b>.</b>"
configping: "Seu texto personalizado. Você pode usar placeholders: {ping} - Este é o seu ping, {uptime} - Este é o seu tempo de atividade, {ping_hint} - dica. Você pode usar o placeholder {hostname} se precisar do hostname do seu servidor"
hint: "Especifique uma dica"
ping_emoji: "Emoji que aparece quando o ping aumenta ligeiramente."
logs_caption: "<emoji document_id=5188377234380954537>🪐</emoji> <b>Logs do Heroku do nível</b> <code>{}</code>\n\n<emoji document_id=6318902906900711458>⚪️</emoji> <b>Versão: {}.{}.{}</b>{}"
debugging_enabled: "<emoji document_id=5332533929020761310>✅</emoji> <b>Modo de desenvolvedor ativado para o módulo</b> <code>{0}</code>\n<i>Vá para o diretório `debug_modules`, altere o arquivo `{0}.py` e veja as alterações em tempo real</i>"
debugging_disabled: "<emoji document_id=5332533929020761310>✅</emoji> <b>Modo de desenvolvedor desativado</b>"
suspend_invalid_time: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Tempo de congelamento inválido</b>"
suspended: "<emoji document_id=5452023368054216810>🥶</emoji> <b>Bot congelado por</b> <code>{}</code> <b>segundos</b>"
confidential: "⚠️ <b>O nível de log</b> <code>{}</code> <b>pode conter informações pessoais, tenha cuidado</b>"
confidential_text: "⚠️ <b>O nível de log</b> <code>{0}</code> <b>pode conter informações pessoais, tenha cuidado</b>\n<b>Escreva</b> <code>.logs {0} force_insecure</code><b>, para enviar logs ignorando o aviso</b>"
choose_loglevel: "💁‍♂️ <b>Selecione o nível de log</b>"
_cmd_doc_dump: "Mostrar informações sobre a mensagem"
_cmd_doc_logs: "<nível> - Envia um arquivo de log. Níveis abaixo de WARNING podem conter informações pessoais."
_cmd_doc_suspend: "<tempo> - Congelar o bot por um tempo"
_cmd_doc_ping: "Verifica a velocidade de resposta do userbot"
_cls_doc: "Operações relacionadas ao autoteste"
send_anyway: "📤 Enviar mesmo assim"
cancel: "🚫 Cancelar"
logs_cleared: "🗑 <b>Logs limpos</b>"
_cmd_doc_clearlogs: "Limpar logs"
updater:
source: "<emoji document_id=5456255401194429832>📖</emoji> <b>O código-fonte pode ser lido</b> <a href='{}'>aqui</a>"
restarting_caption: "<emoji document_id=5328274090262275771>🕗</emoji> <b>Seu {} está reiniciando...</b>"
downloading: "<emoji document_id=5328274090262275771>🕗</emoji> <b>Baixando atualizações...</b>"
installing: "<emoji document_id=5328274090262275771>🕗</emoji> <b>Instalando atualizações...</b>"
success: "<emoji document_id=5326015457155620929>⏱</emoji> <b>Reinicialização bem-sucedida! {}</b>\n<i>Mas os módulos ainda estão sendo carregados...</i>\n<i>A reinicialização levou {} segundos</i>"
full_success: "<emoji document_id=5301096082674032190>👍</emoji> <b>Userbot totalmente carregado! {}</b>\n<i>A reinicialização completa levou {} segundos.</i>"
secure_boot_complete: "<emoji document_id=5472308992514464048>🔐</emoji> <b>Inicialização segura concluída! {}</b>\n<i>A reinicialização levou {} segundos</i>"
origin_cfg_doc: "Link de onde as atualizações serão baixadas"
btn_restart: "🔄 Reiniciar"
btn_update: "🧭 Atualizar"
restart_confirm: "❓ <b>Você tem certeza de que deseja reiniciar?</b>"
secure_boot_confirm: "❓ <b>Você tem certeza de que deseja reiniciar no modo de inicialização segura?</b>"
update_confirm: "❓ <b>Você tem certeza de que deseja atualizar?\n\n<a href=\"https://github.com/coddrago/Heroku/commit/{}\">{}</a> ⤑ <a href=\"https://github.com/coddrago/Heroku/commit/{}\">{}</a></b>"
no_update: "🚸 <b>Você tem a versão mais recente. Atualizar à força?</b>"
cancel: "🚫 Cancelar"
_cls_doc: "Atualiza o userbot"
lavhost_update: "<emoji document_id=5469986291380657759>✌️</emoji> <b>Seu {} está sendo atualizado...</b>"
_cmd_doc_restart: "Reinicia o userbot"
_cmd_doc_source: "Mostrar link para o código-fonte do projeto"
_cmd_doc_update: "Baixa as atualizações do userbot"
api_protection:
warning: "⚠️ <b>ATENÇÃO!</b>\n\nA conta excedeu os limites de requisição especificados na configuração. Para evitar o flood da API do Telegram, o userbot foi <b>totalmente congelado</b> por {} segundos. Informações adicionais estão anexadas no arquivo abaixo. \n\nRecomenda-se pedir ajuda no grupo <code>{prefix}support</code>!\n\nSe você acha que este é um comportamento planejado do userbot, apenas espere o temporizador terminar e na próxima vez que planejar executar uma operação tão intensiva em recursos, use <code>{prefix}suspend_api_protect</code> <tempo em segundos>"
args_invalid: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Argumentos inválidos</b>"
suspended_for: "<emoji document_id=5458450833857322148>👌</emoji> <b>Proteção da API desativada por {} segundos</b>"
on: "<emoji document_id=5458450833857322148>👌</emoji> <b>Proteção ativada</b>"
off: "<emoji document_id=5458450833857322148>👌</emoji> <b>Proteção desativada</b>"
u_sure: "<emoji document_id=5312383351217201533>⚠️</emoji> <b>Você tem certeza?</b>"
_cfg_time_sample: "Intervalo de tempo pelo qual o número de requisições será contado"
_cfg_threshold: "Limite de requisições em que a proteção será acionada"
_cfg_local_floodwait: "Congelar o userbot por este número de segundos se o limite de requisições for excedido"
_cfg_forbidden_methods: "Impedir a execução dos métodos especificados em todos os módulos externos"
btn_no: "🚫 Não"
btn_yes: "✅ Sim"
web_pin: "🔓 <b>Clique no botão abaixo para mostrar o PIN de depuração do Werkzeug. Não o dê a ninguém.</b>"
web_pin_btn: "🐞 Mostrar PIN do Werkzeug"
proxied_url: "🌐 Link com proxy"
local_url: "🏠 Link local"
debugger_disabled: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O depurador web está desativado, o link não está disponível</b>"
_cmd_doc_api_fw_protection: "Ativar/desativar proteção da API"
_cmd_doc_debugger: "Mostrar PIN do Werkzeug"
_cmd_doc_suspend_api_protect: "<tempo em segundos> - Congelar a proteção da API por N segundos"
help:
undoc: "🦥 Sem descrição"
all_header: "<b>{} módulos disponíveis, {} ocultos:</b>"
no_mod: "🚫 <b>Especifique o(s) módulo(s) que você deseja ocultar</b>"
hidden_shown: "<b>{} módulos ocultos, {} módulos mostrados:</b>\n{}\n{}"
support: "{} <b>Link para o</b> <a href='https://t.me/heroku_talks'>chat de ajuda</a></b>"
_cls_doc: "Mostra ajuda sobre os módulos"
partial_load: "<emoji document_id=5355133243773435190>☝️</emoji> <b>O userbot ainda não foi totalmente carregado, portanto, nem todos os módulos são mostrados</b>"
not_exact: "<emoji document_id=5355133243773435190>☝️</emoji> <b>Nenhuma correspondência exata foi encontrada, então a mais adequada foi selecionada</b>"
request_join: "Você solicitou um link para o chat de ajuda do Heroku"
core_notice: "<emoji document_id=5355133243773435190>☝️</emoji> <b>Este é um módulo integrado. Você não pode descarregá-lo ou substituí-lo</b>"
_cmd_doc_help: "[módulo] [-f] - Mostrar ajuda"
_cmd_doc_helphide: "<módulo ou módulos> - Ocultar módulo(s) da ajuda\n*Separe os módulos com espaços"
_cmd_doc_support: "Mostrar link para o chat de ajuda do Heroku"
heroku_info:
owner: "Proprietário"
version: "Versão"
build: "Build"
prefix: "Prefixo"
uptime: "Tempo de atividade"
branch: "Branch"
cpu_usage: "Uso da CPU"
ram_usage: "Uso da RAM"
send_info: "Enviar informações sobre o userbot"
description: " Isso não revelará nenhuma informação pessoal"
_ihandle_doc_info: "Enviar informações sobre o userbot"
up-to-date: "<emoji document_id=5370699111492229743>😌</emoji> <b>Versão atualizada</b>"
update_required: "<emoji document_id=5424728541650494040>😕</emoji> <b>Atualização necessária</b> <code>.update</code>"
_cfg_cst_msg: "Texto personalizado da mensagem em info. Pode conter palavras-chave {me}, {version}, {build}, {prefix}, {platform}, {upd}, {uptime}, {cpu_usage}, {ram_usage}, {branch}"
_cfg_cst_btn: "Botão personalizado na mensagem em info. Deixe em branco para remover o botão"
_cfg_banner: "Link para a imagem do banner"
setinfo_no_args: "<emoji document_id=5370881342659631698>😢</emoji> <b>Você precisa especificar o texto para o info personalizado</b>"
setinfo_success: "<emoji document_id=5436040291507247633>🎉</emoji> <b>Texto do info alterado com sucesso</b>"
desc: "<emoji document_id=5188377234380954537>🪐</emoji> <b>O que é um Userbot?</b>\n\n<emoji document_id=5472238129849048175>😎</emoji> Um Userbot é um <b>programa de terceiros</b> que interage com a API do Telegram para executar <b>tarefas automatizadas em nome de um usuário</b>. Os userbots podem ser usados para automatizar várias tarefas, como <b>enviar mensagens, ingressar em canais, baixar arquivos de mídia e muito mais</b>.\n\n<emoji document_id=5474667187258006816>😎</emoji> Os userbots diferem dos bots comuns no Telegram porque <b>eles funcionam na conta de um usuário</b>, e não em uma conta de bot. Isso significa que eles podem ter acesso a mais funções e têm maior flexibilidade em termos de execução de ações.\n\n<emoji document_id=5472267631979405211>🚫</emoji> No entanto, é importante observar que <b>os userbots não são oficialmente suportados pelo Telegram</b> e seu uso pode violar os termos de uso da plataforma. Portanto, <b>os usuários devem ter cuidado ao usá-los</b> e garantir que nenhum código malicioso seja executado em sua conta.\n\n"
_cmd_doc_hikkainfo: "Enviar informações do tipo 'O que é Hikka?'"
_cmd_doc_info: "Envia informações sobre o bot"
_cmd_doc_setinfo: "<texto> - Alterar texto em .info"
loader:
loadmod_pm_timeout: "Por favor, espere 10 segundos antes de confirmar esta ação"
loadmod_not_allowed_fresh_pm: "<emoji document_id=5447644880824181073>⚠️</emoji> <b><u>Leia isso com atenção!</u></b> <emoji document_id=5447644880824181073>⚠️</emoji>\n\n<b>Você está tentando carregar um módulo em mensagens privadas com um usuário que você não conhece.</b> Módulos não confirmados pelo desenvolvedor podem causar muitos problemas, desde <b>manipulações com sua conta até a exclusão da conta ou comprometimento da sessão</b>. Se você conhece este usuário e confia nele <b><u>100%</u></b>, espere alguns dias e tente novamente."
link: "<emoji document_id=5256113064821926998>📁</emoji> <b>Arquivo</b> {class_name}\n\n<emoji document_id=5134452506935427991>🪐</emoji> <b>{prefix}lm em resposta a esta mensagem para instalar</b>\n\n<emoji document_id=4916086774649848789>🔗</emoji> <code>{prefix}dlm {url}</code>\n\n{not_exact}"
file: "<emoji document_id=5256113064821926998>📁</emoji> <b>Arquivo</b> {class_name}\n\n<emoji document_id=5134452506935427991>🪐</emoji> <b>{prefix}lm em resposta a esta mensagem para instalar</b>\n\n{not_exact}"
finding_module_in_repos: "<emoji document_id=5873204392429096339>🔄</emoji> Procurando módulos em repositórios..."
loading_module_via_file: "<emoji document_id=5873204392429096339>🔄</emoji> Carregando módulo..."
ml_load_module: "<emoji document_id=5873204392429096339>🔄</emoji> Descarregando módulo como arquivo..."
not_exact: "<emoji document_id=5355133243773435190>⚠️</emoji> <i>Nenhuma correspondência exata foi encontrada, então o resultado mais próximo é exibido em vez disso</i>"
args: "<emoji document_id=5210952531676504517>❌</emoji> <b>Você deve especificar argumentos</b>"
loadmod_confirm_pm_message: "<emoji document_id=5451732530048802485>⏳</emoji> <i>Aguardando sua confirmação...</i>"
loadmod_cancelled: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Carregamento do módulo cancelado</b>"
loadmod_confirm_pm: "⚠️ <b>Atenção!</b>\n\nCarregar módulos de fontes desconhecidas é <b><u>muito perigoso</u></b> e pode levar à <b>exclusão da conta ou comprometimento da sessão</b>. Certifique-se de que você conhece este usuário e confia nele <b><u>100%</u></b>.\n\n<b>Você quer continuar carregando o módulo?</b>"
loadmod_confirm_pm_yes: "✅ Sim, continuar"
loadmod_confirm_pm_no: "🚫 Não, cancelar"
repo_config_doc: "Link para baixar módulos"
add_repo_config_doc: "Repositórios adicionais"
avail_header: "🎢 <b>Módulos oficiais do repositório</b>"
no_module: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O módulo não está disponível no repositório.</b>"
no_file: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Arquivo não encontrado</b>"
provide_module: "<emoji document_id=5312383351217201533>⚠️</emoji> <b>Especifique o módulo para carregar</b>"
bad_unicode: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Codificação de módulo inválida</b>"
load_failed: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O carregamento falhou. Veja os logs.</b>"
loaded: "<emoji document_id=5134452506935427991>🪐</emoji> <b>Módulo</b> <code>{}</code>{} <b>carregado {}</b>{}{}{}{}{}{}"
no_class: "<b>E o que descarregar?</b>"
unloaded: "{} <b>Módulo {} descarregado.</b>"
not_unloaded: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Módulo não descarregado.</b>"
requirements_failed: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Erro ao instalar dependências</b>"
requirements_failed_termux: "<emoji document_id=5407025283456835913>🕶</emoji> <b>Erro ao instalar dependências</b>\n<b>Ocorre com mais frequência porque o Termux não suporta muitas bibliotecas. Não relate isso como um erro, isso não pode ser corrigido.</b>"
requirements_installing: "<emoji document_id=5328311576736833844>🚀</emoji> <b>Instalando dependências:\n\n{}</b>"
requirements_restart: "<emoji document_id=5875145601682771643>🚀</emoji> <b>Dependências instaladas, mas é necessário reiniciar para aplicar</b> <code>{}</code>"
all_modules_deleted: "<emoji document_id=5784993237412351403>✅</emoji> <b>Módulos removidos</b>"
undoc: "<emoji document_id=5427052514094619126>🤷‍♀️</emoji> Sem descrição"
ihandler: "\n<emoji document_id=5372981976804366741>🤖</emoji> <code>{}</code> {}"
version_incompatible: "<emoji document_id=5454225457916420314>😖</emoji> <b>Este módulo requer Heroku versão {}+\nAtualize usando</b> <code>.update</code>"
ffmpeg_required: "<emoji document_id=5454225457916420314>😖</emoji> <b>Este módulo requer FFMPEG, que não está instalado</b>"
developer: "\n\n<emoji document_id=5287454910059654880>🫶</emoji> <b>Desenvolvedor:</b> {}"
depends_from: "\n\n<emoji document_id=5431736674147114227>📦</emoji> <b>Dependências:</b> \n{}"
by: "por"
module_fs: "💿 <b>Você quer salvar o módulo no disco rígido para que ele não seja descarregado ao reiniciar?</b>"
save: "💿 Salvar"
no_save: "🚫 Não salvar"
save_for_all: "💽 Sempre salvar"
never_save: "🚫 Nunca salvar"
will_save_fs: "💽 Agora todos os módulos carregados de um arquivo serão salvos no disco rígido"
inline_init_failed: "<emoji document_id=5454225457916420314>😖</emoji> <b>Este módulo precisa do HerokuInline, e a inicialização do gerenciador inline falhou</b>\n<i>Tente remover um dos bots antigos em @BotFather e reiniciar o userbot</i>"
_cmd_doc_dlmod: "Baixa e instala um módulo do repositório"
_cmd_doc_loadmod: "Baixa e instala um módulo de um arquivo"
_cmd_doc_unloadmod: "Descarrega (remove) um módulo"
_cmd_doc_clearmodules: "Descarrega todos os módulos instalados"
_cls_doc: "Carrega módulos"
share_link_doc: "Indicar o link para o módulo após o carregamento via .dlmod"
modlink: "\n\n<emoji document_id=6037284117505116849>🌐</emoji> <b>Link:</b> <code>{}</code>"
blob_link: "\n\n<emoji document_id=5312383351217201533>⚠️</emoji> <b>Não use links `blob` para carregar módulos. É melhor carregar de `raw`</b>"
raw_link: "\n<emoji document_id=6037284117505116849>🌐</emoji> <b>Link:</b> <code>{}</code>"
suggest_subscribe: "\n\n⭐ <b>Este módulo foi feito por {}. Inscrever-se para apoiar o desenvolvedor?</b>"
subscribe: "💬 Inscrever-se"
no_subscribe: "🚫 Não se inscrever"
subscribed: "💬 Inscrito!"
unsubscribed: "🚫 Não vou mais sugerir a inscrição neste canal"
confirm_clearmodules: "⚠️ <b>Você tem certeza de que deseja descarregar todos os módulos?</b>"
clearmodules: "🗑 Descarregar módulos"
cancel: "🚫 Cancelar"
overwrite_module: "<emoji document_id=5454225457916420314>😖</emoji> <b>Este módulo tentou sobrescrever um integrado (</b><code>{}</code><b>)</b>\n\n<emoji document_id=5472146462362048818>💡</emoji><i> Isso não é um erro, mas uma medida de segurança necessária para evitar a substituição de módulos integrados por lixo. Não relate isso no chat de suporte</i>"
overwrite_command: "<emoji document_id=5454225457916420314>😖</emoji> <b>Este módulo tentou sobrescrever um comando integrado (</b><code>{}</code><b>)</b>\n\n<emoji document_id=5472146462362048818>💡</emoji><i> Isso não é um erro, mas uma medida de segurança necessária para evitar a substituição de comandos de módulos integrados por lixo. Não relate isso no chat de suporte</i>"
unload_core: "<emoji document_id=5454225457916420314>😖</emoji> <b>Você não pode descarregar o módulo integrado</b> <code>{}</code><b></b>\n\n<emoji document_id=5472146462362048818>💡</emoji><i> Isso não é um erro, mas uma medida de segurança necessária para evitar a substituição de módulos integrados por lixo. Não relate isso no chat de suporte</i>"
cannot_unload_lib: "<emoji document_id=5454225457916420314>😖</emoji> <b>Você não pode descarregar uma biblioteca</b>"
wait_channel_approve: "<emoji document_id=5469741319330996757>💫</emoji> <b>O módulo</b> <code>{}</code> <b>está solicitando permissão para ingressar no canal <a href=\"https://t.me/{}\">{}</a>.\n\n<b><emoji document_id=\"5467666648263564704\">❓</emoji> Motivo: {}</b>\n\n<i>Aguardando <a href=\"https://t.me/{}\">confirmação</a>...</i>"
installing: "<emoji document_id=5325792861885570739>🕔</emoji> <b>Instalando o módulo</b> <code>{}</code><b>...</b>"
repo_exists: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O repositório</b> <code>{}</code> <b>já foi adicionado</b>"
repo_added: "<emoji document_id=5784993237412351403>✅</emoji> <b>Repositório</b> <code>{}</code> <b>adicionado</b>"
no_repo: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Você deve especificar um repositório para adicionar</b>"
repo_not_exists: "<emoji document_id=5210952531676504517>🚫</emoji> <b>O repositório</b> <code>{}</code> <b>não foi adicionado</b>"
repo_deleted: "<emoji document_id=5784993237412351403>✅</emoji> <b>Repositório</b> <code>{}</code> <b>removido</b>"
_cmd_doc_addrepo: "Adicionar um repositório adicional"
_cmd_doc_delrepo: "Remover um repositório adicional"
basic_auth_doc: "Autorização para acessar o repositório"
translations:
lang_saved: "{} <b>Idioma salvo!</b>"
pack_saved: "<emoji document_id=5197474765387864959>👍</emoji> <b>Pacote de tradução salvo!</b>"
incorrect_language: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Idioma inválido especificado</b>"
lang_removed: "<emoji document_id=5197474765387864959>👍</emoji> <b>Traduções redefinidas para o padrão</b>"
check_pack: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Formato inválido do pacote de tradução no link</b>"
check_url: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Você deve especificar um link contendo um pacote de tradução</b>"
too_long: "<emoji document_id=5433653135799228968>📁</emoji> <b>A saída do comando é muito longa, então foi enviada em um arquivo.</b>"
choose_language: "🗽 <b>Selecione um idioma</b>"
not_official: "<emoji document_id=5312383351217201533>⚠️</emoji> <b>Este idioma não é oficialmente suportado</b>"
requested_join: "💫 <b>O módulo</b> <code>{}</code> <b>solicitou a adesão ao canal <a href='https://t.me/{}'>{}</a></b>\n\n<b>❓ Motivo:</b> <i>{}</i>"
fw_error: "<emoji document_id=5877458226823302157>🕒</emoji> <b>O comando</b> <code>{}</code> <b>causou FloodWait {} no método</b> <code> {}</code>"
rpc_error: "<emoji document_id=5877477244938489129>🚫</emoji> <b>O comando</b> <code>{}</code> <b>falhou devido a um erro RPC:</b> <code>{}</code>"
_cmd_doc_dllangpack: "[link para o pacote | vazio para remover] - Alterar pacote de tradução externo"
_cmd_doc_setlang: "[idiomas] - Alterar idioma padrão"
eval:
eval: "<emoji document_id={}>💻</emoji><b> Código:</b>\n<pre><code class=\"language-{}\">{}</code></pre>\n\n<emoji document_id=5197688912457245639>✅</emoji><b> Resultado:</b>\n<pre><code class=\"language-{}\">{}</code></pre>"
err: "<emoji document_id={}>💻</emoji><b> Código:</b>\n<pre><code class=\"language-{}\">{}</code></pre>\n\n<emoji document_id=5210952531676504517>🚫</emoji> <b>Erro:</b>\n<pre><code class=\"language-{}\">{}</code></pre>"
_cls_doc: "Executa código em várias linguagens de programação"
compiling: "<emoji document_id=5325787248363314644>🫥</emoji> <b>Compilando código...</b>"
no_compiler: "<emoji document_id={}>💻</emoji> <b>O compilador {} não está instalado no sistema.</b>"
_cmd_doc_e: "Executa código Python"
_cmd_doc_ebf: "Executa código Brainf*ck"
_cmd_doc_ec: "Executa código C"
_cmd_doc_ecpp: "Executa código C++"
_cmd_doc_enode: "Executa código Node.js"
_cmd_doc_ephp: "Executa código PHP"
_cmd_doc_eruby: "Executa código Ruby"
translate:
no_args: "<emoji document_id=5210952531676504517>❌</emoji> <b>Nenhum argumento especificado</b>"
error: "<emoji document_id=5210952531676504517>❌</emoji> <b>Falha ao traduzir o texto</b>"
language: "pt"
_cls_doc: "Traduz texto (obviamente)"
_cmd_doc_tr: "[idioma] [texto] - Traduzir texto"
quickstart:
base: "🪐🇧🇷 <b>Olá.</b> Seu userbot <b>Heroku</b> está instalado.\n\n❓ <b>Precisa de ajuda?</b> Junte-se ao nosso chat de suporte. Ajudamos <b>todos</b>.\n\n📼 <b>Você pode procurar e instalar módulos através de </b><code>.heta</code><b>. Basta inserir uma consulta de pesquisa e clicar em ⛩ Install no módulo desejado</b>\n\n📣 <b>Confira os canais com módulos criados pela comunidade: <a href=\"https://t.me/hikka_ub/126\">mostrar</a></b>\n\n💁 <b>Guia rápido:</b>\n\n1⃣ <b>Escreva</b> <code>.help</code> <b>para ver a lista de módulos</b>\n2⃣ <b>Escreva</b> <code>.help <Nome do módulo/comando></code> <b>para ver a descrição do módulo</b>\n3⃣ <b>Escreva</b> <code>.dlmod <link></code> <b>para carregar um módulo de um link</b>\n4⃣ <b>Escreva</b> <code>.loadmod</code> <b>em resposta a um arquivo para carregar um módulo dele</b>\n5⃣ <b>Escreva</b> <code>.unloadmod <Nome do módulo></code> <b>para descarregar um módulo</b>\n\n💡 <b>O Heroku suporta módulos do Friendly-Telegram e GeekTG, bem como seus próprios.</b>\n"
railway: "🚂 <b>Seu userbot está instalado no Railway</b>. Nesta plataforma, você recebe apenas <b>500 horas gratuitas por mês</b>. Quando o limite for atingido, seu <b>userbot será congelado</b>. No próximo mês, <b>você deverá ir para https://railway.app e reiniciá-lo</b>."
lavhost: "✌️ <b>Seu userbot está instalado no lavHost</b>. Junte-se a @lavhost para receber notificações e atualizações importantes. Todas as perguntas relacionadas à plataforma devem ser feitas em @lavhostchat."
language_saved: "🇧🇷 Idioma salvo!"
language: "🇧🇷 Português"
btn_support: "🥷 Chat de suporte"
$validators:
boolean: "valor booleano"
positive: "positivo "
digits: ", que tenha exatamente {digits} dígitos "
integer_min: "{sign}número inteiro maior que {minimum}{digits}"
integer_range: "{sign}número inteiro no intervalo de {minimum} a {maximum}{digits}"
integer: "{sign}número inteiro{digits}"
integer_max: "{sign}número inteiro menor que {maximum}{digits}"
choice: "um de: {possible}"
multichoice: "lista de valores, cada um dos quais deve ser um dos seguintes: {possible}"
each: " (cada um deve ser {each})"
fixed_len: " (exatamente {fixed_len} itens)"
max_len: " (até {max_len} itens)"
len_range: " (de {min_len} a {max_len} itens)"
min_len: " (pelo menos {min_len} itens)"
series: "lista de valores{len}{each}, separados por «,»"
link: "link"
string_fixed_len: "string de {length} caractere(s)"
string: "string"
string_max_len: "string de no máximo {max_len} caractere(s)"
string_len_range: "string de {min_len}-{max_len} caractere(s)"
string_min_len: "string de pelo menos {min_len} caractere(s)"
regex: "string que corresponda ao padrão «{regex}»"
float_min: "{sign}número decimal maior que {minimum}"
float_range: "{sign}número decimal no intervalo de {minimum} a {maximum}"
float: "{sign}número decimal"
float_max: "{sign}número decimal menor que {maximum}"
union: "um dos seguintes:\n"
empty: "valor vazio"
emoji_fixed_len: "exatamente {length} emojis"
emoji_len_range: "de {min_len} a {max_len} emojis"
emoji_min_len: "pelo menos {min_len} emojis"
emoji_max_len: "no máximo {max_len} emojis"
emoji: "emoji"
entity_like: "link para uma entidade, nome de usuário ou ID do Telegram"
$inline:
opening_form: " <b>Abrindo formulário...</b>"
opening_gallery: " <b>Abrindo galeria...</b>"
opening_list: " <b>Abrindo lista...</b>"
inline403: "<emoji document_id=5210952531676504517>🚫</emoji> <b>Você não pode enviar elementos inline neste chat</b>"
invoke_failed: "<emoji document_id=5210952531676504517>🚫</emoji> <b>A invocação da unidade falhou! Mais detalhes nos logs</b>"
invoke_failed_logs: "<emoji document_id=5210952531676504517>🚫</emoji> <b>A invocação da unidade falhou!</b>\n\n<emoji document_id=5226512880362332956>📖</emoji> <b>Logs:</b>\n\n<pre><code class=\"language-logs\">{}</code></pre>"
show_inline_cmds: "📄 Mostrar todos os comandos inline disponíveis"
no_inline_cmds: "Você não tem comandos inline disponíveis"
no_inline_cmds_msg: "<b>😔 Não há comandos inline disponíveis ou você não tem acesso a eles</b>"
inline_cmds: " Você tem {} comando(s) inline disponível(is)"
inline_cmds_msg: "<b> Comandos inline disponíveis:</b>\n\n{}"
run_command: "🏌️ Executar comando"
command_msg: "<b>🪐 Comando «{}»</b>\n\n<i>{}</i>"
command: "🪐 Comando «{}»"
button403: "Você não pode clicar neste botão!"
keep_id: "⚠️ Não exclua o ID! {}"

View File

@@ -0,0 +1,222 @@
# ------------------------------------------------------------
# Module: CopyUser
# Description: One command, and you are already another.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .copyuser .backupme .restoreme
# scope: hikka_only
# meta banner: https://i.ibb.co/515XxY1/e3583b3c-434a-49fc-b532-cc70a3b5eccc.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
from telethon.tl.functions.users import GetFullUserRequest
from telethon.tl.functions.account import UpdateProfileRequest, UpdateEmojiStatusRequest
from telethon.tl.functions.photos import UploadProfilePhotoRequest, DeletePhotosRequest
from telethon.errors import UsernameNotOccupiedError, UsernameInvalidError, ImageProcessFailedError
from telethon import types, functions
import io
import requests
import os
__version__ = (1, 0, 9)
@loader.tds
class ProfileToolsModule(loader.Module):
"""Copy profile data from any user"""
strings = {
"name": "CopyUser",
"user_not_found": "<emoji document_id=5210952531676504517>❌</emoji><b>Failed to find user!</b>",
"specify_user": "<emoji document_id=5832251986635920010>➡️</emoji><b>Specify user (reply/@username/ID)!</b>",
"profile_copied": "<emoji document_id=5397916757333654639></emoji> <b>User profile copied!</b>",
"username_not_found": "<emoji document_id=5240241223632954241>🚫</emoji> <b>User not found!</b>",
"invalid_username": "<emoji document_id=5240241223632954241>🚫</emoji> <b>Invalid username/ID format.</b>",
"backup_saved": "<emoji document_id=5294096239464295059>🔵</emoji> <b>Your current profile has been saved. You can restore it using</b> <code>restoreme</code>\n\n<b>⚙️ Current Avatar URL: {}</b>",
"no_backup": "❌ <b>No backup found!</b>",
"profile_restored": "<emoji document_id=5294096239464295059>🔵</emoji> <b>Your previous profile has been restored.</b>",
"error": "😵 Error: {}"
}
strings_ru = {
"name": "CopyUser",
"user_not_found": "<emoji document_id=5210952531676504517>❌</emoji><b>Не удалось найти пользователя!</b>",
"specify_user": "<emoji document_id=5832251986635920010>➡️</emoji><b>Укажите пользователя (reply/@username/ID)!</b>",
"profile_copied": "<emoji document_id=5397916757333654639></emoji> <b>Профиль пользователя скопирован!</b>",
"username_not_found": "<emoji document_id=5240241223632954241>🚫</emoji> <b>Пользователь не найден!</b>",
"invalid_username": "<emoji document_id=5240241223632954241>🚫</emoji> <b>Неверный формат юзернейма/ID.</b>",
"backup_saved": "<emoji document_id=5294096239464295059>🔵</emoji> <b>Ваш данный профиль сохранен. Вы можете вернуть его используя</b> <code>restoreme</code>\n\n<b>⚙️ URL данной Аватарки: {}</b>",
"no_backup": "❌ <b>Резервная копия не найдена!</b>",
"profile_restored": "<emoji document_id=5294096239464295059>🔵</emoji> <b>Ваш прошлый профиль возвращен.</b>",
"error": "😵 Ошибка: {}"
}
def init(self):
self.name = self.strings["name"]
self._backup_data = None
async def client_ready(self, client, db):
self.client = client
self.db = db
async def upload_to_0x0(self, photo_bytes):
try:
files = {'file': ('photo.png', photo_bytes)}
response = requests.post(
'https://0x0.st',
files=files,
data={'secret': True}
)
return response.text.strip()
except Exception as e:
return f"Error: {str(e)}"
@loader.command(ru_doc="Скопировать профиль пользователя (работает по reply/@username/ID)", en_doc="Copy user profile (works with reply/@username/ID)")
async def copyuser(self, message):
args = utils.get_args_raw(message)
reply = await message.get_reply_message()
try:
if args:
try:
if args.isdigit():
user = await message.client.get_entity(int(args))
else:
user = await message.client.get_entity(args)
except ValueError:
await utils.answer(message, self.strings["user_not_found"])
return
elif reply:
user = await reply.get_sender()
else:
await utils.answer(message, self.strings["specify_user"])
return
full = await message.client(GetFullUserRequest(user.id))
user_info = full.users[0]
me = await message.client.get_me()
if full.full_user.profile_photo:
try:
photos = await message.client.get_profile_photos(user.id)
if photos:
await message.client(DeletePhotosRequest(
await message.client.get_profile_photos("me")
))
photo = await message.client.download_media(photos[0])
await message.client(UploadProfilePhotoRequest(
file=await message.client.upload_file(photo)
))
os.remove(photo)
except:
pass
await message.client(UpdateProfileRequest(
first_name=user_info.first_name if user_info.first_name is not None else "",
last_name=user_info.last_name if user_info.last_name is not None else "",
about=full.full_user.about[:70] if full.full_user.about is not None else "",
))
if hasattr(user_info, 'emoji_status') and user_info.emoji_status and me.premium:
try:
await message.client(
UpdateEmojiStatusRequest(
emoji_status=user_info.emoji_status
)
)
except:
pass
await utils.answer(message, self.strings["profile_copied"])
except UsernameNotOccupiedError:
await utils.answer(message, self.strings["username_not_found"])
except UsernameInvalidError:
await utils.answer(message, self.strings["invalid_username"])
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
@loader.command(ru_doc="Создать резервную копию вашего профиля", en_doc="Create backup of your profile")
async def backupme(self, message):
try:
user = await self.client.get_me()
full = await self.client(GetFullUserRequest(user.id))
user_info = full.users[0]
avatar_url = None
photos = await self.client.get_profile_photos(user.id)
if photos:
photo = await self.client.download_media(photos[0], bytes)
avatar_url = await self.upload_to_0x0(photo)
emoji_status_id = None
if hasattr(user_info, 'emoji_status') and user_info.emoji_status:
emoji_status_id = user_info.emoji_status.document_id
backup_data = {
"first_name": user_info.first_name,
"last_name": user_info.last_name,
"about": full.full_user.about,
"avatar_url": avatar_url,
"emoji_status_id": emoji_status_id
}
self.db.set("BackupProfile", "backup_data", backup_data)
await utils.answer(
message,
self.strings["backup_saved"].format(avatar_url)
)
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
@loader.command(ru_doc="Восстановить профиль из резервной копии", en_doc="Restore profile from backup")
async def restoreme(self, message):
try:
backup_data = self.db.get("BackupProfile", "backup_data")
me = await message.client.get_me()
if not backup_data:
await utils.answer(message, self.strings["no_backup"])
return
if backup_data.get("avatar_url"):
try:
photos = await self.client.get_profile_photos('me')
await self.client(DeletePhotosRequest(photos))
response = requests.get(backup_data["avatar_url"])
avatar_bytes = io.BytesIO(response.content)
await self.client(UploadProfilePhotoRequest(
file=await self.client.upload_file(avatar_bytes)
))
except:
pass
await self.client(UpdateProfileRequest(
first_name=backup_data.get("first_name", ""),
last_name=backup_data.get("last_name", "") or "",
about=backup_data.get("about", "")
))
if backup_data.get("emoji_status_id") and me.premium:
try:
await self.client(
UpdateEmojiStatusRequest(
emoji_status=types.EmojiStatus(
document_id=backup_data["emoji_status_id"]
)
)
)
except:
pass
await utils.answer(message, self.strings["profile_restored"])
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))

View File

@@ -0,0 +1,205 @@
from .. import loader, utils
import datetime
import time
import random
# meta developer: @kmodules
__version__ = (1, 0, 0)
@loader.tds
class CountTimeModule(loader.Module):
"""Модуль для отслеживания времени до разных событий, ВРЕМЯ может быть неправильное, потому что у вас на сервере такое время. На Termux время правильное..."""
strings = {
"name": "CountTime",
"newyear_hints": [
"Time to make New Year resolutions!",
"Get ready for the countdown!",
"New Year, new beginnings!",
"Time to prepare the champagne!",
"Ready for midnight magic?"
],
"winter_hints": [
"Winter wonderland is coming!",
"Time for hot chocolate!",
"Snowflakes will fall soon!",
"Get your winter clothes ready!",
"Winter magic approaches!"
],
"spring_hints": [
"Spring flowers are on their way!",
"Birds will sing again soon!",
"Nature is preparing to bloom!",
"Spring rain will refresh everything!",
"Time for new beginnings!"
],
"summer_hints": [
"Beach time is coming!",
"Get ready for sunny days!",
"Summer adventures await!",
"Ice cream season approaches!",
"Time for vacation plans!"
],
"autumn_hints": [
"Fall colors are coming!",
"Time for cozy sweaters!",
"Falling leaves season ahead!",
"Pumpkin spice everything!",
"Autumn magic is near!"
]
}
strings_ru = {
"name": "CountTime",
"newyear_hints": [
"Пора загадывать желания!",
"Готовимся к обратному отсчету!",
"Новый год = новые возможности!",
"Пацаны, готовим шампанское!",
"Держимся, держимся..."
"Скоро волшебная ночь!"
],
"winter_hints": [
"Скоро зимняя сказка!",
"Время горячего шоколада!",
"Мам, подари шоколад."
"Скоро пойдет снег!",
"Готовь теплую одежду!",
"Зимнее волшебство приближается!"
],
"spring_hints": [
"Весенние цветы уже в пути!",
"Скоро запоют птицы!",
"Еще немного..."
"Природа готовится к цветению!",
"Весенние дожди освежат всё вокруг!",
"Время новых начинаний!"
],
"summer_hints": [
"Скоро на пляж!",
"Включаем вентилятор?"
"Готовься к солнечным дням!",
"Летние приключения ждут!",
"Сезон мороженого приближается!",
"Время планировать отпуск!"
],
"autumn_hints": [
"Золотая осень!",
"Время уютных свитеров!",
"Приближается сезон падающих листьев!",
"Тыквенный латте уже ждет!",
"Осеннее волшебство близко!"
]
}
def __init__(self):
self.seasons = {
'winter': (12, 1, 2),
'spring': (3, 4, 5),
'summer': (6, 7, 8),
'autumn': (9, 10, 11)
}
def _get_next_date(self, month, day):
now = datetime.datetime.now()
year = now.year
target = datetime.datetime(year, month, day)
if target < now:
target = datetime.datetime(year + 1, month, day)
return target
def _get_next_season(self, season):
now = datetime.datetime.now()
year = now.year
if season == 'winter':
return self._get_next_date(12, 1)
elif season == 'spring':
return self._get_next_date(3, 1)
elif season == 'summer':
return self._get_next_date(6, 1)
else:
return self._get_next_date(9, 1)
def _format_time_left(self, target):
now = datetime.datetime.now()
diff = target - now
days = diff.days
hours = diff.seconds // 3600
seconds = diff.seconds % 3600
return f"| {days} дней | {hours} часов | {seconds} секунд |"
@loader.command()
async def nytime(self, message):
"""Показывает время до нового года"""
next_ny = self._get_next_date(1, 1)
time_left = self._format_time_left(next_ny)
hint = random.choice(self.strings['newyear_hints'])
await utils.answer(
message,
f"<emoji document_id=5287722241709057624>😉</emoji> <b>До нового года осталось:</b>\n\n"
f"<blockquote>{time_left}</blockquote>\n\n"
f"<emoji document_id=5463144094945516339>👍</emoji> <b>{hint}</b>"
)
@loader.command()
async def wintertime(self, message):
"""Показывает время до зимы"""
next_winter = self._get_next_season('winter')
time_left = self._format_time_left(next_winter)
hint = random.choice(self.strings['winter_hints'])
await utils.answer(
message,
f"<emoji document_id=5201743825441145795>❄️</emoji> <b>До зимы осталось:</b>\n\n"
f"<blockquote>{time_left}</blockquote>\n\n"
f"<emoji document_id=5463144094945516339>👍</emoji> <b>{hint}</b>"
)
@loader.command()
async def springtime(self, message):
"""Показывает время до весны"""
next_spring = self._get_next_season('spring')
time_left = self._format_time_left(next_spring)
hint = random.choice(self.strings['spring_hints'])
await utils.answer(
message,
f"<emoji document_id=5195140682590722632>🏠</emoji> <b>До весны осталось:</b>\n\n"
f"<blockquote>{time_left}</blockquote>\n\n"
f"<emoji document_id=5463144094945516339>👍</emoji> <b>{hint}</b>"
)
@loader.command()
async def summertime(self, message):
"""Показывает время до лета"""
next_summer = self._get_next_season('summer')
time_left = self._format_time_left(next_summer)
hint = random.choice(self.strings['summer_hints'])
await utils.answer(
message,
f"<emoji document_id=5472178859300363509>🏖️</emoji> <b>До лета осталось:</b>\n\n"
f"<blockquote>{time_left}</blockquote>\n\n"
f"<emoji document_id=5463144094945516339>👍</emoji> <b>{hint}</b>"
)
@loader.command()
async def autumntime(self, message):
"""Показывает время до осени"""
next_autumn = self._get_next_season('autumn')
time_left = self._format_time_left(next_autumn)
hint = random.choice(self.strings['autumn_hints'])
await utils.answer(
message,
f"<emoji document_id=5416034540000910728>🤧</emoji> <b>До осени осталось:</b>\n\n"
f"<blockquote>{time_left}</blockquote>\n\n"
f"<emoji document_id=5463144094945516339>👍</emoji> <b>{hint}</b>"
)

View File

@@ -0,0 +1,40 @@
from .. import loader, utils
import requests
@loader.tds
class CurrencyMod(loader.Module):
"""Get current currency exchange rates"""
strings = {
"name": "K:Currency",
"usage": "<emoji document_id=5465665476971471368>❌</emoji> <b>Usage: .rate USD EUR.</b>",
"error": "<emoji document_id=5467890025217661107>‼️</emoji> <b>Error getting exchange rate.</b>",
"searching": "<emoji document_id=5188311512791393083>🔎</emoji> <b>Searching for exchange rate...</b>",
"result": "<emoji document_id=5359785904535774578>💼</emoji> <b>1 {} = {} {}</b>"
}
strings_ru = {
"name": "K:Currency",
"usage": "<emoji document_id=5465665476971471368>❌</emoji> <b>Использование: .rate USD EUR.</b>",
"error": "<emoji document_id=5467890025217661107>‼️</emoji> <b>Ошибка получения курса валют.</b>",
"searching": "<emoji document_id=5188311512791393083>🔎</emoji> <b>Ищу курс валют...</b>",
"result": "<emoji document_id=5359785904535774578>💼</emoji> <b>1 {} = {} {}</b>"
}
@loader.command()
async def rate(self, message):
"""<from> <to> - Get exchange rate"""
args = utils.get_args_raw(message)
if not args or len(args.split()) != 2:
await utils.answer(message, self.strings["usage"])
return
base, target = args.upper().split()
await utils.answer(message, self.strings["searching"])
try:
response = requests.get(f"https://open.er-api.com/v6/latest/{base}")
data = response.json()
rate = data["rates"][target]
await utils.answer(message, self.strings["result"].format(base, rate, target))
except Exception:
await utils.answer(message, self.strings["error"])

View File

@@ -0,0 +1,23 @@
ksenongpt
copyuser
telegraph
randommemes
kcustominfo
text2speech
quizai
audio2text
ksenonafk
kshortlinker
kuploader
ytsearch
github
counttime
wikisearch
randomfact
kweather
currency
russianroulette
kaccountdata
genderguesser
krandomuser
howmuch

View File

@@ -0,0 +1,103 @@
from .. import loader, utils
import requests
__version__ = (1, 0, 0)
# meta developer: @kmodules
male = "<emoji document_id=5999325196543071034>🖤</emoji>"
female = "<emoji document_id=5996979985485665124>❤️‍🔥</emoji>"
unknown = "<emoji document_id=5996716235838985244>🩵</emoji>"
@loader.tds
class GenderGuesserMod(loader.Module):
"""Узнать примерный гендеор пользователя"""
strings = {
"name": "GenderGuesser",
"thinking": "<emoji document_id=5307675706283533118>🫥</emoji> <b>Думаю о гендере {}</b>...",
"result": "<emoji document_id=5879770735999717115>👤</emoji> <b>Примерный гендер {}</b>:\n\n{} <b>{}</b>",
"need_args": "<b>Укажите имя</b>"
}
strings_ru = {
"name": "GenderGuesser",
"thinking": "<emoji document_id=5307675706283533118>🫥</emoji> <b>Думаю о гендере {}</b>...",
"result": "<emoji document_id=5879770735999717115>👤</emoji> <b>Примерный гендер {}</b>:\n\n{} <b>{}</b>",
"need_args": "<b>Укажите имя</b>"
}
@loader.command()
async def gender(self, message):
"""Примерный гендер по username/reply
Пример: .gender @username or reply"""
reply = await message.get_reply_message()
args = utils.get_args_raw(message)
if not reply and not args:
return await message.edit("<b>❗ Нужен юзернейм или репли!</b>")
if reply:
user = await reply.get_sender()
name = user.first_name
else:
user = await self._client.get_entity(args)
name = user.first_name
await message.edit(self.strings["thinking"].format(name))
response = requests.get(f"https://api.genderize.io?name={name}")
result = response.json()
if result["gender"] == "female":
emoji = female
gender = "Женщина"
elif result["gender"] == "male":
emoji = male
gender = "Мужчина"
else:
emoji = unknown
gender = "Неизвестно"
await message.edit(
self.strings["result"].format(
name,
emoji,
gender
)
)
@loader.command()
async def gendername(self, message):
"""Примерный гендер по имени.
Пример: .gendername Максим"""
args = utils.get_args_raw(message)
if not args:
return await message.edit(self.strings["need_args"])
await message.edit(self.strings["thinking"].format(args))
response = requests.get(f"https://api.genderize.io?name={args}")
result = response.json()
if result["gender"] == "female":
emoji = female
gender = "Женщина"
elif result["gender"] == "male":
emoji = male
gender = "Мужчина"
else:
emoji = unknown
gender = "Неизвестно"
await message.edit(
self.strings["result"].format(
args,
emoji,
gender
)
)

View File

@@ -0,0 +1,112 @@
# ------------------------------------------------------------
# Module: GitHubInfo
# Description: Module for GitHub profile information.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .github
# scope: hikka_only
# meta developer: @kmodules
# ------------------------------------------------------------
import requests
from datetime import datetime
from .. import loader, utils
__version__ = (1, 0, 1)
@loader.tds
class GitHubInfoMod(loader.Module):
"""Module for viewing GitHub profile information"""
strings = {
"name": "GitHubInfo",
"no_username": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>Please specify a username!</b>",
"user_not_found": "<emoji document_id=5210952531676504517>❌</emoji> <b>User not found</b>",
"error": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>Error getting data</b>: <i>{}</i>",
"loading": "<emoji document_id=5328239124933515868>⚙️</emoji> <b>Loading information...</b>",
"repos": "repositories",
"no_data": "No data"
}
strings_ru = {
"name": "GitHubInfo",
"no_username": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>Укажите имя пользователя!</b>",
"user_not_found": "<emoji document_id=5210952531676504517>❌</emoji> <b>Пользователь не найден</b>",
"error": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>Ошибка при получении данных</b>: <i>{}</i>",
"loading": "<emoji document_id=5328239124933515868>⚙️</emoji> <b>Загружаю информацию...</b>",
"repos": "репозиториев",
"no_data": "Нет данных"
}
async def client_ready(self, client, db):
self.client = client
@loader.command(ru_doc="<username> - получить информацию о профиле GitHub",
en_doc="<username> - get GitHub profile information")
async def github(self, message):
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_username"])
return
await utils.answer(message, self.strings["loading"])
try:
r = requests.get(f"https://api.github.com/users/{args}")
if r.status_code == 404:
await utils.answer(message, self.strings["user_not_found"])
return
if r.status_code != 200:
await utils.answer(message, self.strings["error"].format("Invalid API response"))
return
user = r.json()
repos = requests.get(f"https://api.github.com/users/{args}/repos")
repos_data = repos.json()
languages = {}
for repo in repos_data:
if repo['language'] and not repo['fork']:
languages[repo['language']] = languages.get(repo['language'], 0) + 1
top_langs = sorted(languages.items(), key=lambda x: x[1], reverse=True)[:3]
if len(top_langs) > 1:
langs_parts = []
for i, lang in enumerate(top_langs):
prefix = "" if i < len(top_langs)-1 else ""
langs_parts.append(f"{prefix}<b>{lang[0]}:</b> <i>{lang[1]} {self.strings['repos']}</i>")
langs_text = "\n".join(langs_parts)
elif len(top_langs) == 1:
langs_text = f" ┗ <b>{top_langs[0][0]}:</b> <i>{top_langs[0][1]} {self.strings['repos']}</i>"
else:
langs_text = f"{self.strings['no_data']}"
created = datetime.strptime(user['created_at'], "%Y-%m-%dT%H:%M:%SZ")
created_date = created.strftime("%d.%m.%Y")
text = (
f"<emoji document_id=5296237851891998039>😸</emoji> <b>Github profile:</b>\n\n"
f"<emoji document_id=5879770735999717115>👤</emoji> <b>Main information:</b>\n"
f" ┣ <b>Github username:</b> <a href='https://github.com/{user['login']}'>{user['login']}</a>\n"
f" ┣ <b>Company:</b> {user['company'] or ''}\n"
f" ┣ <b>Account created:</b> {created_date}\n"
f" ┣ <b>Website:</b> {user['blog'] or ''}\n"
f" ┗ <b>Email:</b> {user['email'] or ''}\n\n"
f"<emoji document_id=5305610789717902392>📊</emoji> <b>Statistics:</b>\n"
f" ┣ <b>Followers:</b> {user['followers']}\n"
f" ┣ <b>Following:</b> {user['following']}\n"
f" ┣ <b>Public repositories:</b> {user['public_repos']}\n"
f" ┗ <b>Public gists:</b> {user['public_gists']}\n\n"
f"<emoji document_id=5472196174825901368>💡</emoji> <b>Most used languages:</b>\n"
f"{langs_text}"
)
await utils.answer(message, text)
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))

View File

@@ -0,0 +1,107 @@
from .. import loader, utils
import os
__version__ = (1, 0, 0)
# meta developer: @kmodules
@loader.tds
class GPMToolMod(loader.Module):
"""Модуль позволяет пересылать сообщение из канала, где это запрещено."""
strings = {
"name": "GPMTool",
"no_args": "<emoji document_id=5116151848855667552>🚫</emoji> <b>Укажите ссылку правильно.</b>\n\n<blockquote>Пример: .gpm <a href='https://t.me/channel/9'>https://t.me/channel/9</a></blockquote>",
"invalid_args": "<emoji document_id=5116151848855667552>🚫</emoji><b> Неверный формат ссылки.</b>",
"msg_not_found": "<emoji document_id=5116151848855667552>🚫</emoji><b> Сообщение не найдено.</b>",
"no_premium": "<emoji document_id=5121063440311386962>👎</emoji><b> У вас нету Telegram Premium. </b>\n\n<blockquote>Сообщение будет отправлено без премиум эмоджи.</blockquote>",
"loading": "<emoji document_id=5434105584834067115>🤑</emoji><b> Загрузка...</b>"
}
async def client_ready(self, client, db):
self.client = client
@loader.command()
async def gpm(self, message):
"""<ссылка: https://t.me/канал/номер_поста> Переслать сообщения из канала, где запрещено."""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_args"])
return
try:
if not args.startswith('https://t.me/'):
await utils.answer(message, self.strings["invalid_args"])
return
channel = args.split('https://t.me/')[1].split('/')[0]
msg_id = int(args.split('/')[-1])
except ValueError:
await utils.answer(message, self.strings["invalid_args"])
return
await utils.answer(message, self.strings["loading"])
me = await self.client.get_me()
has_premium = getattr(me, 'premium', False)
copied_message = await self.client.get_messages(channel, ids=msg_id)
if not copied_message:
await utils.answer(message, self.strings["msg_not_found"])
return
media = None
caption = copied_message.message
file_path = None
if copied_message.media:
file_path = await copied_message.download_media()
if hasattr(copied_message.media, 'photo'):
media = 'photo'
elif hasattr(copied_message.media, 'document'):
media = 'document'
elif hasattr(copied_message.media, 'audio'):
media = 'audio'
elif hasattr(copied_message.media, 'video'):
media = 'video'
elif hasattr(copied_message.media, 'voice'):
media = 'voice'
elif hasattr(copied_message.media, 'video_note'):
media = 'video_note'
elif hasattr(copied_message.media, 'sticker'):
media = 'sticker'
if media:
if media == 'photo':
await self.client.send_file(
message.chat_id,
file_path,
caption=caption,
parse_mode='html',
formatting_entities=copied_message.entities
)
else:
await self.client.send_file(
message.chat_id,
file_path,
caption=caption,
parse_mode='html',
formatting_entities=copied_message.entities,
voice_note=(media == 'voice'),
video_note=(media == 'video_note')
)
if file_path:
os.remove(file_path)
await message.delete()
else:
await utils.answer(
message,
copied_message.message,
parse_mode='html'
)
if not has_premium and message.chat_id != "me":
await self.client.send_message(message.chat_id, self.strings["no_premium"])

View File

@@ -0,0 +1,183 @@
from .. import loader, utils
from telethon.tl.types import Message
import random
import json
from io import BytesIO
from ..inline.types import InlineCall
# meta developer: @kmodules
__version__ = (1, 0, 0)
@loader.tds
class HowMuchMod(loader.Module):
"""Модуль для проверки насколько вы ..."""
strings = {
"name": "HowMuch",
"no_template": "<emoji document_id=5219901967916084166>💥</emoji> <b>Шаблон {} не найден.</b>",
"template_exists": "<emoji document_id=5220070652756635426>👀</emoji> <b>Шаблон уже существует.</b>",
"template_added": "<emoji document_id=5219899949281453881>✅</emoji> <b>Шаблон был добавлен.</b>",
"template_deleted": "<emoji document_id=5260424249914435335>♨️</emoji> <b>Шаблон {} был удалён.</b>",
"templates": "<emoji document_id=5420239291508868251>⭐️</emoji> <b>Шаблоны:</b>\n\n{}\n\n<emoji document_id=5116368680279606270>♥️</emoji><b> Используйте шаблоны через .howmuch &lt;шаблон&gt;.\n</b><emoji document_id=5085022089103016925>⚡️</emoji><b> Создайте шаблон через</b> <b>.addtemplate &lt;title&gt; &lt;emoji&gt;</b>",
"backup_done": "<emoji document_id=5251429849662243654>🦋</emoji> <b>Бэкап шаблонов.</b>",
"restore_done": "<emoji document_id=5251333384696776743>⚡️</emoji> <b>Шаблоны были вставлены.</b>",
"no_reply": "<emoji document_id=5219901967916084166>💥</emoji> <b>Ответьте на файл с шаблонами.</b>"
}
def __init__(self):
self.default_templates = {
"крутой": "😎",
"гей": "🏳️‍🌈",
"умный": "🤓",
"смелый": "🥱",
"быстрый": "😶‍🌫️",
"секретный": "🔑",
"свободный": "🗻",
"сильный": "🏋️‍♂️",
"программист": "👨‍💻",
"учитель": "👨‍🏫",
"робот": "🤖",
"удачный": "🍀"
}
self.config = loader.ModuleConfig(
"templates",
self.default_templates.copy(),
"Конфиг шаблонов",
"buttons",
False,
"Включить/выключить кнопку Перепройти"
)
def get_result(self, emoji, template, percent):
return f"<b>{emoji} Вы {template} на <i>{percent}%</i> процентов!</b>"
def get_template(self, query: str):
query = query.lower()
for template in self.config["templates"]:
if template.lower() == query:
return template
return None
@loader.command()
async def howmuch(self, message: Message):
"""Проверить насколько вы подходите под шаблон"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_template"].format(""))
return
template = self.get_template(args)
if not template:
await utils.answer(message, self.strings["no_template"].format(args))
return
percent = random.randint(0, 100)
emoji = self.config["templates"][template]
result_text = self.get_result(emoji, template, percent)
if self.config["buttons"]:
await self.inline.form(
message=message,
text=result_text,
reply_markup=[
[{"text": f"{emoji} Перепройти", "callback": self.retry_callback, "args": (template,)}]
]
)
else:
await utils.answer(message, result_text)
async def retry_callback(self, call: InlineCall, template: str):
percent = random.randint(0, 100)
emoji = self.config["templates"][template]
await call.edit(
text=self.get_result(emoji, template, percent),
reply_markup=[
[{"text": f"{emoji} Перепройти", "callback": self.retry_callback, "args": (template,)}]
]
)
@loader.command()
async def templates(self, message: Message):
"""Показать список доступных шаблонов"""
templates_text = ""
for i, (template, emoji) in enumerate(self.config["templates"].items(), 1):
templates_text += f"{i}. {template} -> {emoji}\n"
await utils.answer(
message,
self.strings["templates"].format(f"<b>{templates_text}</b>")
)
@loader.command()
async def addtemplate(self, message: Message):
"""Добавить новый шаблон"""
args = utils.get_args_raw(message)
if not args or len(args.split()) != 2:
await utils.answer(message, self.strings["no_template"].format(""))
return
title, emoji = args.split()
title_lower = title.lower()
for template in self.config["templates"]:
if template.lower() == title_lower:
await utils.answer(message, self.strings["template_exists"])
return
self.config["templates"][title] = emoji
await utils.answer(message, self.strings["template_added"])
@loader.command()
async def deltemplate(self, message: Message):
"""Удалить пользовательский шаблон"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_template"].format(""))
return
template = self.get_template(args)
if not template:
await utils.answer(message, self.strings["no_template"].format(args))
return
if template in self.default_templates:
await utils.answer(message, self.strings["no_template"].format(args))
return
del self.config["templates"][template]
await utils.answer(message, self.strings["template_deleted"].format(template))
@loader.command()
async def backupts(self, message: Message):
"""Сделать бэкап пользовательских шаблонов"""
user_templates = {}
for template, emoji in self.config["templates"].items():
if template not in self.default_templates:
user_templates[template] = emoji
backup = json.dumps(user_templates, indent=2, ensure_ascii=False)
file = BytesIO(backup.encode())
file.name = "templates_backup.json"
await message.respond(
self.strings["backup_done"],
file=file
)
@loader.command()
async def restorets(self, message: Message):
"""Восстановить шаблоны из бэкапа"""
reply = await message.get_reply_message()
if not reply or not reply.document:
await utils.answer(message, self.strings["no_reply"])
return
try:
data = json.loads((await reply.download_media(bytes)).decode())
templates = self.config["templates"].copy()
templates.update(data)
self.config["templates"] = templates
await utils.answer(message, self.strings["restore_done"])
except Exception:
await utils.answer(message, self.strings["no_reply"])

View File

@@ -0,0 +1,266 @@
from .. import loader, utils
from telethon.tl.functions.messages import ImportChatInviteRequest
import asyncio
from datetime import datetime
from dateutil.relativedelta import relativedelta
import numpy as np
import time
# meta developer: @kmodules
__version__ = (1, 1, 0)
data = {
"1000000": 1380326400,
"2768409": 1383264000,
"7679610": 1388448000,
"11538514": 1391212000,
"15835244": 1392940000,
"23646077": 1393459000,
"38015510": 1393632000,
"44634663": 1399334000,
"46145305": 1400198000,
"54845238": 1411257000,
"63263518": 1414454000,
"101260938": 1425600000,
"101323197": 1426204000,
"103151531": 1433376000,
"103258382": 1432771000,
"109393468": 1439078000,
"111220210": 1429574000,
"112594714": 1439683000,
"116812045": 1437696000,
"122600695": 1437782000,
"124872445": 1439856000,
"125828524": 1444003000,
"130029930": 1441324000,
"133909606": 1444176000,
"143445125": 1448928000,
"148670295": 1452211000,
"152079341": 1453420000,
"157242073": 1446768000,
"171295414": 1457481000,
"181783990": 1460246000,
"222021233": 1465344000,
"225034354": 1466208000,
"278941742": 1473465000,
"285253072": 1476835000,
"294851037": 1479600000,
"297621225": 1481846000,
"328594461": 1482969000,
"337808429": 1487707000,
"341546272": 1487782000,
"352940995": 1487894000,
"369669043": 1490918000,
"400169472": 1501459000,
"616816630": 1529625600,
"681896077": 1532821500,
"727572658": 1543708800,
"796147074": 1541371800,
"925078064": 1563290000,
"928636984": 1581513420,
"1054883348": 1585674420,
"1057704545": 1580393640,
"1145856008": 1586342040,
"1227964864": 1596127860,
"1382531194": 1600188120,
"1658586909": 1613148540,
"1660971491": 1613329440,
"1692464211": 1615402500,
"1719536397": 1619293500,
"1721844091": 1620224820,
"1772991138": 1617540360,
"1807942741": 1625520300,
"1893429550": 1622040000,
"1972424006": 1631669400,
"1974255900": 1634000000,
"2030606431": 1631992680,
"2041327411": 1631989620,
"2078711279": 1634321820,
"2104178931": 1638353220,
"2120496865": 1636714020,
"2123596685": 1636503180,
"2138472342": 1637590800,
"3318845111": 1618028800,
"4317845111": 1620028800,
"5162494923": 1652449800,
"5186883095": 1648764360,
"5304951856": 1656718440,
"5317829834": 1653152820,
"5318092331": 1652024220,
"5336336790": 1646368100,
"5362593868": 1652024520,
"5387234031": 1662137700,
"5396587273": 1648014800,
"5409444610": 1659025020,
"5416026704": 1660925460,
"5465223076": 1661710860,
"5480654757": 1660926300,
"5499934702": 1662130740,
"5513192189": 1659626400,
"5522237606": 1654167240,
"5537251684": 1664269800,
"5559167331": 1656718560,
"5568348673": 1654642200,
"5591759222": 1659025500,
"5608562550": 1664012820,
"5614111200": 1661780160,
"5666819340": 1664112240,
"5684254605": 1662134040,
"5684689868": 1661304720,
"5707112959": 1663803300,
"5756095415": 1660925940,
"5772670706": 1661539140,
"5778063231": 1667477640,
"5802242180": 1671821040,
"5853442730": 1674866100,
"5859878513": 1673117760,
"5885964106": 1671081840,
"5982648124": 1686941700,
"6020888206": 1675534800,
"6032606998": 1686998640,
"6057123350": 1676198350,
"6058560984": 1686907980,
"6101607245": 1686830760,
"6108011341": 1681032060,
"6132325730": 1692033840,
"6182056052": 1687870740,
"6279839148": 1688399160,
"6306077724": 1692442920,
"6321562426": 1688486760,
"6364973680": 1696349340,
"6386727079": 1691696880,
"6429580803": 1692082680,
"6527226055": 1690289160,
"6813121418": 1698489600,
"6865576492": 1699052400,
"6925870357": 1701192327,
"7000000000": 1711889200,
"7100000000": 1719772800,
"7200000000": 1725148800,
"7350000000": 1730454400,
"7500000000": 1735776000,
"7700000000": 1740960000,
"7850000000": 1743638400,
"8000000000": 1746316800,
"8200000000": 1748995200,
"8350000000": 1751673600,
"8500000000": 1754352000,
}
class Function:
def __init__(self, order: int = 3):
self.order = order
self.x, self.y = self._unpack_data()
self._func = self._fit_data()
def _unpack_data(self):
x_data = np.array(list(map(int, data.keys())))
y_data = np.array(list(data.values()))
return (x_data, y_data)
def _fit_data(self):
fitted = np.polyfit(self.x, self.y, self.order)
return np.poly1d(fitted)
def func(self, tg_id: int):
value = self._func(tg_id)
return min(value, time.time())
def estimate_registration_date(user_id):
interpolation = Function()
registration_time = round(interpolation.func(user_id))
registration_date = datetime.utcfromtimestamp(registration_time).strftime("%d.%m.%Y")
return registration_date
@loader.tds
class AccountDataMod(loader.Module):
"""Получить информацию об аккаунте, дц, дату регистрации."""
strings = {
"name": "K:AccountData",
"searching": "<emoji document_id=5222108309795908493>✨</emoji><i> </i><b>Ищу информацию...</b>",
"info": "<emoji document_id=5276489300207217985>✅</emoji> <b>Информация о {}</b>:\n\n<emoji document_id=5264892613630111886>💎</emoji> <b>ID:</b> <code>{}</code>\n<emoji document_id=5258466470676940666>✈️</emoji> <b>Дата-центр:</b> <code>{}</code>\n<emoji document_id=5276489300207217985>✅</emoji> <b>Дата регистрации:</b> <code>{}</code>\n<emoji document_id=5235588635885054955>🎲</emoji> <b>Возраст аккаунта:</b> <code>{}</code>",
"no_args": "<emoji document_id=5248988671855576740>🚫</emoji> <b>Укажите пользователя или ответьте на сообщение!</b>",
"err": "<emoji document_id=5433992383154824484>🚫</emoji> <b>Произошла ошибка:</b> <code>{}</code>"
}
async def client_ready(self, client, db):
self.client = client
def calculate_age(self, date_str):
try:
reg_date = datetime.strptime(date_str, "%d.%m.%Y")
current_date = datetime.now()
diff = relativedelta(current_date, reg_date)
years = diff.years
months = diff.months
days = diff.days
def years_str(n):
if n % 10 == 1 and n % 100 != 11:
return "год"
elif 2 <= n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20):
return "года"
else:
return "лет"
def months_str(n):
if n % 10 == 1 and n % 100 != 11:
return "месяц"
elif 2 <= n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20):
return "месяца"
else:
return "месяцев"
def days_str(n):
if n % 10 == 1 and n % 100 != 11:
return "день"
elif 2 <= n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20):
return "дня"
else:
return "дней"
return f"{years} {years_str(years)}, {months} {months_str(months)}, {days} {days_str(days)}"
except Exception as e:
return f"Ошибка расчета возраста: {date_str} -> {str(e)}"
@loader.command(ru_doc="<юзернейм/реплай> - Получить информацию об аккаунте",
en_doc="<username/reply> - Get account information")
async def aboutacc(self, message):
"""<username/reply> - Получить информацию об аккаунте"""
reply = await message.get_reply_message()
args = utils.get_args_raw(message)
if not args and not reply:
return await message.edit(self.strings("no_args"))
await message.edit(self.strings("searching"))
try:
if reply:
user = await self.client.get_entity(reply.sender_id)
else:
if args.startswith("@"):
args = args[1:]
user = await self.client.get_entity(args)
user_id = user.id
dc_id = user.photo.dc_id if user.photo else "Неизвестно"
reg_date = estimate_registration_date(user_id)
age_str = self.calculate_age(reg_date)
await message.edit(
self.strings["info"].format(
user.first_name,
user_id,
dc_id,
reg_date,
age_str
)
)
except Exception as e:
await message.edit(self.strings["err"].format(str(e)))

View File

@@ -0,0 +1,152 @@
from .. import loader, utils
import git
import platform
import psutil
import time
import os
from telethon.tl.types import MessageEntityUrl
import re
__version__ = (1, 1, 0)
# meta developer: @kmodules
@loader.tds
class CustomInfoMod(loader.Module):
"""Улучшенная информация о юзерботе - ping, и т.д."""
strings = {
"name": "K:CustomInfo",
"update_available": "<b>Доступно обновление!</b>",
"latest_version": "<b>У вас последняя версия.</b>",
"old_format_warning": "<b>✏️ Тег {system_info} устарел. Используйте:\n\n{ram_using} - использованная RAM\n{ram_total} - всего RAM\n{rom_using} - использованная память\n{rom_total} - всего памяти</b>"
}
def __init__(self):
self.config = loader.ModuleConfig(
"custom_info_text",
"<emoji document_id=5219899949281453881>✅</emoji> <b>K:CustomInfo</b>\n\n"
"<emoji document_id=5247213725080890199>©️</emoji><b> Владелец:</b> <b>{owner}</b>\n\n"
"<emoji document_id=5219943216781995020>⚡</emoji> <b>Версия:</b> <b>{version}</b>\n"
"<emoji document_id=5222108309795908493>✨</emoji><b> Ветка:</b> <b>{branch}</b>\n"
"<emoji document_id=5222148368955877900>🔥</emoji> <b>{update_status}</b>\n\n"
"<emoji document_id=5453900977432188793>⭐</emoji> <b>Ping:</b> <b>{ping}</b> <b>мс</b>\n"
"<emoji document_id=5258113901106580375>⌛</emoji> <b>Аптайм:</b> <b>{uptime}</b>\n"
"<emoji document_id=5258466217273871977>💡</emoji> <b>Префикс:</b> «<b>{prefix}</b>»\n\n"
"<emoji document_id=5873146865637133757>🎤</emoji> <b>RAM сервера:</b> <code>{ram_using} GB | {ram_total} GB</code>\n"
"<emoji document_id=5870982283724328568>⚙</emoji> <b>Память:</b> <code>{rom_using} GB | {rom_total} GB</code>\n\n"
"<emoji document_id=5391034312759980875>🥷</emoji><b> OC: {os_name} {os_version}</b>\n"
"<emoji document_id=5235588635885054955>🎲</emoji> <b>Процессор:</b> <b>{cpu_info}</b>",
lambda: "Шаблон для вывода информации",
"banner_url",
"https://x0.at/7uTU.mp4",
lambda: "URL баннера, который будет отправлен с информацией (None чтобы отключить)"
)
async def client_ready(self, client, db):
self.client = client
self.db = db
self._client = client
def get_cpu_info(self):
try:
with open("/proc/cpuinfo", "r") as f:
for line in f:
if "model name" in line:
return line.split(":")[1].strip()
except:
return platform.processor() or "Unknown"
def get_ram_info(self):
try:
ram = psutil.virtual_memory()
total = round(ram.total / (1024**3), 2)
used = round(ram.used / (1024**3), 2)
return used, total
except:
return 0, 0
def get_disk_info(self):
try:
disk = psutil.disk_usage('/')
total = round(disk.total / (1024**3), 2)
used = round(disk.used / (1024**3), 2)
return used, total
except:
return 0, 0
@loader.command()
async def cinfo(self, message):
"""Показать информацию о юзерботе"""
try:
repo = git.Repo(search_parent_directories=True)
branch = repo.active_branch.name
diff = repo.git.log([f"HEAD..origin/{branch}", "--oneline"])
update_status = self.strings["update_available"] if diff else self.strings["latest_version"]
except:
branch = "unknown"
update_status = "Невозможно проверить обновления"
start = time.perf_counter_ns()
msg = await message.client.send_message("me", '')
ping = round((time.perf_counter_ns() - start) / 10**6, 3)
await msg.delete()
ram_used, ram_total = self.get_ram_info()
disk_used, disk_total = self.get_disk_info()
template = self.config["custom_info_text"]
# Create format dict
format_dict = {
"owner": self._client.hikka_me.first_name + ' ' + (self._client.hikka_me.last_name or ''),
"version": '3.0.0',
"branch": branch,
"update_status": update_status,
"prefix": self.get_prefix(),
"ping": ping,
"uptime": utils.formatted_uptime(),
"ram_using": ram_used,
"ram_total": ram_total,
"rom_using": disk_used,
"rom_total": disk_total,
"os_name": platform.system(),
"os_version": platform.release(),
"cpu_info": self.get_cpu_info()
}
# If old format is used, add system_info to format dict
if "{system_info}" in template:
format_dict["system_info"] = self.strings["old_format_warning"]
info = template.format(**format_dict)
reply_to = await message.get_reply_message()
thread = getattr(message, 'message_thread_id', None)
if self.config["banner_url"]:
await self.client.send_file(
message.peer_id,
self.config["banner_url"],
caption=info,
reply_to=reply_to.id if reply_to else None,
message_thread_id=thread
)
if message.out:
await message.delete()
else:
await utils.answer(
message,
info
)
@loader.command()
async def setcinfo(self, message):
"""Установить кастомный текст информации: .setcinfo <текст>"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, "<emoji document_id=5314413943035278948>🧠</emoji><b> Укажите текст для кастомной информации!")
return
self.config["custom_info_text"] = args
await utils.answer(message, "<emoji document_id=5314413943035278948>🧠</emoji><b> K:CustomInfo - текст поставлен.</b>")

View File

@@ -0,0 +1,47 @@
from .. import loader, utils
import requests
__version__ = (1, 0, 0)
# meta developer: @kmodules
@loader.tds
class RandomUserMod(loader.Module):
"""Генератор случайных пользовательских данных."""
strings = {
"name": "K:RandomUser",
"error": "Error occurred while fetching data",
}
strings_ru = {
"name": "K:RandomUser",
"error": "Произошла ошибка при получении данных"
}
@loader.command()
async def randuser(self, message):
"""Сгенерировать случайные данные"""
try:
response = requests.get('https://randomuser.me/api/')
data = response.json()['results'][0]
text = (
f"<emoji document_id=5251752131123234530>🔥</emoji> <b>Сгенерированные данные:</b>\n\n"
f"<emoji document_id=5251429849662243654>🦋</emoji><b> Пол:</b> {data['gender']}\n\n"
f"<emoji document_id=5251705066871603418>⚡️</emoji><b> Имя:</b> {data['name']['first']}\n"
f"<emoji document_id=5251270514965496574>🕊</emoji><b> Фамилия:</b> {data['name']['last']}\n"
f"<emoji document_id=5251722139366606502>💼</emoji><b> Город:</b> {data['location']['city']}\n"
f"<emoji document_id=5248953835375844296>💡</emoji><b> Страна:</b> {data['location']['country']}\n"
f"<emoji document_id=5251571901410592268>🎮</emoji><b> Пост-код:</b> {data['location']['postcode']}\n"
f"<emoji document_id=5249326449558570589>🐐</emoji><b> Координаты:</b> {data['location']['coordinates']['latitude']}, {data['location']['coordinates']['longitude']}\n\n"
f"<emoji document_id=5251358557500098290>💙</emoji><b> Юзернейм:</b> @{data['login']['username']}\n"
f"<emoji document_id=5251703937295207873>❤️</emoji><b> Номер:</b> {data['phone']}\n"
f"<emoji document_id=5251578932272056912>🔇</emoji><b> Почта:</b> {data['email']}\n"
f"<emoji document_id=5249346451221267681>🐈</emoji><b> Пароль:</b> {data['login']['password']}"
)
await utils.answer(message, text)
except Exception:
await utils.answer(message, self.strings["error"])

View File

@@ -0,0 +1,299 @@
# ------------------------------------------------------------
# Module: KsenonAFK
# Description: Универсальный AFK модуль с поддержкой кастом сообщения и премиум статуса.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .afk .unafk .ignorusers .timeafk
# scope: hikka_only
# meta banner: https://i.ibb.co/gy5xbPd/d4be263e-63b5-42e1-ac2b-0dac067b0623.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
from telethon import types, functions
import time
import datetime
import logging
import subprocess
from collections import defaultdict
__version__ = (1, 0, 6)
name = "KsenonAFK"
logger = logging.getLogger(name)
@loader.tds
class KsenonAFKMod(loader.Module):
"""Универсальный AFK модуль с поддержкой кастом сообщения и премиум статуса."""
strings = {
"name": "KsenonAFK",
"gone": "<emoji document_id=5870948572526022116>✋</emoji> <b>I'm now in AFK mode</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Last seen:</b> Just now\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Reason:</b> <i>{}</i>",
"gone_with_time": "<emoji document_id=5870948572526022116>✋</emoji> <b>I'm now in AFK mode</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Last seen:</b> Just now\n<emoji document_id=5873146865637133757>🎤</emoji> <b>Will be back at:</b> <b>{}</b>\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Reason:</b> <i>{}</i>",
"back": "<emoji document_id=5883964170268840032>👤</emoji> <b>No longer in AFK mode.</b>",
"afk": "<emoji document_id=5870948572526022116>✋</emoji> <b>I'm in AFK mode</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Last seen:</b> {} ago",
"afk_reason": "<emoji document_id=5870948572526022116>✋</emoji> <b>I'm in AFK mode</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Last seen:</b> {} ago\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Reason:</b> <i>{}</i>",
"afk_reason_time": "<emoji document_id=5870948572526022116>✋</emoji> <b>I'm in AFK mode</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Last seen:</b> {} ago\n<emoji document_id=5873146865637133757>🎤</emoji> <b>Will be back at:</b> <b>{}</b>\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Reason:</b> <i>{}</i>",
"default_afk_message": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети:</b> {was_online} назад\n{reason_text}{come_time}",
"reason_text": "<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{reason}</i>\n",
"come_text": "<emoji document_id=5873146865637133757>🎤</emoji> <b>Прийду в:</b> <b>{come_time}</b>",
"no_reason": "Нету",
"ignore_set": "✅ Установлено ограничение: {} сообщений за {} минут в одном чате",
"time_limit_set": "✅ Установлено ограничение: {} сообщений за {} минут (ЛС: {} сообщений)"
}
strings_ru = {
"gone": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети:</b> Только что\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{}</i>",
"gone_with_time": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети:</b> Только что\n<emoji document_id=5873146865637133757>🎤</emoji> <b>Прийду в:</b> <b>{}</b>\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{}</i>",
"back": "<emoji document_id=5883964170268840032>👤</emoji><b>Больше не в режиме AFK.</b>",
"afk": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети</b> {} назад",
"afk_reason": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети</b> {} назад\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{}</i>",
"afk_reason_time": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети</b> {} назад\n<emoji document_id=5873146865637133757>🎤</emoji> <b>Прийду в:</b> <b>{}</b>\n<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{}</i>",
"default_afk_message": "<emoji document_id=5870948572526022116>✋</emoji> <b>Сейчас я в AFK режиме</b>\n<emoji document_id=5870695289714643076>👤</emoji> <b>Был в сети:</b> {was_online} назад\n{reason_text}{come_time}",
"reason_text": "<emoji document_id=5870729937215819584>⏰️</emoji> <b>Ушел по причине:</b> <i>{reason}</i>\n",
"come_text": "<emoji document_id=5873146865637133757>🎤</emoji> <b>Прийду в:</b> <b>{come_time}</b>",
"no_reason": "Нету",
"ignore_set": "✅ Установлено ограничение: {} сообщений за {} минут в одном чате",
"time_limit_set": "✅ Установлено ограничение: {} сообщений за {} минут (ЛС: {} сообщений)"
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"alwaysAnswer",
False,
lambda: "Отвечать всегда когда тэгнули.",
validator=loader.validators.Boolean()
),
loader.ConfigValue(
"setPremiumStatus",
True,
lambda: "Ставить премиум статус при афк.",
validator=loader.validators.Boolean()
),
loader.ConfigValue(
"timeZone",
"UTC",
lambda: "Таймзона",
validator=loader.validators.String()
),
loader.ConfigValue(
"custom_message",
"{default}",
lambda: "Кастом AFK сообщение. Функции:\n{was_online} - последний раз в сети\n{reason} - AFK причина\n{come_time} - Время возвращения\n{default} - Дефолт сообщение.",
validator=loader.validators.String()
),
loader.ConfigValue(
"customEmojiStatus",
4969889971700761796,
lambda: "Здесь вы можете поставить кастомный премиум статус. Взять Document ID статуса легко, отправьте премиум стикер, напишите e r.text и там же выйдет document_id. Вставьте только цифры.",
validator=loader.validators.Integer()
)
)
self.answered_users = set()
self.chat_messages = defaultdict(list)
self.ignore_limit = None
self.ignore_time = None
self.pm_limit = None
self.chat_limit = None
self.time_interval = None
async def client_ready(self, client, db):
self._db = db
self._me = await client.get_me()
self.client = client
self._old_status = None
def _get_timezone(self):
try:
process = subprocess.Popen(['timedatectl', '|', 'grep', '"Time zone"'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)
output, _ = process.communicate()
timezone = output.decode().split(': ')[1].strip()
return timezone
except Exception:
return "UTC"
def _format_custom_message(self, was_online, reason=None, come_time=None):
reason_text = self.strings["reason_text"].format(reason=reason) if reason and reason != self.strings["no_reason"] else ""
come_time_text = self.strings["come_text"].format(come_time=come_time) if come_time else ""
default_message = self.strings["default_afk_message"].format(
was_online=was_online,
reason_text=reason_text,
come_time=come_time_text
)
custom_message = self.config["custom_message"]
if custom_message == "{default}":
return default_message
return custom_message.format(
was_online=was_online,
reason=reason if reason else self.strings["no_reason"],
come_time=come_time if come_time else "",
default=default_message
)
@loader.command(ru_doc="[причина] [время] - Установить режим AFK")
async def afk(self, message):
"""[reason] [time] - Set AFK mode status"""
args = utils.get_args_raw(message)
reason = None
time_val = None
if args:
parts = args.split(" ", 1)
if len(parts) > 1:
reason, time_val = parts
else:
reason = parts[0]
if reason == "Нету":
reason = None
if self.config["setPremiumStatus"]:
try:
me = await self.client.get_me()
if me.emoji_status:
self._old_status = me.emoji_status
await self.client(functions.account.UpdateEmojiStatusRequest(
emoji_status=types.EmojiStatus(
document_id=self.config["customEmojiStatus"]
)
))
except Exception as e:
logger.error(f"Failed to update emoji status: {e}")
self._db.set(name, "afk", reason or True)
self._db.set(name, "gone", time.time())
self._db.set(name, "return_time", time_val)
self.answered_users.clear()
self.chat_messages.clear()
preview_message = "<emoji document_id=5870730156259152122>😀</emoji> <b>AFK режим включен!</b>\n<emoji document_id=5877700484453634587>✈️</emoji> <b>KsenonAFK будет отвечать вам этим сообщением:</b>\n\n"
preview = self._format_custom_message("Только что", reason, time_val)
await utils.answer(message, preview_message + preview)
@loader.command(ru_doc="Выйти из режима AFK")
async def unafk(self, message):
"""Exit AFK mode"""
self._db.set(name, "afk", False)
self._db.set(name, "gone", None)
self._db.set(name, "return_time", None)
self.answered_users.clear()
self.chat_messages.clear()
if self.config["setPremiumStatus"] and self._old_status:
try:
await self.client(functions.account.UpdateEmojiStatusRequest(
emoji_status=self._old_status
))
except Exception as e:
logger.error(f"Failed to restore emoji status: {e}")
await utils.answer(message, self.strings["back"])
@loader.command(ru_doc="<кол-во> <минуты> - Установить ограничение сообщений в чате")
async def ignorusers(self, message):
"""<count> <minutes> - Set message limit per chat"""
args = utils.get_args(message)
if len(args) != 2:
return await message.edit("❌ Необходимо указать количество сообщений и время в минутах")
try:
msg_limit = int(args[0])
time_limit = int(args[1])
except ValueError:
return await message.edit("❌ Аргументы должны быть числами")
self.ignore_limit = msg_limit
self.ignore_time = time_limit * 60
await message.edit(self.strings["ignore_set"].format(msg_limit, time_limit))
@loader.command(ru_doc="<минуты> <макс.сообщений> - Установить временной лимит сообщений")
async def timeafk(self, message):
"""<minutes> <max_msgs> - Set time-based message limits"""
args = utils.get_args(message)
if len(args) != 2:
return await message.edit("❌ Необходимо указать интервал в минутах и максимальное количество сообщений")
try:
interval = int(args[0])
max_msgs = int(args[1])
except ValueError:
return await message.edit("❌ Аргументы должны быть числами")
self.time_interval = interval * 60
self.pm_limit = 2
self.chat_limit = max_msgs
await message.edit(self.strings["time_limit_set"].format(max_msgs, interval, 2))
def _check_limits(self, chat_id, is_pm=False):
current_time = time.time()
if self.ignore_limit and self.ignore_time:
self.chat_messages[chat_id] = [msg_time for msg_time in self.chat_messages[chat_id]
if current_time - msg_time < self.ignore_time]
if len(self.chat_messages[chat_id]) >= self.ignore_limit:
return False
if self.time_interval:
limit = self.pm_limit if is_pm else self.chat_limit
recent_msgs = [msg_time for msg_time in self.chat_messages[chat_id]
if current_time - msg_time < self.time_interval]
if len(recent_msgs) >= limit:
return False
self.chat_messages[chat_id] = recent_msgs
self.chat_messages[chat_id].append(current_time)
return True
async def watcher(self, message):
if not isinstance(message, types.Message):
return
if message.mentioned or getattr(message.to_id, "user_id", None) == self._me.id:
afk_state = self.get_afk()
if not afk_state:
return
user = await utils.get_user(message)
if user.is_self or user.bot or user.verified:
return
if not self.config["alwaysAnswer"] and user.id in self.answered_users:
return
is_pm = isinstance(message.to_id, types.PeerUser)
chat_id = user.id if is_pm else message.chat_id
if not self._check_limits(chat_id, is_pm):
return
if not self.config["alwaysAnswer"]:
self.answered_users.add(user.id)
now = datetime.datetime.now().replace(microsecond=0)
gone = datetime.datetime.fromtimestamp(
self._db.get(name, "gone")
).replace(microsecond=0)
diff = now - gone
return_time = self._db.get(name, "return_time", None)
reason = afk_state if isinstance(afk_state, str) else None
response = self._format_custom_message(str(diff), reason, return_time)
await utils.answer(message, response, reply_to=message)
def get_afk(self):
return self._db.get(name, "afk", False)

View File

@@ -0,0 +1,318 @@
from .. import loader, utils
import requests
import io
import aiohttp
import logging
logger = logging.getLogger(__name__)
# meta developer: @kmodules
# changelog: Фиксы, обновитесь обязательно
__version__ = (1, 5, 4)
version = __version__
@loader.tds
class KsenonGPTMod(loader.Module):
"""KsenonGPT module for text and image generation using KsenonAPI"""
strings = {
"name": "KsenonGPT",
"no_api_key": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>You have not set up the API key!</b>\n\n<emoji document_id=5879585266426973039>🌐</emoji> <b>The key is very easy to get, it's free.</b>\n\n<emoji document_id=6034962180875490251>🔓</emoji> <b>Bot: </b><b>@ksenonapi_gettoken_bot</b>",
"generating_text": "<emoji document_id=5891243564309942507>💬</emoji> <b>Responding to your message...</b>",
"text_generated": "<emoji document_id=5870984130560266604>💬</emoji> <b>Request:</b> <code>{}</code>\n\n<emoji document_id=5891243564309942507>💬</emoji> {}",
"generating_image": "<emoji document_id=5766879414704935108>🖼</emoji> <b>Generating image...</b>\n\n<emoji document_id=5994544674604322765>🤖</emoji> <b>Model:</b> <code>{}</code>\n<emoji document_id=5877465816030515018>🔗</emoji> <b>Request:</b> <code>{}</code>",
"image_generated": "<emoji document_id=5766879414704935108>🖼</emoji> <b>Image generated!</b>\n\n<emoji document_id=5994544674604322765>🤖</emoji> <b>Model:</b> <code>{}</code>\n<emoji document_id=5877465816030515018>🔗</emoji> <b>Request:</b> <code>{}</code>\n\n<emoji document_id=5877307202888273539>📥</emoji> <b>Link:</b> {}",
"error_blocked": "<emoji document_id=5832546462478635761>🔒</emoji> <b>You have been blocked!</b>\n\n<emoji document_id=5879896690210639947>🗑</emoji><b>NSFW | politics etc. generation is prohibited.</b>",
"error_occurred": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>An error occurred!</b>\n\n<emoji document_id=5967816500415827773>💻</emoji> <b>Model:</b> {}\n<emoji document_id=5874986954180791957>📶</emoji> <b>Server status, code:</b> {}\n<emoji document_id=5832251986635920010>➡️</emoji> <b>Error:</b> {}",
"text_models": "<emoji document_id=5879585266426973039>🌐</emoji> <b>Text models:</b>\n\n<blockquote>o1-preview\ngpt-4o\nclaude-3-5-sonnet\nsearchgpt (GPT + Internet)\nblackboxai-pro\nclaude-3-5-sonnet-20240620\nclaude-3-haiku-ddg\ngemini-1.5-pro-latest\nllama-3.1-405b\ngpt-3.5-turbo-202201\ngpt-4o-mini-ddg\ngpt-4o-2024-05-13\nmicrosoft/Phi-3.5-mini-instruct\nQwen/Qwen2.5-Coder-32B-Instruct\nQwen/QwQ-32B-Preview</blockquote>\n\n<emoji document_id=5843908536467198016>✅️</emoji> <b>We have 150+ models!</b>\n<emoji document_id=5778423822940114949>🛡</emoji><b><b> https://t.me/ksenonapi_models</b>",
"image_models": "<emoji document_id=5879585266426973039>🌐</emoji> <b>Image models:</b>\n\n<blockquote><b>flux-pro-mg\nflux-dev\nsd3-ultra\npixart-alpha</b></blockquote>",
"no_args": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>No arguments provided!</b>",
"update_available": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>KsenonGPT update available!</b>\n\n<emoji document_id=5449683594425410231>🔼</emoji> <b>New version: {}</b>\n<emoji document_id=5447183459602669338>🔽</emoji> <b>Current version: {}</b>\n\n<emoji document_id=5447410659077661506>🌐</emoji> <b>Changelog:</b>\n<emoji document_id=5458603043203327669>🔔</emoji> <i>{}</i>\n\n<emoji document_id=5206607081334906820>✔️</emoji> <b>Command to update:</b>\n<code>.dlmod https://raw.githubusercontent.com/TheKsenon/MyHikkaModules/refs/heads/main/ksenongpt.py</code>",
"latest_version": "<emoji document_id=5370870691140737817>🥳</emoji> <b>You have the latest version of KsenonGPT!</b>\n\n<emoji document_id=5447644880824181073>⚠️</emoji><b>Developers are making updates and fixes almost every day, check frequently!</b>",
"select_model": "<b>🤖 Select AI model:\n\n🔑 You can also specify a model directly by using .setmodel model_name</b>",
"model_set": "<b>🎯 Model has been set to: {}</b>",
"invalid_model": "<b>❌ Invalid model specified!</b>",
"need_set_model": "<emoji document_id=5222148368955877900>🔥</emoji> <b>Please set the model using .setmodel command!</b>"
}
strings_ru = {
"name": "KsenonGPT",
"no_api_key": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>Вы не настроили API ключ!</b>\n\n<emoji document_id=5879585266426973039>🌐</emoji> <b>Ключ очень легко достать, он бесплатный.</b>\n\n<emoji document_id=6034962180875490251>🔓</emoji> <b>Бот: </b><b>@ksenonapi_gettoken_bot</b>",
"generating_text": "<emoji document_id=5891243564309942507>💬</emoji> <b>Отвечаю на ваше сообщение...</b>",
"text_generated": "<emoji document_id=5870984130560266604>💬</emoji> <b>Запрос:</b> <code>{}</code>\n\n<emoji document_id=5891243564309942507>💬</emoji> {}",
"generating_image": "<emoji document_id=5766879414704935108>🖼</emoji> <b>Генерирую изображение...</b>\n\n<emoji document_id=5994544674604322765>🤖</emoji> <b>Модель:</b> <code>{}</code>\n<emoji document_id=5877465816030515018>🔗</emoji> <b>Запрос:</b> <code>{}</code>",
"image_generated": "<emoji document_id=5766879414704935108>🖼</emoji> <b>Изображение сгенерировано!</b>\n\n<emoji document_id=5994544674604322765>🤖</emoji> <b>Модель:</b> <code>{}</code>\n<emoji document_id=5877465816030515018>🔗</emoji> <b>Запрос:</b> <code>{}</code>\n\n<emoji document_id=5877307202888273539>📥</emoji> <b>Ссылка:</b> {}",
"error_blocked": "<emoji document_id=5832546462478635761>🔒</emoji> <b>Вы были заблокированы!</b>\n\n<emoji document_id=5879896690210639947>🗑</emoji><b>Запрещено генерировать NSFW | политика и т.д.</b>",
"error_occurred": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>Произошла ошибка!</b>\n\n<emoji document_id=5967816500415827773>💻</emoji> <b>Модель:</b> {}\n<emoji document_id=5874986954180791957>📶</emoji> <b>Статус сервера, код:</b> {}\n<emoji document_id=5832251986635920010>➡️</emoji> <b>Ошибка:</b> {}",
"text_models": "<emoji document_id=5879585266426973039>🌐</emoji> <b>Текстовые модели:</b>\n\n<blockquote>o1-preview\ngpt-4o\nclaude-3-5-sonnet\nsearchgpt (GPT + Internet)\nblackboxai-pro\nclaude-3-5-sonnet-20240620\nclaude-3-haiku-ddg\ngemini-1.5-pro-latest\nllama-3.1-405b\ngpt-3.5-turbo-202201\ngpt-4o-mini-ddg\ngpt-4o-2024-05-13\nmicrosoft/Phi-3.5-mini-instruct\nQwen/Qwen2.5-Coder-32B-Instruct\nQwen/QwQ-32B-Preview</blockquote>\n\n<emoji document_id=5843908536467198016>✅️</emoji> <b>У нас 150+ моделей!</b>\n<emoji document_id=5778423822940114949>🛡</emoji><b><b> https://t.me/ksenonapi_models</b>",
"image_models": "<emoji document_id=5879585266426973039>🌐</emoji> <b>Модели для изображений:</b>\n\n<blockquote><b>flux-pro-mg\nflux-dev\nsd3-ultra\npixart-alpha</b></blockquote>",
"no_args": "<emoji document_id=5881702736843511327>⚠️</emoji> <b>Не указаны аргументы!</b>",
"update_available": "<emoji document_id=5420323339723881652>⚠️</emoji> <b>Доступно обновление KsenonGPT!</b>\n\n<emoji document_id=5449683594425410231>🔼</emoji> <b>Новая версия: {}</b>\n<emoji document_id=5447183459602669338>🔽</emoji> <b>Текущая версия: {}</b>\n\n<emoji document_id=5447410659077661506>🌐</emoji> <b>Список изменений:</b>\n<emoji document_id=5458603043203327669>🔔</emoji> <i>{}</i>\n\n<emoji document_id=5206607081334906820>✔️</emoji> <b>Команда для обновления:</b>\n<code>.dlmod https://raw.githubusercontent.com/TheKsenon/MyHikkaModules/refs/heads/main/ksenongpt.py</code>",
"latest_version": "<emoji document_id=5370870691140737817>🥳</emoji> <b>У вас последняя версия KsenonGPT!</b>\n\n<emoji document_id=5447644880824181073>⚠️</emoji><b>Разработчики делают обновления и исправления почти каждый день, проверяйте чаще!</b>",
"select_model": "<b>🤖 Выберите ИИ модель:\n\n🔑 Также вы можете указать конкретную модель, напишите .setmodel названиеодели</b>",
"model_set": "<b>🎯 Модель установлена: {}</b>",
"invalid_model": "<b>❌ Указана неверная модель!</b>",
"need_set_model": "<emoji document_id=5222148368955877900>🔥</emoji> <b>Поставьте модель в .setmodel!</b>"
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"api_key",
"",
"API key from @ksenonapi_gettoken_bot",
validator=loader.validators.Hidden(),
),
loader.ConfigValue(
"default_model",
"",
"Default AI model to use",
)
)
def _create_model_buttons(self):
buttons = []
models = [
("DeepSeek R1", "deepseek-r1"),
("GPT-4o", "gpt-4o"),
("Claude 3.5 Sonnet", "claude-3-5-sonnet"),
("SearchGPT", "searchgpt"),
("P1", "p1"),
("Gemini 2.0 Flash", "gemini-flash-2.0")
]
row = []
for i, (name, model_id) in enumerate(models):
row.append({"text": name, "callback": self._set_model, "args": (model_id,)})
if len(row) == 2:
buttons.append(row)
row = []
if row:
buttons.append(row)
return buttons
async def setmodelcmd(self, message):
"""Set default AI model for text generation"""
args = utils.get_args_raw(message)
if args:
self.config["default_model"] = args
await utils.answer(message, self.strings["model_set"].format(args))
return
await self.inline.form(
text=self.strings["select_model"],
message=message,
reply_markup=self._create_model_buttons())
async def _set_model(self, call, model):
self.config["default_model"] = model
await call.edit(
self.strings["model_set"].format(model),
reply_markup=None)
async def gentextcmd(self, message):
"""Generate text - .gentext <prompt>"""
if not self.config["api_key"]:
await utils.answer(message, self.strings["no_api_key"])
return
if not self.config["default_model"]:
await utils.answer(message, self.strings["need_set_model"])
return
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_args"])
return
prompt = args
model = self.config["default_model"]
msg = await utils.answer(message, self.strings["generating_text"])
headers = {
"Authorization": self.config["api_key"],
"Content-Type": "application/json"
}
data = {
"model": model,
"prompt": prompt
}
async with aiohttp.ClientSession() as session:
async with session.post(
"http://aeza.theksenon.pro/v1/api/text/generate",
headers=headers,
json=data
) as response:
result = await response.json()
if response.status != 200:
await utils.answer(
msg,
self.strings["error_occurred"].format(
model,
response.status,
result.get("error", "Unknown error")
)
)
return
if "error" in result:
if result["error"] == "Your token has been blocked":
await utils.answer(msg, self.strings["error_blocked"])
return
await utils.answer(
msg,
self.strings["error_occurred"].format(
model,
"N/A",
result["error"]
)
)
return
await utils.answer(
msg,
self.strings["text_generated"].format(
prompt,
result["response"]
)
)
async def genimgcmd(self, message):
"""Generate image - .genimg <prompt> <model>"""
if not self.config["api_key"]:
await utils.answer(message, self.strings["no_api_key"])
return
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_args"])
return
try:
prompt, model = args.rsplit(maxsplit=1)
except ValueError:
prompt = args
model = "flux-pro-mg"
msg = await utils.answer(
message,
self.strings["generating_image"].format(model, prompt)
)
headers = {
"Authorization": self.config["api_key"],
"Content-Type": "application/json"
}
data = {
"model": model,
"prompt": prompt
}
async with aiohttp.ClientSession() as session:
async with session.post(
"http://aeza.theksenon.pro/v1/api/image/generate",
headers=headers,
json=data
) as response:
result = await response.json()
if response.status != 200:
await utils.answer(
msg,
self.strings["error_occurred"].format(
model,
response.status,
result.get("error", "Unknown error")
)
)
return
if "error" in result:
if result["error"] == "Your token has been blocked":
await utils.answer(msg, self.strings["error_blocked"])
return
await utils.answer(
msg,
self.strings["error_occurred"].format(
model,
"N/A",
result["error"]
)
)
return
image_url = result["url"]
async with session.get(image_url) as response:
if response.status != 200:
await utils.answer(
msg,
self.strings["error_occurred"].format(
model,
response.status,
"Failed to download image"
)
)
return
image_data = io.BytesIO(await response.read())
image_data.name = "image.png"
await self._client.send_file(
message.peer_id,
image_data,
caption=self.strings["image_generated"].format(
model,
prompt,
image_url
),
reply_to=message.reply_to_msg_id
)
if message.out:
await message.delete()
async def txtmodelscmd(self, message):
"""List of text models"""
await utils.answer(message, self.strings["text_models"])
async def imgmodelscmd(self, message):
"""List of image models"""
await utils.answer(message, self.strings["image_models"])
async def kupdatecmd(self, message):
"""Check for updates"""
async with aiohttp.ClientSession() as session:
async with session.get("https://raw.githubusercontent.com/TheKsenon/MyHikkaModules/refs/heads/main/ksenongpt.py") as response:
if response.status != 200:
return
content = await response.text()
try:
version_line = [line for line in content.split("\n") if "__version__" in line][0]
latest_version = tuple(map(int, version_line.split("(")[1].split(")")[0].split(",")))
if latest_version > version:
changelog = "New version available!"
await utils.answer(
message,
self.strings["update_available"].format(
".".join(map(str, latest_version)),
".".join(map(str, version)),
changelog
)
)
else:
await utils.answer(message, self.strings["latest_version"])
except:
logger.error("Failed to parse version from GitHub")

View File

@@ -0,0 +1,41 @@
from .. import loader, utils
import requests
# meta developer: @kmodules
__version__ = (1, 0, 0)
@loader.tds
class ShortLinkerMod(loader.Module):
"""Модуль для сокращения ссылок."""
strings = {
"name": "K:ShortLinker",
"no_args": "<emoji document_id=5220197908342648622>❗</emoji> <b>Wrong format! Write: .shortlink <url></b>",
"error": "<emoji document_id=5220046725493828505>✍️</emoji> <b>Error!</b>",
"success": "<emoji document_id=5219899949281453881>✅</emoji> <b>Shortened URL:</b>\n\n{}"
}
strings_ru = {
"name": "K:ShortLinker",
"no_args": "<emoji document_id=5220197908342648622>❗</emoji> <b>Неправильный формат! Напишите: .shortlink <url></b>",
"error": "<emoji document_id=5220046725493828505>✍️</emoji> <b>Ошибка!</b>",
"success": "<emoji document_id=5219899949281453881>✅</emoji> <b>Сокращённая ссылка:</b>\n\n{}"
}
async def shortlinkcmd(self, message):
"""Использование: .shortlink <url>"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_args"])
return
try:
api = f"https://is.gd/create.php?format=json&url={args}"
short_url = requests.get(api).json()["shorturl"]
await utils.answer(
message,
self.strings["success"].format(short_url)
)
except Exception:
await utils.answer(message, self.strings["error"])

View File

@@ -0,0 +1,202 @@
from .. import loader, utils
import io
import requests
import json
# meta developer: @kmodules
__version__ = (1, 1, 1)
@loader.tds
class UploaderMod(loader.Module):
"""Module for uploading files to various file hosting services"""
strings = {
"name": """K:Uploader""",
"uploading": "⚡ <b>Uploading file...</b>",
"reply_to_file": "❌ <b>Reply to file!</b>",
"uploaded": "❤️ <b>File uploaded!</b>\n\n🔥 <b>URL:</b> <code>{}</code>",
"error": "❌ <b>Error while uploading: {}</b>"
}
strings_ru = {
"name": """K:Uploader""",
"uploading": "⚡ <b>Загружаю файл...</b>",
"reply_to_file": "❌ <b>Ответьте на файл!</b>",
"uploaded": "❤️ <b>Файл загружен!</b>\n\n🔥 <b>URL:</b> <code>{}</code>",
"error": "❌ <b>Ошибка при загрузке: {}</b>"
}
async def _get_file(self, message):
"""Helper to get file from message"""
reply = await message.get_reply_message()
if not reply:
await utils.answer(message, self.strings["reply_to_file"])
return None
if reply.media:
file = io.BytesIO(await self.client.download_media(reply.media, bytes))
if hasattr(reply.media, "document"):
file.name = reply.file.name or f"file_{reply.file.id}"
else:
file.name = f"file_{reply.id}.jpg"
else:
file = io.BytesIO(bytes(reply.raw_text, "utf-8"))
file.name = "text.txt"
return file
async def catboxcmd(self, message):
"""Upload file to catbox.moe"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post(
"https://catbox.moe/user/api.php",
files={"fileToUpload": file},
data={"reqtype": "fileupload"}
)
if response.ok:
await utils.answer(message, self.strings["uploaded"].format(response.text))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def envscmd(self, message):
"""Upload file to envs.sh"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post("https://envs.sh", files={"file": file})
if response.ok:
await utils.answer(message, self.strings["uploaded"].format(response.text))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def kappacmd(self, message):
"""Upload file to kappa.lol"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post("https://kappa.lol/api/upload", files={"file": file})
if response.ok:
data = response.json()
url = f"https://kappa.lol/{data['id']}"
await utils.answer(message, self.strings["uploaded"].format(url))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def oxocmd(self, message):
"""Upload file to 0x0.st"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post(
"https://0x0.st",
files={"file": file},
data={"secret": True}
)
if response.ok:
await utils.answer(message, self.strings["uploaded"].format(response.text))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def x0cmd(self, message):
"""Upload file to x0.at"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post("https://x0.at", files={"file": file})
if response.ok:
await utils.answer(message, self.strings["uploaded"].format(response.text))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def tmpfilescmd(self, message):
"""Upload file to tmpfiles.org"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post(
"https://tmpfiles.org/api/v1/upload",
files={"file": file}
)
if response.ok:
data = json.loads(response.text)
url = data["data"]["url"]
await utils.answer(message, self.strings["uploaded"].format(url))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def pomfcmd(self, message):
"""Upload file to pomf.lain.la"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.post(
"https://pomf.lain.la/upload.php",
files={"files[]": file}
)
if response.ok:
data = json.loads(response.text)
url = data["files"][0]["url"]
await utils.answer(message, self.strings["uploaded"].format(url))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))
async def bashcmd(self, message):
"""Upload file to bashupload.com"""
await utils.answer(message, self.strings["uploading"])
file = await self._get_file(message)
if not file:
return
try:
response = requests.put(
"https://bashupload.com",
data=file.read()
)
if response.ok:
urls = [line for line in response.text.split("\n") if "wget" in line]
if urls:
url = urls[0].split()[-1]
await utils.answer(message, self.strings["uploaded"].format(url))
else:
await utils.answer(message, self.strings["error"].format("Could not find URL"))
else:
await utils.answer(message, self.strings["error"].format(response.status_code))
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))

View File

@@ -0,0 +1,49 @@
from .. import loader, utils
import aiohttp
@loader.tds
class WeatherMod(loader.Module):
"""Модуль для просмотра погоды"""
strings = {
"name": "K:Weather",
"no_city": "<emoji document_id=5465665476971471368>❌</emoji> <b>Укажите город</b>!",
"error": "<emoji document_id=5465665476971471368>❌</emoji> <b>Ошибка получения погоды</b>.",
"weather": "<emoji document_id=5431449001532594346>⚡️</emoji> <b>Погода в {}</b>\n\n"
"<emoji document_id=5397575638146110953>🌎</emoji> <b>Состояние: {}</b>\n"
"<emoji document_id=5420315771991497307>🔥</emoji> <b>Температура: {}°C</b>\n"
"<emoji document_id=5427042798878610107>🌈</emoji> <b>Ветер: {} км/ч</b>\n"
"<emoji document_id=5282833267551117457>🌨</emoji> <b>Влажность: {}%</b>"
}
async def weathercmd(self, message):
"""Использование: .weather <город>"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_city"])
return
async with aiohttp.ClientSession() as session:
try:
async with session.get(f"https://wttr.in/{args}?format=j1&lang=ru") as response:
if response.status != 200:
await utils.answer(message, self.strings["error"])
return
weather_data = await response.json()
current = weather_data["current_condition"][0]
await utils.answer(
message,
self.strings["weather"].format(
args,
current["lang_ru"][0]["value"],
current["temp_C"],
current["windspeedKmph"],
current["humidity"]
)
)
except Exception:
await utils.answer(message, self.strings["error"])

View File

@@ -0,0 +1 @@
Обновитесь до версии 1.3.4, мы добавили новые модели GPT-4o & GPT-4o-mini, к сожалению с Stable Diffusion 3.5 проблемы...

View File

@@ -0,0 +1,42 @@
from .. import loader, utils
import requests
import os
@loader.tds
class OfftopTextMod(loader.Module):
"""Обход в оффтопе хикки"""
strings = {
"name": "Обход",
"no_text": "Напиши сообщение",
"sending": "загрузочка...",
"sent": "Отправлено"
}
async def oftcmd(self, message):
"""Отправить сообщение"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_text"])
return
await utils.answer(message, self.strings["sending"])
voice_url = "https://0x0.st/s/F0y1vcZGlqTKHj8z0ooT2Q/XFVC.oga"
voice_path = "voice.oga"
response = requests.get(voice_url)
with open(voice_path, "wb") as f:
f.write(response.content)
chat = await self.client.get_entity("@hikka_offtop")
await self.client.send_file(
chat,
voice_path,
voice_note=True,
caption=args
)
os.remove(voice_path)
await utils.answer(message, self.strings["sent"])

View File

@@ -0,0 +1,303 @@
# ------------------------------------------------------------
# Module: QuizAI
# Description: Игра-викторина с разными темами и сложностями
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .quiz
# scope: hikka_only
# meta banner: https://i.ibb.co/NsMcJVJ/6116dddf-38f7-4bad-9b69-10c1e3c19fa5.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
import asyncio
import json
import random
import requests
from .. import loader, utils
from telethon.tl.types import Message
version = (1, 0, 2)
@loader.tds
class QuizGameMod(loader.Module):
"""Игра-викторина с разными темами и сложностями"""
strings = {
"name": "QuizAI",
"no_api_key": "❌ Установите API-Key!\nВозьмите свой API-Key отсюда: https://aistudio.google.com\nДалее введите: .fcfg QuizAI api_key КЛЮЧ",
"invalid_args": '❌ Используйте: .quiz -t "тема" -d <сложность> -m <stable/fast>\nПример: .quiz -t "Minecraft" -d easy -m stable',
"invalid_difficulty": "❌ Сложность может быть: easy, normal, hard, extreme или impossible",
"invalid_mode": "❌ Режим может быть: stable или fast",
"generating_stable": """┏ 🔄 Генерирую нейро-викторину...
┗ 🔥 Модель: gemini-1.5-pro-0827, будет немного долго.
🕰️ Вам не хочется ждать? Поменяйте тэг -m на -m fast""",
"generating_fast": """┏ 🔄 Генерирую нейро-викторину...
┗ 🔥 Модель: gemini-1.5-flash-0827, будет быстро.
🤖 Хотите стабильные ответы? Поменяйте тэг -m на -m stable""",
"api_error": "😔 Ошибка при получении данных от API. Проверьте API-Key и повторите попытку.",
"json_error": "😔 Ошибка при обработке данных от API. Проверьте ответ от API.",
"no_questions": "😔 Закончились вопросы.",
"quiz_completed": """┏ 🎯 Викторина завершена!
┣ 📊 Ваша статистика:
┣ ✅ Правильных ответов: {}
┣ ❌ Неправильных ответов: {}
┣ 📈 Точность: {:.1f}%
┗ 🔄 Новая игра: .quiz""",
"correct_answer": """┏ ✅ Правильно!
┗ Ответ: {}
┏ ❓ Вопрос: {}
┣ 📑 Сложность: {}
┣ 📊 Прогресс: {}/10
┗ ⚙️ Ответы:""",
"incorrect_answer": """┏ ❌ Неправильно!
┗ Правильный ответ: {}
┏ ❓ Вопрос: {}
┣ 📑 Сложность: {}
┣ 📊 Прогресс: {}/10
┗ ⚙️ Ответы:"""
}
def __init__(self):
self.config = loader.ModuleConfig(
loader.ConfigValue(
"api_key",
"",
lambda: "Возьмите свой API-Key отсюда: https://aistudio.google.com",
validator=loader.validators.Hidden(loader.validators.String()),
),
)
async def client_ready(self, client, db):
self.client = client
self.db = db
self._quiz_data = None
self._used_questions = set()
self.correct_answers = 0
self.total_questions = 0
@loader.command()
async def quiz(self, message: Message):
"""Начать викторину
Аргументы: -t "тема" -d <easy/normal/hard/impossible> -m <stable/fast>
Пример: .quiz -t "Minecraft" -d easy -m stable"""
if not self.config["api_key"]:
await utils.answer(message, self.strings["no_api_key"])
return
args = utils.get_args_raw(message)
try:
parts = args.split('" -')
theme_part = parts[0].split('-t "')[1]
args_parts = parts[1].split()
difficulty = args_parts[1].lower()
mode = args_parts[3].lower() if len(args_parts) > 3 else "stable"
except:
await utils.answer(message, self.strings["invalid_args"])
return
if difficulty not in ["easy", "normal", "hard", "extreme", "impossible"]:
await utils.answer(message, self.strings["invalid_difficulty"])
return
if mode not in ["stable", "fast"]:
await utils.answer(message, self.strings["invalid_mode"])
return
model = "gemini-1.5-pro-exp-0827" if mode == "stable" else "gemini-1.5-flash-exp-0827"
await utils.answer(message, self.strings["generating_stable" if mode == "stable" else "generating_fast"])
system_prompt = f'''You are a quiz generator. Generate 10 very accurate and specific questions about {theme_part}.
Rules:
1. Questions must be specifically about {theme_part}
2. All answers must be factually correct
3. Wrong answers must be plausible but clearly incorrect
4. Questions difficulty should match {difficulty} level
5. No duplicates or similar questions
6. Questions should test real knowledge about {theme_part}
Return exactly this JSON format:
{{
"quiz": {{
"quiz_1": {{
"question": "your specific question",
"quiz_theme": "{theme_part}",
"difficulty": "{difficulty}",
"answer": "correct answer",
"not_correct_answers": [
"wrong answer 1",
"wrong answer 2",
"wrong answer 3"
]
}},
"quiz_2": {{...}},
...up to quiz_10
}}
}}
Return ONLY valid JSON, no other text. Default: Russian language. Generate on russian language, if no on this language...'''
result = self.gemini_request(system_prompt, model)
if not result:
await utils.answer(message, self.strings["api_error"])
return
try:
self._quiz_data = json.loads(result)
except json.JSONDecodeError:
await utils.answer(message, self.strings["json_error"])
return
self._used_questions = set()
self.correct_answers = 0
self.total_questions = 0
await self.show_question(message)
async def get_unused_question(self):
available_questions = [q for q in self._quiz_data["quiz"].values()
if q["question"] not in self._used_questions]
if not available_questions:
return None
question = random.choice(available_questions)
self._used_questions.add(question["question"])
return question
async def show_question(self, message):
current_quiz = await self.get_unused_question()
if not current_quiz:
await utils.answer(message, self.strings["no_questions"])
return
answers = current_quiz["not_correct_answers"] + [current_quiz["answer"]]
random.shuffle(answers)
buttons = []
for answer in answers:
buttons.append([{
"text": answer,
"callback": self.quiz_callback,
"args": (answer == current_quiz["answer"], current_quiz)
}])
await self.inline.form(
text=f"""┏ ❓ Вопрос: {current_quiz["question"]}
┣ 📑 Сложность: {current_quiz["difficulty"]}
┣ 📊 Прогресс: {self.total_questions}/10
┗ ⚙️ Ответы:""",
message=message,
reply_markup=buttons
)
async def quiz_callback(self, call, is_correct: bool, current_quiz: dict):
self.total_questions += 1
if is_correct:
self.correct_answers += 1
if self.total_questions >= 10:
accuracy = (self.correct_answers / 10) * 100
await call.edit(
text=self.strings["quiz_completed"].format(
self.correct_answers,
10 - self.correct_answers,
accuracy
)
)
return
next_quiz = await self.get_unused_question()
if not next_quiz:
accuracy = (self.correct_answers / self.total_questions) * 100
await call.edit(
text=self.strings["quiz_completed"].format(
self.correct_answers,
self.total_questions - self.correct_answers,
accuracy
)
)
return
answers = next_quiz["not_correct_answers"] + [next_quiz["answer"]]
random.shuffle(answers)
buttons = []
for answer in answers:
buttons.append([{
"text": answer,
"callback": self.quiz_callback,
"args": (answer == next_quiz["answer"], next_quiz)
}])
if is_correct:
text = self.strings["correct_answer"].format(
current_quiz["answer"],
next_quiz["question"],
next_quiz["difficulty"],
self.total_questions
)
else:
text = self.strings["incorrect_answer"].format(
current_quiz["answer"],
next_quiz["question"],
next_quiz["difficulty"],
self.total_questions
)
await call.edit(
text=text,
reply_markup=buttons
)
def gemini_request(self, prompt, model):
GEMINI_API_KEY = self.config["api_key"]
BASE_URL = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent"
headers = {"Content-Type": "application/json"}
data = {
"contents": [{
"parts":[
{"text": prompt}
]
}],
"generationConfig": {
"temperature": 0.0,
"candidateCount": 1
}
}
proxies = {
'http': 'http://nkzeuopd:od0ij6ste4xi@107.172.163.27:6543',
'https': 'http://nkzeuopd:od0ij6ste4xi@107.172.163.27:6543'
}
try:
response = requests.post(
f"{BASE_URL}?key={GEMINI_API_KEY}",
headers=headers,
json=data,
proxies=proxies,
verify=False,
timeout=60
)
response.raise_for_status()
return response.json()["candidates"][0]["content"]["parts"][0]["text"]
except requests.exceptions.Timeout:
return None
except requests.exceptions.RequestException as e:
return None
except (KeyError, json.JSONDecodeError):
return None

View File

@@ -0,0 +1,46 @@
from .. import loader, utils
import aiohttp
import logging
# meta developer: @kmodules
__version__ = (1, 0, 0)
@loader.tds
class RandomFactMod(loader.Module):
"""Рандомные факты"""
strings = {
"name": "RandomFact",
"loading": "<emoji document_id=5420239291508868251>⭐️</emoji> <b>Думаю над рандомным фактом...</b>",
"fact": "<emoji document_id=5422847414694330750>🪙</emoji> <b>{}</b>",
"error": "Error occurred while fetching fact. Please try again."
}
strings_ru = {
"name": "RandomFact",
"loading": "<emoji document_id=5420239291508868251>⭐️</emoji> <b>Думаю над рандомным фактом...</b>",
"fact": "<emoji document_id=5422847414694330750>🪙</emoji> <b>{}</b>",
"error": "Произошла ошибка при получении факта. Пожалуйста, попробуйте снова."
}
async def client_ready(self, client, db):
self.client = client
@loader.command()
async def randomfact(self, message):
"""Получить случайный факт"""
await utils.answer(message, self.strings["loading"])
try:
async with aiohttp.ClientSession() as session:
async with session.get('http://aeza.theksenon.pro/v1/api/fact',
headers={'Content-Type': 'application/json'}) as response:
if response.status == 200:
fact = await response.text()
await utils.answer(message, self.strings["fact"].format(fact))
else:
await utils.answer(message, self.strings["error"])
except Exception as e:
logging.exception(e)
await utils.answer(message, self.strings["error"])

View File

@@ -0,0 +1,74 @@
# ------------------------------------------------------------
# Module: RandomMemes
# Description: RandomMemes module with a 2 mode.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .rmeme .rnmeme
# scope: hikka_only
# meta banner: https://i.ibb.co/hK4zxP7/6f8d18ef-53d2-42a5-94e5-c0abef97b1bb.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
import random
__version__ = (1, 0, 1)
@loader.tds
class RandomMemesModule(loader.Module):
"""2 mode random memes."""
strings = {
"name": "RandomMemes",
"process": "<emoji document_id=5307675706283533118>🫥</emoji> <b>Forwarding random meme...</b>",
"result": "<emoji document_id=5317003825494629922>😁</emoji> <b>Your random meme!</b>",
"error": "<emoji document_id=5240241223632954241>🚫</emoji> <b>Error occured while getting random meme. How?</b>"
}
strings_ru = {
"name": "RandomMemes",
"process": "<emoji document_id=5307675706283533118>🫥</emoji> <b>Пересылаю случайный мем...</b>",
"result": "<emoji document_id=5317003825494629922>😁</emoji> <b>Ваш случайный мем!</b>",
"error": "<emoji document_id=5240241223632954241>🚫</emoji> <b>Произошла ошибка при получении случайного мема. Как?</b>"
}
async def client_ready(self, client, db):
self.client = client
async def _get_random_meme(self, channel):
chat = await self.client.get_entity(channel)
messages = await self.client.get_messages(chat, limit=300)
media_messages = [msg for msg in messages if msg.media]
if not media_messages:
return None
return random.choice(media_messages)
@loader.command(ru_doc="NSFW мемы", en_doc="NSFW memes")
async def rnmeme(self, message):
await utils.answer(message, self.strings["process"])
random_msg = await self._get_random_meme("po_memes")
if not random_msg:
return await utils.answer(message, self.strings["error"])
await message.respond(file=random_msg.media, message=self.strings["result"])
await message.delete()
@loader.command(ru_doc="Безопасные мемы", en_doc="Safe memes")
async def rmeme(self, message):
await utils.answer(message, self.strings["process"])
random_msg = await self._get_random_meme("prikoly_i_memy")
if not random_msg:
return await utils.answer(message, self.strings["error"])
await message.respond(file=random_msg.media, message=self.strings["result"])
await message.delete()

View File

@@ -0,0 +1,194 @@
from .. import loader, utils
import random
import asyncio
import os
import string
import subprocess
from telethon.tl.functions.account import UpdateProfileRequest
# meta developer: @kmodules
__version__ = (1, 0, 3)
@loader.tds
class RussianRouletteModule(loader.Module):
"""Русская рулетка. Немного ИСПОЛЬЗУЙТЕ НА СВОЙ СТРАХ И РИСК."""
strings = {
"name": "RussianRoulette",
"loaded": "🔫 <b>You loaded the gun.\n\n🔗 Bullet: {}/5</b>\n\n👁️‍🗨️ <b>Shoot?</b>",
"lucky": "🙂 <b>You got lucky!\n\n🔗 The dangerous bullet was: {}\n👁️‍🗨️ Bullet: {}/5</b>",
"unlucky": "🫨 <b>BANG! The bullet hit.\n\n😵‍💫 Punishment: {}</b>",
"module_deleted": "🗑 Deleted module: {}",
"changed_name": "👤 Changed name to: {}",
"tagging": "🏷 Tagging users...",
"deleting_userbot": "🗑 Deleting userbot...",
"deleting_modules": "🗑 Deleting modules..."
}
strings_ru = {
"name": "RussianRoulette",
"loaded": "🔫 <b>Вы зарядили пистолет.\n\n🔗 Пуля: {}/5</b>\n\n👁️‍🗨️ <b>Стрелять?</b>",
"lucky": "🙂 <b>Вам повезло!\n\n🔗 Опасной пулей была: {}\n👁️‍🗨️ Пуля: {}/5</b>",
"unlucky": "🫨 <b>БАМ! Пуля попала.\n\n😵‍💫 Наказание: {}</b>",
"module_deleted": "🗑 Удален модуль: {}",
"changed_name": "👤 Имя изменено на: {}",
"tagging": "🏷 Тегаю пользователей...",
"deleting_userbot": "🗑 Удаление юзербота...",
"deleting_modules": "🗑 Удаление модулей..."
}
async def _get_modules_path(self):
process = subprocess.run("pwd", shell=True, capture_output=True, text=True)
current_path = process.stdout.strip()
if "Hikka" in current_path:
return "Hikka"
elif "Heroku" in current_path:
return "Heroku"
return None
async def _generate_random_prefix(self):
symbols = string.ascii_letters + string.punctuation
return random.choice(symbols)
async def _change_name(self):
names = ["Доксер", "Пубертат", "Веном","ыыы крутой чел","офиц дев хикка","взломан школьником","ананас ы лучшиц доксер","фiжма стон стон"]
new_name = random.choice(names)
await self.client(UpdateProfileRequest(
first_name=new_name,
last_name=""
))
return new_name
async def _tag_users(self, message):
chat = await message.get_chat()
if hasattr(chat, "participants"):
participants = await self.client.get_participants(chat)
users_to_tag = random.sample([user for user in participants if user.username], min(3, len(participants)))
tags = " ".join([f"@{user.username}" for user in users_to_tag])
await message.respond(tags)
async def roulettecmd(self, message):
"""Начать игру в русскую рулетку"""
self.bullet = random.randint(1, 5)
current = random.randint(1, 5)
buttons = [
[
{
"text": "🔫 Стрелять",
"callback": self.shoot_callback,
"args": (current,),
},
{
"text": "🔗 Реролл",
"callback": self.reroll_callback,
"args": (current,),
},
]
]
await self.inline.form(
text=self.strings["loaded"].format(current),
message=message,
reply_markup=buttons,
)
async def shoot_callback(self, call, current):
if current == self.bullet:
punishments = [
"Оставление юзербота",
"Перезапуск юзербота",
"Рандомный префикс",
"Ничего, повезло!",
"Тегание пользователей"
]
punishment = random.choice(punishments)
await call.edit(
self.strings["unlucky"].format(punishment)
)
if punishment == "Оставление юзербота":
await asyncio.sleep(1)
suspend_time = random.randint(30, 60)
await self.invoke("suspend", f"{suspend_time}", message=call.form["message"])
elif punishment == "Удаление модулей":
await call.edit(
self.strings["unlucky"].format(punishment) + "\n\n" +
self.strings["deleting_modules"]
)
await self._delete_modules()
await asyncio.sleep(1)
await self.invoke("restart", "-f", message=call.form["message"])
elif punishment == "Перезапуск юзербота":
await asyncio.sleep(1)
await self.invoke("restart", "-f", message=call.form["message"])
elif punishment == "Рандомный префикс":
new_prefix = await self._generate_random_prefix()
await self.invoke("setprefix", new_prefix, message=call.form["message"])
elif punishment == "Ничего, повезло!":
new_name = await self._change_name()
await call.edit(
self.strings["unlucky"].format(punishment) + "\n\n" +
self.strings["changed_name"].format(new_name)
)
elif punishment == "Тегание пользователей":
await call.edit(self.strings["tagging"])
await self._tag_users(call.form["message"])
else: # Удаление юзербота
await call.edit(
self.strings["unlucky"].format(punishment) + "\n\n" +
self.strings["deleting_userbot"]
)
await self._delete_userbot()
await asyncio.sleep(1)
await self.invoke("restart", "-f", message=call.form["message"])
else:
new_current = random.randint(1, 5)
new_bullet = random.randint(1, 5)
self.bullet = new_bullet
buttons = [
[
{
"text": "🔫 Стрелять",
"callback": self.shoot_callback,
"args": (new_current,),
},
{
"text": "🔗 Реролл",
"callback": self.reroll_callback,
"args": (new_current,),
},
]
]
await call.edit(
self.strings["lucky"].format(new_bullet, new_current),
reply_markup=buttons,
)
async def reroll_callback(self, call, current):
self.bullet = random.randint(1, 5)
new_current = random.randint(1, 5)
buttons = [
[
{
"text": "🔫 Стрелять",
"callback": self.shoot_callback,
"args": (new_current,),
},
{
"text": "🔗 Реролл",
"callback": self.reroll_callback,
"args": (new_current,),
},
]
]
await call.edit(
self.strings["loaded"].format(new_current),
reply_markup=buttons,
)

View File

@@ -0,0 +1,91 @@
# ------------------------------------------------------------
# Module: Telegraph
# Description: Module for creating articles on telegra.ph
# Author: kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands:
# scope: hikka_only
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
import requests
import json
__version__ = (1, 0, 2)
@loader.tds
class TelegraphMod(loader.Module):
"""Create article using telegra.ph"""
strings = {
"name": "Telegraph",
"args_error": "Use: .telegraph <title> | <description>",
"making": "<emoji document_id=5325792861885570739>🫥</emoji> <b>Making article...</b>",
"acc_error": "<emoji document_id=5440381017825716886>❌</emoji> Error occurred while creating account.",
"page_error": "<emoji document_id=5440381017825716886>❌</emoji> Error occurred while creating article.",
"success": "<emoji document_id=5463144094945516339>👍</emoji> <b>Article created!</b>\n\n<emoji document_id=5217890643321300022>✈️</emoji> <a href='{}'><b>Article</b></a>\n<emoji document_id=5219943216781995020>⚡</emoji> <b>URL</b>: {}"
}
strings_ru = {
"name": "Telegraph",
"args_error": "Использование: .telegraph <заголовок> | <описание>",
"making": "<emoji document_id=5325792861885570739>🫥</emoji> <b>Создаю статью...</b>",
"acc_error": "<emoji document_id=5440381017825716886>❌</emoji> Произошла ошибка при создании аккаунта.",
"page_error": "<emoji document_id=5440381017825716886>❌</emoji> Произошла ошибка при создании статьи.",
"success": "<emoji document_id=5463144094945516339>👍</emoji> <b>Статья создана!</b>\n\n<emoji document_id=5217890643321300022>✈️</emoji> <a href='{}'><b>Статья</b></a>\n<emoji document_id=5219943216781995020>⚡</emoji> <b>URL</b>: {}"
}
async def telegraphcmd(self, message):
"""Create article. Use: .telegraph <title> | <description>"""
args = utils.get_args_raw(message)
if not args or '|' not in args:
return await message.edit(self.strings["args_error"])
title, description = args.split('|', 1)
title = title.strip()
description = description.strip()
await message.edit(self.strings["making"])
user = await message.client.get_me()
author = user.first_name
acc_data = requests.get(
"https://api.telegra.ph/createAccount",
params={
"short_name": "Sandbox",
"author_name": author
}
).json()
if not acc_data["ok"]:
return await message.edit(self.strings["acc_error"])
token = acc_data["result"]["access_token"]
content = [{"tag": "p", "children": [description]}]
page_data = {
'access_token': token,
'title': title,
'content': json.dumps(content),
'return_content': 'false'
}
response = requests.get('https://api.telegra.ph/createPage', params=page_data)
result = response.json()
if not result["ok"]:
return await message.edit(self.strings["page_error"])
url = result["result"]["url"]
await message.edit(
self.strings["success"].format(url, url)
)

View File

@@ -0,0 +1,96 @@
# ------------------------------------------------------------
# Module: Text2Speech
# Description: Модуль для озвучки текста
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .text2speech .t2s
# scope: hikka_only
# meta banner: https://i.ibb.co/Q6syvcG/5da73c45-b14f-4fe5-a8b6-85fc32a4b6c0.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
import requests
import urllib.parse
import os
__version__ = (1, 0, 1)
@loader.tds
class Text2SpeechMod(loader.Module):
"""Module for converting text to speech"""
strings = {
"name": "Text2Speech",
"processing": "<emoji document_id=5325834523068342417>🫥</emoji> <b>Converting text to speech...</b>\n\n<emoji document_id=5933541411558264121>🎤</emoji> <b>Voice: {}</b>",
"completed": "<emoji document_id=5897554554894946515>🎤</emoji> <b>Voice generated</b>!\n\n<emoji document_id=5776375003280838798>✅</emoji> <b>Text:</b> <code>{}</code>\n\n<emoji document_id=6048354593279053992>🗣</emoji> <b>Voice:</b> <i>{}</i>",
"error": "❌ Error occurred while creating audio",
"args_error": "<b>❌ Please specify text and voice (alex/sophia)!</b>"
}
strings_ru = {
"name": "Text2Speech",
"processing": "<emoji document_id=5325834523068342417>🫥</emoji> <b>Озвучиваю текст...</b>\n\n<emoji document_id=5933541411558264121>🎤</emoji> <b>Голос: {}</b>",
"completed": "<emoji document_id=5897554554894946515>🎤</emoji> <b>Голос озвучен</b>!\n\n<emoji document_id=5776375003280838798>✅</emoji> <b>Текст:</b> <code>{}</code>\n\n<emoji document_id=6048354593279053992>🗣</emoji> <b>Голос:</b> <i>{}</i>",
"error": "❌ Произошла ошибка при создании аудио",
"args_error": "<b>❌ Укажите текст и голос (alex/sophia)!</b>"
}
async def client_ready(self, client, db):
self.client = client
async def t2s_process(self, message):
args = utils.get_args_raw(message).split()
if len(args) < 2:
await utils.answer(message, self.strings["args_error"])
return
voice = args[-1].lower()
text = " ".join(args[:-1])
if voice not in ["alex", "sophia"]:
await utils.answer(message, self.strings["args_error"])
return
await utils.answer(message, self.strings["processing"].format(voice.title()))
base_url = "http://theksenon.pro/api/text2speech/generate"
encoded_text = urllib.parse.quote(text)
url = f"{base_url}?text={encoded_text}&voice={voice}"
try:
response = requests.get(url)
if response.status_code == 200:
with open("voice.mp3", "wb") as f:
f.write(response.content)
await message.client.send_file(
message.chat_id,
"voice.mp3",
voice_note=True,
caption=self.strings["completed"].format(text, voice.title())
)
if message.out:
await message.delete()
os.remove("voice.mp3")
else:
await utils.answer(message, self.strings["error"])
except Exception:
await utils.answer(message, self.strings["error"])
@loader.command(ru_doc="Преобразовать текст в речь (использование: .text2speech <текст> <alex/sophia>)",
en_doc="Convert text to speech (usage: .text2speech <text> <alex/sophia>)")
async def text2speech(self, message):
await self.t2s_process(message)
@loader.command(ru_doc="Алиас команды .text2speech (использование: .t2s <текст> <alex/sophia>)",
en_doc="Alias for .text2speech command (usage: .t2s <text> <alex/sophia>)")
async def t2s(self, message):
await self.t2s_process(message)

View File

@@ -0,0 +1,58 @@
from .. import loader, utils
import wikipedia
import logging
# meta developer: @kmodules
__version__ = (1, 0, 0)
@loader.tds
class WikiSearchMod(loader.Module):
"""Поиск информации в Википедии"""
strings = {
"name": "WikiSearch",
"no_args": "Please specify search query",
"no_result": "Nothing found for this query",
"header": "<b>[</b><emoji document_id=5122983123188974322>👁</emoji><b>] Wikipedia - Search</b>\n\n",
"searching": "<emoji document_id=5116414868357907335>🔥</emoji> <b>Ищу в Wikipedia...</b>"
}
strings_ru = {
"name": "WikiSearch",
"no_args": "Укажите поисковый запрос",
"no_result": "По данному запросу ничего не найдено",
"header": "<b>[</b><emoji document_id=5122983123188974322>👁</emoji><b>] Wikipedia - Search</b>\n\n",
"searching": "<emoji document_id=5116414868357907335>🔥</emoji> <b>Ищу в Wikipedia...</b>"
}
async def client_ready(self, client, db):
self.client = client
@loader.command()
async def wksearch(self, message):
"""Поиск в Википедии - .wksearch <запрос>"""
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_args"])
return
await utils.answer(message, self.strings["searching"])
try:
wikipedia.set_lang('ru')
result = wikipedia.summary(args, sentences=10)
await utils.answer(
message,
self.strings["header"] + f"<b>{result}</b>"
)
except wikipedia.exceptions.DisambiguationError:
await utils.answer(message, self.strings["no_result"])
except wikipedia.exceptions.PageError:
await utils.answer(message, self.strings["no_result"])
except Exception as e:
logging.exception(e)
await utils.answer(message, self.strings["no_result"])

View File

@@ -0,0 +1,98 @@
# ------------------------------------------------------------
# Module: YTSearch
# Description: Поиск видео по YouTube.
# Author: @kmodules
# ------------------------------------------------------------
# Licensed under the GNU AGPLv3
# https:/www.gnu.org/licenses/agpl-3.0.html
# ------------------------------------------------------------
# Author: @MeKsenon
# Commands: .ytsearch
# scope: hikka_only
# meta banner: https://i.ibb.co/84JDV0z/29a858b1-0c80-4c88-8042-9d7622ebc7f9.jpg
# meta developer: @kmodules
# ------------------------------------------------------------
from .. import loader, utils
import requests
import io
import re
__version__ = (1, 0, 1)
@loader.tds
class YouTubeSearchMod(loader.Module):
"""Module for searching videos on YouTube"""
strings = {
"name": "YTSearch",
"no_query": "Please specify a search query.",
"no_results": "No results found.",
"processing": "<emoji document_id=5258274739041883702>🔍</emoji> <b>Searching on YouTube...</b>",
"error": "❌ Error: {}"
}
strings_ru = {
"name": "YTSearch",
"no_query": "Укажите поисковый запрос.",
"no_results": "Ничего не найдено.",
"processing": "<emoji document_id=5258274739041883702>🔍</emoji> <b>Ищу видео в YouTube...</b>",
"error": "❌ Ошибка: {}"
}
async def client_ready(self, client, db):
self.client = client
@loader.command(ru_doc="Поиск видео на YouTube. Использование: .ytsearch <запрос>",
en_doc="Search for videos on YouTube. Usage: .ytsearch <query>")
async def ytsearch(self, message):
args = utils.get_args_raw(message)
if not args:
await utils.answer(message, self.strings["no_query"])
return
await utils.answer(message, self.strings["processing"])
try:
search_url = f"https://www.youtube.com/results?search_query={args}"
html = requests.get(search_url).text
video_ids = re.findall(r"watch\?v=(\S{11})", html)
if not video_ids:
await utils.answer(message, self.strings["no_results"])
return
video_id = video_ids[0]
video_url = f"https://www.youtube.com/watch?v={video_id}"
api_url = f"https://noembed.com/embed?url={video_url}"
video_info = requests.get(api_url).json()
title = video_info.get("title", "Title unavailable")
author = video_info.get("author_name", "Author unavailable")
thumbnail_url = f"https://img.youtube.com/vi/{video_id}/maxresdefault.jpg"
thumb_response = requests.get(thumbnail_url)
if thumb_response.status_code == 404:
thumbnail_url = f"https://img.youtube.com/vi/{video_id}/hqdefault.jpg"
thumb_response = requests.get(thumbnail_url)
thumb_content = io.BytesIO(thumb_response.content)
thumb_content.name = "thumbnail.jpg"
caption = (
f"<emoji document_id=5967816500415827773>💻</emoji> <b>{title}</b>\n"
f"<emoji document_id=5879770735999717115>👤</emoji> <b>{author}</b>\n\n"
f"<emoji document_id=5879883461711367869>⬇️</emoji> <b>URL: </b><code>{video_url}</code>"
)
await message.client.send_file(
message.chat_id,
thumb_content,
caption=caption,
parse_mode="html"
)
await message.delete()
except Exception as e:
await utils.answer(message, self.strings["error"].format(str(e)))

View File

@@ -0,0 +1,7 @@
from .. import loader, utils
@loader.tds
class PizdaModule(loader.Module):
"""люблю программирование🔥🔥 и все что с ним связано😜😜 алгоритмы💕💕😎 рекурсии😍😍😲 переменные😈😈 циклы😆😆🤘 разветвления 💗💗 функции🙇🤤 обычно программирую везде😋дома😎в метро😏в душе☺️и даже ночью🙀🙀это мое хобби 😹😹читаю топ документацию 💗java🍀c++🐈 python💀php🙈c#👹haskell😽смотрю в свое крутое IDE🤠иногда балуюсь с компилятором😎  ищу API которые упростят мне жизнь  🥳если ты не тру программист и не шаришь то не пиши мне ✋✋👎"""
strings = {"name": """люблю программирование🔥🔥 и все что с ним связано😜😜 алгоритмы💕💕😎 рекурсии😍😍😲 переменные😈😈 циклы😆😆🤘 разветвления 💗💗 функции🙇🤤 обычно программирую везде😋дома😎в метро😏в душе☺️и даже ночью🙀🙀это мое хобби 😹😹читаю топ документацию 💗java🍀c++🐈 python💀php🙈c#👹haskell😽смотрю в свое крутое IDE🤠иногда балуюсь с компилятором😎  ищу API которые упростят мне жизнь  🥳если ты не тру программист и не шаришь то не пиши мне ✋✋👎"""}