zarox commited on
Commit
4cb0ebf
·
1 Parent(s): 3e0f2ab
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -173,7 +173,7 @@ async def buttons_handler(event):
173
  async def audio_effect_handler(event):
174
  user_id = event.sender_id
175
  if user_id not in states or not states[user_id]:
176
- await event.answer("`No audio file found. Please use /buttons command to upload an audio file.`")
177
  return
178
 
179
  # Retrieve the audio file from the user's state
@@ -192,11 +192,14 @@ async def audio_effect_handler(event):
192
  modified_sound = Fusion.effectReverb(sound)
193
  elif query == 'reverse':
194
  modified_sound = sound.reverse()
 
 
 
195
 
196
  # Update the user's state with the modified sound
197
  states[user_id] = modified_sound
198
 
199
- await event.answer"Effect applied. Click 'Send' to receive the modified audio file.")
200
 
201
  except Fusion.InvalidMusicFileError as e:
202
  await event.reply(str(e))
@@ -217,7 +220,7 @@ async def preview_handler(event):
217
  # Clean up - remove the saved preview audio file
218
  os.remove(output_file)
219
  else:
220
- await event.answer("`No modified audio file found. Please apply an effect first.`")
221
 
222
 
223
  async def send_handler(event):
 
173
  async def audio_effect_handler(event):
174
  user_id = event.sender_id
175
  if user_id not in states or not states[user_id]:
176
+ await event.answer("No audio file found. Please use /buttons command to upload an audio file.")
177
  return
178
 
179
  # Retrieve the audio file from the user's state
 
192
  modified_sound = Fusion.effectReverb(sound)
193
  elif query == 'reverse':
194
  modified_sound = sound.reverse()
195
+ else:
196
+ return await event.answer("INvalid for now...")
197
+
198
 
199
  # Update the user's state with the modified sound
200
  states[user_id] = modified_sound
201
 
202
+ await event.answer("Effect applied. Click /send to receive the modified audio file.")
203
 
204
  except Fusion.InvalidMusicFileError as e:
205
  await event.reply(str(e))
 
220
  # Clean up - remove the saved preview audio file
221
  os.remove(output_file)
222
  else:
223
+ await event.answer("No modified audio file found. Please apply an effect first.")
224
 
225
 
226
  async def send_handler(event):