Git Product home page Git Product logo

deltabot's People

Contributors

adbenitez avatar hpk42 avatar michel-slm avatar tiksagol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deltabot's Issues

Add new type of command "Dynamic"

The objective is to be able to do something like:
bot.commands.register(name="/join", func=process_join, type='dynamic')
Then commands like: /join, /join_g20, /join_c11, are processed by function "process_join" and have payloads "", "g20" and "c11" respectively.
The use case is to make commands that have arguments easy to use by clicking on them on DC clients that support this feature.

system messages processed as incoming messages

account hook ac_incoming_message isn't triggered on member added/removed events, but since deltabot uses account.get_fresh_messages() fresh member added/removed events are returned and processed as incoming messages

New api can't reply with file

commands and filters are only allowed to return an string, it is needed to allow to return file + text so the bot can reply with pictures, etc.

when implementing this, please allow to return a file-like object, don't force to a path because a file object gives much more flexibility (ex. to use a BytesIO object etc.)

plugins can't use "db" plugin on deltabot_init hook

"db" plugin is installed on deltabot_init hook in deltabot.builtin.db:10, despite the plugin is registered before other 3rd-party plugins, seems internally pluggy uses a dict to store them so the deltabot_init hook is triggered in arbitrary order so it happens that plugins try to use bot.set/get before "db" plugin is registered causing the operation to do nothing.

Command processing issues on groups with multiple bots

Currently if two(or more) bots are added to a group and a command is sent for one bot, the other bots will complain if they don't have the command, and in case they have all the same command there are no way to declare that only bot X should process the command

ModuleNotFoundError: No module named 'attr' - Python 3.9.2

$ python --version
Python 3.9.2
$ pip3 install deltabot
[no errors so not showing it]
$ deltabot help
Traceback (most recent call last):
  File "/home/simon/.venv/bin/deltabot", line 5, in <module>
    from deltabot.cmdline import bot_main
  File "/home/simon/.venv/lib/python3.9/site-packages/deltabot/cmdline.py", line 6, in <module>
    from .parse import render_hop_trace
  File "/home/simon/.venv/lib/python3.9/site-packages/deltabot/parse.py", line 4, in <module>
    import attr
ModuleNotFoundError: No module named 'attr'

acc.configure's syntax may be wrong

Could very well be my fault, I might have overlooked something, but in case it's not, here's an error when I ran "deltabot init " , File "/opt/virtualenvs/python3/lib/python3.8/site-packages/deltabot/cmdline.py", line 42, in init acc.configure(addr=emailadr, mail_pw=password) TypeError: configure() got an unexpected keyword argument 'addr'

Filters shouldn't process commands

currently commands are also passed to the filters, passing to the plugin devs the burden to ask if it is a command or a normal message

there is no deltabot_start hook

there is deltabot_shutdown hook, triggered when bot.trigger_shutdown() is called, but there is no trigger_start hook, and it is needed for bridges plugins to start connections to other services etc. currently there is deltabot_init hook but it gets triggered even before command line parsing.

ignore unknow commands in groups

currently on incoming commands if the command is unknown an error message is sent back to the user, this can be disturbing if there are several bots in a group you send the command for one bot but all other bots will complain of invalid command.

in a 1:1 chat (or if we support /command@[email protected] in the future) the error message is ok

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.