title: Discord bot on_join_guild dm everyone
body: <p>I am trying to dm everyone in the server when the bot is added to the server using the on_join_guild().
  The code for it</p>
  <pre><code>@client.event
  async def on_guild_join(guild):
      for member in guild.members:
          await member.create_dm()
          embedVar = discord.Embed(title=&quot;Hi&quot;, description=&quot;Hello&quot;, color=0x00ff00)
          await member.dm_channel.send(embed=embedVar)
  </code></pre>
  <p>But whenever I add the bot to server, it dms everyone in the server which is expected but a error also pops in the console.</p>
  <pre><code>Ignoring exception in on_guild_join
  Traceback (most recent call last):
    File &quot;C:\Users\Khusi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\client.py&quot;, line 343, in _run_event
      await coro(*args, **kwargs)
    File &quot;.\time-turner.py&quot;, line 42, in on_guild_join
      await member.create_dm()
    File &quot;C:\Users\Khusi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\discord\member.py&quot;, line 110, in general
      return getattr(self._user, x)(*args, **kwargs)
  AttributeError: 'ClientUser' object has no attribute 'create_dm'
  </code></pre>
  <p>What am I doing wrong?</p>