Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @tasks.loop(seconds = 10.0)
- async def post_tweet():
- print('Loop Started')
- #Check for updates
- if not unp_statuses_h[0].text == statuses_h[0].text:
- print('Hypixel Tweeted')
- statuses_h = unp_statuses_h
- for id in range(len(channel_id)):
- print("Started Mesaging Hypixel's Tweet")
- channel = client.get_channel(channel_id[id])
- 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)))
- print('Hypixel Done')
- if not unp_statuses_s[0].text == statuses_s[0].text:
- print('Simon Tweeted')
- statuses_s = unp_statuses_s
- for id in range(len(channel_id)):
- print("Started Mesaging Simon's Tweet")
- channel = client.get_channel(channel_id[id])
- 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)))
- print('Simon Done')
- print('Loop Checked For Updates and prints')
- unp_statuses_s = tapi.GetUserTimeline('14362613') #Simon - not permenet value
- unp_statuses_h = tapi.GetUserTimeline('1452480684') #Hypixel Network - not permenet value
- print('Loop Updates')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement