1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-30 11:09:54 +03:00

Fix some issues with slash commands & add missing docs (#46)

mctaylors: "but I use Rider too..."
This commit is contained in:
Octol1ttle 2023-07-09 20:15:39 +05:00 committed by GitHub
parent abbb58f801
commit 2dd9f023ef
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 916 additions and 1398 deletions

View file

@ -42,15 +42,15 @@ public class KickCommandGroup : CommandGroup {
}
/// <summary>
/// A slash command that kicks a Discord user with the specified reason.
/// A slash command that kicks a Discord member with the specified reason.
/// </summary>
/// <param name="target">The user to kick.</param>
/// <param name="target">The member to kick.</param>
/// <param name="reason">
/// The reason for this kick. Must be encoded with <see cref="Extensions.EncodeHeader" /> when passed to
/// <see cref="IDiscordRestGuildAPI.RemoveGuildMemberAsync" />.
/// </param>
/// <returns>
/// 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.
/// </returns>
[Command("kick", "кик")]
@ -59,8 +59,8 @@ public class KickCommandGroup : CommandGroup {
[RequireBotDiscordPermissions(DiscordPermission.KickMembers)]
[Description("Kick member")]
public async Task<Result> 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"));