Created
February 17, 2018 21:40
-
-
Save pedroricardo/3c430d1f8c376d13ac9f77af58904793 to your computer and use it in GitHub Desktop.
Criando Bot Para Discord #3 - Permissões e Reactions Noções Básicas [Python]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import asyncio | |
import random | |
client = discord.Client() | |
@client.event | |
async def on_ready(): | |
print('BOT ONLINE - OLÁ MUNDO') | |
print(client.user.name) | |
print(client.user.id) | |
print('-----PR------') | |
@client.event | |
async def on_message(message): | |
if message.content.lower().startswith('?test'): | |
await client.send_message(message.channel, "Olá Mundo, estou vivo!") | |
if message.content.lower().startswith('?moeda'): | |
if message.author.id == "<user id>": #adicione o seu ID! | |
escolha = random.randint(1,2) | |
if escolha == 1: | |
await client.add_reaction(message, '😀') | |
if escolha == 2: | |
await client.add_reaction(message, '👑') | |
else: | |
await client.send_message(message.channel, " Você não tem permissão para usar esse comando") | |
client.run('TOKEN') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
o meu não está respondendo com esse código