title: data scraping on discord using python
body: <p>I'm currently trying to learn web <strong>scraping</strong> and decided to <strong>scrape</strong> some discord data. Code follows:</p>
  <pre><code>import requests
  import json
  
  def retrieve_messages(channelid):
      num=0
      headers = {
          'authorization': 'here we enter the authorization code'
      }
      r = requests.get(
          f'https://discord.com/api/v9/channels/{channelid}/messages?limit=100',headers=headers
          )
      jsonn = json.loads(r.text)
      for value in jsonn:
          print(value['content'], '\n')
          num=num+1
      print('number of messages we collected is',num)
  
  retrieve_messages('server id goes here')
  </code></pre>
  <p>The problem: when I tried changing the limit here <code>messages?limit=100</code> apparently it only accepts numbers between 0 and 100, meaning that the maximum number of messages I can get is 100. I tried changing this number to 900, for example, to scrape more messages. But then I get the error <code>TypeError: string indices must be integers</code>.</p>
  <p>Any ideas on how I could get, possibly, all the messages in a channel?</p>
  <p>Thank you very much for reading!</p>