general changes and reducing logs
This commit is contained in:
parent
0d757b7d4e
commit
7a745a5286
16 changed files with 146 additions and 78 deletions
|
@ -1,18 +1,18 @@
|
|||
import {Fullscreen} from "./fullscreen.js";
|
||||
import {Message} from "./message.js";
|
||||
import {MarkDown} from "./markdown.js";
|
||||
import { embedjson } from "./jsontypes.js";
|
||||
|
||||
class Embed{
|
||||
type:string;
|
||||
owner:Message;
|
||||
json;
|
||||
constructor(json, owner:Message){
|
||||
console.log(json);
|
||||
json:embedjson;
|
||||
constructor(json:embedjson, owner:Message){
|
||||
this.type=this.getType(json);
|
||||
this.owner=owner;
|
||||
this.json=json;
|
||||
}
|
||||
getType(json){
|
||||
getType(json:embedjson){
|
||||
return json.type||"rich";
|
||||
}
|
||||
generateHTML(){
|
||||
|
@ -43,7 +43,6 @@ class Embed{
|
|||
return this.guild.localuser;
|
||||
}
|
||||
generateRich(){
|
||||
console.log(this.json)
|
||||
const div=document.createElement("div");
|
||||
if(this.json.color){
|
||||
div.style.backgroundColor="#"+this.json.color.toString(16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue