yagop / telegram-bot

UNMAINTAINED - A Telegram Bot based on plugins
GNU General Public License v2.0
848 stars 502 forks source link

send file #349

Closed drig0 closed 8 years ago

drig0 commented 8 years ago

hello, I am trying to make the bot send files to me these files are on the data folder,, along with : moderation.json, config.lua his name is android.apk,,,

this and the command that I have::


local function run(msg, matches) send_document(receiver, 'data/android.apk', ok_cb, false) end

  return {

description = "send file", usage = "/file ", patterns = { "^/file", "^!file" }, run = run }


but he did not send the file what could be wrong?

Brawl345 commented 8 years ago

you forgot local receiver = get_receiver(msg) before send_document

drig0 commented 8 years ago

@Brawl345 work works, very thank you master

Brawl345 commented 8 years ago

Don't forget to close the issue ;)