https://github.com/susmita-dey/post-bot
https://github.com/susmita-dey/post-bot
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/susmita-dey/post-bot
- Owner: Susmita-Dey
- License: gpl-3.0
- Created: 2024-05-15T05:19:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T21:06:33.000Z (over 1 year ago)
- Last Synced: 2024-11-17T22:32:18.357Z (11 months ago)
- Language: Python
- Homepage: https://post-bot-rk14.onrender.com/
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ManoBot: Discord Embed Bot
This Discord bot allows users with a specific role to post messages as embeds to predefined channels or any specified channel using different commands. The bot includes commands for posting job and service announcements, as well as a flexible command for posting to any channel.
## Features
- Post job announcements to a predefined channel.
- Post service offerings to a predefined channel.
- Post embed messages to any specified channel with a custom title and message.## Commands
### /postjob
Posts a job announcement to the predefined job channel.
**Usage:**
```
/postjob
```**Example:**
```
/postjob "We are hiring a new software developer!"
```### /postservices
Posts a service offering to the predefined service channel.
**Usage:**
```
/postservices
```**Example:**
```
/postservices "Offering web development services at competitive prices."
```### /post
Posts an embed message to any specified channel with a custom title and message.
**Usage:**
```
/post #channelname
```**Example:**
```
/post #channelname "Title" "Message content goes here."
```## Setup
### Prerequisites
- Python 3.6+
- Discord account and server where the bot will be used### Installation
1. **Clone the repository:**
```sh
git clone https://github.com/Susmita-Dey/post-bot.git
cd post-bot
```2. **Create a virtual environment and activate it:**
```sh
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```3. **Install dependencies:**
```sh
pip install -r requirements.txt
```4. **Create a `.env` file and add your environment variables:**
```sh
DISCORD_BOT_TOKEN=your_bot_token
ALLOWED_ROLE_ID=role_id
JOB_CHANNEL_ID=job_channel_id
SERVICE_CHANNEL_ID=service_channel_id
```### Running the Bot
1. **Start the bot:**
```sh
python bot.py
```### Deploying the bot
Create an account on Render. Install Render on your git repository and hit deploy## Permissions
Ensure the bot has the following permissions in your Discord server:
- Send Messages
- Embed Links
- Manage Roles (if you want the bot to verify roles)## Troubleshooting
- **Bot not responding to commands:**
- Check that the bot has the required permissions.
- Verify that the environment variables are correctly set.
- Ensure the bot is running and connected to the Discord server.- **Environment variable errors:**
- Ensure all necessary environment variables are set in the `.env` file.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.