Add a discord webhook for when users join for the first time. (#698)

* Add a discord webhook for when users join for the first time.

* Fix compilation error related to embed colors

* Make config migration backup use the version of the stored file

* Make DiscordConfiguration not halt startup

* Allow the registration message to be configured

* Clean up registration announcement and add userId variable

* Fix userid resolution and convert newline string to actual character
Also make WebhookHelper not fail if all destinations aren't configured
This commit is contained in:
Josh 2023-03-22 19:57:28 -05:00 committed by GitHub
parent b87c16ab7c
commit fa5ff0b490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 90 additions and 26 deletions

View file

@ -139,7 +139,7 @@ public class PhotosController : ControllerBase
Title = "New photo uploaded!",
Description = $"{user.Username} uploaded a new photo.",
ImageUrl = $"{ServerConfiguration.Instance.ExternalUrl}/gameAssets/{photo.LargeHash}",
Color = WebhookHelper.UnionColor,
Color = WebhookHelper.GetEmbedColor(),
}
);