Invite the Bot to your own server
Join Support Server
This bot can be used to check various information from Genshin Impact, Honkai Impact 3rd & Honkai Star Rail directly in Discord channels, including:
-
Query realtime in-game data
-
Genshin Impact:
Includes Resin, Realm Currency, Parametric Transformer, Expedition completion time, etc. -
Star Rail:
Includes Exploration Power, Commission Execution.
-
-
Daily automatic check-in for Hoyolab (includes check-ins for Genshin Impact, Honkai Impact 3rd, Star Rail & Tears of Themis).
-
Automatic checks for real-time expeditions (Genshin Impact, Star Rail), Resins, Realm Currency, Parametric Transformer, and Expedition completion. Sends reminders when they are close to being full/complete.
-
Check Spiral Abyss records, Forgotten hall records & Pure fiction records.
-
Check Traveler's Notes
-
Personal record card (days active, achievements, Anemoculi/Geoculi, world exploration progress, etc.)
-
Display the character showcase for any player in Genshin Impact/Star Rail, showing the builds of the showcased characters.
-
View in-game announcements for Genshin Impact, including events and gacha information.
-
Use the new slash commands with auto-suggest features. No need to memorize command usage.
genshin-discord-bot
├── assets = Folder for storing assets
| ├── font = Fonts used for drawing
| └── image = Images and background images used for drawing
├── cogs = Discord.py cog folder, containing all bot commands
├── cogs_external = Custom Discord.py cog folder,add your commands.
├── configs = Bot's Configuration file folder
├── database = SQLAlchemy ORM, database operation-related code
| ├── dataclass = Custom data classes
| └── legacy = Old database code used for data migration
├── enka_network = Code related to Enka Network API
| └── enka_card = Submodule, code related to drawing Enka images
├── genshin_db = Code related to genshin-db API
| └── models = Pydantic models for genshin-db data
├── genshin_py = Code related to genshin.py
| ├── auto_task = Code for automatic scheduled tasks(daily check-in)
| ├── client = Code for making requests to APIs
| └── parser = Code for converting API data into Discord embeds.
├── star_rail = Code for Star Rail showcase
└── utility = Code for utility functions used in this project.
You need to obtain the following in this step:
- Bot Application ID
- Bot Token
- Your Discord server ID
>>> Click to see the complete content <<<
-
Go to Discord Developer Portal and log in with your Discord account.
-
Click "New Application" to create an application. Enter the desired name and click "Create."
-
In OAuth2/URL Generator, check "bot," "applications.commands," and "Send Messages." The URL generated at the bottom is the invitation link for the bot. Open the link to invite the bot to your server.
-
For Windows/Linux :
-
Install Git & Python Version == 3.10.
-
clone this repository using:
git clone https://github.com/Lucifer7535/genshin-discord-bot.git
- Install pipenv to install required packages.
pip install pipenv
- Open command prompt inside the cloned genshin-discord-bot folder. It should look like
D:\Genshin-Discord-Bot>
, install the packages using
pipenv install
-
Use
pipenv shell
in the project folder path to run the virtual environment, after the packages are succesfully installed. -
It would look like this
(Genshin-Discord-Bot-4wfjLgXf) D:\Node\genshin-discord-bot>
where(Genshin-Discord-Bot-4wfjLgXf)
will be your environment name. -
Open the Utility\config.py file in a text editor. Fill in the Application ID, Server ID, and Bot Token obtained from the web browser. Save the file. Example:
- application_id: int = 1234567
- test_server_id: int = 1234567
- bot_token: str = "abcd12345"
-
Run the bot using
python main.py
-
-
Using Docker (Windows/Linux): [Recommended]
-
Install Docker
- For Windows install Docker Desktop.
- For Linux install Docker.
-
Create a new folder where you want to setup the bot. for e.g. create a new folder named
Genshin-Discord-Bot
. -
Download the docker-compose.yml file and place it in that folder you just created.
-
Open the
docker-compose.yml
file in a text editor. Fill in the Application ID, Server ID, and Bot Token obtained from the Web Browser. Save the file. Example:- application_id: int = 1234567
- test_server_id: int = 1234567
- bot_token: str = "abcd12345"
-
Open Command Prompt/Powershell/Terminal in this folder and enter the following command to run it. Make sure your Docker Desktop is running.
docker-compose up
-
-
For Android (termux):
-
Install Termux Monet based on your device's architecture.
-
Open the app and run these commands one by one after successfull execution of one after another.
pkg update & pkg upgrade
pkg install git
pkg install tur-repo
pkg install python-is-python3.10/tur-packages
pkg install libjpeg-turbo libpng libzmq freetype
pip install greenlet
- clone this repository using:
git clone https://github.com/Lucifer7535/genshin-discord-bot.git
- Install pipenv to install required packages.
pip install pipenv
- Open the folder using
cd genshin-discord-bot
and run
pipenv install
-
Use
pipenv shell
in the project folder path to run the virtual environment, after the packages are succesfully installed. -
It would look like this
(Genshin-Discord-Bot-4wfjLgXf)~genshin-discord-bot>
where(Genshin-Discord-Bot-4wfjLgXf)
will be your environment name. -
Open the Utility\config.py file using nano. Use command ```nano utility/config.py
-
Fill in the Application ID, Server ID, and Bot Token obtained from the web browser. Save the file. Example:
- application_id: int = 1234567
- test_server_id: int = 1234567
- bot_token: str = "abcd12345"
-
Upgrade the pillow package from version 9.5.0 due to some errors in android linux based OS.
pip install --upgrade pillow
- Run the bot using
python main.py
-
Note 1:
When the bot is running, and you see【System】on_ready: You have logged in as XXXXX, it means the parameters are set correctly, and the bot has started successfully. The bot will automatically sync all commands to your test server, known as "local sync."
Note 2:
If you can't see commands after typing /, try refreshing with CTRL + R or completely close and restart Discord.
Note 3:
To use the bot in multiple servers, type $jsk sync in the bot's DM and wait a few minutes for Discord to push the commands. This is known as "global sync."
Additionally, the bot includes the jsk command to load/reload modules, sync commands, execute code, etc. Refer to the jishaku documentation for more information.
To use jsk commands:
Use them in the bot's DM, for example: $jsk ping.
Tag the bot in a regular channel, for example: @bot_username jsk ping.
>>> Click to view screenshots <<<
SOURCE CODE:
API:
- Hoyolab: https://github.com/thesadru/genshin.py
- Discord: https://github.com/Rapptz/discord.py
- Enka Network: https://github.com/EnkaNetwork/API-docs
- Mihomo: https://march7th.xiaohei.moe/en/resource/mihomo_api.html
- Genshin-DB: https://github.com/theBowja/genshin-db
Card:
Misc: