1.0.5 • Published 5 years ago

musicbr v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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

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

  2. 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.

  3. 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çãoTipoDescriçãoPadrão
youtubeKeyStringYouTube Data API3 key. Necessário para funcionar.NaN
botPrefixStringO prefixo do bot. Padrão é "?".?
messageNewSongBooleanSe enviar ou não uma mensagem quando uma nova música começar a ser reproduzida.ativado
bigPictureBooleanSe deve usar uma imagem grande (verdadeira) ou pequena (falsa) para embeds.desativado
maxQueueSizeNumberTamanho máximo da fila. Padrão é 100. 0 para ilimitado.50
defVolumeNumberO volume da música. 1 - 200.50
anyoneCanSkipBooleanQualquer um consegue pular as músicas.desativado
messageHelpBooleanPermite 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
botAdminsObject/ArrayAn array of Discord user ID's to be admins as the bot. They will ignore permissions for the bot.
anyoneCanAdjustBooleanWhether anyone can adjust volume.desativado
ownerOverMemberBooleanWhether the owner over-rides CanAdjust and CanSkip.flase
anyoneCanLeaveBooleanWhether anyone can make the bot leave the currently connected channel.desativado
ownerIDStringThe ID of the Discord user to be seen as the owner. Required if using ownerOverMember.NaN
loggingBooleanSome extra none needed logging (such as caught errors that didn't crash the bot, etc).ativado
requesterNameBooleanWhether or not to display the username of the song requester.ativado
inlineEmbedsBooleanWhether or not to make embed fields inline (help command and some fields are excluded).desativado
musicPresenceBooleanWhether or not to make the bot set its presence to currently playing music.desativado
clearPresenceBooleanWhether or not to clear the presence instead of setting it to "nothing"desativado
insertMusicBooleanWhether or not to insert the music bot data into <Client>.music on start.desativado
channelWhitelistObject/ArraySets a list of ID's allow when running messages.
channelBlacklistObject/ArraySets a list of ID's ignore when running messages.
bitRateStringSets the preferred bitRate for the Discord.js stream to use."120000"
nextPresencePresenceDataPresenceData 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

OptionTypeDescriptionDefault
cooldownObjectThe main cooldown object
cooldown.enabledBooleanWhether or not cooldowns are enabled.ativado
cooldown.timerNumberTime in MS that cooldowns last.10000
cooldown.excludeObject/ArrayArray 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.
  }
});
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago