Bot fails to connect due to "empty string" error
Gunner76th opened this issue ยท 1 comments
Base informations
Minecraft version:
1.12.2
DiscordIntegration version:
3.0.5
Server type and version: Forge/Spigot/Sponge
2831
Link to pastebin with (censored) config: Optional
Discord Integration config
{ "discord": { "token": "REDACTED", "ignoresBots": true, "allowLinking": true, "ignoresUsers": [], "channels": { "generic": { "commandPrefix": "!", "canExecuteCommands": true, "stripMinecraftCodes": true, "allowDMCommands": true, "relayChat": true, "messages": { "chatMessage": "[{USER}] {MESSAGE}" }, "commands": [{ "name": "stop", "command": "stop", "enabled": true, "aliases": [ "close" ], "permissions": [ "role:REDACTED" ]
}, {
"name": "tps",
"command": "discord tps",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "online",
"command": "discord online",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "list",
"command": "list",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "kick",
"command": "kick {ARG_1}",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "deop",
"command": "deop {ARG_1}",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "op",
"command": "op {ARG_1}",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}, {
"name": "ban",
"command": "ban {ARGS}",
"enabled": true,
"permissions": [
"role:REDACTED"
]
}]
},
"channels": {
"": {
},
"REDACTED": {
"webhook": "https://discordapp.com/api/webhooks/REDACTED"
}
}
}
},
"minecraft": {
"dimensions": {
"generic": {
"ignoreFakePlayerChat": false,
"relaySayCommand": true,
"relayMeCommand": true,
"canMentionEveryone": true,
"canMentionHere": true,
"messageIgnoreRegex": [],
"relayServerStart": true,
"relayServerStop": true,
"relayServerCrash": true,
"chatPrefix": "",
"canMentionUsers": true,
"canMentionRoles": true,
"discordChannel": [REDACTED],
"relayAchievements": true,
"relayChat": true,
"relayCommands": false,
"relayPlayerJoin": true,
"relayPlayerLeave": true,
"relayPlayerDeath": true,
"messages": {
"chatMessage": {
"normal": "**[{USER}]** {MESSAGE}",
"webhook": "{MESSAGE}"
},
"command": {
"normal": "**[{USER}]** executed **{COMMAND} {ARGUMENTS}**",
"webhook": "*executed **{COMMAND} {ARGUMENTS}***"
},
"playerJoin": {
"normal": "**{USER}** just joined the server!",
"webhook": "*Joined the server!*"
},
"playerLeave": {
"normal": "**{USER}** just left the server!",
"webhook": "*Left the server!*"
},
"playerDeath": {
"normal": "**{USER}** just died due to {REASON}!",
"webhook": "*{REASON}*"
},
"achievement": {
"normal": "**{USER}** just gained the achievement **{ACHIEVEMENT}**!\n*{DESCRIPTION}*",
"webhook": "*Gained the achievement **{ACHIEVEMENT}**!\n*{DESCRIPTION}*"
},
"serverStart": "Sky Factory 4 is now online",
"serverStop": "Sky Factory 4 has been stopped",
"serverCrash": "Sky Factory 4 has crashed"
}
},
"dimensions": {}
},
"integrations": {
"dynmapEnabled": true
}
},
"imc": {
"enabled": true,
"mode": "whitelist",
"list": []
}
}
Expected behavior
Upos server startup for the discord integration bot mod to connect and begin communication between the Minecraft server and Discord.
Actual behavior
Upon server startup the bot fails to connect with the error mentioned in the screenshot below:
Steps to reproduce
Using the versions listed above, along with the config supplied (and entering your own personal values for bot token and webhook url) attempt to startup a pure forge server and have the bot connect to your discord server.
The problem was located. when following the format listed in https://github.com/Chikachi/DiscordIntegration/wiki/Config-Explanation it shows that:
"channels": { // Define specific settings for channels
"123456789012345678": { // Specific settings for channel with ID 123456789012345678
},
"123456789012345679": { // Specific settings for channel with ID 123456789012345679
"webhook": "" // Webhook URL for this channel
I had mistakenly left the
"channels": {
""
blank and then added in the channel and webhook in a second part similar to the example. Because I only had the one channel, I should have instead simply added the webhook details below where the normal channel ID was originally.