title: Sending a message to everyone in a discord server
body: <p>I'm trying to get my discord bot to send a message to everyone on my discord server, all the answers I've tried haven't worked for me. I have this code so far but don't know if it works as I don't have anybody on discord (I'm making it for a friend)</p>
  
  <p>here is the code:</p>
  
  <pre><code>    import discord
  
      def read_token():
      with open("token.txt", "r") as f:
          lines = f.readlines()
          return lines[0].strip()
  
      token = read_token()
  
      client = discord.Client()
  
      @client.event
      async def on_message(message):
           if message.content.find("!hello") != -1:
           await message.channel.send("Hi") # If the user says !hello we will 
           send back hi
  
        if message.content.startswith('Message everyone'):
        for guild in client.guilds:
            for discord.Member in guild.members:
              await message.discord.Member.send("sup")
  
  client.run(token)
  </code></pre>