mirror of
https://github.com/Nick80835/microbot
synced 2025-08-31 14:38:04 +00:00
replace owner name ping with /suggest
This commit is contained in:
@@ -198,26 +198,3 @@ async def get_user(event):
|
||||
else:
|
||||
await event.reply("Give me a user ID, username or reply!")
|
||||
return
|
||||
|
||||
|
||||
if ldr.settings.get_config("owner_name") and ldr.settings.get_config("owner_id"):
|
||||
@ldr.add(ldr.settings.get_config("owner_name"), raw_pattern=True, hide_help=True, no_disable=True)
|
||||
async def report_mention(event):
|
||||
try:
|
||||
owner_id = int(ldr.settings.get_config("owner_id"))
|
||||
sender = await event.get_sender()
|
||||
sender_username = sender.username if sender else None
|
||||
chat = await event.get_chat()
|
||||
chat_username = chat.username if chat and isinstance(chat, Channel) else None
|
||||
|
||||
if chat_username:
|
||||
message_link = f"https://t.me/{chat_username}/{event.id}"
|
||||
elif chat and event.is_channel:
|
||||
message_link = f"https://t.me/c/{chat.id}/{event.id}"
|
||||
else:
|
||||
message_link = None
|
||||
|
||||
await event.client.send_message(owner_id, f"Mention in {chat.title}!\nChat uname: {chat_username}\nChat ID: {chat.id}\nSender uname: {sender_username}\nLink: {message_link}", link_preview=False)
|
||||
await event.forward_to(int(ldr.settings.get_config("owner_id")))
|
||||
except:
|
||||
pass
|
||||
|
@@ -15,7 +15,8 @@ async def delete_message(event):
|
||||
@ldr.add("start", no_disable=True, help="A start command to start the bot so you know what this bot is capable of when you start it, dumbass.")
|
||||
async def start_cmd(event):
|
||||
await event.reply(
|
||||
f"Hi I'm {ldr.settings.get_config('bot_name') or 'μBot'}, use /help to see what commands I have!\nYou can also use /nsfw to toggle NSFW commands.",
|
||||
f"Hi I'm {ldr.settings.get_config('bot_name') or 'μBot'}, use /help to see what commands I have!\n\n"
|
||||
"You can toggle NSFW commands using /nsfw [on|off] and suggest new features using /suggest [suggestion].",
|
||||
buttons=[Button.url("Creator", "https://t.me/Nick80835"), Button.url("Source", "https://github.com/Nick80835/microbot/tree/bot")],
|
||||
link_preview=False
|
||||
)
|
||||
@@ -184,3 +185,9 @@ async def fun_toggle(event):
|
||||
elif event.args.lower() == "off":
|
||||
event.chat_db.fun_enabled = False
|
||||
await event.reply("Fun commands disabled for this chat!")
|
||||
|
||||
|
||||
if ldr.settings.get_config("owner_id"):
|
||||
@ldr.add("suggest", no_disable=True)
|
||||
async def suggestion(event):
|
||||
await event.client.send_message(int(ldr.settings.get_config("owner_id")), f"**Suggestion:** {event.args}")
|
||||
|
Reference in New Issue
Block a user