mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 08:08:54 +00:00
feat: finalize comment section nodes (#280)
* fix: comment translation proto missing channel id * feat: finalize nodes * docs: update API ref * chore: update tests
This commit is contained in:
25
src/parser/classes/comments/PdgCommentChip.ts
Normal file
25
src/parser/classes/comments/PdgCommentChip.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Text from '../misc/Text';
|
||||
import { YTNode } from '../../helpers';
|
||||
|
||||
class PdgCommentChip extends YTNode {
|
||||
static type = 'PdgCommentChip';
|
||||
|
||||
text: Text;
|
||||
color_pallette: {
|
||||
background_color: string;
|
||||
foreground_title_color: string;
|
||||
};
|
||||
icon_type: string;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
this.text = new Text(data.chipText);
|
||||
this.color_pallette = {
|
||||
background_color: data.chipColorPalette?.backgroundColor,
|
||||
foreground_title_color: data.chipColorPalette?.foregroundTitleColor
|
||||
};
|
||||
this.icon_type = data.chipIcon?.iconType;
|
||||
}
|
||||
}
|
||||
|
||||
export default PdgCommentChip;
|
||||
Reference in New Issue
Block a user