kdercksen / qbot Goto Github PK
View Code? Open in Web Editor NEWTiny plugin based IRC bot
Tiny plugin based IRC bot
Other than the current ~help
, there should be some individual help commands per plugin. For example, take the karma plugin; something like the following should also be possible:
user | ~help karma
qbot | <string>++ / <string>-- | Use ~karma <string> to check karma for string.
This type of help string should take precedence over the general ~help
.
Currently only one channel is allowed, but this should be extendable to multiple channels/servers fairly easily. Perhaps using some of the new async features in Python 3.6? ๐ธ
user | ~trout otheruser
---> | qbot slaps otheruser around a bit with a large trout
Implement proper error handling and/or link filtering for the link plugin
Right now, plugin commands only receive the message part of PRIVMSG
lines. For example with the karma command:
user | something++
The plus_karma
function only receives 'something' but doesn't know from what user that command came. Now for the karma plugin this isn't really relevant, but for future plugins (for example the ~tell
proposed in #6) it is necessary that this information is available.
I propose that the standard arguments for every plugin function change from (self, match)
to (self, user, match)
so the user info is available might it be needed.
Title speaks for itself.
user | ~yt <query>
qbot | [yt] <best result for query>
see title
Case:
user | ~qadd dank = https://i.imgur.com/7c5OaSr.png
qbot | [link] https://i.imgur.com/7c5OaSr.png
Fairly easy implementation, just add another section/variable in the config file. If #11 gets implemented first for some reason, this should of course be taken into account!
Speaks for itself... Send a QUIT , close socket, and exit the application.
This would be a pretty cool addition. Imagine the following:
user | ~qadd topic=What do you think about QuotePlugin?
qbot | [quote] quote added to 'topic'
user | ~qshow topic
qbot | [quote] topic: What do you think about QuotePlugin?
user | ~qrm topic=What do you think about QuotePlugin?
qbot | [quote] quote removed from 'topic'
user | ~qsearch topic=QuotePlugin
qbot | [quote] topic (quoteplugin): What do you think about QuotePlugin? [1 result]
This could be implemented in the same basic way as the karma plugin using the shelve
module.
A basic API with those four functions would be sufficient I think. There are some implementation details that are discussable though:
qrm
function also work with partial quotes (i.e. deleting the best match for the quote entered by the user)?qsearch
queries should probably be case-insensitive too for ease of use. Imagine typing ~qsearch topic=quoteplugin
and not getting results because the quotes say 'QuotePlugin' instead of 'quoteplugin', I would think that to be pretty annoying.Currently only the IRC settings are acquired through a config file. Ideally I'd also like to make plugin parameters (like for example the filepath for the karma database) configurable through the same file.
Should be limited to one message per user? Or one message from one user to another maybe?
user | ~tell offlineuser read the Github issues when you get back here
qbot | [tell] I will relay your message to offlineuser when they join this channel
...
---> | offlineuser joined channel
qbot | [tell] user left this message for offlineuser: read the Github iussues when you get back here
Commands such as quieting users for x minutes, banning users, etc.
Bot will need OP mode for this; maybe make this configurable or something?
For example running on a small device like the raspberry pi, the log can't get infinitely big and I'd like to not have to do this manually!
This is related to #4, I'd also like to be able to handle multiple servers. Separate sockets will be needed for each server, so this is a little bit harder than just supporting multiple channels on one server.
user | ~ud <term>
qbot | [ud] <definition for term>
People shouldn't be able to up-/down-karma themselves.
Please add support for a weather request, for example:
~weather london
qbot: min 14 max 18 degrees celsius, 70% chance of rain
Response in a channel works just fine, but when PMing qbot there is no response in the buffer (however the requested action is executed as shown in the logs). Should be an easy fix
something: ++
and something++
should be the same I think. Currently that is not the case.
Limit identical commands to once per n seconds? Limit pace of parser?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.