Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 14.41 KB | None | 0 0
  1. # IMPORTS
  2.  
  3. import discord
  4. import random
  5. from discord.ext import commands
  6. import nekos
  7. import asyncio
  8. import requests
  9.  
  10. # CLIENT
  11.  
  12. client = commands.Bot(command_prefix='d!')
  13. client.remove_command(name="help")
  14.  
  15. errormsg = discord.Embed(title='**-= Erro =-**',
  16.                          description=':warning: - Opa, parece que você executou o comando errado, use: d!ajuda.',
  17.                          color=0x49b7bc)
  18.  
  19. # Em meu grupo de Developers 💞 d!ajuda
  20.  
  21. # AO LIGAR
  22.  
  23. @client.event
  24. async def on_ready():
  25.     await client.change_presence(activity=discord.Game(name='Em meu grupo de Developers 💞 d!ajuda'))
  26.     print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
  27.     print('')
  28.     print('    -= Informação BOT =-')
  29.     print('')
  30.     print('Nome: {}'.format(client.user.name))
  31.     print('ID: {}'.format(client.user.id))
  32.     print('')
  33.     print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
  34.  
  35.  
  36. # COMANDO: d!ajuda
  37.  
  38. @client.command(name="ajuda", aliases=["help"])
  39. async def ajuda(ctx):
  40.     pv = discord.Embed(title='-= **__LISTA DE COMANDOS__** =-', description='\n', color=0x49b7bc)
  41.     pv.set_thumbnail(url=client.user.avatar_url)
  42.     pv.add_field(name='**Comando:** d!beijar <membro>', value='- Este comando serve para beijar alguém!', inline=True)
  43.     pv.add_field(name='**Comando:** d!tapa <membro>', value='- Este comando serve para dar um tapa em alguém!',
  44.                  inline=True)
  45.     pv.add_field(name='**Comando:** d!abracar <membro>', value='- Este comando serve para abraçar um membro!',
  46.                  inline=True)
  47.     pv.add_field(name='**Comando:** d!8ball <pergunta>',
  48.                  value='- Este comando faz com que o bot responda sua pergunta!', inline=True)
  49.     pv.add_field(name='**Comando:** d!atacar <membro>', value='- Este comando serve para atacar outros membros!', inline=True)
  50.     pv.add_field(name='**Comando:** d!corrida <membro>', value='- Este comando serve para apostar corridas com membros!', inline=True)
  51.     pv.add_field(name='**Comando:** d!shippar <membro1> <membro2>', value='- Este comando serve para shippar 2 membros, e ver as chances! :)', inline=True)
  52.     pv.add_field(name='**Comando:** d!addbot', value='- Este comando te manda um link para me adicionar!', inline=True)
  53.     pv.add_field(name='**Comando:** d!serverbot', value='- Este comando te manda um link de meu discord server!', inline=True)
  54.     pv.add_field(name='**Comando:** d!creditos', value='- Este comando mostra creditos de meu criador.', inline=True)
  55.     pv.add_field(name='**Comando:** d!botinfo', value='- Este comando mostra a você minhas informações!', inline=True)
  56.     pv.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  57.  
  58.     dc = discord.Embed(title='**Lista de Comandos**',
  59.                        description=f'- {ctx.author.mention}, enviei minha lista de comandos em sua DM! :wink:',
  60.                        color=0x49b7bc)
  61.  
  62.     dcs = await ctx.send(embed=dc)
  63.     pvs = await ctx.author.send(embed=pv)
  64.  
  65.     await pvs.add_reaction(':okay:605886586403553281')
  66.  
  67.  
  68. # COMANDO: d!beijar
  69.  
  70. @client.command()
  71. async def beijar(ctx, membro: discord.Member = None):
  72.     if membro is None:
  73.         return await ctx.send(f'```{ctx.author.display_name}, comando errado, use: d!beijar <membro>```')
  74.     if ctx.author == membro:
  75.         return await ctx.send(f'```{ctx.author.display_name}, desculpe mas como assim, beijar a si mesmo? Kkk..```')
  76.  
  77.     gif = random.choice(['https://i.imgur.com/0ZipQOy.gif',
  78.                          'https://i.imgur.com/EWXIAcU.gif',
  79.                          'https://i.imgur.com/zZCdt9u.gif',
  80.                          'https://i.imgur.com/ecIlG4x.gif',
  81.                          'https://i.imgur.com/zQJuj7d.gif',
  82.                          'https://i.imgur.com/FH2E4E7.gif'])
  83.  
  84.     embed = discord.Embed(title='**-= Beijos :relaxed: =-**',
  85.                           description=f'- O membro {ctx.author.mention}, beijou o(a) {membro.mention}!', color=0x49b7bc)
  86.     embed.set_image(url=gif)
  87.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  88.  
  89.     await ctx.send(embed=embed)
  90.  
  91.  
  92. # COMANDO: d!tapa
  93.  
  94. @client.command()
  95. async def tapa(ctx, membro: discord.Member = None):
  96.     if membro is None:
  97.         return await ctx.send(f'```{ctx.author.display_name}, comando errado, use: d!tapa <membro>```')
  98.     if ctx.author == membro:
  99.         return await ctx.send(
  100.             f'```{ctx.author.display_name}, por que você quer dar um tapa em si mesmo, não faz isso! :pensive:```')
  101.  
  102.     imgs = nekos.img("slap")
  103.  
  104.     embed = discord.Embed(title='**-= Tapa =-**',
  105.                           description=f'<:dg_pepecafe:605204184978948146> - O membro {ctx.author.mention}, deu um tapa no(a) {membro.mention}!',
  106.                           color=0x49b7bc)
  107.     embed.set_image(url=imgs)
  108.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  109.  
  110.     await ctx.send(embed=embed)
  111.  
  112.  
  113. # COMANDO: d!abracar
  114.  
  115. @client.command(aliases=["abraco"])
  116. async def abracar(ctx, membro: discord.Member = None):
  117.     if membro is None:
  118.         return await ctx.send(f'```{ctx.author.display_name}, comando errado, use: d!abracar <membro>```')
  119.     if ctx.author == membro:
  120.         return await ctx.send(f'```{ctx.author.display_name}, se abraçar é um pouco dificil..```')
  121.  
  122.     imgs = nekos.img("hug")
  123.  
  124.     embed = discord.Embed(title='**-= Abraço =-**',
  125.                           description=f':blush: - O membro {ctx.author.mention}, deu um abraço no(a) {membro.mention}!',
  126.                           color=0x49b7bc)
  127.     embed.set_image(url=imgs)
  128.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  129.  
  130.     await ctx.send(embed=embed)
  131.  
  132.  
  133. # COMANDO: d!8ball
  134.  
  135. @client.command(aliases=["8ball"])
  136. async def _8ball(ctx, *, message=None):
  137.     if message is None:
  138.         return await ctx.send(f'```{ctx.author.display_name}, coloque uma pergunta! d!8ball <pergunta>```')
  139.  
  140.     pergunta = message
  141.     resporta = random.choice(['Sim!',
  142.                               'Não!',
  143.                               'Talvez!!',
  144.                               'Depende, kk..'])
  145.  
  146.     embed = discord.Embed(title='**-= Bola Mágica =-**', inline=False, color=0x49b7bc)
  147.     embed.add_field(name=f'<:30pensativo:605889974218260492> ``|`` Pergunta: {pergunta}',
  148.                     value=f'<:dg_thinking:605205492826112000> ``|`` Reposta: {resporta}')
  149.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Bola Mágica solicitada por • {ctx.author.display_name}')
  150.  
  151.     await ctx.send(embed=embed)
  152.  
  153.  
  154. # COMANDO: d!atacar
  155.  
  156. @client.command()
  157. async def atacar(ctx, membro: discord.Member = None):
  158.     if membro is None:
  159.         return await ctx.send(f'```{ctx.author.display_name}, mencione algum membro! d!atacar <membro>```')
  160.     if ctx.author == membro:
  161.         return await ctx.send(f'```{ctx.author.display_name}, não da para se atacar, use: d!atacar <membro>```')
  162.  
  163.     image = random.choice(['https://i.imgur.com/U80afvz.gif',
  164.                            'https://i.imgur.com/endOR96.gif',
  165.                            'https://i.imgur.com/WutOLEv.gif',
  166.                            'https://i.imgur.com/solhPHa.gif',
  167.                            'https://i.imgur.com/0MCcIpc.gif',
  168.                            'https://i.imgur.com/4NYEm53.gif',
  169.                            'https://i.imgur.com/JSkx8Cu.gif',
  170.                            'https://i.imgur.com/ZUzI79U.gif',
  171.                            'https://i.imgur.com/QQqJCrG.gif',
  172.                            'https://i.imgur.com/SMAbPGb.gif',
  173.                            'https://i.imgur.com/ovSGIa8.gif'])
  174.  
  175.     embed = discord.Embed(title='**-= Ataque =-**',
  176.                           description=f'<:dg_pepecafe:605204184978948146> - O membro {ctx.author.mention}, atacou o(a) {membro.mention}!',
  177.                           color=0x49b7bc)
  178.     embed.set_image(url=image)
  179.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  180.  
  181.     await ctx.send(embed=embed)
  182.  
  183.  
  184. # COMANDO: d!corrida
  185.  
  186. @client.command()
  187. async def corrida(ctx, membro: discord.Member = None):
  188.     if membro is None:
  189.         return await ctx.send(f'```{ctx.author.display_name}, comando errado, use: d!corrida <membro>!```')
  190.     if ctx.author == membro:
  191.         return await ctx.send(f'```{ctx.author.display_name}, você não pode apostar uma corrida com si mesmo!```')
  192.  
  193.     ganhador = random.choice([ctx.author.mention,
  194.                               membro.mention])
  195.  
  196.     e1 = discord.Embed(title='**-= Corrida! =-**',
  197.                        description=f'- O membro {ctx.author.mention} esta apostando uma corrida com o(a) {membro.mention}!',
  198.                        color=0x49b7bc)
  199.     e1.set_image(url='https://i.imgur.com/ziB4Ozx.gif')
  200.     e1.set_footer(icon_url=ctx.author.avatar_url, text=f'Corrida solicitada por • {ctx.author.display_name}')
  201.  
  202.     e2 = discord.Embed(title='**-= Corrida! =-**',
  203.                        description=f'- O(a) vencedor(a) da corrida é o(a).. {ganhador}! Parabénss!!', color=0x49b7bc)
  204.  
  205.     await ctx.send(embed=e1)
  206.     await asyncio.sleep(2)
  207.     await ctx.send(embed=e2)
  208.  
  209.  
  210. # Ao mencionar o bot
  211.  
  212. @client.listen("on_message")
  213. async def anti_invite(message):
  214.     if message.content.lower().startswith("<@605468623678472204>"):
  215.         await message.channel.send(f'<:3pepeLove:605885602457583835> ``|`` Olá {message.author.display_name}, sou o {client.user.name}, caso tenha duvidas use: d!ajuda, lembrando que minha prefix é ``d!`` !')
  216.  
  217. # COMANDO: d!shippar
  218.  
  219. @client.command(aliases=["ship", "shipp"])
  220. async def shippar(ctx, user1: discord.Member = None, user2: discord.Member = None):
  221.     if user1 is None:
  222.         return await ctx.send(f'```{ctx.author.display_name}, comando errado! Use: d!shippar <membro1> <membro2>!```')
  223.     else:
  224.         if user2 is None:
  225.             return await ctx.send(f'```{ctx.author.display_name}, para shippar alguem, mencione dois nomes!```')
  226.     if ctx.author == user1:
  227.         if ctx.author == user2:
  228.           return await ctx.send(f'```{ctx.author.display_name}, você não pode se shippar!```')
  229.     if user1 == user2:
  230.         return await ctx.send(f'```{ctx.author.display_name}, você não pode shippar 2 nomes iguais!```')
  231.  
  232.     porc = random.randint(10, 99)
  233.  
  234.     if porc <= 26:
  235.         img = nekos.img("slap")
  236.     if porc >= 27:
  237.         img = nekos.img("hug")
  238.     if porc >= 50:
  239.         img = nekos.img("hug")
  240.     if porc >= 60:
  241.         img = nekos.img("kiss")
  242.  
  243.     shippare = discord.Embed(title='**-= Shippar =-**', description=f':heart: -= Será que temos um casal por aqui? Será que rola? =- :heart:\n- **{user1.display_name}**\n- **{user2.display_name}**\n\n:relaxed: **-=** Porcentagem de dar certo: %{porc} **=-** :relaxed:', color=0x49b7bc)
  244.     shippare.set_image(url=img)
  245.     shippare.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  246.  
  247.     if porc <= 26:
  248.         txt = ':frowning: **-=** Parece que não esses dois não combinam, que triste! **=-** :frowning:'
  249.     if porc >= 27:
  250.         txt = ':slight_smile:  **-=** É.. dava pra ser melhor, mas ta bom, rasoavel! **=-** :slight_smile: '
  251.     if porc >= 50:
  252.         txt = ':smile: **-=** Uau! Vocês dois formam um casalzin ein! **=-** :smile:'
  253.     if porc >= 60:
  254.         txt = ':heart: **-= Meu deusss! Que casal perfeito! casalzão da porra ein! **=-** :heart:'
  255.  
  256.     shippartxt = discord.Embed(title='**-= Shippar =-**', description=txt, color=0x49b7bc)
  257.  
  258.     await ctx.send(embed=shippare)
  259.     await asyncio.sleep(1)
  260.     await ctx.send(embed=shippartxt)
  261.  
  262. # COMANDO: d!creditos
  263.  
  264. @client.command()
  265. async def creditos(ctx):
  266.  
  267.     embed = discord.Embed(title='**-= __Creditos__ =-**', description=f'- Veja os creditos abaixo! {ctx.author.mention}.', color=0x00c1d7)
  268.     embed.add_field(name=f'Criador: ``</yChange/>``\nNome: ``{client.user.name}``\nVersão: ``1.0.0``\nPrefix: ``d!``', value="- OBS: Bot criado para o servidor: Dev's Group.\n\n**-=** Caso queira me adicionar clique [**Aqui**](https://discordapp.com/oauth2/authorize?client_id=605468623678472204&scope=bot&permissions=8) **=-**")
  269.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  270.  
  271.     embeds = discord.Embed(title='**-= __Creditos__ =-**', description=f'- {ctx.author.mention}, enviei os creditos em sua DM! :wink:', color=0x00c1d7)
  272.  
  273.     await ctx.send(embed=embeds)
  274.     await ctx.author.send(embed=embed)
  275.  
  276. # COMANDO: d!botinfo
  277.  
  278. @client.command()
  279. async def botinfo(ctx):
  280.  
  281.     if client.user.display_name == client.user.name:
  282.         apelido = 'Sem Apelido!'
  283.     else:
  284.         apelido = client.user.display_name
  285.  
  286.     embed = discord.Embed(title='**-= BotInfo =-**', description=f'- {ctx.author.mention}, logo abaixo minhas informações', color=0x49b7bc)
  287.     embed.set_thumbnail(url=client.user.avatar_url)
  288.     embed.add_field(name=':beginner: ``|`` Nome:', value=f'- {client.user.name}')
  289.     embed.add_field(name=':trident: ``|`` Apelido:', value=f'- {apelido}')
  290.     embed.add_field(name=':id: ``|`` Meu ID:', value=f'- {client.user.id}')
  291.     embed.add_field(name=':timer: ``|`` Fui criado em:', value=f'- {client.user.created_at.strftime("%d %b %Y às %H:%M")}')
  292.     embed.add_field(name=':zap: ``|`` Meu Servidor:', value=f"- Dev's Group")
  293.     embed.add_field(name=':paperclip: ``|`` Caso queira me Adicionar:', value=f"- Use: d!addbot")
  294.     embed.set_footer(icon_url=ctx.author.avatar_url, text=f'Mensagem solicitada por • {ctx.author.display_name}')
  295.  
  296.     await ctx.send(embed=embed)
  297.  
  298. @client.command()
  299. async def addbot(ctx):
  300.  
  301.     send = discord.Embed(title='**-= __ADDBOT__ =-**', description=f'**-=** Deseja me adiconar, em seu servidor? **=-**\n- Então [**Clique Aqui**](https://discordapp.com/oauth2/authorize?client_id=605468623678472204&scope=bot&permissions=8)', color=0x49b7bc)
  302.  
  303.     s = await ctx.send(embed=send)
  304.     await s.add_reaction(':3pepeLove:605885602457583835')
  305.  
  306. @client.command(aliases=["dcbot", "dbot", "serverbot", "svbot"])
  307. async def discordbot(ctx):
  308.  
  309.     embed = discord.Embed(title='**-= __MEU DISCORD__ =-**', description=f'- {ctx.author.mention}, o hyper link de meeu discord está logo abaixo!\n\n**-=** Para entra em meu discord [**Clique Aqui**](https://discord.gg/2ajRe3r) **=-**', color=0x49b7bc)
  310.  
  311.     await ctx.send(embed=embed)
  312.  
  313. # RUN
  314.  
  315. client.run('NjA1NDY4NjIzNjc4NDcyMjA0.XT885Q.s8Xf-gypSG3XghyrMvjI5D2Ifa8')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement