1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-20 00:43:36 +03:00

Resolve conversations

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-17 21:24:32 +03:00
parent 7565f83013
commit f4a6b00f26
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1
5 changed files with 7 additions and 13 deletions

View file

@ -17,12 +17,3 @@ public static class ColorsList
public static readonly Color Black = Color.Black; public static readonly Color Black = Color.Black;
public static readonly Color White = Color.WhiteSmoke; public static readonly Color White = Color.WhiteSmoke;
} }
/// <summary>
/// Contains all links used in buttons.
/// </summary>
public static class Links
{
public const string Repository = "https://github.com/LabsDevelopment/Octobot";
public const string Issues = $"{Repository}/issues";
}

View file

@ -103,14 +103,14 @@ public class AboutCommandGroup : CommandGroup
ButtonComponentStyle.Link, ButtonComponentStyle.Link,
Messages.ButtonOpenRepository, Messages.ButtonOpenRepository,
new PartialEmoji(Name: "🌐"), new PartialEmoji(Name: "🌐"),
URL: Links.Repository URL: Octobot.IssuesUrl
); );
var issuesButton = new ButtonComponent( var issuesButton = new ButtonComponent(
ButtonComponentStyle.Link, ButtonComponentStyle.Link,
Messages.ButtonReportIssue, Messages.ButtonReportIssue,
new PartialEmoji(Name: "⚠️"), new PartialEmoji(Name: "⚠️"),
URL: Links.Issues URL: Octobot.IssuesUrl
); );
return await _feedback.SendContextualEmbedResultAsync(embed, return await _feedback.SendContextualEmbedResultAsync(embed,

View file

@ -72,7 +72,7 @@ public class ErrorLoggingPostExecutionEvent : IPostExecutionEvent
ButtonComponentStyle.Link, ButtonComponentStyle.Link,
Messages.ButtonReportIssue, Messages.ButtonReportIssue,
new PartialEmoji(Name: "⚠️"), new PartialEmoji(Name: "⚠️"),
URL: Links.Issues URL: Octobot.IssuesUrl
); );
return await _feedback.SendContextualEmbedResultAsync(embed, return await _feedback.SendContextualEmbedResultAsync(embed,

View file

@ -27,6 +27,9 @@ public sealed class Octobot
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>());
public const string RepositoryUrl = "https://github.com/LabsDevelopment/Octobot";
public const string IssuesUrl = $"{RepositoryUrl}/issues";
public static async Task Main(string[] args) public static async Task Main(string[] args)
{ {
var host = CreateHostBuilder(args).UseConsoleLifetime().Build(); var host = CreateHostBuilder(args).UseConsoleLifetime().Build();

View file

@ -117,7 +117,7 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
ButtonComponentStyle.Link, ButtonComponentStyle.Link,
Messages.ButtonReportIssue, Messages.ButtonReportIssue,
new PartialEmoji(Name: "⚠️"), new PartialEmoji(Name: "⚠️"),
URL: Links.Issues URL: Octobot.IssuesUrl
); );
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed, return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,