FragLand / terracord

:evergreen_tree: A Discord <-> Terraria bridge plugin for TShock
GNU General Public License v3.0
34 stars 14 forks source link

Bot Announcing "Relay available" periodically #120

Closed kaichenhaun closed 3 years ago

kaichenhaun commented 3 years ago

Just like title says. I saw another issue posted about the same thing but for a previous version. There doesn't seem to be an option in the config xml but I could just be missing it.

kaichenhaun commented 3 years ago

This seems to be what's causing the disconnect/reconnect:

[02/06/2021 13:20:50 -08:00] [Warning] 13:20:50 Gateway System.Exception: Server requested a reconnect at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Discord.ConnectionManager.<>c__DisplayClass29_0.<b__0>d.MoveNext()

It seems to work fine, I'm just looking for a way to hide the notification.

ldilley commented 3 years ago

Greetings, @kaichenhaun. The solution is outlined in issue #106. To reiterate, you need to use the 1.2.1 prerelease (or build your own DLL from the latest source code) and set the following option in terracord.xml:

  <!-- Notify Discord channel of relay availability after restoring the connection -->
  <announce reconnect="false" />

The above option value will silence the "Relay available." messages in the Discord text channel. The gateway messages appearing within the console are related to an issue with Discord.Net. This is the library that Terracord uses for Discord functionality. You can try using newer Discord.Net DLLs from their nightly builds (2.3.0 is out now). I've read that newer versions correct the gateway exceptions.

ldilley commented 3 years ago

In reference to updating Discord.Net and as an FYI: The latest commit, 55f7816 from PR #123, is working fine on my test server so far. Please let me know if the <announce reconnect> option resolves your original problem. If there is no response within 7 days, I will close this issue.

ldilley commented 3 years ago

Closing this issue since there has not been any response in over a week...