A simple discord bot written in Go. It assigns a role to a user when they add a reaction to a specific message.
go get github.com/Adam-Clrk/rolebot
go install github.com/Adam-Clrk/rolebot
(Installs to ~/go/bin/
)
wget "https://github.com/Adam-Clrk/rolebot/releases/download/v1.0/rolebot"
chmod +x rolebot
(Downloads to current directory)
run with ./rolebot
You will need a bot token from the Discord developers site
Usage:
~$ rolebot
Usage of rolebot:
-c name
Channel name to use (default "roles")
-e string
Emoji to use as reaction button (default "🍆")
-o id
Owner user id (only this owner ID and server owner can use register command)
-t token
Bot token (required)
-v Verbose logging
Example:
rolebot -t YOURTOKENHERE
2018/03/18 18:09:18 Running on servers:
2018/03/18 18:09:18 test (272429559406919681)
2018/03/18 18:09:18 channel name: roles
2018/03/18 18:09:18 Join URL:
2018/03/18 18:09:18 https://discordapp.com/api/oauth2/authorize?scope=bot&permissions=268446720&client_id=(removed)
2018/03/18 18:09:18 Bot running as (removed). CTRL-C to exit.
paste the link into a web browser to add the bot to your discord server (you will need the Manage Server permission)
Usage: register @role [message]
Command only works in a channel named roles
(or other supplied with -c
), and can only be used by server owner or other user supplied with -o
Examples:
register @csgo access to the csgo text chat
register @bluerole