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

Discord bot:修復“找不到 FFMPEG"

Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
本文介紹了Discord bot:修復“找不到 FFMPEG"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我想讓我的 Discord 機器人加入語音聊天,但每次我做到這一點時,我都會在 log(cmd) 中收到錯誤提示,FFMPEG not found,請幫助我.

錯誤圖片:

這是代碼:

client.on('message', message => {//語音僅在公會中有效,如果消息不是來自公會,//我們忽略它如果(!message.guild)返回;if (message.content === '/join') {//僅當他們自己在一個時才嘗試加入發送者的語音頻道if (message.member.voiceChannel) {message.member.voiceChannel.join().then(connection => {//Connection 是 VoiceConnection 的一個實例message.reply('我已成功連接頻道!');}).catch(console.log);} 別的 {message.reply('您需要先加入語音頻道!');}}});

這是我的 package.json 文件:

<代碼>{名稱":xxxtentacion",版本":1.0.0",主":index.js",腳本":{開始":節點 index.js",開發":nodemon index.js"},依賴":{discord.js":^11.4.2","dotenv": "^6.2.0",ffmpeg":0.0.4",作品":0.0.6"},開發依賴":{nodemon":^1.18.9"}}

解決方案

這將為您下載一個 Zip 存檔,您必須提取并復制 bin/ 文件夾的所有內容,即 FFmpeg 二進制文件.或者,將它們存儲在 PATH 環境變量中列出的文件路徑中,以便在 shell 中簡單地作為 ffmpeg 運行.

I want to make my Discord bot join voice chat but every time I make it I get a error into log(cmd) saying, FFMPEG not found, please help me.

Picture of the error:

This is the code:

client.on('message', message => {
  // Voice only works in guilds, if the message does not come from a guild,
  // we ignore it
  if (!message.guild) return;

  if (message.content === '/join') {
    // Only try to join the sender's voice channel if they are in one themselves
    if (message.member.voiceChannel) {
      message.member.voiceChannel.join()
        .then(connection => { // Connection is an instance of VoiceConnection
          message.reply('I have successfully connected to the channel!');
        })
        .catch(console.log);
    } else {
      message.reply('You need to join a voice channel first!');
    }
  }
});

this is my package.json file:

{
  "name": "xxxtentacion",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "dev": "nodemon index.js"
  },
  "dependencies": {
    "discord.js": "^11.4.2",
    "dotenv": "^6.2.0",
    "ffmpeg": "0.0.4",
    "opusscript": "0.0.6"
  },
  "devDependencies": {
    "nodemon": "^1.18.9"
  }
}

解決方案

FFmpeg is a convenient tool to work with audio/video/image/subtitle stuff, in this context this tool is required for extracting audio from an arbitrary container for bitstream (eg. mp4, mkv, flv, ogg) to a discord compatible VoIP codec OPUS.

Though it's intended be platform independent but for each platform requires different procedures, Note that: I only listed those platforms with which I have expertise with.

GNU/Linux

You mostly use the package manager to install it along with its dependencies, or you can just use the way of manually compiling the code with the steps described at here.

# Ubuntu / Debian / Linux Mint
sudo apt install ffmpeg

# ArchLinux / Manjaro / Anarchy
sudo pacman -S ffmpeg

# Gentoo / Funtoo
USE=opus sudo emerge ffmpeg

Windows

Windows is not easy as GNU/Linux, you either manually satisfy all dependencies then compile all the stuff all by yourself with MSVC or use Cygwin or Msys2 to compile. An alternative way is to download pre-compiled windows binaries from Zeranoe's website. Due to Zeranoe's website is closed, download from Gyan's website or anywhere else.

This will download you a Zip archive which you've to extract and copy all contents of the bin/ folder, those are the FFmpeg binaries. Optionally, store them at a file path which is listed in the PATH environment variable, to run it simply as ffmpeg in a shell.

這篇關于Discord bot:修復“找不到 FFMPEG"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
Discord.js Delete Single Message(Discord.js 刪除單個消息)
主站蜘蛛池模板: 精品九九| 亚洲一区二区三区在线 | 国偷自产av一区二区三区 | 麻豆视频国产在线观看 | 日本免费一区二区三区视频 | 欧美激情一区二区三级高清视频 | 黄色一级大片在线免费看产 | 久草电影网 | 国产精品18hdxxxⅹ在线 | 亚洲免费在线观看 | 在线免费国产 | 九七午夜剧场福利写真 | 中国91av| 91精品国产自产在线老师啪 | 日本精品视频一区二区三区四区 | 欧美一区视频在线 | 99这里只有精品视频 | 亚洲欧美自拍偷拍视频 | 亚洲欧美日韩精品久久亚洲区 | 一区二区三区欧美 | 91中文视频 | 久久国产日韩 | 国产精品美女久久久久久免费 | av手机在线看 | 女人毛片a毛片久久人人 | av手机免费在线观看 | 久色激情 | 97久久久久久 | 成人av大全 | 一区二区三区四区电影 | 在线一级片 | а_天堂中文最新版地址 | 做a视频在线观看 | 欧美成视频 | 国产欧美精品 | av一区二区三区四区 | 秋霞电影一区二区三区 | 亚洲乱码一区二区三区在线观看 | 欧美一级欧美三级在线观看 | 久久激情网 | 影音先锋欧美资源 |