Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • errors
2 results

README.MD

Blame
  • Orestis Malaspinas's avatar
    orestis.malaspin authored
    60cb0ceb
    History

    Description

    This is a Discord bot. Its aim is to help a teacher to randomly pick a student from a voice channel and notify him in a text channel so he answers a question asked.

    Example

    > /rand "What is your favorite color?"
    > What is your favorite color?
    
    The victim is :@User

    Version

    current : 0.1

    Prerequisites

    • node >= v12.16.1 (update node)
    • npm >= 6.13.4
    • Linux (only for cp commands in package.json )

    Installation

    Open a terminal.

    1. Clone the repository
    git clone https://gitedu.hesge.ch/gabriel.strano/randomizerbot.git
    1. Go inside the randomizerbot folder
    cd randomizerbot
    1. Execute the following command
    npm install

    Now you need to create a settings.yml file in the ./src/ and copy the following lines inside

    settings:
      token: "<INSERT DISCORD TOKEN HERE>"
      prefix: "/"
      activity: "/randhelp"

    where <INSERT DISCORD TOKEN HERE> must be replaced by your discord token.

    Launch an instance of the Bot

    To run your instance of the randomizerBot you can run the this following npm run commands

    • npm run compile : compile .ts an and copy all .yml in the ./build/ folder file
    • npm run start : 1) compile 3) launch bot
    • npm run always : 1) compile 2) launch the bot with nodemon in background and redirect ouput in a log.txt file

    Usage in Discord

    To use your newly created bot you can click this link and add it follow these instructions.

    These comands can be used by all users with the KICK_MEMBERS permission

    • /randhelp : dysplay all commands
    • /addrole <@Role> : all people with the role added can be choosen
    • /rmrole <@Role> : remove a role
    • /lstroles : display all roles added
    • /rand [<question>] : choose randomly one user CAN BE USED ONLY ON A VOICE CHANNEL

    License : MIT