Exemple #1
0
        //CREATING A BASIC EMBED WITH FOOTER SUPPORT!
        public void CreateFooterEmbed(EmbedColour colour, string title = null, string description = null, string thumbnailurl = null, string footer_text = null, string footer_thumbnail = null)
        {
            embed.WithColor(GetEmbedColour(colour));

            if (title != null && title != "none")
            {
                embed.WithTitle(title);
            }
            if (description != null && description != "none")
            {
                embed.WithDescription(description);
            }
            if (thumbnailurl != null && thumbnailurl != "none")
            {
                embed.WithThumbnailUrl(thumbnailurl);
            }

            footer = new EmbedFooterBuilder();

            if (footer_text != null && footer_text != "none")
            {
                embed.WithFooter(footer
                                 .WithText(footer_text));
            }
            if (footer_thumbnail != null && footer_thumbnail != "none")
            {
                embed.WithFooter(footer
                                 .WithIconUrl(footer_thumbnail));
            }
        }
Exemple #2
0
        //SETTING THE COLOUR OF THE EMBED!
        private Color GetEmbedColour(EmbedColour clr)
        {
            EmbedColour chosenColour = clr;

            if (chosenColour == EmbedColour.Random)
            {
                var colours = Enum.GetValues(typeof(EmbedColour)).OfType <EmbedColour>().ToArray();
                var nxt     = new Random().Next(1, 15);

                chosenColour = colours[nxt];
            }

            return(new Color((uint)chosenColour));
        }
Exemple #3
0
        //CREATING A BASIC EMBED!
        public void CreateBasicEmbed(EmbedColour colour, string title = null, string description = null, string thumbnailurl = null)
        {
            embed.WithColor(GetEmbedColour(colour));

            if (title != null && title != "none")
            {
                embed.WithTitle(title);
            }
            if (description != null && description != "none")
            {
                embed.WithDescription(description);
            }
            if (thumbnailurl != null && thumbnailurl != "none")
            {
                embed.WithThumbnailUrl(thumbnailurl);
            }
        }