Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some logging messages not posting to log channel #51

Open
BigJazzz opened this issue Feb 26, 2017 · 7 comments
Open

Some logging messages not posting to log channel #51

BigJazzz opened this issue Feb 26, 2017 · 7 comments

Comments

@BigJazzz
Copy link

Hey guys

When changing the logging channel, I get disconnect messages logged, however it doesn't appear to be logging connect and died messages. When they were in the same channel it all came through. Any suggestions as to what I've done wrong?

	"tokenStore": "JSON",
	"botToken": "[TOKEN]",
	"botDiscordGame": "Minecraft",
	"prefixBlacklist": ["/"],
	"ignoreBots": true,
	"minecraftBroadcastTemplate": "&c[Important] %s",
	"channels": [
		{
			"discordId": "[Chat Channel]",
			"discordInviteCode": "zbCks2a",
			"discord": {
				"publicChat": {
					"authenticatedChatTemplate": "%s",
					"anonymousChatTemplate": "`%a:` %s"
				},
				"broadcastTemplate": "__**[Important]**__ %s"
			},
			"minecraft": {
				"chatTemplate": "&f%a &f%s",
				"attachment": {
					"template": "&3[Attachment]&r",
					"hoverTemplate": "Please check Discord.",
					"allowLink": false
				},
				"mention": {
					"userTemplate": "@%s",
					"roleTemplate": "@%s",
					"everyoneTemplate": "&6@%s",
					"channelTemplate": "&9#%s"
				},
				"roles": {
					"Owner": {
						"chatTemplate": "&f[&8+&cOwner&f] &c%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Admin": {
						"chatTemplate": "&f[&8+&cAdmin&f] &c%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Global Mod": {
						"chatTemplate": "&f[&a+&3Mod&f] &3%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"FTB Mod": {
						"chatTemplate": "&f[&9Modin&f] &9%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Supporter": {
						"chatTemplate": "&f[&e+&dSupporter&f] &d%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Emerald": {
						"chatTemplate": "&f[&e+&aEmerald&f] &a%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Donator": {
						"chatTemplate": "&f[&bDonator&f] &b%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					},
					"Member": {
						"chatTemplate": "&f[&eMember&f] &e%a &f%s",
						"attachment": {
							"hoverTemplate": "Click to open attachment.",
							"allowLink": true
						}
					}
				}
			}
		},
			{
				"discordId": "[Logging Channel]",
				"discord": {
					"joinedTemplate": "_%s_ just joined the server.",
					"leftTemplate": "_%s_ just left the server.",
					"serverUpMessage": "Server has started.",
					"serverDownMessage": "Server has stopped.",
					"deathTemplate": "**%s**"
				}
			},
			{
				"discordId": "DISCORD_STAFF_BROADCAST_CHANNEL_ID",
				"minecraft": {
					"chatTemplate": "&l&2<ANNOUNCEMENT> %s"
			}
		}
	]
}```
@BigJazzz
Copy link
Author

Scratch that, it's logging the join message (still can't see death), but it's logging it to the chat channel.

@Mohron
Copy link
Contributor

Mohron commented Feb 26, 2017

@BigJazzz deaths were just recently added in my PR. They're not in any release.

@BigJazzz
Copy link
Author

Ah, that explains that. Any suggestions on the joined messages posting to the wrong channel?

@BigJazzz
Copy link
Author

@Mohron I think I've worked it out: when you have logged in with Discord it's reading it as a player message, not as a console message. Why it's reading dc messages correctly is beyond me, but player's who aren't logged in to Discord have both disconnect and connect messages going to the correct channel.

@nguyenquyhy
Copy link
Owner

I got that same problem when player join message shows only in the chat channel, and left message shows in both channel. However, after server restart, I cannot reproduce that problem any more. Does it happen the same to you?

Also, I am thinking if join/left message should be under player's account or bot account because player's account might not have access to the monitor channel. What do you think @BigJazzz ?

@Mohron
Copy link
Contributor

Mohron commented Mar 2, 2017

I'd say server up/down messages should be handled by the bot even for authenticated users.

@BigJazzz
Copy link
Author

BigJazzz commented Mar 3, 2017

Yeah, our logging channel is only accessible by staff. If the bot handled all "event" (up, down, join, left, etc) messages that would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants