Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
EmbedBuilder: Initial code
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiatedExodus committed Feb 13, 2024
1 parent ed460d9 commit 9b68e51
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/classes/embedBuilder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { EmbedBuilder, APIEmbed, EmbedData, User } from "discord.js";

export default class MeteoriumEmbedBuilder extends EmbedBuilder {
public constructor(requester?: User, data?: EmbedData | APIEmbed) {
super(data);

this.setTimestamp();
this.setNormalColor();
this.setFooter({
text: `${requester ? `Requested by ${requester.username} (${requester.id}) | ` : ""}Meteorium | v3`,
iconURL: requester
? requester.avatarURL({ extension: "png", size: 128 }) || requester.defaultAvatarURL
: undefined,
});

return this;
}

public setNormalColor() {
this.setColor([0, 153, 255]);
return this;
}

public setErrorColor() {
this.setColor([255, 0, 0]);
return this;
}
}

0 comments on commit 9b68e51

Please sign in to comment.