MCPcopy Create free account
hub / github.com/TechifyBots/Rename-Bot / _

Function _

plugins/__init__.py:18–28  ·  view source on GitHub ↗
(bot, message)

Source from the content-addressed store, hash-verified

16
17@Client.on_message(filters.private)
18async def _(bot, message):
19 await digital_botz.add_user(bot, message)
20 user_id = message.from_user.id
21 ban_status = await digital_botz.get_ban_status(user_id)
22 if ban_status.get("is_banned", False):
23 if ( datetime.date.today() - datetime.date.fromisoformat(ban_status["banned_on"])
24 ).days > ban_status["ban_duration"]:
25 await digital_botz.remove_ban(user_id)
26 else:
27 return await message.reply_text("Sorry Sir, 😔 You are Banned!.. Please Contact - @TechifyBots")
28 await message.continue_propagation()

Callers

nothing calls this directly

Calls 3

add_userMethod · 0.80
get_ban_statusMethod · 0.80
remove_banMethod · 0.80

Tested by

no test coverage detected