💬 Discord Bridge 2.4.0 (aka SpongeDiscord)


#83

May I know the host?


#84

Clovux. Would there be a reason for it to not work because of a host?


#85

Hey,

Really like the plugin, great release!
Just one issue we’re having, we’re using MCClans (MCClans - Player grouping by forming clans) @Kippers - it picks up private clan chat once you enter with /cc and sends to discord which is not ideal! Not sure if it’s Clans or Discord Bridge doing it.

Thanks!


#86

So people can read chat from other clans on discord? Yeah we can’t have that, I’ll look in to it.


#87

I think it’s a simple fix of MCClans’ chat event being ordered before Discord Bridge’


#88

Let me know if you need any help. Discord Bridge captures only onChat Sponge event to broadcast and specifically ignore anything start with /.


#89

The problematic class is a wrapper for Opus codec. I guess the host don’t have the Opus library. Fastest fix would be to install the native Opus library from:
http://packages.ubuntu.com/trusty/amd64/libopus0/download
http://packages.ubuntu.com/trusty/i386/libopus0/download
I might try to remove audio support from the Discord library since we are not really using it, but that might be cumbersome and will take some time.


#90

Ah, in MCClans people can also toggle into clan chat, so they would type /cc once and every message after is put in to clan chat. I guess these are the messages that Discord Bridge picks up as they do not start with ‘/’.


#91

I am thinking of a good way to integrate Discord Bridge and MCClan. Ideally I think server owner should be able to select different channels for clan messages and public messages.
That would require Discord Bridge getting clan information from MCClan, via either an API from Discord Bridge to allow MCClan to overwrite Discord channel ID, or an API from MCClan to expose the current clan channel of each chat message.
What do you think?


#92

@Kippers
@nguyenquyhy

This is because MCClans fires with Order.LATE and Sponge Discord fires at Order.DEFAULT (as @Wyre said). Why don’t you change your order to Order.EARLY or something similar at so the event is cancelled before it’s given to Discord Bridge (and other plugins)? I’m not too sure how Sponge handles cancelled events with order, but I would assume Discord Bridge would then either not receive the event or he can probably check if it was cancelled if he does receive the event. Optionally, if firing late is important for your plugin, Discord Bridge could fire after yours as it’s probably best for the plugin to relay the ‘end result’ of the message anyway.


#93

Why don’t you change your order to Order.EARLY or something similar at so the event is cancelled before it’s given to Discord Bridge (and other plugins)?

I don’t want to cancel the chat event though?

What happens instead is that the chat’s message channel is changed so that I can limit the people who receive the chat.

@nguyenquyhy
I haven’t used Discord Bridge so it’s a bit fuzzy to me how it exactly works. If I understood it right, Discord Bridge picks up all chats, and removes any messages that start with a slash. And by default all chats end up in one channel?

Right now I think I’m in favor of simply filtering out clan chat (and ally chat) from appearing on discord. So if I indeed expose the ClanMessageChannel and AllyMessageChannel through the API you could check the chat’s message channel for that and filter it? For that MCClans will have to do its changes before you check, so as the other guys said I might need to change the event order for MCClans. I don’t recall from the top of my head why I’m using Order.LATE but I can look in to that.


#94

@dualspiral @nguyenquyhy

Just found out Nucleus’ /staffchat toggled also broadcasts to discord!


#95

@Kippers

Actually, after reviewing Sponge API for chat event, I think I will add integration with Sponge Message channel instead of integrating with Nucleus or MCClans directly. The idea is that server owners can configure different in-game channels to different Discord channels (or to no channel).

This implementation should work well with Nucleuss staffchat since they set message channel properly. It won’t work with MCClans at the current state since MCClans set the channel too late in the pipeline for Discord Bridge to be aware of.


#96

Shouldn’t you get the end result on Order.POST anyway to get the final result after all the plugins had their say?


#97

Unless you are cancelling, or modifying messages, listen on Post.


#98

I have checked the Channel implementation in MCClans. I think it is a bit difficult to get clan name from Channel.
Can you add a function or guide me on how to do that?


#99

Do you have Skype or something else so we can chat more directly? I’m kippers3737.


#100

when I start up my server the bot tries to connect to the discord but I get this “> 07:27:06.162: [INFO][WebSocketClient@691550617-62][sx.blah.discord.Discord4J] - Connected to the Discord Websocket v5
07:27:06.182: [INFO][Request Builder Async Executor][sx.blah.discord.Discord4J] - Connected to 0 guilds.
[07:27:06] [Event Dispatch Thread/INFO] [com.nguyenquyhy.spongediscord]: Discord account Pixelmon Bot will be used for all unauthenticated users!
[07:27:06] [Event Dispatch Thread/WARN] [com.nguyenquyhy.spongediscord]: Cannot access channel from Bot account! Please make sure the bot has permission.”


#101

and this “07:27:03] [Server thread/INFO] [com.nguyenquyhy.spongediscord]: /discord command registered.
[07:27:03] [Server thread/INFO] [com.nguyenquyhy.spongediscord]: Logging in to bot Discord account…
[07:27:03] [Server thread/INFO] [STDERR]: [sx.blah.discord.Discord4J:initLogger:200]: Discord4J: ERROR INITIALIZING LOGGER!
[07:27:03] [Server thread/INFO] [STDERR]: [sx.blah.discord.Discord4J:initLogger:201]: Discord4J: No SLF4J implementation found, reverting to the internal implementation (sx.blah.discord.Discord4J$Discord4JLogger)
[07:27:03] [Server thread/INFO] [STDERR]: [sx.blah.discord.Discord4J:initLogger:202]: Discord4J: It is highly recommended to use an full featured implementation like logback!
[07:27:03] [Server thread/INFO] [STDERR]: [discord4j.org.slf4j.helpers.Util:report:127]: SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
[07:27:03] [Server thread/INFO] [STDERR]: [discord4j.org.slf4j.helpers.Util:report:127]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[07:27:03] [Server thread/INFO] [STDERR]: [discord4j.org.slf4j.helpers.Util:report:127]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.” I have a none expiring invite link and used the current token for the bot, not sure what I am doing wrong


#102

If I log in everything works fine but the bot does not seam to be working