An example Music Bot written in Disnake and uses slash commands to operate.

Overview

Music Bot

An example music bot that is written in Disnake [Maintained discord.py Fork]

Disnake

Disnake is a maintained and updated fork of discord.py.

Disnake Github Repo -> https://github.com/EQUENOS/disnake

Installation

Use the package manager pip to install the libraries from requirements.txt file.

pip install -r requirements.txt

Note

This music bot uses Lavalink to play music. Lavalink is a Java based program. You will need JDK 8 or JDK 13 to be able to run Lavalink properly. Wavelink has been rewritten. (Imports changed from discord to disnake)

You will need python 3.8 or above to run this program.

The entire music bot operates on slash commands.

What is Lavalink and how this music bot works??

Lavalink is a standalone audio streaming node and an API that is based on Lavaplayer. Unlike youtube_dl or ffmpeg which downloads tracks and plays, Lavalink loads the tracks and streams the audio through a websocket.

Wavelink is an API wrapper that is written for python to abstract away all the complexities of Lavalink and make it easy for us to load and play tracks.

If you want know more about Lavalink, vist this repo: https://github.com/freyacodes/Lavalink

How to run this.

Go to the website - https://discord.com/developers/applications.

Create your own bot account.

Enable Privileged Intents - Member Intents /Presence Intents.

Enable applications/commands scope to make sure your bot can have slash commands.

Go to the config.yaml file and Enter your Discord Bot Token.

You need to python installed on your system in order to run the program.

Then run the main.py file.

  python3 main.py

Run it on your terminal.

If you don't have python installed in your system, Please refer to https://python.org/downloads to download python. Make sure you have installed version 3.8 or above of python.

If all the steps are correctly followed, the bot should be up and running.

Enjoy :).

I am beginner in programming, and I want to use this code.

I will be frank here. You need to have basic programming knowledge in python and Disnake.

Here is what the author of Disnake thinks you should know before beginning:

How much Python do I need to know?

disnake is ultimately a complicated Python library for beginners. There are many concepts in there that can trip a beginner up and could be confusing. The design of the library is to be easy to use -- however the target audience for the library is not complete beginners of Python.

With that being said, beginners tend to use this library quite liberally anyway and while I appreciate the endeavour and tenacity it should be noted that asking for help here does take up the valuable time of volunteers. As a result certain knowledge is recomended before trying disnake:

  • The difference between instances and class attributes.
    • e.g. guild.name vs disnake.Guild.name or any variation of these.
  • How to use data structures in the language.
    • dict/tuple/list/str/...
  • How to solve NameError or SyntaxError exceptions.
  • How to read and understand tracebacks.

This list is not exhaustive

If these concepts are confusing -- please feel free to complete a smaller and simpler project first before diving into the complexities that is asynchronous programming in Python. (Taken from a tag.)

Credits

If you are using this, or any part of it, please feel free to give some credits :) Thanks.

You might also like...
veez music is a telegram music bot project, allow you to play music on voice chat group telegram.
veez music is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS node

ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ 𝗘𝗹𝗶𝘇𝗮 𝗠𝘂𝘀𝗶𝗰 ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Discord.py(disnake) selfbot
Discord.py(disnake) selfbot

Zzee selfbot Discord.py selfbot Version: 1.0 ATTENTION! we are not responsible for your discord account! this program violates the ToS discord rules!

Pincer-ext-commands - A simple, lightweight package for pincer prefixed commands

pincer.ext.commands A reimagining of pincer's command system and bot system. Ins

Example-bot-discord - Example bot discord xD

example-python-bot-discord Clone this repository Grab a token on Discord's devel

If you only have hash, you can still operate exchange
If you only have hash, you can still operate exchange

PTH Exchange If you only have hash, you can still operate exchange This project module is the same as my other project Exchange_SSRF, This project use

A discord bot wrapper for python have slash command

A discord bot wrapper for python have slash command

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.
A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support
JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support

Just Another Konsole YouTube-Music Overview I wanted to create this application so that I could use the command line to play music easily. I often pla

Owner
null
An example of using discordpy 2.0.0a to create a bot that supports slash commands

DpySlashBotExample An example of using discordpy 2.0.0a to create a bot that supports slash commands. This is not a fully complete bot, just an exampl

null 7 Oct 17, 2022
Discord music bot using discord.py, slash commands, and yt-dlp.

bop Discord music bot using discord.py, slash commands, and yt-dlp. Features Play music from YouTube videos and playlists Queue system with shuffle Sk

Hizkia Felix 3 Aug 11, 2022
Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar seu próprio token, e lembrando, é um bot básico, não se utiliza Cogs nem slash commands nele!

BotDiscordPython Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar s

Matheus Muguet 4 Feb 5, 2022
A Slash Commands Discord Bot created using Pycord!

Hey, I am Slash Bot. A Bot which works with Slash Commands! Prerequisites Python 3+ Check out. the requirements.txt and install all the pakages. Insta

Saumya Patel 18 Nov 15, 2022
Your custom slash commands Discord bot!

Slashy - Your custom slash-commands bot Hey, I'm Slashy - your friendly neighborhood custom-command bot! The code for this bot exists because I'm like

Omar Zunic 8 Dec 20, 2022
Your custom slash commands Discord bot!

Slashy - Your custom slash-commands bot Hey, I'm Slashy - your friendly neighborhood custom-command bot! The code for this bot exists because I'm like

Omar Zunic 3 Jan 8, 2022
A Python wrapper for discord slash-commands, designed to extend discord.py.

dislash.py An extending library for discord.py that allows to build awesome slash-commands. ⭐

null 173 Dec 19, 2022
Attempting to create a framework for Discord Slash commands... yes

discord_slash.py Attempting to create a framework for Discord Slash commands... yes Installation pip install slashpy Documentation Coming soon™ Why is

AlexFlipnote 11 Mar 24, 2021
A python library for creating Slack slash commands using AWS Lambda Functions

slashbot Slashbot makes it easy to create slash commands using AWS Lambda functions. These can be handy for creating a secure way to execute automated

Eric Brassell 17 Oct 21, 2022
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

?? Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls ?? Get

levina 143 Jun 19, 2022