Giter Site home page Giter Site logo

discord-rules-bot's Introduction

Discord-Rules-Bot

Setup

In order to set up this Discord bot, you must first create a file named "token.json" and insert yor bot token into it in a structure similar to the following:

{
    "token": "<your token here>"
}

Next, you'll want to modify "botconfig.json" to properly reflect the configuration for your server including the command that will be used to accept and the role that will be applied once accepted.

Finally, you'll want to set up and run the bot utilizing the following commands:

npm install
node index.js

As an alternative, the following is a decent command to run it on Linux inside of a screen (adjusting paths as needed).

screen -S DiscordRulesBot -m /usr/bin/nodejs /u01/Discord-Rules-Bot/index.js

Note that, if you're using Linux, you may have to follow the "Installing Node.js from the NodeSource repository" instructions here: https://linuxize.com/post/how-to-install-node-js-on-ubuntu-18.04/

And if all went well, the bot should be up and running!

Permissions

Because this bot will delete messages to keep the rules channel clean, and automatically apply roles, you should make sure that you add it to a role with at lesat the following permissions:

  • Manage Roles
  • Manage Messages

Also, make sure that the role is higher than the "Accepted Rules" role that you will be having it manage.

Development/Debugging

Debugging is surprisingly easy, but I want to record it here just in case it's needed in the future.

  1. Open the project in Visual Studio Code
  2. Go to File -> Preferences -> Settings
  3. Search for "node debug"
  4. Make sure "Debug > Node: Auto Attach" is set to "on"
  5. Run the command "node --inspect index.js"
  6. Set breakpoints

discord-rules-bot's People

Contributors

alexloney avatar merilindir avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.