Skip to content

Telegram Bot with asyncio python 3 MProto library to interact with Telegram's API.

License

Notifications You must be signed in to change notification settings

aryazakaria01/CodeX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeXuser


TGVC [PyTGCalls] Mentioned in Awesome Telegram Calls

About

What is Codex ?
Codex is a Robot with asyncio python 3 MProto library to interact with Telegram's API as a user or through a bot account (bot API alternative). Codex based using Telethon Developed by [ LonamiWebs ]



Function Codex is very useful for purposes in the telegram application, it can be for personal use or managing a group.

Note: If you are already using codex, don't forget to read our disclaimer, thank you.




CODE OF CONDUCT

1. Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.



2. Our Standards

Examples of behavior that contributes to creating a positive environment include:

• Using welcoming and inclusive language.
• Being respectful of differing viewpoints and experiences.
• Gracefully accepting constructive criticism.
• Focusing on what is best for the community.
• Showing empathy towards other community members.

Examples of unacceptable behavior by participants include:

• The use of sexualized language or imagery and unwelcome sexual attention or advances.
• Trolling, insulting/derogatory comments, and personal or political attacks.
• Public or private harassment.
• Publishing others' private information, such as a physical or electronic address, without explicit permission.
• Other conduct which could reasonably be considered inappropriate in a professional setting.



3. Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.



4. Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.



5. Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.


Codex Stuff

Get Stuffs

Following are the materials for using Codex (Bot)



Get STRING_SESSION

(Telethon) No Using API_ID & API_HASH

👇🏻 Click

generate_string


(Pyrogram & Telethon) Using API_ID & API_HASH

👇🏻 Click

generate_string


Get String Using Termux _>
For the first time, please copy below first.

pkg update -y && pkg upgrade && pkg install wget python


Telethon & Pyrogram (P for Pyrogram and T for Telethon)

pip install telethon && wget https://raw.githubusercontent.com/Codex51/Codex/master/mainstring.py && python mainstring.py


Get ARQ_API_KEY

Please go to telegram, and search for @ARQRobot or click 👉🏼 https://t.me/ARQRobot , First of all, click start and select get_key, then give it any name, done.


Get TG_BOT_TOKEN

Please go to telegram, and search for @BotFather or click 👉🏼 https://t.me/BotFather , then create your bot name and your bot username, then type /mybots then press your bot name then select API TOKEN, then copy your bot token and fill it in vars.


Get HEROKU_API_KEY

First of all create your heroku account, if you have completed registration, please go to settings on heroku, then look for the one that says API Key then press reveal, done.


Get API_HASH & API_ID

First of all, please go to 👉🏼 https://my.telegram.org Then enter your Telegram account mobile number. If so, please enter the code that has been sent via telegram. Then click API development tools, and fill in. Done


How to Deployment ?


Don't forget to take a look at the enforcement variables, in Codex Stuffs or in the example config file.


Deploy using Heroku

Deploy using heroku, and don't forget to register first.

👇🏻 Click

go_heroku




Self Host

1. First of all, update and upgrade apt :

sudo apt update && sudo apt upgrade -y


2. And then install the required apt packages:

sudo apt install --no-install-recommends -y curl git libffi-dev libjpeg-dev libwebp-dev python3-lxml python3-psycopg2 libpq-dev libcurl4-openssl-dev libxml2-dev libxslt1-dev python3-pip python3-sqlalchemy openssl wget python3 python3-dev libreadline-dev libyaml-dev gcc zlib1g ffmpeg libssl-dev libgconf-2-4 libxi6 unzip libopus0 libopus-dev python3-venv libmagickwand-dev pv tree mediainfo


If you wanna use local database then follow this steps else skip to step 8

Install requirements for this by

sudo apt install postgresql postgresql-contrib


3. Change the user to postgres to change the default ident password:

sudo su - postgres


4. And then open the PostgreSQL shell:

psql


5. Set any password you prefer, by running the below SQL:

ALTER USER postgres WITH PASSWORD 'yourpasswordhere';


6. Get out of the PostgreSQL shell:

\q


7. And go back to your user:

exit


Now, the DB_URI will be:

postgresql://postgres:yourpasswordhere@localhost:5432/Codex

or use elephantsql if you wanna use that


8. Clone the repository:

git clone https://github.com./Codex51/Codex


9. Change dir to the cloned folder:

cd codexuser


10. Create your config.py.

by renaming the exampleconfig.py

mv exampleconfig.py config.py

you can get string session by running python3 stringsetup.py before running that install telethon by pip3 install telethon

11. Create a new screen:

Either tmux or screenfor screen

sudo apt install screen

screen -S usercodex for tmux

sudo apt install tmux

tmux


12. And a virtual environment:

virtualenv venv


13. Activate the virtual environment you've just created:

source venv/bin/activate


14. And install the Python requirements:

pip3 install -r requirements.txt


15. Finally, run the usercodex:

python3 -m usercodex

16. And get out of your screen

by pressing CTRL+A and after that CTRL+D. (if you used screen) or CTRL+B and then D (if you use tmux)

Disclaimer

Details


                 ⚠️ WARNING FOR YOU ⚠️
          Your Telegram account may get banned.
    I am not responsible for any improper use of this bot
 This bot is intended for the purpose of having fun with memes,
         as well as efficiently managing groups.
 You ended up spamming groups, getting reported left and right,
and you ended up in a Finale Battle with Telegram and at the end
           Telegram Team deleted your account?
     And after that, then you pointed your fingers at us
           for getting your acoount deleted?
      I will be rolling on the floor laughing at you.

FYI

This repository has been approved by Jisan09 (badcat)

Special Credits ©

Sparkline

License

Codex is License under The 3-Clause BSD License

About

Telegram Bot with asyncio python 3 MProto library to interact with Telegram's API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages