Skip to content

Commit

Permalink
Update docs for release
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Mar 23, 2024
1 parent f6ac7ad commit afb2fa2
Showing 1 changed file with 37 additions and 18 deletions.
55 changes: 37 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,58 @@
# TF2BDd

Very simple service to allow tf2 bot detector player list contributions over discord and serve
the results over a HTTP service to be consumed by any bot detector compatible client.
Very simple service to allow tools like those listed below to download and integrate player list contributions from outside sources. This
is designed to work over discord as a bot, allowing multiple people to contribute their lists and have them merged into
a single master list. The results served over an HTTP endpoint `/v1/steamids`. Data is backed by a very simple sqlite database.

## Usage
- [tf2_bot_detector](https://github.com/PazerOP/tf2_bot_detector)
- [bd](https://github.com/leighmacdonald/bd)
- [MAC](https://github.com/MegaAntiCheat)

If you have other examples of software that is able to update lists over http like these, please open a PR to add them to the list.

Example results from the [@trusted](https://trusted.roto.lol/v1/steamids) list.

$ git clone git@github.com:leighmacdonald/tf2bdd.git
$ cd tf2bdd
$ go build
$ export STEAM_TOKEN=steam_web_api_token # Your steam api key, for resolving vanity names
$ export BOT_TOKEN=discord_bot_token # Your discord bot token
$ export BOT_CLIENTID=12345 # Discord client id
$ export BOT_ROLES=11111111111,222222222 # Roles allowed to use non-readonly commands
$ ./tf2bdd

## Commands

Bot command list:

- `!add <steamid/profile> [attributes]` Add the user to the master ban list. Valid attributes are 0 or more of: `racist sus/suspicious cheater exploiter`. If none are defined, it will use cheater by default.
- `!add <steamid/profile> [attributes]` Add the user to the master ban list. eg: `suspicious/cheater/bot`. If none are defined, it will use cheater by default.
- `!del <steamid/profile>` Remove the player from the master list
- `!check <steamid/profile>` Checks if the user exists in the database
- `!count` Shows the current count of players tracked
- `!import <attach_a_json_file>` Imports the steam ids from a players custom ban list
- `!steamid <steamid/profile>` Get the various steam ids

- `!import <attached_playerlist_files>` Imports the steam ids from a players custom ban list, multiple can be attached
- `!steamid <steamid/vanity_name/profile_link>` Accepts any steamid format including bare vanity name and profile link. Will print out all forms.

Discord [slash commands](https://support.discord.com/hc/en-us/articles/1500000368501-Slash-Commands-FAQ) are not
currently supported as this was written before that was an option, however if there is enough
demand, or somebody creates a PR for it, I will add them.

## Building From Source

$ git clone git@github.com:leighmacdonald/tf2bdd.git
$ cd tf2bdd
$ go build

## Running Binary

You can either use the binary you build from source, or download the latest release from the [releases](https://github.com/leighmacdonald/tf2bdd/releases)
page.

$ export STEAM_TOKEN=steam_web_api_token # Your steam api key, for resolving vanity names
$ export BOT_TOKEN=discord_bot_token # Your discord bot token
$ export BOT_CLIENTID=12345 # Discord client id
$ export BOT_ROLES=11111111111,222222222 # Roles allowed to use non-readonly commands
$ ./tf2bdd

You will probably want to create something like a systemd service to automate this.

## Docker Example
## Running Docker

docker run --rm --name tf2bdd -it \
-p 127.0.0.1:8899:8899 \
--env BOT_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--env STEAM_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--env BOT_CLIENTID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--env BOT_ROLES=111111111111,22222222222 \
--mount type=bind,source="$(pwd)"/.db.sqlite,target=/app/db.sqlite \
--mount type=bind,source="$(pwd)"/db.sqlite,target=/app/db.sqlite \
ghcr.io/leighmacdonald/tf2bdd:latest

0 comments on commit afb2fa2

Please sign in to comment.