This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
2012-08-23 04:56:00 +02:00
|
|
|
import random
|
2011-11-21 01:09:33 +01:00
|
|
|
|
2014-02-14 04:36:57 +01:00
|
|
|
from util import hook, text
|
|
|
|
|
2012-03-23 01:32:48 +01:00
|
|
|
|
2012-08-23 04:56:00 +02:00
|
|
|
with open("plugins/data/slogans.txt") as f:
|
|
|
|
slogans = [line.strip() for line in f.readlines()
|
|
|
|
if not line.startswith("//")]
|
2011-11-21 01:09:33 +01:00
|
|
|
|
2012-03-23 01:32:48 +01:00
|
|
|
|
2012-08-23 04:56:00 +02:00
|
|
|
@hook.command
|
|
|
|
def slogan(inp):
|
2013-09-04 12:30:04 +02:00
|
|
|
"""slogan <word> -- Makes a slogan for <word>."""
|
2012-08-23 04:56:00 +02:00
|
|
|
out = random.choice(slogans)
|
|
|
|
if inp.lower() and out.startswith("<text>"):
|
|
|
|
inp = text.capitalize_first(inp)
|
2011-11-21 01:09:33 +01:00
|
|
|
|
2012-08-23 04:56:00 +02:00
|
|
|
return out.replace('<text>', inp)
|