This repo is deprecated and no longer being worked on, It's replacement can be here: https://github.com/HotaruBlaze/goTES3MP
This is one of my first attempts at scripting for TES3MP and Lua
Note: Due to limiations with Lua, we are unable to use wss (websockets), This prevents the ability to have Discord -> tes3mp chat. You can follow progress here #1
This branch has been tweaked to use webhooks as an "Lazy and quick" working alternative, while a more elegant solution is planned
Feel free to submit Issues and Pull Requests.
Consistent tabulation
lowerCamelCase for local and global variables
UpperCamelCase for function names.
- Currently, this only sends chat to discord
(TES3MP -> Discord)
. It does not show discord messages in-game(Discord -> TES3MP)
- Designed for rpChat primarily, however Local/Normal chat will still work even if you don't have rpChat.
- This does not work on Windows yet. Unfortunately, Discord requires us to use SSL and we use luasec 0.8, I currently dont have the library files required for windows
-
Copy the folders
lib/
andscript/
intoserver
(or Corescripts folder). -
Add
DiscordRelay = require("custom/DiscordRelay/main")
toscripts/customScripts.lua
-
Start your TES3MP server, You should see
[ERR]: [Script]: [DiscordRelay] webhook_url is blank or empty.
if not you have not followed the steps correctly or have an compatability issue -
Edit config found at
data/custom/__config_DiscordRelay.json
-
Create or select the channel you would like to use
-
Right click and edit the channel
- Select webhook from the side menu
- Create a webhook and customize it as you see fit
Note: At this time the bot's name is set to the players name with no configuration option, So the name does not matter
-
Add the webhook to
data/discord_config.json
-
You should see something like below when a player types ingame.