faloclass.blogg.se

Chip music bot
Chip music bot











chip music bot chip music bot

Rhythm bot will hangout in your voice channel and eventually disconnect due to an inactive timer. I want it to work the way rhythm bot works.However what I want the code to do is I want the bot to join the voice channel and stay in the voice channel ready to receive commands and play mp3s. Right now the bot works great and will join the voice channel, speak the tts message, delete the mp3 file.It will destroy the dispatcher currently playing the mp3, disconnect the bot, and delete the mp3 file created The "$stop" command also works with no issues.After the mp3 file is done playing it will leave the voice channel and delete the mp3 file with no issues. Then it will join the discord voice channel and play the mp3 file.It then will use the AWS polly API to create a mp3 file of what the user put in their message. If it sees the command '$tts' it will make sure the user is in a voice channel.It then waits for commands in the put into the discord that contain the prefix $.

chip music bot

  • The bot starts up and connects to the discord api with my token stored in a json file.
  • Msg.reply("There was an error with that command, I'm sorry") If(!(prefix) || ) return Ĭonst args = (prefix.length).split(/ +/) Ĭonst command = args.shift().toLowerCase() Polly.synthesizeSpeech(params, (err, data) => !`) Var fileName = 'sounds/' + msg.id + '.mp3' I'm hoping someone with more experience with discord.js/building discord bots/writing code in JavaScript can help me and provide insight on how to fix this.īelow is my entire source code: var AWS = require('aws-sdk') Ĭonsole.log("processing command:" + text) This is my first time using JavaScript and I'm running into issues. Hello I am trying to build a discord bot that can perform text to speech using AWS Polly in JavaScript.













    Chip music bot