Giter Club home page Giter Club logo

dlap's Introduction

DLAP Bot (Discord.JS Local Audio Player)

DLAP is a Discord bot that lets you play local audio tracks in your server. With DLAP, you can access your music files, and share your tunes with your friends and community. DLAP offers seamless integration with Discord, so you can enjoy your music without missing a beat.

Video Tutorial | Support Server

If you want to add a feature or there's anything wrong, feel free to make a fork and put a pull request.

Looking for Maintainers

As you know, I may not keep up the project at times, or I could possibly introduce more bugs in this project. As well as making the code more messy. I will need to form a team in order to implement new features and make this project better.

If you want to become a maintainer, you must at least know this source code, JavaScript and NodeJS. Also you must join my discord server (Support Server) to communicate with me.

Recommended Software Requirements

  • Latest version of NodeJS (v16.9.0+)
  • Linux (or WSL for Windows users)
  • Yarn Package Manager
  • NodeJS v18.5.0+

Configuration

Make a new file called config.json inside the root of your project.

{
    "token": "token_here",
    "txtFile": true/false,
    "shuffle": true/false,
    "repeat": true/false,
    "statusChannel": "channel_id",
    "voiceChannel": "voice_channel_id",
    "clientID": "client_id",
    "ownerID": "your_user_id",
    "djRole": "role_id",
    "presenceActivity": "activity_here",
    "activityType": [0 (Playing)/1 (Streaming)/2 (Listening)/3 (Watching)/4 (Custom)/5 (Competing)]
}

Setting Up Bot

Credit: VicktorMS

First you need to create a discord application (Discord for Developers) to get all the tokens you need. This application will in fact be your bot.

IDs available on discord for developers:

  • "clientID": Select your app > Settings > General Information > "Application ID"
  • "token": Select your app > Settings > Bot > "Reset Token" Button

IDs available on your discord server: First you need activate Developer Mode on Discord in order to get the IDS

  • "statusChannel": Create a channel in your server > Right Click on top > "Copy channel ID"
  • "voiceChannel": Create a channel in your server > Right Click on top > "Copy channel ID"
  • "djRole": Create a role in your server > Right Click on top > "Copy role ID"
  • "ownerID": Right Click on top of yourself on a discord server > "Copy User ID" (Your User ID is not "YouName#3217")

Bool settings (set to true or false)

  • "txtFile": true/false (Generates a text file)
  • "shuffle": true/false (Shuffle songs)
  • "repeat": true/false (Repeat all musics)

Bot Activity

  • "presenceActivity": Write any message here, it will be displayed in Bot's activity.
  • "activityType": Put any number between 0 and 5. That will be the Bot Activity type.

Activity Types

  • 0: Playing
  • 1: Streaming
  • 2: Listening
  • 3: Watching
  • 4: Custom
  • 5: Competing

Adding Music

Create the music folder on root of your project.

Add your own audio files to the music folder.

Deploy the commands by doing node deploy-command.js.

Launch the bot using node bot.js in terminal.

Help Command

Public Only
-----------
ping - Pong!
status - Checks what audio file is playing currently.
about - Information about the bot.
list - Lists the available audio tracks.
list (page) - Input a number to change the page of the list.
next vote - Goes to next music by vote.
previous vote - Goes to previous music by vote.

Special Permissions Only
--------------
join - Joins voice chat.
play - Resumes music.
play (int) - Input a number for the selection for the audio file.
pause - Pauses music.
next force - Goes to next music by force.
previous force - Goes to previous music by force.
reshuffle - Reshuffles the playlist.
leave - Leaves voice chat.
shutdown - Powers off the bot.

Forking

When forking the project, you can make your own version of DLAP or help contribute to the project (See the "Contributing" section).

You need to edit /commands/about.js to uncomment the { name: 'Forked by', value: '[your name] (discord#0000)' } section.

Be sure to replace that with your name.

Contributing

When contributing, be sure to add yourself to the contributors list in /commands/about.js.

Future Features

  • Custom string support (Basically change what the bot is saying)
  • Convert codebase to TypeScript
  • Easier to use interface

Credits

ChatGPT: Some code in this codebase used ChatGPT

dlap's People

Contributors

alee14 avatar phil294 avatar vicktorms 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.