(client, m: Message)
| 127 | |
| 128 | @Client.on_message(filters.command("base_site") & filters.private) |
| 129 | async 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 |
nothing calls this directly
no test coverage detected