class DiscordAccountHelper {
	private final DiscordHelper discordHelper;
	private final ProxyProperties properties;
	private final RestTemplate restTemplate;
	private final TaskStoreService taskStoreService;
	private final NotifyService notifyService;
	private final List<MessageHandler> messageHandlers;
	private final Map<String, String> paramsMap;

	public DiscordInstance createDiscordInstance(DiscordAccount account) {<FILL_FUNCTION_BODY>}
}

		if (!CharSequenceUtil.isAllNotBlank(account.getGuildId(), account.getChannelId(), account.getUserToken())) {
			throw new IllegalArgumentException("guildId, channelId, userToken must not be blank");
		}
		if (CharSequenceUtil.isBlank(account.getUserAgent())) {
			account.setUserAgent(Constants.DEFAULT_DISCORD_USER_AGENT);
		}
		var messageListener = new UserMessageListener(this.messageHandlers);
		var webSocketStarter = new SpringUserWebSocketStarter(this.discordHelper.getWss(), this.discordHelper.getResumeWss(), account, messageListener);
		var discordInstance = new DiscordInstanceImpl(account, webSocketStarter, this.restTemplate, this.taskStoreService, this.notifyService, this.paramsMap);
		messageListener.setInstance(discordInstance);
		return discordInstance;
	
<no_super_class>