Можно через MirLua
local mbb = require('m_msg_buttonsbar')
local icolib = require('m_icolib')
local bbButton =
{
Module = "MirLua_SendFile",
ButtonID = 1234,
Flags = 160,
Tooltip = m.Translate("Send file"),
Icon = icolib.AddIcon("MirLua_SendFileIcon", "Send File")
}
mbb.AddButton(bbButton)
m.HookEvent("TabSRMM/ButtonsBar/ButtonPressed", function(w, l)
local bbc = CustomButtonClickData(l)
if bbc.Module == bbButton.Module and bbc.ButtonID == bbButton.ButtonID then
m.CallService('SRFile/SendCommand', bbc.hContact, 0)
end
end)