Skip to content

Commit 11beab2

Browse files
authored
Create fmk.py
1 parent 0ce97e0 commit 11beab2

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

plugins/fmk.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import codecs
2+
import os
3+
import random
4+
import re
5+
6+
from cloudbot import hook
7+
8+
@hook.on_start()
9+
def load_fmk(bot):
10+
"""
11+
:type bot: cloudbot.bot.Cloudbot
12+
"""
13+
global fmklist
14+
15+
with codecs.open(os.path.join(bot.data_dir, "fmk.txt"), encoding="utf-8") as f:
16+
fmklist = [line.strip() for line in f.readlines() if not line.startswith("//")]
17+
18+
@hook.command("fmk", autohelp=False)
19+
def fmk(text, action):
20+
"""Fuck, Marry, Kill"""
21+
message((text.strip() if is_valid(text.strip()) else "") + random.choice(fmklist) + ", " + random.choice(out) + ", " + random.choice(out))

0 commit comments

Comments
 (0)