Skip to content

Provides various functions to assist with the experience of the UVOC Discord server.

License

Notifications You must be signed in to change notification settings

carlst99/UVOCBot

Repository files navigation

UVOCBot Icon

UVOCBot

Stable Release

Provides various functions to assist with the experience of the UVOC outfit Discord server. Current features include:

  • PlanetSide 2 Queries:
    • Server population and continent status.
    • Basic character stats.
    • Online outfit members.
    • Online friends.
    • Outfit base capture tracking, including members involved in any captures.
    • Outfit Wars information (registrations, match times).
  • Dev post relaying - posts tweets and forum/news posts from PlanetSide 2 developers into a channel.
  • Apex Legends Queries:
    • Current map rotation
    • Current crafting rotation
  • Space Engineers server integration - track online players and server status.
  • Role menus.
  • Bulk voice channel movement - never drag people one-at-a-time again!
  • Welcome messages - assign default roles, let users pick an alternate role set, and make guesses at their in-game name for easy nickname changes.
  • Bulk reaction-based role assignment.
  • Random team generation.
  • Various other features, such as coinflips, timestamp generation and basic admin logs.

Picture of various UVOCBot commands

To my knowledge, there isn't a publicly hosted instance of UVOCBot available. Hence if you'd like to use it in your own server, you'll have to host your own, or find someone kind enough to do it for you. See Setup for more info.

Contrary to the above, if you know me through the PlanetSide 2 community, feel free to get in touch and ask for a private invite link. I might say yes 🙂.

Setup for Hosting

Before continuing, you should note that UVOCBot is designed with a Linux host in mind; it has support for systemd and I only provide Linux binaries. If you'd like support for running as a Windows service and the corresponding binaries, please open an Issue.

  1. Create a new application in the Discord Developer portal - https://discord.com/developers/applications. Give it a name and icon and add a bot to the application.

    1. ⚠️ Ensure that you enable the Presence Intent and Server Members Intent, found under the Bot tab of your application.
  2. Head on over to the wiki page Hosting on Linux and follow the instructions there.

  3. Invite the bot to your server using https://discord.com/api/oauth2/authorize?client_id=<YOUR_CLIENT_ID>&permissions=2570144848&scope=bot%20applications.commands.

Building and Developing

  1. Install the .NET 8 SDK.
  2. Install PostgreSQL and create a database. The name is up to you.
  3. Modify the requisite appsettings.json files to include your API keys and database connection string
  4. Update the database to the latest migration. If you are using the .NET Core CLI, run the command:
    # dotnet CLI
    dotnet ef database update
    # Visual Studio Package Manager
    Update-Database

Project Structure

UVOCBot is composed of multiple components

  • UVOCBot.Core: A library containing the database models.
  • UVOCBot.Discord.Core: A library containing shared Discord components.
  • UVOCBot: The bot itself. A console app making use of the Generic Host that drives the connection to the Discord API and registers plugins.
  • Plugins. Class libraries used to help separate the logic within the bot.

Acknowledgements

UVOCBot is built on these amazing libraries: