MCPcopy Create free account
hub / github.com/VJBots/VJ-File-Store / base_site_handler

Function base_site_handler

plugins/commands.py:294–310  ·  view source on GitHub ↗
(client, m: Message)

Source from the content-addressed store, hash-verified

292
293@Client.on_message(filters.command("base_site") & filters.private)
294async def base_site_handler(client, m: Message):
295 user_id = m.from_user.id
296 user = await get_user(user_id)
297 cmd = m.command
298 text = f"`/base_site (base_site)`\n\n<b>Current base site: None\n\n EX:</b> `/base_site shortnerdomain.com`\n\nIf You Want To Remove Base Site Then Copy This And Send To Bot - `/base_site None`"
299 if len(cmd) == 1:
300 return await m.reply(text=text, disable_web_page_preview=True)
301 elif len(cmd) == 2:
302 base_site = cmd[1].strip()
303 if base_site == None:
304 await update_user_info(user_id, {"base_site": base_site})
305 return await m.reply("<b>Base Site updated successfully</b>")
306
307 if not domain(base_site):
308 return await m.reply(text=text, disable_web_page_preview=True)
309 await update_user_info(user_id, {"base_site": base_site})
310 await m.reply("<b>Base Site updated successfully</b>")
311
312# Don't Remove Credit Tg - @VJ_Bots
313# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ

Callers

nothing calls this directly

Calls 2

get_userFunction · 0.90
update_user_infoFunction · 0.90

Tested by

no test coverage detected