Author Topic: Custom commands loading text from URL  (Read 1118 times)

0 Members and 2 Guests are viewing this topic.

Vidoy

  • Youngling
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Vidoy
Custom commands loading text from URL
« on: November 18, 2014, 04:27:04 AM »
Thinking about a command that lets you define a command that load text from an external file or URL, this is also a geat way for API integration!
Quote
Let's say I have a PHP file that generates random jokes the I write

Code: [Select]
!addcmd !joke url:http://mydomain.com/jokes.php
When I use the command, it posts the content of the file, aka a random joke.

Quote
Or lets say someone wants to find a specific joke, you can program the target command

Code: [Select]
!addcmd !specificjoke url:http://mydomain.com/jokes.php?jokeid=@target@
When you type !specificjoke 5, then joke number 5 will show up!

Good idea?  :)