
Conflicts: disabled_stuff/mygengo_translate.py plugins/attacks.py plugins/core_sieve.py plugins/fortune.py plugins/geoip.py plugins/mark.py
15 lines
313 B
Python
15 lines
313 B
Python
import random
|
|
|
|
from util import hook
|
|
|
|
|
|
with open("./data/fortunes.txt") as f:
|
|
|
|
fortunes = [line.strip() for line in f.readlines()
|
|
if not line.startswith("//")]
|
|
|
|
|
|
@hook.command(autohelp=False)
|
|
def fortune(inp):
|
|
"""fortune -- Fortune cookies on demand."""
|
|
return random.choice(fortunes)
|