Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.61 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.61 KB

About ClearMessagesBot

The bot clears/deletes all the messages on a particular channel. The command for that is !clearMessages.

TODO

  1. Auto-delete messages as soon as they are some time units old. For example - delete messages which are 24 hours old.

Deploying the Bot to Heroku

Deploy Automatically

Deploy

Note - Go to the heroku app page and change the running dyno from web to worker.

Deploy Manually

Run the following commands to deploy the bot manually on Heroku

  • Create a git clone - git clone https://github.com/praneetsharma/ClearMessagesBot-Discord
  • Go to the local repo directory - cd ClearMessagesBot-Discord
  • Create heroku app - heroku create clear-messages-bot-discord
  • Set the buildpack for created app - heroku buildpacks:set heroku/nodejs
  • Push the app to heroku - git push heroku master
  • Start the bot app - heroku ps:scale worker=1

Installation

  • Node.js 6.0.0 or newer version is required.
  • Install discord.js: npm install discord.js

Adding the Bot on a Discord Channel

Running the Bot

To start the bot, run the following command: node clear-messages.js