Skip to content

Commit

Permalink
swict to buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 20, 2021
1 parent 75b6a04 commit 03412b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions utils/greeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ const welcome = (pushname, gcname, picprofil) => new Promise((resolve, reject) =
.toAttachment()

const buff = image.toBuffer()
const base64 = `data:image/png;base64,${buff.toString('base64')}`
return base64
return buff
}
welcome().then((hasil) => resolve(hasil)).catch((err) => {
reject(err)
Expand All @@ -36,8 +35,7 @@ const goodbye = (pushname, gcname, picprofil) => new Promise((resolve, reject) =
.toAttachment()

const buff = image.toBuffer()
const base64 = `data:image/png;base64,${buff.toString('base64')}`
return base64
return buff
}
goodbye().then((hasil) => resolve(hasil)).catch((err) => {
reject(err)
Expand Down

0 comments on commit 03412b0

Please sign in to comment.