mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
resolved request changes #1
This commit is contained in:
parent
53f2a63e71
commit
5c7a946a79
2 changed files with 11 additions and 4 deletions
|
@ -31,14 +31,18 @@ public class RemindCommandGroup : CommandGroup
|
|||
private readonly GuildDataService _guildData;
|
||||
private readonly IDiscordRestUserAPI _userApi;
|
||||
|
||||
// ReSharper disable once NotAccessedField.Local
|
||||
private readonly IDiscordRestInteractionAPI _interactionApi;
|
||||
|
||||
public RemindCommandGroup(
|
||||
ICommandContext context, GuildDataService guildData, IFeedbackService feedback,
|
||||
IDiscordRestUserAPI userApi)
|
||||
IDiscordRestUserAPI userApi, IDiscordRestInteractionAPI interactionApi)
|
||||
{
|
||||
_context = context;
|
||||
_guildData = guildData;
|
||||
_feedback = feedback;
|
||||
_userApi = userApi;
|
||||
_interactionApi = interactionApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -163,6 +167,8 @@ public class RemindCommandGroup : CommandGroup
|
|||
return (Result)messageResult;
|
||||
}
|
||||
|
||||
// var a = await _interactionApi.GetOriginalInteractionResponseAsync(message.Application.Value.ID.Value, "", ct);
|
||||
//TODO
|
||||
memberData.Reminders.Add(
|
||||
new Reminder
|
||||
{
|
||||
|
@ -171,6 +177,7 @@ public class RemindCommandGroup : CommandGroup
|
|||
Text = text,
|
||||
MessageId = message.ID.Value
|
||||
});
|
||||
|
||||
return (Result)messageResult;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
@ -227,9 +228,8 @@ public sealed partial class MemberUpdateService : BackgroundService
|
|||
|
||||
var embed = new EmbedBuilder().WithSmallTitle(
|
||||
string.Format(Messages.Reminder, user.GetTag()), user)
|
||||
.WithTitle(
|
||||
string.Format(Messages.DescriptionReminder, Markdown.InlineCode(reminder.Text)))
|
||||
.WithDescription(string.Format(Messages.DescriptionActionJumpToMessage, $"https://discord.com/channels/{guildId.Value}/{reminder.ChannelId}/{reminder.MessageId}"))
|
||||
.WithDescription(string.Format(Messages.DescriptionReminder, Markdown.InlineCode(reminder.Text)) +
|
||||
$" (https://discord.com/channels/{guildId.Value}/{reminder.ChannelId}/{reminder.MessageId})")
|
||||
.WithColour(ColorsList.Magenta)
|
||||
.Build();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue