DiscordSRV / Staff-Chat

A staff-chat plugin that hooks into DiscordSRV
MIT License
29 stars 11 forks source link

[BUG] Not Recognizing DiscordSRV installation. #23

Closed slooshied closed 3 years ago

slooshied commented 3 years ago

DiscordSRV is installed and is working fine for my normal chat link, however, my staff-chat link is non functional, and is sending messages in to my normal chat.

I believe the issue is that the plugin is loading before DiscordSRV, but I cannot seem to solve it nor pinpoint it to being that.

[removed pastebin links]

Version: Paper 1.16.5 build #465

Debug Logs:

[2021-02-07 => 23:34:18]: ----- Starting Plugin: v1.3.3 ----- [2021-02-07 => 23:34:18]: DiscordSRV is enabled. [2021-02-07 => 23:34:18]: Subscribing to DiscordSRV's API... [2021-02-07 => 23:36:02]: Disabling plugin... [2021-02-07 => 23:36:02]: Unsubscribing from DiscordSRV's API. [2021-02-07 => 23:36:02]: ----- Disabled. ----- [2021-02-07 => 23:37:17]: ----- Starting Plugin: v1.3.3 ----- [2021-02-07 => 23:37:17]: DiscordSRV is not enabled. Will continue without discord support. [2021-02-07 => 23:38:21]: [In-Game-Message] From:"xHue" Message:"l" [2021-02-07 => 23:38:21]: Unable to send message to discord: staff-chat => null [2021-02-07 => 23:39:47]: [In-Game-Message] From:"xHue" Message:"l" [2021-02-07 => 23:39:47]: Unable to send message to discord: staff-chat => null [2021-02-07 => 23:39:48]: [In-Game-Message] From:"xHue" Message:"l" [2021-02-07 => 23:39:48]: Unable to send message to discord: staff-chat => null

RezzedUp commented 3 years ago

Thanks for the report, however, you've just revealed your bot's token to the public internet. You must regenerate your bot's token immediately. Otherwise, a bad actor could take over your bot and potentially wreak havoc on your discord server.

In the future, please remove any sensitive information (like bot tokens) before submitting to public pastebins.

slooshied commented 3 years ago

as stated on discord... I regenerated before posting and figured there was no need to remove an invalid auth token from the pastebin. thanks for looking out, but have some faith lmao.

running the latest discordsrv (1.21.3) & staffchat version 1.3.3

any idea on the problem..?

RezzedUp commented 3 years ago

It's great to hear that your token was invalid, but short of attempting to hijack the bot myself, there was no way to discern the status of the token's validity. I wish I could "have some faith," but the risk of leaving a likely vulnerable token visible to the public internet outweighs any benefit of the doubt I could reasonably give. Bots are constantly trawling github and pastebins for accidental token leaks, and malicious actors would eagerly jump at the chance to take over your discord bot.

Now as far as the problem goes, I'm unable to replicate the described behavior using DiscordSRV 1.21.3 with DiscordSRV-Staff-Chat 1.3.3 on Paper 1.16.5 build 465.

What caused DiscordSRV-Staff-Chat to unload/start back up here? Was it a restart?

[2021-02-07 => 23:36:02]: Disabling plugin...
[2021-02-07 => 23:36:02]: Unsubscribing from DiscordSRV's API.
[2021-02-07 => 23:37:17]: ----- Starting Plugin: v1.3.3 -----
[2021-02-07 => 23:37:17]: DiscordSRV is not enabled. Will continue without discord support.

You say staff chat messages are being sent to your normal chat. Does that mean they're being sent to "normal chat" in-game or on discord? What other chat plugins do you have installed? Does the problem occur when you use the /staffchat <message> command or only with automatic staff chat enabled?

slooshied commented 3 years ago

No worries.

It was a restart that caused it to unload, yes. I used the /stop command and waited for everything to completely finish.

What I mean by "normal chat" is that when I send a message into my #staff-chatchannel on discord, the message is broadcasted globally to my server. Any player who is online in-game, can see the message. It is not getting sent to the in-game staff-chat channel. It is doing the same thing as my #minecraft-chat channel link, which connects the in-game chat with a discord channel allowing for discord users to communicate with players in-game and vice versa.

When I send a message to the staff-chat in-game using the /staffchat command - the message is sent to the in-game staffchat, but not the discord #staff-chat channel.

This resource has worked in the past and seems to have started bugging after DiscordSRV updated to the 1.21 version.

Thanks for the quick support.

Chat Plugins: EssentialsChat ChatControlPro AdvancedBan (Muting, etc) mcMMO - but I've disabled all chat handling functionality it has