An extensible Discord game server query and monitoring bot.
Add to Discord
Feature Request
•
Report Bug
•
Legacy: BattleBot v1 (Node)
You can see BattleBot in action on the Tribes 2 Discord.
Table of Contents
BattleBot v1 was initially written in Node around Fall 2017 for the Tribes 2 Discord community, allowing users to query Tribes 2 servers in real-time.
As BattleBot's feature set grew (some being experimental), so did its complexity. With BattleBot evolving, therein lies the opportunity to learn more Elixir and completely rewrite BattleBot, and its Tribes 2 server query engine. Previously, the query engine was using qstat. BattleBot's core is now even more modular, including the ability to handle more games, with Tribes 2 being the first.
Slash Command | Description |
---|---|
/query t2 |
Query options: server , ip , format . If a server or IP option is not selected, BattleBot will query all servers configured in config/t2_servers.exs and output the results in an embedded list. |
> server : Select from a list of predefined servers |
|
> ip : Manually enter a server's IP:PORT to be queried |
|
> format : Output options: image (default), raw |
|
/events |
List server events |
/info |
Info about BattleBot |
By default, any response BattleBot yields with will automatically be deleted after 5 minutes have passed. This keeps the chat and query outputs tidy. :)
The default message timeout is configurable in config/config.exs. This will eventually be an option you can pass into any /query
command to set a custom timeout.
Coming soon! On the roadmap.
- Elixir
- Nostrum
- T2ServerQuery: Repo • Docs
- t2-server-image
- Tribes 2
- Suggest your favorite title :)
- Slash commands
- Tribes 2 Server and list queries
- Custom message timeout option for slash commands
- Topic Monitoring :: Monitor game server populations and update Discord channel topics
Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. I'd love to learn from you!
You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! :)
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/NewFeature
) - Setup any applicable tests for your module or feature in
./test/*.exs
- Commit your Changes (
git commit -m 'feat(new): Command to query <insert your favorite game here>'
) - Push to the Branch (
git push origin feature/NewFeature
) - Open a Pull Request
Please run credo
and dialyzer
static code analysis on any contributions you make so that we can keep the codebase consistent.
mix credo
: Static Code Analysismix dialyzer
: Static Code Analysismix test
: Test runnermix format
: Code formatting
Run BattleBot:
iex -S mix
- Install Elixir & Erlang : Guide with ASDF version manager
- The project's Elixir & Erlang versions are found here in: ./elixir_buildpack.config
- Not required but recommended: For VSCode, ElixirLS: Elixir support and debugger
- Required Environment Variables
DISCORD_BOT_TOKEN
: Your secret bot token. (Create a new bot application)TEST_GUILD_ID
: Your dev channel for testing slash commands- ~ TIP: Using direnv can make your life easier for auto loading envs/secrets for a project
mix deps.get
- @exogen: t2-server-image
- @ChocoTaco1: https://github.com/ChocoTaco1/TacoServer, BattleBot Logo
- The Tribes 2 Community
- T2ServerQuery: Repo • Docs
- Nostrum