AdvertBot is a modular, easy-to-use Discord bot that sends random advertisements to a specific channel at regular intervals. It allows for user-friendly advertisement management, with role-based permissions to add new adverts directly from Discord.
- Scheduled Ads: Sends a random advertisement from a text file every hour.
- Role-Based Management: Users with the
Advert Managerrole can easily add new ads via commands. - Modular Cog System: Built using the cog system, making it easy to extend functionality.
- Customizable: Easy to configure and adapt to your needs.
- Python 3.8+
- Discord bot token (can be obtained from the Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/jmspdrrt/AdvertBot.git -
Navigate into the project directory:
cd AdvertBot -
Install the required dependencies:
pip install -r requirements.txt -
Create a .env file in the root directory and add your bot token:
DISCORD_TOKEN=your-bot-token-here -
Run the bot:
Bot.py
Once the bot is running, it will automatically send random ads from the adverts.txt file to the designated channel every hour.
-
Add Advert: Users with the
Advert Managerrole can add new adverts by typing:!add_advert Your new advert text
-
Adverts File: The bot reads from the
adverts.txtfile. Each line represents a new advert. -
Channel ID Configuration: In
advertisement.py, set the channel ID to the one where you'd like adverts to be sent:channel = self.bot.get_channel(YOUR_CHANNEL_ID) -
Role-Based Access: To modify who can add adverts, make sure the users have the role
Advert Managerin your Discord server.
We welcome contributions! Here's how you can help:
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
git checkout -b feature-branch-name -
Make your changes.
-
Submit a pull request explaining your changes.
Stay connected and follow the progress of AdvertBot!
- Discord [Coming Soon]
- Twitter Follow me!
This project is licensed under the MIT License - see the LICENSE file for details.
If you like AdvertBot, consider giving this repository a ⭐️ and sharing it with your friends! Contributions are always appreciated.