Skip to content

Commit

Permalink
Merge pull request #53 from Fernando-Santana-j/development
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Fernando-Santana-j authored Dec 29, 2024
2 parents 77d9ac8 + 8fe1c7b commit 272bf1d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Discord/discordIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2348,12 +2348,11 @@ module.exports.sendProductPayment = async (params, id, type) => {


try {
let productText = await productsName.join('\n');
const concatenatedString = await arrayItensTxt.join('\n');
const buffer = Buffer.from(concatenatedString, 'utf-8');
const attachment = new Discord.AttachmentBuilder(buffer, { name: 'compras.txt' });
if (arrayItensTxt.length > 0) {
let productText = await productsName.join('\n');

const concatenatedString = await arrayItensTxt.join('\n');
const buffer = Buffer.from(concatenatedString, 'utf-8');
const attachment = new Discord.AttachmentBuilder(buffer, { name: 'compras.txt' });
function sendTxtMensage(target) {
try {
target.send({
Expand Down Expand Up @@ -2458,8 +2457,8 @@ module.exports.sendProductPayment = async (params, id, type) => {
})
findChannelPrivate.send({ files: [attachment] }).catch(() => { });
} catch (error) {

console.log('Produtos:', arrayItensTxt);
console.log("SendPrivateLogError", error);

}
} else {
try {
Expand All @@ -2483,8 +2482,8 @@ module.exports.sendProductPayment = async (params, id, type) => {
})
sendTxtMensage(dono)
} catch (error) {
console.log('Produtos:', arrayItensTxt);

console.log("SendPrivateLogErrorDM", error);
}
}

Expand Down

0 comments on commit 272bf1d

Please sign in to comment.