From e353ec3c3b4b84ade484573fe805c06fc24f5e3d Mon Sep 17 00:00:00 2001 From: Flame442 <34169552+Flame442@users.noreply.github.com> Date: Wed, 13 Feb 2019 14:53:19 -0500 Subject: [PATCH] [V3 RndStatus] [p]rndstatus type fixes Fixes types in help text and adds a check to the value. --- rndstatus/rndstatus.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rndstatus/rndstatus.py b/rndstatus/rndstatus.py index 7deae03..9fa18fb 100644 --- a/rndstatus/rndstatus.py +++ b/rndstatus/rndstatus.py @@ -81,11 +81,15 @@ class RndStatus(BaseCog): """Define the rndstatus type. Type list: - 1 = Playing + 0 = Playing + 1 = Streaming 2 = Listening 3 = Watching""" - await self.config.type.set(type) - await ctx.send("Rndstatus type set.") + if 0 <= type <= 3: + await self.config.type.set(type) + await ctx.send("Rndstatus type set.") + else: + await ctx.send("Type must be between 0 and 3.") async def switch_status(self, message): try: