GithubHelp home page GithubHelp logo

discord-soundbox's Introduction

Discord-soundbox

A soundbox bot for discord. You just have to create your samples database, and it's almost ready to work. Here is the procedure to setup your soundbox.

Requirements :

  • Language :

    • python 3.X
  • Modules :

    • discord
    • PyNaCl (Used by discord.py btu not built-in, so you have to install manually)
    • asyncio (built-in)
    • os (built-in)
    • json (built-in)
  • Installations :

    • discord : In CMD, type : py -m pip install discord
    • PyNaCl : In CMD, type : py -m pip install PyNaCl
    • You have to install ffmpeg following this tutorial.
    • Create a bot account and invite it on your serveur following this great tutorial.
      • The bot needs folloing permissions : view channels, connect, speak, send messages, manage messages

Settings :

Once you've created and invited your bot on your serveur, setup the discord-soundbox. It's the purpose of the 'settings.json' file, open it and change parameters to personnalise the bot. Parameters :

  • samples_dir : Put here the directory where your samples (.mp3 format !) are located. ⚠️ If you forgot to create this directory, an error will occure !
  • prefix : You can change here the prefix before bot commands. Default prefix is '!' (Example : !samples).
  • ffmpeg_path : Put here the path to the 'ffmpeg.exe' file you downloaded earlier. ⚠️ Without this information, the discord-soundbox is unable to find the .exe by itself. So an error will occure !
  • token : Put here your bot's token.
  • forbidden_chans : Put here all the ID's of forbidden channels (separated by a ','). Then the soundbox will not be authorised to speak in these voice channels.
  • delete_msg_after : "True" if you want to delete your command message and the bot's answer after a delay, "False" if you don't. ⚠️ It's "True"/"False", not "true"/"false" !
  • delay : Set the delay ⚠️ Doesn't work very well in this version, the delay is about 1sec ^^

Now you can use it !

⚠️ You have to be connected to a voice channel (that musn't be in forbidden channels ^^) to use the soundbox, else you will get an error !

🔊 You have to create a file to store your samples database. The samples must be in '.mp3' format and have simle names. The 'sample name' i talk about later in this document is the filename of the sample without th '.mp3'. It will be used to select the sample you want to play.

Commands :

  • !play sample_name : discord-soundbox connect to your voice_channel and play the selected sample.
  • !samples : If you don't remember the available samples, you can show their list with this command.
  • !disconnect: Disconnects the bot from it's current voice channel

discord-soundbox's People

Contributors

sylvain-brocas avatar

Stargazers

Antonin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.