Jump to content

delphiki

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by delphiki

  1. Would like to relocate to Tommy for the better up-time. Can I either A. create a second acc then delete the first or B, as someone in the discord recommended use a donation?

     

    TXid: 5BD787728H5854818 $5 from 2 or 3 days ago

     

    I was under the belief that that donation only doubled your storage space which I haven't bothered to do because I don't need the space (<5% currently).

     

    EDIT: I don't need my files I have a backup I just wanted to avoid deleting the first account then making the second to avoid the down time since it could take a couple tries to get tommy.

  2. Dialogflow V2

     

    Google project that makes it easy for developers to design and integrate conversational user interfaces into mobile apps, web applications, devices, and bots.

    https://github.com/googleapis/dialogflow-python-client-v2

     

     

    PRAW

     

    Reddit api wrapper

    https://praw.readthedocs.io/en/latest/getting_started/installation.html

     

     

    XKCD python

     

    XKCD web comic api wrapper

    https://pypi.org/project/xkcd/

     

     

     

     

     

  3. I currently have a free server on Johnny but was surprised to see that the list of installed modules does not include any chatbot modules. I am interested in DialogFlow and have written a program in python for a discord bot using this API which does work (on my pc at least).  I assume that they are not deliberately omitted to prevent people from using chatbots as there is an official Heliohost tutorial of using the discord api.

     

    If DialogFlow is not possible for whatever reason or if you believe that it would create un-necessary network traffic (which should be low just to ping the website and get a text only response back) please consider these other modules (which may be better and more versatile).

     

     

    chatbotAI

     

    ChatterBot

     

     

  4. The 500 error was because you had dos line endings. This usually happens when you use a windows computer to create your file, and then upload it. The best solution is to use an editor that understands line endings and can write linux line endings instead of dos. I changed them to linux line endings for you this time, but now your error is that you don'ty have a shebang line on your Jane.py script.

    Thanks that worked perfectly! 

     

    For anyone reading this in the future the shebang line is: #!/usr/bin/python3.6 which is necessary to tell the server which compiler to use.   Also notepad++ works ok but you need to replace all /r/n with just /n.

  5. Ok that seems more than reasonable.

    If you get suspended it isn't the end of the world. We generally give people three chances as long as they seem to be trying to fix the issue, and we try to help them figure out why they got suspended in the first place. If your load gets too high on the graph I linked just run the stop.py script to turn off your bot.

     

    Is there any reason why this start.py file would return an internal error (500)?

     

    #!/usr/bin/python3.6
    
    
    import os, subprocess, signal
    
    
    print("Content-Type: text/html\n\n")
    
    
    counter = 0
    p = subprocess.Popen(['ps', '-u', 'delphiki'], stdout=subprocess.PIPE)
    # must match your username --------^^^^^^^^
    
    
    out, err = p.communicate()
    for line in out.splitlines():
      if 'Jane.py'.encode('utf-8') in line:
    #     ^^^^^^^^^^^----- this has to match the filename of your bot script
    
    
        counter += 1
        print("Bot already running.")
    
    
    if counter == 0:
      subprocess.Popen("/home/delphiki/Jane.py")
    #                         ^^^^^^^^-- be sure to update it to your username
    
    
      print("Bot started!")

     

     

    The file does exists and is in the main directory and I have triple checked the capitalization. Permissions are 755 for all three files.  I tried replacing and re-copying both of the files from the original.

  6. As far as making the script run 24/7 the first thing you should know is that scripts that run 24/7 tend to cause a lot of load. HelioHost provides a way for you to monitor your load though, which if you're running high load things like this, you should probably check daily at least for the first week or so that it's running. The load graph can be found at https://johnny.heliohost.org:2083/frontend/paper_lantern/load/index.live.php If you get up to or near 100 you have a high chance of being suspended for high load.

    In regards to how to actually make it all work on HelioHost, I recommend taking a look at this guide I wrote https://wiki.helionet.org/Discord_Bot Just basically follow that guide, but instead of connecting to discord connect to IRC. Let us know if you have any questions.

     

    thanks it does in fact have everything I need already installed.   I will actually go with a discord bot instead of IRC which I have planned to switch to for awhile. Thanks for your help and the tutorial. 

     

    how strict is the ban system?  I don't *think* that it should be at high load.  I once had a simple IRC bot running on a RPI zero and it ran fine.  I cannot find details about the CPU specs allotted to users but the usage should be rather low.  Data usage should be limited to text and occasional images (not sure about if  I even will have images).  Is there any way to throttle load to prevent running at max for more than a certain amount of time?

  7. import sys, os
    import dialogflow_v2 as dialogflow
    import codecs, json
     
    from twisted.internet import defer, endpoints, protocol, reactor, task
    from twisted.python import log
    from twisted.words.protocols import irc

     

    I am making an IRC bot for an IRC server and would like to host it 24/7

    it should be very low cpu intensive because it is a small server and I doubt that it will have more than a dozzen uses per hour.

     

    I don't see how to actually keep the script running though.  Using the helloworld test (which does work) I assume that it only stays running while the browser window is open and restarts in a new instance every time someone opens the webpage?

     

    I also dont understand how to install dependencies? would I just package all of the required files into a folder and upload that? 

    I understand that heliohost does not have a command interface. Is there some other way to pip install?

     

×
×
  • Create New...