diff options
author | Mango0x45 <thomasvoss@live.com> | 2020-08-23 12:21:39 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2020-08-23 12:21:39 +0000 |
commit | 737771a4d7fd94c34292c69885faed49c6eb603a (patch) | |
tree | d261627dcae59a1a41c951b05d238eb08cbcba01 /cogs/admin.py | |
parent | a1d82d89fe9bea901ddf6fc97f1add09fe1e7035 (diff) | |
download | steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar.gz steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar.bz2 steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar.lz steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar.xz steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.tar.zst steve-bot-737771a4d7fd94c34292c69885faed49c6eb603a.zip |
Video filter splits on =
Diffstat (limited to 'cogs/admin.py')
-rwxr-xr-x | cogs/admin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index c023cd4..ed7b7cc 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -301,7 +301,7 @@ class Admin(commands.Cog): @commands.check(is_mod) async def blacklistvideo(self, ctx, uri): """Set runs from a specific url to be auto rejected""" - video_id = uri.split('/')[-1] + video_id = uri.split('/')[-1].split('=')[-1] with open('runs_blacklist.json', 'w') as f: self.bot.runs_blacklist["videos"].append(video_id) json.dump(self.bot.runs_blacklist, f, indent=4) @@ -320,7 +320,7 @@ class Admin(commands.Cog): @commands.check(is_mod) async def runs_blacklist(self, ctx): """Sends a list of blacklisted videos and players""" - message = '```The following URIs are blacklisted:\n' + message = '```The following videos are blacklisted:\n' for uri in self.bot.runs_blacklist["videos"]: message += f'{uri}, ' await ctx.send(f'{message[:-2]}```') |