A basic Discord bot to use with ark-auth-server.
git clone https://github.com/GyozaGuy/ark-auth-bot
cd ark-auth-bot
npm install
Copy .env.template
to .env
. And modify the contents to match your environment.
AUTH_SECRET
: A value that matches theAUTH_SECRET
value used by the auth serverAUTH_SERVER_PORT
: The port used by the auth serverAUTH_SERVER_URL
: The URL used by the auth serverDISCORD_BOT_TOKEN
: The token for the Discord bot that will be used for this functionalityDISCORD_GUILD_ID
: The guild ID of your Discord serverPREFIX
: The prefix to be used before bot messagesSERVER_ACCESS_ROLE
(optional): A role to add and remove from users to indicate server access
AUTH_SECRET=somesecretvalue
AUTH_SERVER_PORT=3000
AUTH_SERVER_URL=http://localhost
DISCORD_BOT_TOKEN=your-discord-bot-token-here
DISCORD_GUILD_ID=your-discord-guild-id-here
PREFIX=~auth
SERVER_ACCESS_ROLE=server-access
npm start
These examples assume the PREFIX
is set to ~auth
.
Adding a player to the database
This command also allows the player access to the server automatically.
~auth allow @PlayerName 12345678987654321
Authorizing a player
~auth allow @PlayerName
Denying server access
~auth deny @PlayerName
Checking a player's server access status
~auth status @PlayerName
If run without tagging a player, ~auth status
will check your own status. This command can be run by any Discord member.
Deleting a player from the database
~auth delete @PlayerName