Skip to content

Commit 0d6c9f4

Browse files
authored
Merge pull request #2 from bl3rune/name-override
Added ability to override name field for activity
2 parents ed30ad7 + 6958220 commit 0d6c9f4

File tree

5 files changed

+628
-5792
lines changed

5 files changed

+628
-5792
lines changed

.env.example

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Gamedig specific
2-
GAME_URLS='minecraft:mysite.com:25565,przomboid:mysite.com'
2+
GAME_URLS='minecraft:mysite.com:25565,przomboid:mysite.com,valheim:mysite.com'
33

44
# Discord settings
55
DISCORD_TOKEN=
66
DISCORD_CHANNEL=000000000000
77
UP.przomboid=':zombie: The Project Zomboid server is available!'
88
UP.minecraft=':pick: The Minecraft server is available!'
9-
DOWN.minecraft=':pick: The Minecraft server is no longer available!'
9+
DOWN.minecraft=':pick: The Minecraft server is no longer available!'
10+
11+
# Mapping settings
12+
SEPERATOR=' +++++ '
13+
NAME_OVERRIDE.valheim='Valheim'
14+
NAME_FIELD.minecraft='name'
15+
RAW_NAME_FIELD.przomboid='server'

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,23 @@ Here are some examples below:
3131
- Omitting port number `przomboid:mysite.com`
3232
- With port number `minecraft:mysite.com:25565`
3333
- Using ip instead of hostname `csgo:23.4.140.70`
34-
- Multiple defined in `GAME_URLS` config `przomboid:mysite.com,minecraft:mysite.com`
34+
- Multiple defined in `GAME_URLS` config `minecraft:mysite.com:25565,przomboid:mysite.com,valheim:mysite.com`
3535

3636
### Configure the bot
3737

3838
When running as a docker container provide the following as Docker environment variables.
3939
When running as a nodejs app you can create an `.env` file in the root directory of the project and set the options there (see the `.env.example` file for an example).
4040
You need to set the following configuration options.
4141

42-
| Required | Configuration option | Description | Value |
43-
| -------- | ----------------------- | ----------- | ------ |
44-
| TRUE | `GAME_URLS` | Comma seperated list of GameUrl format entries [see GameUrl format section](#gameurl-format) | `string` |
45-
| TRUE | `DISCORD_TOKEN` | The bot token of your discord app from https://discord.com/developers/applications -> (Select your application) -> Bot -> Token | `string` |
46-
| FALSE | `DISCORD_CHANNEL` | The channel id of your discord chat to send server availability to | `string` |
47-
| FALSE | `UP.####` | Message to be sent on server available for game type #### (DISCORD_CHANNEL must be provided) | `string` |
48-
| FALSE | `DOWN.####` | Message to be sent on server unavailable for game type #### (DISCORD_CHANNEL must be provided) | `string` |
49-
| FALSE | `IDLE_STATUS` | Override idle status messaging for the bot when no servers are available | `string` |
42+
| Required | Configuration option | Description | Value |
43+
| -------- | ---------------------- | ----------- | ------ |
44+
| TRUE | `GAME_URLS` | Comma seperated list of GameUrl format entries [see GameUrl format section](#gameurl-format) | `string` |
45+
| TRUE | `DISCORD_TOKEN` | The bot token of your discord app from https://discord.com/developers/applications -> (Select your application) -> Bot -> Token | `string` |
46+
| FALSE | `DISCORD_CHANNEL` | The channel id of your discord chat to send server availability to | `string` |
47+
| FALSE | `UP.####` | Message to be sent on server available for game type #### (DISCORD_CHANNEL must be provided) | `string` |
48+
| FALSE | `DOWN.####` | Message to be sent on server unavailable for game type #### (DISCORD_CHANNEL must be provided) | `string` |
49+
| FALSE | `IDLE_STATUS` | Override idle status messaging for the bot when no servers are available | `string` |
50+
| FALSE | `SEPERATOR` | Override the seperator text that appears between multiple activities | `string` |
51+
| FALSE | `NAME_OVERRIDE.####` | Override the activity name for game type #### with : variable string value | `string` |
52+
| FALSE | `NAME_FIELD.####` | Override the activity name for game type #### with : field on the response object (response[NAME_FIELD]) | `string` |
53+
| FALSE | `RAW_NAME_FIELD.####` | Override the activity name for game type #### with : field in the raw section of the response (response.raw[RAW_NAME_FIELD]) | `string` |

0 commit comments

Comments
 (0)