Added timestamp call to Emmelia builder

This commit is contained in:
Logan Cusano
2023-02-26 22:26:41 -05:00
parent 14b107dd51
commit 94a4694a04
4 changed files with 4 additions and 7 deletions

View File

@@ -47,8 +47,7 @@ module.exports = {
.addFields(
{ name: 'Generated Text', value: result.promptResult },
)
.addFields({ name: 'Tokens Used', value: `${result.totalTokens}`, inline: true })
.setTimestamp()
.addFields({ name: 'Tokens Used', value: `${result.totalTokens}`, inline: true })
await interaction.editReply({ embeds: [gptEmbed], ephemeral: false });
});

View File

@@ -51,8 +51,7 @@ module.exports = {
.setColor(0x0099FF)
.setTitle(`New Image Result`)
.setDescription(`${interaction.member.user} sent the prompt: '${promptText}'`)
.addFields({ name: 'Tokens Used', value: `${this.defaultTokenUsage}`, inline: true })
.setTimestamp()
.addFields({ name: 'Tokens Used', value: `${this.defaultTokenUsage}`, inline: true })
const imagesInResult = Array(imageResults.results.data).length

View File

@@ -23,7 +23,6 @@ module.exports = {
{ name: 'Text (ChatGPT)', value: `Tokens are used in the prompt and in the response of a generation. The max tokens will not be breached by the combined prompt and response. Keep this is mind when using text generations. Each syllable is one token. This section is 50 tokens.` },
{ name: 'Images (DALL-E)', value: `Tokens are used for each generation, variation, and upscale. The image size also affects the amount of tokens used: 256px = 800 tokens, 512px = 900 tokens, 1024px = 1000 tokens` }
)
.setTimestamp()
await interaction.reply({ embeds: [pricingEmbed] });

View File

@@ -6,6 +6,7 @@ const { NodeHtmlMarkdown } = require('node-html-markdown');
exports.EmmeliaEmbedBuilder = class PostEmbedBuilder extends EmbedBuilder {
constructor() {
super()
this.setTimestamp();
this.setFooter({ text: 'Brought to you by Emmelia.' });
}
}
@@ -85,8 +86,7 @@ exports.sendPost = (post, source, channel, callback) => {
.setURL(postLink)
.addFields({ name: "Post Content", value: postContent, inline: false })
.addFields({ name: 'Published', value: postPubDate, inline: true })
.addFields({ name: 'Source', value: postSourceLink, inline: true })
.setTimestamp()
.addFields({ name: 'Source', value: postSourceLink, inline: true })
if (postImage) rssMessage.setImage(postImage);