SHIFT Codes BL4 Bot is a Python-based Discord bot developed to automatically collect, process, and distribute SHiFT codes related to Borderlands 4. The bot runs continuously on a Linux server and is designed as a long-lived background service.
The core logic of the project is implemented in Python and structured around asynchronous tasks. These tasks periodically monitor multiple official sources (such as publisher communications and SHiFT-related announcements) as well as community-driven sources. Retrieved data is parsed, normalized, and compared against an internal state to detect new or previously unannounced SHiFT codes.
When a new code is detected, the bot publishes it to Discord using the Discord API, leveraging embed messages to ensure clarity and consistency. Duplicate codes and expired entries are filtered automatically to prevent unnecessary notifications. The bot also includes basic persistence mechanisms to keep track of previously processed codes and runtime state.
Beyond automated notifications, the bot features an interactive Discord mini-game called Vault Hunt. This mini-game allows users to interact with the bot through commands, participate in randomized reward mechanics, and maintain user-specific progression data. The Vault Hunt system is fully handled server-side and demonstrates additional gameplay logic, state management, and command-driven interactions within Discord.
Click the link below to invite the bot to your Discord server:
Make sure you have administrator permissions in your server to add the bot.
The bot uses slash commands (/) for configuration and help:
| Command | VALUE | Description | Usage |
|---|---|---|---|
/setchannel |
Set the channel to receive SHiFT codes | Admin | |
/setlang |
en - fr | Set the language of the bot for this server | Admin |
/vaultopt |
incl - excl | Incl or Excl this server from the Vault Hunt event | Admin |
/codes |
Display the list of non-expired SHiFT codes | Everyone | |
/vault |
Participate in the Vault Hunt event! | Everyone | |
/checkcode |
code | Check the status of a specific SHiFT code | Everyone |
/help |
Show all available commands | Everyone |