From e55b7f6b718afe7aee3817ce82d2b7ae8d2377dd Mon Sep 17 00:00:00 2001 From: Ske Date: Mon, 29 Apr 2019 20:33:21 +0200 Subject: [PATCH] bot: add member description command --- PluralKit/Bot/Commands/MemberCommands.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PluralKit/Bot/Commands/MemberCommands.cs b/PluralKit/Bot/Commands/MemberCommands.cs index 0f6e2d58..e7d43fad 100644 --- a/PluralKit/Bot/Commands/MemberCommands.cs +++ b/PluralKit/Bot/Commands/MemberCommands.cs @@ -71,6 +71,19 @@ namespace PluralKit.Bot.Commands if (newName.Contains(" ")) await Context.Channel.SendMessageAsync($"{Emojis.Note} Note that this member's name now contains spaces. You will need to surround it with \"double quotes\" when using commands referring to it."); } + [Command("description")] + [Alias("info", "bio", "text")] + [Remarks("member description Limits.MaxDescriptionLength) throw Errors.DescriptionTooLongError(description.Length); + + ContextEntity.Description = description; + await Members.Save(ContextEntity); + + await Context.Channel.SendMessageAsync($"{Emojis.Success} Member description {(description == null ? "cleared" : "changed")}."); + } + public override async Task ReadContextParameterAsync(string value) { var res = await new PKMemberTypeReader().ReadAsync(Context, value, _services);