onionj / pybotnet

PyBotNet: A Remote Control Framework for Python with Telegram Integration
https://onionj.github.io/pybotnet/
GNU Lesser General Public License v2.1
254 stars 73 forks source link

How do I setup. #28

Closed zenusop closed 2 years ago

zenusop commented 2 years ago

What version of python does it require and also when I open setup.py it instantly closes

onionj commented 2 years ago

hi install pybotnet version 2 by: pip3 install pybotnet -U --pre

Document version 2 is not ready yet But if you want to use version two, you can read the simple.py file.

onionj commented 2 years ago

and I have not tested version 2 on Windows yet ..!

zenusop commented 2 years ago

I was using windows at first lol im using unbuntu now and btw is pip install python3 going to give it the correct python version

onionj commented 2 years ago

I wrote the document, you can see it here https://onionj.github.io/pybotnet/ Ask if there is still a question

zenusop commented 2 years ago

Ok thanks for your hel

onionj commented 2 years ago

you're welcome

zenusop commented 2 years ago

How can I run the setup.py and stuff on linux I mainly use windows and barely use linux. I know you do like cd and then find the directory the file is located, but what command do I do to run it

SepehrRasouli commented 2 years ago

You can use cd on windows too, cd is used to move to another directory. What is your problem specifically ?

zenusop commented 2 years ago

when I open the main.py it instaly shuts and also I can't figure out how to run the .sh filese

zenusop commented 2 years ago

also do you have discord mine is Blx#0001

SepehrRasouli commented 2 years ago

Can you send your main.py ? I want to see the configurations you've done, You can anonymize the telegram keys. And no, Unfortunately, I don't have Discrod.

zenusop commented 2 years ago

I haven't confinurged it at all because I can't run the install.sh on windows or even open the main.py

SepehrRasouli commented 2 years ago

Can you run "simple.py" ? .sh files are shell files which are for linux, you can't run them on Windows.

zenusop commented 2 years ago

I ran simple.py and it made a folder pycache

SepehrRasouli commented 2 years ago

That's OK, Please rename "configs.py.sample" to "configs.py" and add your own configs, Then try running "simple.py" again.

zenusop commented 2 years ago

Do I need to add configs? or are there already a base set of them or could you share yours to me?

SepehrRasouli commented 2 years ago

Yes you need to add configs, These configs are your bot token and your user id so PyBotNet could communicate with the Telegram API and send messages to you. You don't need to send the configs to me, just make sure that they are correct, There is a good guide in "configs.py.sample" you can use.

zenusop commented 2 years ago

Ok thanks and I can use a telegram channel to control the bots?

zenusop commented 2 years ago

and I also re ran simple confing now do I open main.py?

SepehrRasouli commented 2 years ago

PyBotNet does not support this feature currently, but you can write your own script and modify PyBotNet to work the way you want.

and I also re ran simple confing now do I open main.py?

You shouldn't run config.py, you need to enter your "bot-token" and "user-id" there and then run "simple.py" You can use the guide in configs.py to understand what credentials you need to enter. Make sure that you've entered the correct credentials and have changed "configs.py.sample" to "configs.py"

zenusop commented 2 years ago

Yeah i added my bot token and my user id in the configs.py and i reran simple.py. what do i do next? Like to i have to make my own menu ans builder?

SepehrRasouli commented 2 years ago

No You don't, You should see if your telegram bot works now. by sending '/who' to it. Please refer to the documentation, From there you can understand what you should do next.

zenusop commented 2 years ago

Thsnks i will try

zenusop commented 2 years ago

/who doesn't work i added my bot token and the admin id, but now when i tried /who nothing happend

SepehrRasouli commented 2 years ago

Are you sure your configuration is correct ?

SepehrRasouli commented 2 years ago

Please try these commands : pip3 install pybotnet -U --pre python3 -m pybotnet -t [TELEGRAM_TOKEN] -i [ADMIN_CHAT_ID] -n [BOT NAME] and then try /who in your bot.

zenusop commented 2 years ago

Ok i will try that and i will check tge simple config again

zenusop commented 2 years ago

Is my telegram api token the bot token? or how do i get the telegram api token also is the admin_chat_id my user admin token id?

SepehrRasouli commented 2 years ago

Please refer to the documentation Or read the guide in the config file, From there you will find what to do next.

zenusop commented 2 years ago

I still don't understand what I'm doing wrong I followed the documentaion and stuff.

When I try to run the main.py i get a error that says python3: can't open file 'C:\Users\benwz\Desktop\pybotnet-master\main.py': [Errno 2] No such file or directory (im using cmd)

I also tried /who and it didn't work

Do i need a group chat for this to work or something

SepehrRasouli commented 2 years ago

Please try these commands : pip3 install pybotnet -U --pre python3 -m pybotnet -t [TELEGRAM_TOKEN] -i [ADMIN_CHAT_ID] -n [BOT NAME] and then try /who in your bot.

zenusop commented 2 years ago

all of that as one command?

SepehrRasouli commented 2 years ago

No, run each one of them separately.

zenusop commented 2 years ago

when I run the second one it says there is no module named pybotnet

SepehrRasouli commented 2 years ago

Try this instead: pip install pybotnet -U --pre python3 -m pybotnet -t [TELEGRAM_TOKEN] -i [ADMIN_CHAT_ID] -n [BOT NAME]

zenusop commented 2 years ago

I should be entering that command in cmd right in the dir with all the files

SepehrRasouli commented 2 years ago

No, You can enter them in any directory you want.

zenusop commented 2 years ago

Still dosen't work do you want screenshot so I can show yo?

SepehrRasouli commented 2 years ago

Yes, Please provide a screenshot of the error.

zenusop commented 2 years ago

error

zenusop commented 2 years ago

What can I do?

SepehrRasouli commented 2 years ago

Please enter your Telegram-token , admin-chat-id and bot-name in the placeholders !! Also, Please delete the clone of pybotnet you have, re-clone it again, rename configs.py.sample to configs.py, enter your credentials there, and then try running ./simple.py again. Please read the guides carefully !

zenusop commented 2 years ago

Alright Thank you! I will try

zenusop commented 2 years ago

I still don't understand what i'm doing wrong I edited confing.sample.py to config.py, I enterned my proper credentials I also recloned the whole projected I enterd the command using my place holders and it still gave me the error. :( Idk what im doing wrong

SepehrRasouli commented 2 years ago

It's ok, Did you run python ./simple.py after cloning the project entering you proper credentials ? If not, Please do. Note : You should run this command in the pybotnet directory.

zenusop commented 2 years ago

I get a error when I enter that command LOL

SepehrRasouli commented 2 years ago

Please provide me with the error and the commands that you've ran.

zenusop commented 2 years ago

error 2

SepehrRasouli commented 2 years ago

Can you provide me your config.py? You can send it to my email if you are not ok with sending it here My email : sepehrrs06@gmail.com

zenusop commented 2 years ago

ok thanks I will thank you for your support :)