Skip to content

die-Deutsche-Orthopaedie/shitty-arse-discord-bots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shitty Arse Discord Bots

Shitty Arse Discord Bots usin' bash, and yep, arsefockin' B A S H

You'll need a computer / server / VPS / anythin' that can run bash to run this script, recommended services:

Free:

    • same with any free php host that supports shell_exec function

Paid:

  • Vultr: https://my.vultr.com/deploy/ ($5/mo, not worth it, unless you like tokyo's 30MB/s pixiv download speed, but no matter how fast you download pics on pixiv you're still ratelimited by discord, btw that shitty arse IPv6 only instance can't run futaba.sh since none of *.discordapp.com, pixiv.net or i.pximg.net has IPv6 address)

Other bots will not be updated any fockin' way, all of them are in futaba.sh

And one more thing, i've completed the Holy Grail of Hentai, pixiv.net, with arsefockin' B A S H! How the fock will i celebrate?

Now i've added cross channel messagin' and chatroom join functionality, one step closer to be discord: bash edition xD

WARNING: this script used soooooooo many evals, if you include a rm / -rf somewhere in the input (includin' from hentai sites), it may really be doin' rm / -rf; USE IT AT YOUR OWN ARSEFOCKIN' RISK, and better not use it on your own computer xD

actually it can run almost without issue on ovh's free host (you'll need an UK ip to apply for one, because ENGLAND IS MY CITY), or other free hosts with ssh access, except you'll need to use bash futaba.sh instead of ./futaba.sh

wait an arsefockin' minute, i really need to make a command to spam "ENGLAND IS MY CITY" xDDDD

UPDATE: ENGLAND IS MY CITYand its parody version, PINGASLAND IS MY PINGAS spam functionality finished, if you really wanna get your arse banned soooooooon, just use them!

UPDATE: now added pixiv author and user's favourite dump support, actually there're 3 * 3 = NEIN cases for pixiv processin'; but i don't write nein functions, i only write seven of them

UPDATE: idk that sometimes resolvin' i.pximg.net, www.pixiv.net, ptb.discordapp.com and discordapp.com would slow the script down by 2x, and even make some of the results NOT posted on discord. if that thing happened, pls consider to ping them and add the ip address to /etc/hosts manually. i thought dns problems would never be a problem in the developed world, but i'm arsefockin' wrong

UPDATE: i finally fixed pixiv's bug on url, it seems that you'll have to at least replace space with %20 before usin' union tags (like AA AND BB) on curl; and if you can't paste japanese characters into console or php shell, you can try to visit the original pixiv link in firefox, and copy the link to somewhere else, and get the entirely url-encoded tags, then you're good to go!

UPDATE: and one more thing, you can still use tagged search in pixiv_author and pixiv_favourite mode, but you'll need to add &tag=<your tags> after the author id, and you can use union tags as well

UPDATE: pls make sure your shitty arse pixiv parameter has a header called Referer: , otherwise you can't download any pixiv pic; if you get your curl command from a post visitin' from search results page (instead of just visit its link directly), it will usually have this header

UPDATE: found a url decode function here: https://stackoverflow.com/questions/6250698/how-to-decode-url-encoded-string-in-shell, now you don't need to convert pixiv dumplog's filename back yourself if you used url encoded tags in pixiv dumpin'

UPDATE: now with run time display and most importantly, progress control (pixiv only), you can set which pic to start and which pic to end, or both

UPDATE: there would be new hentai in pixiv everyday, and due to discord's arsefockin' ratelimit you'll need days to process pixiv pics if you have 1000+ posts in your tag; so pls use date order to post oldest pics first so newly uploaded hentai will be properly processed; otherwise it might be missin' or make other posts missin'

UPDATE: added another site, but it just worths not mentionin'

Usage:

./futaba.sh [options] cutie cutie_name

Options:

  • Modes:

    • -w or -W or --webhook: use discord webhook to upload hentai, need to paste webhook url into nanako() function
      • and when you use this mode, you must use -a or -A or --avatar-url to set your avatar, you need to make one yourself and upload to discord and get the link via Copy Link
    • -n or -N or --natural-mode: use your own account to upload hentai, need to follow the instructions in futaba() function
    • -m or -M or --message <message>: send a message usin' either methods, in this mode $cutie_name will become your bot's name (if you use webhook)
      • -e or -E or --england-is-my-city: spam nick crumpton's famous England is my City song in set channel (and get your arse banned soooooooon)
      • --pingasland-is-my-pingas: PINGAS version of the aforementioned song
    • -u or -U or --upload <filepath> <message>: upload a file usin' either methods, in this mode $cutie_name will become your bot's name (if you use webhook)
      • and i've found a strange bug out here, now it would be better if you put -u or -U or --upload as the last parameter and all will be fine
    • -d or -D or --download: download pics and reupload to discord instead of just postin' links, required for pixiv
      • --preserve-pics: move downloaded pics in pics folder other than removin' them
    • -l or -L or --link-only <exportfilepath>: only export hentai pics links to file; for pixiv, it's the entire wget command, you can use bash or localmachine_pixiv to run them later
  • Configurations:

    • -s or -S or --site <sitename>: input site name, currently supported: paheal, gelbooru, rule34xxx, yandere, shinobijp, pixiv, pixiv_author, pixiv_favourite
      • use localmachine to post or upload pics in local file (like bein' generated in link-only mode) to discord, in this case $cutie will be your filename
      • and localmachine_pixiv to download and reupload pics in local pixiv file generated in link-only mode to discord, in this case $cutie will be your filename
    • -c or -C or --config-file <configfilepath>: load a configuration file which contains three lines of webhook url, account curl command and account curl command (used to upload); if you don't load one it will use default values in the script; but i don't make pixiv shit to be in configuration file because you just don't need to change them by all means
      • --fast-webhook <webhook-link>: if you just wanna change webhook (i've forgotten it for days... ), you don't need to create a new configuration file anyway, that's for other uses, actually with cross channel messagin' functionality now natural mode is much more versatile than webhook mode
    • --silent: omit all of messages except pics (they'll be outputted in console anyway), may be useful in some cases
    • --webhookinterval <newinterval>: override webhook mode hentei interval in the script
    • --naturalinterval <newinterval>: override natural mode hentei interval in the script
    • --pixiv-fast-mode: only use the list page info to dump pixiv pics, but will generate too much 404"
    • --pixiv-halfspeed-mode: use id page info to dump pixiv pics, but faster than full mode (default and you don't need to use this)"
    • --pixiv-fullscan-mode: use all page info to dump pixiv pics, slowest"
    • --pixiv-order <pixivorder>: use custom order to search through pixiv; currently available orders: "
      • main mode: date_d (default, from latest to oldest), date (from oldest to latest)
      • premium account exclusive: popular_d (order by popularity), popular_male_d (order by popularity amongst males), popular_female_d (order by popularity amongst females)
      • favourites mode: desc (default, from latest added to favourite to oldest), asc (from oldest added to favourite to latest), date_d (from latest posted to oldest), date (from oldest posted to latest)
    • --pixiv-log: an extra procedure to use pixiv log just like normal local pic file, so you don't need to grep it yourself
      • and currently this thing will either kill the script or make it stop, just forget about it
      • or you can just use cat <logfile> | sed 's/,/\n/g' | grep -Eo '"url": "https://cdn.discordapp.com/.*"' | sed 's/"//g' | sed 's/url: //g' > <newfile> to process beforehand, then use normal method
    • --start-from <postnumber>: start from certain number of post, and skip all posts before it
    • --end-with <postnumber>: end with certain number of post, and skip all posts after it
  • Antics:

    • --channel-id <chatroom-id/channel-id>: the ability to send message in any channel that you have access to (only with natural mode), need to provide both chatroom id and channel id
      • and i'm still not used to called discord chatroom "server", because what runs this script is the real server for me
    • --join-chatroom <chatroom-invite-link>: the ability to join chatroom via ARSEFOCKIN' B A S H, you just need to provide the last few letters of the invite link, for https://discord.gg/FEGELEIN you only need "FEGELEIN"
  • Help:

    • -h or -H or --help: show help

Cutie:

And you'll need to provide webhook url (webhook mode) or curl command for account ("natural" mode) to make this script work. It's not too hard to provide webhook url, but it needs extra efforts to form two curl commands for this script to use.

You'll need to follow these steps to form curl commands:

  1. Login your discord account in firefox
  2. go to your desired channel
  3. press F12 to open developer menu, and click "Network" or "Networking" tab
  4. Enter some messages, you will see a request called "typing" in the network tab below
  5. Send the message, and right click the new "messages" request and select "copy" -> "copy as cURL"
  6. process the curl command copied: it should be like curl "https://discordapp.com/api/v6/channels/XXXXXXXX/messages" -H "User-Agent: XXXXXXXX" -H "Accept: */*" -H "Accept-Language: en-US" --compressed -H "Referer: https://discordapp.com/channels/XXXXXXXX" -H "Content-Type: application/json" -H "Authorization: XXXXXXXX" -H "X-Super-Properties: XXXXXXXX" -H "Cookie: XXXXXXXX" -H "DNT: 1" -H "Connection: keep-alive" --data "{""content"":""fish"",""nonce"":""XXXXXXXX"",""tts"":false}", delete any -H with somethin' like -H "X-Fingerprint: XXXXXXXX" (IMPORTANT), replace --data "XXXXXXXX" with --data "{\"content\":\"$1\",\"nonce\":\"$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM\",\"tts\":false}";, then it's good to go to be in the script or in the configuration file
  7. use the same method to upload a file and copy the curl command, this time it should be like curl "https://discordapp.com/api/v6/channels/XXXXXXXX/messages" -H "User-Agent: XXXXXXXX" -H "Accept: */*" -H "Accept-Language: en-US" --compressed -H "Referer: https://discordapp.com/channels/XXXXXXXX" -H "Authorization: XXXXXXXX" -H "X-Super-Properties: XXXXXXXX" -H "Content-Type: multipart/form-data; boundary=XXXXXXXX" -H "Cookie: XXXXXXXX" -H "DNT: 1" -H "Connection: keep-alive" --data "", and you can't see any file or message, but don't worry, just replace --data "XXXXXXXX" with -F "payload_json={\"content\":\"$1\",\"nonce\":\"$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM\",\"tts\":false}" -F "filename=@$2", and you can use nonce data on the last command, and the curl command for upload is finished as well
  8. or you can just use step 6's results and just replace --data "XXXXXXXX" with -F "payload_json={\"content\":\"$1\",\"nonce\":\"$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM\",\"tts\":false}" -F "filename=@$2", and replace -H "Content-Type: application/json" with -H "Content-Type: multipart/form-data; boundary=---------------------------$RANDOM$RANDOM", it can also work, but you don't need to upload a file
  9. form a three line file, first line is webhook url (even if you don't wanna or can't use webhook, you'll at least need to provide somethin' to fill the line), second line is curl command and third line is curl command for upload, save these into a text file, and next time you can load them with -c or -C or --config-file option, and you're good to go!

Similar steps will be required to get pixiv parts work, but it would be much simpler, just make sure you can see hentai pics in https://www.pixiv.net/search.php?word=佐倉双葉&order=date_d&mode=r18 (that requires you to be registrated, set things right and even in the correct geolocation, idk but it works for me), find the very first request in firefox network tab, and copy as curl; it would be like curl "https://www.pixiv.net/search.php?word="%"E4"%"BD"%"90"%"E5"%"80"%"89"%"E5"%"8F"%"8C"%"E8"%"91"%"89&order=date_d&mode=r18" -H xxxxxxxx -H xxxxxxxx, just delete the curl "xxxxxxxx" part and leave a bunch of -H only, and paste it into $shitty_arse_pixiv_parameter, and you're good to go!

About

Shitty Arse Discord Bots usin' bash, and yep, arsefockin' B A S H

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages