Skip to content

Discord Availability is a discord bot used to track who will be available for dota (or any other event).

Notifications You must be signed in to change notification settings

grandeljay/discord-availability

Repository files navigation

Discord Availability

Discord Availability is a discord bot used to track who will be available for a certain event (i. e. a game).

Requirements

  1. PHP v8.1 - v8.4
  2. Composer

Getting started

  1. Setup configuration

    Copy config-example.json to either ~/.config/discord-availability/config.json or /etc/discord-availability/config.json.

  2. Run the script

    php availability.php

    Do not attempt to run this via a web server (i. e. from the browser), it will only work from the command line.

  3. Add it to your server

    1. Create an app (key) for your server: https://discord.com/developers/applications

    2. Set the OAuth scope to

      • identify
      • bot
    3. Copy the generated URL and follow the link to add it to your server. It should look like this:

       https://discord.com/api/oauth2/authorize?client_id=XXXXXXXXXXXXXXXXXXX&permissions=0&redirect_uri=https%3A%2F%2Fgithub.com%2Fgrandeljay%2Fdiscord-availability&response_type=code&scope=identify%20applications.commands%20bot
      

Once started, the script will run in loop, indefinitly until stopped. A schedule/cron is not necessary.

Bot commands

The bot currently offers three different slash commands:

  1. /available <date> where date is a strtotime compatible phrase. According to PHP that is: about any English textual datetime description.
  2. /unavailable <date> where date is a strtotime compatible phrase. According to PHP that is: about any English textual datetime description.
  3. /availability which lists the availability of everybody. Everybody in this case means users who have used the /available or /unavailable command at least once.
  4. /shutdown which shuts the bot down. You must be an administrator to do this.

Once a user is in the system, the bot will automatically assume the user is available unless he specifies otherwise.

Bot startup arguments

  • --install

    Updates all of the discord slash commands. Unused/orpahned commands are removed and new ones are added.

Notes

If you are a bro who is hosting this for a bro, you da real MVP.

About

Discord Availability is a discord bot used to track who will be available for dota (or any other event).

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy