Skip to content

Commit 33c1d76

Browse files
committed
Added public to BetterEmbed methods.
1 parent f924901 commit 33c1d76

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/BetterEmbed.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class BetterEmbed extends MessageEmbed {
5252
super(data);
5353
this.checkSize();
5454
}
55-
56-
static fromTemplate(template: keyof typeof templates | typeof templates | MessageEmbedOptions, values: AnyObject) {
55+
56+
public static fromTemplate(template: keyof typeof templates | typeof templates | MessageEmbedOptions, values: AnyObject) {
5757
if (typeof template === 'string')
5858
if (templates[template]) template = templates[template];
5959
else throw new Error(`Template '${template}' not found.`);
@@ -79,7 +79,7 @@ class BetterEmbed extends MessageEmbed {
7979
return new BetterEmbed(setValues(template as AnyObject, values));
8080
}
8181

82-
checkSize() {
82+
public checkSize() {
8383
if (this.title && this.title.length > limits.title) throw new RangeError(`embed.title is too long (${limits.title}).`);
8484
if (this.author?.name && this.author.name.length > limits.author.name) throw new RangeError(`embed.author.name is too long (${limits.author.name}).`);
8585
if (this.description && this.description.length > limits.description) throw new RangeError(`embed.description is too long (${limits.description}).`);
@@ -90,8 +90,8 @@ class BetterEmbed extends MessageEmbed {
9090
if (field.value?.length > limits.fields.value) throw new RangeError(`embed.fields[${this.fields.indexOf(field)}].value is too long (${limits.fields.value}).`);
9191
});
9292
}
93-
94-
cutIfTooLong() {
93+
94+
public cutIfTooLong() {
9595
function cutWithLength(text: string, maxLength: number) {
9696
return text.length > maxLength ? `${text.substring(0, maxLength - 3)}...` : text;
9797
}

0 commit comments

Comments
 (0)