public async Task Profile(IUser user) { User u = Functions.GetUser(user); JEmbed emb = new JEmbed(); emb.Author.Name = user.Username; emb.ColorStripe = Functions.GetColor(user); emb.ThumbnailUrl = user.GetAvatarUrl(); emb.Fields.Add(new JEmbedField(":trophy:Level:trophy:", Convert.ToString(u.GetLevel()))); emb.Fields.Add(new JEmbedField(":moneybag:Coins:moneybag:", Convert.ToString(u.GetCoins()))); await Context.Channel.SendMessageAsync("", embed : emb.Build()); }
public async Task Help() { JEmbed emb = new JEmbed(); emb.Author.Name = "Commands"; emb.ColorStripe = Constants.Colours.PEACH; foreach (CommandInfo command in Bot.commands.Commands) { emb.Fields.Add(new JEmbedField(x => { string header = "?" + command.Name; foreach (ParameterInfo parameter in command.Parameters) { header += " [" + parameter.Name + "]"; } x.Header = header; x.Text = command.Summary; })); } await Context.Channel.SendMessageAsync("", embed : emb.Build()); }