-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated Telegram Bot Structure to include API and user interface fโฆ
โฆrom Telegrambot 1.1 (#3) ## ๐ Pull Request Title Integrated Telegram Bot Structure to include API and user interface from Telegrambot 1.1 ## โจ Description Added new features between the Jikan API and Python-Telegram-Bot. Fixed an issue with Googletrans, which is used for translation to Spanish, English, French, Italian, Russian, Hindi, etc. This bot can send the following information about anime: * Title (translated) * Japanese title * Type (TV, OVA, etc.) * Genre (refer to the readme.md) * Episodes * Score * Rating * Status * Synopsis --------- For Hentai or Erotica requests, the picture is sent in spoiler format. Additionally, thereโs a JSON file for uploading IDs by gender (please donโt run this script, as it takes about 8 hours to finish and will overwrite the main JSON file). ### Working on ๐งฐ โ๏ธ Weโre also working on comparing the local database with the Jikan database to provide links to anime websites. ## ๐ Related Issue None ## โ Checklist - [x] **I have tested these changes locally.** ๐งช - [x] **I have updated the documentation (if necessary).** ๐ - [x] **~I have added relevant tests (if applicable).~** ๐งฉ - [x] **I have assigned reviewers.** ๐ฅ @AlejoCM03 - [x ] **I have resolved any merge conflicts.** ๐ ## ๐ธ Screenshots Description | Screenshot | Description | Screenshot | :-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: Start screen of the Bot | <img src="https://github.com/user-attachments/assets/20533ecb-fea9-459a-985d-a06fec613c5b" width="200" />|/start command | <img src="https://github.com/user-attachments/assets/ae26ee26-302c-400a-baf8-fccd5ad7faf5" width="200"/> Menu of the Bot | <img src="https://github.com/user-attachments/assets/468be224-94aa-4259-8700-ddfb783ebf3e" width="200" />|/language command | <img src="https://github.com/user-attachments/assets/41a4e435-26b9-4eb1-87fd-7de212afbe34" width="200"/> /request + [anime name] command| <img src="https://github.com/user-attachments/assets/36a66250-0411-4e6a-9ddc-b6ee9fca7185" width="200" />|/random command | <img src="https://github.com/user-attachments/assets/08b5058e-86e7-496e-bbda-9ef4b6d4112c" width="200"/> /hoshii + [gender] command| <img src="https://github.com/user-attachments/assets/22765567-2b86-41f8-9c21-c597d0bbfa0e" width="200" />|/hoshii "(hentai/Erotica)" command (The bot doesn't show the picture) | <img src="https://github.com/user-attachments/assets/123c5a24-c980-41fe-9ba6-b8b369c454f2" width="200"/> /help command| <img src="https://github.com/user-attachments/assets/b1a77682-05bd-4882-b6b3-5e6234750dd9" width="200" />| |
- Loading branch information
Showing
13 changed files
with
32,022 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,165 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
#This directory | ||
hoshibot-env/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ |
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,42 @@ | ||
# ๐ธ Contributing to hoshiiTelegramBot ๐ธ | ||
|
||
First off, thanks for taking the time to contribute! ๐ Your help is much appreciated! ๐ | ||
|
||
The following is a set of guidelines for contributing to **hoshiiTelegramBot**. These are mostly guidelines, not strict rules. Use your best judgment, and feel free to propose changes to this document in a pull request. ๐ | ||
|
||
## ๐ How Can I Contribute? | ||
|
||
### ๐ Reporting Bugs | ||
|
||
Help us improve by reporting bugs effectively! ๐ | ||
- **Ensure the bug was not already reported** by searching on GitHub under Issues. ๐ | ||
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. โจ | ||
|
||
### ๐ Suggesting Enhancements | ||
|
||
Got an idea to make things better? Let us know! ๐ก | ||
- **Ensure the enhancement was not already suggested** by searching on GitHub under Issues. ๐ | ||
- If you're unable to find an open issue addressing the enhancement, open a new one. Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior. โจ | ||
|
||
### ๐ธ Pull Requests | ||
|
||
Ready to make some changes? Follow these steps! ๐ผ | ||
- **Fork** the repository. ๐ด | ||
- **Clone** your fork: `git clone https://github.com/your-username/[your-repo].git` ๐ | ||
- **Create a branch**: `git checkout -b my-branch` ๐ฟ | ||
- **Make your changes**. ๐ ๏ธ | ||
- **Commit your changes**: `git commit -m 'Add some feature'` ๐ฌ | ||
- **Push to the branch**: `git push origin my-branch` ๐ | ||
- **Submit a pull request**: open a pull request. ๐ | ||
|
||
## ๐ Code of Conduct | ||
|
||
This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected]. ๐ซ | ||
|
||
## ๐ License | ||
|
||
By contributing, you agree that your contributions will be licensed under the AGPL-3.0 License. ๐ | ||
|
||
--- | ||
|
||
Thank you for being awesome! ๐ Your contributions make this project better! ๐ |
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,105 @@ | ||
<p align="center"> | ||
<img src="img/logo_draf.png" alt="Kawaii Bot" width="200px"/> | ||
</p> | ||
|
||
<h1 align="center">๐ธ hoshiiTelegramBot ๐ธ</h1> | ||
|
||
<p align="center"> | ||
<img src="https://img.shields.io/badge/version-1.1..0-brightgreen" alt="Version" /> | ||
<img src="https://img.shields.io/badge/license-AGPL3.0-blue?style=flat&color=blue" alt="License" /> | ||
<img src="https://img.shields.io/badge/test-passed-pass?style=flat&color=red" alt="Build" /> | ||
</p> | ||
|
||
Welcome to the **hoshiiTelegramBot**! This adorable Telegram bot fetches anime and manga details from various APIs, including Jikan API and Google. It supports multiple languages and provides personalized! ๐ | ||
|
||
## ๐ Features | ||
|
||
- Fetches detailed information about anime and manga from Jikan API and Google. | ||
- Supports multiple languages for a global audience. | ||
- Provides personalized recommendations based on your preferences. | ||
- Cute and user-friendly interface for the best experience. | ||
|
||
## ๐ ๏ธ Installation | ||
|
||
> [!TIP] | ||
> Use a virtual environment. Don't know how to create one? Let me show you how to create it. ๐ Click here **[documentation](https://docs.python.org/3/library/venv.html)**. | ||
> [!NOTE] | ||
> Previously, you should have created your Telegram Bot. Please, If you don't do it yet, check the official **[documentation](https://core.telegram.org/bots#how-do-i-create-a-bot)** ๐ค. | ||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/Hoshimya-Animation/hoshiTelegramBot | ||
cd hoshiTelegramBot | ||
``` | ||
|
||
2. Install the required dependencies: | ||
```bash | ||
pip3 install -r requirements.txt | ||
``` | ||
3. Open the file **main.py** and replace your Telegram Token of your Bot on ```TELEGRM_TOKEN```, i.e. ```"123+2"``` . | ||
|
||
4. Run the bot: ๐ค | ||
```bash | ||
python main.py | ||
``` | ||
|
||
## ๐ Usage | ||
|
||
Add the bot to your Telegram and start chatting with it! Use the following commands to get started: | ||
|
||
- `/start` - The bot starts โ^ >ใฎ<^โ .แ. kawaii journey! | ||
- `/language`- Change language of the Bot ๐ช๐ธ โก๏ธ ๐ฌ๐ง (Available in Spanish, English, French, Italian, Traditional Chinese, Japanese, Hindi, German, Arabic, Romanian, and Korean) | ||
- `/request [name]` - Request a new anime from our database (still in progress) or if it's available on MyAnimeList list ๐ (Japanese or English). | ||
- `/random` - Random information about an anime ๐ฒ | ||
- `/hoshii [gender]` - Anime suggestion by the gender ๐๐ฑ (Action, Comedy, Horror, Sports, Adventure, Drama, Mystery, Supernatural, Avant Garde, Fantasy, Romance,Suspense, Award Winning, Girls Love, Sci-Fi, Boys Love,Gourmet, Slice of Life, Ecchi, Erotica, Hentai). | ||
- `/help` - Give you information about my functions ๐โ. | ||
## ๐ง Configuration | ||
> [!NOTE] | ||
> If you run ```main.py``` the interpreter shows you this message ```AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport``` | ||
> [!IMPORTANT] | ||
> Googletrans has an important issue nowadays. HTTPX package version for Googletrans is 0.13.0, on other hand, Python-Telegram-Bot requires the version 0.27.0. Therefore there is a problem. However, you can fix temporaly this issue. | ||
- In a new terminal use this command | ||
```bash | ||
pip list -v | ||
``` | ||
> [!NOTE] | ||
> This command shows you all packages installed with pip. | ||
- Then, search for the package *googletrans*๐ค, go to the path where it's installed, and **ONLY MODIFY** โ ๏ธ the file ***client.py***. In this file, on line 62, you can comment it out and below it, type this: | ||
```python | ||
proxies: typing.Dict[str, httpcore.AsyncHTTPProxy] = None, | ||
``` | ||
- Finally, save the document. ๐ | ||
## ๐ License | ||
This project is licensed under the AGPL-3.0 License. See the [LICENSE](LICENSE) file for more details. | ||
## ๐ Contributing | ||
We welcome contributions from the community! Please read the [CONTRIBUTING](CONTRIBUTING.md) file for guidelines on how to contribute to this project. | ||
## ๐ Acknowledgements | ||
A big thank you to the developers of the Jikan API and Google for providing the data that makes this bot possible. | ||
## ๐ฌ Contact | ||
If you have any questions or suggestions, feel free to open an issue or reach out to us at [[email protected]](mailto:[email protected].). | ||
<p align="center"> | ||
<img src="img/logo_draf2.png" alt="Kawaii Bot2""/> | ||
</p> | ||
<p align="center"> | ||
Made with ๐ by <a href="https://github.com/Hoshimya-Animation">Hoshimya Animation</a>, <a href="https://github.com/JohnKun136NVCP">John </a> | ||
</p> |
Oops, something went wrong.