Skip to content

Commit

Permalink
Merge pull request #1 from AlmightyLks/development
Browse files Browse the repository at this point in the history
Version 0.9.2
  • Loading branch information
AlmightyLks authored May 11, 2021
2 parents d8eb696 + f80690d commit 4dbd64c
Show file tree
Hide file tree
Showing 50 changed files with 848 additions and 753 deletions.
205 changes: 112 additions & 93 deletions Configs.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,49 @@
## Configs

### SyncordBot
### **Each individual config will re-create itself with its default values when not existent**

The default configs for the Discord Bot looks as following:
---
### Overview:

- [Syncord Bot](Configs.md#)
- [Bot-Config](Configs.md#Bot-Config)
- [Guild-Config](Configs.md#Guild-Config)
- [Alias-Config](Configs.md#Alias-Config)
- [Translation-Config](Configs.md#Translation-Config)
- [Syncord Plugin](Configs.md#SyncordPlugin)

---

### [Bot-Config](#Bot-Config)

The default configs for this look as following:

```json
{
"Prefix": "!",
"BotToken": "Your Bot Token here",
"Bot Token": "Your Bot Token here",
"Port": 8000,
"DiscordActivity": {
"Discord Activity": {
"Name": "{SLCount} Server/s",
"Activity": 3
},
"Guilds": [
],
"EmbedConfigs": {
"PlayerJoinedLeftConfig": {
"ShowUserId": true,
"ShowPing": true,
"ShowIP": false
"Embed Configs": {
"Display Server IP / Alias": false,
"Player Joined / Left": {
"Show User ID": true,
"Show Ping": true,
"Show IP (or Do Not Track)": false
},
"PlayerDeathConfig": {
"ShowUserId": true
"Player Death": {
"Show User ID": true
},
"RoundEndConfig": {
"ShowRoundLength": true,
"ShowTotalKills": true,
"ShowTotalScpKills": true,
"ShowTotalFragGrenadeKills": true,
"ShowTotalEscapedDClass": true,
"ShowTotalEscapedScientists": true
}
},
"TranslationConfig": {
"Translation": {
"Language": "English",
"Elements": {
"Player Join": "Player Join",
"Player Leave": "Player Leave",
"Player Ban": "Player Ban",
"ms": "ms",
"Weapon": "Weapon",
"Server": "Server",
"Banned": "Banned",
"Reason": "Reason",
"Duration": "Duration",
"Minutes": "Minute(s)",
"Hours": "Hour(s)",
"Days": "Day(s)",
"Years": "Year(s)",
"Player Death": "Player Death",
"Killer": "Killer",
"Victim": "Victim",
"Was not Cuffed": "Was not Cuffed",
"Was Cuffed": "Was Cuffed",
"Round Summary": "Round Summary",
"Round Length": "Round Length",
"Total Kills": "Total Kills",
"Kills By SCPs": "Kills By SCPs",
"Kills By Frag Grenades": "Kills By Frag Grenades",
"Escaped D-Class": "Escaped D-Class",
"Escaped Scientists": "Escaped Scientists"
}
"Round Summary": {
"Show Round Length": true,
"Show Total Kills": true,
"Show Total Scp Kills": true,
"Show Total Frag Grenade Kills": true,
"Show Total Escaped DClass": true,
"Show Total Escaped Scientists": true
}
}
}
Expand All @@ -85,13 +66,30 @@ Activity | ID

Small feature, placing `{SLCount}` into the activity name will replace it with the amount of connected SL Servers.

Regarding the `Guilds`... The way a Guild-entry is structured is as following:

The `Embed Configs` part is pretty self-explanatory and it lets allows you to customise some the logging messages to a certain extend.

---

### [Guild-Config](#Guild-Config)

The default configs for this look as following:

```json
{
"Guilds": []
}
```

Note: `[]` indicates a collection of something.
Here you can insert your entries where you link the discord guilds, the sl servers and the desired logs together.
The way a Guild-entry is structured is as following:

```json
{
"GuildID": 0123456789012345,
"SLFullAddress": "127.0.0.1:8888",
"DedicatedChannels": {
"Full SL Address": "127.0.0.1:8888",
"Dedicated Channels": {
"PlayerJoin": 0123456789012345,
"PlayerLeave": 0123456789012345,
"RoundSummary": 0123456789012345,
Expand All @@ -101,58 +99,79 @@ Regarding the `Guilds`... The way a Guild-entry is structured is as following:
}
```

The valid Event Names can be found [here](EventNames.md). I am always open for suggestions!

Which could look something like this in completion:
The valid event names can be found [here](EventNames.md). I am always open for suggestions!
So that would be for example:

```json
"Guilds": [
{
"GuildID": 727996170051518504,
"SLFullAddress": "127.0.0.1:8888",
"DedicatedChannels": {
"PlayerJoin": 804830959513239583,
"PlayerLeave": 804830959513239583,
"RoundSummary": 805401446471827488,
"PlayerDeath": 805553243102904350,
"PlayerBan": 806028507292631040
}
},
{
"GuildID": 727610880816316536,
"SLFullAddress": "127.0.0.1:8888",
"DedicatedChannels": {
"PlayerDeath": 727610980237836289
}
},
{
"GuildID": 727996170051518504,
"SLFullAddress": "127.0.0.1:7777",
"DedicatedChannels": {
"PlayerDeath": 782245173526134814,
"PlayerJoin": 782687511428333598,
"PlayerLeave": 782687511428333598
}
{
"Guilds": [
{
"GuildID": 121212121212,
"Full SL Address": "127.0.0.1:8888",
"Dedicated Channels": {
"PlayerJoin": 0123456789012345,
"PlayerLeave": 0123456789012345,
"RoundSummary": 0123456789012345,
"PlayerDeath": 0123456789012345,
"PlayerBan": 0123456789012345
}
]
},
{
"GuildID": 56565656565656,
"Full SL Address": "127.0.0.1:6726",
"Dedicated Channels": {
"PlayerJoin": 0123456789012345,
"PlayerLeave": 0123456789012345,
}
}
]
}
```

That way you can combine multiple Discord-Servers with different SL-Servers, cross-logging events.

The next few config parts are the configs for the embeds which are logged.
Allowing you to toggle whether you want to see the UserId for when a player joins and such.
---

### [Alias-Config](#Alias-Config)

The default configs for this look as following:

```json
{
"Aliases": {}
}
```

Here you can add Aliases for your SL servers, for a friendlier representation for your server ip.
It is a simple dictionary, so adding some examples it could look something like this:

```json
{
"Aliases": {
"127.0.0.1:7777" : "Wholesome's place 1",
"127.0.0.1:8888" : "Wholesome's place 2"
}
}
```

---

### [Translation-Config](#Translation-Config)

Last but not least, you have a small translation config.
Here you can replace the default-English vocabulary, replacing it with i.e. your own native language.
Just a small feature, for ease of use.
Just a small feature, for quality of life.
Note:
Leave the left side of words as they are and do not remove entries. Only edit the right side of the translation, so:
Leave the left side of words as they are and do not remove entries. Only edit the right side of the translation, so as follows:
`"Player Join": "This side right here."`

### SyncordPlugin
---

### [SyncordPlugin](#SyncordPlugin)

Each SL server which you want to connect to your SyncordBot has to point towards the IP and Port.
If you host the bot and the SL server on the same machine, you can simply use the localhost-ip `127.0.0.1`.
As soon as you use localhost, it will recognize that and will furthermore identify the sl server via the localhost ip.
`debugMode` will help you if something is going wrong and you want to know further information.
If you have an issue with Syncord, you'll likely be asked to activate this debug config and replicate the bug, for us to help you further.
`autoReconnect` is simply a quality of life feature for you, so the Syncord plugin will automatically reconnect to its Syncord Bot, if connection was lost.
Expand All @@ -166,8 +185,8 @@ debugMode: false
discordBotAddress: 127.0.0.1
# Port which the Discord-Bot is listening to
discordBotPort: 8000
# Whether the Server should try to reconnect when connection is lost
autoReconnect: false
# Whether the Server should try to connect when there is no connection
autoConnect: false
}
```

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Syncord

[![Github All Releases](https://img.shields.io/github/downloads/AlmightyLks/Syncord/total.svg)]()
[![Github All Releases](https://img.shields.io/github/languages/code-size/AlmightyLks/Syncord)]()
[![Github All Releases](https://img.shields.io/tokei/lines/github/AlmightyLks/Syncord)]()
[![Github All Releases](https://img.shields.io/github/license/AlmightyLks/Syncord)]()

## Description

Syncord is there to offer you a way of logging specific Events from within your SCP SL Server to your Discord Server.
Expand Down
Binary file modified Ref/EasyCommunication.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions SyncordBot-Publish-Self-Contained.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dotnet publish -r win-x64 --self-contained true
dotnet publish -r linux-x64 --self-contained true
dotnet publish -c Release -r win-x64 --self-contained true
dotnet publish -c Release -r linux-x64 --self-contained true
Loading

0 comments on commit 4dbd64c

Please sign in to comment.