sopel/modules/rundown.py

24 lines
534 B
Python
Raw Permalink Normal View History

2018-01-18 23:43:27 -05:00
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Redpill on the Bogdanovs.
"""
import os
import random
from module import commands, example
@commands("rundown")
@example(".rundown")
def grog(bot, trigger):
"""
Provides rundown on demand.
"""
if trigger.group(2) in ["-c", "--cabal"]:
with open(os.path.join(bot.config.homedir, "cabaldown.txt"), "r") as file:
data = file.read()
else:
with open(os.path.join(bot.config.homedir, "rundown.txt"), "r") as file:
data = file.read()
bot.say(data)