~anjan/err-reddit

fbe5d443fe44fbc214d31d556fcfc716c9f89c17 — Anjan Momi 5 years ago 19d80ed
added args checking
1 files changed, 4 insertions(+), 0 deletions(-)

M reddit.py
M reddit.py => reddit.py +4 -0
@@ 25,6 25,10 @@ class Reddit(BotPlugin):
    @botcmd
    def subme(self, msg, args):
        """Usage: !subme <subreddit>"""

        if " " in args or len(args) == 0:
            return "Usage: !subme <subreddit>"

        url = "https://www.reddit.com/r/"
        for arg in args:
            if arg is " ":