diff --git a/locale/Messages.resx b/locale/Messages.resx
index 51cc2a0..ab821ac 100644
--- a/locale/Messages.resx
+++ b/locale/Messages.resx
@@ -453,8 +453,8 @@
{0}'s reminders
-
- There's no reminder with that index!
+
+ There's no reminder in this position!
Reminder deleted
@@ -474,8 +474,8 @@
Jump to channel: {0}
-
- Index: {0}
+
+ Position in list: {0}
The reminder will be sent on: {0}
diff --git a/locale/Messages.ru.resx b/locale/Messages.ru.resx
index c18c49f..f38032b 100644
--- a/locale/Messages.ru.resx
+++ b/locale/Messages.ru.resx
@@ -453,8 +453,8 @@
Напоминания {0}
-
- У тебя нет напоминания с указанным индексом!
+
+ У тебя нет напоминания на этой позиции!
Напоминание удалено
@@ -474,8 +474,8 @@
Перейти к каналу: {0}
-
- Индекс: {0}
+
+ Позиция в списке: {0}
Напоминание будет отправлено: {0}
diff --git a/locale/Messages.tt-ru.resx b/locale/Messages.tt-ru.resx
index a1ffbac..52d6c7e 100644
--- a/locale/Messages.tt-ru.resx
+++ b/locale/Messages.tt-ru.resx
@@ -453,8 +453,8 @@
напоминалки {0}
-
- у тебя нет напоминалки с этим индексом!
+
+ у тебя нет напоминалки на этом номере!
напоминалка уничтожена
@@ -474,8 +474,8 @@
чекнуть канал: {0}
-
- индекс: {0}
+
+ номер в списке: {0}
я пну тебе это: {0}
diff --git a/src/Commands/RemindCommandGroup.cs b/src/Commands/RemindCommandGroup.cs
index ab576f0..89e9a7e 100644
--- a/src/Commands/RemindCommandGroup.cs
+++ b/src/Commands/RemindCommandGroup.cs
@@ -88,7 +88,7 @@ public class RemindCommandGroup : CommandGroup
for (var i = 0; i < data.Reminders.Count; i++)
{
var reminder = data.Reminders[i];
- builder.Append("- ").AppendLine(string.Format(Messages.ReminderIndex, Markdown.InlineCode(i.ToString())))
+ builder.Append("- ").AppendLine(string.Format(Messages.ReminderPosition, Markdown.InlineCode((i + 1).ToString())))
.Append(" - ").AppendLine(string.Format(Messages.ReminderText, Markdown.InlineCode(reminder.Text)))
.Append(" - ")
.AppendLine(string.Format(Messages.ReminderWillBeSentOn, Markdown.Timestamp(reminder.At)));
@@ -142,8 +142,9 @@ public class RemindCommandGroup : CommandGroup
Snowflake channelId, IUser executor, CancellationToken ct = default)
{
var remindAt = DateTimeOffset.UtcNow.Add(@in);
+ var memberData = data.GetOrCreateMemberData(executor.ID);
- data.GetOrCreateMemberData(executor.ID).Reminders.Add(
+ memberData.Reminders.Add(
new Reminder
{
At = remindAt,
@@ -159,15 +160,16 @@ public class RemindCommandGroup : CommandGroup
string.Format(Messages.ReminderCreated, executor.GetTag()), executor)
.WithDescription(builder.ToString())
.WithColour(ColorsList.Green)
+ .WithFooter(string.Format(Messages.ReminderPosition, memberData.Reminders.Count))
.Build();
return await _feedback.SendContextualEmbedResultAsync(embed, ct);
}
///
- /// A slash command that deletes a reminder using its index.
+ /// A slash command that deletes a reminder using its list position.
///
- /// The index of the reminder to delete.
+ /// The list position of the reminder to delete.
/// A feedback sending result which may or may not have succeeded.
[Command("delremind")]
[Description("Delete one of your reminders")]
@@ -175,8 +177,8 @@ public class RemindCommandGroup : CommandGroup
[RequireContext(ChannelContext.Guild)]
[UsedImplicitly]
public async Task ExecuteDeleteReminderAsync(
- [Description("Index of reminder to delete")] [MinValue(0)]
- int index)
+ [Description("Position in list")] [MinValue(1)]
+ int position)
{
if (!_context.TryGetContextIDs(out var guildId, out _, out var executorId))
{
@@ -192,7 +194,7 @@ public class RemindCommandGroup : CommandGroup
var data = await _guildData.GetData(guildId, CancellationToken);
Messages.Culture = GuildSettings.Language.Get(data.Settings);
- return await DeleteReminderAsync(data.GetOrCreateMemberData(executorId), index, bot, CancellationToken);
+ return await DeleteReminderAsync(data.GetOrCreateMemberData(executorId), position - 1, bot, CancellationToken);
}
private async Task DeleteReminderAsync(MemberData data, int index, IUser bot,
@@ -200,7 +202,7 @@ public class RemindCommandGroup : CommandGroup
{
if (index >= data.Reminders.Count)
{
- var failedEmbed = new EmbedBuilder().WithSmallTitle(Messages.InvalidReminderIndex, bot)
+ var failedEmbed = new EmbedBuilder().WithSmallTitle(Messages.InvalidReminderPosition, bot)
.WithColour(ColorsList.Red)
.Build();
diff --git a/src/Messages.Designer.cs b/src/Messages.Designer.cs
index ca63b96..ebf7fec 100644
--- a/src/Messages.Designer.cs
+++ b/src/Messages.Designer.cs
@@ -738,9 +738,9 @@ namespace Octobot {
}
}
- internal static string InvalidReminderIndex {
+ internal static string InvalidReminderPosition {
get {
- return ResourceManager.GetString("InvalidReminderIndex", resourceCulture);
+ return ResourceManager.GetString("InvalidReminderPosition", resourceCulture);
}
}
@@ -780,9 +780,9 @@ namespace Octobot {
}
}
- internal static string ReminderIndex {
+ internal static string ReminderPosition {
get {
- return ResourceManager.GetString("ReminderIndex", resourceCulture);
+ return ResourceManager.GetString("ReminderPosition", resourceCulture);
}
}