title: Python If its same output dont send msg
body: <p>I made a <strong>discord</strong> bot that sends every 120 sec <strong>transactions</strong> from one ethereum addrs but i dont want to send same stuff over and over so if it send <strong>USDT</strong> token and Again in <strong>120 sec try</strong> <strong>USDT</strong> to just skip it until it got new thing is that possble or not?
  code:</p>
  <pre><code>import requests
  import sys 
  import json
  import discord
  import time
  btoken = &quot;mytoken&quot;
  result=requests.get('https://api.ethplorer.io/getAddressHistory/0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be?apiKey=freekey&amp;type=transfer')
  result.status_code
  result.text
  result.json()
  results = &quot;soon:tm:&quot;
  
  def price_of_gas(inp):
      def recursive_function(inp):
          if type(inp) is list:
              for i in inp:
                  ans = recursive_function(i)
                  if ans!=None: return ans
          elif type(inp) is dict:
              if 'name' in inp: return inp['name']
              for i in inp:
                  ans = recursive_function(inp[i])
                  if ans!=None: return ans
          else: return None
      ans = recursive_function(inp)
      return ans if ans else &quot;Could NOT find the new token tx&quot;
  print (price_of_gas(result.json()))
  
  class MyClient(discord.Client):
      async def on_ready(self):
          print('Logged on as', self.user)
      
  
      async def on_message(self, message):
          # don't respond to ourselves
          if message.author == self.user:
              return
  
          if message.content == '.get':
              await message.channel.send('Alert! Alert! Buy')
              await message.channel.send(result.json()['operations'][0]['tokenInfo']['symbol'])
              await message.channel.send(result.json()['operations'][0]['tokenInfo']['address'])
              
              print ('get command was tryed')
          else:
              print ('comand not found')
              
          if message.content == '.help':
              await message.channel.send(&quot;try .get&quot;)
              print ('help command was tryed')
          if message.content == '.stop':
             await message.channel.send('Bye...')
             print('bye') 
             sys.exit()
          if message.content == '.start':
           while True:
                # Code executed here
                print ('done')
                price_of_gas(result.json())
                print (price_of_gas(result.json()))
                await message.channel.send(price_of_gas(result.json())) 
                time.sleep(120)    
  
                
             
          
  #print(result.json()['operations'][0]['tokenInfo']['name'])
  #print(result.json()['operations'][0]['tokenInfo']['symbol'])
  #print(result.json()['operations'][0]['tokenInfo']['address'])
  
  #print (result.json()['tokenSymbol'])
  #print (result.text)
  print ('done no errors')
  
  print ('done no errors with check data')
  client = MyClient()
  client.run(btoken)
     
  
  
          
                
  
  
  print ('done no errors 2')
  </code></pre>
  <p>so if user type .start bot will start while loop that sends newest tx from selected addrs but problem is it will send same stuff i just need some if statment in while loop or something.</p>