Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- client = commands.Bot(command_prefix="Seu prefixo")
- shared = discord.AutoShardedClient(shard_count=2, shard_ids=(1,2))
- client.remove_command("help")
- modulos = ["cogs.pic"]
- @client.event
- async def on_ready():
- print("__________________")
- print(f"Nome : {client.user.name}")
- print(f"Id : {client.user.id}")
- print("BOt : Online")
- await client.change_presence(activity=discord.Streaming(name="Sua messagem no rich presence", url="https://www.twitch.tv/client"))
- if __name__ == "__main__":
- try:
- for modulo in modulos:
- client.load_extension(modulo)
- except Exception as error:
- print(f"[Erro] : {modulo} - {error}")
- client.run("Seu token")
- import discord
- from discord.ext import commands
- class pic():
- def __init__(self, client):
- self.client = client
- @commands.command()
- async def pic(self, ctx, *, user: discord.Member=None):
- if user is None:
- usuario = ctx.author.avatar_url
- texto = f"Olá {ctx.author.name}, está é sua imagem de perfil."
- else:
- usuario = user.avatar_url
- texto = f"Ola {ctx.author.name}, está é a imagem do usuário {user.name}"
- embed = discord.Embed(title=texto, colour=0xF4CBD1)
- embed.set_image(url=usuario)
- embed.set_footer(text=self.client.user.name+" direitos resevados.")
- await ctx.send(embed=embed)
- def setup(client):
- print("[Comando Avatar] Carregado.")
- client.add_cog(pic(client))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement