mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Use ThisAssembly.Git.RepositoryUrl
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
847c3211a0
commit
8cbcd84536
4 changed files with 9 additions and 12 deletions
|
@ -96,30 +96,30 @@ public class AboutCommandGroup : CommandGroup
|
||||||
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
|
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var footer = ThisAssembly.Git.IsDirty
|
|
||||||
? $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}-dirty"
|
|
||||||
: $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}";
|
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithSmallTitle(string.Format(Messages.AboutBot, bot.Username), bot)
|
.WithSmallTitle(string.Format(Messages.AboutBot, bot.Username), bot)
|
||||||
.WithDescription(builder.ToString())
|
.WithDescription(builder.ToString())
|
||||||
.WithColour(ColorsList.Cyan)
|
.WithColour(ColorsList.Cyan)
|
||||||
.WithImageUrl("https://i.ibb.co/fS6wZhh/octobot-banner.png")
|
.WithImageUrl("https://i.ibb.co/fS6wZhh/octobot-banner.png")
|
||||||
.WithFooter(string.Format(Messages.Version, footer))
|
.WithFooter(string.Format(Messages.Version, ThisAssembly.Git.IsDirty
|
||||||
|
? $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}-dirty"
|
||||||
|
// ReSharper disable once HeuristicUnreachableCode
|
||||||
|
// ^^^ while being reachable, however
|
||||||
|
: $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}"))
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var repositoryButton = new ButtonComponent(
|
var repositoryButton = new ButtonComponent(
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonOpenRepository,
|
Messages.ButtonOpenRepository,
|
||||||
new PartialEmoji(Name: "🌐"),
|
new PartialEmoji(Name: "🌐"),
|
||||||
URL: Octobot.RepositoryUrl
|
URL: ThisAssembly.Git.RepositoryUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
var issuesButton = new ButtonComponent(
|
var issuesButton = new ButtonComponent(
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
Messages.ButtonReportIssue,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: Octobot.IssuesUrl
|
URL: $"{ThisAssembly.Git.RepositoryUrl}/issues"
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class ErrorLoggingPostExecutionEvent : IPostExecutionEvent
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
Messages.ButtonReportIssue,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: Octobot.IssuesUrl
|
URL: $"{ThisAssembly.Git.RepositoryUrl}/issues"
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -22,9 +22,6 @@ namespace Octobot;
|
||||||
|
|
||||||
public sealed class Octobot
|
public sealed class Octobot
|
||||||
{
|
{
|
||||||
public const string RepositoryUrl = "https://github.com/TeamOctolings/Octobot";
|
|
||||||
public const string IssuesUrl = $"{RepositoryUrl}/issues";
|
|
||||||
|
|
||||||
public static readonly AllowedMentions NoMentions = new(
|
public static readonly AllowedMentions NoMentions = new(
|
||||||
Array.Empty<MentionType>(), Array.Empty<Snowflake>(), Array.Empty<Snowflake>());
|
Array.Empty<MentionType>(), Array.Empty<Snowflake>(), Array.Empty<Snowflake>());
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
Messages.ButtonReportIssue,
|
Messages.ButtonReportIssue,
|
||||||
new PartialEmoji(Name: "⚠️"),
|
new PartialEmoji(Name: "⚠️"),
|
||||||
URL: Octobot.IssuesUrl
|
URL: $"{ThisAssembly.Git.RepositoryUrl}/issues"
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
||||||
|
|
Loading…
Add table
Reference in a new issue