-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed.js
More file actions
21 lines (20 loc) · 663 Bytes
/
embed.js
File metadata and controls
21 lines (20 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { EmbedBuilder } = require('discord.js');
exports.EmbedGen = function(recembed) {
let builder;
if (recembed instanceof EmbedBuilder) {
builder = recembed;
} else {
builder = new EmbedBuilder();
if (recembed.title) builder.setTitle(recembed.title);
if (recembed.description) builder.setDescription(recembed.description);
if (recembed.fields && recembed.fields.length > 0) builder.addFields(recembed.fields);
}
builder
.setColor(16096256)
.setFooter({
iconURL: 'https://cdn.discordapp.com/avatars/744954751598329858/f765dbdaa43f6eb047b9e1bf4eb37f04.png',
text: 'BentoBot by BentoBoxWorld'
})
.setTimestamp();
return builder;
};