7f1ae781fcfb6ae7b3b1743f1f8f249400526bdf
All checks were successful
Gitea CI / lint-and-test (push) Successful in 5s
Reddit Fix Please - Discord Bot
A configurable Discord bot that searches Reddit subreddits for specific queries and returns the top submission along with its top comments in clean embeds.
Features
- Reddit Search: Finds the most relevant "top" submission for a given subreddit and query.
- Rich Embeds: Displays the submission title, body, and top comments in easy-to-read Discord embeds.
- Interactive UI:
- Open Submission: Direct link button to the Reddit thread.
- Dismiss: Cleans up the bot's response and (optionally) the user's command message.
- Fully Configurable: Manage everything from tokens to UI colors via
config.json. - Uptime Kuma Integration: Support for push monitor heartbeats to track bot status.
Setup
Prerequisites
- Python 3.8+
- A Discord Bot Token (from Discord Developer Portal) (enable "Message Content Intent" for the bot)
Installation
-
Install the required dependencies:
pip install discord.py redditwarp -
Copy
config.example.jsontoconfig.json:cp config.example.json config.json -
Open
config.jsonand fill in yourbot_token.
Configuration Options
| Key | Description | Default |
|---|---|---|
bot_token |
Your Discord bot application token | 😬 |
prefix |
The character(s) used to trigger the bot | ; |
command_name |
The name of the search command | reddit |
comment_limit |
Number of top comments to display | 2 |
delete_user_message_on_dismiss |
Whether the Dismiss button deletes the user's message | true |
embed_color_submission |
Color of the main submission embed | blue |
embed_color_comments |
Color of the comment embeds | green |
uptime_kuma_url |
Uptime Kuma Push Monitor URL | "" |
uptime_kuma_interval |
Interval in seconds for heartbeats | 60 |
Usage
Start the bot:
python main.py
In Discord, use the configured command (default is ;reddit):
;reddit [subreddit] [query]
Example:
;reddit valorantechsupport van-57
Description
Languages
Python
100%