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

Function base_site_handler

clone_plugins/commands.py:129–144  ·  view source on GitHub ↗
(client, m: Message)

Source from the content-addressed store, hash-verified

127
128@Client.on_message(filters.command("base_site") & filters.private)
129async def base_site_handler(client, m: Message):
130 user_id = m.from_user.id
131 user = await get_user(user_id)
132 cmd = m.command
133 text = f"/base_site (base_site)\n\nCurrent base site: None\n\n EX: /base_site shortnerdomain.com\n\nIf You Want To Remove Base Site Then Copy This And Send To Bot - `/base_site None`"
134
135 if len(cmd) == 1:
136 return await m.reply(text=text, disable_web_page_preview=True)
137 elif len(cmd) == 2:
138 base_site = cmd[1].strip()
139 if not domain(base_site):
140 return await m.reply(text=text, disable_web_page_preview=True)
141 await update_user_info(user_id, {"base_site": base_site})
142 await m.reply("Base Site updated successfully")
143 else:
144 await m.reply("You are not authorized to use this command.")
145
146# Don't Remove Credit Tg - @VJ_Bots
147# 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