A simple bot to fetch and display product details from the End website.
Above: An example of the bot fetching product details and displaying them in Discord.
First, clone the repository to your local machine:
git clone https://github.com/ceodavee/end-stock.git
cd <your-repo-directory>
Ensure you have Python 3.x installed. Then, set up a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
Install the required packages:
pip install -r requirements.txt
Open config.json
in a text editor. Fill in the required fields:
BOT_TOKEN
: Your bot's token which can be obtained from the Discord Developer Portal.DISCORD_GUILD_ID
: Your Discord guild ID / Server ID. YouTube Tutorial- Other configurations like
COLOUR
,URL
,LOGO
, andNAME
as per your requirements.
With everything set up, run the bot using:
python main.py
The bot should now be running and ready to accept commands.
To use the bot, you need to create a Discord bot and invite it to your server:
- Go to the Discord Developer Portal and create a new application.
- Under the "Bot" section, click "Add Bot" to create a bot user.
- Copy the bot token and paste it into the
BOT_TOKEN
field inconfig.json
. - Navigate to the "OAuth2" section and select the "bot" scope. Scroll down and select the permissions required for the bot (at least "Send Messages" and "Embed Links"). Copy the generated invite link.
- Open the invite link in your browser and select the server you want to invite the bot to. Follow the prompts to complete the invitation.
To use the bot in Discord, invoke the link
command and pass in a product URL to fetch its details:
/link <product-url>
The bot will display an embed with product details fetched from the End website.
If you encounter any issues or would like to contribute to this project, feel free to open an issue or submit a pull request.