Disable issue report button if dirty version detected (#275)

In this PR, I'm disabling the Report Issue button if a "dirty" version
is detected. This is done just in case so that "smart" developers don't
accidentally report a bug that they themselves created.

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-20 15:59:25 +03:00 committed by GitHub
parent ecb92a318c
commit ca49231c86
Signed by: GitHub
GPG key ID: B5690EEEBB952194
8 changed files with 31 additions and 7 deletions

View file

@ -115,9 +115,12 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
var issuesButton = new ButtonComponent(
ButtonComponentStyle.Link,
Messages.ButtonReportIssue,
BuildInfo.IsDirty
? Messages.ButtonDirty
: Messages.ButtonReportIssue,
new PartialEmoji(Name: "⚠️"),
URL: BuildInfo.IssuesUrl
URL: BuildInfo.IssuesUrl,
IsDisabled: BuildInfo.IsDirty
);
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,