forked from CloudBotIRC/CloudBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CloudBotIRC#207 from IlGnome/gonzobot
rework of dwi.py
- Loading branch information
Showing
3 changed files
with
126 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"deal_with_it_macros": [ | ||
"https://i.imgur.com/WhgY2sX.gif", | ||
"https://i.imgur.com/eGInc.jpg", | ||
"https://i.imgur.com/KA3XSt5.gif", | ||
"https://i.imgur.com/rsuXB69.gif", | ||
"https://i.imgur.com/fFXmuSS.jpg", | ||
"https://j.gifs.com/L9mmYr.gif", | ||
"https://i.imgur.com/nxMBqb4.gif", | ||
"https://i.imgur.com/LZFE3y1.gif", | ||
"https://i.imgur.com/cky1KZB.gif", | ||
"https://i.imgur.com/ubPvLt4.jpg", | ||
"https://i.imgur.com/xMlks5p.jpg", | ||
"https://i.imgur.com/Awqpq.gif", | ||
"http://nerdist.com/wp-content/uploads/2016/04/Thanks-Obama-2.gif" | ||
], | ||
"facepalm_macros": [ | ||
"https://i.imgur.com/iWKad22r.jpg", | ||
"https://i.imgur.com/3Jauxrw.jpg", | ||
"https://i.imgur.com/kFyKOgj.gif", | ||
"https://i.imgur.com/5JaFlhU.jpg?1", | ||
"https://i.imgur.com/qbnNXWy.gif", | ||
"https://i.imgur.com/h46ycmx.png", | ||
"https://i.imgur.com/gPNQzaf.jpg", | ||
"https://i.imgur.com/9I8A9C5.jpg", | ||
"https://i.imgur.com/pSVD0jZ.jpg", | ||
"https://i.imgur.com/2kX7tdb.jpg", | ||
"https://i.imgur.com/R7ZPh.png", | ||
"https://i.imgur.com/8p2VGIY.jpg", | ||
"https://i.imgur.com/8VYMSq8.gif", | ||
"https://i.imgur.com/WVn7B8O.jpg", | ||
"https://i.imgur.com/GTxRRuv.gif" | ||
], | ||
"head_desk_macros": [ | ||
"https://i.imgur.com/Pg9nt.gif", | ||
"https://baudattitude.files.wordpress.com/2012/02/twilightsparkleheaddesk.gif", | ||
"https://i.imgur.com/LFzzTd8.gif", | ||
"https://i.imgur.com/DS0uEfv.jpg", | ||
"https://i.imgur.com/31ZJ2mT.jpg", | ||
"https://68.media.tumblr.com/20a0fe049b41d2be7562d19543fc9bf2/tumblr_inline_mq00ylPF1l1qz4rgp.gif", | ||
"https://i.imgur.com/RW2NAcQ.jpg", | ||
"https://i.imgur.com/1bmcUnj.gif", | ||
"https://i.imgur.com/r43WCSK.gif", | ||
"http://img.photobucket.com/albums/v642/StarRose/GIFS/headdesk.gif" | ||
], | ||
"fetish_macros": [ | ||
"https://i.imgur.com/FFy1IEg.jpg", | ||
"https://i.imgur.com/RspJyHy.gif", | ||
"https://i.imgur.com/J6EB8vs.gif", | ||
"https://imgur.com/LoYBEhZ", | ||
"https://i.imgur.com/bn2pnT6.gif", | ||
"https://i.imgur.com/MfZydOB.gif", | ||
"https://i.imgur.com/8N3DmQ6.gif", | ||
"https://imgur.com/veDLZc6", | ||
"https://i.imgur.com/jRTllgX.gif", | ||
"https://i.imgur.com/r9187c5.gif", | ||
"https://i.imgur.com/HUW0L1q.jpg", | ||
"https://i.imgur.com/rDhDhIU.gif", | ||
"https://i.imgur.com/QYypuG1.gif", | ||
"https://i.imgur.com/SE0Wzjx.gif", | ||
"https://i.imgur.com/SUNo8wV.gif", | ||
"https://i.imgur.com/xcruehZ.gif", | ||
"https://i.imgur.com/dTtAQyI.gif", | ||
"https://i.imgur.com/DIK7Tpb.gif", | ||
"https://i.imgur.com/uDlBc7X.gif", | ||
"https://i.imgur.com/dIy5gdd.gif", | ||
"https://i.imgur.com/9TGDK39.jpg", | ||
"https://i.imgur.com/fSiBZOj.gif", | ||
"https://i.imgur.com/f5JMDGK.jpg", | ||
"https://i.imgur.com/Wy2URSw.gif", | ||
"https://i.imgur.com/CVfuIwe.jpg", | ||
"https://i.imgur.com/3xKiDnC.gif", | ||
"https://i.imgur.com/WDszWfj.gif", | ||
"https://i.imgur.com/1DRvg1V.gif", | ||
"https://i.imgur.com/WK723Wk.jpg", | ||
"https://i.imgur.com/DJiaI7L.png" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import codecs | ||
import json | ||
import os | ||
import random | ||
from cloudbot import hook | ||
|
||
|
||
deal_with_it_phrases = [ 'Stop complaining, \x02{}\x02, and', | ||
'Jesus fuck \x02{}\x02, just', | ||
'Looks like \x02{}\x02 needs to', | ||
'Ever think that \x02{}\x02 just needs to'] | ||
|
||
|
||
@hook.on_start() | ||
def load_macros(bot): | ||
global reaction_macros | ||
with codecs.open(os.path.join(bot.data_dir, "reaction_macros.json"), encoding="utf-8") as macros: | ||
reaction_macros = json.load(macros) | ||
|
||
|
||
@hook.command('dwi', 'dealwithit') | ||
def deal_with_it(text, message): | ||
"""<nick> - Tell <nick> in the channel to deal with it. Code located in reactions.py""" | ||
person_needs_to_deal = text.strip() | ||
phrase = random.choice(deal_with_it_phrases) | ||
formated_phrase = phrase.format(person_needs_to_deal) | ||
message('{} {}'.format(formated_phrase, random.choice(reaction_macros['deal_with_it_macros']))) | ||
|
||
|
||
@hook.command('fp', 'facepalm') | ||
def face_palm(text, message): | ||
"""<nick> - Expresses your frustration with <Nick>. Code located in reactions.py""" | ||
face_palmer = text.strip() | ||
message('Dammit {} {}'.format(face_palmer, random.choice(reaction_macros['facepalm_macros']))) | ||
|
||
|
||
@hook.command('hd', 'headdesk') | ||
def head_desk(text, message): | ||
"""<nick> - Hit your head against the desk becausae of <nick>. Code located in reactions.py""" | ||
idiot = text.strip() | ||
message('{} {}'.format(idiot, random.choice(reaction_macros['head_desk_macros']))) | ||
|
||
|
||
@hook.command('fetish', 'tmf') | ||
def my_fetish(text, message): | ||
"""<nick> - Did some one just mention what your fetish was? Let <nick> know! Code located in reactions.py""" | ||
person_to_share_fetish_with = text.strip() | ||
message('{} {}'.format(person_to_share_fetish_with, random.choice(reaction_macros['fetish_macros']))) |