title: discord one script run multiple times
body: <p>Friends, I am making a discord script using python I have to run this script multiple times with different parameters, I am trying that with os, threading, multiprocessing. when I am trying with this library that works only for first data Then it stuck, My code is below, please advise me.</p>
  <blockquote>
  <p>note:- I am login as a user.</p>
  </blockquote>
  <p><strong>CSV file demo</strong></p>
  <pre><code>auth-token1,channel-id1-1,channelid1-2
  auth-token2,channel-id2-1,channelid2-2
  ...
  ...
  </code></pre>
  <p><strong>main.py</strong></p>
  <pre><code>import os
  import csv
  from time import sleep
  import threading
  import multiprocessing
  rows = []
  with open('data.csv', 'r') as csvfile:
      # creating a csv reader object
      csvreader = csv.reader(csvfile)
      # extracting each data row one by one
      for row in csvreader:
          rows.append(row)
  
  for _ in rows:
      li = _[1:]
      cmd = _[0]
      for i in li:
          cmd = cmd+&quot; &quot;+str(i)
      print(f'python3 script.py {cmd}')
      os.system(f'python3 script.py {cmd}')
      sleep(10)
  </code></pre>
  <p><strong>script.py</strong></p>
  <pre><code>import time
  import os
  import sys
  from time import sleep
  import os
  from discord import Permissions, message
  import discord
  import logging
  import sys
  
  argumentList = sys.argv
  print(argumentList[1:])
  TOKEN_AUTH = argumentList[1]
  os.environ['TZ'] = 'Asia/Kolkata'
  time.tzset()
  
  logging.basicConfig(handlers=[logging.FileHandler(filename=&quot;./discord.txt&quot;,
                                                  encoding='utf-8', mode='a+')],
                      format=&quot;%(asctime)s %(name)s:%(levelname)s:%(message)s&quot;,
                      datefmt=&quot;%F %A %T&quot;,
                      level=logging.INFO)
  
  channel = None
  client = discord.Client()
  ids = argumentList[2:]
  sleep_time = 121
  message = &quot;enter your message&quot;
  
  
  @client.event
  async def on_ready():
      global channel
      while True:
          for _ in ids:
              try:
                  channel1 = client.get_channel(int(_))
                  await channel1.send(message)
                  logging.info('1')
                  print('sleeping')
                  sleep(sleep_time*60)
              except:
                  client.run(TOKEN_AUTH, bot=False)
  
  client.run(TOKEN_AUTH, bot=False)
  </code></pre>