diff --git a/cogs/audio.py b/cogs/audio.py index bb6d757c9..330eb67c6 100644 --- a/cogs/audio.py +++ b/cogs/audio.py @@ -245,7 +245,7 @@ class Audio: self.current = -1 self.music_player.stop() await asyncio.sleep(1) - await self.bot.voice.disconnect() + if self.bot.voice: await self.bot.voice.disconnect() @commands.command(name="queue", pass_context=True, no_pm=True) #check that author is in the same channel as the bot async def _queue(self, ctx, link : str=None): diff --git a/cogs/trivia.py b/cogs/trivia.py index 6d740c3b0..7f0fe2257 100644 --- a/cogs/trivia.py +++ b/cogs/trivia.py @@ -19,7 +19,8 @@ class Trivia: async def trivia(self, ctx, list_name : str=None): """Start a trivia session with the specified list - Stop parameter will end the current session + trivia stop - Ends the current session + trivia - Shows trivia lists """ message = ctx.message if list_name == None: diff --git a/red.py b/red.py index 045c5632a..0667ff5af 100644 --- a/red.py +++ b/red.py @@ -341,10 +341,12 @@ def check_configs(): settings["PASSWORD"] = input("\nPassword> ") if not settings["EMAIL"] or not settings["PASSWORD"]: - raise("Email and password cannot be empty.") + input("Email and password cannot be empty. Restart Red and repeat the configuration process.") + exit(1) if "@" not in settings["EMAIL"]: - raise("Your email is invalid.") + input("You didn't enter a valid email. Restart Red and repeat the configuration process.") + exit(1) print("\nChoose a prefix (or multiple ones, one at once) for the commands. Type exit when you're done. Example prefix: !") settings["PREFIXES"] = [] @@ -358,6 +360,9 @@ def check_configs(): print("If you want, you can also do it later with [prefix]set owner. Leave empty in that case.") settings["OWNER"] = input("\nID> ") if settings["OWNER"] == "": settings["OWNER"] = "id_here" + if not settings["OWNER"].isdigit() and settings["OWNER"] != "id_here": + print("\nERROR: What you entered is not a valid ID. Set yourself as owner later with [prefix]set owner") + settings["OWNER"] = "id_here" print("\nInput the admin role's name. Anyone with this role will be able to use the bot's admin commands") print("Leave blank for default name (Transistor)")