Answer the question
In order to leave comments, you need to log in
How to get server avatar using discord.py?
@bot.command(pass_context = True)
@commands.has_role("Admin")
async def kick(ctx, member: discord.Member,*,reason = None):
await ctx.message.delete()
emb = discord.Embed(title="Выгнан с сервера", description = "Причина: {}".format(reason), colour=discord.Color.orange(), )
emb.set_author(name = member.name, icon_url= member.avatar_url)
await member.kick(reason = reason)
await ctx.send(embed=emb)
own_emb = discord.Embed(title="Вы были выгнаны с сервера", description="Причина: {}".format(reason),colour=discord.Color.orange(), )
own_emb.set_author(name=member.name, icon_url=member.avatar_url)
own_emb.set_footer(text=str(ctx.message.guild.name), icon_url=" Аватар сервера ")
await member.send(embed = own_emb)
Answer the question
In order to leave comments, you need to log in
Try this
own_emb.set_footer(text=str(ctx.message.guild.name), icon_url=guild.avatar_url)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question