64 lines
2.1 KiB
Markdown
64 lines
2.1 KiB
Markdown
# 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](https://discord.com/developers/applications)) (enable "Message Content Intent" for the bot)
|
|
|
|
### Installation
|
|
|
|
1. Install the required dependencies:
|
|
```bash
|
|
pip install discord.py redditwarp
|
|
```
|
|
|
|
2. Copy `config.example.json` to `config.json`:
|
|
```bash
|
|
cp config.example.json config.json
|
|
```
|
|
|
|
3. Open `config.json` and fill in your `bot_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:
|
|
```bash
|
|
python main.py
|
|
```
|
|
|
|
In Discord, use the configured command (default is `;reddit`):
|
|
```text
|
|
;reddit [subreddit] [query]
|
|
```
|
|
|
|
**Example:**
|
|
`;reddit valorantechsupport van-57`
|