From e6ac65cf6650f5bb3361c552be012c7502298891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20=5B=EC=A0=9C=EC=9D=B4=EC=8A=A8=20=EC=A0=9C?= =?UTF-8?q?=EB=A1=AC=5D?= <20238115+DuckBoss@users.noreply.github.com> Date: Tue, 9 Jun 2020 02:16:55 -0400 Subject: [PATCH] Removed !sbrandom filtering code - Removed code that attempted to filter out any sound clips over 6 seconds long that would have been played with the !sbrandom command. - Any sound board clip now has an equal chance of playing with the !sbrandom command. --- JJMumbleBot/plugins/extensions/sound_board/sound_board.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/JJMumbleBot/plugins/extensions/sound_board/sound_board.py b/JJMumbleBot/plugins/extensions/sound_board/sound_board.py index 4752b4e1..63422955 100644 --- a/JJMumbleBot/plugins/extensions/sound_board/sound_board.py +++ b/JJMumbleBot/plugins/extensions/sound_board/sound_board.py @@ -177,12 +177,7 @@ def process(self, text): random.seed(datetime.now()) random_sfx = random.choice(gather_list)[:-4] - sfx_duration = sbu.get_audio_length(random_sfx) - while sfx_duration > 6: - random_sfx = random.choice(gather_list)[:-4] - sfx_duration = sbu.get_audio_length(random_sfx) - # print(random_sfx) if not os.path.isfile(f"{dir_utils.get_perm_med_dir()}/{self.plugin_name}/{random_sfx}.wav"): GS.gui_service.quick_gui( "The sound clip does not exist.",