fix: tg contact behaviour
* sometimes atg update does not include a plus symbol
This commit is contained in:
parent
aace2e98e1
commit
4530c7105d
@ -78,7 +78,10 @@ bot.on("msg:contact", async (ctx) => {
|
||||
const contact = ctx.msg.contact;
|
||||
|
||||
if (ctx.from.id === contact.user_id) {
|
||||
if (contact.phone_number.slice(0, 4) !== "+254") {
|
||||
if (
|
||||
contact.phone_number.slice(0, 4) !== "+254" ||
|
||||
contact.phone_number.slice(0, 3) !== "254"
|
||||
) {
|
||||
return ctx.reply("Sarafu is only available in Kenya at the moment.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user