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 GuildDataService _guildData;
|
||||||
private readonly IDiscordRestUserAPI _userApi;
|
private readonly IDiscordRestUserAPI _userApi;
|
||||||
|
|
||||||
|
// ReSharper disable once NotAccessedField.Local
|
||||||
|
private readonly IDiscordRestInteractionAPI _interactionApi;
|
||||||
|
|
||||||
public RemindCommandGroup(
|
public RemindCommandGroup(
|
||||||
ICommandContext context, GuildDataService guildData, IFeedbackService feedback,
|
ICommandContext context, GuildDataService guildData, IFeedbackService feedback,
|
||||||
IDiscordRestUserAPI userApi)
|
IDiscordRestUserAPI userApi, IDiscordRestInteractionAPI interactionApi)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
_guildData = guildData;
|
_guildData = guildData;
|
||||||
_feedback = feedback;
|
_feedback = feedback;
|
||||||
_userApi = userApi;
|
_userApi = userApi;
|
||||||
|
_interactionApi = interactionApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -163,6 +167,8 @@ public class RemindCommandGroup : CommandGroup
|
||||||
return (Result)messageResult;
|
return (Result)messageResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// var a = await _interactionApi.GetOriginalInteractionResponseAsync(message.Application.Value.ID.Value, "", ct);
|
||||||
|
//TODO
|
||||||
memberData.Reminders.Add(
|
memberData.Reminders.Add(
|
||||||
new Reminder
|
new Reminder
|
||||||
{
|
{
|
||||||
|
@ -171,6 +177,7 @@ public class RemindCommandGroup : CommandGroup
|
||||||
Text = text,
|
Text = text,
|
||||||
MessageId = message.ID.Value
|
MessageId = message.ID.Value
|
||||||
});
|
});
|
||||||
|
|
||||||
return (Result)messageResult;
|
return (Result)messageResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
@ -227,9 +228,8 @@ public sealed partial class MemberUpdateService : BackgroundService
|
||||||
|
|
||||||
var embed = new EmbedBuilder().WithSmallTitle(
|
var embed = new EmbedBuilder().WithSmallTitle(
|
||||||
string.Format(Messages.Reminder, user.GetTag()), user)
|
string.Format(Messages.Reminder, user.GetTag()), user)
|
||||||
.WithTitle(
|
.WithDescription(string.Format(Messages.DescriptionReminder, Markdown.InlineCode(reminder.Text)) +
|
||||||
string.Format(Messages.DescriptionReminder, Markdown.InlineCode(reminder.Text)))
|
$" (https://discord.com/channels/{guildId.Value}/{reminder.ChannelId}/{reminder.MessageId})")
|
||||||
.WithDescription(string.Format(Messages.DescriptionActionJumpToMessage, $"https://discord.com/channels/{guildId.Value}/{reminder.ChannelId}/{reminder.MessageId}"))
|
|
||||||
.WithColour(ColorsList.Magenta)
|
.WithColour(ColorsList.Magenta)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue