Nukesor / archivebot

:floppy_disk: A telegram bot for backing up and collecting all kinds of media.
MIT License
98 stars 31 forks source link

Working on group #6

Closed mattiaburati closed 5 years ago

mattiaburati commented 5 years ago

Hi, today i tried to set up this bot, it work only from bot interface, if i invite the bot on a group it will not save any photo, but command still work

Nukesor commented 5 years ago

How does the output of your /info command look like? Something like this?

Current settings:

Name: testgroup
Active: True
Accepted Media: document photo
Verbose: False
Allow duplicates: True
Sort files by User: True
mattiaburati commented 5 years ago

cattura Thanks you for reply. The name of the group is "Prova" and this is my output of /info.

Nukesor commented 5 years ago

Well. Are there any error messages in the bot output? I guess you adjusted the TARGET_DIR option in the config.py to your desired output location.

mattiaburati commented 5 years ago

capture So, this is my config.py if you want you can try my bot by searching on telegram @ohmd_bot

Nukesor commented 5 years ago

I just tested your bot and everything seems to work fine, except for saving/zipping files. I assume the prova directory is empty as well?

My first guess would be that archivebot doesn't handle files/paths accordingly to a windows filesystem yet. This should be a fairly quick fix, but I currently don't own a computer with a Windows OS right now. Do you have some spare time to investigate this issue?

mattiaburati commented 5 years ago

Prova folder have only photos and document saved by the bot (not i group). If you want i can give you the access to my vps so you can work with windows and bot :)

Nukesor commented 5 years ago

Ahh I have an Idea. Did you disable the privacy mode for your bot? If you run ArchiveBot as a normal Bot (Not an Userbot) you need to disable the privacy mode via the BotFather. Telegram Bots aren't allowed to read any messages from groups by default. image

mattiaburati commented 5 years ago

Solved... damn bro what a genious ahaha. Now it work also in the group, beautiful. I suggest you to write this fix on your readme 🗡

Nukesor commented 5 years ago

Already added it to the README :)

mattiaburati commented 5 years ago

Hi, i found a new problem. The bot works only with 2 member of my group, i tried also to run my bot as a user bot but nothing change.

Nukesor commented 5 years ago

I also got errors for some members of some groups, but I didn't find out what went wrong. In case you find the Bug, feel free to open a PR :) I currently don't have time to properly maintain and debug the archivebot, but I'll happily accept PR's.

HackedServer commented 5 years ago

The error you're seeing for certain members might be from this part of the code: https://github.com/Nukesor/archivebot/blob/master/archivebot/archivebot.py#L284

Those should be and's not or's.

Nukesor commented 5 years ago

Damn @HackedServer ... Your name gave me a heart attack for a split second, when I read my mails.

Thanks for the hint though. I'll look into it.

Nukesor commented 5 years ago

@HackedServer @Spumiglio I just found some time to look at this project again :)

The installation and venv handling is now streamlined and using poetry.

I also did some cleanup/refactoring and fixed some obvious bugs. I'm going to let the bot running for a few days to check whether I can find more bugs, but for now it's looking quite good.

Stickers are now btw. not longer downloaded unless explicitly specified ;)

mattiaburati commented 5 years ago

@HackedServer @Spumiglio I just found some time to look at this project again :)

The installation and venv handling is now streamlined and using poetry.

I also did some cleanup/refactoring and fixed some obvious bugs. I'm going to let the bot running for a few days to check whether I can find more bugs, but for now it's looking quite good.

Stickers are now btw. not longer downloaded unless explicitly specified ;)

Beautiful, i tried something but without conclusion lol