class StartAndProgressHandler extends MessageHandler {

	@Override
	public int order() {
		return 90;
	}

	@Override
	public void handle(DiscordInstance instance, MessageType messageType, DataObject message) {<FILL_FUNCTION_BODY>}

}

		String nonce = getMessageNonce(message);
		String content = getMessageContent(message);
		ContentParseData parseData = ConvertUtils.parseContent(content);
		if (MessageType.CREATE.equals(messageType) && CharSequenceUtil.isNotBlank(nonce)) {
			// 任务开始
			Task task = instance.getRunningTaskByNonce(nonce);
			if (task == null) {
				return;
			}
			message.put(Constants.MJ_MESSAGE_HANDLED, true);
			task.setProperty(Constants.TASK_PROPERTY_PROGRESS_MESSAGE_ID, message.getString("id"));
			// 兼容少数content为空的场景
			if (parseData != null) {
				task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, parseData.getPrompt());
			}
			task.setStatus(TaskStatus.IN_PROGRESS);
			task.awake();
		} else if (MessageType.UPDATE.equals(messageType) && parseData != null) {
			// 任务进度
			if ("Stopped".equals(parseData.getStatus())) {
				return;
			}
			TaskCondition condition = new TaskCondition().setStatusSet(Set.of(TaskStatus.IN_PROGRESS))
					.setProgressMessageId(message.getString("id"));
			Task task = instance.findRunningTask(condition).findFirst().orElse(null);
			if (task == null) {
				return;
			}
			message.put(Constants.MJ_MESSAGE_HANDLED, true);
			task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, parseData.getPrompt());
			task.setStatus(TaskStatus.IN_PROGRESS);
			task.setProgress(parseData.getStatus());
			String imageUrl = getImageUrl(message);
			task.setImageUrl(imageUrl);
			task.setProperty(Constants.TASK_PROPERTY_MESSAGE_HASH, this.discordHelper.getMessageHash(imageUrl));
			task.awake();
		}
	
<methods>public non-sealed void <init>() ,public abstract void handle(com.github.novicezk.midjourney.loadbalancer.DiscordInstance, com.github.novicezk.midjourney.enums.MessageType, net.dv8tion.jda.api.utils.data.DataObject) ,public int order() <variables>protected com.github.novicezk.midjourney.support.DiscordHelper discordHelper,protected com.github.novicezk.midjourney.loadbalancer.DiscordLoadBalancer discordLoadBalancer