mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
wait a minute, how did I not think of that?
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
a3668145d9
commit
83a42a46da
4 changed files with 16 additions and 55 deletions
|
@ -664,6 +664,6 @@
|
||||||
<value>Welcome messages channel</value>
|
<value>Welcome messages channel</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ButtonDirty" xml:space="preserve">
|
<data name="ButtonDirty" xml:space="preserve">
|
||||||
<value>Can't report an issue in the under development version</value>
|
<value>Can't report an issue in the development version</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -111,28 +111,14 @@ public class AboutCommandGroup : CommandGroup
|
||||||
URL: BuildInfo.RepositoryUrl
|
URL: BuildInfo.RepositoryUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
if (BuildInfo.IsDirty)
|
|
||||||
{
|
|
||||||
var dirtyButton = new ButtonComponent(
|
|
||||||
ButtonComponentStyle.Link,
|
|
||||||
Messages.ButtonDirty,
|
|
||||||
new PartialEmoji(Name: "⚠️"),
|
|
||||||
URL: BuildInfo.IssuesUrl,
|
|
||||||
IsDisabled: true
|
|
||||||
);
|
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
|
||||||
new FeedbackMessageOptions(MessageComponents: new[]
|
|
||||||
{
|
|
||||||
new ActionRowComponent(new[] { repositoryButton, dirtyButton })
|
|
||||||
}), ct);
|
|
||||||
}
|
|
||||||
|
|
||||||
var issuesButton = new ButtonComponent(
|
var issuesButton = new ButtonComponent(
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
BuildInfo.IsDirty
|
||||||
|
? Messages.ButtonReportIssue
|
||||||
|
: Messages.ButtonDirty,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: BuildInfo.IssuesUrl
|
URL: BuildInfo.IssuesUrl,
|
||||||
|
IsDisabled: BuildInfo.IsDirty
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -68,28 +68,14 @@ public class ErrorLoggingPostExecutionEvent : IPostExecutionEvent
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
if (BuildInfo.IsDirty)
|
|
||||||
{
|
|
||||||
var dirtyButton = new ButtonComponent(
|
|
||||||
ButtonComponentStyle.Link,
|
|
||||||
Messages.ButtonDirty,
|
|
||||||
new PartialEmoji(Name: "⚠️"),
|
|
||||||
URL: BuildInfo.IssuesUrl,
|
|
||||||
IsDisabled: true
|
|
||||||
);
|
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
|
||||||
new FeedbackMessageOptions(MessageComponents: new[]
|
|
||||||
{
|
|
||||||
new ActionRowComponent(new[] { dirtyButton })
|
|
||||||
}), ct);
|
|
||||||
}
|
|
||||||
|
|
||||||
var issuesButton = new ButtonComponent(
|
var issuesButton = new ButtonComponent(
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
BuildInfo.IsDirty
|
||||||
|
? Messages.ButtonReportIssue
|
||||||
|
: Messages.ButtonDirty,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: BuildInfo.IssuesUrl
|
URL: BuildInfo.IssuesUrl,
|
||||||
|
IsDisabled: BuildInfo.IsDirty
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -113,25 +113,14 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
if (BuildInfo.IsDirty)
|
|
||||||
{
|
|
||||||
var dirtyButton = new ButtonComponent(
|
|
||||||
ButtonComponentStyle.Link,
|
|
||||||
Messages.ButtonDirty,
|
|
||||||
new PartialEmoji(Name: "⚠️"),
|
|
||||||
URL: BuildInfo.IssuesUrl,
|
|
||||||
IsDisabled: true
|
|
||||||
);
|
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
|
||||||
components: new[] { new ActionRowComponent(new[] { dirtyButton }) }, ct: ct);
|
|
||||||
}
|
|
||||||
|
|
||||||
var issuesButton = new ButtonComponent(
|
var issuesButton = new ButtonComponent(
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
BuildInfo.IsDirty
|
||||||
|
? Messages.ButtonReportIssue
|
||||||
|
: Messages.ButtonDirty,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: BuildInfo.IssuesUrl
|
URL: BuildInfo.IssuesUrl,
|
||||||
|
IsDisabled: BuildInfo.IsDirty
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
||||||
|
|
Loading…
Add table
Reference in a new issue