From 94a4694a04008b28229151fb54638ee8efdef733 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 26 Feb 2023 22:26:41 -0500 Subject: [PATCH] Added timestamp call to Emmelia builder --- commands/chat.js | 3 +-- commands/imagine.js | 3 +-- commands/pricing.js | 1 - libUtils.js | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/commands/chat.js b/commands/chat.js index f4d0017..c770a47 100644 --- a/commands/chat.js +++ b/commands/chat.js @@ -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 }); }); diff --git a/commands/imagine.js b/commands/imagine.js index 80fede3..1633de8 100644 --- a/commands/imagine.js +++ b/commands/imagine.js @@ -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 diff --git a/commands/pricing.js b/commands/pricing.js index afc0601..5fcc2aa 100644 --- a/commands/pricing.js +++ b/commands/pricing.js @@ -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] }); diff --git a/libUtils.js b/libUtils.js index a06956e..eb127f4 100644 --- a/libUtils.js +++ b/libUtils.js @@ -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);