Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every 1 minutes:
- if {_imtoolazyremoveatabspacefromeachofthebottomcodes} is not set:
- set {_url} to "https://hosts.uhc.gg/api/matches/upcoming"
- replace all "ยง" in {_url} with "&"
- send a request to {_url} with headers "User-agent: postbot69420"
- map json last http response's body to {_l::*}
- if {_l::*} is set:
- loop {_l::*}:
- if {_l::%loop-index%::ip} contains "62.210.77.183" or "139.99.4.213" or "167.114.209.167" or "2donkeys.net":
- if {matchpost::%{_l::%loop-index%::id}%} is not set:
- set {_text::*} to {_l::%loop-index%::opens} split at ""
- set {_time} to "%{_text::9}%%{_text::10}%%{_text::8}%%{_text::6}%%{_text::7}%%{_text::5}%%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}% | %{_text::12}%%{_text::13}%%{_text::14}%%{_text::15}%%{_text::16}%"
- if {_l::%loop-index%::scenarios} is true:
- loop {_l::%loop-index%::scenarios::*}:
- add "%loop-value-2%" to {_scenarios::*}
- if {_l::%loop-index%::teams} is set:
- if {_l::%loop-index%::teams} is "ffa":
- set {_tempteam} to "FFA"
- else if {_l::%loop-index%::teams} is "chosen":
- set {_tempteam} to "c"
- else if {_l::%loop-index%::teams} is "random":
- set {_tempteam} to "r"
- else:
- set {_tempteam} to "%{_l::%loop-index%::teams}%"
- if {_l::%loop-index%::size} is set:
- discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
- create embed "matchpost"
- set title of embed "matchpost" to "Upcoming Match!"
- set color of embed "matchpost" to "YELLOW"
- add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
- add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
- add field "TeamSize & Gamemodes", with value "%{_tempteam}%to%{_l::%loop-index%::size}% - %{_scenarios::*}%", split true to embed "matchpost"
- add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
- add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
- add field "IP", with value "__%{_l::%loop-index%::ip}%__", split true to embed "matchpost"
- set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
- set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
- send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
- send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
- clear embed "matchpost"
- else:
- discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
- create embed "matchpost"
- set title of embed "matchpost" to "Upcoming Match!"
- set color of embed "matchpost" to "YELLOW"
- add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
- add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
- add field "TeamSize & Gamemodes", with value "%{_tempteam}% - %{_scenarios::*}%", split true to embed "matchpost"
- add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
- add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
- add field "IP", with value "__%{_l::%loop-index%::ip}%__", split true to embed "matchpost"
- set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
- set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
- send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
- send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
- clear embed "matchpost"
- set {matchpost::%{_l::%loop-index%::id}%} to true
- set {matchpost::%{_l::%loop-index%::id}%::opendate} to "%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}%%{_text::6}%%{_text::7}%%{_text::9}%%{_text::10}%" parsed as an integer
- delete {_scenarios::*}
- else if {_l::%loop-index%::address} contains "62.210.77.183" or "139.99.4.213" or "167.114.209.167" or "2donkeys.net":
- if {matchpost::%{_l::%loop-index%::id}%} is not set:
- set {_text::*} to {_l::%loop-index%::opens} split at ""
- set {_time} to "%{_text::9}%%{_text::10}%%{_text::8}%%{_text::6}%%{_text::7}%%{_text::5}%%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}% | %{_text::12}%%{_text::13}%%{_text::14}%%{_text::15}%%{_text::16}%"
- if {_l::%loop-index%::scenarios} is true:
- loop {_l::%loop-index%::scenarios::*}:
- add "%loop-value-2%" to {_scenarios::*}
- if {_l::%loop-index%::teams} is set:
- if {_l::%loop-index%::teams} is "ffa":
- set {_tempteam} to "FFA"
- else if {_l::%loop-index%::teams} is "chosen":
- set {_tempteam} to "c"
- else if {_l::%loop-index%::teams} is "random":
- set {_tempteam} to "r"
- else:
- set {_tempteam} to "%{_l::%loop-index%::teams}%"
- if {_l::%loop-index%::size} is set:
- discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
- create embed "matchpost"
- set title of embed "matchpost" to "Upcoming Match!"
- set color of embed "matchpost" to "YELLOW"
- add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
- add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
- add field "TeamSize & Gamemodes", with value "%{_tempteam}%to%{_l::%loop-index%::size}% - %{_scenarios::*}%", split true to embed "matchpost"
- add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
- add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
- add field "IP", with value "__%{_l::%loop-index%::address}%__", split true to embed "matchpost"
- set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
- set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
- send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
- send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
- clear embed "matchpost"
- else:
- discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
- create embed "matchpost"
- set title of embed "matchpost" to "Upcoming Match!"
- set color of embed "matchpost" to "YELLOW"
- add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
- add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
- add field "TeamSize & Gamemodes", with value "%{_tempteam}% - %{_scenarios::*}%", split true to embed "matchpost"
- add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
- add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
- add field "IP", with value "__%{_l::%loop-index%::address}%__", split true to embed "matchpost"
- set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
- set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
- send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
- send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
- clear embed "matchpost"
- set {matchpost::%{_l::%loop-index%::id}%} to true
- set {matchpost::%{_l::%loop-index%::id}%::opendate} to "%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}%%{_text::6}%%{_text::7}%%{_text::9}%%{_text::10}%" parsed as an integer
- delete {_scenarios::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement