Answers for "how to make a contact developer command in discord.py"

0

how to make a contact developer command in discord.py

@client.command()
async def msgdev(ctx):
  await ctx.send("What do you want to say to the devs?")
  def check(m):
    return m.author.id == ctx.author.id

  message = await client.wait_for('message', check=check)
  await ctx.send(f'Sent message to the developer')

  user = await client.fetch_user("ID of DEVELOPER")
  
  await DMChannel.send(user, "A message from " + ctx.author.name + " from the server " + ctx.author.guild.name +  " \n" + message.content)

#In line 10 make sure to write the ID of the developer(you can get it by enabling developer mode in discord and then in any dm/server, right click your icon and click copy id)
Posted by: Guest on October-11-2021

Code answers related to "how to make a contact developer command in discord.py"

Python Answers by Framework

Browse Popular Code Answers by Language