Skip to content

Commit

Permalink
Removed !sbrandom filtering code
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
DuckBoss committed Jun 9, 2020
1 parent 6509054 commit e6ac65c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions JJMumbleBot/plugins/extensions/sound_board/sound_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit e6ac65c

Please sign in to comment.