Skip to content

Instantly share code, notes, and snippets.

@pedroricardo
pedroricardo / bot_tutorial_parte-2_musica_10.py
Created August 7, 2018 14:38
Criando Bot Para Discord #7 - Música (PARTE 2) [Python] [PT-BR]
import discord
#VOCÊ PRECISA DO YOUTUBE-DL INSTALADO, PARA ISSO DIGITE "pip install youtube_dl" NO CMD!
client = discord.Client()
players = {}
COR = 0xF7FE2E
@client.event
async def on_ready():
print(client.user.name)
import logging
import youtube_dl
#Execute no cmd pip install youtube_dl para instalar o youtube_dl
#Execute no cmd pip install PyNaCl se não dá erro (AVISO: é L com minuscula não com I)
#Instale o ffmpeg no google e ponha na pasta do seu projeto C:/Utilizadores/Seuutilizador/PycharmProjects/seuprojeto/venv/Scripts
#O ffmpeg que vocês precisam é raro de encontrar por isso disponiblizei um link do meu ffmpeg. (https://files.fm/u/jjj4agj4)
#Peço que por favor ponha meus créditos ou do meu bot porque isso irá me ajudar a fazer novos comandos em python e espalhar mais linguagens como java.
if message.content.lower().startswith('?play') or message.content.lower().startswith('?tocar'):
link = message.content[6:]
@C1PH3Rs
C1PH3Rs / Basic-Bot.py
Last active February 25, 2023 15:14
Basic Bot - A Free Open Source Discord Bot!
# Basic Discord Bot in Python By The Basic Bot Team!
# <--- DO NOT EDIT IMPORTS --->
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
bot = commands.Bot(command_prefix='b!') # If you have bots with ! change it to another prefix inside e.g 'prefixhere'
token = '' # Get your token from https://discordapp.com/developers/applications/ You need to create a bot account and copy the bots token!