Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

dm command in 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)
Comment

PREVIOUS NEXT
Code Example
Python :: python format string with list 
Python :: xargs in python 
Python :: dataframe.fillna 
Python :: numpy diag() 
Python :: python dict items 
Python :: python math ln 
Python :: check boolean python 
Python :: how to avoid inserting duplicate records in orm django 
Python :: qr code detector 
Python :: clear many to many django 
Python :: linux python 
Python :: search and replace in python 
Python :: fix the size of a deque python 
Python :: armstrong number in python 
Python :: what does the combinations itertools in python do 
Python :: How can I get the named parameters from a URL using Flask? 
Python :: hexdigest python 
Python :: how to find greatest number in python 
Python :: pandas use dict to transform entries 
Python :: list insert python 
Python :: mean squared error in machine learning formula 
Python :: python code to convert csv to xml 
Python :: how to store the variable in dictionary 
Python :: python list operation 
Python :: python get value from list 
Python :: if loop python 
Python :: Program to Compute LCM Using GCD 
Python :: convert date to string in python 
Python :: what is print in python 
Python :: sorted lambda 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =