Skip to content

This is a simple discordbot, that publishes all messages in announcement channels he has access to.

License

Notifications You must be signed in to change notification settings

Serpensin/DiscordBots-AutoPublisher

Repository files navigation

Discord Auto Publisher Discord Bot InviteDiscord Bots

Automatically publish messages or news in your announcement channels!

A bot that will automatically publish every new message in your announcement/news channels to other servers who follow it. An excellent solution for servers who rely on bots (such as RSS feeds) or webhooks to publish their news, allowing your moderators to get some rest from manual publishing.

The bot features no commands because the setup is really easy!

Setup

Classic Method

  1. Ensure Python 3.11 is installed. Download it here.
  2. Clone this repository or download the zip file.
  3. Open a terminal in the cloned folder where you cloned the repository or extracted the zip file.
  4. Run pip install -r requirements.txt to install the dependencies.
  5. Open the file ".env.template" and complete all variables:
    • TOKEN: The token of your bot. Obtain it from the Discord Developer Portal.
    • OWNER_ID: Your Discord ID.
    • PUBLISH_DELAY_SECONDS: (Optional) Delay in seconds before publishing messages. Defaults to 10. Useful for preventing rate limiting issues.
  6. Rename the file ".env.template" to ".env".
  7. Run python3 main.py or python main.py to start the bot.

Docker Method

Docker Compose Method

If you have cloned the repository, you will find a docker-compose.yml file in the folder.

  1. Make sure Docker and Docker Compose are installed. Download Docker here and Docker Compose here.

  2. Navigate to the folder where you cloned the repository or extracted the zip file.

  3. Open the docker-compose.yml file and update the environment variables as needed (such as TOKEN, OWNER_ID, and optionally PUBLISH_DELAY_SECONDS).

  4. In the terminal, run the following command from the folder to start the bot: docker-compose up -d

Docker Run

  1. Ensure Docker is installed. Download it from the Docker website.
  2. Open a terminal.
  3. Run the bot with the command below:
    • Modify the variables according to your requirements.
    • Set the TOKEN, and OWNER_ID.

Run the bot

docker run -d \
-e TOKEN=BOT_TOKEN \
-e OWNER_ID=DISCORD_ID_OF_OWNER \
-e PUBLISH_DELAY_SECONDS=10 \
--name AutoPublisher \
--restart any \
-v autopublisher_log:/app/AutoPublisher/Logs \
ghcr.io/serpensin/discordbots-autopublisher:latest

Keep in mind...

  • The bot can only publish 10 messages per hour per channel (just as users), this is rate limited by Discord!
  • If you want to temporarily stop the bot from publishing messages in any of your announcement channels, just disable its' View Channel permission in a desired channel and enable it back when you're ready.
  • You should run the /permissions command to see the permissions the bot needs to work properly. (View Channel, Send Messages, Manage Messages and Read Message History)

About

This is a simple discordbot, that publishes all messages in announcement channels he has access to.

Resources

License

Stars

Watchers

Forks

Packages