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

[1.2.1] no Discord message sent despite successful CATest() #15

Closed
gyroplast opened this issue Oct 24, 2021 · 1 comment · Fixed by #17
Closed

[1.2.1] no Discord message sent despite successful CATest() #15

gyroplast opened this issue Oct 24, 2021 · 1 comment · Fixed by #17
Assignees
Labels
faq This issue is frequently encountered and needs more exposure.. UI/UX The user interface or experience is lacking, confusing, or at least debatable.

Comments

@gyroplast
Copy link
Owner

Problem Description

The mod is enabled, and after setting a valid Discord webhook, I do receive the test message in the Discord channel when running CATest(), but no player or monster death is reported as a Discord message, only as a server broadcast, i. e. a message displayed at the top of the screen to all currently logged-in players. My expectation was that, if the test was successful, all player and monster deaths are announced in the Discord channel.

@gyroplast gyroplast self-assigned this Oct 24, 2021
@gyroplast gyroplast added the faq This issue is frequently encountered and needs more exposure.. label Oct 24, 2021
@gyroplast
Copy link
Owner Author

Up to and including version 1.2.1 it is default behaviour to only announce any death as a server broadcast, and the mod configuration must be changed in order to actually send messages to an external messenger service like Discord. The intention was to prevent invalid requests to third-party services and be a good network neighbor, but this clashes with user's expectation for the mod to "just work" after setting the bare required minimum of a Discord webhook and not having to fiddle with a configuration file needlessly.

As a Discord webhook URL is plausibility-checked before sending any request anyway, the mod will not generate bad traffic by default. To fix this UX issue, the default settings shall be comprehensively inclusive, that is even if no configuration is provided, setting a Discord webhook URL shall be sufficient to have all monster deaths and player deaths announced on all supported channels, i. e. Discord and Server at the moment. Only if a user wants to disable certain messages, configuration will be necessary.

Workaround for 1.2.1

To have messages sent to Discord, provide at least the necessary configuration settings, announce_death for monster deaths, and death_player for player deaths, in your server's modoverrides.lua:

  ["workshop-2594707725"]={
    configuration_options={
      -- Default Settings
      -- All announce channel selection options are set to a numeric value.
      -- If the value is 1, the announcement will be disabled.
      -- If the value is 2, the Default Setting will be used.
      -- If the value is 4, the announcement will be a server broadcast.
      -- If the value is 8, the announcement will be sent to Discord.
      -- The values can be added to announce on multiple channels, f. ex.:
      -- If the value is 12, the announcement will be broadcast on the
      -- server (4) AND sent to Discord (8), since 12 = 4 + 8. 
      announce_death=12, -- where to announce boss monster death, default setting
      death_player=12   -- where to announce player death, default setting
    },
    enabled=true
  }

Please refer to the documentation for a fully commented configuration snippet you can just copy into your modoverrides.lua and edit to your liking, saving you the annoying step of copying this information from a client-hosted instance as usually proposed.

If you're running a client-hosted server, you can of course just configure the mod over the game's GUI, and change the general default options Announce Player Deaths and Announce Monster Death to Discord & Server.

You will of course still have to set a webhook URL to have messages sent to Discord successfully, but these options are a "main switch" of sorts to define what kind of messages you want to have announced where, exactly.

@gyroplast gyroplast added the UI/UX The user interface or experience is lacking, confusing, or at least debatable. label Oct 24, 2021
gyroplast added a commit that referenced this issue Oct 24, 2021
Do not consider the webhook URL used in the documentation as a configuration
example as syntactically valid, and subsequently do not attempt to validate the
known invalid URL with Discord.  This prevents bogus traffic to the Discord
servers from people who are just following the instructions and not changing
the webhook URL in the example config.

Related to GH-15.
gyroplast added a commit that referenced this issue Oct 24, 2021
Modify the configuration defaults for player and monster death announcements to
send messages to the server and Discord instead of server only, and update the
config example in the documentation accordingly.

Fixes GH-15.
gyroplast added a commit that referenced this issue Oct 24, 2021
Change config defaults to send announcements on all available channels.

Fixes GH-15.
@gyroplast gyroplast mentioned this issue Oct 24, 2021
gyroplast added a commit that referenced this issue Oct 24, 2021
* version bump to development 1.2.1dev

* add formatted Steam Workshop description

* version bump to 1.2.2dev

* exempt example Discord webhook from validity check

Do not consider the webhook URL used in the documentation as a configuration
example as syntactically valid, and subsequently do not attempt to validate the
known invalid URL with Discord.  This prevents bogus traffic to the Discord
servers from people who are just following the instructions and not changing
the webhook URL in the example config.

Related to GH-15.

* [UX] change defaults to send announcements on all available channels

Modify the configuration defaults for player and monster death announcements to
send messages to the server and Discord instead of server only, and update the
config example in the documentation accordingly.

Fixes GH-15.

* version bump to 1.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq This issue is frequently encountered and needs more exposure.. UI/UX The user interface or experience is lacking, confusing, or at least debatable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant