Skip to content

Commit

Permalink
requested chnages
Browse files Browse the repository at this point in the history
  • Loading branch information
AnshumanMahato committed Sep 21, 2021
1 parent 175bece commit 660deac
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion commands/allow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const pmpermit = require("../helpers/pmpermit");
const execute = async (client, msg) => {
if (config.pmpermit_enabled == "true" && !msg.to.includes("-")) {
await pmpermit.permit(msg.to.split("@")[0]);
msg.reply("*WhatsBot_Notification - ✅ Allowed*\n\nYou are allowed for PM");
msg.reply("*✅ Allowed*\n\nYou are allowed for PM\n\n _Powered by WhatsBot_");
}
};

Expand Down
2 changes: 1 addition & 1 deletion commands/block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//jshint esversion:8
const execute = async (client, msg) => {
if (!msg.to.includes("-")) {
await msg.reply(`*WhatsBot_Notification - ❌ Blocked* \n\n You have been blocked`);
await msg.reply(`*❌ Blocked* \n\n You have been blocked\n\n _Powered by WhatsBot_`);
let chat = await msg.getChat();
let contact = await chat.getContact();
contact.block();
Expand Down
2 changes: 1 addition & 1 deletion commands/mute.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const execute = async (client, msg) => {
let unmuteDate = new Date();
unmuteDate.setSeconds(Number(unmuteDate.getSeconds()) + 3600);
await chat.mute(unmuteDate);
msg.reply(`*WhatsBot_Notification - 🤫 Muted*\n\nYou have been muted for 1 hour`);
msg.reply(`*🤫 Muted*\n\nYou have been muted for 1 hour\n\n _Powered by WhatsBot_`);
}
};

Expand Down
2 changes: 1 addition & 1 deletion commands/nopm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const pmpermit = require("../helpers/pmpermit");
const execute = async (client, msg) => {
if (config.pmpermit_enabled == "true" && !msg.to.includes("-")) {
await pmpermit.nopermit(msg.to.split("@")[0]);
msg.reply("*WhatsBot_Notification - ⛔ Not Allowed*\n\nYou are not allowed for PM"); // don't change this text without discussion with Tuhin
msg.reply("*⛔ Not Allowed*\n\nYou are not allowed for PM\n\n _Powered by WhatsBot_"); // don't change this text without discussion with Tuhin
}
};

Expand Down
2 changes: 1 addition & 1 deletion commands/unmute.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const execute = async (client,msg) => {
if (!msg.to.includes("-")) {
let chat = await msg.getChat();
await chat.unmute(true);
msg.reply(`*WhatsBot_Notification - 🗣 Unmuted*\n\nYou have been unmuted`);
msg.reply(`*🗣 Unmuted*\n\nYou have been unmuted\n\n _Powered by WhatsBot_`);
}
};

Expand Down
6 changes: 3 additions & 3 deletions helpers/pmpermit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ async function handler(id) {
return {
permit: false,
block: false,
msg: `*WhatsBot_Notification - ✋ Wait*\n\n Please wait until I will get back to Online, Kindly don't send another message.`,
msg: `*✋ Wait*\n\n Please wait until I will get back to Online, Kindly don't send another message.\n\n _Powered by WhatsBot_`,
};
} else if (checkPermit.found && !checkPermit.permit) {
if (checkPermit.times > 3) {
return {
permit: false,
block: true,
msg: `*WhatsBot_Notification - ❌ Blocked*\n\n You have been blocked for spamming.`,
msg: `*❌ Blocked*\n\n You have been blocked for spamming.\n\n _Powered by WhatsBot_`,
};
} else {
var updateIt = await updateviolant(id, checkPermit.times + 1);
Expand All @@ -126,7 +126,7 @@ async function handler(id) {
return {
permit: false,
block: false,
msg: `*WhatsBot_Notification - ✋ Wait*\n\nPlease wait until I will get back to Online, Kindly don't send another message. You have ${checkPermit.times} warning(s).`,
msg: `*✋ Wait*\n\nPlease wait until I will get back to Online, Kindly don't send another message. You have ${checkPermit.times} warning(s).\n\n _Powered by WhatsBot_`,
};
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ client.on("message_create", async (msg) => {
!(await pmpermit.isPermitted(otherChat.number)) &&
!otherChat.isMe &&
!msg.body.startsWith("!") &&
!msg.body.startsWith("*WhatsBot_Notification")
!msg.body.endsWith("_Powered by WhatsBot_")
) {
await pmpermit.permit(otherChat.number);
await logger(
Expand Down

0 comments on commit 660deac

Please sign in to comment.