Skip to content

Commit 51f3e57

Browse files
committed
Added constructor.
1 parent 4717605 commit 51f3e57

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/BetterEmbed.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
import {MessageEmbed} from 'discord.js';
1+
import {MessageEmbed, MessageEmbedOptions} from 'discord.js';
22

33
export default class BetterEmbed extends MessageEmbed {
44
public static limits = {
5-
author: {
5+
author: {
66
name: 256,
77
},
8-
title: 256,
8+
title: 256,
99
description: 2048,
10-
footer: {
10+
footer: {
1111
text: 2048,
1212
},
13-
fields: {
14-
size: 25,
15-
name: 256,
13+
fields: {
14+
size: 25,
15+
name: 256,
1616
value: 1024,
1717
},
18-
}
18+
};
1919

2020
public static templates = {
2121
basic: {
22-
footer: {
23-
text: '${client.user.username}',
22+
footer: {
23+
text: '${client.user.username}',
2424
iconURL: '${client.user.displayAvatarURL()}',
2525
},
2626
timestamp: new Date(),
@@ -32,7 +32,7 @@ export default class BetterEmbed extends MessageEmbed {
3232
return {
3333
...this.basic,
3434
...this.color,
35-
title: '${title}',
35+
title: '${title}',
3636
description: '${description}',
3737
};
3838
},
@@ -45,4 +45,8 @@ export default class BetterEmbed extends MessageEmbed {
4545
};
4646
},
4747
};
48+
49+
public constructor(data?: MessageEmbed | MessageEmbedOptions) {
50+
super(data);
51+
}
4852
}

0 commit comments

Comments
 (0)