久久久久久久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 | a在线免费观看 | 日韩在线观看中文字幕 | av入口| 天堂网av在线 | 青青激情网 | 日韩欧美一区在线 | 最近最新中文字幕 | 欧美精品久久久久久 | 欧美精品导航 | 欧美一级久久久猛烈a大片 日韩av免费在线观看 | 精品1区| 亚洲精品中文在线 | 中文字幕中文字幕 | 亚卅毛片 | 亚洲欧美中文日韩在线v日本 | 亚洲一区二区久久 | 欧美 日韩 国产 在线 | 国产欧美在线 | h视频免费在线观看 | 亚洲色图第一页 | 午夜丰满寂寞少妇精品 | 九九看片| 日本在线综合 | 成人免费网站www网站高清 |