Code Monkey home page Code Monkey logo

Comments (8)

Abdur-rahmaanJ avatar Abdur-rahmaanJ commented on May 29, 2024 1

testing in some 45 mins ...

from honeybot.

Abdur-rahmaanJ avatar Abdur-rahmaanJ commented on May 29, 2024 1

some work, not all, will continue tests

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

Currently debugging @Abdur-rahmaanJ. My idea for importing didn't seem to work and I'm currently going through line by line. May not be able to continue until tomorrow, though.

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

image
@Abdur-rahmaanJ I'm not getting anything at all. What external dependencies might I need for main.py? It could be that

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

@Abdur-rahmaanJ so after some long debugging, I've discovered my main problem is that I wasn't setting plugins with to_load. I'm now encountering the error that it is missing info.

image

def load_plugins(self, list_to_add):
    print("\033[0;36mLoading plugins...\033[0;0m")
    try:
        to_load = []
        with open('PLUGINS.conf', 'r') as f:
            to_load = f.read().split('\n')
            to_load = list(filter(lambda x: x != '', to_load))
        for file in to_load:
            module = importlib.import_module('plugins.'+file)
            obj = module.Plugin
            list_to_add.append(obj)

        self.plugins = list_to_add
        print("\033[0;32mLoaded plugins...\033[0;0m")
    except ModuleNotFoundError as e:
        print('module not found', e)

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

Accidentally clicked the wrong button sorry.

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

@Abdur-rahmaanJ So I'm getting this error with certain plugins. It is telling me

 error quote plugin 'Bot_core' object has no attribute 'quote'

It does this with a lot of the plugins. I haven't tested them all, but so far only greet and bitcoin work.

from honeybot.

Macr0Nerd avatar Macr0Nerd commented on May 29, 2024

@Abdur-rahmaanJ so I found what seems like a fix to the issue I described in my previous comment. When we use self.func() in a Plugin class, it treats self as Bot_core, not Plugin. I fixed this for some of the plugins with Plugins.func(self). It is far from clean, but it works as far as I can tell, and isn't code breaking. I'm going to do some further testing and fix some stuff like the weather plugin.

from honeybot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.