예제 #1
0
        public static EmbedBuilder GetDefaultEmbed(SocketCommandContext context)
        {
            EmbedBuilder rc;


            rc = new EmbedBuilder();
            rc.WithColor(EmbedColors.GetSuccessColor());
            rc.Author = new EmbedAuthorBuilder()
            {
                Name    = context.Client.CurrentUser.Username,
                IconUrl = context.Client.CurrentUser.GetAvatarUrl()
            };

            return(rc);
        }
예제 #2
0
        public static MessageProperties GetDefaultErrorMessageEmbed(
            Exception e,
            MessageProperties message,
            SocketUserMessage userMessage
            )
        {
            EmbedBuilder embed;


            embed = new EmbedBuilder();
            embed.WithColor(EmbedColors.GetErrorColor());

            embed.AddField(":warning: An unexpected error occured.", e.Message);

            message.Content = "";
            message.Embed   = embed.Build();

            // Also ensure that we are logging the exception to the event log.
            EventLogLogger.LogError(e, userMessage.Content);

            return(message);
        }