forked from TeamInklings/Octobot
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:
parent
ecb92a318c
commit
ca49231c86
8 changed files with 31 additions and 7 deletions
|
@ -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,
|
||||
|
|
Reference in a new issue