Skip to content

Commit 4b81b90

Browse files
committed
Fix file paths being incorrect in playsound
1 parent 517e062 commit 4b81b90

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bot/commands/fun.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,11 @@ async def playsound(self, ctx, mp3_url = None):
515515
})
516516
return
517517

518-
with open(files.get_application_support() + "/data/cache/mysound.mp3", "wb") as sound_file:
518+
with open(files.get_cache_path() + "/mysound.mp3", "wb") as sound_file:
519519
sound_file.write(sound_res.content)
520520

521521
soundeffects = soundboard.Soundboard(cfg.get("token"), ctx.guild.id, voice_state.channel.id)
522-
sound = soundeffects.upload_sound("data/cache/mysound.mp3", "ghost_sound_player", volume=1, emoji_id=None)
522+
sound = soundeffects.upload_sound(files.get_cache_path() + "/mysound.mp3", "ghost_sound_player", volume=1, emoji_id=None)
523523

524524
if sound.id:
525525
await cmdhelper.send_message(ctx, {
@@ -529,7 +529,7 @@ async def playsound(self, ctx, mp3_url = None):
529529

530530
soundeffects.play_sound(sound.id, source_guild_id=ctx.guild.id)
531531
soundeffects.delete_sound(sound.id)
532-
os.remove("data/cache/mysound.mp3")
532+
os.remove(files.get_cache_path() + "/mysound.mp3")
533533

534534
else:
535535
await cmdhelper.send_message(ctx, {

0 commit comments

Comments
 (0)