Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import discord
  2. import asyncio
  3. import datetime
  4. from discord.ext import commands
  5.  
  6. bot = commands.AutoShardedBot(command_prefix="!")
  7.  
  8. @bot.event
  9. async def on_ready():
  10. print(f"[ok] - {bot.user.name} ({bot.user.id} - Status: Online)")
  11.  
  12. @bot.command()
  13. async def anunciar(ctx, *, msg):
  14. for member in ctx.guild.members:
  15. if ctx.guild.get_role(590598234167050271) in member.roles:
  16. embed = discord.Embed(color=0x1C1C1C, description=msg, timestamp=datetime.datetime.utcnow()).set_footer(text='Anúnciado por {}'.format(ctx.author.name), icon_url=ctx.author.avatar_url)
  17. await member.send(embed=embed)
  18.  
  19.  
  20. bot.run('O TOKEN DO BOT AQUI')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement