public static EmbedBuilder GetOnLabelDeletedMessage(LabelEvent.RootObject obj) { var builder = new EmbedBuilder() { Color = Const.DISCORD_EMBED_COLOR, Description = $"{obj.sender.login} deleted a label for {obj.repository.full_name}" }; builder.AddField(x => { x.Name = "Deleted label"; x.Value = obj.label.name; x.IsInline = false; }); return(builder); }
private void OnLabel(LabelEvent.RootObject obj) { //https://developer.github.com/v3/activity/events/types/#labelevent if (obj == null) { return; } switch (obj.action) { case "created": SendEventMessage(DiscordMessageFormatter.GetOnLabelCreatedMessage(obj)); break; case "edited": SendEventMessage(DiscordMessageFormatter.GetOnLabelEditedMessage(obj)); break; case "deleted": SendEventMessage(DiscordMessageFormatter.GetOnLabelDeletedMessage(obj)); break; } }