All Projects → pyhoneybot → Honeybot

pyhoneybot / Honeybot

Licence: mit
🛩 A python IRC bot with simple plugins dev. Ignited in mauritius, first-timers friendly!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Honeybot

Ts3audiobot
Advanced Musicbot for Teamspeak 3
Stars: ✭ 397 (+727.08%)
Mutual labels:  bot, plugin, client
Messenger
Package messenger is used for making bots for use with Facebook messenger
Stars: ✭ 278 (+479.17%)
Mutual labels:  bot, client
honeybot
🛩 A python IRC bot with simple plugins dev. Ignited in mauritius, first-timers friendly! Moved to github.com/pyhoneybot/honeybot
Stars: ✭ 57 (+18.75%)
Mutual labels:  irc, tkinter
Irc
the irc crate – usable, async IRC for Rust
Stars: ✭ 409 (+752.08%)
Mutual labels:  irc, client
Mojo Webqq
【重要通知:WebQQ将在2019年1月1日停止服务,此项目目前已停止维护,感谢大家四年来的一路陪伴】使用Perl语言(不会没关系)编写的smartqq/webqq客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,755 (+3556.25%)
Mutual labels:  bot, irc
Tenyks
The Tenyks IRC bot.
Stars: ✭ 171 (+256.25%)
Mutual labels:  bot, irc
Eggdrop
The Eggdrop IRC Bot
Stars: ✭ 314 (+554.17%)
Mutual labels:  bot, irc
Whatsappbot
Send messages to any person in any time how much you want.
Stars: ✭ 104 (+116.67%)
Mutual labels:  bot, tkinter
Twitchlib
C# Twitch Chat, Whisper, API and PubSub Library. Allows for chatting, whispering, stream event subscription and channel/account modification. Supports .NET Core 2.0
Stars: ✭ 519 (+981.25%)
Mutual labels:  bot, client
Euircbot
A featureful nodejs irc bot
Stars: ✭ 16 (-66.67%)
Mutual labels:  bot, irc
Irackbot
Bridge between Slack and IRC channels allowing message filtering and logging while keeping communication public
Stars: ✭ 25 (-47.92%)
Mutual labels:  bot, irc
Py3 Pinterest
Fully fledged Python Pinterest client
Stars: ✭ 133 (+177.08%)
Mutual labels:  bot, client
Lykos
Werewolf, the popular detective/social party game (a theme of Mafia)
Stars: ✭ 107 (+122.92%)
Mutual labels:  bot, irc
Phabulous
A Phabricator bot for Slack
Stars: ✭ 222 (+362.5%)
Mutual labels:  bot, irc
Vapor
☁️ Lightweight Steam client framework for node.js
Stars: ✭ 105 (+118.75%)
Mutual labels:  bot, client
Progress Bot
High-tech weaponized moe progress delivery bot for IRC, Discord, and web
Stars: ✭ 38 (-20.83%)
Mutual labels:  bot, irc
Mojo Weixin
使用Perl语言(不会没关系)编写的个人账号微信/weixin/wechat客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,181 (+2360.42%)
Mutual labels:  bot, irc
Telebot.nim
Async client for Telegram Bot API in pure Nim [Bot API 5.1]
Stars: ✭ 93 (+93.75%)
Mutual labels:  bot, client
Kiwiirc
🥝 Next generation of the Kiwi IRC web client
Stars: ✭ 488 (+916.67%)
Mutual labels:  irc, client
Zonkeynet
RADIO Mesh Network
Stars: ✭ 12 (-75%)
Mutual labels:  bot, irc

first-timers-only Open Source Love Open Source Love MadeinMoris

🍯 honeybot py

📮 About

HoneyBot is a python-based IRC bot. (python3.7) | If you want to just run the bot, go to the quick start section

Feel free to contribute to the project!

alt text

🕹 Project Motivation

Implementing the project in Java was weird, py's connect was sleek. Thus, the project stack was shifted over to Python. If you can think of any features, plugins, or functionality you wish to see in the project. Feel free to add it yourself, or create an issue detailing your ideas. We highly recommend you attempt to implement it yourself first and ask for help in our discord server !

Psst. Since I learnt py through this bot, we decided to keep a new-comers friendly policy. Feeling lost? Just ping.

📌 Contributing Countries

🇲🇺 🇺🇸 🇨🇦 🇦🇷 🇮🇳 🇬🇧 🇬🇬 🇧🇷 🇸🇽 🇵🇱 🇩🇪

📨 Follow the project on CodeTriage for updates!

Get issues delivered in your inbox.

Open Source Helpers

Discord

https://discord.gg/E6zD4XT

💭 Project Testimonials

@TannerFry

With experience in programming in Python, and implementing an SMTP email plugin for a different system, picking up HoneyBot and following the documentation provided for new-comers made it very simple to implement the same SMTP email plugin to the HoneyBot system. This was my first time contributing to an open-source project on GitHub and it was an overall great experience. The welcoming of new contributors and documentation on how to contribute and implement plugins is great for people who have never contributed to a project before, and Abdur-Rahmaan Janhangeer was extremely helpful when answering my questions and helping me along the way.

@RiceAbove

HoneyBot is my first time collaborating to an open source project and I'm loving it. Before discovering HoneyBot, I was very intimidated on the idea of working with other people and had no idea what an IRC even was. Now I realize how much fun and rewarding it is to work together on a project with dedicated and friendly individuals. The documentation is easy to follow and everyone is super helpful. I highly recommend any new programmer who want to contribute on an open source project to try out HoneyBot. Personally I enjoy working on this project more than my own schoolwork.

@justinwalker4179

HoneyBot is my first open source project and I had never worked with an IRC before. For school I was required to contribute to projects, but it was always so intimidating to me. I had always heard it gets easier once you've gotten over the fear wall, and that's what HoneyBot did for me. Excellent readme and quick feedback allowed me to make my first plugin. Now I've made many contributions, and look forward to any new issues I can get my hands on. Abdur-Rahmaan Janhangeer has been extremely helpful and I owe him and this project a lot for getting me into the open source world.

@mboekhold

HoneyBot is a very friendly and welcoming community. They provided quick feedback and I would defenitely recommend this project to newcomers to give them that first boost on contributing to open source. HoneyBot helps you all the way there to issuing your first PR, step by step. I contributed a comic plugin, and I was thankful for meeting all the friendly and passionate people who are active in this community.

@Macr0Nerd

I came onto this project in October of 2018. At the time, my experience with open source was nil. I wasn't even sure I was good with python; I just happened to be better than everyone in class. Working on HoneyBot really opened my eyes to the power of community and programming, and has sent me on a path I don't wanna turn from. Just seeing how this project has evolved over the past year and how I've grown with it, I wouldn't trade it for the world. My name might not be on any of the recent plugins or doc strings, but I'll never forget that it'll always be tied to this project and a lot of the code. Also, I don't know if they'll check my commit so go look at the C++ Client! It's cool I promise!

✂ Current Features

  • 🍬 OOP architecture
  • 🛰️ keyword parameters
  • 🌵 password security with config file [disabled for now]
  • 🔌 now with plugins

⛰ GUI clients

GUI clients are used to manage plugins, launch bot as well as specify credentials.

⌚ Current Plugins

Normal run

python manage.py runbot

Docker

** Building Docker image ** Change SERVER, PORT and NICKNAME variables to match your preferences

docker build -t honeybot -f ./docker/Dockerfile .

** Running Docker image **

docker run honeybot

🔧 Plugins Development

including it here. let's begin

a plugin has the following structure:

# -*- coding: utf-8 -*-
"""
[greet.py]
Greet Plugin
[Author]
Abdur-Rahmaan Janhangeer, pythonmembers.club
[About]
responds to .hi, demo of a basic plugin
[Commands]
>>> .hi
returns hoo
"""


class Plugin:
    def __init__(self):
        pass

    def run(self, incoming, methods, info, bot_info):
        try:
            if info['command'] == 'PRIVMSG' and info['args'][1] == '.hi':
                methods['send'](info['address'], 'hooo')
        except Exception as e:
            print('woops plugin error ', e)

we see four parameters being passed to the run method , incoming, methods, info, bot_info)

parameter1: incoming

incoming is the raw line and is not used except if you are not satisfied with the already provided methods

parameter2: methods

methods is a dictionary of methods to ease your life. a quick look at main.py reveals

def methods(self):
        return {
                'send_raw': self.send,
                'send': self.send_target,
                'join': self.join
                }

where send_raw allows you to send in any string you want, thereby allowing you to implement any irc protocol from scratch

but, for most uses, send allows you to send a message to an address methods['send']('<address>', '<message>'). using it in conjunction with info parameter allows you to send messages where it came from, in pm to the bot or in a channel. you can however hardcode the address.

join allows you to join a channel by methods['join']('<channel name>')

parameter3: info (meaning message info)

for a normal run, info produces

{
'prefix': '[email protected]/web/cgi-irc/kiwiirc.com/ip.200.200.22.200',
'command': 'PRIVMSG',
'address': '##bottestingmu',
'args': ['##bottestingmu', 'ef']
}

hence if you want messages, messages = info['args'][1:] or the first word if you want to check for command will be info['args'][1]

use example

  • the command info is used in the join channel plugin to detect a join command and greet the user who just joined

bot info

bot_info returns info about the bot

        return {
            'name': self.name,
            'special_command': self.sp_command,
            'required_modules': self.required_modules,
            'owners': self.owners,
            'time': self.time,
            'friends': self.friends
        }

so that in run method you can access those.

use example

  • For example, the time info is used in the uptime plugin by minussing it from the current time to get time bot has been running.
  • The required modules is used in the installed plugin to determine what required plugin the bot runner did not install

wrapping up

hence

if info['command'] == 'PRIVMSG' and info['args'][1] == '.hi':
    methods['send'](info['address'], 'hooo')

from above means

if message received == .hi:
    send(address, message)

⚡ Quickstart

[INFO]

server_url = chat.freenode.net
port = 6667
name = appinventormuBot
  • run python manage.py runbot

💻 Seeing The Bot In Action

Get an IRC client

configure

port: 6667
url: chat.freenode.net

then join channel #ltch

you should see the bot as hbot ... or as it's name is in settings

📃 Contributing Guide

  • don't forget to add your country flag here after accepted PR. i'll have to hunt it down on your profile if not.
  • make sure to follow PEP8

about PR

first clone the project

git clone https://github.com/pyhoneybot/honeybot.git

cd into the project

cd honeybot

different changes to different files. for example, someone making a weather plugin first he creates a new branch

git checkout -b "weather-plugin"

then he commits

git add *
git commit -m "added weather plugin"

or

git commit -a -m "did this"

then he push to create a PR with the branch

git push origin head

or

git push origin weather-plugin

now let us say he wants to work on another issue, adding a joke in the jokes plugin, he creates another branch

git checkout -b "add-jokes"

after, same as before

git add *
git commit -m "added some jokes"
git push origin head

now he wants to fix his weather plugin, he changes branch

git checkout weather-plugin

works, then commit

git add *
git commit -m "fixed <issue>"

then a PR

git push origin head

Why all these?

So as not to reject a whole PR just because of some oddities. Reject only unneeded part.

Updating the Documentation

If you created a new plugin you should add your plugin to the documentation. To do this, go into your cloned honeybot repo and then into the directory docs/source/Plugins . Depending on the type of plugin write this into the development, fun, miscellaneous or utility RST file:

   
   <Plugin-Name>
   ^^^^^^^^^^^^^
   .. automodule:: plugins.<your-plugin-filename>
      :members:

This allows sphinx to automatically pull the docstrings from the code of your plugin and parse them accordingly.

A small guide on how to further contribute to the documentation of the project can be found here

🥄 Updating fork

Now, other changes are ongoing, what if you need the latest changes?

git pull origin master

helps if you cloned your own repo. What if you want to update your local copy of someone else's repo that you forked? You do it like that

cd <your/local/cloned/repo/path/here>
git remote add upstream https://github.com/pyhoneybot/honeybot.git
git fetch upstream
git pull upstream master

🔌 Todo Plugins

  • [x] 💐 humour
  • [x] 🌨️ weather
  • [x] ✉️ mail
  • [x] 🎛️ maths
  • [ ] 📥 pm when user online
  • [ ] Random Colour

☑ Allowing Plugins

in PLUGINS.conf, add the plugin to allow on a new line !

calc
username

📧 Contact

Email

🖊 Credits

@arwinneil for opensource and madeinmoris badges

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].