plugin.description='Import settings from another chat'
plugin.commands={'import'}
plugin.help='/import <chat_id> - Imports settings, filters, triggers, and rules from another chat.'
plugin.group_only=true
plugin.admin_only=true
plugin.global_admin_only=true
functionplugin.on_message(api,message,ctx)
ifnotmessage.argsthen
returnapi.send_message(message.chat.id,'Usage: /import <chat_id>\n\nImports settings, filters, triggers, rules, and welcome messages from another chat.')
end
localsource_id=tonumber(message.args)
ifnotsource_idthen
returnapi.send_message(message.chat.id,'Please provide a valid chat ID.')
end
ifsource_id==message.chat.idthen
returnapi.send_message(message.chat.id,'You can\'t import from the same chat.')
end
-- Verify the calling user is a member of the source chat