async function addComment(value) {
		var url = 'https://comments.lbry.com/api';
		var myJSONObject = `{
			"jsonrpc": "2.0",
			"id": "null",
			"method": "get_channel_from_comment_id",
			"params": {
				"comment_id": "` + value.comment_id + `"
			}
		}`;
		var username = "";
		var success = true;
		const response = await got.post(
			url,
			{
				timeout: 2000, retry: 1,
				headers: {'Content-Type': 'application/json' },
				body: myJSONObject, responseType: 'json'
			}
		).then(res => {
			username = res.body.result.channel_name;
			var comment = value.comment;
			if (value.support_amount > 0) {
				var extra = { class: "tipmsg", message: "Tipped " + value.support_amount + " LBC"};
			} else {
				var extra = { class: "message-wrap", message: ""};
			}
			addhistory(username, comment, extra);
			nodecg.log.info(username + ":" + comment);
		}).catch(err => {
			success = false;
			nodecg.log.info("Timed out, not adding past message. LBRY API server might be down.");
		});
		return success;
	}
//get channel/username from comment id.
get channel/username from comment id.
get channel / username from comment id .
async function addComment(value) {
		var url = 'https://comments.lbry.com/api';
		var myJSONObject = `{
			"jsonrpc": "2.0",
			"id": "null",
			"method": "get_channel_from_comment_id",
			"params": {
				"comment_id": "` + value.comment_id + `"
			}
		}`;
		var username = "";
		var success = true;
		const response = await got.post(
			url,
			{
				timeout: 2000, retry: 1,
				headers: {'Content-Type': 'application/json' },
				body: myJSONObject, responseType: 'json'
			}
		).then(res => {
			username = res.body.result.channel_name;
			var comment = value.comment;
			if (value.support_amount > 0) {
				var extra = { class: "tipmsg", message: "Tipped " + value.support_amount + " LBC"};
			} else {
				var extra = { class: "message-wrap", message: ""};
			}
			addhistory(username, comment, extra);
			nodecg.log.info(username + ":" + comment);
		}).catch(err => {
			success = false;
			nodecg.log.info("Timed out, not adding past message. LBRY API server might be down.");
		});
		return success;
	}
async function addComment ( value ) { var url = 'https://comments.lbry.com/api' ; var myJSONObject = ` ` + value . comment_id + ` ` ; var username = "" ; var success = true ; const response = await got . post ( url , { timeout : 2000 , retry : 1 , headers : { 'Content-Type' : 'application/json' } , body : myJSONObject , responseType : 'json' } ) . then ( res => { username = res . body . result . channel_name ; var comment = value . comment ; if ( value . support_amount > 0 ) { var extra = { class : "tipmsg" , message : "Tipped " + value . support_amount + " LBC" } ; } else { var extra = { class : "message-wrap" , message : "" } ; } addhistory ( username , comment , extra ) ; nodecg . log . info ( username + ":" + comment ) ; } ) . catch ( err => { success = false ; nodecg . log . info ( "Timed out, not adding past message. LBRY API server might be down." ) ; } ) ; return success ; }
get channel/username from comment id.
get channel / username from comment id .