Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import asyncio
- import datetime
- from discord.ext import commands
- bot = commands.AutoShardedBot(command_prefix="!")
- @bot.event
- async def on_ready():
- print(f"[ok] - {bot.user.name} ({bot.user.id} - Status: Online)")
- @bot.command()
- async def anunciar(ctx, *, msg):
- for member in ctx.guild.members:
- if ctx.guild.get_role(590598234167050271) in member.roles:
- 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)
- await member.send(embed=embed)
- bot.run('O TOKEN DO BOT AQUI')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement