package com.yutou.napcat.enums;

public enum MessageEnum {
    TEXT("text"),
    IMAGE("image"),
    AT("at"),
    REPLY("reply"),
    JSON("json");

    String type;

    MessageEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static MessageEnum of(String type) {
        for (MessageEnum messageEnum : MessageEnum.values()) {
            if (messageEnum.getType().equals(type)) {
                return messageEnum;
            }
        }

        return null;
    }
}
