While making Context.Message.Author as a default value of SocketGuildUser, throws CS1736 error (The expression being assigned to optional parameter `user' must be a constant or default value). Here is my code:
[Command("whois")]
[Alias("userinfo")]
public async Task userinfo(SocketGuildUser user = Context.Message.Author)
{
var embed = new EmbedBuilder();
embed.WithTitle("Info of " + "<@" + user.Id + ">");
embed.WithDescription(
"Status: " + user.Status + newline +
"Joined: " + user.JoinedAt + newline +
"Registered: " + user.CreatedAt + newline + newline +
"Roles: " + user.Roles + newline +
"Key permissions: " + user.GuildPermissions + newline + newline +
"Voice channel: " + user.VoiceChannel + newline +
"Voice session ID: " + user.VoiceSessionId + newline +
"Voice state: " + user.VoiceState
);
embed.WithThumbnailUrl(user.GetAvatarUrl());
embed.WithFooter("If you think that this is a bit too many info, dm me: Dawid#3216 or join support server: https://discord.gg/E27bFsW");
embed.WithCurrentTimestamp();
embed.WithColor(new Color(25, 25, 255));
;
await Context.Channel.SendMessageAsync("", false, embed);
}