Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nipple flick command #281

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/flicks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flick's {user} left nipple and glares.
flick's {user} right nipple and glares.
flick's {user} nipple.
flick's {user} third nipple.
flick's {user} nipple off.
21 changes: 19 additions & 2 deletions plugins/attacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def load_attacks(bot):
"""
:type bot: cloudbot.bot.CloudBot
"""
global larts, flirts, kills, slaps, rekts
global larts, flirts, kills, slaps, rekts, flick

with codecs.open(os.path.join(bot.data_dir, "larts.txt"), encoding="utf-8") as f:
larts = [line.strip() for line in f.readlines() if not line.startswith("//")]
Expand All @@ -42,7 +42,10 @@ def load_attacks(bot):

with codecs.open(os.path.join(bot.data_dir, "rekts.txt"), encoding="utf-8") as f:
rekts = [line.strip() for line in f.readlines() if not line.startswith("//")]


with codecs.open(os.path.join(bot.data_dir, "flicks.txt"), encoding="utf-8") as f:
rekts = [line.strip() for line in f.readlines() if not line.startswith("//")]

with codecs.open(os.path.join(bot.data_dir, "kills.json"), encoding="utf-8") as f:
kills = json.load(f)

Expand Down Expand Up @@ -83,8 +86,22 @@ def flirt(text, conn, nick, message):
target = nick

message('{}, {}'.format(target, random.choice(flirts)))

@asyncio.coroutine
@hook.command
def flick(text, conn, nick, message):
"""<user> - flick <user> nipple"""
target = text.strip()

if not is_valid(target):
return "I can't flick that person's nipple."

if is_self(conn, target):
# user is trying to make the bot attack itself!
target = nick

message('{}, {}'.format(target, random.choice(flicks)))

@asyncio.coroutine
@hook.command
def rekt(text, conn, nick, message):
Expand Down