久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='uEMYC'></small><noframes id='uEMYC'>

<i id='uEMYC'><tr id='uEMYC'><dt id='uEMYC'><q id='uEMYC'><span id='uEMYC'><b id='uEMYC'><form id='uEMYC'><ins id='uEMYC'></ins><ul id='uEMYC'></ul><sub id='uEMYC'></sub></form><legend id='uEMYC'></legend><bdo id='uEMYC'><pre id='uEMYC'><center id='uEMYC'></center></pre></bdo></b><th id='uEMYC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uEMYC'><tfoot id='uEMYC'></tfoot><dl id='uEMYC'><fieldset id='uEMYC'></fieldset></dl></div>
        <tfoot id='uEMYC'></tfoot>
        <legend id='uEMYC'><style id='uEMYC'><dir id='uEMYC'><q id='uEMYC'></q></dir></style></legend>
        • <bdo id='uEMYC'></bdo><ul id='uEMYC'></ul>

        Discord.py Bot 如何從本地文件播放音頻

        Discord.py Bot How to play audio from local files(Discord.py Bot 如何從本地文件播放音頻)
      1. <legend id='dgVYY'><style id='dgVYY'><dir id='dgVYY'><q id='dgVYY'></q></dir></style></legend>
          <tbody id='dgVYY'></tbody>

            <small id='dgVYY'></small><noframes id='dgVYY'>

            <tfoot id='dgVYY'></tfoot>

              • <i id='dgVYY'><tr id='dgVYY'><dt id='dgVYY'><q id='dgVYY'><span id='dgVYY'><b id='dgVYY'><form id='dgVYY'><ins id='dgVYY'></ins><ul id='dgVYY'></ul><sub id='dgVYY'></sub></form><legend id='dgVYY'></legend><bdo id='dgVYY'><pre id='dgVYY'><center id='dgVYY'></center></pre></bdo></b><th id='dgVYY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='dgVYY'><tfoot id='dgVYY'></tfoot><dl id='dgVYY'><fieldset id='dgVYY'></fieldset></dl></div>
                • <bdo id='dgVYY'></bdo><ul id='dgVYY'></ul>
                • 本文介紹了Discord.py Bot 如何從本地文件播放音頻的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  基本上是標(biāo)題.我已經(jīng)安裝了 ffmpeg 和 discord.py[audio].我只需要了解它是如何工作的.找不到本地音頻文件的任何教程.而且我無法從文檔中理解任何內(nèi)容:/

                  Basically the title. I installed ffmpeg and discord.py[audio] already. I just need to learn how it works. couldn't find any tutorial for local audio files. and I cant understand anything from documentations :/

                  推薦答案

                  這是一個(gè)播放本地音頻文件的功能.我在使用 FFmpeg 時(shí)遇到了問題,所以我硬編碼了 .exe 路徑.另外,我本地文件的文件路徑有問題,所以我把絕對(duì)路徑放進(jìn)去.這個(gè)函數(shù)也會(huì)在音頻播放完畢后刪除調(diào)用它的命令,保持整潔.

                  That's a function that plays a local audio file. I had problems with FFmpeg, so I hardcoded the .exe path. Also, I had a problem with the file path to the local file, so I put the absolute path in. This function also deletes the command that called it after the audio is done playing, keeping things tidy.

                   @bot.command(name="<command_name>")
                      async def <function_name>(ctx):
                          # Gets voice channel of message author
                          voice_channel = ctx.author.channel
                          channel = None
                          if voice_channel != None:
                              channel = voice_channel.name
                              vc = await voice_channel.connect()
                              vc.play(discord.FFmpegPCMAudio(executable="C:/ffmpeg/bin/ffmpeg.exe", source="C:<path_to_file>"))
                              # Sleep while audio is playing.
                              while vc.is_playing():
                                  sleep(.1)
                              await vc.disconnect()
                          else:
                              await ctx.send(str(ctx.author.name) + "is not in a channel.")
                          # Delete command after the audio is done playing.
                          await ctx.message.delete()
                  

                  這篇關(guān)于Discord.py Bot 如何從本地文件播放音頻的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)
                  • <tfoot id='yhaXR'></tfoot>
                      <tbody id='yhaXR'></tbody>

                      <i id='yhaXR'><tr id='yhaXR'><dt id='yhaXR'><q id='yhaXR'><span id='yhaXR'><b id='yhaXR'><form id='yhaXR'><ins id='yhaXR'></ins><ul id='yhaXR'></ul><sub id='yhaXR'></sub></form><legend id='yhaXR'></legend><bdo id='yhaXR'><pre id='yhaXR'><center id='yhaXR'></center></pre></bdo></b><th id='yhaXR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yhaXR'><tfoot id='yhaXR'></tfoot><dl id='yhaXR'><fieldset id='yhaXR'></fieldset></dl></div>
                        <bdo id='yhaXR'></bdo><ul id='yhaXR'></ul>
                          • <small id='yhaXR'></small><noframes id='yhaXR'>

                            <legend id='yhaXR'><style id='yhaXR'><dir id='yhaXR'><q id='yhaXR'></q></dir></style></legend>

                            主站蜘蛛池模板: 久久噜噜噜精品国产亚洲综合 | 久久久www成人免费无遮挡大片 | 亚洲精品一区二区三区中文字幕 | 亚洲一页| 黄色片网站在线观看 | 五十女人一级毛片 | 欧美日韩综合视频 | 国产精品久久久久久久久久免费 | 亚洲精品一区二区另类图片 | 成人午夜在线 | 亚洲欧美在线观看 | 国产精品久久久久久妇女 | 国产成人高清在线观看 | 欧美日韩在线视频一区二区 | 国产在线观看一区 | 一区二区三区四区在线视频 | av毛片免费| 日本理论片好看理论片 | 亚洲男人的天堂网站 | 国产精品久久久久av | 永久免费av | 精品亚洲一区二区三区 | 成av在线 | 欧美888| 久久高清 | www.xxxx欧美| 在线免费观看色 | 羞羞色视频 | 亚洲日韩中文字幕一区 | 在线观看国产精品一区二区 | 亚洲网站在线观看 | 午夜私人影院 | 亚洲视频一区在线观看 | 欧美一区二区在线观看 | 9191成人精品久久 | 欧美色综合一区二区三区 | 欧美成年视频 | 中文字幕在线一区二区三区 | 福利视频网站 | 成人免费精品视频 | 欧美在线 |