From c1fa92f6aa7cd4040ac12a28d5b04a2944fdd50f Mon Sep 17 00:00:00 2001 From: Abdur-Rahmaan Janhangeer Date: Wed, 3 Apr 2019 10:33:36 +0400 Subject: [PATCH 1/8] update - minor --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 285f4e4..5794f1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![first-timers-only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](https://www.firsttimersonly.com/) ![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg) +![Open Source Love](https://img.shields.io/badge/chat%20on-discord-green.svg) ![MadeinMoris](https://img.shields.io/badge/Made%20in-Moris-green.svg) # 🍯 honeybot py @@ -13,7 +14,7 @@ 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 slack page! +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. From a316011bd59fc6d9403a5f8c65cc69f2d6322208 Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Tue, 2 Apr 2019 23:35:28 -0700 Subject: [PATCH 2/8] fixed dictionary --- honeybot/plugins/dictionary.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/honeybot/plugins/dictionary.py b/honeybot/plugins/dictionary.py index c11adcd..002cf73 100644 --- a/honeybot/plugins/dictionary.py +++ b/honeybot/plugins/dictionary.py @@ -16,25 +16,20 @@ returns meaning of the word specified """ -import PyDictionary - +from PyDictionary import PyDictionary class Plugin: def __init__(self): pass - def __dictionary(self, word): - return PyDictionary().meaning(word).get('Noun') - def run(self, incoming, methods, info): try: - # if '!~' in info['prefix']: - # print(info) msgs = info['args'][1:][0].split() - if info['command'] == 'PRIVMSG': - if len(msgs) > 1: - if msgs[0] == '.dictionary': - word = msgs[1] - methods['send'](info['address'], Plugin.__dictionary(self, word)) + + if info['command'] == 'PRIVMSG' and msgs[0] == '.dictionary': + dict = PyDictionary() + word = str(msgs[1]) + defin = dict.meaning(word)['Noun'] + methods['send'](info['address'], '{}'.format(defin)) except Exception as e: print('woops plug', e) From 29f32aa2f73f35f54f983304bc1f25742f4093d8 Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Tue, 2 Apr 2019 23:47:10 -0700 Subject: [PATCH 3/8] adding back dictionary --- honeybot/PLUGINS.conf | 4 ++-- honeybot/main.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/honeybot/PLUGINS.conf b/honeybot/PLUGINS.conf index 7d65734..6af3249 100644 --- a/honeybot/PLUGINS.conf +++ b/honeybot/PLUGINS.conf @@ -1,7 +1,7 @@ greet username joke - +dictionary maths calc caesar_cipher @@ -13,4 +13,4 @@ password_generator wikipedia weather mail -translate \ No newline at end of file +translate diff --git a/honeybot/main.py b/honeybot/main.py index e960aee..5f4d6a4 100644 --- a/honeybot/main.py +++ b/honeybot/main.py @@ -19,7 +19,7 @@ def __init__(self, owners=['appinventorMu', 'appinv'], password='', friends=['haruno', 'keiserr', 'loganaden'], - autojoin_channels=['##bottestingmu'] + autojoin_channels=['#ltch'] ): self.server_url = server_url self.port = port @@ -115,7 +115,7 @@ def join(self, channel): def load_plugins(self, list_to_add): print("\033[0;36mLoading plugins...\033[0;0m") - + to_load = [] with open('PLUGINS.conf', 'r') as f: to_load = f.read().split('\n') @@ -130,7 +130,7 @@ def load_plugins(self, list_to_add): self.plugins = list_to_add print("\033[0;32mLoaded plugins...\033[0;0m") - + def methods(self): return { From 3657f2da1269b18b8119d413bfd7861348da6fe6 Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Wed, 3 Apr 2019 11:24:05 -0700 Subject: [PATCH 4/8] adding requirements.txt --- requirements.txt | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d5b55f2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,58 @@ +asn1crypto==0.24.0 +attrs==17.4.0 +Automat==0.6.0 +beautifulsoup4==4.7.1 +blinker==1.4 +certifi==2019.3.9 +chardet==3.0.4 +Click==7.0 +cloud-init==18.2 +colorama==0.3.7 +command-not-found==0.3 +configobj==5.0.6 +constantly==15.1.0 +cryptography==2.1.4 +distro-info==0.18 +futures==3.1.1 +goslate==1.5.1 +httplib2==0.9.2 +hyperlink==17.3.1 +idna==2.8 +incremental==16.10.1 +Jinja2==2.10 +jsonpatch==1.16 +jsonpointer==1.10 +jsonschema==2.6.0 +keyring==10.6.0 +keyrings.alt==3.0 +language-selector==0.1 +MarkupSafe==1.0 +oauthlib==2.0.6 +PAM==0.4.2 +pyasn1==0.4.2 +pyasn1-modules==0.2.1 +pycrypto==2.6.1 +PyDictionary==1.5.2 +pygobject==3.26.1 +PyJWT==1.5.3 +pyOpenSSL==17.5.0 +pyserial==3.4 +python-apt==1.6.2 +python-debian==0.1.32 +pyxdg==0.25 +PyYAML==3.12 +requests==2.21.0 +requests-unixsocket==0.1.5 +SecretStorage==2.3.1 +service-identity==16.0.0 +six==1.11.0 +soupsieve==1.9 +ssh-import-id==5.7 +systemd-python==234 +Twisted==17.9.0 +ufw==0.35 +unattended-upgrades==0.1 +urllib3==1.24.1 +virtualenv==16.4.3 +wikipedia==1.4.0 +zope.interface==4.3.2 From 2d5dd1de296026e287eef271e93afc9801771d2c Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Wed, 3 Apr 2019 11:30:02 -0700 Subject: [PATCH 5/8] removed modules not needed --- requirements.txt | 54 ------------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/requirements.txt b/requirements.txt index d5b55f2..4ce0842 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,58 +1,4 @@ -asn1crypto==0.24.0 -attrs==17.4.0 -Automat==0.6.0 -beautifulsoup4==4.7.1 -blinker==1.4 -certifi==2019.3.9 -chardet==3.0.4 -Click==7.0 -cloud-init==18.2 -colorama==0.3.7 -command-not-found==0.3 -configobj==5.0.6 -constantly==15.1.0 -cryptography==2.1.4 -distro-info==0.18 -futures==3.1.1 -goslate==1.5.1 -httplib2==0.9.2 -hyperlink==17.3.1 -idna==2.8 -incremental==16.10.1 -Jinja2==2.10 -jsonpatch==1.16 -jsonpointer==1.10 -jsonschema==2.6.0 -keyring==10.6.0 -keyrings.alt==3.0 -language-selector==0.1 -MarkupSafe==1.0 -oauthlib==2.0.6 -PAM==0.4.2 -pyasn1==0.4.2 -pyasn1-modules==0.2.1 -pycrypto==2.6.1 PyDictionary==1.5.2 -pygobject==3.26.1 -PyJWT==1.5.3 -pyOpenSSL==17.5.0 -pyserial==3.4 -python-apt==1.6.2 -python-debian==0.1.32 -pyxdg==0.25 -PyYAML==3.12 requests==2.21.0 requests-unixsocket==0.1.5 -SecretStorage==2.3.1 -service-identity==16.0.0 -six==1.11.0 -soupsieve==1.9 -ssh-import-id==5.7 -systemd-python==234 -Twisted==17.9.0 -ufw==0.35 -unattended-upgrades==0.1 -urllib3==1.24.1 -virtualenv==16.4.3 wikipedia==1.4.0 -zope.interface==4.3.2 From 620c6661618b9a6a01cd373b7e27ae1d598ad5a0 Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Wed, 3 Apr 2019 11:32:40 -0700 Subject: [PATCH 6/8] removed unixsocket --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4ce0842..4cc71c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ PyDictionary==1.5.2 requests==2.21.0 -requests-unixsocket==0.1.5 wikipedia==1.4.0 From 36c2f9308b83b1da1aa0c399b2b7aedfdded2bcc Mon Sep 17 00:00:00 2001 From: Macr0Nerd Date: Wed, 3 Apr 2019 15:37:03 -0500 Subject: [PATCH 7/8] Fixed the program timing out --- honeybot/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/honeybot/main.py b/honeybot/main.py index 5f4d6a4..ec8cc59 100644 --- a/honeybot/main.py +++ b/honeybot/main.py @@ -224,7 +224,7 @@ def stay_alive(self, incoming): if 'ping' in incoming.lower(): part = incoming.split(':') if self.domain in part[1]: - self.send(self.pong_return()) + self.send(self.pong_return() + ":{0}".format(part[1])) print(''' ***** message ***** ping detected from From 0d4f28443c771c5c91929f416da3bc2edb6e19fd Mon Sep 17 00:00:00 2001 From: Gico Carlo Evangelista Date: Wed, 3 Apr 2019 14:49:45 -0700 Subject: [PATCH 8/8] added project testimonials --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5794f1d..ae85ece 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ get issues delivered in your inbox. 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](https://github.com/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. + ## ✂ Current Features * 🍬 OOP architecture * 🛰️ keyword parameters