This is a Discord bot that generates Tebex coupons. It uses the discord.py library and the Tebex API.
- Slash Commands: The bot uses slash commands for easy interaction.
- Coupon Generation: The bot can generate Tebex coupons with a specific value.
- Permission Control: Only users with specific IDs are allowed to use the coupon generation command.
- Clone this repository.
- Install the required Python packages using pip:
pip install discord requests
- Replace the
bot_token
andtebex_secret
in the code with your Discord bot token and Tebex secret key respectively. (https://docs.tebex.io/plugin/authentication) - Replace the
allowed_user_ids
with the Discord user IDs that should be allowed to use the command. - Replace the
guild_id
with your Discord server's ID. - Replace the
currency
with the currency you use in your store. - Replace the
hex_color
with the color you wish to use on the left side of the embed. Example below. - Replace the
store_link
andimage_link
with the correct link to your store and how your checkout looks (if you wish). - Run the bot:
python main.py
Use the /generatecoupon
slash command in Discord to generate a new Tebex coupon. The command requires two parameters: value
(the value of the coupon) and note
(the note attached to the coupon).
This bot is designed for a specific use case and might not suit your needs out of the box. Feel free to modify the code to fit your requirements. All code that needs changing to suit your environment is under "CHANGE THESE" in the code.