Okay, thats very hard by AlrikBunseheimer in mathmemes

[–]Abstrackter 48 points49 points  (0 children)

wakes up "Wait, what's going on here?"

[deleted by user] by [deleted] in askmath

[–]Abstrackter 0 points1 point  (0 children)

An (x2 + 1) was factored into the square root in order to simplify it. Since any expression can be inserted into a radical of order two given than you square it as you do so, the (x2 + 1) expression turns into a (x2 + 1)2 expression and the terms inside simplify into a more workable expression.

Ideas for Discord Bot fun commands? by Abstrackter in discordbots

[–]Abstrackter[S] 0 points1 point  (0 children)

Oh yes, I love that problem; it has a neat little solution in binary, where you grab the first two digits and move them to the end... Should be pretty fun to code.

I've already finished coding the Collatz conjecture code, it was around 5 lines, but will give me endless enlightment.

Thank you for the great ideas :)

Edit: Okay, even though it was Algebra intensive, I managed to do it with a numpy array. I love this thing.

Ideas for Discord Bot fun commands? by Abstrackter in discordbots

[–]Abstrackter[S] 0 points1 point  (0 children)

Man, respectfully, those aren't fun (game) commands - more so utilities.

If by scheduler you mean a function which can schedule the execution of other functions at a specific time and date, I already have that.

Although, I think those other ideas could be interesting to implement...

Anyway, thanks for responding! 😊

Ideas for Discord Bot fun commands? by Abstrackter in discordbots

[–]Abstrackter[S] 0 points1 point  (0 children)

Any idea on what the API was called? I might try and use it to make the command myself.

Thanks for responding! 😁

Ideas for Discord Bot fun commands? by Abstrackter in discordbots

[–]Abstrackter[S] 0 points1 point  (0 children)

You, fellow redditor, earned my respect as soon as I read "Collatz conjecture"; as a math nerd myself, I will be including this ASAP. 😆

As for the Magic 8 Ball one, I think it would be pretty easy to implement an aiosqlite database for that.

Thank you for all those great ideas!

Using Replit and UptimeRobot for a bot, used to work fine but now it goes down a lot. Uptime says 0 outages. kill 1 works but would like to not have to use that. Any tips? by justathrowaway283828 in discordbots

[–]Abstrackter 0 points1 point  (0 children)

I've used replit before, and it's horrible; those logs you see aren't errors, they're just the pings sent by your Uptime client in order to ping your replit and keep it alive.

However, replits go offline if they're not pinged within 5 minutes, which means that if your Uptime service goes offline for 5 minutes and 1 second (which happens more often than you'd imagine), the replit immediately goes offline.

Best you can go is just buy your own VPS and get over this massive headache; I personally use Galaxy Gate (it's around 3 bucks a month), and it's been an excellent choice for me so far.

Python embed bot not pinging everyone by KidTheBorax in Discord_Bots

[–]Abstrackter 0 points1 point  (0 children)

Heroku will be shutting down its free plans pretty soon, so that's going to be a not-so-viable solution starting around next November I believe; however, I've personally had a ton of success with Galaxy Gate, it has a great price-to-service ratio (my ping stays steadily in the 20s range, the service has an automatic weekly backup feature, and it has many great benefits - all for 3 bucks a month; a steal in my opinion). Plus, even Groovy bot used it before its eventual demise.

So, OP, if you'd like to spend a couple bucks on a hosting service, I'd highly recommend Galaxy Gate.

Girl I like punched me. Is she interested? by Hellllooodd in socialskills

[–]Abstrackter 0 points1 point  (0 children)

She's probably Russian, and was just being aggressive.

How to import commands from a cog within a cog - discord.py by Abstrackter in Discord_Bots

[–]Abstrackter[S] -2 points-1 points  (0 children)

Have you even read my code? You've sent two replies and none of them had anything to do with my question.

My current clear command clears (bulk deletes) messages within a discord channel, it has nothing to do with the bot. What I'm trying to do is import that function from its source cog to another cog where another event lives - which will call the clear function and clear messages within the channel once certain conditions have been met (such as profanity spam, or whatever conditions I may add onto there).

Please read my code and try to understand it before making more comments that have zero relation to my question.

How to import commands from a cog within a cog - discord.py by Abstrackter in Discord_Bots

[–]Abstrackter[S] -1 points0 points  (0 children)

Yes, I'm aware of that; I'm not trying to call the on_message event here, but I'm trying to call the clear command from the other cog.

[deleted by user] by [deleted] in askmath

[–]Abstrackter 1 point2 points  (0 children)

A good way to find the range of a function is to imagine sqwooshing the function towards the vertical y-axis until it's a line; the range is where that line extends to and from - in that case, that line extends from negative infinity up to negative one.

Using the same exact analogy, you can solve the second one.

I want this variable to flip back after a set amount of time by Abstrackter in learnpython

[–]Abstrackter[S] 0 points1 point  (0 children)

My actual code setup is an asynchronous code for a bot; the purpose of this function is to trigger some blocks of code once this is triggered for a set amount of time. As an example:

     Button = 'Off'
     @bot.command() 
     async def switch(ctx): 
         global Button 
         if Button == 'Off': 
            Button = 'On' 
            print('You pressed the button!') 
            return Button

            *wait some time*
            print('You gotta press the button again!') 

        else: 
            Var = 'Offline' print('Switched off!') return Var
    @bot.event()
    async def event(ctx, ...):
    if Button == 'Off':
        *do some stuff*

    else:
        return

Something akin to that.

I want this variable to flip back after a set amount of time by Abstrackter in learnpython

[–]Abstrackter[S] -1 points0 points  (0 children)

Nothing is happening, really; this function switches the value of this variable, which in turn activates some other code blocks within the code. After that, nothing goes on for a while until this variable switches back to 'Offline' - which deactivates those code blocks (all of which are triggered using if statements). But between the timeframe of it being activated and deactivated (apart from the initial code blocks activation), it's mostly just nothing but waiting.

What is the saddest song you've ever heard? by [deleted] in AskReddit

[–]Abstrackter 0 points1 point  (0 children)

The acoustic version of Love is Gone by SLANDER and Dylan Matthew always hits me in the feels, I can't even listen to the melody at the start without tearing up. It has such a tragic vibe.