1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-11 08:23:15 +03:00

Add issue button w/ some button updates (#221)

In this PR, I've added a "Report an issue" button and a few more
button-related changes:
- Add "Report an issue" button
- Add icon for "Octobot's source code"
- Rename `AboutTitleRepository` to `ButtonOpenRepository`
- Rename `OpenEventInfoButton` to `ButtonOpenEventInfo` to be consistent
with other language string names
- Rename `ColorsList.cs` to `Miscellaneous.cs`
- Add public const strings in `Octobot.cs` to get repository & issues links

---------

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-17 21:35:09 +03:00 committed by GitHub
parent 4581b402aa
commit 4dc460a269
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 68 additions and 20 deletions

View file

@ -7,6 +7,7 @@ using Remora.Discord.API.Abstractions.Gateway.Events;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.API.Abstractions.Rest;
using Remora.Discord.API.Gateway.Events;
using Remora.Discord.API.Objects;
using Remora.Discord.Extensions.Embeds;
using Remora.Discord.Gateway.Responders;
using Remora.Results;
@ -112,7 +113,14 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
.WithColour(ColorsList.Red)
.Build();
return await _channelApi.CreateMessageWithEmbedResultAsync(
channel, embedResult: errorEmbed, ct: ct);
var issuesButton = new ButtonComponent(
ButtonComponentStyle.Link,
Messages.ButtonReportIssue,
new PartialEmoji(Name: "⚠️"),
URL: Octobot.IssuesUrl
);
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
components: new[] { new ActionRowComponent(new[] { issuesButton }) }, ct: ct);
}
}