Skip to content
Snippets Groups Projects
Verified Commit 8f4d4436 authored by vanutp's avatar vanutp
Browse files

Fix deprecation warning and error

parent f9bd0ada
Branches
No related tags found
No related merge requests found
......@@ -111,6 +111,7 @@ module.exports = async (ctx) => {
}
}
} catch (error) {
if (error.description === 'Bad Request: message to forward not found' && ctx.chat.type === 'private') break
console.error(error)
quoteMessage = null
}
......@@ -301,8 +302,7 @@ module.exports = async (ctx) => {
})
if (generate.result.image) {
// eslint-disable-next-line node/no-deprecated-api
const image = new Buffer(generate.result.image, 'base64')
const image = Buffer.from(generate.result.image, 'base64')
if (generate.result.type === 'quote') {
let replyMarkup = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment