GithubHelp home page GithubHelp logo

ark-auth-bot's Introduction

ark-auth-bot

A basic Discord bot to use with ark-auth-server.

Installation

git clone https://github.com/GyozaGuy/ark-auth-bot
cd ark-auth-bot
npm install

Configuration

Copy .env.template to .env. And modify the contents to match your environment.

.env file values

  • AUTH_SECRET: A value that matches the AUTH_SECRET value used by the auth server
  • AUTH_SERVER_PORT: The port used by the auth server
  • AUTH_SERVER_URL: The URL used by the auth server
  • DISCORD_BOT_TOKEN: The token for the Discord bot that will be used for this functionality
  • DISCORD_GUILD_ID: The guild ID of your Discord server
  • PREFIX: The prefix to be used before bot messages
  • SERVER_ACCESS_ROLE (optional): A role to add and remove from users to indicate server access

Sample .env

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

Starting the bot

npm start

Bot commands

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

ark-auth-bot's People

Contributors

gyozaguy avatar

Watchers

 avatar  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.