Scathach bot.

Scathach bot.

  • 📚Docs
  • 📈BotStats
  • 🛰️ServiceStatus
  • 🏓Playground
  • 🍑Invite

›Recent Posts

Recent Posts

  • Regex Magic!
  • Sharding, votelocking, and lewdeconomy
  • hey you

Regex Magic!

January 16, 2021

Sinx

Yooh degenerate user kun, last week i looked onto other bot and then he have feature imagebomb ?
Interested, smh this is never unthinkable before, the route is simple but this is really fun lol

We fetch some random 5images, from various booru..
need no other modules or anything else
PHP/curl will do it all! and its less than 5min !

request/curl to https://gelbooru.com/index.php?page=dapi&s=post&q=index and do below:

$scrpe = '/<?xml(.*?)<\/posts>/s';

if ( preg_match($scrpe, $page, $list) ) 
if(preg_match_all('#file_url="(.*?)"#', $page, $match)) {
    shuffle($match[1]);
    
    echo '{"url":"',implode('\n',array_slice($match[1], 0, 5)),'"}';
    
  }
  • Some feature added (hentaibomb, realbomb, gifbomb, r34bomb)
    you can run $!hentaibomb <args> and get 5random images, maybe we should increase the amount? lemme know
Recent Posts
Scathach bot.
Docs
Getting StartedBlogNode WrapperPython WrapperRuby gem wrapper for ScathachChangelogsMicroservice
Community
HelpGithubProject ChatModulesListedContributorsLegalPartners
More
BlogTwitterFacebookTelegramGitHub
Facebook Open Source
Copyright © 2021 Scathach bot, not affiliated with Discord nor Type-Moon in any way dummy