Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (86)

Sur d’autres sites (15293)

  • Revision 33019 : 2 precisions

    17 novembre 2009, par cedric@… — Log

    2 precisions

  • Anomalie #2128 (Fermé) : Logo automatique d’un site

    18 juin 2011, par Johan Pustoch

    Dans ma conf, les documents joints sont autorisés pour les sites référencés. sur ecrire/ ?exec=site_edit&id_rubrique=N Référencement automatisé d’un site qui détecte un logo. Le logo s’affiche sur le formulaire d’ajout de document. Une fois enregistré, plus de soucis. SPIP 3.0.0-dev (...)

  • My discord bot did work on local, but didn't work on heroku

    26 juillet 2022, par PeeP

    I depoly my discord bot on Heroku.
My bot sings normally when running on local,
If I run it on Heroku, the song will not play.
Full code is here

    


    @commands.command(name ="play")
    async def play_music(self, ctx, *keywords):
        if ctx.voice_client is None: 
            if ctx.author.voice:
                await ctx.author.voice.channel.connect()
            else:
                embed = discord.Embed(title = 'erro', description = "use after enter the channel 🤔", color = discord.Color.red())
                await ctx.send(embed=embed)
                raise commands.CommandError("Author not connected to a voice channel.")
        elif ctx.voice_client.is_playing():
            ctx.voice_client.stop()
        
        keyword = ' '.join(keywords)
        url = getUrl(keyword)
        await ctx.send(url)
        embed = discord.Embed(title = 'play', description = 'getting ready to play the song! 😎' , color = discord.Color.red())
        await ctx.send(embed=embed)


    


    It works up to the top code, but it doesn't seem to work on the bottom code.

    


            data = self.DL.extract_info(url, download = False)
        link = data['url']
        title = data['title']

        ffmpeg_options = {
            'options': '-vn',
            "before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5"
        }
        player = discord.FFmpegPCMAudio(link, **ffmpeg_options, executable = "./ffmpeg/bin/ffmpeg.exe")
        ctx.voice_client.play(player)
        
        embed = discord.Embed(title = 'play', description = f'{title} start play! 🐥' , color = discord.Color.blue())
        await ctx.send(embed=embed)


    


    My heroku Buildpacks

    


    heroku/python
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
https://github.com/xrisk/heroku-opus
https://github.com/heroku/heroku-buildpack-apt.git
https://github.com/heroku/heroku-buildpack-apt
https://github.com/kitcast/buildpack-ffmpeg.git
https://github.com/codeinteger6/heroku-buildpack-libopus.git
https://github.com/heroku/heroku-buildpack-apt.git


    


    requirements.txt

    


    discord.py
discord.py[voice]
asyncio
openpyxl
youtube_dl
requests
ffmpeg
PyNaCl
wheel
websockets==6.0
gtts
PyGithub
pyssml
gspread
oauth2client
PyOpenSSL
boto3


    


    Aptfile

    


    git
libopus0
libopus-dev
libssl-dev
libffi-dev
libsodium-dev


    


    I really wanna know my problems.
Thank you.