diff --git a/Boyfriend.csproj b/Boyfriend.csproj
index 29483d7..7048cfb 100644
--- a/Boyfriend.csproj
+++ b/Boyfriend.csproj
@@ -24,26 +24,4 @@
-
-
-
-
-
- True
- True
- Messages.resx
-
-
-
-
-
-
- ResXFileCodeGenerator
- Messages.Designer.cs
-
-
-
-
-
-
diff --git a/Commands/KickCommandGroup.cs b/Commands/KickCommandGroup.cs
index e70a903..da7b2c5 100644
--- a/Commands/KickCommandGroup.cs
+++ b/Commands/KickCommandGroup.cs
@@ -42,15 +42,15 @@ public class KickCommandGroup : CommandGroup {
}
///
- /// A slash command that kicks a Discord user with the specified reason.
+ /// A slash command that kicks a Discord member with the specified reason.
///
- /// The user to kick.
+ /// The member to kick.
///
/// The reason for this kick. Must be encoded with when passed to
/// .
///
///
- /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
+ /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
/// was kicked and vice-versa.
///
[Command("kick", "кик")]
@@ -59,8 +59,8 @@ public class KickCommandGroup : CommandGroup {
[RequireBotDiscordPermissions(DiscordPermission.KickMembers)]
[Description("Kick member")]
public async Task KickUserAsync(
- [Description("Member to kick")] IUser target,
- [Description("Kick reason")] string reason) {
+ [Description("Member to kick")] IUser target,
+ [Description("Kick reason")] string reason) {
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var userId))
return Result.FromError(
new ArgumentNullError(nameof(_context), "Unable to retrieve necessary IDs from command context"));
diff --git a/Commands/MuteCommandGroup.cs b/Commands/MuteCommandGroup.cs
index cdf750d..764b4f4 100644
--- a/Commands/MuteCommandGroup.cs
+++ b/Commands/MuteCommandGroup.cs
@@ -44,16 +44,16 @@ public class MuteCommandGroup : CommandGroup {
}
///
- /// A slash command that mutes a Discord user with the specified reason.
+ /// A slash command that mutes a Discord member with the specified reason.
///
- /// The user to mute.
- /// The duration for this mute. The user will be automatically unmuted after this duration.
+ /// The member to mute.
+ /// The duration for this mute. The member will be automatically unmuted after this duration.
///
/// The reason for this mute. Must be encoded with when passed to
/// .
///
///
- /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
+ /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
/// was muted and vice-versa.
///
///
@@ -63,10 +63,9 @@ public class MuteCommandGroup : CommandGroup {
[RequireBotDiscordPermissions(DiscordPermission.ModerateMembers)]
[Description("Mute member")]
public async Task MuteUserAsync(
- [Description("Member to mute")] IUser target,
- [Description("Mute reason")] string reason,
- [Description("Mute duration")]
- TimeSpan duration) {
+ [Description("Member to mute")] IUser target,
+ [Description("Mute reason")] string reason,
+ [Description("Mute duration")] TimeSpan duration) {
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var userId))
return Result.FromError(
new ArgumentNullError(nameof(_context), "Unable to retrieve necessary IDs from command context"));
@@ -156,15 +155,15 @@ public class MuteCommandGroup : CommandGroup {
}
///
- /// A slash command that unmutes a Discord user with the specified reason.
+ /// A slash command that unmutes a Discord member with the specified reason.
///
- /// The user to unmute.
+ /// The member to unmute.
///
/// The reason for this unmute. Must be encoded with when passed to
/// .
///
///
- /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the user
+ /// A feedback sending result which may or may not have succeeded. A successful result does not mean that the member
/// was unmuted and vice-versa.
///
///
@@ -175,10 +174,8 @@ public class MuteCommandGroup : CommandGroup {
[RequireBotDiscordPermissions(DiscordPermission.ModerateMembers)]
[Description("Unmute member")]
public async Task UnmuteUserAsync(
- [Description("Member to unmute")]
- IUser target,
- [Description("Unmute reason")]
- string reason) {
+ [Description("Member to unmute")] IUser target,
+ [Description("Unmute reason")] string reason) {
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var userId))
return Result.FromError(
new ArgumentNullError(nameof(_context), "Unable to retrieve necessary IDs from command context"));
diff --git a/Commands/RemindCommandGroup.cs b/Commands/RemindCommandGroup.cs
index 5ee7a8c..d1c4519 100644
--- a/Commands/RemindCommandGroup.cs
+++ b/Commands/RemindCommandGroup.cs
@@ -33,9 +33,18 @@ public class RemindCommandGroup : CommandGroup {
_userApi = userApi;
}
+ ///
+ /// A slash command that schedules a reminder with the specified text.
+ ///
+ /// The period of time which must pass before the reminder will be sent.
+ /// The text of the reminder.
+ /// A feedback sending result which may or may not have succeeded.
[Command("remind")]
[Description("Create a reminder")]
- public async Task AddReminderAsync(TimeSpan duration, string text) {
+ public async Task AddReminderAsync(
+ [Description("After what period of time mention the reminder")]
+ TimeSpan @in,
+ [Description("Reminder message")] string message) {
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var userId))
return Result.FromError(
new ArgumentNullError(nameof(_context), "Unable to retrieve necessary IDs from command context"));
@@ -44,13 +53,13 @@ public class RemindCommandGroup : CommandGroup {
if (!userResult.IsDefined(out var user))
return Result.FromError(userResult);
- var remindAt = DateTimeOffset.UtcNow.Add(duration);
+ var remindAt = DateTimeOffset.UtcNow.Add(@in);
(await _dataService.GetMemberData(guildId.Value, userId.Value, CancellationToken)).Reminders.Add(
new Reminder {
RemindAt = remindAt,
Channel = channelId.Value,
- Text = text
+ Text = message
});
var embed = new EmbedBuilder().WithSmallTitle(string.Format(Messages.ReminderCreated, user.GetTag()), user)
diff --git a/Commands/SettingsCommandGroup.cs b/Commands/SettingsCommandGroup.cs
index 7e4763f..a1b0b55 100644
--- a/Commands/SettingsCommandGroup.cs
+++ b/Commands/SettingsCommandGroup.cs
@@ -5,11 +5,8 @@ using Boyfriend.Data;
using Boyfriend.Services;
using Remora.Commands.Attributes;
using Remora.Commands.Groups;
-using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.API.Abstractions.Rest;
-using Remora.Discord.Commands.Attributes;
using Remora.Discord.Commands.Contexts;
-using Remora.Discord.Commands.Feedback.Messages;
using Remora.Discord.Commands.Feedback.Services;
using Remora.Discord.Extensions.Embeds;
using Remora.Discord.Extensions.Formatting;
@@ -44,9 +41,8 @@ public class SettingsCommandGroup : CommandGroup {
///
/// A feedback sending result which may or may not have succeeded.
///
- [Command("settings list")]
+ [Command("settingslist")]
[Description("Shows settings list for this server")]
- [SuppressInteractionResponse(suppress: true)]
public async Task SendSettingsListAsync() {
if (!_context.TryGetContextIDs(out var guildId, out _, out _))
return Result.FromError(
@@ -77,21 +73,21 @@ public class SettingsCommandGroup : CommandGroup {
.Build();
if (!embed.IsDefined(out var built)) return Result.FromError(embed);
- return (Result)await _feedbackService.SendContextualEmbedAsync(
- built, ct: CancellationToken, options: new FeedbackMessageOptions(MessageFlags: MessageFlags.Ephemeral));
+ return (Result)await _feedbackService.SendContextualEmbedAsync(built, ct: CancellationToken);
}
///
- /// A slash command that modifies per-guild settings.
+ /// A slash command that modifies per-guild settings.
///
- ///
- /// A feedback sending result which may or may not have succeeded.
- ///
+ /// The setting to modify.
+ /// The new value of the setting.
+ /// A feedback sending result which may or may not have succeeded.
[Command("settings")]
[Description("Change settings for this server")]
public async Task EditSettingsAsync(
- [Description("настройка")] string setting,
- [Description("значение")] string value) {
+ [Description("The setting whose value you want to change")]
+ string setting,
+ [Description("Setting value")] string value) {
if (!_context.TryGetContextIDs(out var guildId, out _, out _))
return Result.FromError(
new ArgumentNullError(nameof(_context), "Unable to retrieve necessary IDs from command context"));
@@ -144,8 +140,8 @@ public class SettingsCommandGroup : CommandGroup {
var builder = new StringBuilder();
builder.Append(Markdown.InlineCode(setting))
- .Append($" {Messages.SettingIsNow} ")
- .Append(Markdown.InlineCode(value));
+ .Append($" {Messages.SettingIsNow} ")
+ .Append(Markdown.InlineCode(value));
var embed = new EmbedBuilder().WithSmallTitle(Messages.SettingSuccessfulyChanged, currentUser)
.WithDescription(builder.ToString())
diff --git a/Extensions.cs b/Extensions.cs
index bb9ff20..983aea2 100644
--- a/Extensions.cs
+++ b/Extensions.cs
@@ -159,7 +159,7 @@ public static class Extensions {
builder.AppendLine(line.Text);
}
- return Markdown.BlockCode(builder.ToString().SanitizeForBlockCode(), "diff");
+ return InBlockCode(builder.ToString());
}
public static string GetTag(this IUser user) {
diff --git a/Messages.resx b/Messages.resx
index 0bb7ab5..3b63d8d 100644
--- a/Messages.resx
+++ b/Messages.resx
@@ -549,7 +549,7 @@
Boyfriend's Settings
-
+
Setting successfuly changed
diff --git a/Messages.ru.resx b/Messages.ru.resx
index 1351ea1..2173cb0 100644
--- a/Messages.ru.resx
+++ b/Messages.ru.resx
@@ -549,7 +549,7 @@
Настройки Boyfriend
-
+
Настройка успешно изменена
diff --git a/Messages.tt-ru.resx b/Messages.tt-ru.resx
index e4a75be..6e5666c 100644
--- a/Messages.tt-ru.resx
+++ b/Messages.tt-ru.resx
@@ -549,7 +549,7 @@
приколы Boyfriend
-
+
прикол редактирован
diff --git a/docs/README.md b/docs/README.md
index 45f6a92..5a4fe26 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -43,6 +43,6 @@ the most effective way possible.
[JetBrains](https://www.jetbrains.com/), creators of [ReSharper](https://www.jetbrains.com/resharper)
and [Rider](https://www.jetbrains.com/rider), supports Boyfriend with one of
their [Open Source Licenses](https://jb.gg/OpenSourceSupport).
-Rider is the recommended IDE when working with Boyfriend, and most of the Boyfriend team uses it.
+Rider is the recommended IDE when working with Boyfriend, and everyone on the Boyfriend team uses it.
Additionally, ReSharper command-line tools made by JetBrains are used for status checks on pull requests to ensure code
quality even when not using ReSharper or Rider.