Ejemplo n.º 1
0
        public Task <BaseResult> Command_GetAvatarAsync(
            [Name("User")][Description("The user who you wish to get the avatar for.")][DefaultValueDescription("The user who invoked this command.")]
            SocketUser target = null,
            [Name("Image_Size")][Description("The size of the resulting image.")]
            int size = 1024)
        {
            target = target ?? Context.Invoker;

            return(Ok(new EmbedBuilder
            {
                Author = target.ToEmbedAuthorBuilder().WithName($"Avatar for {target}"),
                ImageUrl = target.GetEffectiveAvatarUrl(Convert.ToUInt16(size))
            }));
        }