jump.tf Forums
Welcome B)

Tempus Discord Bot

nolem · 9 · 4634

nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
I wrote a Discord bot a few weeks ago with the limited tempus API that I was able to find, so I figured I'd just let anybody use it.

Commands are:
  • !swr <map>
  • !dwr <map> 
  • !swrb <map> <bonus-num>
  • !dwrb <map> <bonus-num>
  • !swrc <map> <course-num>
  • !dwrc <map> <course-num>
  • !rr
  • !rrb
  • !rrc
  • !rrtt
  • !m <map>
  • !p <player-name>
  • !srank <player-name>
  • !drank <player-name>
  • !stime <map> <number> (note - only works for top ten times because API doesn't let me do any more)
  • !dtime <map> <number> (note - only works for top ten times because API doesn't let me do any more)
  • !si <server-name> (see below)

The !si command looks up the current map the given server(s) is/are on and gives you connect info. The stuff below should give you an idea - just try !si with the name of a server from the list below and you'll figure out how it works - it's kinda hard to explain.

Code: [Select]
config.servers = [
        {names:["aub", "au1"],  ip:"45.32.243.18", port:27015},
        {names:["aua", "au2"], ip:"45.32.243.18", port:27025},
        {names:["useb", "use1"], ip:"74.91.122.222", port:27015},
        {names:["usny1","usnyb"], ip:"192.223.24.193", port:27015},
        {names:["usny2","usnya"], ip:"192.223.24.193", port:27025},
        {names:["usea", "use2"], ip:"74.91.122.222", port:27025},
        {names:["uswb", "usw1"], ip:"66.151.138.88", port:27015},
        {names:["uswa", "usw2"], ip:"66.151.138.88", port:27025},
        {names:["tpnb", "eub"], ip:"85.10.208.200", port:27015},
        {names:["tpna", "eua", "eua1"], ip:"85.10.208.200", port:27025},
        {names:["tpna2", "eua2"], ip:"85.10.208.200", port:27095},
        {names:["ab", "afb"], ip:"101.100.183.42", port:26015},
        {names:["aa", "afa"], ip:"101.100.183.42", port:26016},
        {names:["r", "rus"], ip:"109.170.16.98", port:27050}
]
config.server_groups = [
        {name:"us", servers:["useb", "usea", "uswb","uswa", "usny1", "usny2"]},
        {name:"usw", servers:["uswb","uswa"]},
        {name:"use", servers:["useb", "usea"]},
        {name:"usny", servers:["usny1", "usny2"]},
        {name:"eu", servers:["tpnb", "tpna", "tpna2"]},
        {name:"asia", servers:["ab", "aa"]},
        {name:"au", servers:["aub", "aua"]}
]


I've basically exhausted what can be made with the current tempus API but if more stuff becomes possible later I'll probably add it in.

Let me know if there are any issues on discord or steam. No guarantees about uptime but unless somebody breaks it or I'm updating it it should remain online.

Known Issues:
 -

Add the bot to your server here: https://discordapp.com/oauth2/authorize?client_id=240944061458939904&scope=bot&permissions=0

Bot's name is tempus-bot#8070 on discord if you just want to pm it
« Last Edit: October 30, 2017, 02:59:55 PM by nolem »



xHappy-

  • Intermediate
  • ***
    • Posts: 133
    • Frags: +0/-0
  • :]
    • View Profile

nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
The bot has been updated and now refreshes its map list every 6 hours in case maps are added/updated


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Added the !si command to get the map that servers are on - see main post for more info


Hona

  • Guest
There's a Tempus API? I would like to use that, can you please link?


Vexon

  • needs to stop posting
  • *
    • Posts: 1290
    • Frags: +0/-0
  • :}
    • View Profile
Added the !si command to get the map that servers are on - see main post for more info

thats badass
5:01 PM - john | jump.tf: 👌


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
There's a Tempus API? I would like to use that, can you please link?

Not entirely sure if it's supposed to be public yet - I'll pm you what info I have.


nolem

  • Proficient
  • ****
    • Posts: 262
    • Frags: +3/-0
    • View Profile
    • Youtube
Apologies for the giga-necropost, but just wanted to say a little something about an update for the bot.

I just updated the bot to allow you to monitor runs you are interested in. It will work in a channel you have admin perms of or a DM.

Basically send the bot a message like `!monitor rush s` or `!monitor 4st d c4` or `!monitor onit s b2` and you should get a message anytime that record is broken.
Also `!monitor_clear` clears all of the records you are monitoring in a channel. All this info was added to the help text as well.

That should be all - let me know if there are any issues