“polecenie DM w Discord.py” Kod odpowiedzi

Discord.py DM Specyficzny użytkownik

    if message.content == "dm":
        await message.channel.send("Dming user")
        dm = await message.author.create_dm()  # Creates a dm channel with the user
        await dm.send("What you want to send")  # Sends the user the message
Witty Warbler

polecenie DM w Discord.py

@bot.command()
@commands.has_permissions(administrator=True)
async def edm(ctx, users: commands.Greedy[discord.User], *, message):
    for user in users:
      embed =  discord.Embed(description=message, color = 4*5555 )
      embed.set_footer(text=f'{ctx.author}',icon_url=ctx.author.avatar_url)
      channel = ctx.channel
      await user.send(embed=embed)
      await channel.purge(limit=1)
      await ctx.send('Sent' ,delete_after=5)
Hunter 87

Odpowiedzi podobne do “polecenie DM w Discord.py”

Pytania podobne do “polecenie DM w Discord.py”

Więcej pokrewnych odpowiedzi na “polecenie DM w Discord.py” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu