MiraWaNeko / DiscordIntegration

Communicate between Minecraft and Discord
https://discordintegration.net
GNU Affero General Public License v3.0
88 stars 43 forks source link

[1.12] No chat relay #65

Closed NielsPilgaard closed 7 years ago

NielsPilgaard commented 7 years ago

Base informations

Minecraft version: 1.12 DiscordIntegration version: 1.12-3.0.0 Link to pastebin with (censored) config: Optional https://pastebin.com/DdKESR9i

Forge Version 1.12 14.21.1.2426

Expected behavior

I was expecting the bot to relay chat between Minecraft and the set channel.

Actual behavior

The bot is visible in the side of the Discord channel, but it doesn't actually relay any chat, nor server messages such as player joined.

Steps to reproduce

Follow setup instructions from https://wiki.discordintegration.net/How-to-get-a-token-and-channel-ID-for-Discord (Which is no longer a valid url?)

MiraWaNeko commented 7 years ago

Please change minecraft > dimensions > generic > discordChannel to an array of Discord channel IDs that you want to relay to.

It's a bug it's becoming true.

Example:

  "discordChannel": [ 123456789012345678, 123456789012345679 ]
jc2xs commented 7 years ago

I'll second this as an issue. I can't get it work with this discord section. I know my Token ID and channel IDs are good because they worked with the 1.10 version of the Unstoppable server we had setup. We are currently beta testing the new 1.12 before public release of the pack.

"discord": { "token": "redacted Token ID", "ignoresBots": true, "allowLinking": true, "ignoresUsers": [], "channels": { "generic": { "commandPrefix": "!unstoppable ", "canExecuteCommands": false, "stripMinecraftCodes": true, "allowDMCommands": false, "relayChat": true, "messages": { "chatMessage": "[{USER}] {MESSAGE}" }, "discordChannel": [redacted channel ID], "commands": [] }, "channels": {} }

EDIT: This is the same symptom reported by NillerMedDild. The BOT shows online and active but never joins the channel.

MiraWaNeko commented 7 years ago

Here's what I'm using for when I'm testing

{
  "discord": {
    "token": YOUR_TOKEN_HERE,
    "ignoresBots": true,
    "allowLinking": true,
    "ignoresUsers": [],
    "channels": {
      "generic": {
        "commandPrefix": "!",
        "canExecuteCommands": false,
        "stripMinecraftCodes": true,
        "allowDMCommands": true,
        "relayChat": true,
        "messages": {
          "chatMessage": "§7[§b§lD§r§7] {USER}: {MESSAGE}"
        },
        "commands": [
          {
            "name": "tps",
            "command": "discord tps",
            "enabled": true,
            "aliases": [],
            "permissions": []
          },
          {
            "name": "online",
            "command": "discord online",
            "enabled": true,
            "aliases": [],
            "permissions": []
          }
        ]
      },
      "channels": {
        MY_CHANNEL: {
        },
        MY_WEBHOOK_CHANNEL: {
          "webhook": MY_WEBHOOK_URL
        },
        MY_MODERATION_CHANNEL: {
        }
      }
    }
  },
  "minecraft": {
    "dimensions": {
      "generic": {
        "ignoreFakePlayerChat": true,
        "relaySayCommand": true,
        "relayMeCommand": true,
        "canMentionEveryone": true,
        "canMentionHere": true,
        "messageIgnoreRegex": [],
        "relayServerStart": true,
        "relayServerStop": true,
        "relayServerCrash": true,
        "chatPrefix": "",
        "canMentionUsers": true,
        "canMentionRoles": true,
        "discordChannel": [
          MY_CHANNEL,
          MY_WEBHOOK_CHANNEL
        ],
        "relayAchievements": true,
        "relayChat": true,
        "relayCommands": MY_MODERATION_CHANNEL,
        "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": "Server started!",
          "serverStop": "Server stopped!",
          "serverCrash": "Server crash detected!"
        }
      },
      "dimensions": {}
    }
  },
  "imc": {
    "enabled": true,
    "mode": "whitelist",
    "list": []
  }
}
NielsPilgaard commented 7 years ago

I still cannot get it to work - Am I required to fill out webhook channel, moderation channel etc?

MiraWaNeko commented 7 years ago

If you don't use it, remove it

Also make sure it's valid JSON - https://jsonlint.com/

NielsPilgaard commented 7 years ago

Right, I've finally gotten it to work - It was my own mistake to put it mildly. I had "" around the channel ID, as I thought it was a string. Sorry about that Chikachi, and thanks for the help.