瀏覽代碼

SEXY RUSSIAN CODES WAITING FOR YOU TO CALL

TheHamkerCat 5 年之前
父節點
當前提交
83a40f3f77
共有 10 個文件被更改,包括 60 次插入 和 642 次删除
  1. 1 1
      wbb/modules/arq.py
  2. 2 2
      wbb/modules/global_stats.py
  3. 4 4
      wbb/modules/misc.py
  4. 2 2
      wbb/modules/music.py
  5. 2 2
      wbb/modules/repo.py
  6. 0 605
      wbb/utils/commit.txt
  7. 13 6
      wbb/utils/functions.py
  8. 15 4
      wbb/utils/http.py
  9. 14 16
      wbb/utils/inlinefuncs.py
  10. 7 0
      wbb/utils/runs.txt

+ 1 - 1
wbb/modules/arq.py

@@ -44,7 +44,7 @@ async def arq_stats(_, message):
     bot = data.bot
     statistics = f"""
 **Uptime:** `{uptime}`
-**Requests:** `{requests}`
+**Requests Since Uptime:** `{requests}`
 **CPU:** `{cpu}`
 **Memory:**
     **Total Used:** `{server_mem}`

+ 2 - 2
wbb/modules/global_stats.py

@@ -34,7 +34,7 @@ from wbb.utils.dbfunctions import (get_blacklist_filters_count,
                                    get_served_chats, get_served_users,
                                    get_warns_count,
                                    remove_served_chat)
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 from wbb.utils.inlinefuncs import keywords_list
 
 """ CHAT WATCHER IS IN filters.py"""
@@ -100,7 +100,7 @@ async def global_stats(_, message):
     # Contributors/Developers count and commits on github
     url = "https://api.github.com/repos/thehamkercat/williambutcherbot/contributors"
     rurl = "https://github.com/thehamkercat/williambutcherbot"
-    developers = await fetch(url)
+    developers = await get(url)
     commits = 0
     for developer in developers:
         commits += developer["contributions"]

+ 4 - 4
wbb/modules/misc.py

@@ -31,7 +31,7 @@ from pyrogram import filters
 from wbb import FERNET_ENCRYPTION_KEY, app, arq
 from wbb.core.decorators.errors import capture_err
 from wbb.utils import random_line
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 from wbb.utils.json_prettify import json_prettify
 from wbb.utils.pastebin import paste
 
@@ -58,8 +58,8 @@ __HELP__ = """
 @app.on_message(filters.command("commit") & ~filters.edited)
 async def commit(_, message):
     await message.reply_text(
-        (await random_line("wbb/utils/commit.txt"))
-    )
+            await get("http://whatthecommit.com/index.txt")
+            )
 
 
 @app.on_message(filters.command("RTFM", "#"))
@@ -276,7 +276,7 @@ async def json_fetch(_, message):
     url = message.text.split(None, 1)[1]
     m = await message.reply_text("Fetching")
     try:
-        data = await fetch(url)
+        data = await get(url)
         data = await json_prettify(data)
         if len(data) < 4090:
             await m.edit(data)

+ 2 - 2
wbb/modules/music.py

@@ -37,7 +37,7 @@ from pyrogram import filters
 
 from wbb import app, arq
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 from wbb.utils.pastebin import paste
 
 __MODULE__ = "Music"
@@ -243,7 +243,7 @@ async def deezsong(_, message):
         return await m.edit(str(e))
     is_downloading = False
     try:
-        await fetch(f"{proxy}/remove")
+        await get(f"{proxy}/remove")
     except Exception:
         pass
 

+ 2 - 2
wbb/modules/repo.py

@@ -25,7 +25,7 @@ from pyrogram import filters
 
 from wbb import app
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 
 __MODULE__ = "Repo"
 __HELP__ = (
@@ -37,7 +37,7 @@ __HELP__ = (
 @app.on_message(filters.command("repo") & ~filters.edited)
 @capture_err
 async def repo(_, message):
-    users = await fetch(
+    users = await get(
         "https://api.github.com/repos/thehamkercat/williambutcherbot/contributors"
     )
     list_of_users = ""

+ 0 - 605
wbb/utils/commit.txt

@@ -1,605 +0,0 @@
- - Temporary commit.
- ¯\_(ツ)_/¯
-"Get that shit outta my master."
-#GrammarNazi
-$(init 0)
-$(rm -rvf .)
-(\ /)<br/>(O.o)<br/>(&gt; &lt;) Bunny approves these changes.
-(c) Microsoft 1988
---help
--m \'So I hear you like commits ...\'
-.
-...
-/sigh
-640K ought to be enough for anybody
-8==========D
-:(:(
-:q!
-<<<<<<<<<<<<<<< HEAD
-??! what the ...
-A fix I believe, not like I tested or anything
-A full commitment's what I'm thinking of
-A long time ago, in a galaxy far far away...
-ALL SORTS OF THINGS
-Abandon all hope, ye who enter here.
-Add Sandbox
-Added a banner to the default admin page. Please have mercy on me =(
-Added another dependency
-Added missing file in previous commit
-Added some NullPointerExceptions - Happy easter, you bastards! :D
-Added translation.
-All your codebase are belong to us.
-And a commit that I don't know the reason of...
-And if you ask me how I'm feeling
-Another bug bites the dust
-Another commit to keep my CAN streak going.
-Apparently works-for-me is a crappy excuse.
-Argh! About to give up :(
-Arrrrgggg
-At times like this I wish I was a Garbage Man.
-Batman! (this commit has no parents)
-Become a programmer, they said. It'll be fun, they said.
-Best commit ever
-Bit Bucket is down. What should I do now?
-Blaming regex.
-By works, I meant 'doesnt work'.  Works now..
-COMMIT ALL THE FILES!
-Can someone review this commit, please ?
-Check next commit for message.
-Chuck Norris Emailed Me This Patch... I'm Not Going To Question It
-Code was clean until manager requested to fuck it up
-Commit committed
-Commit committed....
-Committed some changes
-Committing fixes in the dark, seriously, who killed my power!?
-Committing in accordance with the prophecy.
-Completed with no bugs...
-Continued development...
-Copy pasta fail. still had a instead of a
-Copy-paste to fix previous copy-paste
-Corrected mistakes
-Crap. Tonight is raid night and I am already late.
-DEAL WITH IT
-DNS_PROBE_FINISHED_NXDOMAIN
-Derp
-Derp search/replace fuckup
-Derp, asset redirection in dev mode
-Derp. Fix missing constant post rename
-Derpy hooves
-Do things better, faster, stronger
-Does anyone read this? I'll be at the coffee shop accross the street.
-Does not work.
-Does this work
-Don't Ask Me, I Have No Idea Why This Works Either
-Don't push this commit
-Don't tell me you're too blind to see
-Done, to whoever merges this, good luck.
-Don’t even try to refactor it.
-Don’t mess with Voodoo
-Easteregg
-Either Hot Shit or Total Bollocks
-Errare humanum est.
-FONDLED THE CODE
-FOR REAL.
-FUCKING XUPPERNAMEX
-Feed. You. Stuff. No time.
-Final commit, ready for tagging
-Fingers crossed!
-Finished fondling.
-First Blood
-Fix PC Load Letter Error
-Fix hard-coded [object Object] string (thanks!)
-Fix my stupidness
-Fix the fixes
-Fixed Bug
-Fixed a bug cause XNAMEX said to
-Fixed a bug in NoteLineCount... not seriously...
-Fixed a little bug...
-Fixed compilation errors
-Fixed errors
-Fixed mispeling
-Fixed so the code compiles
-Fixed some shit
-Fixed the build.
-Fixed the fuck out of #XNUMX!
-Fixed unnecessary bug.
-Fixed everything.
-Fixed what was broken.
-Fixing XNAMEX's bug.
-Fixing XNAMEX's bugs.
-For great justice.
-For real, this time.
-For the sake of my sanity, just ignore this...
-For the statistics only
-Friday 5pm
-Fuck it, YOLO!
-Fucking egotistical bastard. adds expandtab to vimrc
-Fucking submodule bull shit
-Fucking templates.
-Future self, please forgive me and don't hit me with the baseball bat again!
-GIT :/
-Git wants e to commit, I want to sleep. Take me sweet void.
-General commit (no IDs open) - Modifications for bad implementations
-Give me a break, it's 2am.  But it works now.
-Glue. Match sticks. Paper. Build script!
-Gotta make you understand
-Gross hack because XNAMEX doesn't know how to code
-Handled a particular error.
-Here be Dragons
-Herp derp I left the debug in there and forgot to reset errors.
-Herpderp, shoulda check if it does really compile.
-Herping the derp
-Herping the derp derp (silly scoping error)
-Herping the fucking derp right here and now.
-Herpy dooves.
-Hide those navs, boi!
-I CAN HAZ COMMENTZ.
-I CAN HAZ PYTHON, I CAN HAZ INDENTS
-I __ a word
-I am Root. We are Root.
-I am Spartacus
-I am even stupider than I thought
-I am sorry
-I am the greatest javascript developer in the world.
-I can't believe it took so long to fix this.
-I cannot believe that it took this long to write a test for this.
-I did it for the lulz!
-I don't believe it
-I don't get paid enough for this shit.
-I don't give a damn 'bout my reputation
-I don't know what the hell I was thinking.
-I don't know what these changes are supposed to accomplish but somebody told me to make them.
-I don't know why. Just move on.
-I dont know what I am doing
-I expected something different.
-I forgot to commit... So here you go.
-I had a cup of tea and now it's fixed
-I hate this fucking language.
-I have no idea what I'm doing here.
-I honestly wish I could remember what was going on here...
-I immediately regret this commit.
-I just evaluated random code in my console
-I just wanna tell you how I'm feeling
-I know what I am doing. Trust me.
-I know, I know, this is not how I’m supposed to do it, but I can't think of something better.
-I made leetle mistake
-I must enjoy torturing myself
-I must have been drunk.
-I must sleep... it's working... in just three hours...
-I really should've committed this when I finished it...
-I should get a raise for this.
-I should have had a V8 this morning.
-I think now it works
-I transformed a bug into a feature. Once you learn how, you'll never forget it
-I was told to leave it alone, but I have this thing called OCD, you see
-I was wrong...
-I will not apologize for art.
-I would rather be playing SC2.
-I'M PUSHING.
-I'll explain this when I'm sober .. or revert it
-I'll explain when you're older!
-I'm guessing this may start causing us problems either soon or never.
-I'm human
-I'm hungry
-I'm just a grunt. Don't blame me for this awful PoS.
-I'm sorry.
-I'm too foo for this bar
-I'm too old for this shit!
-I'm totally adding this to epic win. +300
-ID:10T Error
-IEize
-If it's hacky and you know it clap you hands (clap clap)!
-If it's stupid and it works, it ain't stupid
-Improving the fix
-Insert Commit Message Here
-Inside we both know what's been going on
-Is there an achievement for this?
-Is there an award for this?
-Issue #XNUM10X is now Issue #XNUM30X
-It Compiles! 50 Points For Gryffindor.
-It compiles! Ship it!
-It fucking compiles \:D/
-It only compiles every XNUM2,5X tries... good luck.
-It was the best of times, it was the worst of times
-It worked for me...
-It works on my computer
-It works!
-It'd be nice if type errors caused the compiler to issue a type error
-It's 2016; why are we using ColdFusion?!
-It's Working!
-It's getting hard to keep up with the crap I've trashed
-It's possible! you can turn a 50-line code chunk into just 3 lines. Here's how
-It's secret!
-It's time to go home
-Just committing so I can go home
-Just stop reading these for a while, ok..
-Landed.
-LAST time, XNAMEX, /dev/urandom IS NOT a variable name generator...
-LOL!
-LOTS of changes. period
-Last time I said it works? I was kidding.  Try this.
-Locating the required gigapixels to render...
-Lock S-foils in attack position
-Love coding? here's the secret reason why
-Low On Caffeine, Please Forgive Coding Style
-MOAR BIFURCATION
-Made it to compile...
-Major fixup.
-Make Sure You Are Square With Your God Before Trying To Merge This
-Make that it works in 90% of the cases.  3:30.
-Merge pull my finger request
-Merge pull request #67 from Lazersmoke/fix-andys-shit Fix andys shit
-Merging 'WIP: Do Not Merge This Branch' Into Master
-Merging the merge
-Minor updates
-Misc. fixes
-More ignore
-Moved something to somewhere... goodnight...
-My bad
-My boss forced me to build this feature... Pure shit.
-NOJIRA: No cry
-NSA backdoor - ignore
-Never Run This Commit As Root
-Never before had a small typo like this one caused so much damage.
-Never gonna give you up
-Never gonna give, never gonna give
-Never gonna let you down
-Never gonna make you cry
-Never gonna run around and desert you
-Never gonna say goodbye
-Never gonna tell a lie and hurt you
-Next time someone asks you how to fix an infinite loop, remember this commit
-Nitpicking about alphabetizing methods, minor OCD thing
-No changes after this point.
-No changes made
-No time to commit.. My people need me!
-Nobody had ever created a function like this one before.
-Not one conflict, today was a good day.
-Not sure why
-Nothing to see here, move along
-Now added delete for real
-Now it's all microservices, I hope the fad persists.
-Now we tell you your browser sucks in your native tongue.
-Obligatory placeholder commit message
-Oh no
-Ok
-Ok, 5am, it works.  For real.
-One does not simply merge into master
-One little whitespace gets its very own commit! Oh, life is so erratic!
-One more time, but with feeling.
-Only Tom Cruise knows why.
-Out for vacation... DONT YOU DARE TO CALL ME.
-PEBKAC
-Peopleware Chapter 8: "You Never Get Anything Done around Here between 9 and 5."
-Pig
-Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit.
-Please forgive me
-Please no changes this time.
-Popping stash
-Programming the flux capacitor
-Push poorly written test can down the road another ten years
-QuickFix.
-REALLY FUCKING FIXED
-Refactor factories, revisit visitors
-Refactored configuration.
-Reinventing the wheel. Again.
-Removed code.
-Removed test case since code didn't pass QA
-Removing unecessary stuff
-Replace all whitespaces with tabs.
-Reset error count between rows. herpderp
-Reticulating splines...
-Revert "fuckup".
-Revert "just testing, remember to revert"
-Rush B!
-SEXY RUSSIAN CODES WAITING FOR YOU TO CALL
-SHIT ===> GOLD
-SOAP is a piece of shit
-Saint Pipeline, please give me the green light
-Same as last commit with changes
-See last commit
-Shit code!
-Shovelling coal into the server...
-So my boss wanted this button ...
-Some bugs fixed
-Some shit.
-Somebody set up us the bomb.
-Something fixed
-Spinning up the hamster...
-Still can't get this right...
-Stuff
-Switched off unit test XNUM15X because the build had to go out now and there was no time to fix it properly.
-TDD: 1, Me: 0
-TODO: Fix later
-TODO: Replace placeholder code
-TODO: Replace stubs
-TODO: Tell someone to implement this
-TODO: write meaningful commit message
-Test commit. Please ignore
-Testing in progress ;)
-Testing the test
-That last commit message about silly mistakes pales in comparision to this one
-That's just how I roll
-The dog is eating my code
-The last time I tried this the monkey didn't survive. Let's hope it works better this time.
-The same thing we do every night, Pinky - try to take over the world!
-Things went wrong...
-This Is Why We Don't Push To Production On Fridays
-This branch is so dirty, even your mom can't clean it.
-This bug has driven lots of coders completely mad. You won't believe how it ended up being fixed
-This bunny should be killed.
-This commit is a lie
-This changes nothing, don't look
-This is a basic implementation that works.
-This is my code. My code is amazing.
-This is not a commit
-This is not the commit message you are looking for
-This is supposed to crash
-This is the last time we let XNAMEX commit ascii porn in the comments.
-This is where it all begins...
-This is why git rebase is a horrible horrible thing.
-This is why the cat shouldn't sit on my keyboard.
-This really should not take 19 minutes to build.
-This should work until december 2013.
-This solves it.
-This was the most stupid bug in the world, fixed in the smartest way ever
-This will definitely break in 20XNUM20,89X (TODO)
-To be honest, I do not quite remember everything I changed here today. But it is all good, I tell ya.
-To those I leave behind, good luck!
-Todo!!!
-Too lazy to write descriptive message
-Too tired to write descriptive message
-Transpiled mainframe.
-Trust me, I'm an engineer!... What the f*ck did just happened here?
-Trust me, it's not badly written. It's just way above your head.
-Trying to fake a conflict
-Ugh. Bad rebase.
-Undoing last comming
-Update .gitignore
-Updated
-Updated build targets.
-Use a real JS construct, WTF knows why this works in chromium.
-Useful text
-Version control is awful
-WHO THE FUCK CAME UP WITH MAKE?
-WTF is this.
-We Had To Use Dark Magic To Make This Work
-We know the game and we're gonna play it
-We should delete this crap before shipping.
-We should get someone from Purdue to do this. They are the boilerplaters.
-We'll figure it out on Monday
-We're no strangers to love
-We've known each other for so long
-Well the book was obviously wrong.
-Well, it's doing something.
-Whatever will be, will be 8{
-Whatever.
-Whee, good night.
-Whee.
-Who Let the Bugs Out??
-Who has two thumbs and remembers the rudiments of his linear algebra courses?  Apparently, this guy.
-Who knows WTF?!
-Who knows...
-Why The Fuck?
-WIP, always
-Working on tests (haha)
-Working on WIP
-Wubbalubbadubdub!
-XNAMEX broke the regex, lame
-XNAMEX made me do it
-XNAMEX rebase plx?
-XNAMEX sucks
-XUPPERNAMEX SUCKS
-XUPPERNAMEX, WE WENT OVER THIS. C++ IO SUCKS.
-XUPPERNAMEX, WE WENT OVER THIS. EXPANDTAB.
-Yep, XNAMEX was right on this one.
-Yes, I was being sarcastic.
-You can't see it, but I'm making a very angry face right now
-You know the rules and so do I
-You should have trusted me.
-You wouldn't get this from any other guy
-Your commit is writing checks your merge can't cash.
-Your heart's been aching but you're too shy to say it
-[Insert your commit message here. Be sure to make it descriptive.]
-[no message]
-_
-a few bits tried to escape, but we caught them
-add actual words
-add dirty scripts from the dark side of the universe
-added security.
-added some filthy stuff
-added super-widget 2.0.
-after of this commit remember do a git reset hard
-ajax-loader hotness, oh yeah
-and a comma
-and so the crazy refactoring process sees the sunlight after some months in the dark!
-another big bag of changes
-apparently i did something…
-arrgghh... damn this thing for not working.
-arrrggghhhhh fixed!
-asdfasdfasdfasdfasdfasdfadsf
-assorted changes
-bad things happen when you forget about that one little change you made ages ago
-bara bra grejjor
-better code
-better grepping
-better ignores
-betterer code
-bifurcation
-bla
-breathe, =, breathe
-buenas those-things.
-bug fix
-bugger
-bump to 0.0.3-dev:wq
-bumping poms
-c&p fail
-changed things...
-changes
-clarify further the brokenness of C++. why the fuck are we using C++?
-commented out failing tests
-commit
-copy and paste is not a design pattern
-de-misunderestimating
-debug line test
-debug suff
-debugo
-derp, helper method rename
-derpherp
-diaaaaaazeeeeeeeeeepam
-did everything
-dirty hack, have a better idea ?
-does it work? maybe. will I check? no.
-doh.
-done. going to bed now.
-epic
-eppic fail XNAMEX
-extra debug for stuff module
-fail
-ffs
-final commit.
-first blush
-fix
-fix /sigh
-fix bug, for realz
-fix some fucking errors
-fix tpyo
-fixed conflicts (LOL merge -s ours; push -f)
-fixed errors in the previous commit
-fixed mistaken bug
-fixed shit that havent been fixed in last commit
-fixed some minor stuff, might need some additional work.
-fixed the israeli-palestinian conflict
-fixes
-foo
-forgot to save that file
-forgot we're not using a smart language
-formatted all
-freemasonry
-fuckup.
-gave up and used tables.
-giggle.
-git + ipynb = :(
-grmbl
-grrrr
-hacky sack
-happy monday _ bleh _
-harharhar
-herpderp
-herpderp (redux)
-hey, look over there!
-hey, what's that over there?!
-hmmm
-hoo boy
-i dunno, maybe this works
-i think i fixed a bug...
-if you're not using et, fuck off
-include shit
-it is hump day _^_
-it's friday
-jobs... steve jobs
-just checking if git is working properly...
-just shoot me
-just trolling the repo
-last minute fixes.
-less french words
-lol
-lol digg
-lolwhat?
-lots and lots of changes
-lots of changes after a lot of time
-magic, have no clue but it works
-making this thing actually usable.
-marks
-mergeconflix is the new hottest Gaul on the block
-mergederp
-minor changes
-more debug... who overwrote!
-more fixes
-more ignored words
-more ignores
-more stuff
-move your body every every body
-need another beer
-needs more cow bell
-omg what have I done?
-omgsosorry
-oops
-oops - thought I got that one.
-oops!
-oops, forgot to add the file
-oopsie B|
-pam anderson is going to love me.
-pay no attention to the man behind the curtain
-pep8 - cause I fell like doing a barrel roll
-pep8 fixer
-perfect...
-pgsql is being a pain
-pgsql is more strict, increase the hackiness up to 11
-pointless limitation
-project lead is allergic to changes...
-put code that worked where the code that didn't used to be
-rats
-really ignore ignored worsd
-remove certain things and added stuff
-remove debug<br/>all good
-removed echo and die statements, lolz.
-removed tests since i can't make them green
-removing unit tests
-restored deleted entities just to be sure
-s/    /  /g
-s/import/include/
-should work I guess...
-should work now.
-small is a real HTML tag, who knew.
-some brief changes
-somebody keeps erasing my changes.
-someday I gonna kill someone for this shit...
-someone fails and it isn't me
-sometimes you just herp the derp so hard it herpderps
-speling is difikult
-squash me
-stopped caring XNUM8,23X commits ago
-stuff
-syntax
-tagging release w.t.f.
-that coulda been bad
-that's all folks
-the magic is real
-these confounded tests drive me nuts
-these guys are flipped
-They came from... Behind
-things occurred
-third time's a charm
-this doesn't really make things faster, but I tried
-this is Spartaaaaaaaa
-this is how we generate our shit.
-this is my quickfix branch and i will use to do my quickfixes
-this is why docs are important
-this should fix it
-tl;dr
-totally more readable
-touched...
-tunning
-typo
-uhhhhhh
-unh
-unionfind is no longer being molested.
-various changes
-well crap.
-what the hell happened here
-whatthecommit.com’s server IP address could not be found.
-whooooooooooooooooooooooooooo
-why is everything broken
-wip
-woa!! this one was really HARD!
-work in progress
-workaround for ant being a pile of fail
-yet another quality commit
-yo recipes
-yolo push
-refuckulated the carbonator
-starting the service is always better
-Fix all errors, all errors on the WORLD!!!!
-god help us all
-lets drink beer

+ 13 - 6
wbb/utils/functions.py

@@ -34,12 +34,13 @@ import aiofiles
 import aiohttp
 import speedtest
 from PIL import Image, ImageDraw, ImageFilter, ImageFont
+from pyrogram.types import Message
 from wget import download
 
 from wbb import aiohttpsession as aiosession
 from wbb import arq
 from wbb.utils import aiodownloader
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 
 """
 Just import 'downloader' anywhere and do downloader.download() to
@@ -139,7 +140,10 @@ async def make_carbon(code):
     return image
 
 
-async def transfer_sh(file):
+async def transfer_sh(file_or_message):
+    if is_instance(file_or_message, Message):
+        file_or_message = await file_or_message.download()
+    file = file_or_message
     async with aiofiles.open(file, "rb") as f:
         params = {file: await f.read()}
     async with aiohttp.ClientSession() as session:
@@ -165,8 +169,8 @@ def str_to_obj(string: str):
 async def calc_distance_from_ip(ip1: str, ip2: str) -> float:
     Radius_Earth = 6371.0088
     data1, data2 = await gather(
-        fetch(f"http://ipinfo.io/{ip1}"),
-        fetch(f"http://ipinfo.io/{ip2}"),
+        get(f"http://ipinfo.io/{ip1}"),
+        get(f"http://ipinfo.io/{ip2}"),
     )
     lat1, lon1 = data1["loc"].split(",")
     lat2, lon2 = data2["loc"].split(",")
@@ -267,9 +271,12 @@ async def test_ARQ(message):
     for key, value in funcs.items():
         try:
             t1 = time()
-            await value
+            result = await value
             t2 = time()
-            results += f"**{key.capitalize()}:** `{t2-t1}`\n"
+            if result.ok:
+                results += f"**{key.capitalize()}:** `{t2-t1}`\n"
+            else:
+                resuls += f"**{key.capitalize()}:** `Failed`\n"
         except Exception:
             results += f"**{key.capitalize()}:** `Failed`\n"
     return results

+ 15 - 4
wbb/utils/fetch.py → wbb/utils/http.py

@@ -26,7 +26,7 @@ from asyncio import gather
 from wbb import aiohttpsession as session
 
 
-async def fetch(url: str, *args, **kwargs):
+async def get(url: str, *args, **kwargs):
     async with session.get(url, *args, **kwargs) as resp:
         try:
             data = await resp.json()
@@ -34,9 +34,16 @@ async def fetch(url: str, *args, **kwargs):
             data = await resp.text()
     return data
 
+async def head(url: str, *args, **kwargs):
+    async with session.head(url, *args, **kwargs) as resp:
+        try:
+            data = await resp.json()
+        except Exception:
+            data = await resp.text()
+    return data
 
 async def post(url: str, *args, **kwargs):
-    async with session.get(url, *args, **kwargs) as resp:
+    async with session.post(url, *args, **kwargs) as resp:
         try:
             data = await resp.json()
         except Exception:
@@ -44,11 +51,15 @@ async def post(url: str, *args, **kwargs):
     return data
 
 
-async def multifetch(url: str, times: int, *args, **kwargs):
+async def multiget(url: str, times: int, *args, **kwargs):
     return await gather(
-        *[fetch(url, *args, **kwargs) for _ in range(times)]
+        *[get(url, *args, **kwargs) for _ in range(times)]
     )
 
+async def multihead(url: str, times: int, *args, **kwargs):
+    return await gather(
+        *[head(url, *args, **kwargs) for _ in range(times)]
+    )
 
 async def multipost(url: str, times: int, *args, **kwargs):
     return await gather(

+ 14 - 16
wbb/utils/inlinefuncs.py

@@ -46,7 +46,7 @@ from wbb import (BOT_USERNAME, MESSAGE_DUMP_CHAT, SUDOERS, USERBOT_ID,
 from wbb.core.types import InlineQueryResultCachedDocument
 from wbb.modules.info import get_chat_info, get_user_info
 from wbb.modules.music import download_youtube_audio
-from wbb.utils.fetch import fetch
+from wbb.utils.http import get
 from wbb.utils.functions import test_speedtest
 from wbb.utils.pastebin import paste
 
@@ -417,7 +417,7 @@ async def lyrics_func(answers, text):
 
 async def github_user_func(answers, text):
     URL = f"https://api.github.com/users/{text}"
-    result = await fetch(URL)
+    result = await get(URL)
     buttons = InlineKeyboard(row_width=1)
     buttons.add(
         InlineKeyboardButton(
@@ -453,7 +453,7 @@ async def github_repo_func(answers, text):
         text = text[0:-1]
     URL = f"https://api.github.com/repos/{text}"
     URL2 = f"https://api.github.com/repos/{text}/contributors"
-    results = await asyncio.gather(fetch(URL), fetch(URL2))
+    results = await asyncio.gather(get(URL), get(URL2))
     r = results[0]
     r1 = results[1]
     commits = 0
@@ -562,7 +562,7 @@ async def music_inline_func(answers, query):
         messages = [
             m
             async for m in app2.search_messages(
-                chat_id, query, filter="audio", limit=199
+                chat_id, query, filter="audio", limit=100
             )
         ]
     except Exception as e:
@@ -591,19 +591,14 @@ async def music_inline_func(answers, query):
     messages = list(
         {v["duration"]: v for v in messages_ids_and_duration}.values()
     )
-    messages_ids = []
-    for ff_ in messages:
-        messages_ids.append(ff_["message_id"])
+    messages_ids = [ff_["message_id"] for ff_ in messages]
     messages = await app.get_messages(chat_id, messages_ids[0:48])
-    for message_ in messages:
-        answers.append(
+    return [
             InlineQueryResultCachedDocument(
                 file_id=message_.audio.file_id,
                 title=message_.audio.title,
-            )
-        )
-    return answers
-
+            ) for message_ in messages
+            ]
 
 async def wiki_func(answers, text):
     data = await arq.wiki(text)
@@ -708,6 +703,9 @@ async def pmpermit_func(answers, user_id, victim):
         InlineKeyboardButton(
             text="Approve", callback_data=f"pmpermit approve {victim}"
         ),
+        InlineKeyboardButton(
+            text="Block", callback_data=f"pmpermit block {victim}"
+        ),
     )
     answers.append(
         InlineQueryResultArticle(
@@ -724,7 +722,7 @@ async def ping_func(answers):
     ping = Ping(ping_id=randint(696969, 6969696))
     await app.send(ping)
     t2 = time()
-    ping = f"{str(round((t2 - t1), 6) * 100)} ms"
+    ping = f"{str(round((t2 - t1) * 1000, 2))} ms"
     answers.append(
         InlineQueryResultArticle(
             title=ping,
@@ -829,7 +827,7 @@ async def tmdb_func(answers, query):
             )
         )
         return answers
-    results = response.result[0:48]
+    results = response.result[:49]
     for result in results:
         if not result.poster and not result.backdrop:
             continue
@@ -940,7 +938,7 @@ async def image_func(answers, query):
             )
         )
         return answers
-    results = results.result[0:48]
+    results = results.result[:49]
     buttons = InlineKeyboard(row_width=2)
     buttons.add(
         InlineKeyboardButton(

+ 7 - 0
wbb/utils/runs.txt

@@ -5,6 +5,7 @@ I just had to pop down to the shop …  I was running a bit low on mind your own
 You see, when they’re apart, they’re absolute fuckin’ rubbish … but you put them together, they’re the goddamn fucking Spice Girls.
 Sounds good, does it taste like lies? I’ve got your phone linked to my Find Your Shithead Friends app. Now where the fuck are you?
 Shake Shack, huh? Nice try Cunt!
+Stop running, use a car.
 Well Well Well if it ain't the invisible cunt.
 Mama ain't raised no bitch, ima speak up when i need to.
 Not to brag but i don't even need errors to make bad decisions.
@@ -14,3 +15,9 @@ Ok....But, does your code runs?
 Yeah they always say that, but their code never runs!
 Yeah, I'm currently running on debian!
 Run Barry, RUN!
+No, not runs , i'm tired of all this shit.
+Legend says, he's still running.
+Running...Wait for output..
+Run harder they said, you'll be fine they said, my leg hurts wtf.
+Stays
+Runs where?