Skip to content

Instantly share code, notes, and snippets.

View pedroricardo's full-sized avatar
🥰

PR pedroricardo

🥰
View GitHub Profile
@pedroricardo
pedroricardo / bot_tutorial_3.py
Created February 17, 2018 21:40
Criando Bot Para Discord #3 - Permissões e Reactions Noções Básicas [Python]
import discord
import asyncio
import random
client = discord.Client()
@client.event
async def on_ready():
print('BOT ONLINE - OLÁ MUNDO')
print(client.user.name)
@pedroricardo
pedroricardo / bot_tutorial_roles_4-e-5.py
Last active July 12, 2024 20:08
Criando Bot Para Discord #4 - Adicionar Cargos por Reações [Python] [PT-BR]
import discord
import secreto
import asyncio
client = discord.Client()
COR =0x690FC3
token = secreto.seu_token()
msg_id = None
msg_user = None
@pedroricardo
pedroricardo / bot_tutorial_welcome_6.py
Last active August 7, 2022 01:34
Criando Bot Para Discord #6 - Welcome/Bem-vindo [Python] [PT-BR]
@client.event
async def on_member_join(member):
canal = client.get_channel("423328604911304708")
regras = client.get_channel("420612829838573588")
msg = "Bem Vindo {}\n leia as {}".format(member.mention, regras.mention)
await client.send_message(canal, msg) #substitua canal por member para enviar a msg no DM do membro
@client.event
async def on_member_remove(member):
canal = client.get_channel("423328604911304708")
@pedroricardo
pedroricardo / bot_tutorial_welcome_por_img_8e9.py
Last active November 14, 2024 13:50
Criando Bot Para Discord #8 - Manipulando Imagem [Python] [PT-BR]
import discord
import requests
from io import BytesIO
from PIL import Image, ImageDraw, ImageFont, ImageOps
client = discord.Client()
# BY PR#3367
@client.event
async def on_ready():
@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)
const Discord = require("discord.js"); //baixar a lib
const client = new Discord.Client();
const config = require("./config.json");
client.on("ready", () => {
console.log(`Bot foi iniciado, com ${client.users.size} usuários, em ${client.channels.size} canais, em ${client.guilds.size} servidores.`);
client.user.setPresence({ game: { name: 'comando', type: 1, url: 'https://www.twitch.tv/pedroricardo'} });
//0 = Jogando
// 1 = Transmitindo
@pedroricardo
pedroricardo / Bot_tutorial_Discord_3.js
Created March 4, 2019 16:32
Como Criar Bot para Discord em Javascript #3 - Bem Vindo com Imagem https://www.youtube.com/watch?v=CHXnEaejT3Y
const Discord = require("discord.js")
const jimp =require("jimp")
const client = new Discord.Client()
const config = require("./config.json")
client.on("ready", () => {
console.log(`Bot foi iniciado, com ${client.users.size} usuários, em ${client.channels.size} canais, em ${client.guilds.size} servidores.`);
});
@pedroricardo
pedroricardo / Bot_tutorial_Discord_4.js
Last active December 1, 2021 15:57
Criando Bot Discord #4 - Converter Emoji GIF para APNG [Javascript] Discord.js [PT-BR] - https://youtu.be/0ulypQcYNKE
const Discord = require("discord.js")
const client = new Discord.Client()
const toApng = require('gif-to-apng')
const download = require('download-file')
const config = require("./config.json")
// instalar as dependencias: download-file, gif-to-apng, uuid
client.on("ready", () => {
console.log("O Bot foi iniciado");
@pedroricardo
pedroricardo / Bot_tutorial_Discord_5.js
Last active September 3, 2021 02:36
Código do tutorial: https://youtu.be/qaArXO_W8kQ - Banco de dados LowDB
const Discord = require("discord.js"); //baixar a lib discord.js
const client = new Discord.Client();
const config = require("./config.json");
const low = require('lowdb') //banco de dados
const FileSync = require('lowdb/adapters/FileSync')
const adapter = new FileSync('banco.json')
const db = low(adapter)
client.on("ready", () => {
@pedroricardo
pedroricardo / Bot_tutorial_Discord_6.js
Last active December 20, 2021 19:23
Criando Bot Discord #6 - Adicionar Cargos por Reação https://youtu.be/J833mDDFMLQ
const Discord = require("discord.js"); //baixar a lib
const client = new Discord.Client();
const config = require("./config.json");
client.on("ready", () => {
console.log('Olá mundo')
})
client.on('raw', async dados => {