Anonymous AndrewLaneX xditya Danish buddhhu sppidy Arnab Paryali divkix hellboi_atul Programming Error New-dev0 commited on
Commit
71fe41d
·
1 Parent(s): b91f289

Ultroid 0.0.5 - 06/04/21

Browse files

Co-authored-by: AndrewLaneX <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Danish <[email protected]>
Co-authored-by: buddhhu <[email protected]>
Co-authored-by: sppidy <[email protected]>
Co-authored-by: Arnab Paryali <[email protected]>
Co-authored-by: divkix <[email protected]>
Co-authored-by: hellboi_atul <[email protected]>
Co-authored-by: Programming Error <[email protected]>
Co-authored-by: New-dev0 <[email protected]>

This view is limited to 50 files because it contains too many changes.   See raw diff
.env.sample CHANGED
@@ -1,4 +1,4 @@
1
- # Don't use quotes( " and ' )
2
 
3
  API_ID=
4
  API_HASH=
@@ -7,5 +7,4 @@ BOT_USERNAME=
7
  BOT_TOKEN=
8
  REDIS_URI=
9
  REDIS_PASSWORD=
10
- HEROKU_API=
11
- HEROKU_APP_NAME=
 
1
+ # Don't use quotes( " and ' )
2
 
3
  API_ID=
4
  API_HASH=
 
7
  BOT_TOKEN=
8
  REDIS_URI=
9
  REDIS_PASSWORD=
10
+ LOG_CHANNEL=
 
.gitignore CHANGED
@@ -13,4 +13,9 @@ logs-ultroid.txt
13
  ultroid-log.txt
14
  /*.jpg
15
  /*.png
16
- /*.mp4
 
 
 
 
 
 
13
  ultroid-log.txt
14
  /*.jpg
15
  /*.png
16
+ /*.mp4
17
+ addons/
18
+ ultroid.log
19
+ target/npmlist.json
20
+ node_modules
21
+ glitch_me/
Dockerfile CHANGED
@@ -4,7 +4,17 @@
4
  # PLease read the GNU Affero General Public License in <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
5
 
6
  FROM ultroidteam/ultroid:0.0.3
 
 
 
 
 
 
 
 
7
  RUN git clone https://github.com/TeamUltroid/Ultroid.git /root/TeamUltroid/
8
  WORKDIR /root/TeamUltroid/
 
9
  RUN pip install -r requirements.txt
10
- CMD ["bash", "resources/startup/startup.sh"]
 
 
4
  # PLease read the GNU Affero General Public License in <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
5
 
6
  FROM ultroidteam/ultroid:0.0.3
7
+ RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
8
+ dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \
9
+ rm ./google-chrome-stable_current_amd64.deb
10
+ RUN wget -O chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \
11
+ unzip chromedriver.zip chromedriver -d /usr/bin/ && \
12
+ rm chromedriver.zip
13
+ RUN curl --silent --location https://deb.nodesource.com/setup_15.x | bash -
14
+ RUN apt-get install -y nodejs sudo
15
  RUN git clone https://github.com/TeamUltroid/Ultroid.git /root/TeamUltroid/
16
  WORKDIR /root/TeamUltroid/
17
+ RUN git clone https://github.com/1Danish-00/glitch_me.git && pip install -e ./glitch_me
18
  RUN pip install -r requirements.txt
19
+ RUN npm install -g npm@7.7.0 && npm install
20
+ RUN npm run build
LICENSE CHANGED
@@ -1,5 +1,5 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
 
4
  Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
  Everyone is permitted to copy and distribute verbatim copies
@@ -7,17 +7,15 @@
7
 
8
  Preamble
9
 
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
 
12
 
13
  The licenses for most software and other practical works are designed
14
  to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
  share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
 
22
  When we speak of free software, we are referring to freedom, not
23
  price. Our General Public Licenses are designed to make sure that you
@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
26
  want it, that you can change the software or use pieces of it in new
27
  free programs, and that you know you can do these things.
28
 
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
 
68
  The precise terms and conditions for copying, distribution and
69
  modification follow.
@@ -72,7 +60,7 @@ modification follow.
72
 
73
  0. Definitions.
74
 
75
- "This License" refers to version 3 of the GNU General Public License.
76
 
77
  "Copyright" also means copyright-like laws that apply to other kinds of
78
  works, such as semiconductor masks.
@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
549
  the Program, the only way you could satisfy both those terms and this
550
  License would be to refrain entirely from conveying the Program.
551
 
552
- 13. Use with the GNU Affero General Public License.
 
 
 
 
 
 
 
 
 
 
 
553
 
554
  Notwithstanding any other provision of this License, you have
555
  permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
557
  combined work, and to convey the resulting work. The terms of this
558
  License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
562
 
563
  14. Revised Versions of this License.
564
 
565
  The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
568
  address new problems or concerns.
569
 
570
  Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
572
  Public License "or any later version" applies to it, you have the
573
  option of following the terms and conditions either of that numbered
574
  version or of any later version published by the Free Software
575
  Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
577
  by the Free Software Foundation.
578
 
579
  If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
581
  public statement of acceptance of a version permanently authorizes you
582
  to choose that version for the Program.
583
 
@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
635
  Copyright (C) <year> <name of author>
636
 
637
  This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
639
  the Free Software Foundation, either version 3 of the License, or
640
  (at your option) any later version.
641
 
642
  This program is distributed in the hope that it will be useful,
643
  but WITHOUT ANY WARRANTY; without even the implied warranty of
644
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
646
 
647
- You should have received a copy of the GNU General Public License
648
  along with this program. If not, see <https://www.gnu.org/licenses/>.
649
 
650
  Also add information on how to contact you by electronic and paper mail.
651
 
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- <program> Copyright (C) <year> <name of author>
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
663
 
664
  You should also get your employer (if you work as a programmer) or school,
665
  if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
667
  <https://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
- <https://www.gnu.org/licenses/why-not-lgpl.html>.
 
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
 
4
  Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
  Everyone is permitted to copy and distribute verbatim copies
 
7
 
8
  Preamble
9
 
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
 
14
  The licenses for most software and other practical works are designed
15
  to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
  share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
 
 
 
19
 
20
  When we speak of free software, we are referring to freedom, not
21
  price. Our General Public Licenses are designed to make sure that you
 
24
  want it, that you can change the software or use pieces of it in new
25
  free programs, and that you know you can do these things.
26
 
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
 
 
 
 
 
 
 
 
 
 
55
 
56
  The precise terms and conditions for copying, distribution and
57
  modification follow.
 
60
 
61
  0. Definitions.
62
 
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
 
65
  "Copyright" also means copyright-like laws that apply to other kinds of
66
  works, such as semiconductor masks.
 
537
  the Program, the only way you could satisfy both those terms and this
538
  License would be to refrain entirely from conveying the Program.
539
 
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
552
 
553
  Notwithstanding any other provision of this License, you have
554
  permission to link or combine any covered work with a work licensed
555
+ under version 3 of the GNU General Public License into a single
556
  combined work, and to convey the resulting work. The terms of this
557
  License will continue to apply to the part which is the covered work,
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
 
560
 
561
  14. Revised Versions of this License.
562
 
563
  The Free Software Foundation may publish revised and/or new versions of
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
566
  address new problems or concerns.
567
 
568
  Each version is given a distinguishing version number. If the
569
+ Program specifies that a certain numbered version of the GNU Affero General
570
  Public License "or any later version" applies to it, you have the
571
  option of following the terms and conditions either of that numbered
572
  version or of any later version published by the Free Software
573
  Foundation. If the Program does not specify a version number of the
574
+ GNU Affero General Public License, you may choose any version ever published
575
  by the Free Software Foundation.
576
 
577
  If the Program specifies that a proxy can decide which future
578
+ versions of the GNU Affero General Public License can be used, that proxy's
579
  public statement of acceptance of a version permanently authorizes you
580
  to choose that version for the Program.
581
 
 
633
  Copyright (C) <year> <name of author>
634
 
635
  This program is free software: you can redistribute it and/or modify
636
+ it under the terms of the GNU Affero General Public License as published by
637
  the Free Software Foundation, either version 3 of the License, or
638
  (at your option) any later version.
639
 
640
  This program is distributed in the hope that it will be useful,
641
  but WITHOUT ANY WARRANTY; without even the implied warranty of
642
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
+ GNU Affero General Public License for more details.
644
 
645
+ You should have received a copy of the GNU Affero General Public License
646
  along with this program. If not, see <https://www.gnu.org/licenses/>.
647
 
648
  Also add information on how to contact you by electronic and paper mail.
649
 
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
 
 
 
 
657
 
658
  You should also get your employer (if you work as a programmer) or school,
659
  if any, to sign a "copyright disclaimer" for the program, if necessary.
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
661
  <https://www.gnu.org/licenses/>.
 
 
 
 
 
 
 
Makefile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ test:
2
+ @pre-commit run --all-files
3
+
4
+ install:
5
+ @pip3 install --upgrade pip setuptools wheel
6
+ @pip3 install --upgrade -r requirements.txt
7
+
8
+
9
+ dev-install:
10
+ @pip3 install --upgrade pip setuptools wheel
11
+ @pip3 install --upgrade -r requirements-dev.txt
12
+ @sleep 5
13
+ @pre-commit
14
+ @pre-commit install
15
+
16
+ update:
17
+ @git pull
18
+ @pip3 install --upgrade pip setuptools wheel
19
+ @pip3 install --upgrade -r requirements.txt
20
+
21
+ ci:
22
+ @pip3 install --upgrade pip setuptools wheel
23
+ @pip3 install --upgrade -r requirements-dev.txt
24
+ @pre-commit
README.md CHANGED
@@ -1,57 +1,106 @@
1
- # Ultroid - UserBot
2
- A stable pluggable Telegram userbot, based on Telethon.
3
-
4
  <p align="center">
5
- <img src="./resources/extras/logo_rdm.png" alt="TeamUltroid">
6
  </p>
 
 
 
 
 
7
 
8
- [![Stars](https://img.shields.io/github/stars/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/stargazers)
9
- [![Forks](https://img.shields.io/github/forks/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/fork)
10
- [![Python Version](https://img.shields.io/badge/Python-v3.9-blue)](https://www.python.org/)
 
 
 
11
  [![Contributors](https://img.shields.io/github/contributors/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/graphs/contributors)
12
- [![License](https://img.shields.io/badge/License-AGPL-blue)](https://github.com/TeamUltroid/Ultroid/blob/main/LICENSE)
13
- [![Size](https://img.shields.io/github/repo-size/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/)
 
 
 
 
14
 
15
- <details>
16
- <summary>More Info</summary>
17
- <br>
18
- <b>Documentation</b> - <a href="https://ultroid.tech">ultroid.tech</a> <br />
19
- </details>
20
 
21
- # Deploy
22
- - [Heroku](https://github.com/TeamUltroid/Ultroid#Deploy-to-Heroku)
23
- - [Local Machine](https://github.com/TeamUltroid/Ultroid#Deploy-Locally)
 
 
 
 
 
24
 
25
  ## Deploy to Heroku
26
- - Get your `API_ID` and `API_HASH` from [here](https://my.telegram.org/)
27
- - Get your `SESSION` from [here](https://repl.it/@TeamUltroid/UltroidStringSession#main.py).
28
- and click the below button! <br />
29
 
30
  [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
31
 
32
  ## Deploy Locally
33
- - Get your `API_ID` and `API_HASH` from [here](https://my.telegram.org/)
34
- - Get your `REDIS_URI` and `REDIS_PASSWORD` from [here](https://redislabs.com), tutorial [here](./resources/extras/redistut.md).
 
 
 
 
 
 
 
 
35
  - Clone the repository: <br />
36
  `git clone https://github.com/TeamUltroid/Ultroid.git`
37
  - Go to the cloned folder: <br />
38
  `cd Ultroid`
39
  - Create a virtual env: <br />
40
- `virtualenv -p /usr/bin/python3 venv`
41
  `. ./venv/bin/activate`
42
  - Install the requirements: <br />
43
- `pip install -r requirements.txt`
44
- - Generate your `SESSION`:
45
- `bash sessiongen`
46
- or
47
- `bash -c "$(curl -fsSL https://del.dog/ultroid)"`
48
- - Fill your details in a `.env` file, as given in [`.env.sample`](https://github.com/TeamUltroid/Ultroid/blob/main/.env.sample).
49
- (You can either edit and rename the file or make a new file.)
50
- - Run the bot:
51
- `bash resources/startup/startup.sh`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  Made with 💕 by [@TeamUltroid](https://t.me/TeamUltroid). <br />
54
 
55
- # Credits
56
- * [Lonami](https://github.com/LonamiWebs/) for [Telethon](https://github.com/LonamiWebs/Telethon)
 
 
57
 
 
 
 
 
 
 
 
 
1
  <p align="center">
2
+ <img src="./resources/extras/logo_readme.jpg" alt="TeamUltroid Logo">
3
  </p>
4
+ <h1 align="center">
5
+ <b>Ultroid - UserBot</b>
6
+ </h1>
7
+
8
+ <b>A stable pluggable Telegram userbot + vc music bot, based on Telethon.</b>
9
 
10
+ [![Stars](https://img.shields.io/github/stars/TeamUltroid/Ultroid?style=flat-square&color=yellow)](https://github.com/TeamUltroid/Ultroid/stargazers)
11
+ [![Forks](https://img.shields.io/github/forks/TeamUltroid/Ultroid?style=flat-square&color=orange)](https://github.com/TeamUltroid/Ultroid/fork)
12
+ [![Size](https://img.shields.io/github/repo-size/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/)
13
+ [![Python](https://img.shields.io/badge/Python-v3.9-blue)](https://www.python.org/)
14
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/TeamUltroid/Ultroid/graphs/commit-activity)
15
+ [![Open Source Love svg2](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/TeamUltroid/Ultroid)
16
  [![Contributors](https://img.shields.io/github/contributors/TeamUltroid/Ultroid?style=flat-square&color=green)](https://github.com/TeamUltroid/Ultroid/graphs/contributors)
17
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
18
+ [![License](https://img.shields.io/badge/License-AGPL-blue)](https://github.com/TeamUltroid/Ultroid/blob/main/LICENSE)
19
+ [![HitCount](http://hits.dwyl.com/Teamultroid/Teamultroid/Ultroid.svg)](http://hits.dwyl.com/Teamultroid/Teamultroid/Ultroid)
20
+ [![Sparkline](https://stars.medv.io/Teamultroid/Ultroid.svg)](https://stars.medv.io/TeamUltroid/Ultroid)
21
+
22
+ ----
23
 
24
+ # Deploy
25
+ - [Heroku](#Deploy-to-Heroku)
26
+ - [Local Machine](#Deploy-Locally)
 
 
27
 
28
+ # Documentation
29
+ [![Document](https://img.shields.io/badge/Documentation-Ultroid-blue)](http://ultroid.tech/)
30
+
31
+ # Tutorial
32
+ - Full Tutorial - [![Full Tutorial](https://img.shields.io/badge/Watch%20Now-blue)](https://www.youtube.com/watch?v=9wF7k9qA0Q4)
33
+
34
+ - Tutorial to get Redis URL and password - [here.](./resources/extras/redistut.md)
35
+ ---
36
 
37
  ## Deploy to Heroku
38
+ Get the [Necessary Variables](#Necessary-Variables) and then click the button below!
 
 
39
 
40
  [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
41
 
42
  ## Deploy Locally
43
+ - [Traditional Method](#local-deploy---traditional-method)
44
+ - [Easy Method](#local-deploy---easy-method)
45
+
46
+ ### Local Deploy - Easy Method
47
+ - Linux - `bash -c "$(curl -fsSL https://git.io/JY9UM)"`
48
+ - Windows - `cd desktop ; wget https://del.dog/raw/ultroid-termux -o locals.py ; python locals.py`
49
+ - Termux - `sh -c "$(curl -fsSL https://del.dog/raw/ultroid-termux)"`
50
+
51
+ ### Local Deploy - Traditional Method
52
+ - Get your [Necessary Variables](#Necessary-Variables)
53
  - Clone the repository: <br />
54
  `git clone https://github.com/TeamUltroid/Ultroid.git`
55
  - Go to the cloned folder: <br />
56
  `cd Ultroid`
57
  - Create a virtual env: <br />
58
+ `virtualenv -p /usr/bin/python3 venv`
59
  `. ./venv/bin/activate`
60
  - Install the requirements: <br />
61
+ `pip(3) install -U -r requirements.txt`
62
+ - Generate your `SESSION`:
63
+ - For Linux users:
64
+ `bash sessiongen`
65
+ or
66
+ `bash -c "$(curl -fsSL https://del.dog/ultroid)"`
67
+ - For Termux users:
68
+ `sh -c "$(curl -fsSL https://da.gd/termux-tel)"`
69
+ - For Windows Users:
70
+ `cd desktop ; wget https://del.dog/ultroid -o ultroid.py ; python ultroid.py`
71
+ - Fill your details in a `.env` file, as given in [`.env.sample`](https://github.com/TeamUltroid/Ultroid/blob/main/.env.sample).
72
+ (You can either edit and rename the file or make a new file named `.env`.)
73
+ - Run the bot:
74
+ - Linux Users:
75
+ `bash resources/startup/startup.sh`
76
+ - Windows Users:
77
+ `python(3) -m pyUltroid`
78
+
79
+ ## Necessary Variables
80
+ - `API_ID` - Your API_ID from [my.telegram.org](https://my.telegram.org/)
81
+ - `API_HASH` - Your API_HASH from [my.telegram.org](https://my.telegram.org/)
82
+ - `SESSION` - SessionString for your accounts login session. Get it from [here](#Session-String)
83
+ - `BOT_TOKEN` - The token of your bot from [@BotFather](https://t.me/BotFather)
84
+ - `BOT_USERNAME` - The username of your bot from [@BotFather](https://t.me/BotFather)
85
+ - `LOG_CHANNEL` - A private group/channel id.
86
+ - `REDIS_URI` - Redis endpoint URL, from [redislabs](http://redislabs.com/), tutorial [here.](./resources/extras/redistut.md)
87
+ - `REDIS_PASSWORD ` - Redis endpoint Password, from [redislabs](http://redislabs.com/), tutorial [here.](./resources/extras/redistut.md)
88
+
89
+ ## Session String
90
+ Different ways to get your `SESSION`:
91
+ * [![Run on Repl.it](https://replit.com/badge/github/TeamUltroid/Ultroid)](https://replit.com/@TeamUltroid/UltroidStringSession)
92
+ * Linux : `bash -c "$(curl -fsSL https://del.dog/ultroid)"`
93
+ * PowerShell : `cd desktop ; wget https://git.io/JY9JI ; python ultroid.py`
94
+ * Termux : `sh -c "$(curl -fsSL https://da.gd/termux-tel)"`
95
 
96
  Made with 💕 by [@TeamUltroid](https://t.me/TeamUltroid). <br />
97
 
98
+ # License
99
+ Ultroid is licensed under [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html) v3 or later.
100
+
101
+ [![License](https://www.gnu.org/graphics/agplv3-155x51.png)](LICENSE)
102
 
103
+ # Credits
104
+ * [![TeamUltroid-Devs](https://img.shields.io/static/v1?label=Teamultroid&message=devs&color=critical)](https://t.me/UltroidDevs)
105
+ * [Lonami](https://github.com/LonamiWebs/) for [Telethon.](https://github.com/LonamiWebs/Telethon)
106
+ * [AndrewLaneX](https://github.com/AndrewLaneX) for [tgcalls.](http://github.com/tgcallsjs/tgcalls)
app.json CHANGED
@@ -1,10 +1,16 @@
1
  {
2
  "name": "Ultroid UserBot",
3
  "description": "Pluggable telegram userbot, made in python using Telethon.",
4
- "logo": "https://telegra.ph/file/1518e15421d21c5afd9af.jpg",
5
- "keywords": ["Telethon", "telegram", "userbot", "python"],
 
 
 
 
 
 
6
  "repository": "https://github.com/TeamUltroid/Ultroid",
7
- "website": "https://ultroid.netlify.app/",
8
  "success_url": "https://t.me/TheUltroid",
9
  "stack": "container",
10
  "env": {
@@ -43,11 +49,12 @@
43
  },
44
  "HEROKU_APP_NAME": {
45
  "description": "Name of your heroku app, given in the first blank on this page. To be added if deploying to heroku ONLY.",
46
- "value": ""
 
47
  },
48
  "LOG_CHANNEL": {
49
  "description": "Create a private group. Add @missrose_bot and your BOT_USERNAME bot. Do /id. Paste that here",
50
- "value": ""
51
  }
52
  }
53
- }
 
1
  {
2
  "name": "Ultroid UserBot",
3
  "description": "Pluggable telegram userbot, made in python using Telethon.",
4
+ "logo": "https://telegra.ph/file/031957757a4f6a5191040.jpg",
5
+ "keywords": [
6
+ "Telethon",
7
+ "telegram",
8
+ "userbot",
9
+ "python",
10
+ "ultroid"
11
+ ],
12
  "repository": "https://github.com/TeamUltroid/Ultroid",
13
+ "website": "https://ultroid.tech",
14
  "success_url": "https://t.me/TheUltroid",
15
  "stack": "container",
16
  "env": {
 
49
  },
50
  "HEROKU_APP_NAME": {
51
  "description": "Name of your heroku app, given in the first blank on this page. To be added if deploying to heroku ONLY.",
52
+ "value": "",
53
+ "required": false
54
  },
55
  "LOG_CHANNEL": {
56
  "description": "Create a private group. Add @missrose_bot and your BOT_USERNAME bot. Do /id. Paste that here",
57
+ "value": ""
58
  }
59
  }
60
+ }
assistant/__init__.py CHANGED
@@ -21,3 +21,8 @@ async def setit(event, name, value):
21
  udB.set(name, value)
22
  except BaseException:
23
  return await event.edit("`Something Went Wrong`")
 
 
 
 
 
 
21
  udB.set(name, value)
22
  except BaseException:
23
  return await event.edit("`Something Went Wrong`")
24
+
25
+
26
+ def get_back_button(name):
27
+ button = [Button.inline("« Bᴀᴄᴋ", data=f"{name}")]
28
+ return button
assistant/api_setter.py CHANGED
@@ -17,7 +17,7 @@ async def apiset(event):
17
  get_string("ast_1"),
18
  buttons=[
19
  [Button.inline("Remove.bg", data="rmbg")],
20
- [custom.Button.inline("« Back", data="setter")],
21
  ],
22
  )
23
 
@@ -38,7 +38,13 @@ async def rmbgapi(event):
38
  response = await response
39
  themssg = response.message.message
40
  if themssg == "/cancel":
41
- return await conv.send_message("Cancelled!!")
 
 
 
42
  else:
43
  await setit(event, var, themssg)
44
- await conv.send_message("{} changed to {}".format(name, themssg))
 
 
 
 
17
  get_string("ast_1"),
18
  buttons=[
19
  [Button.inline("Remove.bg", data="rmbg")],
20
+ [Button.inline("« Back", data="setter")],
21
  ],
22
  )
23
 
 
38
  response = await response
39
  themssg = response.message.message
40
  if themssg == "/cancel":
41
+ return await conv.send_message(
42
+ "Cancelled!!",
43
+ buttons=get_back_button("apiset"),
44
+ )
45
  else:
46
  await setit(event, var, themssg)
47
+ await conv.send_message(
48
+ f"{name} changed to {themssg}",
49
+ buttons=get_back_button("apiset"),
50
+ )
assistant/inlinestuff.py CHANGED
@@ -5,25 +5,95 @@
5
  # PLease read the GNU Affero General Public License in
6
  # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
 
8
- import random
9
- import re
 
10
  from urllib.request import urlopen
11
 
12
- import play_scraper
13
  import requests
14
  from bs4 import BeautifulSoup
15
- from pyUltroid.functions.parser import GoogleSearch, YahooSearch
 
16
  from rextester_py import rexec_aio
17
  from rextester_py.rextester_aio import UnknownLanguage
 
18
  from telethon import Button
19
  from telethon.tl.types import InputWebDocument as wb
20
 
21
  from . import *
 
22
 
 
23
  gugirl = "https://telegra.ph/file/0df54ae4541abca96aa11.jpg"
24
  yeah = "https://telegra.ph/file/e3c67885e16a194937516.jpg"
25
  ps = "https://telegra.ph/file/de0b8d9c858c62fae3b6e.jpg"
26
  ultpic = "https://telegra.ph/file/4136aa1650bc9d4109cc5.jpg"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
 
29
  @in_pattern("fl2lnk ?(.*)")
@@ -60,7 +130,7 @@ async def _(e):
60
 
61
 
62
  @callback(
63
- re.compile(
64
  "fl(.*)",
65
  ),
66
  )
@@ -88,7 +158,7 @@ async def repo(e):
88
  [Button.url("Repo", url="https://github.com/TeamUltroid/Ultroid")],
89
  [Button.url("Support", url="t.me/UltroidSupport")],
90
  ],
91
- )
92
  ]
93
  await e.answer(res)
94
 
@@ -107,7 +177,7 @@ async def gsearch(q_event):
107
  )
108
  await q_event.answer([kkkk])
109
  searcher = []
110
- page = re.findall(r"page=\d+", match)
111
  cache = False
112
  try:
113
  page = page[0]
@@ -136,14 +206,18 @@ async def gsearch(q_event):
136
  [Button.url("Lɪɴᴋ", url=f"{link}")],
137
  [
138
  Button.switch_inline(
139
- "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="go ", same_peer=True
 
 
140
  ),
141
  Button.switch_inline(
142
- "Sʜᴀʀᴇ", query=f"go {match}", same_peer=False
 
 
143
  ),
144
  ],
145
  ],
146
- )
147
  )
148
  except IndexError:
149
  break
@@ -158,10 +232,14 @@ async def rextester(event):
158
  omk = event.text.split(" ", maxsplit=1)[1]
159
  if omk is not None:
160
  if "|" in omk:
161
- lang, code = omk.split("|")
 
 
 
 
 
162
  else:
163
- lang = "python 3"
164
- code = omk
165
  output = await rexec_aio(lang, code)
166
  stats = output.stats
167
  if output.errors is not None:
@@ -183,7 +261,7 @@ async def rextester(event):
183
  resultm = builder.article(
184
  title="Error", # By @ProgrammingError
185
  description="Invalid language choosen",
186
- text="The list of valid languages are\n\nc#, vb.net, f#, java, python, c (gcc), \nc++ (gcc), php, pascal, objective-c, haskell, \nruby, perl, lua, nasm, sql server, javascript, lisp, prolog, go, scala, \nscheme, node.js, python 3, octave, c (clang), \nc++ (clang), c++ (vc++), c (vc), d, r, tcl, mysql, postgresql, oracle, swift, \nbash, ada, erlang, elixir, ocaml, \nkotlin, brainfuck, fortran\n\n\n Format to use Rextester is `@Yourassistantusername rex langcode|code`",
187
  )
188
  await event.answer([resultm])
189
 
@@ -199,12 +277,14 @@ async def gsearch(q_event):
199
  thumb=wb(yeah, 0, "image/jpeg", []),
200
  text="**Yᴀʜᴏᴏ Sᴇᴀʀᴄʜ**\n\nYou didn't search anything",
201
  buttons=Button.switch_inline(
202
- "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="yahoo ", same_peer=True
 
 
203
  ),
204
  )
205
  await q_event.answer([kkkk])
206
  searcher = []
207
- page = re.findall(r"page=\d+", match)
208
  cache = False
209
  try:
210
  page = page[0]
@@ -233,14 +313,18 @@ async def gsearch(q_event):
233
  [Button.url("Lɪɴᴋ", url=f"{link}")],
234
  [
235
  Button.switch_inline(
236
- "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="yahoo ", same_peer=True
 
 
237
  ),
238
  Button.switch_inline(
239
- "Sʜᴀʀᴇ", query=f"yahoo {match}", same_peer=False
 
 
240
  ),
241
  ],
242
  ],
243
- )
244
  )
245
  except IndexError:
246
  break
@@ -261,7 +345,7 @@ async def _(e):
261
  )
262
  await e.answer([kkkk])
263
  foles = []
264
- aap = play_scraper.search(f)
265
  for z in aap:
266
  name = z["title"]
267
  desc = z["description"]
@@ -315,7 +399,7 @@ async def _(e):
315
  await e.answer([kkkk])
316
  page = 1
317
  start = (page - 1) * 3 + 1
318
- urd = random.randrange(1, 3)
319
  if urd == 1:
320
  da = "AIzaSyAyDBsY3WRtB5YPC6aB_w8JAy6ZdXNc6FU"
321
  if urd == 2:
@@ -325,7 +409,7 @@ async def _(e):
325
  url = f"https://www.googleapis.com/customsearch/v1?key={da}&cx=25b3b50edb928435b&q={quer}&start={start}"
326
  data = requests.get(url).json()
327
  search_items = data.get("items")
328
- play_scraper.search(quer)
329
  modss = []
330
  for a in search_items:
331
  title = a.get("title")
@@ -343,14 +427,18 @@ async def _(e):
343
  [Button.url("Dᴏᴡɴʟᴏᴀᴅ", url=f"{link}")],
344
  [
345
  Button.switch_inline(
346
- "Mᴏʀᴇ Mᴏᴅs", query="mods ", same_peer=True
 
 
347
  ),
348
  Button.switch_inline(
349
- "Sʜᴀʀᴇ", query=f"mods {quer}", same_peer=False
 
 
350
  ),
351
  ],
352
  ],
353
- )
354
  )
355
  await e.answer(modss)
356
 
@@ -365,7 +453,9 @@ async def clip(e):
365
  title="Search Something",
366
  text="**Cʟɪᴘᴀʀᴛ Sᴇᴀʀᴄʜ**\n\nYou didn't search anything",
367
  buttons=Button.switch_inline(
368
- "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="clipart ", same_peer=True
 
 
369
  ),
370
  )
371
  await e.answer([kkkk])
 
5
  # PLease read the GNU Affero General Public License in
6
  # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
 
8
+ from random import randrange
9
+ from re import compile as re_compile
10
+ from re import findall
11
  from urllib.request import urlopen
12
 
 
13
  import requests
14
  from bs4 import BeautifulSoup
15
+ from orangefoxapi import OrangeFoxAPI
16
+ from play_scraper import search
17
  from rextester_py import rexec_aio
18
  from rextester_py.rextester_aio import UnknownLanguage
19
+ from search_engine_parser import GoogleSearch, YahooSearch
20
  from telethon import Button
21
  from telethon.tl.types import InputWebDocument as wb
22
 
23
  from . import *
24
+ from . import humanbytes as hb
25
 
26
+ ofox = "https://telegra.ph/file/231f0049fcd722824f13b.jpg"
27
  gugirl = "https://telegra.ph/file/0df54ae4541abca96aa11.jpg"
28
  yeah = "https://telegra.ph/file/e3c67885e16a194937516.jpg"
29
  ps = "https://telegra.ph/file/de0b8d9c858c62fae3b6e.jpg"
30
  ultpic = "https://telegra.ph/file/4136aa1650bc9d4109cc5.jpg"
31
+ rex_langs = """ada, bash, brainfuck, c (clang), c, c (vc),
32
+ c#, c++ (clang), c++, c++ (vc++), d, elixir,
33
+ erlang, f#, fortran, go, haskell, java, js,
34
+ kotlin, lisp, lua, mysql, nasm, node,
35
+ objective-c, ocaml, octave, oracle, pascal,
36
+ perl, php, postgresql, prolog, python,
37
+ python3, r, ruby, scala, scheme, sql server,
38
+ swift, tcl, vb.net"""
39
+
40
+ ofox_api = OrangeFoxAPI()
41
+
42
+
43
+ @in_pattern("ofox")
44
+ @in_owner
45
+ async def _(e):
46
+ try:
47
+ match = e.text.split(" ", maxsplit=1)[1]
48
+ except IndexError:
49
+ kkkk = e.builder.article(
50
+ title="Enter Device Codename",
51
+ thumb=wb(ofox, 0, "image/jpeg", []),
52
+ text="**OFᴏx🦊Rᴇᴄᴏᴠᴇʀʏ**\n\nYou didn't search anything",
53
+ buttons=Button.switch_inline("Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="ofox ", same_peer=True),
54
+ )
55
+ await e.answer([kkkk])
56
+ a = ofox_api.releases(codename=match)
57
+ c = ofox_api.devices(codename=match)
58
+ if len(a.data) > 0:
59
+ fox = []
60
+ for b in a.data:
61
+ ver = b.version
62
+ release = b.type
63
+ size = hb(b.size)
64
+ for z in c.data:
65
+ fullname = z.full_name
66
+ code = z.codename
67
+ link = f"https://orangefox.download/device/{code}"
68
+ text = f"**••OʀᴀɴɢᴇFᴏx Rᴇᴄᴏᴠᴇʀʏ Fᴏʀ•[•]({ofox})** {fullname}\n"
69
+ text += f"**••Cᴏᴅᴇɴᴀᴍᴇ••** {code}\n"
70
+ text += f"**••Bᴜɪʟᴅ Tʏᴘᴇ••** {release}\n"
71
+ text += f"**••Vᴇʀsɪᴏɴ••** {ver}\n"
72
+ text += f"**••Sɪᴢᴇ••** {size}\n"
73
+ fox.append(
74
+ await e.builder.article(
75
+ title=f"{fullname}",
76
+ description=f"{ver}\n{release}",
77
+ text=text,
78
+ thumb=wb(ofox, 0, "image/jpeg", []),
79
+ link_preview=True,
80
+ buttons=[
81
+ Button.url("Dᴏᴡɴʟᴏᴀᴅ", url=f"{link}"),
82
+ Button.switch_inline(
83
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="ofox ", same_peer=True
84
+ ),
85
+ ],
86
+ )
87
+ )
88
+ await e.answer(fox)
89
+ else:
90
+ sed = e.builder.article(
91
+ title="Not Found",
92
+ description="Wrong Codename",
93
+ text="OʀᴀɴɢFᴏx Rᴇᴄᴏᴠᴇʀʏ Fᴏʀ Yᴏᴜʀ Pʜᴏɴᴇ Is Eɪᴛʜᴇʀ Nᴏᴛ Oғғɪᴄɪᴀʟʟʏ Bᴜɪʟᴛ Oʀ Yᴏᴜ Hᴀᴠᴇ Eɴᴛᴇʀᴇᴅ Wʀᴏɴɢ Cᴏᴅᴇɴᴀᴍᴇ",
94
+ buttons=Button.switch_inline("Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="ofox ", same_peer=True),
95
+ )
96
+ await e.answer([sed])
97
 
98
 
99
  @in_pattern("fl2lnk ?(.*)")
 
130
 
131
 
132
  @callback(
133
+ re_compile(
134
  "fl(.*)",
135
  ),
136
  )
 
158
  [Button.url("Repo", url="https://github.com/TeamUltroid/Ultroid")],
159
  [Button.url("Support", url="t.me/UltroidSupport")],
160
  ],
161
+ ),
162
  ]
163
  await e.answer(res)
164
 
 
177
  )
178
  await q_event.answer([kkkk])
179
  searcher = []
180
+ page = findall(r"page=\d+", match)
181
  cache = False
182
  try:
183
  page = page[0]
 
206
  [Button.url("Lɪɴᴋ", url=f"{link}")],
207
  [
208
  Button.switch_inline(
209
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
210
+ query="go ",
211
+ same_peer=True,
212
  ),
213
  Button.switch_inline(
214
+ "Sʜᴀʀᴇ",
215
+ query=f"go {match}",
216
+ same_peer=False,
217
  ),
218
  ],
219
  ],
220
+ ),
221
  )
222
  except IndexError:
223
  break
 
232
  omk = event.text.split(" ", maxsplit=1)[1]
233
  if omk is not None:
234
  if "|" in omk:
235
+ lang, codee = omk.split("|")
236
+ else:
237
+ lang = "python3"
238
+ codee = omk
239
+ if lang == "php":
240
+ code = f"<?php {codee} ?>"
241
  else:
242
+ code = codee
 
243
  output = await rexec_aio(lang, code)
244
  stats = output.stats
245
  if output.errors is not None:
 
261
  resultm = builder.article(
262
  title="Error", # By @ProgrammingError
263
  description="Invalid language choosen",
264
+ text=f"The list of valid languages are\n\n{rex_langs}\n\n\nFormat to use Rextester is `@Yourassistantusername rex langcode|code`",
265
  )
266
  await event.answer([resultm])
267
 
 
277
  thumb=wb(yeah, 0, "image/jpeg", []),
278
  text="**Yᴀʜᴏᴏ Sᴇᴀʀᴄʜ**\n\nYou didn't search anything",
279
  buttons=Button.switch_inline(
280
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
281
+ query="yahoo ",
282
+ same_peer=True,
283
  ),
284
  )
285
  await q_event.answer([kkkk])
286
  searcher = []
287
+ page = findall(r"page=\d+", match)
288
  cache = False
289
  try:
290
  page = page[0]
 
313
  [Button.url("Lɪɴᴋ", url=f"{link}")],
314
  [
315
  Button.switch_inline(
316
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
317
+ query="yahoo ",
318
+ same_peer=True,
319
  ),
320
  Button.switch_inline(
321
+ "Sʜᴀʀᴇ",
322
+ query=f"yahoo {match}",
323
+ same_peer=False,
324
  ),
325
  ],
326
  ],
327
+ ),
328
  )
329
  except IndexError:
330
  break
 
345
  )
346
  await e.answer([kkkk])
347
  foles = []
348
+ aap = search(f)
349
  for z in aap:
350
  name = z["title"]
351
  desc = z["description"]
 
399
  await e.answer([kkkk])
400
  page = 1
401
  start = (page - 1) * 3 + 1
402
+ urd = randrange(1, 3)
403
  if urd == 1:
404
  da = "AIzaSyAyDBsY3WRtB5YPC6aB_w8JAy6ZdXNc6FU"
405
  if urd == 2:
 
409
  url = f"https://www.googleapis.com/customsearch/v1?key={da}&cx=25b3b50edb928435b&q={quer}&start={start}"
410
  data = requests.get(url).json()
411
  search_items = data.get("items")
412
+ search(quer)
413
  modss = []
414
  for a in search_items:
415
  title = a.get("title")
 
427
  [Button.url("Dᴏᴡɴʟᴏᴀᴅ", url=f"{link}")],
428
  [
429
  Button.switch_inline(
430
+ "Mᴏʀᴇ Mᴏᴅs",
431
+ query="mods ",
432
+ same_peer=True,
433
  ),
434
  Button.switch_inline(
435
+ "Sʜᴀʀᴇ",
436
+ query=f"mods {quer}",
437
+ same_peer=False,
438
  ),
439
  ],
440
  ],
441
+ ),
442
  )
443
  await e.answer(modss)
444
 
 
453
  title="Search Something",
454
  text="**Cʟɪᴘᴀʀᴛ Sᴇᴀʀᴄʜ**\n\nYou didn't search anything",
455
  buttons=Button.switch_inline(
456
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
457
+ query="clipart ",
458
+ same_peer=True,
459
  ),
460
  )
461
  await e.answer([kkkk])
assistant/localization.py CHANGED
@@ -16,7 +16,8 @@ async def setlang(event):
16
  languages = get_languages()
17
  tultd = [
18
  Button.inline(
19
- f"{languages[ult]['natively']} [{ult.lower()}]", data=f"set_{ult}"
 
20
  )
21
  for ult in languages
22
  ]
@@ -34,5 +35,5 @@ async def settt(event):
34
  languages = get_languages()
35
  udB.set("language", f"{lang}")
36
  await event.edit(
37
- f"Your language has been set to {languages[lang]['natively']} [{lang}]."
38
  )
 
16
  languages = get_languages()
17
  tultd = [
18
  Button.inline(
19
+ f"{languages[ult]['natively']} [{ult.lower()}]",
20
+ data=f"set_{ult}",
21
  )
22
  for ult in languages
23
  ]
 
35
  languages = get_languages()
36
  udB.set("language", f"{lang}")
37
  await event.edit(
38
+ f"Your language has been set to {languages[lang]['natively']} [{lang}].",
39
  )
assistant/othervars.py CHANGED
@@ -5,8 +5,20 @@
5
  # PLease read the GNU Affero General Public License in
6
  # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
 
 
 
 
 
 
8
  from . import *
9
 
 
 
 
 
 
 
 
10
  TOKEN_FILE = "resources/auths/auth_token.txt"
11
 
12
 
@@ -22,7 +34,7 @@ async def _(e):
22
  )
23
  storage = await create_token_file(TOKEN_FILE, e)
24
  authorize(TOKEN_FILE, storage)
25
- f = open(TOKEN_FILE, "r")
26
  token_file_data = f.read()
27
  udB.set("GDRIVE_TOKEN", token_file_data)
28
  await e.reply(
@@ -43,7 +55,7 @@ async def _(e):
43
  + "2. Create Folder.\n"
44
  + "3. Make that folder public.\n"
45
  + "4. Copy link of that folder."
46
- + "5. Send all characters which is after id= ."
47
  )
48
  async with ultroid_bot.asst.conversation(e.sender_id) as conv:
49
  reply = conv.wait_event(events.NewMessage(from_users=e.sender_id))
@@ -51,7 +63,7 @@ async def _(e):
51
  udB.set("GDRIVE_FOLDER_ID", repl.text)
52
  await repl.reply(
53
  "Success Now You Can Authorise.",
54
- buttons=Button.inline("« Back", data="gdrive"),
55
  )
56
 
57
 
@@ -67,7 +79,7 @@ async def _(e):
67
  udB.set("GDRIVE_CLIENT_SECRET", repl.text)
68
  await repl.reply(
69
  "Success!\nNow You Can Authorise or add FOLDER ID.",
70
- buttons=Button.inline("« Back", data="gdrive"),
71
  )
72
 
73
 
@@ -85,7 +97,7 @@ async def _(e):
85
  udB.set("GDRIVE_CLIENT_ID", repl.text)
86
  await repl.reply(
87
  "Success now set CLIENT SECRET",
88
- buttons=Button.inline("« Back", data="gdrive"),
89
  )
90
 
91
 
@@ -151,14 +163,20 @@ async def emoji(event):
151
  response = await response
152
  themssg = response.message.message
153
  if themssg == "/cancel":
154
- return await conv.send_message("Cancelled!!")
 
 
 
155
  elif themssg.startswith(("/", HNDLR)):
156
- return await conv.send_message("Incorrect Emoji")
 
 
 
157
  else:
158
  await setit(event, var, themssg)
159
  await conv.send_message(
160
- "{} changed to {}\n".format(name, themssg),
161
- buttons=[Button.inline("« Bᴀᴄᴋ", data="otvars")],
162
  )
163
 
164
 
@@ -171,22 +189,29 @@ async def pluginch(event):
171
  name = "Plugin Channel"
172
  async with event.client.conversation(pru) as conv:
173
  await conv.send_message(
174
- "Send id or username of a channel from where u want to install all plugins\n\nOur Channel~ @ultroidplugins\n\nUse /cancel to cancel."
175
  )
176
  response = conv.wait_event(events.NewMessage(chats=pru))
177
  response = await response
178
  themssg = response.message.message
179
  if themssg == "/cancel":
180
- return await conv.send_message("Cancelled!!")
 
 
 
181
  elif themssg.startswith(("/", HNDLR)):
182
- return await conv.send_message("Incorrect channel")
 
 
 
183
  else:
184
  await setit(event, var, themssg)
185
  await conv.send_message(
186
  "{} changed to {}\n After Setting All Things Do Restart".format(
187
- name, themssg
 
188
  ),
189
- buttons=[Button.inline("« Bᴀᴄᴋ", data="otvars")],
190
  )
191
 
192
 
@@ -199,22 +224,31 @@ async def hndlrr(event):
199
  name = "Handler/ Trigger"
200
  async with event.client.conversation(pru) as conv:
201
  await conv.send_message(
202
- f"Send The Symbol Which u want as Handler/Trigger to use bot\nUr Current Handler is [ `{HNDLR}` ]\n\n use /cancel to cancel."
203
  )
204
  response = conv.wait_event(events.NewMessage(chats=pru))
205
  response = await response
206
  themssg = response.message.message
207
  if themssg == "/cancel":
208
- return await conv.send_message("Cancelled!!")
 
 
 
209
  elif len(themssg) > 1:
210
- return await conv.send_message("Incorrect Handler")
 
 
 
211
  elif themssg.startswith(("/", "#", "@")):
212
- return await conv.send_message("Incorrect Handler")
 
 
 
213
  else:
214
  await setit(event, var, themssg)
215
  await conv.send_message(
216
- "{} changed to {}".format(name, themssg),
217
- buttons=[Button.inline("« Bᴀᴄᴋ", data="otvars")],
218
  )
219
 
220
 
@@ -227,18 +261,21 @@ async def tagloggerr(event):
227
  name = "Tag Log Group"
228
  async with event.client.conversation(pru) as conv:
229
  await conv.send_message(
230
- f"Make a group, add your assistant and make it admin.\nGet the `{hndlr}id` of that group and send it here for tag logs.\n\nUse /cancel to cancel."
231
  )
232
  response = conv.wait_event(events.NewMessage(chats=pru))
233
  response = await response
234
  themssg = response.message.message
235
  if themssg == "/cancel":
236
- return await conv.send_message("Cancelled!!")
 
 
 
237
  else:
238
  await setit(event, var, themssg)
239
  await conv.send_message(
240
- "{} changed to {}".format(name, themssg),
241
- buttons=[Button.inline("« Bᴀᴄᴋ", data="otvars")],
242
  )
243
 
244
 
@@ -262,7 +299,7 @@ async def eddon(event):
262
  await setit(event, var, "True")
263
  await event.edit(
264
  "Done! ADDONS has been turned on!!\n\n After Setting All Things Do Restart",
265
- buttons=[Button.inline("« Bᴀᴄᴋ", data="eaddon")],
266
  )
267
 
268
 
@@ -273,7 +310,7 @@ async def eddof(event):
273
  await setit(event, var, "False")
274
  await event.edit(
275
  "Done! ADDONS has been turned off!! After Setting All Things Do Restart",
276
- buttons=[Button.inline("« Bᴀᴄᴋ", data="eaddon")],
277
  )
278
 
279
 
@@ -297,7 +334,7 @@ async def eddon(event):
297
  await setit(event, var, "True")
298
  await event.edit(
299
  "Done! SUDO MODE has been turned on!!\n\n After Setting All Things Do Restart",
300
- buttons=[Button.inline("« Bᴀᴄᴋ", data="sudo")],
301
  )
302
 
303
 
@@ -308,7 +345,7 @@ async def eddof(event):
308
  await setit(event, var, "False")
309
  await event.edit(
310
  "Done! SUDO MODE has been turned off!! After Setting All Things Do Restart",
311
- buttons=[Button.inline("« Bᴀᴄᴋ", data="sudo")],
312
  )
313
 
314
 
@@ -334,18 +371,21 @@ async def sfgrp(event):
334
  pru = event.sender_id
335
  async with asst.conversation(pru) as conv:
336
  await conv.send_message(
337
- f"Make a group, add @MissRose_Bot, send `{hndlr}id`, copy that and send it here.\nUse /cancel to go back."
338
  )
339
  response = conv.wait_event(events.NewMessage(chats=pru))
340
  response = await response
341
  themssg = response.message.message
342
  if themssg == "/cancel":
343
- return await conv.send_message("Cancelled!!")
 
 
 
344
  else:
345
  await setit(event, var, themssg)
346
  await conv.send_message(
347
- "{} changed to {}".format(name, themssg),
348
- buttons=[Button.inline("« Bᴀᴄᴋ", data="sfban")],
349
  )
350
 
351
 
@@ -358,46 +398,29 @@ async def sfexf(event):
358
  pru = event.sender_id
359
  async with asst.conversation(pru) as conv:
360
  await conv.send_message(
361
- f"Send the Fed IDs you want to exclude in the ban. Split by a space.\neg`id1 id2 id3`\nSet is as `None` if you dont want any.\nUse /cancel to go back."
362
  )
363
  response = conv.wait_event(events.NewMessage(chats=pru))
364
  response = await response
365
  themssg = response.message.message
366
  if themssg == "/cancel":
367
- return await conv.send_message("Cancelled!!")
 
 
 
368
  else:
369
  await setit(event, var, themssg)
370
  await conv.send_message(
371
- "{} changed to {}".format(name, themssg),
372
- buttons=[Button.inline("« Bᴀᴄᴋ", data="sfban")],
373
  )
374
 
375
- # Ultroid - UserBot
376
- # Copyright (C) 2020 TeamUltroid
377
- #
378
- # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
379
- # PLease read the GNU Affero General Public License in
380
- # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
381
-
382
- import os
383
-
384
- from telegraph import Telegraph
385
- from telegraph import upload_file as upl
386
-
387
- from . import *
388
-
389
- # --------------------------------------------------------------------#
390
- telegraph = Telegraph()
391
- r = telegraph.create_account(short_name="Ultroid")
392
- auth_url = r["auth_url"]
393
- # --------------------------------------------------------------------#
394
-
395
 
396
  @callback("alvcstm")
397
  @owner
398
  async def alvcs(event):
399
  await event.edit(
400
- "Customise your {}alive. Choose from the below options -".format(HNDLR),
401
  buttons=[
402
  [Button.inline("Aʟɪᴠᴇ Tᴇxᴛ", data="alvtx")],
403
  [Button.inline("Aʟɪᴠᴇ ᴍᴇᴅɪᴀ", data="alvmed")],
@@ -416,19 +439,24 @@ async def name(event):
416
  name = "Alive Text"
417
  async with event.client.conversation(pru) as conv:
418
  await conv.send_message(
419
- "**Alive Text**\nEnter the new alive text.\n\nUse /cancel to terminate the operation."
420
  )
421
  response = conv.wait_event(events.NewMessage(chats=pru))
422
  response = await response
423
  themssg = response.message.message
424
  if themssg == "/cancel":
425
- return await conv.send_message("Cancelled!!")
 
 
 
426
  else:
427
  await setit(event, var, themssg)
428
  await conv.send_message(
429
  "{} changed to {}\n\nAfter Setting All Things Do restart".format(
430
- name, themssg
431
- )
 
 
432
  )
433
 
434
 
@@ -441,13 +469,16 @@ async def media(event):
441
  name = "Alive Media"
442
  async with event.client.conversation(pru) as conv:
443
  await conv.send_message(
444
- "**Alive Media**\nSend me a pic/gif/bot api id of sticker to set as alive media.\n\nUse /cancel to terminate the operation."
445
  )
446
  response = await conv.get_response()
447
  try:
448
  themssg = response.message.message
449
  if themssg == "/cancel":
450
- return await conv.send_message("Operation cancelled!!")
 
 
 
451
  except BaseException:
452
  pass
453
  media = await event.client.download_media(response, "alvpc")
@@ -463,9 +494,15 @@ async def media(event):
463
  url = f"https://telegra.ph/{x[0]}"
464
  os.remove(media)
465
  except BaseException:
466
- return await conv.send_message("Terminated.")
 
 
 
467
  await setit(event, var, url)
468
- await conv.send_message("{} has been set.".format(name))
 
 
 
469
 
470
 
471
  @callback("delmed")
@@ -473,9 +510,12 @@ async def media(event):
473
  async def dell(event):
474
  try:
475
  udB.delete("ALIVE_PIC")
476
- return await event.edit("Done!")
477
  except BaseException:
478
- return await event.edit("Something went wrong...")
 
 
 
479
 
480
 
481
  @callback("pmcstm")
@@ -496,7 +536,7 @@ async def alvcs(event):
496
  Button.inline("Sᴇᴛ Wᴀʀɴs", data="swarn"),
497
  Button.inline("Dᴇʟᴇᴛᴇ Pᴍ Mᴇᴅɪᴀ", data="delpmmed"),
498
  ],
499
- [Button.inline("« Bᴀᴄᴋ", data="pmset")],
500
  ],
501
  )
502
 
@@ -510,19 +550,24 @@ async def name(event):
510
  name = "PM Text"
511
  async with event.client.conversation(pru) as conv:
512
  await conv.send_message(
513
- "**PM Text**\nEnter the new Pmpermit text.\n\nu can use `{name}` `{fullname}` `{count}` `{mention}` `{username}` to get this from user Too\n\nUse /cancel to terminate the operation."
514
  )
515
  response = conv.wait_event(events.NewMessage(chats=pru))
516
  response = await response
517
  themssg = response.message.message
518
  if themssg == "/cancel":
519
- return await conv.send_message("Cancelled!!")
 
 
 
520
  else:
521
  await setit(event, var, themssg)
522
  await conv.send_message(
523
  "{} changed to {}\n\nAfter Setting All Things Do restart".format(
524
- name, themssg
525
- )
 
 
526
  )
527
 
528
 
@@ -546,10 +591,14 @@ async def set_wrns(event):
546
  dn = udB.set("PMWARNS", value)
547
  if dn:
548
  await event.edit(
549
- f"PM Warns Set to {value}.\nNew users will have {value} chances in PMs before getting banned."
 
550
  )
551
  else:
552
- await event.edit(f"Something went wrong, please check your {hndlr}logs!")
 
 
 
553
 
554
 
555
  @callback("pmmed")
@@ -561,13 +610,16 @@ async def media(event):
561
  name = "PM Media"
562
  async with event.client.conversation(pru) as conv:
563
  await conv.send_message(
564
- "**PM Media**\nSend me a pic/gif/bot api id of sticker to set as pmpermit media.\n\nUse /cancel to terminate the operation."
565
  )
566
  response = await conv.get_response()
567
  try:
568
  themssg = response.message.message
569
  if themssg == "/cancel":
570
- return await conv.send_message("Operation cancelled!!")
 
 
 
571
  except BaseException:
572
  pass
573
  media = await event.client.download_media(response, "pmpc")
@@ -583,9 +635,15 @@ async def media(event):
583
  url = f"https://telegra.ph/{x[0]}"
584
  os.remove(media)
585
  except BaseException:
586
- return await conv.send_message("Terminated.")
 
 
 
587
  await setit(event, var, url)
588
- await conv.send_message("{} has been set.".format(name))
 
 
 
589
 
590
 
591
  @callback("delpmmed")
@@ -593,9 +651,12 @@ async def media(event):
593
  async def dell(event):
594
  try:
595
  udB.delete("PMPIC")
596
- return await event.edit("Done!")
597
  except BaseException:
598
- return await event.edit("Something went wrong...")
 
 
 
599
 
600
 
601
  @callback("apauto")
@@ -616,7 +677,10 @@ async def apauto(event):
616
  async def apon(event):
617
  var = "AUTOAPPROVE"
618
  await setit(event, var, "True")
619
- await event.edit(f"Done!! AUTOAPPROVE Started!!")
 
 
 
620
 
621
 
622
  @callback("apof")
@@ -624,9 +688,15 @@ async def apon(event):
624
  async def apof(event):
625
  try:
626
  udB.delete("AUTOAPPROVE")
627
- return await event.edit("Done! AUTOAPPROVE Stopped!!")
 
 
 
628
  except BaseException:
629
- return await event.edit("Something went wrong...")
 
 
 
630
 
631
 
632
  @callback("pml")
@@ -647,7 +717,10 @@ async def alvcs(event):
647
  async def pmlog(event):
648
  var = "PMLOG"
649
  await setit(event, var, "True")
650
- await event.edit(f"Done!! PMLOGGER Started!!")
 
 
 
651
 
652
 
653
  @callback("pmlogof")
@@ -655,16 +728,23 @@ async def pmlog(event):
655
  async def pmlogof(event):
656
  try:
657
  udB.delete("PMLOG")
658
- return await event.edit("Done! PMLOGGER Stopped!!")
 
 
 
659
  except BaseException:
660
- return await event.edit("Something went wrong...")
 
 
 
661
 
662
 
663
  @callback("ppmset")
664
  @owner
665
  async def pmset(event):
666
- await event.edit("PMPermit Settings:",
667
- buttons=[
 
668
  [Button.inline("Tᴜʀɴ PMPᴇʀᴍɪᴛ Oɴ", data="pmon")],
669
  [Button.inline("Tᴜʀɴ PMPᴇʀᴍɪᴛ Oғғ", data="pmoff")],
670
  [Button.inline("Cᴜsᴛᴏᴍɪᴢᴇ PMPᴇʀᴍɪᴛ", data="pmcstm")],
@@ -678,7 +758,10 @@ async def pmset(event):
678
  async def pmonn(event):
679
  var = "PMSETTING"
680
  await setit(event, var, "True")
681
- await event.edit(f"Done! PMPermit has been turned on!!")
 
 
 
682
 
683
 
684
  @callback("pmoff")
@@ -686,4 +769,117 @@ async def pmonn(event):
686
  async def pmofff(event):
687
  var = "PMSETTING"
688
  await setit(event, var, "False")
689
- await event.edit(f"Done! PMPermit has been turned off!!")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  # PLease read the GNU Affero General Public License in
6
  # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
 
8
+ import os
9
+
10
+ from telegraph import Telegraph
11
+ from telegraph import upload_file as upl
12
+
13
  from . import *
14
 
15
+ # --------------------------------------------------------------------#
16
+ telegraph = Telegraph()
17
+ r = telegraph.create_account(short_name="Ultroid")
18
+ auth_url = r["auth_url"]
19
+ # --------------------------------------------------------------------#
20
+
21
+
22
  TOKEN_FILE = "resources/auths/auth_token.txt"
23
 
24
 
 
34
  )
35
  storage = await create_token_file(TOKEN_FILE, e)
36
  authorize(TOKEN_FILE, storage)
37
+ f = open(TOKEN_FILE)
38
  token_file_data = f.read()
39
  udB.set("GDRIVE_TOKEN", token_file_data)
40
  await e.reply(
 
55
  + "2. Create Folder.\n"
56
  + "3. Make that folder public.\n"
57
  + "4. Copy link of that folder."
58
+ + "5. Send all characters which is after id= .",
59
  )
60
  async with ultroid_bot.asst.conversation(e.sender_id) as conv:
61
  reply = conv.wait_event(events.NewMessage(from_users=e.sender_id))
 
63
  udB.set("GDRIVE_FOLDER_ID", repl.text)
64
  await repl.reply(
65
  "Success Now You Can Authorise.",
66
+ buttons=get_back_button("gdrive"),
67
  )
68
 
69
 
 
79
  udB.set("GDRIVE_CLIENT_SECRET", repl.text)
80
  await repl.reply(
81
  "Success!\nNow You Can Authorise or add FOLDER ID.",
82
+ buttons=get_back_button("gdrive"),
83
  )
84
 
85
 
 
97
  udB.set("GDRIVE_CLIENT_ID", repl.text)
98
  await repl.reply(
99
  "Success now set CLIENT SECRET",
100
+ buttons=get_back_button("gdrive"),
101
  )
102
 
103
 
 
163
  response = await response
164
  themssg = response.message.message
165
  if themssg == "/cancel":
166
+ return await conv.send_message(
167
+ "Cancelled!!",
168
+ buttons=get_back_button("otvars"),
169
+ )
170
  elif themssg.startswith(("/", HNDLR)):
171
+ return await conv.send_message(
172
+ "Incorrect Emoji",
173
+ buttons=get_back_button("otvars"),
174
+ )
175
  else:
176
  await setit(event, var, themssg)
177
  await conv.send_message(
178
+ f"{name} changed to {themssg}\n",
179
+ buttons=get_back_button("otvars"),
180
  )
181
 
182
 
 
189
  name = "Plugin Channel"
190
  async with event.client.conversation(pru) as conv:
191
  await conv.send_message(
192
+ "Send id or username of a channel from where u want to install all plugins\n\nOur Channel~ @ultroidplugins\n\nUse /cancel to cancel.",
193
  )
194
  response = conv.wait_event(events.NewMessage(chats=pru))
195
  response = await response
196
  themssg = response.message.message
197
  if themssg == "/cancel":
198
+ return await conv.send_message(
199
+ "Cancelled!!",
200
+ buttons=get_back_button("otvars"),
201
+ )
202
  elif themssg.startswith(("/", HNDLR)):
203
+ return await conv.send_message(
204
+ "Incorrect channel",
205
+ buttons=get_back_button("otvars"),
206
+ )
207
  else:
208
  await setit(event, var, themssg)
209
  await conv.send_message(
210
  "{} changed to {}\n After Setting All Things Do Restart".format(
211
+ name,
212
+ themssg,
213
  ),
214
+ buttons=get_back_button("otvars"),
215
  )
216
 
217
 
 
224
  name = "Handler/ Trigger"
225
  async with event.client.conversation(pru) as conv:
226
  await conv.send_message(
227
+ f"Send The Symbol Which u want as Handler/Trigger to use bot\nUr Current Handler is [ `{HNDLR}` ]\n\n use /cancel to cancel.",
228
  )
229
  response = conv.wait_event(events.NewMessage(chats=pru))
230
  response = await response
231
  themssg = response.message.message
232
  if themssg == "/cancel":
233
+ return await conv.send_message(
234
+ "Cancelled!!",
235
+ buttons=get_back_button("otvars"),
236
+ )
237
  elif len(themssg) > 1:
238
+ return await conv.send_message(
239
+ "Incorrect Handler",
240
+ buttons=get_back_button("otvars"),
241
+ )
242
  elif themssg.startswith(("/", "#", "@")):
243
+ return await conv.send_message(
244
+ "This cannot be used as handler",
245
+ buttons=get_back_button("otvars"),
246
+ )
247
  else:
248
  await setit(event, var, themssg)
249
  await conv.send_message(
250
+ f"{name} changed to {themssg}",
251
+ buttons=get_back_button("otvars"),
252
  )
253
 
254
 
 
261
  name = "Tag Log Group"
262
  async with event.client.conversation(pru) as conv:
263
  await conv.send_message(
264
+ f"Make a group, add your assistant and make it admin.\nGet the `{hndlr}id` of that group and send it here for tag logs.\n\nUse /cancel to cancel.",
265
  )
266
  response = conv.wait_event(events.NewMessage(chats=pru))
267
  response = await response
268
  themssg = response.message.message
269
  if themssg == "/cancel":
270
+ return await conv.send_message(
271
+ "Cancelled!!",
272
+ buttons=get_back_button("otvars"),
273
+ )
274
  else:
275
  await setit(event, var, themssg)
276
  await conv.send_message(
277
+ f"{name} changed to {themssg}",
278
+ buttons=get_back_button("otvars"),
279
  )
280
 
281
 
 
299
  await setit(event, var, "True")
300
  await event.edit(
301
  "Done! ADDONS has been turned on!!\n\n After Setting All Things Do Restart",
302
+ buttons=get_back_button("eaddon"),
303
  )
304
 
305
 
 
310
  await setit(event, var, "False")
311
  await event.edit(
312
  "Done! ADDONS has been turned off!! After Setting All Things Do Restart",
313
+ buttons=get_back_button("eaddon"),
314
  )
315
 
316
 
 
334
  await setit(event, var, "True")
335
  await event.edit(
336
  "Done! SUDO MODE has been turned on!!\n\n After Setting All Things Do Restart",
337
+ buttons=get_back_button("sudo"),
338
  )
339
 
340
 
 
345
  await setit(event, var, "False")
346
  await event.edit(
347
  "Done! SUDO MODE has been turned off!! After Setting All Things Do Restart",
348
+ buttons=get_back_button("sudo"),
349
  )
350
 
351
 
 
371
  pru = event.sender_id
372
  async with asst.conversation(pru) as conv:
373
  await conv.send_message(
374
+ f"Make a group, add @MissRose_Bot, send `{hndlr}id`, copy that and send it here.\nUse /cancel to go back.",
375
  )
376
  response = conv.wait_event(events.NewMessage(chats=pru))
377
  response = await response
378
  themssg = response.message.message
379
  if themssg == "/cancel":
380
+ return await conv.send_message(
381
+ "Cancelled!!",
382
+ buttons=get_back_button("sfban"),
383
+ )
384
  else:
385
  await setit(event, var, themssg)
386
  await conv.send_message(
387
+ f"{name} changed to {themssg}",
388
+ buttons=get_back_button("sfban"),
389
  )
390
 
391
 
 
398
  pru = event.sender_id
399
  async with asst.conversation(pru) as conv:
400
  await conv.send_message(
401
+ f"Send the Fed IDs you want to exclude in the ban. Split by a space.\neg`id1 id2 id3`\nSet is as `None` if you dont want any.\nUse /cancel to go back.",
402
  )
403
  response = conv.wait_event(events.NewMessage(chats=pru))
404
  response = await response
405
  themssg = response.message.message
406
  if themssg == "/cancel":
407
+ return await conv.send_message(
408
+ "Cancelled!!",
409
+ buttons=get_back_button("sfban"),
410
+ )
411
  else:
412
  await setit(event, var, themssg)
413
  await conv.send_message(
414
+ f"{name} changed to {themssg}",
415
+ buttons=get_back_button("sfban"),
416
  )
417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
419
  @callback("alvcstm")
420
  @owner
421
  async def alvcs(event):
422
  await event.edit(
423
+ f"Customise your {HNDLR}alive. Choose from the below options -",
424
  buttons=[
425
  [Button.inline("Aʟɪᴠᴇ Tᴇxᴛ", data="alvtx")],
426
  [Button.inline("Aʟɪᴠᴇ ᴍᴇᴅɪᴀ", data="alvmed")],
 
439
  name = "Alive Text"
440
  async with event.client.conversation(pru) as conv:
441
  await conv.send_message(
442
+ "**Alive Text**\nEnter the new alive text.\n\nUse /cancel to terminate the operation.",
443
  )
444
  response = conv.wait_event(events.NewMessage(chats=pru))
445
  response = await response
446
  themssg = response.message.message
447
  if themssg == "/cancel":
448
+ return await conv.send_message(
449
+ "Cancelled!!",
450
+ buttons=get_back_button("alvcstm"),
451
+ )
452
  else:
453
  await setit(event, var, themssg)
454
  await conv.send_message(
455
  "{} changed to {}\n\nAfter Setting All Things Do restart".format(
456
+ name,
457
+ themssg,
458
+ ),
459
+ buttons=get_back_button("alvcstm"),
460
  )
461
 
462
 
 
469
  name = "Alive Media"
470
  async with event.client.conversation(pru) as conv:
471
  await conv.send_message(
472
+ "**Alive Media**\nSend me a pic/gif/bot api id of sticker to set as alive media.\n\nUse /cancel to terminate the operation.",
473
  )
474
  response = await conv.get_response()
475
  try:
476
  themssg = response.message.message
477
  if themssg == "/cancel":
478
+ return await conv.send_message(
479
+ "Operation cancelled!!",
480
+ buttons=get_back_button("alvcstm"),
481
+ )
482
  except BaseException:
483
  pass
484
  media = await event.client.download_media(response, "alvpc")
 
494
  url = f"https://telegra.ph/{x[0]}"
495
  os.remove(media)
496
  except BaseException:
497
+ return await conv.send_message(
498
+ "Terminated.",
499
+ buttons=get_back_button("alvcstm"),
500
+ )
501
  await setit(event, var, url)
502
+ await conv.send_message(
503
+ f"{name} has been set.",
504
+ buttons=get_back_button("alvcstm"),
505
+ )
506
 
507
 
508
  @callback("delmed")
 
510
  async def dell(event):
511
  try:
512
  udB.delete("ALIVE_PIC")
513
+ return await event.edit("Done!", buttons=get_back_button("alvcstm"))
514
  except BaseException:
515
+ return await event.edit(
516
+ "Something went wrong...",
517
+ buttons=get_back_button("alvcstm"),
518
+ )
519
 
520
 
521
  @callback("pmcstm")
 
536
  Button.inline("Sᴇᴛ Wᴀʀɴs", data="swarn"),
537
  Button.inline("Dᴇʟᴇᴛᴇ Pᴍ Mᴇᴅɪᴀ", data="delpmmed"),
538
  ],
539
+ [Button.inline("« Bᴀᴄᴋ", data="ppmset")],
540
  ],
541
  )
542
 
 
550
  name = "PM Text"
551
  async with event.client.conversation(pru) as conv:
552
  await conv.send_message(
553
+ "**PM Text**\nEnter the new Pmpermit text.\n\nu can use `{name}` `{fullname}` `{count}` `{mention}` `{username}` to get this from user Too\n\nUse /cancel to terminate the operation.",
554
  )
555
  response = conv.wait_event(events.NewMessage(chats=pru))
556
  response = await response
557
  themssg = response.message.message
558
  if themssg == "/cancel":
559
+ return await conv.send_message(
560
+ "Cancelled!!",
561
+ buttons=get_back_button("pmcstm"),
562
+ )
563
  else:
564
  await setit(event, var, themssg)
565
  await conv.send_message(
566
  "{} changed to {}\n\nAfter Setting All Things Do restart".format(
567
+ name,
568
+ themssg,
569
+ ),
570
+ buttons=get_back_button("pmcstm"),
571
  )
572
 
573
 
 
591
  dn = udB.set("PMWARNS", value)
592
  if dn:
593
  await event.edit(
594
+ f"PM Warns Set to {value}.\nNew users will have {value} chances in PMs before getting banned.",
595
+ buttons=get_back_button("pmcstm"),
596
  )
597
  else:
598
+ await event.edit(
599
+ f"Something went wrong, please check your {hndlr}logs!",
600
+ buttons=get_back_button("pmcstm"),
601
+ )
602
 
603
 
604
  @callback("pmmed")
 
610
  name = "PM Media"
611
  async with event.client.conversation(pru) as conv:
612
  await conv.send_message(
613
+ "**PM Media**\nSend me a pic/gif/ or link to set as pmpermit media.\n\nUse /cancel to terminate the operation.",
614
  )
615
  response = await conv.get_response()
616
  try:
617
  themssg = response.message.message
618
  if themssg == "/cancel":
619
+ return await conv.send_message(
620
+ "Operation cancelled!!",
621
+ buttons=get_back_button("pmcstm"),
622
+ )
623
  except BaseException:
624
  pass
625
  media = await event.client.download_media(response, "pmpc")
 
635
  url = f"https://telegra.ph/{x[0]}"
636
  os.remove(media)
637
  except BaseException:
638
+ return await conv.send_message(
639
+ "Terminated.",
640
+ buttons=get_back_button("pmcstm"),
641
+ )
642
  await setit(event, var, url)
643
+ await conv.send_message(
644
+ f"{name} has been set.",
645
+ buttons=get_back_button("pmcstm"),
646
+ )
647
 
648
 
649
  @callback("delpmmed")
 
651
  async def dell(event):
652
  try:
653
  udB.delete("PMPIC")
654
+ return await event.edit("Done!", buttons=get_back_button("pmcstm"))
655
  except BaseException:
656
+ return await event.edit(
657
+ "Something went wrong...",
658
+ buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
659
+ )
660
 
661
 
662
  @callback("apauto")
 
677
  async def apon(event):
678
  var = "AUTOAPPROVE"
679
  await setit(event, var, "True")
680
+ await event.edit(
681
+ f"Done!! AUTOAPPROVE Started!!",
682
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="apauto")]],
683
+ )
684
 
685
 
686
  @callback("apof")
 
688
  async def apof(event):
689
  try:
690
  udB.delete("AUTOAPPROVE")
691
+ return await event.edit(
692
+ "Done! AUTOAPPROVE Stopped!!",
693
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="apauto")]],
694
+ )
695
  except BaseException:
696
+ return await event.edit(
697
+ "Something went wrong...",
698
+ buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
699
+ )
700
 
701
 
702
  @callback("pml")
 
717
  async def pmlog(event):
718
  var = "PMLOG"
719
  await setit(event, var, "True")
720
+ await event.edit(
721
+ f"Done!! PMLOGGER Started!!",
722
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="pml")]],
723
+ )
724
 
725
 
726
  @callback("pmlogof")
 
728
  async def pmlogof(event):
729
  try:
730
  udB.delete("PMLOG")
731
+ return await event.edit(
732
+ "Done! PMLOGGER Stopped!!",
733
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="pml")]],
734
+ )
735
  except BaseException:
736
+ return await event.edit(
737
+ "Something went wrong...",
738
+ buttons=[[Button.inline("« Sᴇᴛᴛɪɴɢs", data="setter")]],
739
+ )
740
 
741
 
742
  @callback("ppmset")
743
  @owner
744
  async def pmset(event):
745
+ await event.edit(
746
+ "PMPermit Settings:",
747
+ buttons=[
748
  [Button.inline("Tᴜʀɴ PMPᴇʀᴍɪᴛ Oɴ", data="pmon")],
749
  [Button.inline("Tᴜʀɴ PMPᴇʀᴍɪᴛ Oғғ", data="pmoff")],
750
  [Button.inline("Cᴜsᴛᴏᴍɪᴢᴇ PMPᴇʀᴍɪᴛ", data="pmcstm")],
 
758
  async def pmonn(event):
759
  var = "PMSETTING"
760
  await setit(event, var, "True")
761
+ await event.edit(
762
+ f"Done! PMPermit has been turned on!!",
763
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="ppmset")]],
764
+ )
765
 
766
 
767
  @callback("pmoff")
 
769
  async def pmofff(event):
770
  var = "PMSETTING"
771
  await setit(event, var, "False")
772
+ await event.edit(
773
+ f"Done! PMPermit has been turned off!!",
774
+ buttons=[[Button.inline("« Bᴀᴄᴋ", data="ppmset")]],
775
+ )
776
+
777
+
778
+ @callback("chatbot")
779
+ @owner
780
+ async def chbot(event):
781
+ await event.edit(
782
+ f"From This Feature U can chat with ppls Via ur Assistant Bot.\n[More info](https://t.me/UltroidUpdates/2)",
783
+ buttons=[
784
+ [Button.inline("Cʜᴀᴛ Bᴏᴛ Oɴ", data="onchbot")],
785
+ [Button.inline("Cʜᴀᴛ Bᴏᴛ Oғғ", data="ofchbot")],
786
+ [Button.inline("« Bᴀᴄᴋ", data="setter")],
787
+ ],
788
+ link_preview=False,
789
+ )
790
+
791
+
792
+ @callback("onchbot")
793
+ @owner
794
+ async def chon(event):
795
+ var = "PMBOT"
796
+ await setit(event, var, "True")
797
+ await event.edit(
798
+ "Done! Now u Can Chat With People Via This Bot",
799
+ buttons=[Button.inline("« Bᴀᴄᴋ", data="chatbot")],
800
+ )
801
+
802
+
803
+ @callback("ofchbot")
804
+ @owner
805
+ async def chon(event):
806
+ var = "PMBOT"
807
+ await setit(event, var, "False")
808
+ await event.edit(
809
+ "Done! Chat People Via This Bot Stopped.",
810
+ buttons=[Button.inline("« Bᴀᴄᴋ", data="chatbot")],
811
+ )
812
+
813
+
814
+ @callback("vcb")
815
+ @owner
816
+ async def vcb(event):
817
+ await event.edit(
818
+ f"From This Feature U can play songs in group voice chat\n\n[moreinfo](https://t.me/UltroidUpdates/4)",
819
+ buttons=[
820
+ [Button.inline("VC Sᴇssɪᴏɴ", data="vcs")],
821
+ [Button.inline("WEBSOCKET", data="vcw")],
822
+ [Button.inline("« Bᴀᴄᴋ", data="setter")],
823
+ ],
824
+ link_preview=False,
825
+ )
826
+
827
+
828
+ @callback("vcs")
829
+ @owner
830
+ async def name(event):
831
+ await event.delete()
832
+ pru = event.sender_id
833
+ var = "VC_SESSION"
834
+ name = "VC SESSION"
835
+ async with event.client.conversation(pru) as conv:
836
+ await conv.send_message(
837
+ "**Vc session**\nEnter the New session u generated for vc bot.\n\nUse /cancel to terminate the operation.",
838
+ )
839
+ response = conv.wait_event(events.NewMessage(chats=pru))
840
+ response = await response
841
+ themssg = response.message.message
842
+ if themssg == "/cancel":
843
+ return await conv.send_message(
844
+ "Cancelled!!",
845
+ buttons=get_back_button("vcb"),
846
+ )
847
+ else:
848
+ await setit(event, var, themssg)
849
+ await conv.send_message(
850
+ "{} changed to {}\n\nAfter Setting All Things Do restart".format(
851
+ name,
852
+ themssg,
853
+ ),
854
+ buttons=get_back_button("vcb"),
855
+ )
856
+
857
+
858
+ @callback("vcw")
859
+ @owner
860
+ async def name(event):
861
+ await event.delete()
862
+ pru = event.sender_id
863
+ var = "WEBSOCKET_URL"
864
+ name = "WEBSOCKET URL"
865
+ async with event.client.conversation(pru) as conv:
866
+ await conv.send_message(
867
+ "**WEBSOCKET URL**\nEnter your websocket url means\n`https://{HEROKU_APP_NAME}.herokuapp.com`\nIn place of HEROKU_APP_NAME put ur heroku app name\n\nUse /cancel to terminate the operation.",
868
+ )
869
+ response = conv.wait_event(events.NewMessage(chats=pru))
870
+ response = await response
871
+ themssg = response.message.message
872
+ if themssg == "/cancel":
873
+ return await conv.send_message(
874
+ "Cancelled!!",
875
+ buttons=get_back_button("vcb"),
876
+ )
877
+ else:
878
+ await setit(event, var, themssg)
879
+ await conv.send_message(
880
+ "{} changed to {}\n\nAfter Setting All Things Do restart".format(
881
+ name,
882
+ themssg,
883
+ ),
884
+ buttons=get_back_button("vcb"),
885
+ )
assistant/pmbot/banuser.py CHANGED
@@ -6,11 +6,7 @@ async def banhammer(event):
6
  x = await event.get_reply_message()
7
  if x is None:
8
  return await event.edit("Please reply to someone to ban him.")
9
- if x.fwd_from:
10
- target = x.fwd_from.from_id.user_id
11
- else:
12
- # this is a weird way of doing it
13
- return
14
  if not is_blacklisted(target):
15
  blacklist_user(target)
16
  await asst.send_message(event.chat_id, f"#BAN\nUser - {target}")
@@ -27,11 +23,7 @@ async def banhammer(event):
27
  x = await event.get_reply_message()
28
  if x is None:
29
  return await event.edit("Please reply to someone to ban him.")
30
- if x.fwd_from:
31
- target = x.fwd_from.from_id.user_id
32
- else:
33
- # this is a weird way of doing it
34
- return
35
  if is_blacklisted(target):
36
  rem_blacklist(target)
37
  await asst.send_message(event.chat_id, f"#UNBAN\nUser - {target}")
 
6
  x = await event.get_reply_message()
7
  if x is None:
8
  return await event.edit("Please reply to someone to ban him.")
9
+ target = int(udB.get(str(x.id)))
 
 
 
 
10
  if not is_blacklisted(target):
11
  blacklist_user(target)
12
  await asst.send_message(event.chat_id, f"#BAN\nUser - {target}")
 
23
  x = await event.get_reply_message()
24
  if x is None:
25
  return await event.edit("Please reply to someone to ban him.")
26
+ target = int(udB.get(str(x.id)))
 
 
 
 
27
  if is_blacklisted(target):
28
  rem_blacklist(target)
29
  await asst.send_message(event.chat_id, f"#UNBAN\nUser - {target}")
assistant/pmbot/incoming.py CHANGED
@@ -29,4 +29,5 @@ async def on_new_mssg(event):
29
  elif who == OWNER_ID:
30
  return
31
  else:
32
- await event.forward_to(OWNER_ID)
 
 
29
  elif who == OWNER_ID:
30
  return
31
  else:
32
+ xx = await event.forward_to(OWNER_ID)
33
+ udB.set(str(xx.id), str(who))
assistant/pmbot/outgoing.py CHANGED
@@ -8,7 +8,6 @@
8
  # https://github.com/xditya/TeleBot/blob/master/telebot/plugins/mybot/pmbot/outgoing.py
9
 
10
  from telethon import events
11
- from telethon.utils import pack_bot_file_id
12
 
13
  from . import *
14
 
@@ -20,24 +19,15 @@ async def on_out_mssg(event):
20
  x = await event.get_reply_message()
21
  if x is None:
22
  return
23
- to_send = event.raw_text
24
  who = event.sender_id
25
- if x.fwd_from:
26
- to_user = x.fwd_from.sender_id.user_id
27
- else:
28
- # this is a weird way of doing it
29
- return
30
  if who == OWNER_ID:
31
- if to_send.startswith("/"):
32
  return
33
- if event.text is not None and event.media:
34
- # if sending media
35
- bot_api_file_id = pack_bot_file_id(event.media)
36
- await asst.send_file(
37
- to_user,
38
- file=bot_api_file_id,
39
- caption=event.text,
40
- reply_to=x.reply_to_msg_id,
41
- )
42
  else:
43
- await asst.send_message(to_user, to_send, reply_to=x.reply_to_msg_id)
 
8
  # https://github.com/xditya/TeleBot/blob/master/telebot/plugins/mybot/pmbot/outgoing.py
9
 
10
  from telethon import events
 
11
 
12
  from . import *
13
 
 
19
  x = await event.get_reply_message()
20
  if x is None:
21
  return
 
22
  who = event.sender_id
 
 
 
 
 
23
  if who == OWNER_ID:
24
+ if event.text.startswith("/"):
25
  return
26
+ to_user = udB.get(str(x.id))
27
+ if event.media:
28
+ if event.text:
29
+ await asst.send_file(int(to_user), event.media, caption=event.text)
30
+ else:
31
+ await asst.send_file(int(to_user), event.media)
 
 
 
32
  else:
33
+ await asst.send_message(int(to_user), event.text)
assistant/start.py CHANGED
@@ -8,7 +8,8 @@
8
  from datetime import datetime
9
 
10
  from pyUltroid.functions.asst_fns import *
11
- from telethon import Button, custom, events
 
12
 
13
  from plugins import *
14
 
@@ -18,17 +19,17 @@ from . import *
18
  @asst_cmd("start")
19
  async def assistant(event):
20
  if event.is_group and event.sender_id in sed:
21
- return await eor(event, "`I dont work in groups`")
 
 
 
 
22
  else:
23
  if not is_added(event.sender_id) and event.sender_id not in sed:
24
  add_user(event.sender_id)
25
- await asst.send_message(
26
- OWNER_ID,
27
- f"Bot started by [{event.sender_id}](tg://user?id={event.sender_id})",
28
- )
29
  ok = ""
30
- if udB.get("MSG_FRWD") == True:
31
- ok = "You can contact me using this bot!!"
32
  if event.is_private and event.sender_id in sed:
33
  return
34
  await event.reply(
@@ -37,9 +38,11 @@ async def assistant(event):
37
  )
38
 
39
 
40
- @asst_cmd("start")
41
  @owner
42
  async def ultroid(event):
 
 
43
  if event.is_group:
44
  return
45
  name = event.sender.first_name
@@ -88,7 +91,7 @@ async def botstat(event):
88
  ok = len(get_all_users())
89
  msg = """Ultroid Assistant - Stats
90
  Total Users - {}""".format(
91
- ok
92
  )
93
  await event.answer(msg, cache_time=0, alert=True)
94
 
@@ -100,7 +103,7 @@ async def bdcast(event):
100
  await event.edit(f"Broadcast to {len(ok)} users.")
101
  async with event.client.conversation(OWNER_ID) as conv:
102
  await conv.send_message(
103
- "Enter your broadcast message.\nUse /cancel to stop the broadcast."
104
  )
105
  response = conv.wait_event(events.NewMessage(chats=OWNER_ID))
106
  response = await response
@@ -125,7 +128,7 @@ async def bdcast(event):
125
  Broadcast completed in {time_taken} seconds.
126
  Total Users in Bot - {len(ok)}
127
  Sent to {success} users.
128
- Failed for {fail} user(s)."""
129
  )
130
 
131
 
@@ -135,12 +138,37 @@ async def setting(event):
135
  await event.edit(
136
  "Choose from the below options -",
137
  buttons=[
138
- [Button.inline("API Kᴇʏs", data="apiset")],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  [
140
  Button.inline("Aʟɪᴠᴇ", data="alvcstm"),
141
  Button.inline("PᴍPᴇʀᴍɪᴛ", data="ppmset"),
142
  ],
143
  [Button.inline("Fᴇᴀᴛᴜʀᴇs", data="otvars")],
 
144
  [Button.inline("« Bᴀᴄᴋ", data="mainmenu")],
145
  ],
146
  )
 
8
  from datetime import datetime
9
 
10
  from pyUltroid.functions.asst_fns import *
11
+ from pyUltroid.misc._decorators import sed
12
+ from telethon import Button, events
13
 
14
  from plugins import *
15
 
 
19
  @asst_cmd("start")
20
  async def assistant(event):
21
  if event.is_group and event.sender_id in sed:
22
+ bnn = (await asst.get_me()).username
23
+ return await event.reply(
24
+ "`I dont work in groups`",
25
+ buttons=[Button.url("⚙️Sᴛᴀʀᴛ⚙️", url=f"https://t.me/{bnn}?start=set")],
26
+ )
27
  else:
28
  if not is_added(event.sender_id) and event.sender_id not in sed:
29
  add_user(event.sender_id)
 
 
 
 
30
  ok = ""
31
+ if udB.get("PMBOT") == "True":
32
+ ok = "You can contact my master using this bot!!\n\nSend your Message, I will Deliver it To Master."
33
  if event.is_private and event.sender_id in sed:
34
  return
35
  await event.reply(
 
38
  )
39
 
40
 
41
+ @asst_cmd("start ?(.*)")
42
  @owner
43
  async def ultroid(event):
44
+ if event.pattern_match.group(1):
45
+ return
46
  if event.is_group:
47
  return
48
  name = event.sender.first_name
 
91
  ok = len(get_all_users())
92
  msg = """Ultroid Assistant - Stats
93
  Total Users - {}""".format(
94
+ ok,
95
  )
96
  await event.answer(msg, cache_time=0, alert=True)
97
 
 
103
  await event.edit(f"Broadcast to {len(ok)} users.")
104
  async with event.client.conversation(OWNER_ID) as conv:
105
  await conv.send_message(
106
+ "Enter your broadcast message.\nUse /cancel to stop the broadcast.",
107
  )
108
  response = conv.wait_event(events.NewMessage(chats=OWNER_ID))
109
  response = await response
 
128
  Broadcast completed in {time_taken} seconds.
129
  Total Users in Bot - {len(ok)}
130
  Sent to {success} users.
131
+ Failed for {fail} user(s).""",
132
  )
133
 
134
 
 
138
  await event.edit(
139
  "Choose from the below options -",
140
  buttons=[
141
+ [
142
+ Button.inline("API Kᴇʏs", data="apiset"),
143
+ Button.inline("Pᴍ Bᴏᴛ", data="chatbot"),
144
+ ],
145
+ [
146
+ Button.inline("Aʟɪᴠᴇ", data="alvcstm"),
147
+ Button.inline("PᴍPᴇʀᴍɪᴛ", data="ppmset"),
148
+ ],
149
+ [Button.inline("Fᴇᴀᴛᴜʀᴇs", data="otvars")],
150
+ [Button.inline("VC Sᴏɴɢ Bᴏᴛ", data="vcb")],
151
+ [Button.inline("« Bᴀᴄᴋ", data="mainmenu")],
152
+ ],
153
+ )
154
+
155
+
156
+ @asst_cmd("start set")
157
+ @owner
158
+ async def set(event):
159
+ await event.reply(
160
+ "Choose from the below options -",
161
+ buttons=[
162
+ [
163
+ Button.inline("API Kᴇʏs", data="apiset"),
164
+ Button.inline("Pᴍ Bᴏᴛ", data="chatbot"),
165
+ ],
166
  [
167
  Button.inline("Aʟɪᴠᴇ", data="alvcstm"),
168
  Button.inline("PᴍPᴇʀᴍɪᴛ", data="ppmset"),
169
  ],
170
  [Button.inline("Fᴇᴀᴛᴜʀᴇs", data="otvars")],
171
+ [Button.inline("VC Sᴏɴɢ Bᴏᴛ", data="vcb")],
172
  [Button.inline("« Bᴀᴄᴋ", data="mainmenu")],
173
  ],
174
  )
assistant/ytdl.py CHANGED
@@ -13,9 +13,9 @@ import time
13
 
14
  from pyUltroid.functions.all import *
15
  from telethon import Button
 
16
  from telethon.tl.types import DocumentAttributeAudio
17
  from telethon.tl.types import InputWebDocument as wb
18
- from youtube_dl import YoutubeDL
19
  from youtubesearchpython import VideosSearch
20
 
21
  ytt = "https://telegra.ph/file/afd04510c13914a06dd03.jpg"
@@ -65,14 +65,18 @@ async def _(event):
65
  ],
66
  [
67
  Button.switch_inline(
68
- "Sᴇᴀʀᴄʜ Aɢᴀɪɴ", query="yt ", same_peer=True
 
 
69
  ),
70
  Button.switch_inline(
71
- "Sʜᴀʀᴇ", query=f"yt {string}", same_peer=False
 
 
72
  ),
73
  ],
74
  ],
75
- )
76
  )
77
  await event.answer(results)
78
 
@@ -81,7 +85,7 @@ async def _(event):
81
  @owner
82
  async def _(sur):
83
  url = sur.pattern_match.group(1).decode("UTF-8")
84
- getter = sur.sender_id
85
  opts = {
86
  "format": "bestaudio",
87
  "addmetadata": True,
@@ -95,17 +99,14 @@ async def _(sur):
95
  "key": "FFmpegExtractAudio",
96
  "preferredcodec": "mp3",
97
  "preferredquality": "320",
98
- }
99
  ],
100
  "outtmpl": "%(id)s.mp3",
101
  "quiet": True,
102
  "logtostderr": False,
103
  }
104
  song = True
105
- await dler(sur)
106
- with YoutubeDL(opts) as ytdl:
107
- ytdl_data = ytdl.extract_info(url)
108
-
109
  jpg = f"{ytdl_data['id']}.mp3.jpg"
110
  png = f"{ytdl_data['id']}.mp3.png"
111
  webp = f"{ytdl_data['id']}.mp3.webp"
@@ -125,28 +126,58 @@ async def _(sur):
125
  await sur.edit(
126
  f"`Preparing to upload song:`\
127
  \n**{ytdl_data['title']}**\
128
- \nby *{ytdl_data['uploader']}*"
129
- )
130
- await asst.send_file(
131
- getter,
132
- f"{ytdl_data['id']}.mp3",
133
- thumb=thumb,
134
- caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
135
- supports_streaming=True,
136
- attributes=[
137
- DocumentAttributeAudio(
138
- duration=int(ytdl_data["duration"]),
139
- title=str(ytdl_data["title"]),
140
- performer=str(ytdl_data["uploader"]),
141
- )
142
- ],
143
- progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
144
- progress(d, t, sur, c_time, "Uploading..", f"{ytdl_data['title']}.mp3")
145
- ),
146
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  os.system(f"rm {ytdl_data['id']}.mp*")
148
  await sur.edit(
149
- f"Get Your requested file **{ytdl_data['title']}** from here {Var.BOT_USERNAME} ",
150
  buttons=Button.switch_inline("Search More", query="yt ", same_peer=True),
151
  )
152
 
@@ -155,7 +186,8 @@ async def _(sur):
155
  @owner
156
  async def _(fuk):
157
  url = fuk.pattern_match.group(1).decode("UTF-8")
158
- getter = fuk.sender_id
 
159
  opts = {
160
  "format": "best",
161
  "addmetadata": True,
@@ -170,29 +202,60 @@ async def _(fuk):
170
  "quiet": True,
171
  }
172
  video = True
173
- await dler(fuk)
174
- with YoutubeDL(opts) as ytdl:
175
- ytdl_data = ytdl.extract_info(url)
176
 
177
  c_time = time.time()
178
  if video:
179
  await fuk.edit(
180
  f"`Preparing to upload video:`\
181
  \n**{ytdl_data['title']}**\
182
- \nby *{ytdl_data['uploader']}*"
183
- )
184
- await asst.send_file(
185
- getter,
186
- f"{ytdl_data['id']}.mp4",
187
- thumb=f"./resources/extras/ultroid.jpg",
188
- caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
189
- supports_streaming=True,
190
- progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
191
- progress(d, t, fuk, c_time, "Uploading..", f"{ytdl_data['title']}.mp4")
192
- ),
193
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  os.remove(f"{ytdl_data['id']}.mp4")
195
  await fuk.edit(
196
- f"Get Your requested file **{ytdl_data['title']}** from here {Var.BOT_USERNAME} ",
197
  buttons=Button.switch_inline("Search More", query="yt ", same_peer=True),
198
  )
 
13
 
14
  from pyUltroid.functions.all import *
15
  from telethon import Button
16
+ from telethon.errors import UserNotParticipantError
17
  from telethon.tl.types import DocumentAttributeAudio
18
  from telethon.tl.types import InputWebDocument as wb
 
19
  from youtubesearchpython import VideosSearch
20
 
21
  ytt = "https://telegra.ph/file/afd04510c13914a06dd03.jpg"
 
65
  ],
66
  [
67
  Button.switch_inline(
68
+ "Sᴇᴀʀᴄʜ Aɢᴀɪɴ",
69
+ query="yt ",
70
+ same_peer=True,
71
  ),
72
  Button.switch_inline(
73
+ "Sʜᴀʀᴇ",
74
+ query=f"yt {string}",
75
+ same_peer=False,
76
  ),
77
  ],
78
  ],
79
+ ),
80
  )
81
  await event.answer(results)
82
 
 
85
  @owner
86
  async def _(sur):
87
  url = sur.pattern_match.group(1).decode("UTF-8")
88
+ sur.sender_id
89
  opts = {
90
  "format": "bestaudio",
91
  "addmetadata": True,
 
99
  "key": "FFmpegExtractAudio",
100
  "preferredcodec": "mp3",
101
  "preferredquality": "320",
102
+ },
103
  ],
104
  "outtmpl": "%(id)s.mp3",
105
  "quiet": True,
106
  "logtostderr": False,
107
  }
108
  song = True
109
+ ytdl_data = await dler(sur, opts, url)
 
 
 
110
  jpg = f"{ytdl_data['id']}.mp3.jpg"
111
  png = f"{ytdl_data['id']}.mp3.png"
112
  webp = f"{ytdl_data['id']}.mp3.webp"
 
126
  await sur.edit(
127
  f"`Preparing to upload song:`\
128
  \n**{ytdl_data['title']}**\
129
+ \nby *{ytdl_data['uploader']}*",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  )
131
+ MSG = f"**{ytdl_data['title']}** Uploaded Successfully !"
132
+ chat = sur.chat_id
133
+ whome = ultroid_bot
134
+ if sur.is_private and sur.sender_id != ultroid_bot.uid:
135
+ chat = sur.sender_id
136
+ whome = asst
137
+ MSG += f"\nGet at {Var.BOT_USERNAME}"
138
+ try:
139
+ await whome.send_file(
140
+ chat,
141
+ f"{ytdl_data['id']}.mp3",
142
+ thumb=thumb,
143
+ caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
144
+ supports_streaming=True,
145
+ attributes=[
146
+ DocumentAttributeAudio(
147
+ duration=int(ytdl_data["duration"]),
148
+ title=str(ytdl_data["title"]),
149
+ performer=str(ytdl_data["uploader"]),
150
+ ),
151
+ ],
152
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
153
+ progress(
154
+ d,
155
+ t,
156
+ sur,
157
+ c_time,
158
+ "Uploading..",
159
+ f"{ytdl_data['title']}.mp3",
160
+ ),
161
+ ),
162
+ )
163
+ except UserNotParticipantError:
164
+ await asst.send_file(
165
+ sur.sender_id,
166
+ f"{ytdl_data['id']}.mp3",
167
+ thumb=thumb,
168
+ caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
169
+ supports_streaming=True,
170
+ attributes=[
171
+ DocumentAttributeAudio(
172
+ duration=int(ytdl_data["duration"]),
173
+ title=str(ytdl_data["title"]),
174
+ performer=str(ytdl_data["uploader"]),
175
+ ),
176
+ ],
177
+ )
178
  os.system(f"rm {ytdl_data['id']}.mp*")
179
  await sur.edit(
180
+ MSG,
181
  buttons=Button.switch_inline("Search More", query="yt ", same_peer=True),
182
  )
183
 
 
186
  @owner
187
  async def _(fuk):
188
  url = fuk.pattern_match.group(1).decode("UTF-8")
189
+ fuk.sender_id
190
+ event = fuk
191
  opts = {
192
  "format": "best",
193
  "addmetadata": True,
 
202
  "quiet": True,
203
  }
204
  video = True
205
+ ytdl_data = await dler(fuk, opts, url)
 
 
206
 
207
  c_time = time.time()
208
  if video:
209
  await fuk.edit(
210
  f"`Preparing to upload video:`\
211
  \n**{ytdl_data['title']}**\
212
+ \nby *{ytdl_data['uploader']}*",
 
 
 
 
 
 
 
 
 
 
213
  )
214
+ MSG = f"**{ytdl_data['title']}** Uploaded Successfully !"
215
+ chat = fuk.chat_id
216
+ whome = ultroid_bot
217
+ if event.is_private and event.sender_id != ultroid_bot.uid:
218
+ chat = fuk.sender_id
219
+ whome = asst
220
+ MSG += f"\nGet at {Var.BOT_USERNAME}"
221
+ try:
222
+ await whome.send_file(
223
+ chat,
224
+ f"{ytdl_data['id']}.mp4",
225
+ thumb=f"./resources/extras/ultroid.jpg",
226
+ caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
227
+ supports_streaming=True,
228
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
229
+ progress(
230
+ d,
231
+ t,
232
+ fuk,
233
+ c_time,
234
+ "Uploading..",
235
+ f"{ytdl_data['title']}.mp4",
236
+ ),
237
+ ),
238
+ )
239
+ except UserNotParticipantError:
240
+ await asst.send_file(
241
+ chat,
242
+ f"{ytdl_data['id']}.mp4",
243
+ thumb=f"./resources/extras/ultroid.jpg",
244
+ caption=f"**{ytdl_data['title']}\n{time_formatter((ytdl_data['duration'])*1000)}\n{ytdl_data['uploader']}**",
245
+ supports_streaming=True,
246
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
247
+ progress(
248
+ d,
249
+ t,
250
+ fuk,
251
+ c_time,
252
+ "Uploading..",
253
+ f"{ytdl_data['title']}.mp4",
254
+ ),
255
+ ),
256
+ )
257
  os.remove(f"{ytdl_data['id']}.mp4")
258
  await fuk.edit(
259
+ MSG,
260
  buttons=Button.switch_inline("Search More", query="yt ", same_peer=True),
261
  )
commit ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ Spam
2
+ dd
heroku.yml CHANGED
@@ -1,3 +1,7 @@
1
- build:
2
  docker:
3
  worker: Dockerfile
 
 
 
 
 
1
+ build:
2
  docker:
3
  worker: Dockerfile
4
+ web: Dockerfile
5
+ run:
6
+ worker: bash resources/startup/startup.sh
7
+ web: python vcstarter.py
package-lock.json ADDED
@@ -0,0 +1,1816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ultroid-vcbot",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 1,
5
+ "requires": true,
6
+ "dependencies": {
7
+ "@mapbox/node-pre-gyp": {
8
+ "version": "1.0.1",
9
+ "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.1.tgz",
10
+ "integrity": "sha512-CUBdThIZMoLEQQxACwhLsPg/puxBca0abTH3ixuvBQkhjJ80Hdp99jmVjxFCOa52/tZqN9d70IbGUf+OuKDHGA==",
11
+ "requires": {
12
+ "detect-libc": "^1.0.3",
13
+ "http-proxy-agent": "^4.0.1",
14
+ "make-dir": "^3.1.0",
15
+ "node-fetch": "^2.6.1",
16
+ "nopt": "^5.0.0",
17
+ "npmlog": "^4.1.2",
18
+ "rimraf": "^3.0.2",
19
+ "semver": "^7.3.4",
20
+ "tar": "^6.1.0"
21
+ }
22
+ },
23
+ "@sindresorhus/is": {
24
+ "version": "0.14.0",
25
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
26
+ "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
27
+ "dev": true
28
+ },
29
+ "@szmarczak/http-timer": {
30
+ "version": "1.1.2",
31
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
32
+ "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
33
+ "dev": true,
34
+ "requires": {
35
+ "defer-to-connect": "^1.0.1"
36
+ }
37
+ },
38
+ "@tootallnate/once": {
39
+ "version": "1.1.2",
40
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
41
+ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw=="
42
+ },
43
+ "@types/node": {
44
+ "version": "14.14.35",
45
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
46
+ "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==",
47
+ "dev": true
48
+ },
49
+ "@types/redis": {
50
+ "version": "2.8.28",
51
+ "resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.28.tgz",
52
+ "integrity": "sha512-8l2gr2OQ969ypa7hFOeKqtFoY70XkHxISV0pAwmQ2nm6CSPb1brmTmqJCGGrekCo+pAZyWlNXr+Kvo6L/1wijA==",
53
+ "dev": true,
54
+ "requires": {
55
+ "@types/node": "*"
56
+ }
57
+ },
58
+ "@types/ws": {
59
+ "version": "7.4.0",
60
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.0.tgz",
61
+ "integrity": "sha512-Y29uQ3Uy+58bZrFLhX36hcI3Np37nqWE7ky5tjiDoy1GDZnIwVxS0CgF+s+1bXMzjKBFy+fqaRfb708iNzdinw==",
62
+ "dev": true,
63
+ "requires": {
64
+ "@types/node": "*"
65
+ }
66
+ },
67
+ "@youtwitface/escape-html": {
68
+ "version": "1.1.3",
69
+ "resolved": "https://registry.npmjs.org/@youtwitface/escape-html/-/escape-html-1.1.3.tgz",
70
+ "integrity": "sha512-ZTE6NDvovm1S9jtzITZJvTiq4At09bDQjH4M/MNiZJq78LehIltGodCBZA5RROIE3bkQGJa9EwN37d5qgSFCfg=="
71
+ },
72
+ "abbrev": {
73
+ "version": "1.1.1",
74
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
75
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
76
+ },
77
+ "abort-controller": {
78
+ "version": "3.0.0",
79
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
80
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
81
+ "requires": {
82
+ "event-target-shim": "^5.0.0"
83
+ }
84
+ },
85
+ "agent-base": {
86
+ "version": "6.0.2",
87
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
88
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
89
+ "requires": {
90
+ "debug": "4"
91
+ }
92
+ },
93
+ "ansi-align": {
94
+ "version": "3.0.0",
95
+ "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
96
+ "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
97
+ "dev": true,
98
+ "requires": {
99
+ "string-width": "^3.0.0"
100
+ },
101
+ "dependencies": {
102
+ "ansi-regex": {
103
+ "version": "4.1.0",
104
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
105
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
106
+ "dev": true
107
+ },
108
+ "is-fullwidth-code-point": {
109
+ "version": "2.0.0",
110
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
111
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
112
+ "dev": true
113
+ },
114
+ "string-width": {
115
+ "version": "3.1.0",
116
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
117
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
118
+ "dev": true,
119
+ "requires": {
120
+ "emoji-regex": "^7.0.1",
121
+ "is-fullwidth-code-point": "^2.0.0",
122
+ "strip-ansi": "^5.1.0"
123
+ }
124
+ },
125
+ "strip-ansi": {
126
+ "version": "5.2.0",
127
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
128
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
129
+ "dev": true,
130
+ "requires": {
131
+ "ansi-regex": "^4.1.0"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "ansi-regex": {
137
+ "version": "2.1.1",
138
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
139
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
140
+ },
141
+ "ansi-styles": {
142
+ "version": "4.3.0",
143
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
144
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
145
+ "dev": true,
146
+ "requires": {
147
+ "color-convert": "^2.0.1"
148
+ }
149
+ },
150
+ "anymatch": {
151
+ "version": "3.1.1",
152
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
153
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
154
+ "dev": true,
155
+ "requires": {
156
+ "normalize-path": "^3.0.0",
157
+ "picomatch": "^2.0.4"
158
+ }
159
+ },
160
+ "aproba": {
161
+ "version": "1.2.0",
162
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
163
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
164
+ },
165
+ "are-we-there-yet": {
166
+ "version": "1.1.5",
167
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
168
+ "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
169
+ "requires": {
170
+ "delegates": "^1.0.0",
171
+ "readable-stream": "^2.0.6"
172
+ }
173
+ },
174
+ "arg": {
175
+ "version": "4.1.3",
176
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
177
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
178
+ "dev": true
179
+ },
180
+ "balanced-match": {
181
+ "version": "1.0.0",
182
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
183
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
184
+ },
185
+ "binary-extensions": {
186
+ "version": "2.2.0",
187
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
188
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
189
+ "dev": true
190
+ },
191
+ "boxen": {
192
+ "version": "4.2.0",
193
+ "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
194
+ "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
195
+ "dev": true,
196
+ "requires": {
197
+ "ansi-align": "^3.0.0",
198
+ "camelcase": "^5.3.1",
199
+ "chalk": "^3.0.0",
200
+ "cli-boxes": "^2.2.0",
201
+ "string-width": "^4.1.0",
202
+ "term-size": "^2.1.0",
203
+ "type-fest": "^0.8.1",
204
+ "widest-line": "^3.1.0"
205
+ },
206
+ "dependencies": {
207
+ "ansi-regex": {
208
+ "version": "5.0.0",
209
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
210
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
211
+ "dev": true
212
+ },
213
+ "emoji-regex": {
214
+ "version": "8.0.0",
215
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
216
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
217
+ "dev": true
218
+ },
219
+ "is-fullwidth-code-point": {
220
+ "version": "3.0.0",
221
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
222
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
223
+ "dev": true
224
+ },
225
+ "string-width": {
226
+ "version": "4.2.2",
227
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
228
+ "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
229
+ "dev": true,
230
+ "requires": {
231
+ "emoji-regex": "^8.0.0",
232
+ "is-fullwidth-code-point": "^3.0.0",
233
+ "strip-ansi": "^6.0.0"
234
+ }
235
+ },
236
+ "strip-ansi": {
237
+ "version": "6.0.0",
238
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
239
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
240
+ "dev": true,
241
+ "requires": {
242
+ "ansi-regex": "^5.0.0"
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "brace-expansion": {
248
+ "version": "1.1.11",
249
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
250
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
251
+ "requires": {
252
+ "balanced-match": "^1.0.0",
253
+ "concat-map": "0.0.1"
254
+ }
255
+ },
256
+ "braces": {
257
+ "version": "3.0.2",
258
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
259
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
260
+ "dev": true,
261
+ "requires": {
262
+ "fill-range": "^7.0.1"
263
+ }
264
+ },
265
+ "buffer-alloc": {
266
+ "version": "1.2.0",
267
+ "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
268
+ "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
269
+ "requires": {
270
+ "buffer-alloc-unsafe": "^1.1.0",
271
+ "buffer-fill": "^1.0.0"
272
+ }
273
+ },
274
+ "buffer-alloc-unsafe": {
275
+ "version": "1.1.0",
276
+ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
277
+ "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
278
+ },
279
+ "buffer-fill": {
280
+ "version": "1.0.0",
281
+ "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
282
+ "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
283
+ },
284
+ "buffer-from": {
285
+ "version": "1.1.1",
286
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
287
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
288
+ "dev": true
289
+ },
290
+ "cacheable-request": {
291
+ "version": "6.1.0",
292
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
293
+ "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
294
+ "dev": true,
295
+ "requires": {
296
+ "clone-response": "^1.0.2",
297
+ "get-stream": "^5.1.0",
298
+ "http-cache-semantics": "^4.0.0",
299
+ "keyv": "^3.0.0",
300
+ "lowercase-keys": "^2.0.0",
301
+ "normalize-url": "^4.1.0",
302
+ "responselike": "^1.0.2"
303
+ },
304
+ "dependencies": {
305
+ "get-stream": {
306
+ "version": "5.2.0",
307
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
308
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
309
+ "dev": true,
310
+ "requires": {
311
+ "pump": "^3.0.0"
312
+ }
313
+ },
314
+ "lowercase-keys": {
315
+ "version": "2.0.0",
316
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
317
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
318
+ "dev": true
319
+ }
320
+ }
321
+ },
322
+ "camelcase": {
323
+ "version": "5.3.1",
324
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
325
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
326
+ "dev": true
327
+ },
328
+ "chalk": {
329
+ "version": "3.0.0",
330
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
331
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
332
+ "dev": true,
333
+ "requires": {
334
+ "ansi-styles": "^4.1.0",
335
+ "supports-color": "^7.1.0"
336
+ },
337
+ "dependencies": {
338
+ "has-flag": {
339
+ "version": "4.0.0",
340
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
341
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
342
+ "dev": true
343
+ },
344
+ "supports-color": {
345
+ "version": "7.2.0",
346
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
347
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
348
+ "dev": true,
349
+ "requires": {
350
+ "has-flag": "^4.0.0"
351
+ }
352
+ }
353
+ }
354
+ },
355
+ "chokidar": {
356
+ "version": "3.5.1",
357
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
358
+ "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
359
+ "dev": true,
360
+ "requires": {
361
+ "anymatch": "~3.1.1",
362
+ "braces": "~3.0.2",
363
+ "fsevents": "~2.3.1",
364
+ "glob-parent": "~5.1.0",
365
+ "is-binary-path": "~2.1.0",
366
+ "is-glob": "~4.0.1",
367
+ "normalize-path": "~3.0.0",
368
+ "readdirp": "~3.5.0"
369
+ }
370
+ },
371
+ "chownr": {
372
+ "version": "2.0.0",
373
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
374
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
375
+ },
376
+ "ci-info": {
377
+ "version": "2.0.0",
378
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
379
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
380
+ "dev": true
381
+ },
382
+ "cli-boxes": {
383
+ "version": "2.2.1",
384
+ "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
385
+ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==",
386
+ "dev": true
387
+ },
388
+ "clone-response": {
389
+ "version": "1.0.2",
390
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
391
+ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
392
+ "dev": true,
393
+ "requires": {
394
+ "mimic-response": "^1.0.0"
395
+ }
396
+ },
397
+ "code-point-at": {
398
+ "version": "1.1.0",
399
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
400
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
401
+ },
402
+ "color-convert": {
403
+ "version": "2.0.1",
404
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
405
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
406
+ "dev": true,
407
+ "requires": {
408
+ "color-name": "~1.1.4"
409
+ }
410
+ },
411
+ "color-name": {
412
+ "version": "1.1.4",
413
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
414
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
415
+ "dev": true
416
+ },
417
+ "concat-map": {
418
+ "version": "0.0.1",
419
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
420
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
421
+ },
422
+ "configstore": {
423
+ "version": "5.0.1",
424
+ "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
425
+ "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
426
+ "dev": true,
427
+ "requires": {
428
+ "dot-prop": "^5.2.0",
429
+ "graceful-fs": "^4.1.2",
430
+ "make-dir": "^3.0.0",
431
+ "unique-string": "^2.0.0",
432
+ "write-file-atomic": "^3.0.0",
433
+ "xdg-basedir": "^4.0.0"
434
+ }
435
+ },
436
+ "console-control-strings": {
437
+ "version": "1.1.0",
438
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
439
+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
440
+ },
441
+ "core-util-is": {
442
+ "version": "1.0.2",
443
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
444
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
445
+ },
446
+ "create-require": {
447
+ "version": "1.1.1",
448
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
449
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
450
+ "dev": true
451
+ },
452
+ "crypto-random-string": {
453
+ "version": "2.0.0",
454
+ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
455
+ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
456
+ "dev": true
457
+ },
458
+ "debug": {
459
+ "version": "4.3.1",
460
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
461
+ "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
462
+ "requires": {
463
+ "ms": "2.1.2"
464
+ }
465
+ },
466
+ "decompress-response": {
467
+ "version": "3.3.0",
468
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
469
+ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
470
+ "dev": true,
471
+ "requires": {
472
+ "mimic-response": "^1.0.0"
473
+ }
474
+ },
475
+ "deep-extend": {
476
+ "version": "0.6.0",
477
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
478
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
479
+ },
480
+ "defer-to-connect": {
481
+ "version": "1.1.3",
482
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
483
+ "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
484
+ "dev": true
485
+ },
486
+ "delegates": {
487
+ "version": "1.0.0",
488
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
489
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
490
+ },
491
+ "denque": {
492
+ "version": "1.5.0",
493
+ "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
494
+ "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
495
+ },
496
+ "detect-libc": {
497
+ "version": "1.0.3",
498
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
499
+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
500
+ },
501
+ "diff": {
502
+ "version": "4.0.2",
503
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
504
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
505
+ "dev": true
506
+ },
507
+ "domexception": {
508
+ "version": "1.0.1",
509
+ "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
510
+ "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
511
+ "optional": true,
512
+ "requires": {
513
+ "webidl-conversions": "^4.0.2"
514
+ }
515
+ },
516
+ "dot-prop": {
517
+ "version": "5.3.0",
518
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
519
+ "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
520
+ "dev": true,
521
+ "requires": {
522
+ "is-obj": "^2.0.0"
523
+ }
524
+ },
525
+ "dotenv": {
526
+ "version": "8.2.0",
527
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
528
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
529
+ },
530
+ "duplexer3": {
531
+ "version": "0.1.4",
532
+ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
533
+ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=",
534
+ "dev": true
535
+ },
536
+ "emoji-regex": {
537
+ "version": "7.0.3",
538
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
539
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
540
+ "dev": true
541
+ },
542
+ "end-of-stream": {
543
+ "version": "1.4.4",
544
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
545
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
546
+ "dev": true,
547
+ "requires": {
548
+ "once": "^1.4.0"
549
+ }
550
+ },
551
+ "envalid": {
552
+ "version": "7.1.0",
553
+ "resolved": "https://registry.npmjs.org/envalid/-/envalid-7.1.0.tgz",
554
+ "integrity": "sha512-C5rtCxfj+ozW5q79fBYKcBEf0KSNklKwZudjCzXy9ANT8Pz1MKxPBn6unZnYXXy6e+cqVgnEURQeXmdueG9/kA=="
555
+ },
556
+ "escape-goat": {
557
+ "version": "2.1.1",
558
+ "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
559
+ "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==",
560
+ "dev": true
561
+ },
562
+ "event-target-shim": {
563
+ "version": "5.0.1",
564
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
565
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
566
+ },
567
+ "fill-range": {
568
+ "version": "7.0.1",
569
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
570
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
571
+ "dev": true,
572
+ "requires": {
573
+ "to-regex-range": "^5.0.1"
574
+ }
575
+ },
576
+ "fs-minipass": {
577
+ "version": "2.1.0",
578
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
579
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
580
+ "requires": {
581
+ "minipass": "^3.0.0"
582
+ }
583
+ },
584
+ "fs.realpath": {
585
+ "version": "1.0.0",
586
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
587
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
588
+ },
589
+ "fsevents": {
590
+ "version": "2.3.2",
591
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
592
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
593
+ "dev": true,
594
+ "optional": true
595
+ },
596
+ "gauge": {
597
+ "version": "2.7.4",
598
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
599
+ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
600
+ "requires": {
601
+ "aproba": "^1.0.3",
602
+ "console-control-strings": "^1.0.0",
603
+ "has-unicode": "^2.0.0",
604
+ "object-assign": "^4.1.0",
605
+ "signal-exit": "^3.0.0",
606
+ "string-width": "^1.0.1",
607
+ "strip-ansi": "^3.0.1",
608
+ "wide-align": "^1.1.0"
609
+ }
610
+ },
611
+ "get-stream": {
612
+ "version": "4.1.0",
613
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
614
+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
615
+ "dev": true,
616
+ "requires": {
617
+ "pump": "^3.0.0"
618
+ }
619
+ },
620
+ "glob": {
621
+ "version": "7.1.6",
622
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
623
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
624
+ "requires": {
625
+ "fs.realpath": "^1.0.0",
626
+ "inflight": "^1.0.4",
627
+ "inherits": "2",
628
+ "minimatch": "^3.0.4",
629
+ "once": "^1.3.0",
630
+ "path-is-absolute": "^1.0.0"
631
+ }
632
+ },
633
+ "glob-parent": {
634
+ "version": "5.1.2",
635
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
636
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
637
+ "dev": true,
638
+ "requires": {
639
+ "is-glob": "^4.0.1"
640
+ }
641
+ },
642
+ "global-dirs": {
643
+ "version": "2.1.0",
644
+ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
645
+ "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
646
+ "dev": true,
647
+ "requires": {
648
+ "ini": "1.3.7"
649
+ },
650
+ "dependencies": {
651
+ "ini": {
652
+ "version": "1.3.7",
653
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
654
+ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
655
+ "dev": true
656
+ }
657
+ }
658
+ },
659
+ "got": {
660
+ "version": "9.6.0",
661
+ "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
662
+ "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
663
+ "dev": true,
664
+ "requires": {
665
+ "@sindresorhus/is": "^0.14.0",
666
+ "@szmarczak/http-timer": "^1.1.2",
667
+ "cacheable-request": "^6.0.0",
668
+ "decompress-response": "^3.3.0",
669
+ "duplexer3": "^0.1.4",
670
+ "get-stream": "^4.1.0",
671
+ "lowercase-keys": "^1.0.1",
672
+ "mimic-response": "^1.0.1",
673
+ "p-cancelable": "^1.0.0",
674
+ "to-readable-stream": "^1.0.0",
675
+ "url-parse-lax": "^3.0.0"
676
+ }
677
+ },
678
+ "graceful-fs": {
679
+ "version": "4.2.6",
680
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
681
+ "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
682
+ "dev": true
683
+ },
684
+ "has-flag": {
685
+ "version": "3.0.0",
686
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
687
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
688
+ "dev": true
689
+ },
690
+ "has-unicode": {
691
+ "version": "2.0.1",
692
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
693
+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
694
+ },
695
+ "has-yarn": {
696
+ "version": "2.1.0",
697
+ "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
698
+ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
699
+ "dev": true
700
+ },
701
+ "http-cache-semantics": {
702
+ "version": "4.1.0",
703
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
704
+ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
705
+ "dev": true
706
+ },
707
+ "http-proxy-agent": {
708
+ "version": "4.0.1",
709
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
710
+ "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
711
+ "requires": {
712
+ "@tootallnate/once": "1",
713
+ "agent-base": "6",
714
+ "debug": "4"
715
+ }
716
+ },
717
+ "iconv-lite": {
718
+ "version": "0.4.24",
719
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
720
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
721
+ "requires": {
722
+ "safer-buffer": ">= 2.1.2 < 3"
723
+ }
724
+ },
725
+ "ignore-by-default": {
726
+ "version": "1.0.1",
727
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
728
+ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
729
+ "dev": true
730
+ },
731
+ "ignore-walk": {
732
+ "version": "3.0.3",
733
+ "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
734
+ "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
735
+ "requires": {
736
+ "minimatch": "^3.0.4"
737
+ }
738
+ },
739
+ "import-lazy": {
740
+ "version": "2.1.0",
741
+ "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
742
+ "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
743
+ "dev": true
744
+ },
745
+ "imurmurhash": {
746
+ "version": "0.1.4",
747
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
748
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
749
+ "dev": true
750
+ },
751
+ "inflight": {
752
+ "version": "1.0.6",
753
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
754
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
755
+ "requires": {
756
+ "once": "^1.3.0",
757
+ "wrappy": "1"
758
+ }
759
+ },
760
+ "inherits": {
761
+ "version": "2.0.4",
762
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
763
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
764
+ },
765
+ "ini": {
766
+ "version": "1.3.8",
767
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
768
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
769
+ },
770
+ "is-binary-path": {
771
+ "version": "2.1.0",
772
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
773
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
774
+ "dev": true,
775
+ "requires": {
776
+ "binary-extensions": "^2.0.0"
777
+ }
778
+ },
779
+ "is-ci": {
780
+ "version": "2.0.0",
781
+ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
782
+ "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
783
+ "dev": true,
784
+ "requires": {
785
+ "ci-info": "^2.0.0"
786
+ }
787
+ },
788
+ "is-extglob": {
789
+ "version": "2.1.1",
790
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
791
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
792
+ "dev": true
793
+ },
794
+ "is-fullwidth-code-point": {
795
+ "version": "1.0.0",
796
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
797
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
798
+ "requires": {
799
+ "number-is-nan": "^1.0.0"
800
+ }
801
+ },
802
+ "is-glob": {
803
+ "version": "4.0.1",
804
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
805
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
806
+ "dev": true,
807
+ "requires": {
808
+ "is-extglob": "^2.1.1"
809
+ }
810
+ },
811
+ "is-installed-globally": {
812
+ "version": "0.3.2",
813
+ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz",
814
+ "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==",
815
+ "dev": true,
816
+ "requires": {
817
+ "global-dirs": "^2.0.1",
818
+ "is-path-inside": "^3.0.1"
819
+ }
820
+ },
821
+ "is-npm": {
822
+ "version": "4.0.0",
823
+ "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz",
824
+ "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==",
825
+ "dev": true
826
+ },
827
+ "is-number": {
828
+ "version": "7.0.0",
829
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
830
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
831
+ "dev": true
832
+ },
833
+ "is-obj": {
834
+ "version": "2.0.0",
835
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
836
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
837
+ "dev": true
838
+ },
839
+ "is-path-inside": {
840
+ "version": "3.0.3",
841
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
842
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
843
+ "dev": true
844
+ },
845
+ "is-typedarray": {
846
+ "version": "1.0.0",
847
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
848
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
849
+ "dev": true
850
+ },
851
+ "is-yarn-global": {
852
+ "version": "0.3.0",
853
+ "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
854
+ "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==",
855
+ "dev": true
856
+ },
857
+ "isarray": {
858
+ "version": "1.0.0",
859
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
860
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
861
+ },
862
+ "json-buffer": {
863
+ "version": "3.0.0",
864
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
865
+ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=",
866
+ "dev": true
867
+ },
868
+ "keyv": {
869
+ "version": "3.1.0",
870
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
871
+ "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
872
+ "dev": true,
873
+ "requires": {
874
+ "json-buffer": "3.0.0"
875
+ }
876
+ },
877
+ "latest-version": {
878
+ "version": "5.1.0",
879
+ "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
880
+ "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
881
+ "dev": true,
882
+ "requires": {
883
+ "package-json": "^6.3.0"
884
+ }
885
+ },
886
+ "lowercase-keys": {
887
+ "version": "1.0.1",
888
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
889
+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
890
+ "dev": true
891
+ },
892
+ "lru-cache": {
893
+ "version": "6.0.0",
894
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
895
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
896
+ "requires": {
897
+ "yallist": "^4.0.0"
898
+ }
899
+ },
900
+ "make-dir": {
901
+ "version": "3.1.0",
902
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
903
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
904
+ "requires": {
905
+ "semver": "^6.0.0"
906
+ },
907
+ "dependencies": {
908
+ "semver": {
909
+ "version": "6.3.0",
910
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
911
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
912
+ }
913
+ }
914
+ },
915
+ "make-error": {
916
+ "version": "1.3.6",
917
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
918
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
919
+ "dev": true
920
+ },
921
+ "mimic-response": {
922
+ "version": "1.0.1",
923
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
924
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
925
+ "dev": true
926
+ },
927
+ "minimatch": {
928
+ "version": "3.0.4",
929
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
930
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
931
+ "requires": {
932
+ "brace-expansion": "^1.1.7"
933
+ }
934
+ },
935
+ "minimist": {
936
+ "version": "1.2.5",
937
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
938
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
939
+ },
940
+ "minipass": {
941
+ "version": "3.1.3",
942
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz",
943
+ "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==",
944
+ "requires": {
945
+ "yallist": "^4.0.0"
946
+ }
947
+ },
948
+ "minizlib": {
949
+ "version": "2.1.2",
950
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
951
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
952
+ "requires": {
953
+ "minipass": "^3.0.0",
954
+ "yallist": "^4.0.0"
955
+ }
956
+ },
957
+ "mkdirp": {
958
+ "version": "1.0.4",
959
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
960
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
961
+ },
962
+ "module-alias": {
963
+ "version": "2.2.2",
964
+ "resolved": "https://registry.npmjs.org/module-alias/-/module-alias-2.2.2.tgz",
965
+ "integrity": "sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q=="
966
+ },
967
+ "ms": {
968
+ "version": "2.1.2",
969
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
970
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
971
+ },
972
+ "needle": {
973
+ "version": "2.6.0",
974
+ "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
975
+ "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
976
+ "requires": {
977
+ "debug": "^3.2.6",
978
+ "iconv-lite": "^0.4.4",
979
+ "sax": "^1.2.4"
980
+ },
981
+ "dependencies": {
982
+ "debug": {
983
+ "version": "3.2.7",
984
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
985
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
986
+ "requires": {
987
+ "ms": "^2.1.1"
988
+ }
989
+ }
990
+ }
991
+ },
992
+ "node-fetch": {
993
+ "version": "2.6.1",
994
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
995
+ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
996
+ },
997
+ "nodemon": {
998
+ "version": "2.0.7",
999
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz",
1000
+ "integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==",
1001
+ "dev": true,
1002
+ "requires": {
1003
+ "chokidar": "^3.2.2",
1004
+ "debug": "^3.2.6",
1005
+ "ignore-by-default": "^1.0.1",
1006
+ "minimatch": "^3.0.4",
1007
+ "pstree.remy": "^1.1.7",
1008
+ "semver": "^5.7.1",
1009
+ "supports-color": "^5.5.0",
1010
+ "touch": "^3.1.0",
1011
+ "undefsafe": "^2.0.3",
1012
+ "update-notifier": "^4.1.0"
1013
+ },
1014
+ "dependencies": {
1015
+ "debug": {
1016
+ "version": "3.2.7",
1017
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
1018
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
1019
+ "dev": true,
1020
+ "requires": {
1021
+ "ms": "^2.1.1"
1022
+ }
1023
+ },
1024
+ "semver": {
1025
+ "version": "5.7.1",
1026
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1027
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1028
+ "dev": true
1029
+ }
1030
+ }
1031
+ },
1032
+ "nopt": {
1033
+ "version": "5.0.0",
1034
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
1035
+ "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
1036
+ "requires": {
1037
+ "abbrev": "1"
1038
+ }
1039
+ },
1040
+ "normalize-path": {
1041
+ "version": "3.0.0",
1042
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1043
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1044
+ "dev": true
1045
+ },
1046
+ "normalize-url": {
1047
+ "version": "4.5.0",
1048
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz",
1049
+ "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==",
1050
+ "dev": true
1051
+ },
1052
+ "npm-bundled": {
1053
+ "version": "1.1.1",
1054
+ "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
1055
+ "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
1056
+ "requires": {
1057
+ "npm-normalize-package-bin": "^1.0.1"
1058
+ }
1059
+ },
1060
+ "npm-normalize-package-bin": {
1061
+ "version": "1.0.1",
1062
+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
1063
+ "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
1064
+ },
1065
+ "npm-packlist": {
1066
+ "version": "1.4.8",
1067
+ "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
1068
+ "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
1069
+ "requires": {
1070
+ "ignore-walk": "^3.0.1",
1071
+ "npm-bundled": "^1.0.1",
1072
+ "npm-normalize-package-bin": "^1.0.1"
1073
+ }
1074
+ },
1075
+ "npmlog": {
1076
+ "version": "4.1.2",
1077
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
1078
+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
1079
+ "requires": {
1080
+ "are-we-there-yet": "~1.1.2",
1081
+ "console-control-strings": "~1.1.0",
1082
+ "gauge": "~2.7.3",
1083
+ "set-blocking": "~2.0.0"
1084
+ }
1085
+ },
1086
+ "number-is-nan": {
1087
+ "version": "1.0.1",
1088
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
1089
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
1090
+ },
1091
+ "object-assign": {
1092
+ "version": "4.1.1",
1093
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1094
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
1095
+ },
1096
+ "once": {
1097
+ "version": "1.4.0",
1098
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1099
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
1100
+ "requires": {
1101
+ "wrappy": "1"
1102
+ }
1103
+ },
1104
+ "os-homedir": {
1105
+ "version": "1.0.2",
1106
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
1107
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
1108
+ },
1109
+ "os-tmpdir": {
1110
+ "version": "1.0.2",
1111
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
1112
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
1113
+ },
1114
+ "osenv": {
1115
+ "version": "0.1.5",
1116
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
1117
+ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
1118
+ "requires": {
1119
+ "os-homedir": "^1.0.0",
1120
+ "os-tmpdir": "^1.0.0"
1121
+ }
1122
+ },
1123
+ "p-cancelable": {
1124
+ "version": "1.1.0",
1125
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
1126
+ "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",
1127
+ "dev": true
1128
+ },
1129
+ "p-timeout": {
1130
+ "version": "4.1.0",
1131
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-4.1.0.tgz",
1132
+ "integrity": "sha512-+/wmHtzJuWii1sXn3HCuH/FTwGhrp4tmJTxSKJbfS+vkipci6osxXM5mY0jUiRzWKMTgUT8l7HFbeSwZAynqHw=="
1133
+ },
1134
+ "package-json": {
1135
+ "version": "6.5.0",
1136
+ "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
1137
+ "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
1138
+ "dev": true,
1139
+ "requires": {
1140
+ "got": "^9.6.0",
1141
+ "registry-auth-token": "^4.0.0",
1142
+ "registry-url": "^5.0.0",
1143
+ "semver": "^6.2.0"
1144
+ },
1145
+ "dependencies": {
1146
+ "semver": {
1147
+ "version": "6.3.0",
1148
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1149
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1150
+ "dev": true
1151
+ }
1152
+ }
1153
+ },
1154
+ "path-is-absolute": {
1155
+ "version": "1.0.1",
1156
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1157
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
1158
+ },
1159
+ "picomatch": {
1160
+ "version": "2.2.2",
1161
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
1162
+ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
1163
+ "dev": true
1164
+ },
1165
+ "prepend-http": {
1166
+ "version": "2.0.0",
1167
+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
1168
+ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
1169
+ "dev": true
1170
+ },
1171
+ "process-nextick-args": {
1172
+ "version": "2.0.1",
1173
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
1174
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
1175
+ },
1176
+ "pstree.remy": {
1177
+ "version": "1.1.8",
1178
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
1179
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
1180
+ "dev": true
1181
+ },
1182
+ "pump": {
1183
+ "version": "3.0.0",
1184
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
1185
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
1186
+ "dev": true,
1187
+ "requires": {
1188
+ "end-of-stream": "^1.1.0",
1189
+ "once": "^1.3.1"
1190
+ }
1191
+ },
1192
+ "pupa": {
1193
+ "version": "2.1.1",
1194
+ "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
1195
+ "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==",
1196
+ "dev": true,
1197
+ "requires": {
1198
+ "escape-goat": "^2.0.0"
1199
+ }
1200
+ },
1201
+ "rc": {
1202
+ "version": "1.2.8",
1203
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
1204
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
1205
+ "requires": {
1206
+ "deep-extend": "^0.6.0",
1207
+ "ini": "~1.3.0",
1208
+ "minimist": "^1.2.0",
1209
+ "strip-json-comments": "~2.0.1"
1210
+ }
1211
+ },
1212
+ "readable-stream": {
1213
+ "version": "2.3.7",
1214
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
1215
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
1216
+ "requires": {
1217
+ "core-util-is": "~1.0.0",
1218
+ "inherits": "~2.0.3",
1219
+ "isarray": "~1.0.0",
1220
+ "process-nextick-args": "~2.0.0",
1221
+ "safe-buffer": "~5.1.1",
1222
+ "string_decoder": "~1.1.1",
1223
+ "util-deprecate": "~1.0.1"
1224
+ }
1225
+ },
1226
+ "readdirp": {
1227
+ "version": "3.5.0",
1228
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
1229
+ "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
1230
+ "dev": true,
1231
+ "requires": {
1232
+ "picomatch": "^2.2.1"
1233
+ }
1234
+ },
1235
+ "redis": {
1236
+ "version": "3.0.2",
1237
+ "resolved": "https://registry.npmjs.org/redis/-/redis-3.0.2.tgz",
1238
+ "integrity": "sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ==",
1239
+ "requires": {
1240
+ "denque": "^1.4.1",
1241
+ "redis-commands": "^1.5.0",
1242
+ "redis-errors": "^1.2.0",
1243
+ "redis-parser": "^3.0.0"
1244
+ }
1245
+ },
1246
+ "redis-commands": {
1247
+ "version": "1.7.0",
1248
+ "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz",
1249
+ "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ=="
1250
+ },
1251
+ "redis-errors": {
1252
+ "version": "1.2.0",
1253
+ "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz",
1254
+ "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60="
1255
+ },
1256
+ "redis-parser": {
1257
+ "version": "3.0.0",
1258
+ "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz",
1259
+ "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=",
1260
+ "requires": {
1261
+ "redis-errors": "^1.0.0"
1262
+ }
1263
+ },
1264
+ "registry-auth-token": {
1265
+ "version": "4.2.1",
1266
+ "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz",
1267
+ "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==",
1268
+ "dev": true,
1269
+ "requires": {
1270
+ "rc": "^1.2.8"
1271
+ }
1272
+ },
1273
+ "registry-url": {
1274
+ "version": "5.1.0",
1275
+ "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
1276
+ "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
1277
+ "dev": true,
1278
+ "requires": {
1279
+ "rc": "^1.2.8"
1280
+ }
1281
+ },
1282
+ "responselike": {
1283
+ "version": "1.0.2",
1284
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
1285
+ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
1286
+ "dev": true,
1287
+ "requires": {
1288
+ "lowercase-keys": "^1.0.0"
1289
+ }
1290
+ },
1291
+ "rimraf": {
1292
+ "version": "3.0.2",
1293
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
1294
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
1295
+ "requires": {
1296
+ "glob": "^7.1.3"
1297
+ }
1298
+ },
1299
+ "safe-buffer": {
1300
+ "version": "5.1.2",
1301
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1302
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
1303
+ },
1304
+ "safe-compare": {
1305
+ "version": "1.1.4",
1306
+ "resolved": "https://registry.npmjs.org/safe-compare/-/safe-compare-1.1.4.tgz",
1307
+ "integrity": "sha512-b9wZ986HHCo/HbKrRpBJb2kqXMK9CEWIE1egeEvZsYn69ay3kdfl9nG3RyOcR+jInTDf7a86WQ1d4VJX7goSSQ==",
1308
+ "requires": {
1309
+ "buffer-alloc": "^1.2.0"
1310
+ }
1311
+ },
1312
+ "safer-buffer": {
1313
+ "version": "2.1.2",
1314
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1315
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
1316
+ },
1317
+ "sandwich-stream": {
1318
+ "version": "2.0.2",
1319
+ "resolved": "https://registry.npmjs.org/sandwich-stream/-/sandwich-stream-2.0.2.tgz",
1320
+ "integrity": "sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ=="
1321
+ },
1322
+ "sax": {
1323
+ "version": "1.2.4",
1324
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
1325
+ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
1326
+ },
1327
+ "semver": {
1328
+ "version": "7.3.5",
1329
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
1330
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
1331
+ "requires": {
1332
+ "lru-cache": "^6.0.0"
1333
+ }
1334
+ },
1335
+ "semver-diff": {
1336
+ "version": "3.1.1",
1337
+ "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
1338
+ "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
1339
+ "dev": true,
1340
+ "requires": {
1341
+ "semver": "^6.3.0"
1342
+ },
1343
+ "dependencies": {
1344
+ "semver": {
1345
+ "version": "6.3.0",
1346
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1347
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1348
+ "dev": true
1349
+ }
1350
+ }
1351
+ },
1352
+ "set-blocking": {
1353
+ "version": "2.0.0",
1354
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
1355
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
1356
+ },
1357
+ "signal-exit": {
1358
+ "version": "3.0.3",
1359
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
1360
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
1361
+ },
1362
+ "source-map": {
1363
+ "version": "0.6.1",
1364
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
1365
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
1366
+ "dev": true
1367
+ },
1368
+ "source-map-support": {
1369
+ "version": "0.5.19",
1370
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
1371
+ "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
1372
+ "dev": true,
1373
+ "requires": {
1374
+ "buffer-from": "^1.0.0",
1375
+ "source-map": "^0.6.0"
1376
+ }
1377
+ },
1378
+ "string-width": {
1379
+ "version": "1.0.2",
1380
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
1381
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
1382
+ "requires": {
1383
+ "code-point-at": "^1.0.0",
1384
+ "is-fullwidth-code-point": "^1.0.0",
1385
+ "strip-ansi": "^3.0.0"
1386
+ }
1387
+ },
1388
+ "string_decoder": {
1389
+ "version": "1.1.1",
1390
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1391
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1392
+ "requires": {
1393
+ "safe-buffer": "~5.1.0"
1394
+ }
1395
+ },
1396
+ "strip-ansi": {
1397
+ "version": "3.0.1",
1398
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
1399
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
1400
+ "requires": {
1401
+ "ansi-regex": "^2.0.0"
1402
+ }
1403
+ },
1404
+ "strip-json-comments": {
1405
+ "version": "2.0.1",
1406
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1407
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
1408
+ },
1409
+ "supports-color": {
1410
+ "version": "5.5.0",
1411
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1412
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1413
+ "dev": true,
1414
+ "requires": {
1415
+ "has-flag": "^3.0.0"
1416
+ }
1417
+ },
1418
+ "tar": {
1419
+ "version": "6.1.0",
1420
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
1421
+ "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
1422
+ "requires": {
1423
+ "chownr": "^2.0.0",
1424
+ "fs-minipass": "^2.0.0",
1425
+ "minipass": "^3.0.0",
1426
+ "minizlib": "^2.1.1",
1427
+ "mkdirp": "^1.0.3",
1428
+ "yallist": "^4.0.0"
1429
+ }
1430
+ },
1431
+ "telegraf": {
1432
+ "version": "4.3.0",
1433
+ "resolved": "https://registry.npmjs.org/telegraf/-/telegraf-4.3.0.tgz",
1434
+ "integrity": "sha512-MuDUtSMipzMzQp8fXbQx76jp4ZD70KREdnpH1idUzN9Zlgm6EzatBQFU4Ps0ipxtEmnBBdghBMumQwrjRe3eqg==",
1435
+ "requires": {
1436
+ "abort-controller": "^3.0.0",
1437
+ "debug": "^4.3.1",
1438
+ "minimist": "^1.2.5",
1439
+ "module-alias": "^2.2.2",
1440
+ "node-fetch": "^2.6.1",
1441
+ "p-timeout": "^4.1.0",
1442
+ "safe-compare": "^1.1.4",
1443
+ "sandwich-stream": "^2.0.2",
1444
+ "typegram": "^3.2.0"
1445
+ }
1446
+ },
1447
+ "term-size": {
1448
+ "version": "2.2.1",
1449
+ "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",
1450
+ "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==",
1451
+ "dev": true
1452
+ },
1453
+ "tgcalls": {
1454
+ "version": "0.1.2",
1455
+ "resolved": "https://registry.npmjs.org/tgcalls/-/tgcalls-0.1.2.tgz",
1456
+ "integrity": "sha512-b4hGcMPtTWn3pNY3GhgSh+fWHRO4seeoGBuTfg5CBQkD5LlSRYYqwjpAptaYzBJDgU4pDnwp8N+sBs05PwzuSw==",
1457
+ "requires": {
1458
+ "wrtc": "^0.4.7"
1459
+ }
1460
+ },
1461
+ "to-readable-stream": {
1462
+ "version": "1.0.0",
1463
+ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
1464
+ "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
1465
+ "dev": true
1466
+ },
1467
+ "to-regex-range": {
1468
+ "version": "5.0.1",
1469
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1470
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1471
+ "dev": true,
1472
+ "requires": {
1473
+ "is-number": "^7.0.0"
1474
+ }
1475
+ },
1476
+ "touch": {
1477
+ "version": "3.1.0",
1478
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
1479
+ "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
1480
+ "dev": true,
1481
+ "requires": {
1482
+ "nopt": "~1.0.10"
1483
+ },
1484
+ "dependencies": {
1485
+ "nopt": {
1486
+ "version": "1.0.10",
1487
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
1488
+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
1489
+ "dev": true,
1490
+ "requires": {
1491
+ "abbrev": "1"
1492
+ }
1493
+ }
1494
+ }
1495
+ },
1496
+ "ts-node": {
1497
+ "version": "9.1.1",
1498
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz",
1499
+ "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==",
1500
+ "dev": true,
1501
+ "requires": {
1502
+ "arg": "^4.1.0",
1503
+ "create-require": "^1.1.0",
1504
+ "diff": "^4.0.1",
1505
+ "make-error": "^1.1.1",
1506
+ "source-map-support": "^0.5.17",
1507
+ "yn": "3.1.1"
1508
+ }
1509
+ },
1510
+ "type-fest": {
1511
+ "version": "0.8.1",
1512
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
1513
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
1514
+ "dev": true
1515
+ },
1516
+ "typedarray-to-buffer": {
1517
+ "version": "3.1.5",
1518
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
1519
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
1520
+ "dev": true,
1521
+ "requires": {
1522
+ "is-typedarray": "^1.0.0"
1523
+ }
1524
+ },
1525
+ "typegram": {
1526
+ "version": "3.2.3",
1527
+ "resolved": "https://registry.npmjs.org/typegram/-/typegram-3.2.3.tgz",
1528
+ "integrity": "sha512-zlkY7vNTLcwQhLUyYXAUzRelzH752LBFl8m4u04d5g5P7lM9bGegeIRwzd3mVCHJH6R3s48pKeFTVSdVlN+omg=="
1529
+ },
1530
+ "typescript": {
1531
+ "version": "4.2.3",
1532
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
1533
+ "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
1534
+ "dev": true
1535
+ },
1536
+ "undefsafe": {
1537
+ "version": "2.0.3",
1538
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz",
1539
+ "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==",
1540
+ "dev": true,
1541
+ "requires": {
1542
+ "debug": "^2.2.0"
1543
+ },
1544
+ "dependencies": {
1545
+ "debug": {
1546
+ "version": "2.6.9",
1547
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1548
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1549
+ "dev": true,
1550
+ "requires": {
1551
+ "ms": "2.0.0"
1552
+ }
1553
+ },
1554
+ "ms": {
1555
+ "version": "2.0.0",
1556
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1557
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1558
+ "dev": true
1559
+ }
1560
+ }
1561
+ },
1562
+ "unique-string": {
1563
+ "version": "2.0.0",
1564
+ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
1565
+ "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
1566
+ "dev": true,
1567
+ "requires": {
1568
+ "crypto-random-string": "^2.0.0"
1569
+ }
1570
+ },
1571
+ "update-notifier": {
1572
+ "version": "4.1.3",
1573
+ "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz",
1574
+ "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==",
1575
+ "dev": true,
1576
+ "requires": {
1577
+ "boxen": "^4.2.0",
1578
+ "chalk": "^3.0.0",
1579
+ "configstore": "^5.0.1",
1580
+ "has-yarn": "^2.1.0",
1581
+ "import-lazy": "^2.1.0",
1582
+ "is-ci": "^2.0.0",
1583
+ "is-installed-globally": "^0.3.1",
1584
+ "is-npm": "^4.0.0",
1585
+ "is-yarn-global": "^0.3.0",
1586
+ "latest-version": "^5.0.0",
1587
+ "pupa": "^2.0.1",
1588
+ "semver-diff": "^3.1.1",
1589
+ "xdg-basedir": "^4.0.0"
1590
+ }
1591
+ },
1592
+ "url-parse-lax": {
1593
+ "version": "3.0.0",
1594
+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
1595
+ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
1596
+ "dev": true,
1597
+ "requires": {
1598
+ "prepend-http": "^2.0.0"
1599
+ }
1600
+ },
1601
+ "util-deprecate": {
1602
+ "version": "1.0.2",
1603
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1604
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
1605
+ },
1606
+ "webidl-conversions": {
1607
+ "version": "4.0.2",
1608
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
1609
+ "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
1610
+ "optional": true
1611
+ },
1612
+ "wide-align": {
1613
+ "version": "1.1.3",
1614
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1615
+ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1616
+ "requires": {
1617
+ "string-width": "^1.0.2 || 2"
1618
+ }
1619
+ },
1620
+ "widest-line": {
1621
+ "version": "3.1.0",
1622
+ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
1623
+ "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
1624
+ "dev": true,
1625
+ "requires": {
1626
+ "string-width": "^4.0.0"
1627
+ },
1628
+ "dependencies": {
1629
+ "ansi-regex": {
1630
+ "version": "5.0.0",
1631
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
1632
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
1633
+ "dev": true
1634
+ },
1635
+ "emoji-regex": {
1636
+ "version": "8.0.0",
1637
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
1638
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
1639
+ "dev": true
1640
+ },
1641
+ "is-fullwidth-code-point": {
1642
+ "version": "3.0.0",
1643
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
1644
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
1645
+ "dev": true
1646
+ },
1647
+ "string-width": {
1648
+ "version": "4.2.2",
1649
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
1650
+ "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
1651
+ "dev": true,
1652
+ "requires": {
1653
+ "emoji-regex": "^8.0.0",
1654
+ "is-fullwidth-code-point": "^3.0.0",
1655
+ "strip-ansi": "^6.0.0"
1656
+ }
1657
+ },
1658
+ "strip-ansi": {
1659
+ "version": "6.0.0",
1660
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
1661
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
1662
+ "dev": true,
1663
+ "requires": {
1664
+ "ansi-regex": "^5.0.0"
1665
+ }
1666
+ }
1667
+ }
1668
+ },
1669
+ "wrappy": {
1670
+ "version": "1.0.2",
1671
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1672
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
1673
+ },
1674
+ "write-file-atomic": {
1675
+ "version": "3.0.3",
1676
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
1677
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
1678
+ "dev": true,
1679
+ "requires": {
1680
+ "imurmurhash": "^0.1.4",
1681
+ "is-typedarray": "^1.0.0",
1682
+ "signal-exit": "^3.0.2",
1683
+ "typedarray-to-buffer": "^3.1.5"
1684
+ }
1685
+ },
1686
+ "wrtc": {
1687
+ "version": "0.4.7",
1688
+ "resolved": "https://registry.npmjs.org/wrtc/-/wrtc-0.4.7.tgz",
1689
+ "integrity": "sha512-P6Hn7VT4lfSH49HxLHcHhDq+aFf/jd9dPY7lDHeFhZ22N3858EKuwm2jmnlPzpsRGEPaoF6XwkcxY5SYnt4f/g==",
1690
+ "requires": {
1691
+ "domexception": "^1.0.1",
1692
+ "node-pre-gyp": "^0.13.0"
1693
+ },
1694
+ "dependencies": {
1695
+ "chownr": {
1696
+ "version": "1.1.4",
1697
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
1698
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
1699
+ },
1700
+ "fs-minipass": {
1701
+ "version": "1.2.7",
1702
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
1703
+ "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
1704
+ "requires": {
1705
+ "minipass": "^2.6.0"
1706
+ }
1707
+ },
1708
+ "minipass": {
1709
+ "version": "2.9.0",
1710
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
1711
+ "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
1712
+ "requires": {
1713
+ "safe-buffer": "^5.1.2",
1714
+ "yallist": "^3.0.0"
1715
+ }
1716
+ },
1717
+ "minizlib": {
1718
+ "version": "1.3.3",
1719
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
1720
+ "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
1721
+ "requires": {
1722
+ "minipass": "^2.9.0"
1723
+ }
1724
+ },
1725
+ "mkdirp": {
1726
+ "version": "0.5.5",
1727
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
1728
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
1729
+ "requires": {
1730
+ "minimist": "^1.2.5"
1731
+ }
1732
+ },
1733
+ "node-pre-gyp": {
1734
+ "version": "0.13.0",
1735
+ "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz",
1736
+ "integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==",
1737
+ "requires": {
1738
+ "detect-libc": "^1.0.2",
1739
+ "mkdirp": "^0.5.1",
1740
+ "needle": "^2.2.1",
1741
+ "nopt": "^4.0.1",
1742
+ "npm-packlist": "^1.1.6",
1743
+ "npmlog": "^4.0.2",
1744
+ "rc": "^1.2.7",
1745
+ "rimraf": "^2.6.1",
1746
+ "semver": "^5.3.0",
1747
+ "tar": "^4"
1748
+ }
1749
+ },
1750
+ "nopt": {
1751
+ "version": "4.0.3",
1752
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
1753
+ "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
1754
+ "requires": {
1755
+ "abbrev": "1",
1756
+ "osenv": "^0.1.4"
1757
+ }
1758
+ },
1759
+ "rimraf": {
1760
+ "version": "2.7.1",
1761
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
1762
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
1763
+ "requires": {
1764
+ "glob": "^7.1.3"
1765
+ }
1766
+ },
1767
+ "semver": {
1768
+ "version": "5.7.1",
1769
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1770
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
1771
+ },
1772
+ "tar": {
1773
+ "version": "4.4.13",
1774
+ "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
1775
+ "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
1776
+ "requires": {
1777
+ "chownr": "^1.1.1",
1778
+ "fs-minipass": "^1.2.5",
1779
+ "minipass": "^2.8.6",
1780
+ "minizlib": "^1.2.1",
1781
+ "mkdirp": "^0.5.0",
1782
+ "safe-buffer": "^5.1.2",
1783
+ "yallist": "^3.0.3"
1784
+ }
1785
+ },
1786
+ "yallist": {
1787
+ "version": "3.1.1",
1788
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
1789
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
1790
+ }
1791
+ }
1792
+ },
1793
+ "ws": {
1794
+ "version": "7.4.4",
1795
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz",
1796
+ "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw=="
1797
+ },
1798
+ "xdg-basedir": {
1799
+ "version": "4.0.0",
1800
+ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
1801
+ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
1802
+ "dev": true
1803
+ },
1804
+ "yallist": {
1805
+ "version": "4.0.0",
1806
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
1807
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
1808
+ },
1809
+ "yn": {
1810
+ "version": "3.1.1",
1811
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
1812
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
1813
+ "dev": true
1814
+ }
1815
+ }
1816
+ }
package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ultroid-vcbot",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "start": "node build/index.js",
7
+ "build": "tsc",
8
+ "test": "tsc --noEmit",
9
+ "dev": "nodemon src/index.ts"
10
+ },
11
+ "author": "TeamUltroid <[email protected]>",
12
+ "license": "AGPL-3.0",
13
+ "dependencies": {
14
+ "@mapbox/node-pre-gyp": "^1.0.0",
15
+ "@youtwitface/escape-html": "^1.0.0",
16
+ "dotenv": "^8.2.0",
17
+ "envalid": "^7.0.0",
18
+ "redis": "^3.0.2",
19
+ "telegraf": "^4.0.2",
20
+ "tgcalls": "^0.1.2",
21
+ "ws": "^7.4.3"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^14.14.25",
25
+ "@types/redis": "^2.8.28",
26
+ "@types/ws": "^7.4.0",
27
+ "nodemon": "^2.0.7",
28
+ "ts-node": "^9.1.1",
29
+ "typegram": "^3.1.9",
30
+ "typescript": "^4.1.3"
31
+ }
32
+ }
plugins/__init__.py CHANGED
@@ -14,14 +14,23 @@ from pyUltroid.functions import *
14
  from pyUltroid.functions.all import *
15
  from pyUltroid.functions.broadcast_db import *
16
  from pyUltroid.functions.gban_mute_db import *
 
17
  from pyUltroid.functions.google_image import googleimagesdownload
18
  from pyUltroid.functions.sudos import *
 
19
  from pyUltroid.utils import *
20
 
21
  from strings import get_string
22
 
 
 
 
 
 
 
 
23
  start_time = time.time()
24
- ultroid_version = "v0.0.4"
25
  OWNER_NAME = ultroid_bot.me.first_name
26
  OWNER_ID = ultroid_bot.me.id
27
 
 
14
  from pyUltroid.functions.all import *
15
  from pyUltroid.functions.broadcast_db import *
16
  from pyUltroid.functions.gban_mute_db import *
17
+ from pyUltroid.functions.goodbye_db import *
18
  from pyUltroid.functions.google_image import googleimagesdownload
19
  from pyUltroid.functions.sudos import *
20
+ from pyUltroid.functions.welcome_db import *
21
  from pyUltroid.utils import *
22
 
23
  from strings import get_string
24
 
25
+ try:
26
+ import glitch_me
27
+ except ModuleNotFoundError:
28
+ os.system(
29
+ "git clone https://github.com/1Danish-00/glitch_me.git && pip install -e ./glitch_me"
30
+ )
31
+
32
  start_time = time.time()
33
+ ultroid_version = "v0.0.5"
34
  OWNER_NAME = ultroid_bot.me.first_name
35
  OWNER_ID = ultroid_bot.me.id
36
 
plugins/_help.py CHANGED
@@ -23,7 +23,7 @@ async def ult(ult):
23
  if plug:
24
  try:
25
  if plug in HELP:
26
- output = "**Plugin** - `{}`\n".format(plug)
27
  for i in HELP[plug]:
28
  output += i
29
  output += "\n© @TheUltroid"
 
23
  if plug:
24
  try:
25
  if plug in HELP:
26
+ output = f"**Plugin** - `{plug}`\n"
27
  for i in HELP[plug]:
28
  output += i
29
  output += "\n© @TheUltroid"
plugins/_inline.py CHANGED
@@ -13,6 +13,7 @@ from math import ceil
13
  from platform import python_version as pyver
14
 
15
  from git import Repo
 
16
  from support import *
17
  from telethon import Button, __version__
18
  from telethon.tl.types import InputWebDocument
@@ -20,8 +21,8 @@ from telethon.tl.types import InputWebDocument
20
  from . import *
21
 
22
  # ================================================#
23
- notmine = "This bot is for {}".format(OWNER_NAME)
24
- ULTROID_PIC = "https://telegra.ph/file/11245cacbffe92e5d5b14.jpg"
25
  helps = get_string("inline_1")
26
 
27
  add_ons = udB.get("ADDONS")
@@ -37,17 +38,20 @@ else:
37
  async def e(o):
38
  if len(o.text) == 0:
39
  b = o.builder
40
- uptime = grt((time.time() - start_time))
 
41
  ALIVEMSG = get_string("alive_1").format(
 
42
  OWNER_NAME,
43
  ultroid_version,
 
44
  uptime,
45
  pyver(),
46
  __version__,
47
  Repo().active_branch,
48
  )
49
  res = [
50
- await b.article(
51
  title="Ultroid Userbot",
52
  url="https://t.me/TeamUltroid",
53
  description="Userbot | Telethon ",
@@ -57,11 +61,12 @@ async def e(o):
57
  [Button.url(text="Support Group", url="t.me/UltroidSupport")],
58
  [
59
  Button.url(
60
- text="Repo", url="https://github.com/Teamultroid/Ultroid"
61
- )
 
62
  ],
63
  ],
64
- )
65
  ]
66
  await o.answer(res, switch_pm=f"👥 ULTROID PORTAL", switch_pm_param="start")
67
 
@@ -91,7 +96,10 @@ if Var.BOT_USERNAME is not None and asst is not None:
91
  url="https://t.me/TheUltroid",
92
  thumb=InputWebDocument(ULTROID_PIC, 0, "image/jpeg", []),
93
  text=get_string("inline_4").format(
94
- OWNER_NAME, len(PLUGINS) - 5, len(ADDONS), cmd
 
 
 
95
  ),
96
  buttons=[
97
  [
@@ -105,8 +113,8 @@ if Var.BOT_USERNAME is not None and asst is not None:
105
  [
106
  Button.url(
107
  "⚙️Sᴇᴛᴛɪɴɢs⚙️",
108
- url=f"https://t.me/{bnn}?start={ultroid_bot.me.id}",
109
- )
110
  ],
111
  [Button.inline("••Cʟᴏꜱᴇ••", data="close")],
112
  ],
@@ -123,7 +131,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
123
  [
124
  Button.url("NekoBin", url=f"{link}"),
125
  Button.url("Raw", url=f"{link_raw}"),
126
- ]
127
  ],
128
  )
129
  await event.answer([result] if result else None)
@@ -154,7 +162,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
154
 
155
  @callback("upp")
156
  async def _(event):
157
- uptime = grt((time.time() - start_time))
158
  pin = f"🙋Uᴘᴛɪᴍᴇ = {uptime}"
159
  await event.answer(pin, cache_time=0, alert=True)
160
 
@@ -167,7 +175,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
167
  "Sᴇɴᴅ Oғғɪᴄɪᴀʟ Pʟᴜɢɪɴs",
168
  query="send",
169
  same_peer=True,
170
- )
171
  ],
172
  [
173
  Button.switch_inline(
@@ -198,7 +206,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
198
  "YᴏᴜTᴜʙᴇ Dᴏᴡɴʟᴏᴀᴅᴇʀ",
199
  query="yt Ed Sheeran Perfect",
200
  same_peer=True,
201
- )
202
  ],
203
  [
204
  Button.switch_inline(
@@ -212,11 +220,18 @@ if Var.BOT_USERNAME is not None and asst is not None:
212
  same_peer=True,
213
  ),
214
  ],
 
 
 
 
 
 
 
215
  [
216
  Button.inline(
217
  "<- Bᴀᴄᴋ",
218
  data="open",
219
- )
220
  ],
221
  ]
222
  await e.edit(buttons=button, link_preview=False)
@@ -326,8 +341,9 @@ if Var.BOT_USERNAME is not None and asst is not None:
326
  ],
327
  [
328
  Button.url(
329
- "⚙️Sᴇᴛᴛɪɴɢs⚙️", url=f"https://t.me/{bnn}?start={ultroid_bot.me.id}"
330
- )
 
331
  ],
332
  [Button.inline("••Cʟᴏꜱᴇ••", data="close")],
333
  ]
@@ -338,7 +354,10 @@ if Var.BOT_USERNAME is not None and asst is not None:
338
  cmd = len(z) + 10
339
  await event.edit(
340
  get_string("inline_4").format(
341
- OWNER_NAME, len(PLUGINS) - 5, len(ADDONS), cmd
 
 
 
342
  ),
343
  buttons=buttons,
344
  link_preview=False,
@@ -367,10 +386,10 @@ if Var.BOT_USERNAME is not None and asst is not None:
367
  except BaseException:
368
  pass
369
  if help_string == "":
370
- reply_pop_up_alert = "{} has no detailed help...".format(plugin_name)
371
  else:
372
  reply_pop_up_alert = help_string
373
- reply_pop_up_alert += "\n© @TheUltroid"
374
  try:
375
  if event.query.user_id in sed:
376
  await event.edit(
@@ -384,7 +403,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
384
  reply_pop_up_alert = notmine
385
  await event.answer(reply_pop_up_alert, cache_time=0)
386
  except BaseException:
387
- halps = "Do .help {} to get the list of commands.".format(plugin_name)
388
  await event.edit(halps)
389
 
390
  @callback(
@@ -418,10 +437,10 @@ if Var.BOT_USERNAME is not None and asst is not None:
418
  except BaseException:
419
  pass
420
  if help_string == "":
421
- reply_pop_up_alert = "{} has no detailed help...".format(plugin_name)
422
  else:
423
  reply_pop_up_alert = help_string
424
- reply_pop_up_alert += "\n© @TheUltroid"
425
  try:
426
  if event.query.user_id in sed:
427
  await event.edit(
@@ -435,7 +454,7 @@ if Var.BOT_USERNAME is not None and asst is not None:
435
  reply_pop_up_alert = notmine
436
  await event.answer(reply_pop_up_alert, cache_time=0)
437
  except BaseException:
438
- halps = "Do .help {} to get the list of commands.".format(plugin_name)
439
  await event.edit(halps)
440
 
441
 
@@ -457,9 +476,11 @@ def paginate_help(page_number, loaded_plugins, prefix):
457
  modules = [
458
  Button.inline(
459
  "{} {} {}".format(
460
- random.choice(list(multi)), x, random.choice(list(mult2i))
 
 
461
  ),
462
- data="us_plugin_{}".format(x),
463
  )
464
  for x in helpable_plugins
465
  ]
@@ -474,13 +495,15 @@ def paginate_help(page_number, loaded_plugins, prefix):
474
  ] + [
475
  (
476
  Button.inline(
477
- "<- Pʀᴇᴠɪᴏᴜs", data="{}_prev({})".format(prefix, modulo_page)
 
478
  ),
479
  Button.inline("-Bᴀᴄᴋ-", data="open"),
480
  Button.inline(
481
- "Nᴇxᴛ ->", data="{}_next({})".format(prefix, modulo_page)
 
482
  ),
483
- )
484
  ]
485
  else:
486
  pairs = pairs[
@@ -507,9 +530,11 @@ def paginate_addon(page_number, loaded_plugins, prefix):
507
  modules = [
508
  Button.inline(
509
  "{} {} {}".format(
510
- random.choice(list(multi)), x, random.choice(list(mult2i))
 
 
511
  ),
512
- data="add_plugin_{}".format(x),
513
  )
514
  for x in helpable_plugins
515
  ]
@@ -524,13 +549,15 @@ def paginate_addon(page_number, loaded_plugins, prefix):
524
  ] + [
525
  (
526
  Button.inline(
527
- "<- Pʀᴇᴠɪᴏᴜs", data="{}_prev({})".format(prefix, modulo_page)
 
528
  ),
529
  Button.inline("-Bᴀᴄᴋ-", data="open"),
530
  Button.inline(
531
- "Nᴇx�� ->", data="{}_next({})".format(prefix, modulo_page)
 
532
  ),
533
- )
534
  ]
535
  else:
536
  pairs = pairs[
 
13
  from platform import python_version as pyver
14
 
15
  from git import Repo
16
+ from pyUltroid import __version__ as UltVer
17
  from support import *
18
  from telethon import Button, __version__
19
  from telethon.tl.types import InputWebDocument
 
21
  from . import *
22
 
23
  # ================================================#
24
+ notmine = f"This bot is for {OWNER_NAME}"
25
+ ULTROID_PIC = "https://telegra.ph/file/031957757a4f6a5191040.jpg"
26
  helps = get_string("inline_1")
27
 
28
  add_ons = udB.get("ADDONS")
 
38
  async def e(o):
39
  if len(o.text) == 0:
40
  b = o.builder
41
+ uptime = grt(time.time() - start_time)
42
+ header = udB.get("ALIVE_TEXT") if udB.get("ALIVE_TEXT") else "Hey, I am alive."
43
  ALIVEMSG = get_string("alive_1").format(
44
+ header,
45
  OWNER_NAME,
46
  ultroid_version,
47
+ UltVer,
48
  uptime,
49
  pyver(),
50
  __version__,
51
  Repo().active_branch,
52
  )
53
  res = [
54
+ await b.article(
55
  title="Ultroid Userbot",
56
  url="https://t.me/TeamUltroid",
57
  description="Userbot | Telethon ",
 
61
  [Button.url(text="Support Group", url="t.me/UltroidSupport")],
62
  [
63
  Button.url(
64
+ text="Repo",
65
+ url="https://github.com/Teamultroid/Ultroid",
66
+ ),
67
  ],
68
  ],
69
+ ),
70
  ]
71
  await o.answer(res, switch_pm=f"👥 ULTROID PORTAL", switch_pm_param="start")
72
 
 
96
  url="https://t.me/TheUltroid",
97
  thumb=InputWebDocument(ULTROID_PIC, 0, "image/jpeg", []),
98
  text=get_string("inline_4").format(
99
+ OWNER_NAME,
100
+ len(PLUGINS) - 5,
101
+ len(ADDONS),
102
+ cmd,
103
  ),
104
  buttons=[
105
  [
 
113
  [
114
  Button.url(
115
  "⚙️Sᴇᴛᴛɪɴɢs⚙️",
116
+ url=f"https://t.me/{bnn}?start=set",
117
+ ),
118
  ],
119
  [Button.inline("••Cʟᴏꜱᴇ••", data="close")],
120
  ],
 
131
  [
132
  Button.url("NekoBin", url=f"{link}"),
133
  Button.url("Raw", url=f"{link_raw}"),
134
+ ],
135
  ],
136
  )
137
  await event.answer([result] if result else None)
 
162
 
163
  @callback("upp")
164
  async def _(event):
165
+ uptime = grt(time.time() - start_time)
166
  pin = f"🙋Uᴘᴛɪᴍᴇ = {uptime}"
167
  await event.answer(pin, cache_time=0, alert=True)
168
 
 
175
  "Sᴇɴᴅ Oғғɪᴄɪᴀʟ Pʟᴜɢɪɴs",
176
  query="send",
177
  same_peer=True,
178
+ ),
179
  ],
180
  [
181
  Button.switch_inline(
 
206
  "YᴏᴜTᴜʙᴇ Dᴏᴡɴʟᴏᴀᴅᴇʀ",
207
  query="yt Ed Sheeran Perfect",
208
  same_peer=True,
209
+ ),
210
  ],
211
  [
212
  Button.switch_inline(
 
220
  same_peer=True,
221
  ),
222
  ],
223
+ [
224
+ Button.switch_inline(
225
+ "OʀᴀɴɢᴇFᴏx🦊Rᴇᴄᴏᴠᴇʀʏ",
226
+ query="ofox beryllium",
227
+ same_peer=True,
228
+ ),
229
+ ],
230
  [
231
  Button.inline(
232
  "<- Bᴀᴄᴋ",
233
  data="open",
234
+ ),
235
  ],
236
  ]
237
  await e.edit(buttons=button, link_preview=False)
 
341
  ],
342
  [
343
  Button.url(
344
+ "⚙️Sᴇᴛᴛɪɴɢs⚙️",
345
+ url=f"https://t.me/{bnn}?start={ultroid_bot.me.id}",
346
+ ),
347
  ],
348
  [Button.inline("••Cʟᴏꜱᴇ••", data="close")],
349
  ]
 
354
  cmd = len(z) + 10
355
  await event.edit(
356
  get_string("inline_4").format(
357
+ OWNER_NAME,
358
+ len(PLUGINS) - 5,
359
+ len(ADDONS),
360
+ cmd,
361
  ),
362
  buttons=buttons,
363
  link_preview=False,
 
386
  except BaseException:
387
  pass
388
  if help_string == "":
389
+ reply_pop_up_alert = f"{plugin_name} has no detailed help..."
390
  else:
391
  reply_pop_up_alert = help_string
392
+ reply_pop_up_alert += "\n© @TeamUltroid"
393
  try:
394
  if event.query.user_id in sed:
395
  await event.edit(
 
403
  reply_pop_up_alert = notmine
404
  await event.answer(reply_pop_up_alert, cache_time=0)
405
  except BaseException:
406
+ halps = f"Do .help {plugin_name} to get the list of commands."
407
  await event.edit(halps)
408
 
409
  @callback(
 
437
  except BaseException:
438
  pass
439
  if help_string == "":
440
+ reply_pop_up_alert = f"{plugin_name} has no detailed help..."
441
  else:
442
  reply_pop_up_alert = help_string
443
+ reply_pop_up_alert += "\n© @TeamUltroid"
444
  try:
445
  if event.query.user_id in sed:
446
  await event.edit(
 
454
  reply_pop_up_alert = notmine
455
  await event.answer(reply_pop_up_alert, cache_time=0)
456
  except BaseException:
457
+ halps = f"Do .help {plugin_name} to get the list of commands."
458
  await event.edit(halps)
459
 
460
 
 
476
  modules = [
477
  Button.inline(
478
  "{} {} {}".format(
479
+ random.choice(list(multi)),
480
+ x,
481
+ random.choice(list(mult2i)),
482
  ),
483
+ data=f"us_plugin_{x}",
484
  )
485
  for x in helpable_plugins
486
  ]
 
495
  ] + [
496
  (
497
  Button.inline(
498
+ "<- Pʀᴇᴠɪᴏᴜs",
499
+ data=f"{prefix}_prev({modulo_page})",
500
  ),
501
  Button.inline("-Bᴀᴄᴋ-", data="open"),
502
  Button.inline(
503
+ "Nᴇxᴛ ->",
504
+ data=f"{prefix}_next({modulo_page})",
505
  ),
506
+ ),
507
  ]
508
  else:
509
  pairs = pairs[
 
530
  modules = [
531
  Button.inline(
532
  "{} {} {}".format(
533
+ random.choice(list(multi)),
534
+ x,
535
+ random.choice(list(mult2i)),
536
  ),
537
+ data=f"add_plugin_{x}",
538
  )
539
  for x in helpable_plugins
540
  ]
 
549
  ] + [
550
  (
551
  Button.inline(
552
+ "<- Pʀᴇᴠɪᴏᴜs",
553
+ data=f"{prefix}_prev({modulo_page})",
554
  ),
555
  Button.inline("-Bᴀᴄᴋ-", data="open"),
556
  Button.inline(
557
+ "Nᴇx ->",
558
+ data=f"{prefix}_next({modulo_page})",
559
  ),
560
+ ),
561
  ]
562
  else:
563
  pairs = pairs[
plugins/_tagnotifs.py CHANGED
@@ -15,24 +15,33 @@ from . import *
15
  events.NewMessage(
16
  incoming=True,
17
  func=lambda e: (e.mentioned),
18
- )
19
  )
20
  async def all_messages_catcher(e):
21
  if udB.get("TAG_LOG") is not None:
22
  NEEDTOLOG = int(udB.get("TAG_LOG"))
23
  x = await ultroid_bot.get_entity(e.sender_id)
24
- if x.bot:
25
  return
26
  y = await ultroid_bot.get_entity(e.chat_id)
 
 
 
 
27
  xx = f"[{get_display_name(x)}](tg://user?id={x.id})"
28
- yy = f"[{get_display_name(y)}](https://t.me/c/{y.id})"
29
  msg = f"https://t.me/c/{y.id}/{e.id}"
30
  if e.text:
31
  cap = f"{xx} tagged you in {yy}\n\n```{e.text}```\nㅤ"
32
  else:
33
  cap = f"{xx} tagged you in {yy}"
 
34
  btx = "📨 View Message"
 
35
  try:
 
 
 
 
36
  await asst.send_message(
37
  NEEDTOLOG,
38
  cap,
 
15
  events.NewMessage(
16
  incoming=True,
17
  func=lambda e: (e.mentioned),
18
+ ),
19
  )
20
  async def all_messages_catcher(e):
21
  if udB.get("TAG_LOG") is not None:
22
  NEEDTOLOG = int(udB.get("TAG_LOG"))
23
  x = await ultroid_bot.get_entity(e.sender_id)
24
+ if x.bot or x.verified:
25
  return
26
  y = await ultroid_bot.get_entity(e.chat_id)
27
+ if y.username:
28
+ yy = f"[{get_display_name(y)}](https://t.me/{y.username})"
29
+ else:
30
+ yy = f"[{get_display_name(y)}](https://t.me/c/{y.id}/{e.id})"
31
  xx = f"[{get_display_name(x)}](tg://user?id={x.id})"
 
32
  msg = f"https://t.me/c/{y.id}/{e.id}"
33
  if e.text:
34
  cap = f"{xx} tagged you in {yy}\n\n```{e.text}```\nㅤ"
35
  else:
36
  cap = f"{xx} tagged you in {yy}"
37
+
38
  btx = "📨 View Message"
39
+
40
  try:
41
+ if e.text:
42
+ cap = get_string("tagnot_1").format(xx, yy, e.text, msg)
43
+ else:
44
+ cap = get_string("tagnot_2").format(xx, yy, msg)
45
  await asst.send_message(
46
  NEEDTOLOG,
47
  cap,
plugins/_wspr.py CHANGED
@@ -18,6 +18,7 @@ from telethon.tl.types import UserStatusLastWeek as lw
18
  from telethon.tl.types import UserStatusOffline as off
19
  from telethon.tl.types import UserStatusOnline as on
20
  from telethon.tl.types import UserStatusRecently as rec
 
21
  from . import *
22
 
23
  snap = {}
@@ -98,7 +99,9 @@ async def _(e):
98
  button = [
99
  Button.url("Private", url=f"t.me/{username}"),
100
  Button.switch_inline(
101
- "Secret msg", query=f"msg {query} wspr ", same_peer=True
 
 
102
  ),
103
  ]
104
  sur = e.builder.article(
@@ -132,7 +135,8 @@ async def _(e):
132
  snap.update({logi.id: desc})
133
  except ValueError:
134
  sur = e.builder.article(
135
- title="Type ur msg", text=f"You Didn't Type Your Msg"
 
136
  )
137
  await e.answer([sur])
138
 
 
18
  from telethon.tl.types import UserStatusOffline as off
19
  from telethon.tl.types import UserStatusOnline as on
20
  from telethon.tl.types import UserStatusRecently as rec
21
+
22
  from . import *
23
 
24
  snap = {}
 
99
  button = [
100
  Button.url("Private", url=f"t.me/{username}"),
101
  Button.switch_inline(
102
+ "Secret msg",
103
+ query=f"msg {query} wspr ",
104
+ same_peer=True,
105
  ),
106
  ]
107
  sur = e.builder.article(
 
135
  snap.update({logi.id: desc})
136
  except ValueError:
137
  sur = e.builder.article(
138
+ title="Type ur msg",
139
+ text=f"You Didn't Type Your Msg",
140
  )
141
  await e.answer([sur])
142
 
plugins/admintools.py CHANGED
@@ -50,8 +50,8 @@ import asyncio
50
 
51
  from telethon.errors import BadRequestError
52
  from telethon.errors.rpcerrorlist import UserIdInvalidError
53
- from telethon.tl.functions.channels import EditAdminRequest, EditBannedRequest
54
- from telethon.tl.types import ChatAdminRights, ChatBannedRights
55
 
56
  from . import *
57
 
@@ -59,15 +59,11 @@ from . import *
59
  @ultroid_cmd(
60
  pattern="promote ?(.*)",
61
  groups_only=True,
 
62
  )
63
  async def prmte(ult):
64
  xx = await eor(ult, get_string("com_1"))
65
- chat = await ult.get_chat()
66
- isAdmin = chat.admin_rights
67
- isCreator = chat.creator
68
- if not isAdmin and not isCreator:
69
- return await xx.edit("`Hmm, I'm not an admin here...`")
70
- await xx.edit("`Promoting...`")
71
  user, rank = await get_user_info(ult)
72
  if not rank:
73
  rank = "Admin"
@@ -87,10 +83,10 @@ async def prmte(ult):
87
  pin_messages=True,
88
  ),
89
  rank,
90
- )
91
  )
92
  await xx.edit(
93
- f"[{user.first_name}](tg://user?id={user.id}) `is now an admin in {ult.chat.title} with title {rank}.`"
94
  )
95
  except BadRequestError:
96
  return await xx.edit("`I don't have the right to promote you.`")
@@ -101,15 +97,11 @@ async def prmte(ult):
101
  @ultroid_cmd(
102
  pattern="demote ?(.*)",
103
  groups_only=True,
 
104
  )
105
  async def dmote(ult):
106
  xx = await eor(ult, get_string("com_1"))
107
- chat = await ult.get_chat()
108
- isAdmin = chat.admin_rights
109
- isCreator = chat.creator
110
- if not isAdmin and not isCreator:
111
- return await xx.edit("`Hmm, I'm not an admin here...`")
112
- await xx.edit("`Demoting...`")
113
  user, rank = await get_user_info(ult)
114
  if not rank:
115
  rank = "Not Admin"
@@ -129,10 +121,10 @@ async def dmote(ult):
129
  pin_messages=None,
130
  ),
131
  rank,
132
- )
133
  )
134
  await xx.edit(
135
- f"[{user.first_name}](tg://user?id={user.id}) `is no longer an admin in {ult.chat.title}`"
136
  )
137
  except BadRequestError:
138
  return await xx.edit("`I don't have the right to demote you.`")
@@ -143,31 +135,18 @@ async def dmote(ult):
143
  @ultroid_cmd(
144
  pattern="ban ?(.*)",
145
  groups_only=True,
 
146
  )
147
  async def bban(ult):
148
  xx = await eor(ult, get_string("com_1"))
149
- chat = await ult.get_chat()
150
- isAdmin = chat.admin_rights
151
- isCreator = chat.creator
152
- if not isAdmin and not isCreator:
153
- return await xx.edit("`Hmm, I'm not an admin here...`")
154
  user, reason = await get_user_info(ult)
155
  if not user:
156
  return await xx.edit("`Reply to a user or give username to ban him!`")
157
  if str(user.id) in DEVLIST:
158
  return await xx.edit(" `LoL, I can't Ban my Developer 😂`")
159
- await xx.edit("`Getting user info...`")
160
  try:
161
- await ultroid_bot(
162
- EditBannedRequest(
163
- ult.chat_id,
164
- user.id,
165
- ChatBannedRights(
166
- until_date=None,
167
- view_messages=True,
168
- ),
169
- )
170
- )
171
  except BadRequestError:
172
  return await xx.edit("`I don't have the right to ban a user.`")
173
  except UserIdInvalidError:
@@ -178,82 +157,62 @@ async def bban(ult):
178
  await reply.delete()
179
  except BadRequestError:
180
  return await xx.edit(
181
- f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`\n**Messages Deleted**: `False`"
182
  )
183
  if reason:
184
  await xx.edit(
185
- f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`"
186
  )
187
  else:
188
  await xx.edit(
189
- f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`"
190
  )
191
 
192
 
193
  @ultroid_cmd(
194
  pattern="unban ?(.*)",
195
  groups_only=True,
 
196
  )
197
  async def uunban(ult):
198
  xx = await eor(ult, get_string("com_1"))
199
- chat = await ult.get_chat()
200
- isAdmin = chat.admin_rights
201
- isCreator = chat.creator
202
- if not isAdmin and not isCreator:
203
- return await xx.edit("`Hmm, I'm not an admin here...`")
204
  user, reason = await get_user_info(ult)
205
  if not user:
206
  return await xx.edit("`Reply to a user or give username to unban him!`")
207
- await xx.edit("`Getting user info...`")
208
  try:
209
- await ultroid_bot(
210
- EditBannedRequest(
211
- ult.chat_id,
212
- user.id,
213
- ChatBannedRights(
214
- until_date=None,
215
- view_messages=None,
216
- ),
217
- )
218
- )
219
  except BadRequestError:
220
  return await xx.edit("`I don't have the right to unban a user.`")
221
  except UserIdInvalidError:
222
  await xx.edit("`I couldn't get who he is!`")
223
  if reason:
224
  await xx.edit(
225
- f"[{user.first_name}](tg://user?id={user.id}) **was unbanned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`"
226
  )
227
  else:
228
  await xx.edit(
229
- f"[{user.first_name}](tg://user?id={user.id}) **was unbanned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`"
230
  )
231
 
232
 
233
  @ultroid_cmd(
234
  pattern="kick ?(.*)",
235
  groups_only=True,
 
236
  )
237
  async def kck(ult):
238
- tt = ult.text
239
- try:
240
- tx = tt[5]
241
- if tx:
242
- return
243
- except BaseException:
244
- pass
245
  xx = await eor(ult, get_string("com_1"))
246
- chat = await ult.get_chat()
247
- isAdmin = chat.admin_rights
248
- isCreator = chat.creator
249
- if not isAdmin and not isCreator:
250
- return await xx.edit("`Hmm, I'm not an admin here...`")
251
  user, reason = await get_user_info(ult)
252
  if not user:
253
  return await xx.edit("`Kick? Whom? I couldn't get his info...`")
254
  if str(user.id) in DEVLIST:
255
  return await xx.edit(" `Lol, I can't Kick my Developer`😂")
256
- await xx.edit("`Kicking...`")
 
257
  try:
258
  await ultroid_bot.kick_participant(ult.chat_id, user.id)
259
  await asyncio.sleep(0.5)
@@ -261,15 +220,15 @@ async def kck(ult):
261
  return await xx.edit("`I don't have the right to kick a user.`")
262
  except Exception as e:
263
  return await xx.edit(
264
- f"`I don't have the right to kick a user.`\n\n**ERROR**:\n`{str(e)}`"
265
  )
266
  if reason:
267
  await xx.edit(
268
- f"[{user.first_name}](tg://user?id={user.id})` was kicked by` [{OWNER_NAME}](tg://user?id={OWNER_ID}) `in {ult.chat.title}`\n**Reason**: `{reason}`"
269
  )
270
  else:
271
  await xx.edit(
272
- f"[{user.first_name}](tg://user?id={user.id})` was kicked by` [{OWNER_NAME}](tg://user?id={OWNER_ID}) `in {ult.chat.title}`"
273
  )
274
 
275
 
@@ -367,7 +326,11 @@ async def fastpurger(purg):
367
  await ultroid_bot.delete_messages(chat, msgs)
368
  done = await ultroid_bot.send_message(
369
  purg.chat_id,
370
- "__Fast purge complete!__\n**Purged** `" + str(count) + "` **messages.**",
 
 
 
 
371
  )
372
  await asyncio.sleep(5)
373
  await done.delete()
@@ -383,7 +346,9 @@ async def fastpurgerme(purg):
383
  if not purg.reply_to_msg_id:
384
  return await eod(purg, "`Reply to a message to purge from.`", time=10)
385
  async for msg in ultroid_bot.iter_messages(
386
- chat, from_user="me", min_id=purg.reply_to_msg_id
 
 
387
  ):
388
  msgs.append(msg)
389
  count = count + 1
@@ -409,14 +374,14 @@ async def _(e):
409
  xx = await eor(e, get_string("com_1"))
410
  if e.reply_to_msg_id:
411
  input = (await e.get_reply_message()).sender_id
412
- (await e.client.get_entity(input)).first_name
413
  try:
414
  nos = 0
415
  async for x in e.client.iter_messages(e.chat_id, from_user=input):
416
  await e.client.delete_messages(e.chat_id, x)
417
  nos += 1
418
  await xx.edit(
419
- f"**Purged **`{nos}`** msgs of **[{input}](tg://user?id={input})"
420
  )
421
  except ValueError:
422
  return await eod(xx, str(er), time=5)
 
50
 
51
  from telethon.errors import BadRequestError
52
  from telethon.errors.rpcerrorlist import UserIdInvalidError
53
+ from telethon.tl.functions.channels import EditAdminRequest
54
+ from telethon.tl.types import ChatAdminRights
55
 
56
  from . import *
57
 
 
59
  @ultroid_cmd(
60
  pattern="promote ?(.*)",
61
  groups_only=True,
62
+ admins_only=True,
63
  )
64
  async def prmte(ult):
65
  xx = await eor(ult, get_string("com_1"))
66
+ await ult.get_chat()
 
 
 
 
 
67
  user, rank = await get_user_info(ult)
68
  if not rank:
69
  rank = "Admin"
 
83
  pin_messages=True,
84
  ),
85
  rank,
86
+ ),
87
  )
88
  await xx.edit(
89
+ f"[{user.first_name}](tg://user?id={user.id}) `is now an admin in {ult.chat.title} with title {rank}.`",
90
  )
91
  except BadRequestError:
92
  return await xx.edit("`I don't have the right to promote you.`")
 
97
  @ultroid_cmd(
98
  pattern="demote ?(.*)",
99
  groups_only=True,
100
+ admins_only=True,
101
  )
102
  async def dmote(ult):
103
  xx = await eor(ult, get_string("com_1"))
104
+ await ult.get_chat()
 
 
 
 
 
105
  user, rank = await get_user_info(ult)
106
  if not rank:
107
  rank = "Not Admin"
 
121
  pin_messages=None,
122
  ),
123
  rank,
124
+ ),
125
  )
126
  await xx.edit(
127
+ f"[{user.first_name}](tg://user?id={user.id}) `is no longer an admin in {ult.chat.title}`",
128
  )
129
  except BadRequestError:
130
  return await xx.edit("`I don't have the right to demote you.`")
 
135
  @ultroid_cmd(
136
  pattern="ban ?(.*)",
137
  groups_only=True,
138
+ admins_only=True,
139
  )
140
  async def bban(ult):
141
  xx = await eor(ult, get_string("com_1"))
142
+ await ult.get_chat()
 
 
 
 
143
  user, reason = await get_user_info(ult)
144
  if not user:
145
  return await xx.edit("`Reply to a user or give username to ban him!`")
146
  if str(user.id) in DEVLIST:
147
  return await xx.edit(" `LoL, I can't Ban my Developer 😂`")
 
148
  try:
149
+ await ultroid_bot.edit_permissions(ult.chat_id, user.id, view_messages=False)
 
 
 
 
 
 
 
 
 
150
  except BadRequestError:
151
  return await xx.edit("`I don't have the right to ban a user.`")
152
  except UserIdInvalidError:
 
157
  await reply.delete()
158
  except BadRequestError:
159
  return await xx.edit(
160
+ f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`\n**Messages Deleted**: `False`",
161
  )
162
  if reason:
163
  await xx.edit(
164
+ f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`",
165
  )
166
  else:
167
  await xx.edit(
168
+ f"[{user.first_name}](tg://user?id={user.id}) **was banned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`",
169
  )
170
 
171
 
172
  @ultroid_cmd(
173
  pattern="unban ?(.*)",
174
  groups_only=True,
175
+ admins_only=True,
176
  )
177
  async def uunban(ult):
178
  xx = await eor(ult, get_string("com_1"))
179
+ await ult.get_chat()
 
 
 
 
180
  user, reason = await get_user_info(ult)
181
  if not user:
182
  return await xx.edit("`Reply to a user or give username to unban him!`")
 
183
  try:
184
+ await ultroid_bot.edit_permissions(ult.chat_id, user.id, view_messages=True)
 
 
 
 
 
 
 
 
 
185
  except BadRequestError:
186
  return await xx.edit("`I don't have the right to unban a user.`")
187
  except UserIdInvalidError:
188
  await xx.edit("`I couldn't get who he is!`")
189
  if reason:
190
  await xx.edit(
191
+ f"[{user.first_name}](tg://user?id={user.id}) **was unbanned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`\n**Reason**: `{reason}`",
192
  )
193
  else:
194
  await xx.edit(
195
+ f"[{user.first_name}](tg://user?id={user.id}) **was unbanned by** [{OWNER_NAME}](tg://user?id={OWNER_ID}) **in** `{ult.chat.title}`",
196
  )
197
 
198
 
199
  @ultroid_cmd(
200
  pattern="kick ?(.*)",
201
  groups_only=True,
202
+ admins_only=True,
203
  )
204
  async def kck(ult):
205
+ if ult.text == f"{HNDLR}kickme":
206
+ return
 
 
 
 
 
207
  xx = await eor(ult, get_string("com_1"))
208
+ await ult.get_chat()
 
 
 
 
209
  user, reason = await get_user_info(ult)
210
  if not user:
211
  return await xx.edit("`Kick? Whom? I couldn't get his info...`")
212
  if str(user.id) in DEVLIST:
213
  return await xx.edit(" `Lol, I can't Kick my Developer`😂")
214
+ if user.id == ultroid_bot.uid:
215
+ return await xx.edit("`You Can't kick urself`")
216
  try:
217
  await ultroid_bot.kick_participant(ult.chat_id, user.id)
218
  await asyncio.sleep(0.5)
 
220
  return await xx.edit("`I don't have the right to kick a user.`")
221
  except Exception as e:
222
  return await xx.edit(
223
+ f"`I don't have the right to kick a user.`\n\n**ERROR**:\n`{str(e)}`",
224
  )
225
  if reason:
226
  await xx.edit(
227
+ f"[{user.first_name}](tg://user?id={user.id})` was kicked by` [{OWNER_NAME}](tg://user?id={OWNER_ID}) `in {ult.chat.title}`\n**Reason**: `{reason}`",
228
  )
229
  else:
230
  await xx.edit(
231
+ f"[{user.first_name}](tg://user?id={user.id})` was kicked by` [{OWNER_NAME}](tg://user?id={OWNER_ID}) `in {ult.chat.title}`",
232
  )
233
 
234
 
 
326
  await ultroid_bot.delete_messages(chat, msgs)
327
  done = await ultroid_bot.send_message(
328
  purg.chat_id,
329
+ "__Fast purge complete!__\n**Purged** `"
330
+ + str(len(msgs))
331
+ + "` **of** `"
332
+ + str(count)
333
+ + "` **messages.**",
334
  )
335
  await asyncio.sleep(5)
336
  await done.delete()
 
346
  if not purg.reply_to_msg_id:
347
  return await eod(purg, "`Reply to a message to purge from.`", time=10)
348
  async for msg in ultroid_bot.iter_messages(
349
+ chat,
350
+ from_user="me",
351
+ min_id=purg.reply_to_msg_id,
352
  ):
353
  msgs.append(msg)
354
  count = count + 1
 
374
  xx = await eor(e, get_string("com_1"))
375
  if e.reply_to_msg_id:
376
  input = (await e.get_reply_message()).sender_id
377
+ name = (await e.client.get_entity(input)).first_name
378
  try:
379
  nos = 0
380
  async for x in e.client.iter_messages(e.chat_id, from_user=input):
381
  await e.client.delete_messages(e.chat_id, x)
382
  nos += 1
383
  await xx.edit(
384
+ f"**Purged **`{nos}`** msgs of **[{name}](tg://user?id={input})",
385
  )
386
  except ValueError:
387
  return await eod(xx, str(er), time=5)
plugins/afk.py CHANGED
@@ -18,6 +18,7 @@
18
  import asyncio
19
  from datetime import datetime
20
 
 
21
  from telethon import events
22
  from telethon.tl import functions, types
23
 
@@ -49,7 +50,7 @@ async def set_not_afk(event):
49
  back_alive = datetime.now()
50
  afk_end = back_alive.replace(microsecond=0)
51
  if afk_start != {}:
52
- total_afk_time = str((afk_end - afk_start))
53
  current_message = event.message.message
54
  if "afk" not in current_message and "yes" in USER_AFK:
55
  try:
@@ -67,7 +68,8 @@ async def set_not_afk(event):
67
  )
68
  except BaseException:
69
  shite = await ultroid_bot.send_message(
70
- event.chat_id, get_string("afk_1").format(total_afk_time)
 
71
  )
72
  try:
73
  try:
@@ -101,11 +103,14 @@ async def set_not_afk(event):
101
 
102
 
103
  @ultroid_bot.on(
104
- events.NewMessage(incoming=True, func=lambda e: bool(e.mentioned or e.is_private))
105
  )
106
  async def on_afk(event):
107
  if event.fwd_from:
108
  return
 
 
 
109
  global USER_AFK
110
  global afk_time
111
  global last_afk_message
@@ -114,11 +119,12 @@ async def on_afk(event):
114
  back_alivee = datetime.now()
115
  afk_end = back_alivee.replace(microsecond=0)
116
  if afk_start != {}:
117
- total_afk_time = str((afk_end - afk_start))
118
  current_message_text = event.message.message.lower()
119
  if "afk" in current_message_text:
120
  return False
121
- if USER_AFK and not (await event.get_sender()).bot:
 
122
  msg = None
123
  if reason:
124
  message_to_reply = get_string("afk_3").format(total_afk_time, reason)
@@ -175,7 +181,7 @@ async def _(event):
175
  pic = None
176
  if not USER_AFK:
177
  last_seen_status = await ultroid_bot(
178
- functions.account.GetPrivacyRequest(types.InputPrivacyKeyStatusTimestamp())
179
  )
180
  if isinstance(last_seen_status.rules, types.PrivacyValueAllowAll):
181
  afk_time = datetime.datetime.now()
@@ -185,15 +191,19 @@ async def _(event):
185
  if pic.endswith((".tgs", ".webp")):
186
  await ultroid_bot.send_message(event.chat_id, file=pic)
187
  await ultroid_bot.send_message(
188
- event.chat_id, get_string("afk_5").format(reason)
 
189
  )
190
  else:
191
  await ultroid_bot.send_message(
192
- event.chat_id, get_string("afk_5").format(reason), file=pic
 
 
193
  )
194
  except BaseException:
195
  await ultroid_bot.send_message(
196
- event.chat_id, get_string("afk_5").format(reason)
 
197
  )
198
  else:
199
  try:
@@ -202,7 +212,9 @@ async def _(event):
202
  await ultroid_bot.send_message(event.chat_id, get_string("afk_6"))
203
  else:
204
  await ultroid_bot.send_message(
205
- event.chat_id, get_string("afk_6"), file=pic
 
 
206
  )
207
  except BaseException:
208
  await ultroid_bot.send_message(event.chat_id, get_string("afk_6"))
@@ -212,11 +224,14 @@ async def _(event):
212
  if pic.endswith((".tgs", ".webp")):
213
  await ultroid_bot.send_message(LOG, file=pic)
214
  await ultroid_bot.send_message(
215
- LOG, get_string("afk_7").format(reason)
 
216
  )
217
  else:
218
  await ultroid_bot.send_message(
219
- LOG, get_string("afk_7").format(reason), file=pic
 
 
220
  )
221
  elif reason:
222
  await ultroid_bot.send_message(LOG, get_string("afk_7").format(reason))
 
18
  import asyncio
19
  from datetime import datetime
20
 
21
+ from pyUltroid.functions.pmpermit_db import *
22
  from telethon import events
23
  from telethon.tl import functions, types
24
 
 
50
  back_alive = datetime.now()
51
  afk_end = back_alive.replace(microsecond=0)
52
  if afk_start != {}:
53
+ total_afk_time = str(afk_end - afk_start)
54
  current_message = event.message.message
55
  if "afk" not in current_message and "yes" in USER_AFK:
56
  try:
 
68
  )
69
  except BaseException:
70
  shite = await ultroid_bot.send_message(
71
+ event.chat_id,
72
+ get_string("afk_1").format(total_afk_time),
73
  )
74
  try:
75
  try:
 
103
 
104
 
105
  @ultroid_bot.on(
106
+ events.NewMessage(incoming=True, func=lambda e: bool(e.mentioned or e.is_private)),
107
  )
108
  async def on_afk(event):
109
  if event.fwd_from:
110
  return
111
+ if event.is_private:
112
+ if not is_approved(event.chat_id):
113
+ return
114
  global USER_AFK
115
  global afk_time
116
  global last_afk_message
 
119
  back_alivee = datetime.now()
120
  afk_end = back_alivee.replace(microsecond=0)
121
  if afk_start != {}:
122
+ total_afk_time = str(afk_end - afk_start)
123
  current_message_text = event.message.message.lower()
124
  if "afk" in current_message_text:
125
  return False
126
+ sender = await event.get_sender()
127
+ if USER_AFK and not (sender.bot or sender.verified):
128
  msg = None
129
  if reason:
130
  message_to_reply = get_string("afk_3").format(total_afk_time, reason)
 
181
  pic = None
182
  if not USER_AFK:
183
  last_seen_status = await ultroid_bot(
184
+ functions.account.GetPrivacyRequest(types.InputPrivacyKeyStatusTimestamp()),
185
  )
186
  if isinstance(last_seen_status.rules, types.PrivacyValueAllowAll):
187
  afk_time = datetime.datetime.now()
 
191
  if pic.endswith((".tgs", ".webp")):
192
  await ultroid_bot.send_message(event.chat_id, file=pic)
193
  await ultroid_bot.send_message(
194
+ event.chat_id,
195
+ get_string("afk_5").format(reason),
196
  )
197
  else:
198
  await ultroid_bot.send_message(
199
+ event.chat_id,
200
+ get_string("afk_5").format(reason),
201
+ file=pic,
202
  )
203
  except BaseException:
204
  await ultroid_bot.send_message(
205
+ event.chat_id,
206
+ get_string("afk_5").format(reason),
207
  )
208
  else:
209
  try:
 
212
  await ultroid_bot.send_message(event.chat_id, get_string("afk_6"))
213
  else:
214
  await ultroid_bot.send_message(
215
+ event.chat_id,
216
+ get_string("afk_6"),
217
+ file=pic,
218
  )
219
  except BaseException:
220
  await ultroid_bot.send_message(event.chat_id, get_string("afk_6"))
 
224
  if pic.endswith((".tgs", ".webp")):
225
  await ultroid_bot.send_message(LOG, file=pic)
226
  await ultroid_bot.send_message(
227
+ LOG,
228
+ get_string("afk_7").format(reason),
229
  )
230
  else:
231
  await ultroid_bot.send_message(
232
+ LOG,
233
+ get_string("afk_7").format(reason),
234
+ file=pic,
235
  )
236
  elif reason:
237
  await ultroid_bot.send_message(LOG, get_string("afk_7").format(reason))
plugins/autocorrect.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available
10
+
11
+ • `{i}autocorrect`
12
+ To on/off Autocorrect Feature.
13
+
14
+ """
15
+
16
+ from gingerit.gingerit import GingerIt
17
+ from googletrans import Translator
18
+ from telethon import events
19
+
20
+ from . import *
21
+
22
+ tr = Translator()
23
+
24
+
25
+ @ultroid_cmd(pattern="autocorrect")
26
+ async def acc(e):
27
+ if Redis("AUTOCORRECT") != "True":
28
+ udB.set("AUTOCORRECT", "True")
29
+ await eor(e, "AUTOCORRECT Feature On")
30
+ else:
31
+ udB.delete("AUTOCORRECT")
32
+ await eor(e, "AUTOCORRECT Feature Off")
33
+
34
+
35
+ @ultroid_bot.on(events.NewMessage(outgoing=True))
36
+ async def gramme(event):
37
+ if Redis("AUTOCORRECT") != "True":
38
+ return
39
+ t = event.text
40
+ tt = tr.translate(t)
41
+ if t.startswith((HNDLR, ".", "?", "#", "_", "*", "'", "@", "[", "(", "+")):
42
+ return
43
+ if t.endswith(".."):
44
+ return
45
+ if tt.src != "en":
46
+ return
47
+ xx = GingerIt()
48
+ x = xx.parse(t)
49
+ res = x["result"]
50
+ await event.edit(res)
51
+
52
+
53
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/autopic.py CHANGED
@@ -28,17 +28,17 @@ from . import *
28
  async def autopic(e):
29
  search = e.pattern_match.group(1)
30
  if not search:
31
- return await eor(get_string("autopic_1"))
32
  clls = returnpage(search)
33
  if len(clls) == 0:
34
- return await eor(get_string("autopic_2").format(search))
35
  if not len(clls) == 1:
36
  num = random.randrange(0, len(clls) - 1)
37
  else:
38
  num = 0
39
  page = clls[num]
40
  title = page["title"]
41
- await eor(get_string("autopic_3").format(title))
42
  udB.set("AUTOPIC", "True")
43
  while True:
44
  ge = udB.get("AUTOPIC")
 
28
  async def autopic(e):
29
  search = e.pattern_match.group(1)
30
  if not search:
31
+ return await eor(e, get_string("autopic_1"))
32
  clls = returnpage(search)
33
  if len(clls) == 0:
34
+ return await eor(e, get_string("autopic_2").format(search))
35
  if not len(clls) == 1:
36
  num = random.randrange(0, len(clls) - 1)
37
  else:
38
  num = 0
39
  page = clls[num]
40
  title = page["title"]
41
+ await eor(e, get_string("autopic_3").format(title))
42
  udB.set("AUTOPIC", "True")
43
  while True:
44
  ge = udB.get("AUTOPIC")
plugins/blacklist.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available -
10
+
11
+ • `{i}blacklist <word/all words with a space>`
12
+ blacklist the choosen word in that chat.
13
+
14
+ • `{i}remblacklist <word>`
15
+ Remove the word from blacklist..
16
+
17
+ • `{i}listblacklist`
18
+ list all blacklisted words.
19
+
20
+ 'if a person uses blacklist Word his/her msg will be deleted'
21
+ 'And u Must be Admin in that Chat'
22
+ """
23
+
24
+ import re
25
+
26
+ from pyUltroid.functions.blacklist_db import *
27
+ from telethon.tl.types import ChannelParticipantsAdmins
28
+
29
+ from . import *
30
+
31
+
32
+ @ultroid_cmd(pattern="blacklist ?(.*)")
33
+ async def af(e):
34
+ if e.is_group:
35
+ if not e._chat.admin_rights:
36
+ return await eod(e, "`You are Not Admin Here`")
37
+ wrd = e.pattern_match.group(1)
38
+ chat = e.chat_id
39
+ if not (wrd):
40
+ return await eod(e, "`Give the word to blacklist..`")
41
+ wrd = e.text[10:]
42
+ add_blacklist(int(chat), wrd)
43
+ await eor(e, f"Done : `{wrd}` Blacklisted here.")
44
+
45
+
46
+ @ultroid_cmd(pattern="remblacklist ?(.*)")
47
+ async def rf(e):
48
+ if e.is_group:
49
+ if not e._chat.admin_rights:
50
+ return await eod(e, "`You are Not Admin Here`")
51
+ wrd = e.pattern_match.group(1)
52
+ chat = e.chat_id
53
+ if not wrd:
54
+ return await eod(e, "`Give the word to remove from blacklist..`")
55
+ rem_blacklist(int(chat), wrd)
56
+ await eor(e, f"Done : `{wrd}` Removed from Blacklist.")
57
+
58
+
59
+ @ultroid_cmd(pattern="listblacklist")
60
+ async def lsnote(e):
61
+ if e.is_group:
62
+ if not e._chat.admin_rights:
63
+ return await eod(e, "`You are Not Admin Here`")
64
+ x = list_blacklist(e.chat_id)
65
+ if x:
66
+ sd = "Blacklist Found In This Chats Are\n\n"
67
+ await eor(e, sd + x)
68
+ else:
69
+ await eor(e, "No Blacklist word Found Here")
70
+
71
+
72
+ @ultroid_bot.on(events.NewMessage(incoming=True))
73
+ async def bl(e):
74
+ if e.is_group:
75
+ if not e._chat.admin_rights:
76
+ return
77
+ xx = e.text
78
+ chat = e.chat_id
79
+ x = get_blacklist(int(chat))
80
+ if x and xx:
81
+ if " " in xx:
82
+ xx = xx.split(" ")
83
+ kk = ""
84
+ for c in xx:
85
+ kk = re.search(str(c), str(x), flags=re.IGNORECASE)
86
+ if kk:
87
+ async for l in ultroid_bot.iter_participants(
88
+ e.chat_id, filter=ChannelParticipantsAdmins
89
+ ):
90
+ if l.id == e.sender_id:
91
+ return
92
+ await e.delete()
93
+ else:
94
+ k = re.search(xx, x, flags=re.IGNORECASE)
95
+ if k:
96
+ async for l in ultroid_bot.iter_participants(
97
+ e.chat_id, filter=ChannelParticipantsAdmins
98
+ ):
99
+ if l.id == e.sender_id:
100
+ return
101
+ await e.delete()
102
+
103
+
104
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/bot.py CHANGED
@@ -18,6 +18,7 @@
18
  View all plugin names.
19
 
20
  • `{i}restart`
 
21
  To restart your bot.
22
 
23
  • `{i}logs`
@@ -30,9 +31,7 @@
30
  Turn off your bot.
31
  """
32
 
33
- import asyncio
34
  import math
35
- import os
36
  import shutil
37
  import time
38
  from datetime import datetime as dt
@@ -42,7 +41,10 @@ import heroku3
42
  import psutil
43
  import requests
44
  from git import Repo
 
 
45
  from telethon import __version__
 
46
 
47
  from . import *
48
 
@@ -66,26 +68,37 @@ except BaseException:
66
  )
67
  async def lol(ult):
68
  pic = udB.get("ALIVE_PIC")
69
- uptime = grt((time.time() - start_time))
70
  header = udB.get("ALIVE_TEXT") if udB.get("ALIVE_TEXT") else "Hey, I am alive."
 
 
 
 
71
  als = (get_string("alive_1")).format(
72
  header,
73
  OWNER_NAME,
74
  ultroid_version,
 
75
  uptime,
76
  pyver(),
77
  __version__,
78
- Repo().active_branch,
79
  )
80
  if pic is None:
81
- await ult.edit(als)
82
  elif pic is not None and "telegra" in pic:
83
- await ult.delete()
84
- await ult.reply(als, file=pic)
 
 
 
85
  else:
86
- await ult.delete()
87
- await ultroid_bot.send_message(ult.chat_id, file=pic)
88
- await ultroid_bot.send_message(ult.chat_id, als)
 
 
 
89
 
90
 
91
  @ultroid_cmd(
@@ -94,11 +107,9 @@ async def lol(ult):
94
  async def _(event):
95
  start = dt.now()
96
  x = await eor(event, "`Pong !`")
97
- if event.fwd_from:
98
- return
99
  end = dt.now()
100
  ms = (end - start).microseconds / 1000
101
- uptime = grt((time.time() - start_time))
102
  await x.edit(get_string("ping").format(ms, uptime))
103
 
104
 
@@ -121,41 +132,32 @@ async def restartbt(ult):
121
  )
122
  async def _(ult):
123
  xx = await eor(ult, "`Processing...`")
124
- if HEROKU_API is None and HEROKU_APP_NAME is None:
125
- return await xx.edit("Please set `HEROKU_APP_NAME` and `HEROKU_API` in vars.")
126
- await xx.edit("`Downloading Logs...`")
127
- with open("logs-ultroid.txt", "w") as log:
128
- log.write(app.get_log())
129
- ok = app.get_log()
130
  key = (
131
- requests.post("https://nekobin.com/api/documents", json={"content": ok})
132
  .json()
133
  .get("result")
134
  .get("key")
135
  )
136
  url = f"https://nekobin.com/{key}"
137
- await ult.client.send_file(
138
  ult.chat_id,
139
- "logs-ultroid.txt",
140
- reply_to=ult.id,
141
- caption=get_string("log").format(url),
142
  )
143
- await xx.edit("`Uploading...`")
144
- await asyncio.sleep(1)
145
  await xx.delete()
146
- return os.remove("logs-ultroid.txt")
147
 
148
 
149
  @ultroid_cmd(
150
  pattern="usage$",
151
  )
152
  async def dyno_usage(dyno):
 
 
153
  dyn = await eor(dyno, "`Processing...`")
154
- useragent = (
155
- "Mozilla/5.0 (Linux; Android 10; SM-G975F) "
156
- "AppleWebKit/537.36 (KHTML, like Gecko) "
157
- "Chrome/80.0.3987.149 Mobile Safari/537.36"
158
- )
159
  user_id = Heroku.account().id
160
  headers = {
161
  "User-Agent": useragent,
@@ -166,7 +168,7 @@ async def dyno_usage(dyno):
166
  r = requests.get(heroku_api + path, headers=headers)
167
  if r.status_code != 200:
168
  return await dyno.edit(
169
- "`Error: something bad happened`\n\n" f">.`{r.reason}`\n"
170
  )
171
  result = r.json()
172
  quota = result["account_quota"]
 
18
  View all plugin names.
19
 
20
  • `{i}restart`
21
+ s - soft restart
22
  To restart your bot.
23
 
24
  • `{i}logs`
 
31
  Turn off your bot.
32
  """
33
 
 
34
  import math
 
35
  import shutil
36
  import time
37
  from datetime import datetime as dt
 
41
  import psutil
42
  import requests
43
  from git import Repo
44
+ from pyUltroid import __version__ as UltVer
45
+ from search_engine_parser.core.utils import get_rand_user_agent as grua
46
  from telethon import __version__
47
+ from telethon.errors.rpcerrorlist import ChatSendMediaForbiddenError
48
 
49
  from . import *
50
 
 
68
  )
69
  async def lol(ult):
70
  pic = udB.get("ALIVE_PIC")
71
+ uptime = grt(time.time() - start_time)
72
  header = udB.get("ALIVE_TEXT") if udB.get("ALIVE_TEXT") else "Hey, I am alive."
73
+ y = Repo().active_branch
74
+ xx = Repo().remotes[0].config_reader.get("url")
75
+ rep = xx.replace(".git", f"/tree/{y}")
76
+ kk = f" `[{y}]({rep})` "
77
  als = (get_string("alive_1")).format(
78
  header,
79
  OWNER_NAME,
80
  ultroid_version,
81
+ UltVer,
82
  uptime,
83
  pyver(),
84
  __version__,
85
+ kk,
86
  )
87
  if pic is None:
88
+ return await eor(ult, als)
89
  elif pic is not None and "telegra" in pic:
90
+ try:
91
+ await ult.reply(als, file=pic)
92
+ await ult.delete()
93
+ except ChatSendMediaForbiddenError:
94
+ await eor(ult, als)
95
  else:
96
+ try:
97
+ await ultroid_bot.send_message(ult.chat_id, file=pic)
98
+ await ultroid_bot.send_message(ult.chat_id, als)
99
+ await ult.delete()
100
+ except ChatSendMediaForbiddenError:
101
+ await eor(ult, als)
102
 
103
 
104
  @ultroid_cmd(
 
107
  async def _(event):
108
  start = dt.now()
109
  x = await eor(event, "`Pong !`")
 
 
110
  end = dt.now()
111
  ms = (end - start).microseconds / 1000
112
+ uptime = grt(time.time() - start_time)
113
  await x.edit(get_string("ping").format(ms, uptime))
114
 
115
 
 
132
  )
133
  async def _(ult):
134
  xx = await eor(ult, "`Processing...`")
135
+ with open("ultroid.log") as f:
136
+ k = f.read()
 
 
 
 
137
  key = (
138
+ requests.post("https://nekobin.com/api/documents", json={"content": k})
139
  .json()
140
  .get("result")
141
  .get("key")
142
  )
143
  url = f"https://nekobin.com/{key}"
144
+ await ultroid.send_file(
145
  ult.chat_id,
146
+ file="ultroid.log",
147
+ caption=f"**Ultroid Logs.**\nPasted [here](https://nekobin.com/{key}) too!",
 
148
  )
149
+ await xx.edit("Done")
 
150
  await xx.delete()
 
151
 
152
 
153
  @ultroid_cmd(
154
  pattern="usage$",
155
  )
156
  async def dyno_usage(dyno):
157
+ if not HEROKU_API and HEROKU_APP_NAME:
158
+ return
159
  dyn = await eor(dyno, "`Processing...`")
160
+ useragent = grua()
 
 
 
 
161
  user_id = Heroku.account().id
162
  headers = {
163
  "User-Agent": useragent,
 
168
  r = requests.get(heroku_api + path, headers=headers)
169
  if r.status_code != 200:
170
  return await dyno.edit(
171
+ "`Error: something bad happened`\n\n" f">.`{r.reason}`\n",
172
  )
173
  result = r.json()
174
  quota = result["account_quota"]
plugins/broadcast.py CHANGED
@@ -23,6 +23,7 @@
23
  • `{i}listchannels`
24
  To get list of all added chats.
25
  """
 
26
  import asyncio
27
  import io
28
 
@@ -31,7 +32,7 @@ from . import *
31
 
32
  @ultroid_cmd(pattern="add ?(.*)", allow_sudo=False)
33
  async def broadcast_adder(event):
34
- if "addsudo" in event.text: # weird fix
35
  return
36
  msgg = event.pattern_match.group(1)
37
  x = await eor(event, get_string("bd_1"))
@@ -92,6 +93,8 @@ async def broadcast_adder(event):
92
 
93
  @ultroid_cmd(pattern="rem ?(.*)", allow_sudo=False)
94
  async def broadcast_remover(event):
 
 
95
  chat_id = event.pattern_match.group(1)
96
  x = await eor(event, get_string("com_1"))
97
  if chat_id == "all":
@@ -150,8 +153,6 @@ async def list_all(event):
150
 
151
  @ultroid_cmd(pattern="forward ?(.*)", allow_sudo=False)
152
  async def forw(event):
153
- if event.fwd_from:
154
- return
155
  if not event.is_reply:
156
  await eor(event, "Reply to a message to broadcast.")
157
  return
@@ -163,8 +164,6 @@ async def forw(event):
163
  sent_count = 0
164
  if event.reply_to_msg_id:
165
  previous_message = await event.get_reply_message()
166
- previous_message.message
167
- previous_message.raw_text
168
  error_count = 0
169
  for channel in channels:
170
  try:
@@ -173,16 +172,12 @@ async def forw(event):
173
  await x.edit(
174
  f"Sent : {sent_count}\nError : {error_count}\nTotal : {len(channels)}",
175
  )
176
- except Exception as error:
177
  try:
178
  await ultroid_bot.send_message(
179
- Var.LOG_CHANNEL, f"Error in sending at {channel}."
 
180
  )
181
- await ultroid_bot.send_message(Var.LOG_CHANNEL, "Error! " + str(error))
182
- if error == "The message cannot be empty unless a file is provided":
183
- return await x.edit(
184
- "For sending files, upload in Saved Messages and reply .forward to it."
185
- )
186
  except BaseException:
187
  pass
188
  error_count += 1
@@ -248,17 +243,19 @@ async def sending(event):
248
  except Exception as error:
249
  try:
250
  await ultroid_bot.send_message(
251
- Var.LOG_CHANNEL, f"Error in sending at {channel}."
 
252
  )
253
  await ultroid_bot.send_message(
254
- Var.LOG_CHANNEL, "Error! " + str(error)
 
255
  )
256
  if (
257
  error
258
  == "The message cannot be empty unless a file is provided"
259
  ):
260
  return await x.edit(
261
- f"For sending files, upload in Saved Messages and reply {hndlr}forward to in."
262
  )
263
  except BaseException:
264
  pass
@@ -270,7 +267,8 @@ async def sending(event):
270
  if error_count > 0:
271
  try:
272
  await ultroid_bot.send_message(
273
- Var.LOG_CHANNEL, f"{error_count} Errors"
 
274
  )
275
  except BaseException:
276
  pass
@@ -279,7 +277,9 @@ async def sending(event):
279
  for channel in channels:
280
  try:
281
  await ultroid_bot.send_message(
282
- int(channel), raw_text, link_preview=False
 
 
283
  )
284
  sent_count += 1
285
  await x.edit(
@@ -288,17 +288,19 @@ async def sending(event):
288
  except Exception as error:
289
  try:
290
  await ultroid_bot.send_message(
291
- Var.LOG_CHANNEL, f"Error in sending at {channel}."
 
292
  )
293
  await ultroid_bot.send_message(
294
- Var.LOG_CHANNEL, "Error! " + str(error)
 
295
  )
296
  if (
297
  error
298
  == "The message cannot be empty unless a file is provided"
299
  ):
300
  return await x.edit(
301
- f"For sending files, upload in Saved Messages and reply {hndlr}forward to in."
302
  )
303
  except BaseException:
304
  pass
@@ -310,7 +312,8 @@ async def sending(event):
310
  if error_count > 0:
311
  try:
312
  await ultroid_bot.send_message(
313
- Var.LOG_CHANNEL, f"{error_count} Errors"
 
314
  )
315
  except BaseException:
316
  await x.edit("Set up log channel for checking errors.")
 
23
  • `{i}listchannels`
24
  To get list of all added chats.
25
  """
26
+
27
  import asyncio
28
  import io
29
 
 
32
 
33
  @ultroid_cmd(pattern="add ?(.*)", allow_sudo=False)
34
  async def broadcast_adder(event):
35
+ if not event.text[4] == " ": # weird fix
36
  return
37
  msgg = event.pattern_match.group(1)
38
  x = await eor(event, get_string("bd_1"))
 
93
 
94
  @ultroid_cmd(pattern="rem ?(.*)", allow_sudo=False)
95
  async def broadcast_remover(event):
96
+ if not event.text[4] == " ": # weird fix
97
+ return
98
  chat_id = event.pattern_match.group(1)
99
  x = await eor(event, get_string("com_1"))
100
  if chat_id == "all":
 
153
 
154
  @ultroid_cmd(pattern="forward ?(.*)", allow_sudo=False)
155
  async def forw(event):
 
 
156
  if not event.is_reply:
157
  await eor(event, "Reply to a message to broadcast.")
158
  return
 
164
  sent_count = 0
165
  if event.reply_to_msg_id:
166
  previous_message = await event.get_reply_message()
 
 
167
  error_count = 0
168
  for channel in channels:
169
  try:
 
172
  await x.edit(
173
  f"Sent : {sent_count}\nError : {error_count}\nTotal : {len(channels)}",
174
  )
175
+ except Exception:
176
  try:
177
  await ultroid_bot.send_message(
178
+ Var.LOG_CHANNEL,
179
+ f"Error in sending at {channel}.",
180
  )
 
 
 
 
 
181
  except BaseException:
182
  pass
183
  error_count += 1
 
243
  except Exception as error:
244
  try:
245
  await ultroid_bot.send_message(
246
+ Var.LOG_CHANNEL,
247
+ f"Error in sending at {channel}.",
248
  )
249
  await ultroid_bot.send_message(
250
+ Var.LOG_CHANNEL,
251
+ "Error! " + str(error),
252
  )
253
  if (
254
  error
255
  == "The message cannot be empty unless a file is provided"
256
  ):
257
  return await x.edit(
258
+ f"For sending files, upload in Saved Messages and reply {hndlr}forward to in.",
259
  )
260
  except BaseException:
261
  pass
 
267
  if error_count > 0:
268
  try:
269
  await ultroid_bot.send_message(
270
+ Var.LOG_CHANNEL,
271
+ f"{error_count} Errors",
272
  )
273
  except BaseException:
274
  pass
 
277
  for channel in channels:
278
  try:
279
  await ultroid_bot.send_message(
280
+ int(channel),
281
+ raw_text,
282
+ link_preview=False,
283
  )
284
  sent_count += 1
285
  await x.edit(
 
288
  except Exception as error:
289
  try:
290
  await ultroid_bot.send_message(
291
+ Var.LOG_CHANNEL,
292
+ f"Error in sending at {channel}.",
293
  )
294
  await ultroid_bot.send_message(
295
+ Var.LOG_CHANNEL,
296
+ "Error! " + str(error),
297
  )
298
  if (
299
  error
300
  == "The message cannot be empty unless a file is provided"
301
  ):
302
  return await x.edit(
303
+ f"For sending files, upload in Saved Messages and reply {hndlr}forward to in.",
304
  )
305
  except BaseException:
306
  pass
 
312
  if error_count > 0:
313
  try:
314
  await ultroid_bot.send_message(
315
+ Var.LOG_CHANNEL,
316
+ f"{error_count} Errors",
317
  )
318
  except BaseException:
319
  await x.edit("Set up log channel for checking errors.")
plugins/carbon.py CHANGED
@@ -182,7 +182,7 @@ async def crbn(event):
182
  temp = await event.get_reply_message()
183
  if temp.media:
184
  b = await ultroid_bot.download_media(temp)
185
- a = open(b, "r")
186
  code = a.read()
187
  a.close()
188
  os.remove(b)
@@ -211,7 +211,7 @@ async def crbn(event):
211
  temp = await event.get_reply_message()
212
  if temp.media:
213
  b = await ultroid_bot.download_media(temp)
214
- a = open(b, "r")
215
  code = a.read()
216
  a.close()
217
  os.remove(b)
 
182
  temp = await event.get_reply_message()
183
  if temp.media:
184
  b = await ultroid_bot.download_media(temp)
185
+ a = open(b)
186
  code = a.read()
187
  a.close()
188
  os.remove(b)
 
211
  temp = await event.get_reply_message()
212
  if temp.media:
213
  b = await ultroid_bot.download_media(temp)
214
+ a = open(b)
215
  code = a.read()
216
  a.close()
217
  os.remove(b)
plugins/channelhacks.py ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available
10
+
11
+
12
+ 🔹 `{i}shift <from channel> | <to channel>`
13
+ This will transfer all old post from channel A to channel B.
14
+ (u can use username or id of channel too)
15
+ example : `{i}shift @abc | @xyz`
16
+ [note - this (" | ") sign is nessesary]
17
+
18
+ 🔹 For auto-posting/forwarding all new message from any source channel to any destination channel.
19
+
20
+ * `asource <channel username or id>`
21
+ This add source channel to database
22
+ * `dsource <channel username or id>`
23
+ This remove source channels from database
24
+ * `listsource <channel username or id>`
25
+ Show list of source channels
26
+
27
+
28
+ * `{i}adest <channel username or id>`
29
+ This add Ur channels to database
30
+ * `{i}ddest <channel username or id>`
31
+ This Remove Ur channels from database
32
+ * `{i}listdest <channel username or id>`
33
+ Show List of Ur channels
34
+
35
+ 'you can set many channels in database'
36
+ 'For activating auto-post use `{i}setredis AUTOPOST True` '
37
+ """
38
+
39
+ import asyncio
40
+
41
+ from pyUltroid.functions.ch_db import *
42
+
43
+ from . import *
44
+
45
+
46
+ @ultroid_bot.on(events.NewMessage())
47
+ async def _(e):
48
+ if not udB.get("AUTOPOST") == "True":
49
+ return
50
+ x = get_source_channels()
51
+ th = await e.get_chat()
52
+ for xs in x:
53
+ if str(th.id) not in str(xs):
54
+ return
55
+ y = get_destinations()
56
+ for ys in y:
57
+ try:
58
+ if e.text and not e.media:
59
+ await ultroid_bot.send_message(int(ys), e.text)
60
+ elif e.media and e.text:
61
+ await ultroid_bot.send_file(int(ys), e.media, caption=e.text)
62
+ else:
63
+ await ultroid_bot.send_file(int(ys), e.media)
64
+ except Exception as e:
65
+ await ultroid_bot.send_message(bot.me.id, str(e))
66
+
67
+
68
+ @ultroid_cmd(pattern="shift (.*)")
69
+ async def _(e):
70
+ x = e.pattern_match.group(1)
71
+ z = await eor(e, "`processing..`")
72
+ a, b = x.split("|")
73
+ try:
74
+ c = int(a)
75
+ except Exception:
76
+ try:
77
+ c = (await ultroid_bot.get_entity(a)).id
78
+ except Exception:
79
+ await z.edit("invalid Channel given")
80
+ return
81
+ try:
82
+ d = int(b)
83
+ except Exception:
84
+ try:
85
+ d = (await ultroid_bot.get_entity(b)).id
86
+ except Exception:
87
+ await z.edit("invalid Channel given")
88
+ return
89
+ async for msg in ultroid_bot.iter_messages(int(c), reverse=True):
90
+ try:
91
+ await asyncio.sleep(0.5)
92
+ await ultroid_bot.send_message(int(d), msg)
93
+ except:
94
+ pass
95
+ await z.edit("Done")
96
+
97
+
98
+ @ultroid_cmd(pattern="asource (.*)")
99
+ async def source(e):
100
+ x = e.pattern_match.group(1)
101
+ try:
102
+ y = int(x)
103
+ except Exception:
104
+ try:
105
+ y = int((await bot.get_entity(x)).id)
106
+ except Exception as es:
107
+ print(es)
108
+ return
109
+ if not is_source_channel_added(y):
110
+ add_source_channel(y)
111
+ await eor(e, "Source added succesfully")
112
+ elif is_source_channel_added(y):
113
+ await eor(e, "Source channel already added")
114
+
115
+
116
+ @ultroid_cmd(pattern="dsource ?(.*)")
117
+ async def dd(event):
118
+ chat_id = event.pattern_match.group(1)
119
+ x = await eor(event, "processing")
120
+ if chat_id == "all":
121
+ await x.edit("`Removing...`")
122
+ udB.delete("CH_SOURCE")
123
+ await x.edit("Source database cleared.")
124
+ return
125
+ try:
126
+ y = int(chat_id)
127
+ except Exception:
128
+ try:
129
+ y = int((await bot.get_entity(chat_id)).id)
130
+ except Exception as es:
131
+ print(es)
132
+ return
133
+ if is_source_channel_added(y):
134
+ rem_source_channel(y)
135
+ await x.edit("Source removed from database")
136
+ await asyncio.sleep(3)
137
+ await x.delete()
138
+ elif is_source_channel_added(y):
139
+ rem_source_channel(y)
140
+ await x.edit("Source removed from database")
141
+ await asyncio.sleep(3)
142
+ await x.delete()
143
+ elif not is_source_channel_added(y):
144
+ await x.edit("Source channel is already removed from database. ")
145
+ await asyncio.sleep(3)
146
+ await x.delete()
147
+
148
+
149
+ @ultroid_cmd(pattern="listsource")
150
+ async def list_all(event):
151
+ x = await eor(event, "`Calculating...`")
152
+ channels = get_source_channels()
153
+ num = get_no_source_channels()
154
+ if num == 0:
155
+ return await eod(x, "No chats were added.", time=5)
156
+ msg = "Source channels in database:\n"
157
+ for channel in channels:
158
+ name = ""
159
+ try:
160
+ name = (await ultroid.get_entity(int(channel))).title
161
+ except:
162
+ name = ""
163
+ msg += f"=> **{name}** [`{channel}`]\n"
164
+ msg += f"\nTotal {get_no_source_channels()} channels."
165
+ if len(msg) > 4096:
166
+ MSG = msg.replace("*", "").replace("`", "")
167
+ with io.BytesIO(str.encode(MSG)) as out_file:
168
+ out_file.name = "channels.txt"
169
+ await ultroid_bot.send_file(
170
+ event.chat_id,
171
+ out_file,
172
+ force_document=True,
173
+ allow_cache=False,
174
+ caption="Channels in database",
175
+ reply_to=event,
176
+ )
177
+ await x.delete()
178
+ else:
179
+ await x.edit(msg)
180
+
181
+
182
+ @ultroid_cmd(pattern="adest (.*)")
183
+ async def destination(e):
184
+ x = e.pattern_match.group(1)
185
+ try:
186
+ y = int(x)
187
+ except Exception:
188
+ try:
189
+ y = int((await bot.get_entity(x)).id)
190
+ except Exception as es:
191
+ print(es)
192
+ return
193
+ if not is_destination_added(y):
194
+ add_destination(y)
195
+ await eor(e, "Destination added succesfully")
196
+ elif is_destination_added(y):
197
+ await eor(e, "Destination channel already added")
198
+
199
+
200
+ @ultroid_cmd(pattern="ddest ?(.*)")
201
+ async def dd(event):
202
+ chat_id = event.pattern_match.group(1)
203
+ x = await eor(event, "processing")
204
+ if chat_id == "all":
205
+ await x.edit("`Removing...`")
206
+ udB.delete("CH_DESTINATION")
207
+ await x.edit("Destinations database cleared.")
208
+ return
209
+ try:
210
+ y = int(chat_id)
211
+ except Exception:
212
+ try:
213
+ y = int((await bot.get_entity(chat_id)).id)
214
+ except Exception as es:
215
+ print(es)
216
+ return
217
+ if is_destination_added(y):
218
+ rem_destination(y)
219
+ await x.edit("Destination removed from database")
220
+ await asyncio.sleep(3)
221
+ await x.delete()
222
+ elif is_destination_added(y):
223
+ rem_destination(y)
224
+ await x.edit("Destination removed from database")
225
+ await asyncio.sleep(3)
226
+ await x.delete()
227
+ elif not is_destination_added(y):
228
+ await x.edit("Destination channel is already removed from database. ")
229
+ await asyncio.sleep(3)
230
+ await x.delete()
231
+
232
+
233
+ @ultroid_cmd(pattern="listdest")
234
+ async def list_all(event):
235
+ x = await eor(event, "`Calculating...`")
236
+ channels = get_destinations()
237
+ num = get_no_destinations()
238
+ if num == 0:
239
+ return await eod(x, "No chats were added.", time=5)
240
+ msg = "Destination channels in database:\n"
241
+ for channel in channels:
242
+ name = ""
243
+ try:
244
+ name = (await ultroid.get_entity(int(channel))).title
245
+ except:
246
+ name = ""
247
+ msg += f"=> **{name}** [`{channel}`]\n"
248
+ msg += f"\nTotal {get_no_destinations()} channels."
249
+ if len(msg) > 4096:
250
+ MSG = msg.replace("*", "").replace("`", "")
251
+ with io.BytesIO(str.encode(MSG)) as out_file:
252
+ out_file.name = "channels.txt"
253
+ await ultroid_bot.send_file(
254
+ event.chat_id,
255
+ out_file,
256
+ force_document=True,
257
+ allow_cache=False,
258
+ caption="Destination channels in database",
259
+ reply_to=event,
260
+ )
261
+ await x.delete()
262
+ else:
263
+ await x.edit(msg)
264
+
265
+
266
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/chats.py CHANGED
@@ -71,19 +71,19 @@ async def _(e):
71
  functions.messages.CreateChatRequest(
72
  users=["@missrose_bot"],
73
  title=group_name,
74
- )
75
  )
76
  created_chat_id = r.chats[0].id
77
  await e.client(
78
  functions.messages.DeleteChatUserRequest(
79
  chat_id=created_chat_id,
80
  user_id="@missrose_bot",
81
- )
82
  )
83
  result = await e.client(
84
  functions.messages.ExportChatInviteRequest(
85
  peer=created_chat_id,
86
- )
87
  )
88
  await xx.edit(
89
  f"Your [{group_name}]({result.link}) Group Made Boss!",
@@ -98,13 +98,13 @@ async def _(e):
98
  title=group_name,
99
  about="Join @TeamUltroid",
100
  megagroup=False if type_of_group == "c" else True,
101
- )
102
  )
103
  created_chat_id = r.chats[0].id
104
  result = await e.client(
105
  functions.messages.ExportChatInviteRequest(
106
  peer=created_chat_id,
107
- )
108
  )
109
  await xx.edit(
110
  f"Your [{group_name}]({result.link}) Group/Channel Has been made Boss!",
 
71
  functions.messages.CreateChatRequest(
72
  users=["@missrose_bot"],
73
  title=group_name,
74
+ ),
75
  )
76
  created_chat_id = r.chats[0].id
77
  await e.client(
78
  functions.messages.DeleteChatUserRequest(
79
  chat_id=created_chat_id,
80
  user_id="@missrose_bot",
81
+ ),
82
  )
83
  result = await e.client(
84
  functions.messages.ExportChatInviteRequest(
85
  peer=created_chat_id,
86
+ ),
87
  )
88
  await xx.edit(
89
  f"Your [{group_name}]({result.link}) Group Made Boss!",
 
98
  title=group_name,
99
  about="Join @TeamUltroid",
100
  megagroup=False if type_of_group == "c" else True,
101
+ ),
102
  )
103
  created_chat_id = r.chats[0].id
104
  result = await e.client(
105
  functions.messages.ExportChatInviteRequest(
106
  peer=created_chat_id,
107
+ ),
108
  )
109
  await xx.edit(
110
  f"Your [{group_name}]({result.link}) Group/Channel Has been made Boss!",
plugins/converter.py CHANGED
@@ -8,23 +8,35 @@
8
  """
9
  ✘ Commands Available -
10
 
11
- • `{i}rename <file name with extension>`
12
- rename the file
13
-
14
  • `{i}mtoi <reply to media>`
15
  media to image conversion
16
 
17
  • `{i}mtos <reply to media>`
18
  convert media to sticker.
 
 
 
 
 
 
 
 
 
 
19
  """
20
 
 
21
  import os
22
 
23
  import cv2
 
24
  from PIL import Image
25
 
26
  from . import *
27
 
 
 
28
 
29
  @ultroid_cmd(pattern="rename ?(.*)")
30
  async def imak(event):
@@ -88,4 +100,59 @@ async def smak(event):
88
  os.remove(image)
89
 
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
 
8
  """
9
  ✘ Commands Available -
10
 
11
+
 
 
12
  • `{i}mtoi <reply to media>`
13
  media to image conversion
14
 
15
  • `{i}mtos <reply to media>`
16
  convert media to sticker.
17
+
18
+ • `{i}doc <filename.ext>`
19
+ Reply to a text msg to save it in a file.
20
+
21
+ • `{i}open`
22
+ Reply to a file to reveal it's text.
23
+
24
+ • `{i}rename <file name with extension>`
25
+ rename the file
26
+
27
  """
28
 
29
+ import asyncio
30
  import os
31
 
32
  import cv2
33
+ import requests
34
  from PIL import Image
35
 
36
  from . import *
37
 
38
+ opn = []
39
+
40
 
41
  @ultroid_cmd(pattern="rename ?(.*)")
42
  async def imak(event):
 
100
  os.remove(image)
101
 
102
 
103
+ @ultroid_cmd(
104
+ pattern="doc",
105
+ )
106
+ async def _(event):
107
+ input_str = event.text[5:]
108
+ xx = await eor(event, get_string("com_1"))
109
+ if event.reply_to_msg_id:
110
+ a = await event.get_reply_message()
111
+ if not a.message:
112
+ return await xx.edit("`Reply to a message`")
113
+ else:
114
+ b = open(input_str, "w")
115
+ b.write(str(a.message))
116
+ b.close()
117
+ await xx.edit(f"**Packing into** `{input_str}`")
118
+ await asyncio.sleep(2)
119
+ await xx.edit(f"**Uploading** `{input_str}`")
120
+ await asyncio.sleep(2)
121
+ await event.client.send_file(event.chat_id, input_str)
122
+ await xx.delete()
123
+ os.remove(input_str)
124
+
125
+
126
+ @ultroid_cmd(
127
+ pattern="open$",
128
+ )
129
+ async def _(event):
130
+ xx = await eor(event, get_string("com_1"))
131
+ if event.reply_to_msg_id:
132
+ a = await event.get_reply_message()
133
+ if a.media:
134
+ b = await a.download_media()
135
+ c = open(b)
136
+ d = c.read()
137
+ c.close()
138
+ try:
139
+ await xx.edit(f"```{d}```")
140
+ except BaseException:
141
+ key = (
142
+ requests.post(
143
+ "https://nekobin.com/api/documents", json={"content": d}
144
+ )
145
+ .json()
146
+ .get("result")
147
+ .get("key")
148
+ )
149
+ await xx.edit(
150
+ f"**MESSAGE EXCEEDS TELEGRAM LIMITS**\n\nSo Pasted It On [NEKOBIN](https://nekobin.com/{key})"
151
+ )
152
+ else:
153
+ return await eod(xx, "`Reply to a readable file`", time=5)
154
+ else:
155
+ return await eod(xx, "`Reply to a readable file`", time=5)
156
+
157
+
158
  HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/core.py CHANGED
@@ -54,11 +54,13 @@ async def inline_handler(event):
54
  buttons=[
55
  [
56
  Button.switch_inline(
57
- "Search Again..?", query="send ", same_peer=True
58
- )
59
- ]
 
 
60
  ],
61
- )
62
  )
63
  except BaseException:
64
  pass
@@ -73,9 +75,11 @@ async def inline_handler(event):
73
  buttons=[
74
  [
75
  Button.switch_inline(
76
- "Search Again..?", query="send ", same_peer=True
77
- )
78
- ]
 
 
79
  ],
80
  )
81
  await event.answer([ultroid])
@@ -88,9 +92,11 @@ async def inline_handler(event):
88
  buttons=[
89
  [
90
  Button.switch_inline(
91
- "Search Again", query="send ", same_peer=True
92
- )
93
- ]
 
 
94
  ],
95
  )
96
  await event.answer([ultroidcode])
 
54
  buttons=[
55
  [
56
  Button.switch_inline(
57
+ "Search Again..?",
58
+ query="send ",
59
+ same_peer=True,
60
+ ),
61
+ ],
62
  ],
63
+ ),
64
  )
65
  except BaseException:
66
  pass
 
75
  buttons=[
76
  [
77
  Button.switch_inline(
78
+ "Search Again..?",
79
+ query="send ",
80
+ same_peer=True,
81
+ ),
82
+ ],
83
  ],
84
  )
85
  await event.answer([ultroid])
 
92
  buttons=[
93
  [
94
  Button.switch_inline(
95
+ "Search Again",
96
+ query="send ",
97
+ same_peer=True,
98
+ ),
99
+ ],
100
  ],
101
  )
102
  await event.answer([ultroidcode])
plugins/dm.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+ """
8
+ ✘ Commands Available -
9
+
10
+ • `{i}dm <username/id> <reply/type>`
11
+ Direct Message the User.
12
+ """
13
+
14
+ from . import *
15
+
16
+
17
+ @ultroid_cmd(pattern="dm ?(.*)")
18
+ async def dm(e):
19
+ d = e.pattern_match.group(1)
20
+ c = d.split(" ")
21
+ try:
22
+ chat_id = await get_user_id(c[0])
23
+ except Exception as ex:
24
+ return await eod(e, "`" + str(ex) + "`", time=5)
25
+ msg = ""
26
+ masg = await e.get_reply_message()
27
+ if e.reply_to_msg_id:
28
+ await ultroid_bot.send_message(chat_id, masg)
29
+ await eod(e, "`⚜️Message Delivered!`", time=4)
30
+ for i in c[1:]:
31
+ msg += i + " "
32
+ if msg == "":
33
+ return
34
+ try:
35
+ await ultroid_bot.send_message(chat_id, msg)
36
+ await eod(e, "`⚜️Message Delivered!⚜️`", time=4)
37
+ except BaseException:
38
+ await eod(
39
+ e,
40
+ "`{i}help dm`",
41
+ time=4,
42
+ )
43
+
44
+
45
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/{uploads_files.py → download_upload.py} RENAMED
@@ -14,27 +14,21 @@
14
  • `{i}dl <filename(optional)>`
15
  Reply to file to download.
16
 
17
- • `{i}save <filename.ext>`
18
- Reply to a text msg to save it in a file.
19
-
20
- • `{i}open`
21
- Reply to a file to reveal it's text.
22
  """
23
 
24
  import asyncio
25
- import os
26
  import time
27
  from datetime import datetime as dt
28
 
29
  from . import *
30
 
31
- opn = []
32
-
33
 
34
  @ultroid_cmd(
35
  pattern="dl ?(.*)",
36
  )
37
  async def download(event):
 
 
38
  xx = await eor(event, get_string("com_1"))
39
  kk = event.pattern_match.group(1)
40
  s = dt.now()
@@ -56,7 +50,7 @@ async def download(event):
56
  xx,
57
  k,
58
  "Downloading...",
59
- )
60
  ),
61
  )
62
  else:
@@ -72,12 +66,15 @@ async def download(event):
72
  k,
73
  "Downloading...",
74
  file_name=d,
75
- )
76
  ),
77
  )
78
  e = datetime.now()
79
  t = time_formatter(((e - s).seconds) * 1000)
80
- await eod(xx, get_string("udl_2").format(o, t))
 
 
 
81
 
82
 
83
  @ultroid_cmd(
@@ -96,6 +93,8 @@ async def download(event):
96
  event.chat_id,
97
  kk,
98
  caption=kk,
 
 
99
  progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
100
  progress(
101
  d,
@@ -104,72 +103,27 @@ async def download(event):
104
  tt,
105
  "Uploading...",
106
  file_name=kk,
107
- )
108
  ),
109
  )
110
  except ValueError as ve:
111
  return await eod(xx, str(ve))
 
 
 
 
 
 
112
  e = datetime.now()
113
  t = time_formatter(((e - s).seconds) * 1000)
114
  try:
115
  await x.edit(f"`{kk}`\nTime Taken: `{t}`")
116
  except BaseException:
117
  pass
118
- await eod(xx, f"Uploaded `{kk}` in `{t}`", time=5)
119
-
120
-
121
- @ultroid_cmd(
122
- pattern="save",
123
- )
124
- async def _(event):
125
- input_str = event.text[6:]
126
- xx = await eor(event, get_string("com_1"))
127
- if event.reply_to_msg_id:
128
- a = await event.get_reply_message()
129
- if not a.message:
130
- return await xx.edit("`Reply to a message`")
131
- else:
132
- b = open(input_str, "w")
133
- b.write(str(a.message))
134
- b.close()
135
- await xx.edit(f"**Packing into** `{input_str}`")
136
- await asyncio.sleep(2)
137
- await xx.edit(f"**Uploading** `{input_str}`")
138
- await asyncio.sleep(2)
139
- await event.client.send_file(event.chat_id, input_str)
140
- await xx.delete()
141
- os.remove(input_str)
142
-
143
-
144
- @ultroid_cmd(
145
- pattern="open$",
146
- )
147
- async def _(event):
148
- xx = await eor(event, get_string("com_1"))
149
- if event.reply_to_msg_id:
150
- a = await event.get_reply_message()
151
- if a.media:
152
- b = await a.download_media()
153
- c = open(b, "r")
154
- d = c.read()
155
- c.close()
156
- n = 4096
157
- for bkl in range(0, len(d), n):
158
- opn.append(d[bkl : bkl + n])
159
- for bc in opn:
160
- await event.client.send_message(
161
- event.chat_id,
162
- f"```{bc}```",
163
- reply_to=event.reply_to_msg_id,
164
- )
165
- await event.delete()
166
- opn.clear()
167
- os.remove(b)
168
- await xx.delete()
169
- else:
170
- return await eod(xx, "`Reply to a readable file`", time=10)
171
  else:
172
- return await eod(xx, "`Reply to a readable file`", time=10)
173
 
174
 
175
  HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
 
14
  • `{i}dl <filename(optional)>`
15
  Reply to file to download.
16
 
 
 
 
 
 
17
  """
18
 
19
  import asyncio
 
20
  import time
21
  from datetime import datetime as dt
22
 
23
  from . import *
24
 
 
 
25
 
26
  @ultroid_cmd(
27
  pattern="dl ?(.*)",
28
  )
29
  async def download(event):
30
+ if not event.is_reply:
31
+ return await eor(event, "`Reply to a Media Message`")
32
  xx = await eor(event, get_string("com_1"))
33
  kk = event.pattern_match.group(1)
34
  s = dt.now()
 
50
  xx,
51
  k,
52
  "Downloading...",
53
+ ),
54
  ),
55
  )
56
  else:
 
66
  k,
67
  "Downloading...",
68
  file_name=d,
69
+ ),
70
  ),
71
  )
72
  e = datetime.now()
73
  t = time_formatter(((e - s).seconds) * 1000)
74
+ if t:
75
+ await eod(xx, get_string("udl_2").format(o, t))
76
+ else:
77
+ await eod(xx, f"Downloaded `{o}` in `0 second(s)`")
78
 
79
 
80
  @ultroid_cmd(
 
93
  event.chat_id,
94
  kk,
95
  caption=kk,
96
+ force_document=True,
97
+ thumb="resources/extras/logo_rdm.png",
98
  progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
99
  progress(
100
  d,
 
103
  tt,
104
  "Uploading...",
105
  file_name=kk,
106
+ ),
107
  ),
108
  )
109
  except ValueError as ve:
110
  return await eod(xx, str(ve))
111
+ except BaseException:
112
+ try:
113
+ await ultroid_bot.send_message(event.chat_id, kk)
114
+ return await kk.delete()
115
+ except BaseException:
116
+ pass
117
  e = datetime.now()
118
  t = time_formatter(((e - s).seconds) * 1000)
119
  try:
120
  await x.edit(f"`{kk}`\nTime Taken: `{t}`")
121
  except BaseException:
122
  pass
123
+ if t:
124
+ await eod(xx, f"Uploaded `{kk}` in `{t}`", time=5)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  else:
126
+ await eod(xx, f"Uploaded `{kk}` in `0 second(s)`")
127
 
128
 
129
  HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/fedutils.py CHANGED
@@ -41,7 +41,8 @@ async def _(event):
41
  previous_message = await event.get_reply_message()
42
  if previous_message.media:
43
  downloaded_file_name = await ultroid_bot.download_media(
44
- previous_message, "fedlist"
 
45
  )
46
  file = open(downloaded_file_name, encoding="utf8")
47
  lines = file.readlines()
@@ -111,7 +112,7 @@ async def _(event):
111
  response = await bot_conv.get_response()
112
  except asyncio.exceptions.TimeoutError:
113
  return await msg.edit(
114
- "`Seems like rose isn't responding, or, the plugin is misbehaving`"
115
  )
116
  await asyncio.sleep(3)
117
  if "make a file" in response.text or "Looks like" in response.text:
@@ -121,10 +122,11 @@ async def _(event):
121
  await asyncio.sleep(3)
122
  if fedfile.media:
123
  downloaded_file_name = await ultroid_bot.download_media(
124
- fedfile, "fedlist"
 
125
  )
126
  await asyncio.sleep(6)
127
- file = open(downloaded_file_name, "r", errors="ignore")
128
  lines = file.readlines()
129
  for line in lines:
130
  try:
@@ -138,7 +140,7 @@ async def _(event):
138
  return
139
  if len(fedList) == 0:
140
  await msg.edit(
141
- f"Unable to collect FedAdminList. Retrying ({a+1}/3)..."
142
  )
143
  else:
144
  break
@@ -185,7 +187,7 @@ async def _(event):
185
  except Exception as e:
186
  print(f"Error in removing FedAdmin file.\n{str(e)}")
187
  await msg.edit(
188
- f"SuperFBan Completed.\nTotal Feds - {len(fedlist)}.\nExcluded - {exCount}.\n Affected {len(fedList) - exCount} feds.\n#TB"
189
  )
190
 
191
 
@@ -197,7 +199,8 @@ async def _(event):
197
  previous_message = await event.get_reply_message()
198
  if previous_message.media:
199
  downloaded_file_name = await ultroid_bot.download_media(
200
- previous_message, "fedlist"
 
201
  )
202
  file = open(downloaded_file_name, encoding="utf8")
203
  lines = file.readlines()
@@ -257,7 +260,7 @@ async def _(event):
257
  response = await bot_conv.get_response()
258
  except asyncio.exceptions.TimeoutError:
259
  return await msg.edit(
260
- "`Seems like rose isn't responding, or, the plugin is misbehaving`"
261
  )
262
  await asyncio.sleep(3)
263
  if "make a file" in response.text or "Looks like" in response.text:
@@ -267,10 +270,11 @@ async def _(event):
267
  await asyncio.sleep(3)
268
  if fedfile.media:
269
  downloaded_file_name = await ultroid_bot.download_media(
270
- fedfile, "fedlist"
 
271
  )
272
  await asyncio.sleep(6)
273
- file = open(downloaded_file_name, "r", errors="ignore")
274
  lines = file.readlines()
275
  for line in lines:
276
  try:
@@ -284,7 +288,7 @@ async def _(event):
284
  return
285
  if len(fedList) == 0:
286
  await msg.edit(
287
- f"Unable to collect FedAdminList. Retrying ({a+1}/3)..."
288
  )
289
  else:
290
  break
@@ -331,13 +335,13 @@ async def _(event):
331
  except Exception as e:
332
  print(f"Error in removing FedAdmin file.\n{str(e)}")
333
  await msg.edit(
334
- f"SuperUnFBan Completed.\nTotal Feds - {len(fedlist)}.\nExcluded - {exCount}.\n Affected {len(fedList) - exCount} feds.\n#TB"
335
  )
336
 
337
 
338
  @ultroid_cmd(pattern="fstat ?(.*)")
339
  async def _(event):
340
- ok = await event.edit("`Checking...`")
341
  if event.reply_to_msg_id:
342
  previous_message = await event.get_reply_message()
343
  sysarg = str(previous_message.sender_id)
@@ -349,7 +353,7 @@ async def _(event):
349
  user = sysarg
350
  if sysarg == "":
351
  await ok.edit(
352
- "`Give me someones id, or reply to somones message to check his/her fedstat.`"
353
  )
354
  return
355
  else:
@@ -359,7 +363,11 @@ async def _(event):
359
  await conv.get_response()
360
  await conv.send_message("/fedstat " + sysarg)
361
  audio = await conv.get_response()
362
- if "Looks like" in audio.text:
 
 
 
 
363
  await audio.click(0)
364
  await asyncio.sleep(2)
365
  audio = await conv.get_response()
@@ -369,10 +377,11 @@ async def _(event):
369
  caption=f"List of feds {user} has been banned in.\n\nCollected using Ultroid.",
370
  link_preview=False,
371
  )
 
372
  else:
373
- await ultroid.send_message(event.chat_id, audio.text)
 
374
  await ultroid.send_read_acknowledge(bot)
375
- await event.delete()
376
  except YouBlockedUserError:
377
  await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!")
378
 
 
41
  previous_message = await event.get_reply_message()
42
  if previous_message.media:
43
  downloaded_file_name = await ultroid_bot.download_media(
44
+ previous_message,
45
+ "fedlist",
46
  )
47
  file = open(downloaded_file_name, encoding="utf8")
48
  lines = file.readlines()
 
112
  response = await bot_conv.get_response()
113
  except asyncio.exceptions.TimeoutError:
114
  return await msg.edit(
115
+ "`Seems like rose isn't responding, or, the plugin is misbehaving`",
116
  )
117
  await asyncio.sleep(3)
118
  if "make a file" in response.text or "Looks like" in response.text:
 
122
  await asyncio.sleep(3)
123
  if fedfile.media:
124
  downloaded_file_name = await ultroid_bot.download_media(
125
+ fedfile,
126
+ "fedlist",
127
  )
128
  await asyncio.sleep(6)
129
+ file = open(downloaded_file_name, errors="ignore")
130
  lines = file.readlines()
131
  for line in lines:
132
  try:
 
140
  return
141
  if len(fedList) == 0:
142
  await msg.edit(
143
+ f"Unable to collect FedAdminList. Retrying ({a+1}/3)...",
144
  )
145
  else:
146
  break
 
187
  except Exception as e:
188
  print(f"Error in removing FedAdmin file.\n{str(e)}")
189
  await msg.edit(
190
+ f"SuperFBan Completed.\nTotal Feds - {len(fedlist)}.\nExcluded - {exCount}.\n Affected {len(fedList) - exCount} feds.\n#TB",
191
  )
192
 
193
 
 
199
  previous_message = await event.get_reply_message()
200
  if previous_message.media:
201
  downloaded_file_name = await ultroid_bot.download_media(
202
+ previous_message,
203
+ "fedlist",
204
  )
205
  file = open(downloaded_file_name, encoding="utf8")
206
  lines = file.readlines()
 
260
  response = await bot_conv.get_response()
261
  except asyncio.exceptions.TimeoutError:
262
  return await msg.edit(
263
+ "`Seems like rose isn't responding, or, the plugin is misbehaving`",
264
  )
265
  await asyncio.sleep(3)
266
  if "make a file" in response.text or "Looks like" in response.text:
 
270
  await asyncio.sleep(3)
271
  if fedfile.media:
272
  downloaded_file_name = await ultroid_bot.download_media(
273
+ fedfile,
274
+ "fedlist",
275
  )
276
  await asyncio.sleep(6)
277
+ file = open(downloaded_file_name, errors="ignore")
278
  lines = file.readlines()
279
  for line in lines:
280
  try:
 
288
  return
289
  if len(fedList) == 0:
290
  await msg.edit(
291
+ f"Unable to collect FedAdminList. Retrying ({a+1}/3)...",
292
  )
293
  else:
294
  break
 
335
  except Exception as e:
336
  print(f"Error in removing FedAdmin file.\n{str(e)}")
337
  await msg.edit(
338
+ f"SuperUnFBan Completed.\nTotal Feds - {len(fedlist)}.\nExcluded - {exCount}.\n Affected {len(fedList) - exCount} feds.\n#TB",
339
  )
340
 
341
 
342
  @ultroid_cmd(pattern="fstat ?(.*)")
343
  async def _(event):
344
+ ok = await eor(event, "`Checking...`")
345
  if event.reply_to_msg_id:
346
  previous_message = await event.get_reply_message()
347
  sysarg = str(previous_message.sender_id)
 
353
  user = sysarg
354
  if sysarg == "":
355
  await ok.edit(
356
+ "`Give me someones id, or reply to somones message to check his/her fedstat.`",
357
  )
358
  return
359
  else:
 
363
  await conv.get_response()
364
  await conv.send_message("/fedstat " + sysarg)
365
  audio = await conv.get_response()
366
+ if audio.message.startswith("This command can only be used once"):
367
+ return await ok.edit(
368
+ "Oops, you can use this command only once every minute!",
369
+ )
370
+ elif "Looks like" in audio.text:
371
  await audio.click(0)
372
  await asyncio.sleep(2)
373
  audio = await conv.get_response()
 
377
  caption=f"List of feds {user} has been banned in.\n\nCollected using Ultroid.",
378
  link_preview=False,
379
  )
380
+ await ok.delete()
381
  else:
382
+ okk = await conv.get_edit()
383
+ await ok.edit(okk.message)
384
  await ultroid.send_read_acknowledge(bot)
 
385
  except YouBlockedUserError:
386
  await ok.edit("**Error**\n `Unblock` @MissRose_Bot `and try again!")
387
 
plugins/filter.py ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available -
10
+
11
+ • `{i}addfilter <word><reply to a message>`
12
+ add the used word as filter relating to replied message.
13
+
14
+ • `{i}remfilter <word>`
15
+ Remove the filtered user..
16
+
17
+ • `{i}listfilters`
18
+ list all filters.
19
+ """
20
+
21
+ import os
22
+
23
+ from pyUltroid.functions.filter_db import *
24
+ from telegraph import upload_file as uf
25
+ from telethon.utils import pack_bot_file_id
26
+
27
+ from . import *
28
+
29
+
30
+ @ultroid_cmd(pattern="addfilter ?(.*)")
31
+ async def af(e):
32
+ wrd = e.pattern_match.group(1)
33
+ wt = await e.get_reply_message()
34
+ chat = e.chat_id
35
+ if not (wt and wrd):
36
+ return await eor(e, "`Use this command word to set as filter and reply...`")
37
+ try:
38
+ rem_filter(int(chat), wrd)
39
+ except:
40
+ pass
41
+ if wt and wt.media:
42
+ wut = mediainfo(wt.media)
43
+ if wut.startswith(("pic", "gif")):
44
+ dl = await bot.download_media(wt.media)
45
+ variable = uf(dl)
46
+ m = "https://telegra.ph" + variable[0]
47
+ elif wut == "video":
48
+ if wt.media.document.size > 8 * 1000 * 1000:
49
+ return await eod(x, "`Unsupported Media`")
50
+ else:
51
+ dl = await bot.download_media(wt.media)
52
+ variable = uf(dl)
53
+ os.remove(dl)
54
+ m = "https://telegra.ph" + variable[0]
55
+ else:
56
+ m = pack_bot_file_id(wt.media)
57
+ if wt.text:
58
+ add_filter(int(chat), wrd, wt.text, m)
59
+ else:
60
+ add_filter(int(chat), wrd, None, m)
61
+ else:
62
+ add_filter(int(chat), wrd, wt.text, None)
63
+ await eor(e, f"Done : Filter `{wrd}` Saved.")
64
+
65
+
66
+ @ultroid_cmd(pattern="remfilter ?(.*)")
67
+ async def rf(e):
68
+ wrd = e.pattern_match.group(1)
69
+ chat = e.chat_id
70
+ if not wrd:
71
+ return await eor(e, "`Give the filter to remove..`")
72
+ rem_filter(int(chat), wrd)
73
+ await eor(e, f"Done : Filter `{wrd}` Removed.")
74
+
75
+
76
+ @ultroid_cmd(pattern="listfilter$")
77
+ async def lsnote(e):
78
+ x = list_filter(e.chat_id)
79
+ if x:
80
+ sd = "Filters Found In This Chats Are\n\n"
81
+ await eor(e, sd + x)
82
+ else:
83
+ await eor(e, "No Filters Found Here")
84
+
85
+
86
+ @ultroid_bot.on(events.NewMessage())
87
+ async def fl(e):
88
+ xx = e.text
89
+ chat = e.chat_id
90
+ x = get_filter(int(chat))
91
+ if x:
92
+ if " " in xx:
93
+ xx = xx.split(" ")
94
+ kk = ""
95
+ for c in xx:
96
+ if c in x:
97
+ k = get_reply(int(chat), c)
98
+ if k:
99
+ kk = k
100
+ if kk:
101
+ msg = k["msg"]
102
+ media = k["media"]
103
+ await e.reply(msg, file=media)
104
+
105
+ else:
106
+ k = get_reply(chat, xx)
107
+ if k:
108
+ msg = k["msg"]
109
+ media = k["media"]
110
+ await e.reply(msg, file=media)
111
+
112
+
113
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/gadgets.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #
2
+ # Ultroid - UserBot
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available -
10
+
11
+ • `{i}gadget <search query>`
12
+ Gadget Search from Telegram.
13
+
14
+ """
15
+
16
+ import requests
17
+ from bs4 import BeautifulSoup as bs
18
+
19
+ from . import *
20
+
21
+
22
+ @ultroid_cmd(pattern="gadget ?(.*)")
23
+ async def mobs(e):
24
+ mat = e.pattern_match.group(1)
25
+ if not mat:
26
+ await eor(e, "Please Give a Mobile Name to look for.")
27
+ query = mat.replace(" ", "%20")
28
+ jwala = f"https://gadgets.ndtv.com/search?searchtext={query}"
29
+ c = requests.get(jwala).content
30
+ b = bs(c, "html.parser", from_encoding="utf-8")
31
+ bt = await eor(e, "`Processing...`")
32
+ try:
33
+ out = "**📱 Mobile / Gadgets Search**\n\n"
34
+ re = b.find_all("div", "rvw-imgbox")
35
+ li = re[0].findNext()["href"]
36
+ mg = re[0].findNext().findNext().findNext()
37
+ tit = mg["title"]
38
+ cont = requests.get(li).content
39
+ nu = bs(cont, "html.parser", from_encoding="utf-8")
40
+ req = nu.find_all("div", "_pdsd")
41
+ imu = nu.find_all("source", type="image/webp")[0]["srcset"].split("?")[0]
42
+ out += f"☑️ **[{tit}]({li})**\n\n"
43
+ for fp in req:
44
+ ty = fp.findNext()
45
+ out += f"- **{ty.text}** - `{ty.findNext().text}`\n"
46
+ out += "_"
47
+ await ultroid_bot.send_file(e.chat_id, file=imu, caption=out)
48
+ if e.sender_id == ultroid_bot.uid:
49
+ await bt.delete()
50
+ except Exception as a:
51
+ print(a)
52
+ await eor(e, "No Results Found")
53
+
54
+
55
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/gdrive.py CHANGED
@@ -19,6 +19,9 @@
19
  • `{i}udir <directory name>`
20
  Upload a directory on Google Drive.
21
 
 
 
 
22
  • `{i}gfolder`
23
  Link to your Google Drive Folder.
24
  If added then all uploaded files will be placed here.
@@ -30,13 +33,21 @@ import os
30
  import time
31
  from datetime import datetime
32
 
33
- from telethon import events
34
-
35
  from . import *
36
 
37
  TOKEN_FILE = "resources/auths/auth_token.txt"
38
 
39
 
 
 
 
 
 
 
 
 
 
 
40
  @ultroid_cmd(
41
  pattern="ugdrive ?(.*)",
42
  )
@@ -70,7 +81,7 @@ async def _(event):
70
  ms = (end - start).seconds
71
  required_file_name = downloaded_file_name
72
  await mone.edit(
73
- "Downloaded to `{}` in {} seconds.".format(downloaded_file_name, ms)
74
  )
75
  elif input_str:
76
  input_str = input_str.strip()
@@ -78,10 +89,12 @@ async def _(event):
78
  end = datetime.now()
79
  ms = (end - start).seconds
80
  required_file_name = input_str
81
- await mone.edit("Found `{}` in {} seconds.".format(input_str, ms))
82
  else:
83
  return await eod(
84
- mone, "File Not found in local server. Give me a file path :((", time=5
 
 
85
  )
86
  if required_file_name:
87
  http = authorize(TOKEN_FILE, None)
@@ -110,13 +123,14 @@ async def sch(event):
110
  return await eod(event, get_string("gdrive_6").format(Var.BOT_USERNAME))
111
  http = authorize(TOKEN_FILE, None)
112
  input_str = event.pattern_match.group(1).strip()
113
- a = await eor(event, "Searching for {} in G-Drive.".format(input_str))
114
  if Redis("GDRIVE_FOLDER_ID") is not None:
115
  query = "'{}' in parents and (title contains '{}')".format(
116
- Redis("GDRIVE_FOLDER_ID"), input_str
 
117
  )
118
  else:
119
- query = "title contains '{}'".format(input_str)
120
  try:
121
  msg = await gsearch(http, query, input_str)
122
  return await a.edit(str(msg))
@@ -133,14 +147,14 @@ async def _(event):
133
  input_str = event.pattern_match.group(1)
134
  if os.path.isdir(input_str):
135
  http = authorize(TOKEN_FILE, None)
136
- a = await eor(event, "Uploading `{}` to G-Drive...".format(input_str))
137
  dir_id = await create_directory(
138
  http,
139
  os.path.basename(os.path.abspath(input_str)),
140
  Redis("GDRIVE_FOLDER_ID"),
141
  )
142
  await DoTeskWithDir(http, input_str, event, dir_id)
143
- dir_link = "https://drive.google.com/folderview?id={}".format(dir_id)
144
  await eod(a, get_string("gdrive_7").format(input_str, dir_link))
145
  else:
146
  return await eod(event, f"Directory {input_str} does not seem to exist", time=5)
@@ -152,7 +166,7 @@ async def _(event):
152
  async def _(event):
153
  if Redis("GDRIVE_FOLDER_ID"):
154
  folder_link = "https://drive.google.com/folderview?id=" + Redis(
155
- "GDRIVE_FOLDER_ID"
156
  )
157
  await eod(event, "`Here is Your G-Drive Folder link : `\n" + folder_link)
158
  else:
 
19
  • `{i}udir <directory name>`
20
  Upload a directory on Google Drive.
21
 
22
+ • `{i}listdrive`
23
+ List all GDrive files.
24
+
25
  • `{i}gfolder`
26
  Link to your Google Drive Folder.
27
  If added then all uploaded files will be placed here.
 
33
  import time
34
  from datetime import datetime
35
 
 
 
36
  from . import *
37
 
38
  TOKEN_FILE = "resources/auths/auth_token.txt"
39
 
40
 
41
+ @ultroid_cmd(
42
+ pattern="listdrive$",
43
+ )
44
+ async def files(event):
45
+ if not os.path.exists(TOKEN_FILE):
46
+ return await eod(event, get_string("gdrive_6").format(Var.BOT_USERNAME))
47
+ http = authorize(TOKEN_FILE, None)
48
+ await eor(event, list_files(http))
49
+
50
+
51
  @ultroid_cmd(
52
  pattern="ugdrive ?(.*)",
53
  )
 
81
  ms = (end - start).seconds
82
  required_file_name = downloaded_file_name
83
  await mone.edit(
84
+ f"Downloaded to `{downloaded_file_name}` in {ms} seconds.",
85
  )
86
  elif input_str:
87
  input_str = input_str.strip()
 
89
  end = datetime.now()
90
  ms = (end - start).seconds
91
  required_file_name = input_str
92
+ await mone.edit(f"Found `{input_str}` in {ms} seconds.")
93
  else:
94
  return await eod(
95
+ mone,
96
+ "File Not found in local server. Give me a file path :((",
97
+ time=5,
98
  )
99
  if required_file_name:
100
  http = authorize(TOKEN_FILE, None)
 
123
  return await eod(event, get_string("gdrive_6").format(Var.BOT_USERNAME))
124
  http = authorize(TOKEN_FILE, None)
125
  input_str = event.pattern_match.group(1).strip()
126
+ a = await eor(event, f"Searching for {input_str} in G-Drive.")
127
  if Redis("GDRIVE_FOLDER_ID") is not None:
128
  query = "'{}' in parents and (title contains '{}')".format(
129
+ Redis("GDRIVE_FOLDER_ID"),
130
+ input_str,
131
  )
132
  else:
133
+ query = f"title contains '{input_str}'"
134
  try:
135
  msg = await gsearch(http, query, input_str)
136
  return await a.edit(str(msg))
 
147
  input_str = event.pattern_match.group(1)
148
  if os.path.isdir(input_str):
149
  http = authorize(TOKEN_FILE, None)
150
+ a = await eor(event, f"Uploading `{input_str}` to G-Drive...")
151
  dir_id = await create_directory(
152
  http,
153
  os.path.basename(os.path.abspath(input_str)),
154
  Redis("GDRIVE_FOLDER_ID"),
155
  )
156
  await DoTeskWithDir(http, input_str, event, dir_id)
157
+ dir_link = f"https://drive.google.com/folderview?id={dir_id}"
158
  await eod(a, get_string("gdrive_7").format(input_str, dir_link))
159
  else:
160
  return await eod(event, f"Directory {input_str} does not seem to exist", time=5)
 
166
  async def _(event):
167
  if Redis("GDRIVE_FOLDER_ID"):
168
  folder_link = "https://drive.google.com/folderview?id=" + Redis(
169
+ "GDRIVE_FOLDER_ID",
170
  )
171
  await eod(event, "`Here is Your G-Drive Folder link : `\n" + folder_link)
172
  else:
plugins/get_addons.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available -
10
+
11
+ • `{i}getaddons <raw link to code>`
12
+ Load Plugins from the given raw link.
13
+ """
14
+ import requests
15
+
16
+ from . import *
17
+
18
+
19
+ @ultroid_cmd(pattern="getaddons ?(.*)")
20
+ async def get_the_addons_lol(event):
21
+ thelink = event.pattern_match.group(1)
22
+ xx = await eor(event, get_string("com_1"))
23
+ fool = "Please provide a raw link!"
24
+ if thelink is None:
25
+ return await eod(xx, fool, time=10)
26
+ split_thelink = thelink.split("/")
27
+ if "raw" in split_thelink or "raw.githubusercontent.com" in split_thelink:
28
+ pass
29
+ else:
30
+ return await eod(xx, fool, time=10)
31
+ name_of_it = split_thelink[(len(split_thelink) - 1)]
32
+ plug = requests.get(thelink).text
33
+ fil = f"addons/{name_of_it}"
34
+ await xx.edit("Packing the codes...")
35
+ uult = open(fil, "w", encoding="utf-8")
36
+ uult.write(plug)
37
+ uult.close
38
+ await xx.edit("Packed. Now loading the plugin..")
39
+ shortname = name_of_it.split(".")[0]
40
+ try:
41
+ load_addons(shortname)
42
+ await eod(xx, f"**Sᴜᴄᴄᴇssғᴜʟʟʏ Lᴏᴀᴅᴇᴅ** `{shortname}`", time=3)
43
+ except Exception as e:
44
+ await eod(
45
+ xx,
46
+ f"**Could not load** `{shortname}` **because of the following error.**\n`{str(e)}`",
47
+ time=3,
48
+ )
49
+
50
+
51
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/glitch.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+
10
+ ✘ Commands Available -
11
+
12
+ •`{i}glitch <replt to media>`
13
+ gives a glitchy gif.
14
+
15
+ """
16
+
17
+ import os
18
+
19
+ from . import *
20
+
21
+
22
+ @ultroid_cmd(pattern="glitch$")
23
+ async def _(e):
24
+ reply = await e.get_reply_message()
25
+ if not reply.media:
26
+ return await eor(e, "reply to any media")
27
+ xx = await eor(e, "`Gliching...`")
28
+ ok = await bot.download_media(reply.media)
29
+ cmd = f"glitch_me gif --line_count 200 -f 10 -d 50 '{ok}' ult.gif"
30
+ stdout, stderr = await bash(cmd)
31
+ await ultroid_bot.send_file(
32
+ e.chat_id, "ult.gif", force_document=False, reply_to=reply
33
+ )
34
+ await xx.delete()
35
+ os.remove(ok)
36
+ os.remove("ult.gif")
37
+
38
+
39
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}"})
plugins/globaltools.py CHANGED
@@ -25,11 +25,12 @@
25
 
26
  • `{i}gcast <Message>`
27
  Globally Send that msg in all grps.
 
 
 
28
  """
29
 
30
  from telethon import events
31
- from telethon.tl.functions.channels import EditBannedRequest
32
- from telethon.tl.types import ChatBannedRights
33
 
34
  from . import *
35
 
@@ -69,7 +70,7 @@ async def _(e):
69
  pass
70
  ungban(userid)
71
  await xx.edit(
72
- f"`Ungbanned` [{name}](tg://user?id={userid}) `in {chats} chats.\nRemoved from gbanwatch.`"
73
  )
74
 
75
 
@@ -103,7 +104,9 @@ async def _(e):
103
  return await eod(xx, "`I can't gban my Developers.`", time=3)
104
  if is_gbanned(userid):
105
  return await eod(
106
- xx, "`User is already gbanned and added to gbanwatch.`", time=4
 
 
107
  )
108
  async for ggban in e.client.iter_dialogs():
109
  if ggban.is_group or ggban.is_channel:
@@ -114,7 +117,7 @@ async def _(e):
114
  pass
115
  gban(userid)
116
  await xx.edit(
117
- f"`Gbanned` [{name}](tg://user?id={userid}) `in {chats} chats.\nAdded to gbanwatch.`"
118
  )
119
 
120
 
@@ -141,6 +144,29 @@ async def gcast(event):
141
  await kk.edit(f"Done in {done} chats, error in {er} chat(s)")
142
 
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  @ultroid_cmd(
145
  pattern="gkick ?(.*)",
146
  )
@@ -266,7 +292,9 @@ async def _(e):
266
  if chat.admin_rights:
267
  try:
268
  await e.client.edit_permissions(
269
- chat.id, user.id, view_messages=False
 
 
270
  )
271
  gban_watch = f"`Gbanned User` [{user.first_name}](tg://user?id={user.id}) `Spotted\n"
272
  gban_watch += f"Banned Successfully`"
 
25
 
26
  • `{i}gcast <Message>`
27
  Globally Send that msg in all grps.
28
+
29
+ • `{i}gucast <Message>`
30
+ Globally Send that msg in all Ur Chat Users.
31
  """
32
 
33
  from telethon import events
 
 
34
 
35
  from . import *
36
 
 
70
  pass
71
  ungban(userid)
72
  await xx.edit(
73
+ f"`Ungbanned` [{name}](tg://user?id={userid}) `in {chats} chats.\nRemoved from gbanwatch.`",
74
  )
75
 
76
 
 
104
  return await eod(xx, "`I can't gban my Developers.`", time=3)
105
  if is_gbanned(userid):
106
  return await eod(
107
+ xx,
108
+ "`User is already gbanned and added to gbanwatch.`",
109
+ time=4,
110
  )
111
  async for ggban in e.client.iter_dialogs():
112
  if ggban.is_group or ggban.is_channel:
 
117
  pass
118
  gban(userid)
119
  await xx.edit(
120
+ f"`Gbanned` [{name}](tg://user?id={userid}) `in {chats} chats.\nAdded to gbanwatch.`",
121
  )
122
 
123
 
 
144
  await kk.edit(f"Done in {done} chats, error in {er} chat(s)")
145
 
146
 
147
+ @ultroid_cmd(
148
+ pattern="gucast ?(.*)",
149
+ )
150
+ async def gucast(event):
151
+ xx = event.pattern_match.group(1)
152
+ if not xx:
153
+ return eor(event, "`Give some text to Globally Broadcast`")
154
+ tt = event.text
155
+ msg = tt[7:]
156
+ kk = await eor(event, "`Globally Broadcasting Msg...`")
157
+ er = 0
158
+ done = 0
159
+ async for x in ultroid_bot.iter_dialogs():
160
+ if x.is_user and not x.entity.bot:
161
+ chat = x.id
162
+ try:
163
+ done += 1
164
+ await ultroid_bot.send_message(chat, msg)
165
+ except:
166
+ er += 1
167
+ await kk.edit(f"Done in {done} chats, error in {er} chat(s)")
168
+
169
+
170
  @ultroid_cmd(
171
  pattern="gkick ?(.*)",
172
  )
 
292
  if chat.admin_rights:
293
  try:
294
  await e.client.edit_permissions(
295
+ chat.id,
296
+ user.id,
297
+ view_messages=False,
298
  )
299
  gban_watch = f"`Gbanned User` [{user.first_name}](tg://user?id={user.id}) `Spotted\n"
300
  gban_watch += f"Banned Successfully`"
plugins/google.py CHANGED
@@ -24,7 +24,7 @@ from shutil import rmtree
24
  import requests
25
  from bs4 import BeautifulSoup as bs
26
  from PIL import Image
27
- from pyUltroid.functions.parser import GoogleSearch
28
 
29
  from strings import get_string
30
 
@@ -45,9 +45,14 @@ async def google(event):
45
  url = res["links"][i]
46
  des = res["descriptions"][i]
47
  out += f" 👉🏻 [{text}]({url})\n`{des}`\n\n"
48
- await x.edit(
49
- f"**Google Search Query:**\n`{inp}`\n\n**Results:**\n{out}", link_preview=False
50
- )
 
 
 
 
 
51
 
52
 
53
  @ultroid_cmd(pattern="img ?(.*)")
@@ -88,17 +93,19 @@ async def reverse(event):
88
  x, y = img.size
89
  file = {"encoded_image": (dl, open(dl, "rb"))}
90
  grs = requests.post(
91
- "https://www.google.com/searchbyimage/upload", files=file, allow_redirects=False
 
 
92
  )
93
  loc = grs.headers.get("Location")
94
  response = requests.get(
95
  loc,
96
  headers={
97
- "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
98
  },
99
  )
100
  xx = bs(response.text, "html.parser")
101
- div = xx.find("div", {"class": "r5a77d"})
102
  alls = div.find("a")
103
  link = alls["href"]
104
  text = alls.text
@@ -113,7 +120,10 @@ async def reverse(event):
113
  pth = gi.download(args)
114
  ok = pth[0][text]
115
  await event.client.send_file(
116
- event.chat_id, ok, album=True, caption="Similar Images Realted to Search"
 
 
 
117
  )
118
  rmtree(f"./resources/downloads/{text}/")
119
  os.remove(dl)
 
24
  import requests
25
  from bs4 import BeautifulSoup as bs
26
  from PIL import Image
27
+ from search_engine_parser import GoogleSearch
28
 
29
  from strings import get_string
30
 
 
45
  url = res["links"][i]
46
  des = res["descriptions"][i]
47
  out += f" 👉🏻 [{text}]({url})\n`{des}`\n\n"
48
+ omk = f"**Google Search Query:**\n`{inp}`\n\n**Results:**\n{out}"
49
+ opn = []
50
+ for bkl in range(0, len(omk), 4095):
51
+ opn.append(omk[bkl : bkl + 4095])
52
+ for bc in opn:
53
+ await ultroid_bot.send_message(event.chat_id, bc, link_preview=False)
54
+ await x.delete()
55
+ opn.clear()
56
 
57
 
58
  @ultroid_cmd(pattern="img ?(.*)")
 
93
  x, y = img.size
94
  file = {"encoded_image": (dl, open(dl, "rb"))}
95
  grs = requests.post(
96
+ "https://www.google.com/searchbyimage/upload",
97
+ files=file,
98
+ allow_redirects=False,
99
  )
100
  loc = grs.headers.get("Location")
101
  response = requests.get(
102
  loc,
103
  headers={
104
+ "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0",
105
  },
106
  )
107
  xx = bs(response.text, "html.parser")
108
+ div = xx.find_all("div", {"class": "r5a77d"})[0]
109
  alls = div.find("a")
110
  link = alls["href"]
111
  text = alls.text
 
120
  pth = gi.download(args)
121
  ok = pth[0][text]
122
  await event.client.send_file(
123
+ event.chat_id,
124
+ ok,
125
+ album=True,
126
+ caption="Similar Images Realted to Search",
127
  )
128
  rmtree(f"./resources/downloads/{text}/")
129
  os.remove(dl)
plugins/greetings.py ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultroid - UserBot
2
+ # Copyright (C) 2020 TeamUltroid
3
+ #
4
+ # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
5
+ # PLease read the GNU Affero General Public License in
6
+ # <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
7
+
8
+ """
9
+ ✘ Commands Available -
10
+
11
+ ---- Welcomes ----
12
+ • `{i}setwelcome <message/reply to message>`
13
+ Set welcome message in the current chat.
14
+
15
+ • `{i}clearwelcome`
16
+ Delete the welcome in the current chat.
17
+
18
+ • `{i}getwelcome`
19
+ Get the welcome message in the current chat.
20
+
21
+ ---- GoodByes ----
22
+ • `{i}setgoodbye <message/reply to message>`
23
+ Set goodbye message in the current chat.
24
+
25
+ • `{i}cleargoodbye`
26
+ Delete the goodbye in the current chat.
27
+
28
+ • `{i}getgoodbye`
29
+ Get the goodbye message in the current chat.
30
+
31
+ """
32
+ Note = "\n\nNote: `{mention}`, `{group}`, `{count}`, `{name}`, `{fullname}`, `{username}`, `{userid}` can be used as formatting parameters.\n\n"
33
+
34
+
35
+ import os
36
+
37
+ from telegraph import upload_file as uf
38
+ from telethon.utils import get_display_name, pack_bot_file_id
39
+
40
+ from . import *
41
+
42
+
43
+ @ultroid_cmd(pattern="setwelcome")
44
+ async def setwel(event):
45
+ x = await eor(event, get_string("com_1"))
46
+ r = await event.get_reply_message()
47
+ if event.is_private:
48
+ return await eod(x, "Please use this in a group and not PMs!", time=10)
49
+ if r and r.media:
50
+ wut = mediainfo(r.media)
51
+ if wut.startswith(("pic", "gif")):
52
+ dl = await bot.download_media(r.media)
53
+ variable = uf(dl)
54
+ os.remove(dl)
55
+ m = "https://telegra.ph" + variable[0]
56
+ elif wut == "video":
57
+ if r.media.document.size > 8 * 1000 * 1000:
58
+ return await eod(x, "`Unsupported Media`")
59
+ else:
60
+ dl = await bot.download_media(r.media)
61
+ variable = uf(dl)
62
+ os.remove(dl)
63
+ m = "https://telegra.ph" + variable[0]
64
+ else:
65
+ m = pack_bot_file_id(r.media)
66
+ if r.text:
67
+ add_welcome(event.chat_id, r.message, m)
68
+ else:
69
+ add_welcome(event.chat_id, None, m)
70
+ await eor(x, "`Welcome note saved`")
71
+ elif r.text:
72
+ add_welcome(event.chat_id, r.message, None)
73
+ await eor(x, "`Welcome note saved`")
74
+ else:
75
+ await eod(x, "`Reply to message which u want to set as welcome`")
76
+
77
+
78
+ @ultroid_cmd(pattern="clearwelcome$")
79
+ async def clearwel(event):
80
+ if not get_welcome(event.chat_id):
81
+ await eod(event, "`No welcome was set!`", time=5)
82
+ delete_welcome(event.chat_id)
83
+ await eod(event, "`Welcome Note Deleted`")
84
+
85
+
86
+ @ultroid_cmd(pattern="getwelcome$")
87
+ async def listwel(event):
88
+ wel = get_welcome(event.chat_id)
89
+ if not wel:
90
+ await eod(event, "`No welcome was set!`", time=5)
91
+ msgg = wel["welcome"]
92
+ med = wel["media"]
93
+ await event.reply(f"**Welcome Note in this chat**\n\n`{msgg}`", file=med)
94
+ await event.delete()
95
+
96
+
97
+ @ultroid_bot.on(events.ChatAction())
98
+ async def _(event):
99
+ wel = get_welcome(event.chat_id)
100
+ if wel:
101
+ if event.user_joined or event.user_added:
102
+ user = await event.get_user()
103
+ chat = await event.get_chat()
104
+ title = chat.title if chat.title else "this chat"
105
+ pp = await event.client.get_participants(chat)
106
+ count = len(pp)
107
+ mention = f"[{get_display_name(user)}](tg://user?id={user.id})"
108
+ name = user.first_name
109
+ last = user.last_name
110
+ if last:
111
+ fullname = f"{name} {last}"
112
+ else:
113
+ fullname = name
114
+ uu = user.username
115
+ if uu:
116
+ username = f"@{uu}"
117
+ else:
118
+ username = mention
119
+ msgg = wel["welcome"]
120
+ med = wel["media"]
121
+ userid = user.id
122
+ await event.reply(
123
+ msgg.format(
124
+ mention=mention,
125
+ group=title,
126
+ count=count,
127
+ name=name,
128
+ fullname=fullname,
129
+ username=username,
130
+ userid=userid,
131
+ ),
132
+ file=med,
133
+ )
134
+
135
+
136
+ @ultroid_cmd(pattern="setgoodbye")
137
+ async def setgb(event):
138
+ x = await eor(event, get_string("com_1"))
139
+ r = await event.get_reply_message()
140
+ if event.is_private:
141
+ return await eod(x, "Please use this in a group and not PMs!", time=10)
142
+ if r and r.media:
143
+ wut = mediainfo(r.media)
144
+ if wut.startswith(("pic", "gif")):
145
+ dl = await bot.download_media(r.media)
146
+ variable = uf(dl)
147
+ os.remove(dl)
148
+ m = "https://telegra.ph" + variable[0]
149
+ elif wut == "video":
150
+ if r.media.document.size > 8 * 1000 * 1000:
151
+ return await eod(x, "`Unsupported Media`")
152
+ else:
153
+ dl = await bot.download_media(r.media)
154
+ variable = uf(dl)
155
+ os.remove(dl)
156
+ m = "https://telegra.ph" + variable[0]
157
+ else:
158
+ m = pack_bot_file_id(r.media)
159
+ if r.text:
160
+ add_goodbye(event.chat_id, r.message, m)
161
+ else:
162
+ add_goodbye(event.chat_id, None, m)
163
+ await eor(x, "`Goodbye note saved`")
164
+ elif r.text:
165
+ add_goodbye(event.chat_id, r.message, None)
166
+ await eor(x, "`Goddbye note saved`")
167
+ else:
168
+ await eod(x, "`Reply to message which u want to set as goodbye`")
169
+
170
+
171
+ @ultroid_cmd(pattern="cleargoodbye$")
172
+ async def clearwgb(event):
173
+ if not get_goodbye(event.chat_id):
174
+ await eod(event, "`No goodbye was set!`", time=5)
175
+ delete_goodbye(event.chat_id)
176
+ await eod(event, "`Goodbye Note Deleted`")
177
+
178
+
179
+ @ultroid_cmd(pattern="getgoodbye$")
180
+ async def listgd(event):
181
+ wel = get_goodbye(event.chat_id)
182
+ if not wel:
183
+ await eod(event, "`No goodbye was set!`", time=5)
184
+ msgg = wel["goodbye"]
185
+ med = wel["media"]
186
+ await event.reply(f"**Goodbye Note in this chat**\n\n`{msgg}`", file=med)
187
+ await event.delete()
188
+
189
+
190
+ @ultroid_bot.on(events.ChatAction())
191
+ async def _(event):
192
+ wel = get_goodbye(event.chat_id)
193
+ if wel:
194
+ if event.user_left or event.user_kicked:
195
+ user = await event.get_user()
196
+ chat = await event.get_chat()
197
+ title = chat.title if chat.title else "this chat"
198
+ pp = await event.client.get_participants(chat)
199
+ count = len(pp)
200
+ mention = f"[{get_display_name(user)}](tg://user?id={user.id})"
201
+ name = user.first_name
202
+ last = user.last_name
203
+ if last:
204
+ fullname = f"{name} {last}"
205
+ else:
206
+ fullname = name
207
+ uu = user.username
208
+ if uu:
209
+ username = f"@{uu}"
210
+ else:
211
+ username = mention
212
+ msgg = wel["goodbye"]
213
+ med = wel["media"]
214
+ userid = user.id
215
+ await event.reply(
216
+ msgg.format(
217
+ mention=mention,
218
+ group=title,
219
+ count=count,
220
+ name=name,
221
+ fullname=fullname,
222
+ username=username,
223
+ userid=userid,
224
+ ),
225
+ file=med,
226
+ )
227
+
228
+
229
+ HELP.update({f"{__name__.split('.')[1]}": f"{__doc__.format(i=HNDLR)}" + Note})
plugins/groups.py CHANGED
@@ -16,8 +16,7 @@
16
  """
17
 
18
 
19
- from telethon import events
20
- from telethon.tl import functions, types
21
  from telethon.tl.types import (ChannelParticipantsKicked, ChatBannedRights,
22
  UserStatusEmpty, UserStatusLastMonth,
23
  UserStatusLastWeek, UserStatusOffline,
@@ -35,7 +34,9 @@ async def _(event):
35
  p = 0
36
  (await event.get_chat()).title
37
  async for i in event.client.iter_participants(
38
- event.chat_id, filter=ChannelParticipantsKicked, aggressive=True
 
 
39
  ):
40
  try:
41
  await event.client.edit_permissions(event.chat_id, i, view_messages=True)
@@ -78,7 +79,7 @@ async def _(event):
78
  if "empty" in input_str:
79
  try:
80
  await event.client(
81
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
82
  )
83
  c += 1
84
  y -= 1
@@ -89,7 +90,7 @@ async def _(event):
89
  if "month" in input_str:
90
  try:
91
  await event.client(
92
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
93
  )
94
  c += 1
95
  m -= 1
@@ -100,7 +101,7 @@ async def _(event):
100
  if "week" in input_str:
101
  try:
102
  await event.client(
103
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
104
  )
105
  c += 1
106
  w -= 1
@@ -111,7 +112,7 @@ async def _(event):
111
  if "offline" in input_str:
112
  try:
113
  await event.client(
114
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
115
  )
116
  c += 1
117
  o -= 1
@@ -122,7 +123,7 @@ async def _(event):
122
  if "online" in input_str:
123
  try:
124
  await event.client(
125
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
126
  )
127
  c += 1
128
  q -= 1
@@ -133,7 +134,7 @@ async def _(event):
133
  if "recently" in input_str:
134
  try:
135
  await event.client(
136
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
137
  )
138
  c += 1
139
  r -= 1
@@ -144,7 +145,7 @@ async def _(event):
144
  if "bot" in input_str:
145
  try:
146
  await event.client(
147
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
148
  )
149
  c += 1
150
  b -= 1
@@ -155,7 +156,7 @@ async def _(event):
155
  if "deleted" in input_str:
156
  try:
157
  await event.client(
158
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
159
  )
160
  c += 1
161
  d -= 1
@@ -166,7 +167,7 @@ async def _(event):
166
  if "none" in input_str:
167
  try:
168
  await event.client(
169
- functions.channels.EditBannedRequest(event.chat_id, i, rights)
170
  )
171
  c += 1
172
  n -= 1
 
16
  """
17
 
18
 
19
+ from telethon.tl import functions
 
20
  from telethon.tl.types import (ChannelParticipantsKicked, ChatBannedRights,
21
  UserStatusEmpty, UserStatusLastMonth,
22
  UserStatusLastWeek, UserStatusOffline,
 
34
  p = 0
35
  (await event.get_chat()).title
36
  async for i in event.client.iter_participants(
37
+ event.chat_id,
38
+ filter=ChannelParticipantsKicked,
39
+ aggressive=True,
40
  ):
41
  try:
42
  await event.client.edit_permissions(event.chat_id, i, view_messages=True)
 
79
  if "empty" in input_str:
80
  try:
81
  await event.client(
82
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
83
  )
84
  c += 1
85
  y -= 1
 
90
  if "month" in input_str:
91
  try:
92
  await event.client(
93
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
94
  )
95
  c += 1
96
  m -= 1
 
101
  if "week" in input_str:
102
  try:
103
  await event.client(
104
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
105
  )
106
  c += 1
107
  w -= 1
 
112
  if "offline" in input_str:
113
  try:
114
  await event.client(
115
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
116
  )
117
  c += 1
118
  o -= 1
 
123
  if "online" in input_str:
124
  try:
125
  await event.client(
126
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
127
  )
128
  c += 1
129
  q -= 1
 
134
  if "recently" in input_str:
135
  try:
136
  await event.client(
137
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
138
  )
139
  c += 1
140
  r -= 1
 
145
  if "bot" in input_str:
146
  try:
147
  await event.client(
148
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
149
  )
150
  c += 1
151
  b -= 1
 
156
  if "deleted" in input_str:
157
  try:
158
  await event.client(
159
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
160
  )
161
  c += 1
162
  d -= 1
 
167
  if "none" in input_str:
168
  try:
169
  await event.client(
170
+ functions.channels.EditBannedRequest(event.chat_id, i, rights),
171
  )
172
  c += 1
173
  n -= 1