musicbr

1.0.5 • Public • Published

NPM info

Discord MusicBot Addon


  • Esse modulo é uma modificação do discord.js-musicbot-addon, totalmente (ou quase) traduzido para português.
  • Para qualquer cópia desta versão, deve-se entrar em contato com o tradutor via Discord (Vinícius Marotti#6134).
  • Copyright (c) 2018 - 2019, Darko Pendragon
  • Copyright (c) 2018 - 2019, Vinícius Marotti (BR Version)

The commands available are: (default names)

  • play <url>|<search string>: Dá play em uma música do Youtube
  • search <search string>: Procura os 10 videos do YT mais famosos sobre esse assunto.
  • skip [number]: Skipa uma ou mais músicas com skip [numero]
  • queue [position]: Mostra a fila atual.
  • pause: Pausa a musica.
  • resume: Dá play na musica.
  • remove [position]: Remove a música de tal posição da fila.
  • volume: Altera o volume da música (1 a 200).
  • disconnect: Limpa a fila e sai do canal de voz.
  • clearqueue: Limpa a fila.
  • musica: Mostra a música que está tocando.

Permissions:

  • If anyoneCanSkip ativada, qualquer um consegue skipar as músicas
  • If anyoneCanAdjust ativada, qualquer um consegue alterar o volume
  • If ownerOverMember ativada, o (Id do Dono) tem todas as permissões do bot.

Instalação


Pre-instalação:

  1. npm install discord.js
    Essa é a base de qualquer bot em javascript

  2. ffmpeg installed corretamente para seu sistema operacional.
    Permite o bot entrar no canal de voz e tocar a música.

  3. ffmpeg-binaries na sua paste node-modules. Você pode baixa-la aqui pelo Mega.nz e aqui pelo Drive Permite o bot entrar no canal de voz e tocar a música.

  4. npm install node-opus or npm install opusscript
    Required for voice. Discord.js prefers node-opus.

Instalação:

Exemplos


Veja essa página nos exemplos de repositorios.

Options & Config.


A maioria das opções é opicional.
As opções que você pode passar em music.start (client, {options}) e seus tipos são as seguintes:

Basic Options.

Opção Tipo Descrição Padrão
youtubeKey String YouTube Data API3 key. Necessário para funcionar. NaN
botPrefix String O prefixo do bot. Padrão é "?". ?
messageNewSong Boolean Se enviar ou não uma mensagem quando uma nova música começar a ser reproduzida. ativado
bigPicture Boolean Se deve usar uma imagem grande (verdadeira) ou pequena (falsa) para embeds. desativado
maxQueueSize Number Tamanho máximo da fila. Padrão é 100. 0 para ilimitado. 50
defVolume Number O volume da música. 1 - 200. 50
anyoneCanSkip Boolean Qualquer um consegue pular as músicas. desativado
messageHelp Boolean Permite enviar uma mensagem ao usuário sobre o uso do comando de ajuda. Se não puder, irá enviá-lo no canal como normal. desativado
botAdmins Object/Array An array of Discord user ID's to be admins as the bot. They will ignore permissions for the bot. [ ]
anyoneCanAdjust Boolean Whether anyone can adjust volume. desativado
ownerOverMember Boolean Whether the owner over-rides CanAdjust and CanSkip. flase
anyoneCanLeave Boolean Whether anyone can make the bot leave the currently connected channel. desativado
ownerID String The ID of the Discord user to be seen as the owner. Required if using ownerOverMember. NaN
logging Boolean Some extra none needed logging (such as caught errors that didn't crash the bot, etc). ativado
requesterName Boolean Whether or not to display the username of the song requester. ativado
inlineEmbeds Boolean Whether or not to make embed fields inline (help command and some fields are excluded). desativado
musicPresence Boolean Whether or not to make the bot set its presence to currently playing music. desativado
clearPresence Boolean Whether or not to clear the presence instead of setting it to "nothing" desativado
insertMusic Boolean Whether or not to insert the music bot data into <Client>.music on start. desativado
channelWhitelist Object/Array Sets a list of ID's allow when running messages. [ ]
channelBlacklist Object/Array Sets a list of ID's ignore when running messages. [ ]
bitRate String Sets the preferred bitRate for the Discord.js stream to use. "120000"
nextPresence PresenceData PresenceData to set after instead of clearing it (clearPresence). null

Multi-Prefix Option Example

<Client>.guilds.forEach
<Music>.start(<Client>, {
  youtubeKey: "Data Key",
  botPrefix: <MapObject>
});
 
// Exmaple Map Structure
{serverID: { prefix: "!" } }

See examples for more info.

Cooldown

Option Type Description Default
cooldown Object The main cooldown object
cooldown.enabled Boolean Whether or not cooldowns are enabled. ativado
cooldown.timer Number Time in MS that cooldowns last. 10000
cooldown.exclude Object/Array Array of command names to exclude. Uses default names, not set names ["volume","queue","pause","resume","np"]

Command Options.

Commands pass a bit different. Each command follows the same format as below. Valid commands are play, remove, help, np, queue, volume, pause, resume, skip, clearqueue, loop, leave.

music.start(client, {
  <command>: {
    enabled: false,                    // True/desativado statement.
    alt: ["name1","name2","name3"],    // Array of alt names (aliases).
    help: "Help text.",                // String of help text.
    name: "play"                       // Name of the command.
    usage: "{{prefix}}play bad memes", // Usage text. {{prefix}} will insert the bots prefix.
    exclude: false                     // Excludes the command from the help command.
  }
});

Package Sidebar

Install

npm i musicbr

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

86.6 kB

Total Files

4

Last publish

Collaborators

  • vinimarotti