Skip to content

Commit

Permalink
refactor: Improve reply validation in sticker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj-x0 committed May 16, 2024
1 parent b4039c2 commit 6a3d204
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assets/plugins/sticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ command(
type: "converter",
},
async (message, match, m) => {
const isValid =
if (
message.reply_message.video ||
message.reply_message.image ||
message.reply_message.text ||
message.reply_message.mimetype.includes("image") || message.reply_message.mimetype.includes("video");
if (isValid) return await message.reply("_Reply to photo/video/text_");
message.reply_message.text
)
return await message.reply("_Reply to photo/video/text_");
if (message.reply_message.text) {
let buff = await textToImg(message.reply_message.text);
return await message.sendMessage(
Expand Down

0 comments on commit 6a3d204

Please sign in to comment.