Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import asyncio
- import random
- import secreto
- client = discord.Client()
- COR =0xA97FD6
- TOKEN = secreto.seu_token()
- msg_id = None
- msg_user = None
- @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!")
- if message.content.lower().startswith('!moeda'):
- choice = random.randint(1,2)
- if choice == 1:
- await client.add_reaction(message, '😁')
- if choice == 2:
- await client.add_reaction(message, '👑')
- if message.content.lower().startswith("?lol"):
- embed = discord.Embed(
- tittle="Vereficação",
- color=COR,
- description="- Vereficar =✔\n"
- "- Vereficar só uma vez!⛔",
- )
- botmsg = await client.send_message(message.channel,embed=embed)
- await client.add_reaction(botmsg, "✔")
- global msg_id
- msg_id = botmsg.id
- global msg_user
- msg_user = message.author
- @client.event
- async def on_reaction_add(reaction, user):
- msg = reaction.message
- if reaction.emoji == "✔" and msg.id == msg_id:
- role = discord.utils.find(lambda r: r.name == "civil", msg.server.roles)
- await client.add_roles(user, role)
- print("add")
- if reaction.emoji == "✔" and msg.id == msg_id:
- role = discord.utils.find(lambda r: r.name == "Não Vereficado", msg.server.roles)
- await client.remove_roles(user, role)
- print("remove")
- @client.event
- async def on_reaction_remove(reaction, user):
- msg = reaction.message
- if reaction.emoji == "✔" and msg.id == msg.id:
- role = discord.utils.find(lambda r: r.name == "civil", msg.server.roles)
- await client.remove_roles(user, role)
- print("remove")
- if reaction.emoji == "✔" and msg.id == msg.id:
- role = discord.utils.find(lambda r: r.name == "Não Vereficado", msg.server.roles)
- await client.add_roles(user, role)
- print("add")
- client.run(TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement