Select Git revision

orestis.malaspin authored
README.MD 1.99 KiB
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.
- Clone the repository
git clone https://gitedu.hesge.ch/gabriel.strano/randomizerbot.git
- Go inside the
randomizerbot
folder
cd randomizerbot
- 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 withnodemon
in background and redirect ouput in alog.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