forked from UsergeTeam/Userge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added reacts Signed-off-by: rking32 <[email protected]> * fixed help! fixed help shit :| fixed reacts to working without dot fixed notes for new help added new plugins called convert and type fixed header for more clean Signed-off-by: rking32 <[email protected]> * add admin moduel * so far no fixes FFS * fix promote func + added more bugs to fix * added demote func + more bugs * Added gdrive plugin beta XD small fixes added gdrive.py fixed gdrive progress fixed gdrive (bit stable) Optimized Gdive added .gdel and .gempty commands added Custom Exception added .gset and .greset commands added .gget commend added permission commands added .gcopy fixed creds.refresh error added .gdown command ( support files and folders ) added Aptfile added .gls command set logging level added .gmove and make .gcopy can copy folders fixed get_file_id :p added force search option * small fixes XD Signed-off-by: rking32 <[email protected]> * updated dev ;p is CREDS object ? small fixes added zip plugin * added channel logger shit :B fixed NoneType error added channel logger fixed channel logger and rebuild base class :P Signed-off-by: rking32 <[email protected]> * edited README.md Signed-off-by: rking32 <[email protected]> Co-authored-by: K-E-N-W-A-Y <[email protected]>
- Loading branch information
1 parent
f98e562
commit ab260fd
Showing
26 changed files
with
2,677 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,3 +136,5 @@ config.env | |
*.session | ||
rn | ||
log.txt | ||
gen | ||
unknown_errors.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,87 @@ | ||
<p align="center"> | ||
<a href="https://github.com/uaudith/Userge"> | ||
<img src="resources/userge(8).png" alt="Userge"> | ||
</a> | ||
<br> | ||
<b>Pluggable Telegram UserBot</b> | ||
<br> | ||
<a href="https://github.com/uaudith/Userge#inspiration">Inspiration</a> | ||
 •  | ||
<a href="https://github.com/uaudith/Userge#features">Features</a> | ||
 •  | ||
<a href="https://github.com/uaudith/Userge#example-plugin">Example</a> | ||
 •  | ||
<a href="https://github.com/uaudith/Userge#requirements">Requirements</a> | ||
 •  | ||
<a href="https://github.com/uaudith/Userge#project-credits">Project Credits</a> | ||
 •  | ||
<a href="https://github.com/uaudith/Userge#copyright--license">Copyright & License</a> | ||
</p> | ||
|
||
# Userge | ||
Yet another telegram `userbot` | ||
|
||
![userge](resources/userge(8).png) | ||
> **Userge** is a Powerful , _Pluggable_ Telegram UserBot written in _Python_ using [Pyrogram](https://github.com/pyrogram/pyrogram). | ||
## Inspiration | ||
|
||
> This project is inspired by the following projects :) | ||
* [tg_userbot](https://github.com/watzon/tg_userbot) (heavily) | ||
* [PyroGramUserBot](https://github.com/SpEcHiDe/PyroGramUserBot) | ||
* [Telegram-Paperplane](https://github.com/RaphielGang/Telegram-Paperplane) | ||
* [UniBorg](https://github.com/SpEcHiDe/UniBorg) | ||
|
||
> Special Thanks to all of you !!!. | ||
## Features | ||
|
||
* Powerful and Very Usefull build in plugins | ||
* Channel log support | ||
* Database support | ||
* Easy to setup | ||
* Easy to use | ||
* Easy to add plugins | ||
* Improved user friendliness of plugins | ||
|
||
## Example Plugin | ||
|
||
```python | ||
from userge import userge, Message | ||
|
||
LOG = userge.getLogger(__name__) # logger object | ||
CHANNEL = userge.getCLogger(__name__) # channel logger object | ||
|
||
@userge.on_cmd("test", about="help text to this command") # adding handler and help text to .test command | ||
async def testing(message: Message): | ||
LOG.info("starting test command...") # log to console | ||
await message.edit("testing...", del_in=5) # this will be automatically deleted after 5 sec | ||
CHANNEL.log("testing completed!") # log to channel | ||
``` | ||
|
||
## Requirements | ||
|
||
* Python 3.8 or Higher | ||
* Telegram [API Keys](https://my.telegram.org/apps) | ||
* MongoDB [Database URL](https://cloud.mongodb.com/) | ||
* Google Drive [API Keys](https://console.developers.google.com/) | ||
|
||
## How To Deploy | ||
|
||
> If you are using [HEROKU](https://www.heroku.com/) simply click the button below. | ||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/uaudith/Userge) | ||
|
||
> TODO: add Docker Support. | ||
### Project Credits | ||
|
||
## How to deploy ? | ||
- something | ||
- blah blah | ||
### project credits | ||
[@gotstc](https://t.me/gotstc), [@uaudIth](https://t.me/uaudIth), [@kenway](https://t.me/K_E_N_W_A_Y) and [@nawwa](https://t.me/nawwasl) | ||
* [Specially these projects](https://github.com/uaudith/Userge#inspiration) | ||
* [@uaudIth](https://t.me/uaudIth) | ||
* [@K_E_N_W_A_Y](https://t.me/K_E_N_W_A_Y) | ||
* [@nawwasl](https://t.me/nawwasl) | ||
* [@gotstc](https://t.me/gotstc) | ||
|
||
### Copyright & License | ||
|
||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/uaudith/Userge) | ||
* Copyright (C) 2020 [@SLBOTS](https://t.me/slbotsupdates) | ||
* Licensed under the terms of the [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007](https://github.com/uaudith/Userge/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,10 @@ | ||
from typing import Dict | ||
from pyrogram import Message | ||
import nest_asyncio | ||
from userge.utils import logging | ||
from pyrogram import Client | ||
|
||
|
||
class Base: | ||
class Base(Client): | ||
""" | ||
Base Class for Client and Message. | ||
Base Class for Userge. | ||
""" | ||
|
||
_MAIN_STRING = "<<<! ##### ___{}___ ##### !>>>" | ||
_SUB_STRING = "<<<! {} !>>>" | ||
_LOG = logging.getLogger(__name__) | ||
_NST_ASYNC = nest_asyncio | ||
|
||
def _msg_to_dict(self, | ||
message: Message) -> Dict[str, object]: | ||
|
||
kwargs_ = vars(message) | ||
del message | ||
|
||
del kwargs_['_client'] | ||
|
||
if '_Message__filtered_input_str' in kwargs_: | ||
del kwargs_['_Message__filtered_input_str'] | ||
|
||
if '_Message__flags' in kwargs_: | ||
del kwargs_['_Message__flags'] | ||
|
||
if '_Message__kwargs' in kwargs_: | ||
del kwargs_['_Message__kwargs'] | ||
|
||
return kwargs_ | ||
def getCLogger(self, name: str): | ||
pass |
Oops, something went wrong.