Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.36 KB | None | 0 0
  1. @tasks.loop(seconds = 10.0)
  2. async def post_tweet():
  3.     print('Loop Started')
  4.     #Check for updates
  5.     if not unp_statuses_h[0].text == statuses_h[0].text:
  6.         print('Hypixel Tweeted')
  7.         statuses_h = unp_statuses_h
  8.         for id in range(len(channel_id)):
  9.             print("Started Mesaging Hypixel's Tweet")
  10.             channel = client.get_channel(channel_id[id])
  11.             await channel.send(client.get_channel(channel_id[id]), ("Hypixel's last tweet was : "+  '"' +str(statuses_h[0].text)+ '"'+ '\n\n and was creted atat: ' + str(statuses_h[0].created_at)))
  12.         print('Hypixel Done')
  13.  
  14.     if not unp_statuses_s[0].text == statuses_s[0].text:
  15.         print('Simon Tweeted')
  16.         statuses_s = unp_statuses_s
  17.         for id in range(len(channel_id)):
  18.             print("Started Mesaging Simon's Tweet")
  19.             channel = client.get_channel(channel_id[id])
  20.             await channel.send(client.get_channel(channel_id[id]), ("Simon's last tweet was : "+  '"' +str(statuses_s[0].text)+ '"'+ '\n\n and was creted atat: ' + str(statuses_s[0].created_at)))
  21.         print('Simon Done')
  22.  
  23.     print('Loop Checked For Updates and prints')
  24.  
  25.     unp_statuses_s = tapi.GetUserTimeline('14362613') #Simon - not permenet value
  26.     unp_statuses_h = tapi.GetUserTimeline('1452480684') #Hypixel Network - not permenet value
  27.  
  28.     print('Loop Updates')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement