honeybot


Namehoneybot JSON
Version 6.1.1 PyPI version JSON
download
home_pagehttps://github.com/pyhoneybot/honeybot
SummaryIRC bot with vast collection of plugins. First timers friendly
upload_time2024-09-24 23:13:37
maintainerNone
docs_urlNone
authorAbdur-Rahmaan Janhnageer
requires_python>=3.7.0
licenseMIT
keywords irc bot plugins
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # đŸ¯ honeybot py [ [docs](https://pyhoneybot.github.io/honeybot/) ]

<div align="center">

<img src="./assets/honeybot_real.png" width="64" />

[![PyPI version](https://badge.fury.io/py/honeybot.png)](https://badge.fury.io/py/honeybot)
[![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://www.firsttimersonly.com/)
![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg)
![Made in Moris](https://img.shields.io/badge/Made%20in-Moris-green.svg)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6329/badge)](https://bestpractices.coreinfrastructure.org/projects/6329)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pyhoneybot/honeybot/badge)](https://api.securityscorecards.dev/projects/github.com/pyhoneybot/honeybot)

<hr>
🇲đŸ‡ē đŸ‡ē🇸 🇨đŸ‡Ļ đŸ‡Ļ🇷 🇮đŸ‡ŗ đŸ‡Ŧ🇧 đŸ‡ŦđŸ‡Ŧ 🇧🇷 🇸đŸ‡Ŋ đŸ‡ĩ🇱 🇩đŸ‡Ē 🇲đŸ‡ŧ 🇲đŸ‡Ļ

</div>
<div align="center">

[![Open Source Helpers](https://www.codetriage.com/pyhoneybot/honeybot/badges/users.svg)](https://www.codetriage.com/pyhoneybot/honeybot)
[![Discord](https://img.shields.io/badge/chat%20on-discord-green.svg)](https://discordapp.com/invite/E6zD4XT)

</div>

# Table of Contents

- [📮 About](#-about)
- [🕹 Project Motivation](#-project-motivation)
- [✂ Current Features](#-current-features)
- [:mountain: GUI clients](#mountain-gui-clients)
- [⌚ Current Plugins](#-current-plugins)
- [⚡ Quickstart](#-quickstart)
- [đŸ’ģ Seeing The Bot In Action](#-seeing-the-bot-in-action)
- [Docker](#docker)
- [🔧 Plugins Development](#-plugins-development)
- [📃 Contributing Guide](#-contributing-guide)
- [🔌 Todo Plugins](#-todo-plugins)
- [☑ Allowing Plugins](#-allowing-plugins)
- [:thought_balloon: Project Testimonials](https://github.com/deadex-ng/honeybot/blob/readme-fix/TESTIMONIALS.md)
- [📧 Contact (Including vulnerabilities)](#-contact-including-vulnerabilities)
- [🖊 Credits](#-credits)

## 📮 About

HoneyBot is a python-based IRC bot. (**python3.7**) | If you want to just run the bot, go to the [quick start section](https://github.com/pyhoneybot/honeybot#-quickstart)

> 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. --[@RiceAbove](https://github.com/RiceAbove)

Feel free to contribute to the project!

## 🕹 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](https://discord.gg/E6zD4XT) !

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

## ✂ Current Features

- đŸŦ OOP architecture
- 🛰ī¸ keyword parameters
- đŸŒĩ password security with config file [disabled for now]
- 🔌 now with plugins

## :mountain: GUI clients

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

- [CPP client](https://github.com/pyhoneybot/cpp-client) by [@Macr0Nerd](https://github.com/Macr0Nerd)

## ⌚ Current Plugins

| Plugin                 | Description                                                                           | Contributor                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| 💎 bitcoin             | Get price of bitcoin                                                                  | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |
| ⏲ caesar cipher        | Encode your text                                                                      | [@kylegalloway](https://github.com/kylegalloway)                                                         |
| đŸ”ĸ calc                | Evaluates maths expressions                                                           | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| 📐 maths               | Trigonometry & random number generator                                                | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| 🍃 conv sniff          | Set triggers like how many times a word occur for one or more words and send response | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| ❄ greet                | Demo plugin                                                                           | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| ⛓ installed_modules    | Checks dependencies installed                                                         | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| đŸ•ļ joke                 | Get random joke                                                                       | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ), [@colbyjayallen](https://github.com/colbyjayallen) |
| ❓ self Trivia         | Random trivia                                                                         | [@ajimenezUCLA](https://github.com/ajimenezUCLA)                                                         |
| đŸ’ĸ username            | Username generator                                                                    | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ), [@sseryani](https://github.com/sseryani)           |
| 📜 quotes              | Inspirational quotes                                                                  | [@German-Corpaz](https://github.com/German-Corpaz)                                                       |
| 📖 dictionary          | Returns meaning of word                                                               | [@iamnishant14](https://github.com/iamnishant14)                                                         |
| đŸ”Ŗ password generator  | The name tells it all                                                                 | [@iamnishant14](https://github.com/iamnishant14)                                                         |
| 🐜 debug               | Prints all parameters passed to bot                                                   | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| 📚 wikipedia           | Returns a wikipedia article                                                           | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |
| đŸ—ŋ translate           | Google translate plugin                                                               | [@a-deeb](https://github.com/a-deeb)                                                                     |
| 📑 test                | Runs tests                                                                            | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |
| ⛅ī¸ weather            | Returns weather info for a given location                                             | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |
| ✉ī¸ mail                | Send emails within the chat                                                           | [@TannerFry](https://github.com/TannerFry)                                                               |
| 🕴ī¸ hangman             | Play hangman in the chat                                                              | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |
| 🎂 age                 | Takes in birthday and outputs age                                                     | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |
| ✔ī¸ fact                | Returns a random fact                                                                 | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |
| 🔍 google              | Returns three search results from google                                              | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |
| 📮 send message        | Sends a message to another channel                                                    | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |
| 📝 log                 | Logs the chat into a log file                                                         | [@RiceAbove](https://github.com/RiceAbove)                                                               |
| đŸšĒ joins               | Greets everyone who joins the channel                                                 | [@RiceAbove](https://github.com/RiceAbove)                                                               |
| 📅 date                | Posts the current date                                                                | [@RiceAbove](https://github.com/RiceAbove)                                                               |
| đŸ•ĩī¸â€ riddle             | Returns a random riddle                                                               | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🗞 news                 | Gets the top 10 headlines from bbc world news                                         | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 📝 horoscope           | Gets your daily horoscope for your starsign                                           | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| đŸ’ĩ currency converter  | Converts currencies                                                                   | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| đŸ”Ģ russian_roulette    | May or may not kick you off the channel                                               | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🏨 monopoly            | Honeybot now supports the world's worst game!                                         | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| âšŊī¸ transfer_rumour    | Shows the day's transfer rumours                                                      | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🃏 blackjack/21        | Play 21 on honeybot!                                                                  | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🤒 corona              | Get the latest news on coronavirus with honeybot!                                     | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 📖 diary               | Keep a diary with honeybot                                                            | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🛩 flight               | Gets flight info from flightradar24                                                   | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |
| 🎲 roll                | Rolls a dice                                                                          | [@GlennToms](https://github.com/GlennToms)                                                               |
| ❓ help                | Show link to plugin's information page                                                | [@edumello](https://github.com/edumello)                                                                 |
| ✅ channeljoin         | Join command for bot                                                                  | [@marceloyb](https://github.com/marceloyb)                                                               |
| :page_with_curl: comic | Returns a random comic                                                                | [@mboekhold](https://github.com/mboekhold)                                                               |
| 📝 todo                | Makes a to do list                                                                    | [@h-ranjan1110](https://github.com/h-ranjan1110)                                                         |
| 🎱 Magic 8 Ball        | Answer questions using magic 8 ball                                                   | [@ZakariaTalhami](https://github.com/ZakariaTalhami)                                                     |
| 🎟 Random Excuse        | Generates a random excuse for you.                                                    | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |
| đŸĻ† DuckDuckGo Search   | Search queries in duckduckgo and return abstract.                                     | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |
| đŸ–ŧ Random Image         | Returns a random image url.                                                           | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |
| đŸ›ĸ URL Shortener        | Shortens a url                                                                        | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |
| 😁 emoji               | Returns emoji meaning                                                                 | [@deadex-ng](https://github.com/deadex-ng)                                                               |
| 🎂 birthday            | Shows birthday match probability on a people group.                                   | [@paulosgf](https://github.com/paulosgf)                                                                 |
| 🏀 basketball          | Shows information about the medals of euroBasket and Basketball world cup             | [@kefthymic](https://github.com/kefthymic)                                                               |
| đŸŽŦ movies_imdb         | Returns certain information about a certain movie or shows 250 all time best movies   | [@ZoeyKats](https://github.com/ZoeyKats)                                                                 |
| ⛩ī¸ anime               | Returns certain information about the top 100 anime                                   | [@cdkontos](https://github.com/cdkontos)                                                                 |

## ⚡ Quickstart

setup

```bash
mkdir botx
cd botx
python -m venv venv
venv\scripts\activate # or source venv/bin/activate for linux
python -m pip install honeybot

```

run

```bash
honeybot init
honeybot run
```

in settings/settings.toml

```
[INFO]

server_url = irc.libera.chat
port = 6667
name = appinventormuBot
```

In settings/settings.toml listed plugins under PLUGINS/downloaded will load. Plugins in directory plugins/core are auto loaded.

## đŸ’ģ Seeing The Bot In Action

Get an IRC client

- Web: [Kiwiirc](https://kiwiirc.com) (easy)
- Desktop: [Hexchat](https://hexchat.github.io)
- Android: [Revolution IRC](https://github.com/MCMrARM/revolution-irc)

configure

```
port: 6667
url: irc.libera.chat
```

then join channel `#ltch`

you should see the bot as hbot ... or as it's name is in [settings](https://github.com/pyhoneybot/honeybot/blob/master/src/honeybot/settings/CONNECT.conf)

## Docker

**Building Docker image**

Change SERVER, PORT and NICKNAME variables to match your preferences

```
docker build -t "honeybot/honeybot:6.0.2" .
```

**Running Docker image**

```
docker run -d --name=honeybot honeybot/honeybot:v6.0.2 honeybot run
```

## 🔧 Plugins Development

Each plugin has a folder named after it. In it there is a file called main.py. In each there is a class called Plugin.

```python
# -*- coding: utf-8 -*-

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](https://github.com/pyhoneybot/honeybot/blob/master/src/honeybot/api/main.py) reveals

```python
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

```python
{
'prefix': 'appinv!c5e342c5@gateway/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

```python
        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

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

from above means

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

## 📃 Contributing Guide

<https://pyhoneybot.github.io/honeybot/How_Tos/contributing.html>

- 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

Check out [Contributing](https://github.com/pyhoneybot/honeybot/blob/master/CONTRIBUTING.md) to get started on contributing.

## 🔌 Todo Plugins

- [x] 💐 humour
- [x] 🌨ī¸ weather
- [x] ✉ī¸ mail
- [x] 🎛ī¸ maths
- [ ] đŸ“Ĩ pm when user online
- [ ] Random Colour

## ☑ Allowing Plugins

**Plugins available**
<https://pyhoneybot.github.io/honeybot/plugins.html>

in settings/settings.toml, add the plugin to allow! 

```toml
[PLUGINS]

downloaded = ["greet",] # Downloaded plugins to load
```

## 📧 Contact (Including vulnerabilities)

### Email

- Abdur-Rahmaan Janhangeer | arj.python@gmail.com

## 🖊 Credits

- [@arwinneil](https://github.com/arwinneil), "Open Source" and "Made In Moris" badges

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pyhoneybot/honeybot",
    "name": "honeybot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": null,
    "keywords": "irc bot plugins",
    "author": "Abdur-Rahmaan Janhnageer",
    "author_email": "arj.python@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c9/96/388a99349f0d5e0b1067f2b907743c36cf6de4f1dd82f7eb0907c62ca783/honeybot-6.1.1.tar.gz",
    "platform": null,
    "description": "# \ud83c\udf6f honeybot py [ [docs](https://pyhoneybot.github.io/honeybot/) ]\n\n<div align=\"center\">\n\n<img src=\"./assets/honeybot_real.png\" width=\"64\" />\n\n[![PyPI version](https://badge.fury.io/py/honeybot.png)](https://badge.fury.io/py/honeybot)\n[![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://www.firsttimersonly.com/)\n![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg)\n![Made in Moris](https://img.shields.io/badge/Made%20in-Moris-green.svg)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6329/badge)](https://bestpractices.coreinfrastructure.org/projects/6329)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pyhoneybot/honeybot/badge)](https://api.securityscorecards.dev/projects/github.com/pyhoneybot/honeybot)\n\n<hr>\n\ud83c\uddf2\ud83c\uddfa \ud83c\uddfa\ud83c\uddf8 \ud83c\udde8\ud83c\udde6 \ud83c\udde6\ud83c\uddf7 \ud83c\uddee\ud83c\uddf3 \ud83c\uddec\ud83c\udde7 \ud83c\uddec\ud83c\uddec \ud83c\udde7\ud83c\uddf7 \ud83c\uddf8\ud83c\uddfd \ud83c\uddf5\ud83c\uddf1 \ud83c\udde9\ud83c\uddea \ud83c\uddf2\ud83c\uddfc \ud83c\uddf2\ud83c\udde6\n\n</div>\n<div align=\"center\">\n\n[![Open Source Helpers](https://www.codetriage.com/pyhoneybot/honeybot/badges/users.svg)](https://www.codetriage.com/pyhoneybot/honeybot)\n[![Discord](https://img.shields.io/badge/chat%20on-discord-green.svg)](https://discordapp.com/invite/E6zD4XT)\n\n</div>\n\n# Table of Contents\n\n- [\ud83d\udcee About](#-about)\n- [\ud83d\udd79 Project Motivation](#-project-motivation)\n- [\u2702 Current Features](#-current-features)\n- [:mountain: GUI clients](#mountain-gui-clients)\n- [\u231a Current Plugins](#-current-plugins)\n- [\u26a1 Quickstart](#-quickstart)\n- [\ud83d\udcbb Seeing The Bot In Action](#-seeing-the-bot-in-action)\n- [Docker](#docker)\n- [\ud83d\udd27 Plugins Development](#-plugins-development)\n- [\ud83d\udcc3 Contributing Guide](#-contributing-guide)\n- [\ud83d\udd0c Todo Plugins](#-todo-plugins)\n- [\u2611 Allowing Plugins](#-allowing-plugins)\n- [:thought_balloon: Project Testimonials](https://github.com/deadex-ng/honeybot/blob/readme-fix/TESTIMONIALS.md)\n- [\ud83d\udce7 Contact (Including vulnerabilities)](#-contact-including-vulnerabilities)\n- [\ud83d\udd8a Credits](#-credits)\n\n## \ud83d\udcee About\n\nHoneyBot is a python-based IRC bot. (**python3.7**) | If you want to just run the bot, go to the [quick start section](https://github.com/pyhoneybot/honeybot#-quickstart)\n\n> 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. --[@RiceAbove](https://github.com/RiceAbove)\n\nFeel free to contribute to the project!\n\n## \ud83d\udd79 Project Motivation\n\nImplementing the project in Java was weird, py's connect was sleek. Thus, the project stack was shifted over to Python.\nIf 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](https://discord.gg/E6zD4XT) !\n\nPsst. Since I learnt py through this bot, we decided to keep a new-comers friendly policy. Feeling lost? Just ping.\n\n## \u2702 Current Features\n\n- \ud83c\udf6c OOP architecture\n- \ud83d\udef0\ufe0f keyword parameters\n- \ud83c\udf35 password security with config file [disabled for now]\n- \ud83d\udd0c now with plugins\n\n## :mountain: GUI clients\n\nGUI clients are used to manage plugins, launch bot as well as specify credentials.\n\n- [CPP client](https://github.com/pyhoneybot/cpp-client) by [@Macr0Nerd](https://github.com/Macr0Nerd)\n\n## \u231a Current Plugins\n\n| Plugin                 | Description                                                                           | Contributor                                                                                              |\n| ---------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| \ud83d\udc8e bitcoin             | Get price of bitcoin                                                                  | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |\n| \u23f2 caesar cipher        | Encode your text                                                                      | [@kylegalloway](https://github.com/kylegalloway)                                                         |\n| \ud83d\udd22 calc                | Evaluates maths expressions                                                           | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \ud83d\udcd0 maths               | Trigonometry & random number generator                                                | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \ud83c\udf43 conv sniff          | Set triggers like how many times a word occur for one or more words and send response | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \u2744 greet                | Demo plugin                                                                           | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \u26d3 installed_modules    | Checks dependencies installed                                                         | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \ud83d\udd76 joke                 | Get random joke                                                                       | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ), [@colbyjayallen](https://github.com/colbyjayallen) |\n| \u2753 self Trivia         | Random trivia                                                                         | [@ajimenezUCLA](https://github.com/ajimenezUCLA)                                                         |\n| \ud83d\udca2 username            | Username generator                                                                    | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ), [@sseryani](https://github.com/sseryani)           |\n| \ud83d\udcdc quotes              | Inspirational quotes                                                                  | [@German-Corpaz](https://github.com/German-Corpaz)                                                       |\n| \ud83d\udcd6 dictionary          | Returns meaning of word                                                               | [@iamnishant14](https://github.com/iamnishant14)                                                         |\n| \ud83d\udd23 password generator  | The name tells it all                                                                 | [@iamnishant14](https://github.com/iamnishant14)                                                         |\n| \ud83d\udc1c debug               | Prints all parameters passed to bot                                                   | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \ud83d\udcda wikipedia           | Returns a wikipedia article                                                           | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |\n| \ud83d\uddff translate           | Google translate plugin                                                               | [@a-deeb](https://github.com/a-deeb)                                                                     |\n| \ud83d\udcd1 test                | Runs tests                                                                            | [@Abdur-rahmaanJ](https://github.com/Abdur-rahmaanJ)                                                     |\n| \u26c5\ufe0f weather            | Returns weather info for a given location                                             | [@Macr0Nerd](https://github.com/Macr0Nerd)                                                               |\n| \u2709\ufe0f mail                | Send emails within the chat                                                           | [@TannerFry](https://github.com/TannerFry)                                                               |\n| \ud83d\udd74\ufe0f hangman             | Play hangman in the chat                                                              | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |\n| \ud83c\udf82 age                 | Takes in birthday and outputs age                                                     | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |\n| \u2714\ufe0f fact                | Returns a random fact                                                                 | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |\n| \ud83d\udd0d google              | Returns three search results from google                                              | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |\n| \ud83d\udcee send message        | Sends a message to another channel                                                    | [@JustinWalker4179](https://github.com/justinwalker4179)                                                 |\n| \ud83d\udcdd log                 | Logs the chat into a log file                                                         | [@RiceAbove](https://github.com/RiceAbove)                                                               |\n| \ud83d\udeaa joins               | Greets everyone who joins the channel                                                 | [@RiceAbove](https://github.com/RiceAbove)                                                               |\n| \ud83d\udcc5 date                | Posts the current date                                                                | [@RiceAbove](https://github.com/RiceAbove)                                                               |\n| \ud83d\udd75\ufe0f\u200d riddle             | Returns a random riddle                                                               | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\uddde news                 | Gets the top 10 headlines from bbc world news                                         | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\udcdd horoscope           | Gets your daily horoscope for your starsign                                           | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\udcb5 currency converter  | Converts currencies                                                                   | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\udd2b russian_roulette    | May or may not kick you off the channel                                               | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83c\udfe8 monopoly            | Honeybot now supports the world's worst game!                                         | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \u26bd\ufe0f transfer_rumour    | Shows the day's transfer rumours                                                      | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83c\udccf blackjack/21        | Play 21 on honeybot!                                                                  | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83e\udd12 corona              | Get the latest news on coronavirus with honeybot!                                     | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\udcd6 diary               | Keep a diary with honeybot                                                            | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83d\udee9 flight               | Gets flight info from flightradar24                                                   | [@AngeloGiacco](https://github.com/AngeloGiacco)                                                         |\n| \ud83c\udfb2 roll                | Rolls a dice                                                                          | [@GlennToms](https://github.com/GlennToms)                                                               |\n| \u2753 help                | Show link to plugin's information page                                                | [@edumello](https://github.com/edumello)                                                                 |\n| \u2705 channeljoin         | Join command for bot                                                                  | [@marceloyb](https://github.com/marceloyb)                                                               |\n| :page_with_curl: comic | Returns a random comic                                                                | [@mboekhold](https://github.com/mboekhold)                                                               |\n| \ud83d\udcdd todo                | Makes a to do list                                                                    | [@h-ranjan1110](https://github.com/h-ranjan1110)                                                         |\n| \ud83c\udfb1 Magic 8 Ball        | Answer questions using magic 8 ball                                                   | [@ZakariaTalhami](https://github.com/ZakariaTalhami)                                                     |\n| \ud83c\udf9f Random Excuse        | Generates a random excuse for you.                                                    | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |\n| \ud83e\udd86 DuckDuckGo Search   | Search queries in duckduckgo and return abstract.                                     | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |\n| \ud83d\uddbc Random Image         | Returns a random image url.                                                           | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |\n| \ud83d\udee2 URL Shortener        | Shortens a url                                                                        | [@rakeshseal0](https://github.com/rakeshseal0)                                                           |\n| \ud83d\ude01 emoji               | Returns emoji meaning                                                                 | [@deadex-ng](https://github.com/deadex-ng)                                                               |\n| \ud83c\udf82 birthday            | Shows birthday match probability on a people group.                                   | [@paulosgf](https://github.com/paulosgf)                                                                 |\n| \ud83c\udfc0 basketball          | Shows information about the medals of euroBasket and Basketball world cup             | [@kefthymic](https://github.com/kefthymic)                                                               |\n| \ud83c\udfac movies_imdb         | Returns certain information about a certain movie or shows 250 all time best movies   | [@ZoeyKats](https://github.com/ZoeyKats)                                                                 |\n| \u26e9\ufe0f anime               | Returns certain information about the top 100 anime                                   | [@cdkontos](https://github.com/cdkontos)                                                                 |\n\n## \u26a1 Quickstart\n\nsetup\n\n```bash\nmkdir botx\ncd botx\npython -m venv venv\nvenv\\scripts\\activate # or source venv/bin/activate for linux\npython -m pip install honeybot\n\n```\n\nrun\n\n```bash\nhoneybot init\nhoneybot run\n```\n\nin settings/settings.toml\n\n```\n[INFO]\n\nserver_url = irc.libera.chat\nport = 6667\nname = appinventormuBot\n```\n\nIn settings/settings.toml listed plugins under PLUGINS/downloaded will load. Plugins in directory plugins/core are auto loaded.\n\n## \ud83d\udcbb Seeing The Bot In Action\n\nGet an IRC client\n\n- Web: [Kiwiirc](https://kiwiirc.com) (easy)\n- Desktop: [Hexchat](https://hexchat.github.io)\n- Android: [Revolution IRC](https://github.com/MCMrARM/revolution-irc)\n\nconfigure\n\n```\nport: 6667\nurl: irc.libera.chat\n```\n\nthen join channel `#ltch`\n\nyou should see the bot as hbot ... or as it's name is in [settings](https://github.com/pyhoneybot/honeybot/blob/master/src/honeybot/settings/CONNECT.conf)\n\n## Docker\n\n**Building Docker image**\n\nChange SERVER, PORT and NICKNAME variables to match your preferences\n\n```\ndocker build -t \"honeybot/honeybot:6.0.2\" .\n```\n\n**Running Docker image**\n\n```\ndocker run -d --name=honeybot honeybot/honeybot:v6.0.2 honeybot run\n```\n\n## \ud83d\udd27 Plugins Development\n\nEach plugin has a folder named after it. In it there is a file called main.py. In each there is a class called Plugin.\n\n```python\n# -*- coding: utf-8 -*-\n\nclass Plugin:\n    def __init__(self):\n        pass\n\n    def run(self, incoming, methods, info, bot_info):\n        try:\n            if info['command'] == 'PRIVMSG' and info['args'][1] == '.hi':\n                methods['send'](info['address'], 'hooo')\n        except Exception as e:\n            print('woops plugin error ', e)\n```\n\nwe see four parameters being passed to the run method `, incoming, methods, info, bot_info)`\n\n#### parameter1: incoming\n\n`incoming` is the raw line and is not used except if you are not satisfied with the already provided methods\n\n#### parameter2: methods\n\n`methods` is a dictionary of methods to ease your life. a quick look at [main.py](https://github.com/pyhoneybot/honeybot/blob/master/src/honeybot/api/main.py) reveals\n\n```python\ndef methods(self):\n        return {\n                'send_raw': self.send,\n                'send': self.send_target,\n                'join': self.join\n                }\n```\n\nwhere `send_raw` allows you to send in any string you want, thereby allowing you to implement any irc protocol from scratch\n\nbut, 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.\n\n`join` allows you to join a channel by `methods['join']('<channel name>')`\n\n#### parameter3: info (meaning message info)\n\nfor a normal run, info produces\n\n```python\n{\n'prefix': 'appinv!c5e342c5@gateway/web/cgi-irc/kiwiirc.com/ip.200.200.22.200',\n'command': 'PRIVMSG',\n'address': '##bottestingmu',\n'args': ['##bottestingmu', 'ef']\n}\n```\n\nhence if you want messages, `messages = info['args'][1:]` or the first word if you want to check for command will be `info['args'][1]`\n\n**use example**\n\n- the command info is used in the join channel plugin to detect a join command and greet the user who just joined\n\n### bot info\n\nbot_info returns info about the bot\n\n```python\n        return {\n            'name': self.name,\n            'special_command': self.sp_command,\n            'required_modules': self.required_modules,\n            'owners': self.owners,\n            'time': self.time,\n            'friends': self.friends\n        }\n```\n\nso that in run method you can access those.\n\n**use example**\n\n- 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.\n- The required modules is used in the installed plugin to determine what required plugin the bot runner did not install\n\n#### wrapping up\n\nhence\n\n```python\nif info['command'] == 'PRIVMSG' and info['args'][1] == '.hi':\n    methods['send'](info['address'], 'hooo')\n```\n\nfrom above means\n\n```\nif message received == .hi:\n    send(address, message)\n```\n\n## \ud83d\udcc3 Contributing Guide\n\n<https://pyhoneybot.github.io/honeybot/How_Tos/contributing.html>\n\n- don't forget to add your country flag here after accepted PR. i'll have to hunt it down on your profile if not.\n- make sure to follow PEP8\n\nCheck out [Contributing](https://github.com/pyhoneybot/honeybot/blob/master/CONTRIBUTING.md) to get started on contributing.\n\n## \ud83d\udd0c Todo Plugins\n\n- [x] \ud83d\udc90 humour\n- [x] \ud83c\udf28\ufe0f weather\n- [x] \u2709\ufe0f mail\n- [x] \ud83c\udf9b\ufe0f maths\n- [ ] \ud83d\udce5 pm when user online\n- [ ] Random Colour\n\n## \u2611 Allowing Plugins\n\n**Plugins available**\n<https://pyhoneybot.github.io/honeybot/plugins.html>\n\nin settings/settings.toml, add the plugin to allow! \n\n```toml\n[PLUGINS]\n\ndownloaded = [\"greet\",] # Downloaded plugins to load\n```\n\n## \ud83d\udce7 Contact (Including vulnerabilities)\n\n### Email\n\n- Abdur-Rahmaan Janhangeer | arj.python@gmail.com\n\n## \ud83d\udd8a Credits\n\n- [@arwinneil](https://github.com/arwinneil), \"Open Source\" and \"Made In Moris\" badges\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "IRC bot with vast collection of plugins. First timers friendly",
    "version": "6.1.1",
    "project_urls": {
        "Changelog": "https://github.com/pyhoneybot/honeybot/blob/main/CHANGES.md",
        "Homepage": "https://github.com/pyhoneybot/honeybot"
    },
    "split_keywords": [
        "irc",
        "bot",
        "plugins"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d726631a0e9bf399565517701ac3692f719612949b7bbce43e393fc3a12a10f",
                "md5": "540cd9f3f8fbaf5200e27a02ca355254",
                "sha256": "3ec68bb411327b573efaa3fa8ece1e899c4fffe17fd3eb59082af00aedabb974"
            },
            "downloads": -1,
            "filename": "honeybot-6.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "540cd9f3f8fbaf5200e27a02ca355254",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 172112,
            "upload_time": "2024-09-24T23:13:36",
            "upload_time_iso_8601": "2024-09-24T23:13:36.441533Z",
            "url": "https://files.pythonhosted.org/packages/0d/72/6631a0e9bf399565517701ac3692f719612949b7bbce43e393fc3a12a10f/honeybot-6.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c996388a99349f0d5e0b1067f2b907743c36cf6de4f1dd82f7eb0907c62ca783",
                "md5": "9624bba7f2bb376fc37a611cca54fbb2",
                "sha256": "b8f0d11369c106748a0c0e76b97e95f4a7e8bac094ebc40621ed544860767da7"
            },
            "downloads": -1,
            "filename": "honeybot-6.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9624bba7f2bb376fc37a611cca54fbb2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 112237,
            "upload_time": "2024-09-24T23:13:37",
            "upload_time_iso_8601": "2024-09-24T23:13:37.910695Z",
            "url": "https://files.pythonhosted.org/packages/c9/96/388a99349f0d5e0b1067f2b907743c36cf6de4f1dd82f7eb0907c62ca783/honeybot-6.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-24 23:13:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyhoneybot",
    "github_project": "honeybot",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "honeybot"
}
        
Elapsed time: 4.84752s