Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Chit-Chat (http://www.chiefdelphi.com/forums/forumdisplay.php?f=14)
-   -   CDBot - The Chief Delphi "New Thread" Bot on ##FRC (http://www.chiefdelphi.com/forums/showthread.php?t=130419)

pimathbrainiac 31-08-2014 21:05

CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
For those of you who frequent ##FRC, I made a bot for you that scans the RSS feed and alerts the channel when there is a new thread. It also has a few other functions (some useful, some not). Here's a list of them:

.google [search] - Googles [search] and outputs the link and the title
.test - outputs "test received"
.ping [url] - pings [url] and outputs the response code and whether or not the ping was successful.

There are a few others, though. You can look at the source for the rest of the commands: https://github.com/pimathbrainiac/CDPostBot

EDIT: It didn't detect this post. It is a work in progress, after all :/

icecube45 31-08-2014 21:20

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Quote:

Originally Posted by pimathbrainiac (Post 1398584)
For those of you who frequent ##FRC, I made a bot for you that scans the RSS feed and alerts the channel when there is a new thread. It also has a few other functions (some useful, some not). Here's a list of them:

.google [search] - Googles [search] and outputs the link and the title
.test - outputs "test received"
.ping [url] - pings [url] and outputs the response code and whether or not the ping was successful.

There are a few others, though. You can look at the source for the rest of the commands: https://github.com/pimathbrainiac/CDPostBot

EDIT: It didn't detect this post. It is a work in progress, after all :/

It just detected it

pimathbrainiac 01-09-2014 12:47

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Okay, so it's not instantaneous. It must be due to the RSS feed not updating instantaneously. Good to know. Thanks for the notice. Next function will be match scores, synced with TBA, if that' possible.

plnyyanks 01-09-2014 15:13

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Quote:

Originally Posted by pimathbrainiac (Post 1398630)
Next function will be match scores, synced with TBA, if that' possible.

It's very much possible. TBA has an API that you can poll for changes. Additionally, if I get the time in the coming weeks, I'm going to work on adding webhook functionality, which will make it even easier.

pimathbrainiac 01-09-2014 18:29

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Thanks. I saw the API and am working on handing the json right now. I will also add lookup commands for past matches and events. I'll post an update here when it is done.

EDIT: It appears that there is something wrong with the API, or the way it works. When I use this url in chrome, I get the response data. When I use the same URL In Java, I get error code 400. Any ideas?

plnyyanks 01-09-2014 20:14

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Quote:

Originally Posted by pimathbrainiac (Post 1398656)
EDIT: It appears that there is something wrong with the API, or the way it works. When I use this url in chrome, I get the response data. When I use the same URL In Java, I get error code 400. Any ideas?

Are you supplying the proper "X-Tba-App-Id" header to identify your request? I can run the following command and get the proper response back.
Code:

curl --header "X-Tba-App-Id:foo:baz:baz" http://www.thebluealliance.com/api/v2/events/2014
If you need some help with using the API through java, take a look at this file in the TBA Android app - it should be a good starting point.

pimathbrainiac 01-09-2014 21:32

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
I forgot. Thanks for that! I added it as a URL param.
Also thanks for the file link. That should come in handy!

pimathbrainiac 12-09-2014 06:28

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
Some major improvements have been made recently. I'm working on tba lookups right now (with the last score of an event, some event data, etc. already done). I also added a .cdsearch function so you can search CD from IRC. I'll document everything once this is finished. For now, if you want to check things, you should go look at my source code on GitHub (and star it, while you're at it).

pimathbrainiac 16-12-2014 17:13

Re: CDBot - The Chief Delphi "New Thread" Bot on ##FRC
 
It's been a while since I've posted here.

I have added a .help command, as well as some code for a very nice surprise once the competitions start :D


All times are GMT -5. The time now is 06:29.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi