#development

1 messages Ā· Page 1980 of 1

spark flint
#

ban --> wait X time --> unban

simple stump
#

šŸ‘

sudden geyser
#

a softban is only useful for clearing messages or getting systems to register as a ban

quartz kindle
#

you're supposed to use actual env variables, not env files

#

i mean, you can use env files, but you're gonna use the env file with docker, not with node

jovial nexus
#

Thanks!

silver perch
#

What happen?

lament rock
#

The bot has code grant setting turned on and cannot be invited

quartz kindle
#

is there any better way to create flags with slash commands other than the boolean option lol

#

its feels clunky af

#

instead of
/mycommand
/mycommand --do_thing
you have to do
/mycommand do_thing: True

crimson vapor
#

It seems even more clunky but you could add a flags option as a string
/mycommand flags: ā€œā€”do_thingā€

quartz kindle
#

yeah i already have that under a separate command

#

i have an entire command to execute old style commands

#

i have 20 different options, and like 15 of them use autocomplete lmao

#

i wish discord cached autocomplete responses

#

so i dont have to answer every single one of them

strong tundra
#

can anyone spot anything wrong with this

spark flint
#

yeah

#

you haven't shared code pain

strong tundra
#

the private key and client key are freely available xD

split hazel
#

please bro

#

restore my faith

#

tell me the tokens are fake 😭

strong tundra
#

theyre real

split hazel
#

say less

#

anyways

#

so uh what are you trying to do

strong tundra
#

im trying to sign something and it wont work

#

legitimately not sure what im doing wrong

#

if i can't get anything to work ill try a oauth library after this

split hazel
#

i dont think its gonna work at all

split hazel
#

idk rust bro

#

but just so you know the url https://api.oauth.lib/core/authenticate does not work

strong tundra
#

likely obvious

wheat mesa
strong tundra
#

i changed it to avoid copyright takedown dmca strike

#

:))))

split hazel
#

bruh

strong tundra
#

nah this should work across multiple sites

split hazel
#

so you are doing signing via cryptography right

strong tundra
#

yes?

split hazel
#

so what doesnt work

sudden geyser
#

Imo they should just reform the UI for the Boolean option

strong tundra
#

idk

#

it says my signature is wrong

sudden geyser
#

Don't give the user an option to say yes/no if it's not required

strong tundra
wheat mesa
#

You could possibly have a string option of args and have autocomplete options for args

#

Would be clunky but at least a little less clunky

sudden geyser
#

But then you have to consider options that may invert an option enabled by default

#

Which sucks

quartz kindle
#

i dont thing you can directly create a modal with a slash ommand

wheat mesa
#

Responding to slash commands too

#

Yes you can

quartz kindle
#

oh can you?

boreal iron
#

Or a checkbox might be an option which doesn’t exist and will probably be horrible on mobile

wheat mesa
#

Yup

sudden geyser
#

An entire modal so you can say yes sounds much more clunky

wheat mesa
#

just an idea ĀÆ_(惄)_/ĀÆ

boreal iron
#

Does the abort button on the modal trigger an event, too?

#

Asking for a friend KEKW

quartz kindle
split hazel
#

do stolen credit cards work on discord

#

asking for a friend

quartz kindle
#

yeah you cant call up a modal directly, you can only open it as a response

boreal iron
#

lmao

wheat mesa
#

I mean I have a command for editing a tag which you submit a name within the slash command and then a modal pops up for editing parts of that tag

#

I don’t know if that applies to your situation at all but maybe it helps

#

Modals need more features tho mmulu

quartz kindle
#

i have other uses for modals, ie clicking a button and using the modal to type a name to save

wheat mesa
#

Creative

boreal iron
#

Or for example hammer a slash command with choices, then open a modal

quartz kindle
#

can a modal be created with prefilled or readonly data?

boreal iron
#

As for setting the bot configuration

wheat mesa
#

That would be cool though

quartz kindle
#

it would be great for my use case if i could click a button and popup a read only modal explaining stuff

boreal iron
#

I read it somewhere

wheat mesa
#

Is there?

#

Lemme look rq

#

Oh there is

boreal iron
#

There you go

#

The question remains If that will be send with the interaction

#

If the user doesn’t type anything

wheat mesa
#

I’m testing rn I’ll check

quartz kindle
#

i have another dillema now

wheat mesa
#

Nope

#

Unfortunately it’s just a grayed out background text

quartz kindle
#

my old style command has 3 types of input, and an option to combine any of those 3 types with a second version of any of those types

boreal iron
#

Ah okay

wheat mesa
quartz kindle
#

i have no idea how to translate this to slash commands

#

it would be great of suboptions existed

boreal iron
quartz kindle
#

i'll explain

#

old style:
now
date + time
date + time + location
name

anyoftheabove + anyoftheabove

#

example i could do date + time + date2 + time2

boreal iron
#

A like to pass multiple date-time-locations

quartz kindle
#

yeah

#

and they are like, self contained

boreal iron
#

Hmm I guess the will have to run the command each time

quartz kindle
#

i guess i could do several subcommand types

boreal iron
#

As a dynamic amount of parameters or options doesn’t exist

quartz kindle
#

something like /command from-date-plus-name or /command from-date-plus-date

#

and give the second one a date2 time2 location2 options

boreal iron
#

Or still set the options date, time and location as optional and pass multiple values split by comma

#

time: 1,3,3,4 date: 9,8,7;6 …

quartz kindle
#

that would be a good idea, but i dont think people will find it intuitive

boreal iron
#

Yeah users are dumb

quartz kindle
#

also

#

discord date picker input when

boreal iron
#

I guess they will have to run the command each time then

#

Might be the best

quartz kindle
#

no i cant make it two commands

boreal iron
#

Or or or

#

An idea

quartz kindle
#

the output needs both inputs

boreal iron
#

A good idea tbh

#

Wait for it

#

Enter a slash command, open a modal with your time, date, location fields, when sending the modal respond with a ephemeral message, with a component (button) - click here to enter one more, click opens next modal

#

Disable the button after some time

quartz kindle
#

hahaha

#

can you chain modals?

boreal iron
#

That doesn’t require to enter the command

#

Of course, read carefully

quartz kindle
#

apparently you cant

boreal iron
#

Sending the modal -> message response with a button -> clicking the button for one more submit -> open modal

quartz kindle
#

another clunky thing

boreal iron
#

FFS read what I wrote

quartz kindle
#

open modal -> type name to save -> submit -> name already exists please type a different name -> user has to click the modal again instead of it opening automatically

boreal iron
#

Hmm can you use autocomplete in modals?

quartz kindle
#

xdoubt

#

wait.. can you?

boreal iron
#

Can you validate the fields anyhow without hitting send modal?

quartz kindle
#

idk tbh

boreal iron
#

I mean autocomplete would be the thing

#

Entering the username which already exists, the user can’t select anything in the field

quartz kindle
#

yeah

#

i use autocomplete for like 15 options

earnest phoenix
#

Hello.
I would like to get help on how to make the following :

I am making a discord club, and I want to make a bot, and I want to people to say somethibg like x!login" and they will get a Discord Oauth2 link, after they accepted that, the bot will add them a speacial role and will let the user use more than 1 command an not just "x!login"

I would really appreciate your help, i already searched the web but nothing...

quartz kindle
#

but its nicer if the user can save by clicking a button

#

does textinput component exists outside a modal?

boreal iron
#

I agree that’s why I said instead of entering your command multiple times to send the inputs (date, time, etc) you could send a message with a button the user can press, asking in the message if he wants to send another one

boreal iron
quartz kindle
#

idk

boreal iron
#

There’s nothing the user can interact with other than entering stuff in the this chat box

#

Are modals on mobile discord useable?

quartz kindle
#

no idea

#

never used them

boreal iron
#

Man I have not time to test things ffs

quartz kindle
#

i have time but have no patience

boreal iron
#

I’m close to register one test command via eval on mobile while driving

boreal iron
quartz kindle
#

@_@

#

another thing discord is missing

#

dynamic choices

wheat mesa
#

Seems usable to me

quartz kindle
#

same as autocomplete but only 1 time

wheat mesa
#

(iOS)

boreal iron
boreal iron
quartz kindle
#

yes but autocomplete spams you with events for every single character the user types

#

a dynamic choice would do things like get the author in the db and give him a set of choices tailored for him, and would be fixed no matter what the user types

#

and wont spam you with events

wheat mesa
#

not sure how dropdown menus work, but is that possible with dropdown menus?

quartz kindle
#

yes

boreal iron
quartz kindle
#

but dropdowns need to be sent as a response first

quartz kindle
#

useless traffic

#

lmao

boreal iron
#

Who ducking cares about traffic my gosh

vivid fulcrum
#

couldn't they have implemented just

#

simple debouncing

#

even clientside is enough

boreal iron
#

STOP FUCKING CHANGE MY FUXK TO DUXK

#

ffs auto correct shit

quartz kindle
#

duckduckgogo

#

also why choices limited to 25 ffs

boreal iron
quartz kindle
#

i have an option with 40 choices

boreal iron
#

Err just to make something sure I said before

#

Autocomplete can be required field?

quartz kindle
#

i think so?

boreal iron
#

If you don’t give the user an option to select he can’t end the input?

quartz kindle
#

pretty sure the user does not need to select one of your autocomplete options

#

they can type whatever they want

boreal iron
#

Uhh what

#

Tf

quartz kindle
#

same as everywhere else

#

like google search

#

they give you autocompletes, but eventually they have nothing else to give you

#

you can still submit your crazy ass query

boreal iron
#

Then an option would make sense to force the user to choose something you show

#

If you show nothing then ht can’t validate the field

#

Wtf

#

I’m Tim now

quartz kindle
#

WTF

boreal iron
#

lmao

quartz kindle
#

lmfao

boreal iron
#

I like how Discord ducks itself up

#

OMG IT HAPLEND AGAIN

quartz kindle
#

duckduckgo

#

gogo power rangers

boreal iron
#

Stop triggering me

quartz kindle
#

#triggered

boreal iron
#

after knowing now you can’t enforce your autocomplete options the feature is fucking nonsense

quartz kindle
#

well, autocomplete has always been just suggestions?

boreal iron
#

It does absolutely don’t make any sense if you can’t enforce an option

quartz kindle
#

if you want to enfore an option you need to use choices

#

hence why dynamic choices would be a good thing

boreal iron
#

But it’s the perfect option to validate an user input dynamically in your backend before sending the command

quartz kindle
#

wanna make a post about it on the discord dev github?

boreal iron
#

Not even sure if my GitHub account still exists freerealestate

quartz kindle
#

lmao

boreal iron
#

Or if anybody would care or read it

#

I doubt discord gives a fuxk

#

Brb

lyric mountain
wheat mesa
#

multithreading was a bad idea

#

but 1.9 fucking BILLION iterations in under a minute is impressive

#

considering my code is probably extremely poorly optimized

boreal iron
#

Wtf

#

Do you only have 4GB RAM?

wheat mesa
#

I have 16

#

i have other processes running in the background

boreal iron
#

They must be ram hungry

wheat mesa
#

discord

#

chrome

#

etc

boreal iron
#

Huh on one system?

carmine summit
#

hello! Im getting data from an api and I want to send it into a channel, but when I send it to a channel, the \n doesnt really make a newline.

boreal iron
wheat mesa
#

a lot of the ram usage is probably just windows bloat tbh

#

rn I have clion spotify and discord open

#

together those take around 2gb of ram being generous

wheat mesa
#

and I'm sitting at 6.7gb ram usage

#

so a lot is definitely from windows

quartz kindle
#

discord api v10 is already a thing lul

carmine summit
quartz kindle
#

why / lmao

carmine summit
#

wait fuck i messed up

wheat mesa
#

20b iterations in about 8.5 mins

#

that's pretty good

boreal iron
#

Yeah an escape char as I said

quartz kindle
#

what are you iterating?

wheat mesa
#

creating random strings of the same length of a string I input on multiple threads

boreal iron
wheat mesa
#

I'm using long long

#

thats good for 9.2 quintillion so no worries on that end

quartz kindle
#

xD

boreal iron
#

you mean 9.2 googleion

quartz kindle
#

googolplexianth

wheat mesa
#
void MonkeyTypewriter::launch_threads(int count, const std::string &str, std::atomic<long long>& count_var) {
    std::vector<std::thread> threads;
    std::atomic<bool> found(false);
    std::atomic<bool> ready(false);
    for(int i = 0; i < count; ++i) {
        std::cout << "Thread #" << i << " Spawning\n";
        threads.emplace_back(std::thread([&str, &count_var, &found, &ready] {
                                 while(!ready) { std::this_thread::yield(); }
                                 std::string s;
                                 MonkeyTypewriter mt(str);
                                 do {
                                     s = mt.generate();
                                     // std::cout << "String generated from thread " << std::this_thread::get_id() << ": " << s << "\n";
                                     ++count_var;
                                 } while(s != str && !found.load());
                                 found.store(true);
                             })
        );
    }
    ready = true;
    for(auto& thread : threads) {
        thread.join();
    }
``` this is basically what I'm doing
quartz kindle
#

thats an actual number

wheat mesa
#

probably horrendous but still

#
std::string MonkeyTypewriter::generate() {
    std::string s;
    for(int i = 0; i < search_str.length(); ++i) {
        unsigned char c = intRand(97, 122);
        s += c;
    }
    return s;
}
``` that's how I generate
boreal iron
#

Also long doesn’t exist you devil, it’s called bigint

carmine summit
wheat mesa
#

tbh this could all be static and eliminate the need for objects

carmine summit
#

nope

wheat mesa
#

but still

#

i'm too lazy to bother

lament rock
#

Been iterating over trying to find who tf asked.

well over a googol with 0 results in the array

#

I'm sorry, that was mean. I didn't mean it

wheat mesa
#

how many threads should I create

#

that 19b iterations one was with 12 threads

lament rock
#

Depends how fast you want it to complete

wheat mesa
#

no, I'm asking šŸ˜‰

lament rock
#

all

#

slam your cpu to make your pc unusable

boreal iron
lament rock
#

alternatively, make the code run on your gpu

#

gpus are hella parallelized

lyric mountain
carmine summit
wheat mesa
quartz kindle
#

try preallocating the string length

wheat mesa
#

it was nice knowing you cpu

#

bye bye now

#

it's so bad I can't search for anything

#

would not be surprised if my pc bluescreened

#

holy shit my keyboard colors just froze

#

LMFAO

quartz kindle
#

lmfao

lament rock
#

happens

wheat mesa
#

they're going in 5 fps

lyric mountain
#

5? too much

wheat mesa
#

wait holy shit that was fast

lyric mountain
#

gotta aim for 1 fpm

wheat mesa
#

oh nvm

#

I got lucky

#

1.9b iterations to find a 7 letter word

#

thought it was 19b in 43 seconds

boreal iron
carmine summit
boreal iron
#

text = text + ```\n" …

#

Doesn’t make any sense but try it

carmine summit
#

uh ok

boreal iron
#

Horrible to type on mobile

#

As you have to escape each of these special chars changing they keyboard each time

carmine summit
wheat mesa
#

I kinda wanna do more stuff with multithreading on c++

boreal iron
#

I’m pretty sure it has to do with how you send it to the api

#

Can’t be anything else tho

quartz kindle
boreal iron
#

Just show how you send text to the api

wheat mesa
carmine summit
#

it cant be it because the api response with \ns

quartz kindle
#

make a template function and give it a char array with N+1 size

carmine summit
#

i might need to actually parse it but dont know how

quartz kindle
#

and get rid of std:string

boreal iron
quartz kindle
#

actually no you cant use templates for this, but you can use a gradual fixed sized array for specific thresholds

carmine summit
#

Feb.10,2022\r\nMagandang this is what says when I log the text

#

I did double the backslashes but it doesnt seem to work

#

or maybe it is already doubled

boreal iron
#

Why \r\n

#

Are we speaking about discord or Windows line breaks in a file?

#

Do we actually speak about the discord api?

split hazel
carmine summit
#

should it not be there?

#

ima try to remove it

carmine summit
boreal iron
#

Hello?

#

Do we actually speak about the discord api?

lyric mountain
#

100% a windows thing

#

keeping it will do nothing, just need to escape it

quartz kindle
#

how about you show your code?

boreal iron
#

Already asked for it

#

Still don’t even know if he’s speaking about the discord api KEKW

carmine summit
#

Feb.10,2022\\r\\nMagandang

boreal iron
#

Yeah what I assumed

carmine summit
#

how do I fix that

boreal iron
#

So that random API code does escape the escape character

carmine summit
#

replace doesnt seem to work

lyric mountain
#

You need to replace \\\\n

carmine summit
#

ok but why triple

lyric mountain
#

Cuz discord escapes

#

So I had to type 8

carmine summit
#

.replace(/\\\\/g, "\\")

#

what

lyric mountain
#

No

#

It's 4 backslashes cuz u need to replace the escaped escape

carmine summit
#

yeah its 4 backslashes

lyric mountain
#

So you need to escape the escape that escapes the escape

carmine summit
#

i already excaped the escape that escapes the escape

lyric mountain
#

AND include the letter

#

Then replace it with \n

#

To make a newline

carmine summit
#

wait

lyric mountain
#

\n

#

Not \\n

#

Else u end up with the same thing

carmine summit
#

```.replace(/\\(n|r)/g, "\n")``

#

still nope

carmine summit
#

is there any way to log the raw raw text

lyric mountain
#

Define raw

carmine summit
#

raw raw

lyric mountain
#

What is raw

boreal iron
#

How do you send your stuff to the API?

#

json stringifying your Text?

lyric mountain
#

Tf that amount of headers

boreal iron
#

I need a bigger mobile screen

lyric mountain
#

Did the api owner never heard of "request payload"?

#

Like fuckin hell use body

carmine summit
#

well i just copied it from chrome dev tools and if i modify it it might not work

lyric mountain
#

Oh, well

#

Also that request being POST is weird since body is a querystring that doesn't have any sensitive data

#

But well, weird webdevs

carmine summit
#
const getActivities = async (session) => {
  let r = await fetch("https://api.com/oa_school/dashboard/get_calendar", {
    headers: {
      "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
      "x-requested-with": "XMLHttpRequest",
      cookie: `ci_session=${session}`,
    },
    body: "f=get_merged",
    method: "POST",
  });
  return r;
};
```well I managed to shorten it without breaking it
wheat mesa
#

Been running my more optimized version for about 7 or 8 minutes now and it hasn’t finished mmulu

#

This better be like 40b iterations

boreal iron
carmine summit
#

eh?

boreal iron
#

Saying it Trivial, if they replace any \ by \\ then you can’t get a different response

carmine summit
#

how do i replace \\ with \

boreal iron
#

You never said where this response is going to

carmine summit
boreal iron
#

Ok

#

So you actually get text with escaped line breaks from the API and send it to Discord

#

(I mean to the Discord API - t your channel)

carmine summit
boreal iron
#

Do you do your own discord api call or do you use a lib, like djs?

carmine summit
#

djs

boreal iron
#

so at the end it’s channel.send(text) ?

carmine summit
#

yeah

boreal iron
#

What does console log text shows here?

carmine summit
boreal iron
#

Brb

carmine summit
#

heres a fragment

#

its inside a codeblock

#
but
I
should
be
able
to
do
it
just
fine```
boreal iron
#

Is that really what you see in the console?

#

Or did Discord already escape things here

#

Wrap special chars in code tags. Always

carmine summit
boreal iron
#

It’s happening again

#

I did write brb not u

#

lmao

carmine summit
boreal iron
#

That’s the console log of your text?

carmine summit
#

yeah

#

a fragment

boreal iron
#

One second

wheat mesa
#

If this helps, windows uses \r\n for linebreaks, and Linux only uses \n

#

No idea if that’s anything related to your issue but still

boreal iron
#

The API accepts both as line breaks

lyric mountain
#

@unkempt ocean

wheat mesa
#

@rustic nova

#

Whoops

rustic nova
#

Thank

lyric mountain
#

Damn

boreal iron
#

Ok pinged more than one mod

carmine summit
#

just added message intents and logged it....

boreal iron
#

Ban please for both

lyric mountain
#

Replace escaped escapes with common escapes

#

replace(/\\\\([nr])/g, "\$1")

boreal iron
carmine summit
boreal iron
#

In code tags?

carmine summit
boreal iron
#

code tags

carmine summit
#

wdym

boreal iron
#

Wtf

carmine summit
#

wtf?

boreal iron
#

is your text in code tags
Or outside

carmine summit
#

inside

boreal iron
#

Yeah it is actually shown as code block or does discord also escape your `

carmine summit
#

it should be fine, I tested with actual \n and \r and works

carmine summit
boreal iron
#

You tested it in your discord client m, right ?

carmine summit
#

but the \n doesnt show up as a newline

boreal iron
#

It does automatically escape the chars

#

Now show me the full text string

carmine summit
#
    text = "";

    if (addedActivities.length != 0) {
      text = `${text}**Added Activities:**\n`;
      addedActivities.forEach((act) => {
        text = `${text}\`\`\`\n${act.type}\n${act.title}\n${act.post.replace(/\\\\([nr])/g, "$1")}\nDeadline: ${act.is_anytime || act.end}\`\`\``;
      });
    }

    if (removedActivities.length != 0) {
      text = `${text}**Removed Activities:**\n`;
      removedActivities.forEach((act) => {
        text = `${text}\`\`\`\n${act.type}\n${act.title}\n${act.post.replace(/\\\\([nr])/g, "$1")}\nDeadline: ${act.is_anytime || act.end}\`\`\``;
      });
    }

    if (activities.length != 0) {
      text = `${text}**Ongoing Activities:**\n`;
      activities.forEach((act) => {
        text = `${text}\`\`\`\n${act.type}\n${act.title}\n${act.post.replace(/\\\\([nr])/g, "$1")}\nDeadline: ${act.is_anytime || act.end}\`\`\``;
      });
    }

    console.log(activities);
    console.log(text);
    client.channels.cache.get(notificationChannel).send(text);
steel arch
#

**`client.on('message', async (message) => {
if (message.author.bot) return;

const messageArray = message.content.split(/ +/g);
const cmd = messageArray[0];
const args = messageArray.slice(2);

const snekfetch = require("snekfetch");
const fs = require("fs");
module.exports = {
"snekfetch": snekfetch,
"fs": fs
};
const prefix = 'fox';

  const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
  for (const file of commandFiles) {
    const command = require('./commands/${file}');
    client.commands.set(command.name, command);
  }
  const commandfile = client.commands.get(cmd.slice(prefix.length).toString().toLowerCase());
  if (!message.content.startsWith(prefix)) return;
  if (commandfile) {
  commandfile.run(client, message, args);

  }

})`**

Hello guys! So i want to be able to put a space between prefix and the command is that possible in here?!

steel arch
#

That doesnt work

carmine summit
#

if (message.content.startsWith("fox "))

steel arch
#

Is the same thing

carmine summit
#

nope

boreal iron
#

Wanna see something

#

Ignore the deadline line right now

carmine summit
#

or just the

boreal iron
#

Nope just your app post var

#

But remove it of your template strings

#

As I said

carmine summit
#

using ` or '?

#

should I remove the codeblcoks

boreal iron
#

No, just remove your app.post var of your text template string and add a line text += app.post after it

carmine summit
#

wdym

boreal iron
carmine summit
#
    if (activities.length != 0) {
      text = `${text}**Ongoing Activities:**\n`;
      activities.forEach((act) => {
        text += act.post;
      });
    }
boreal iron
#

Wtf

#

Now let’s try trivial

#

app.post.replaceAll("\r\n", "\n");

carmine summit
#

it doesnt replace

boreal iron
#

Aha there we go

carmine summit
#

when its doubled it does replace

#

and it newlines

boreal iron
#

Oops

#

Next try

#

app.post.replaceAll("\\r\\n", "\n");

carmine summit
#

it works

#

dunno why it didnt work last time

#

but if it works it works

boreal iron
#

This one works?

carmine summit
#

yep

boreal iron
#

Ok now wrap it in your template string again with this replaceAll method for app.post

#

Does it still work?

lyric mountain
boreal iron
#

Shh it works

#

That all what matters

#

Also I hate the fucking discord client an it’s stupid escape behavior

#

They never heard of encoding I guess

#

or escaping

#

\

#

\discord\nsucks\nhard

#

smh

sudden geyser
boreal iron
#

wdym by solving?

#

Can’t actually see the whole site on mobile :P

sudden geyser
#

looks like this

#

enter a password, get some hints

austere surge
#

woat

lyric mountain
#

Is that a community bruteforce method?

#

Also where are the difficulty levels

#

Need to start at sha1

boreal iron
#

I’m already running a 800GB rainbow database with different hash values and their original unhashed string

#

Don’t wanna start another one

lyric mountain
#

You will start another won't you?

boreal iron
#

Shut up! Don’t ! I can’t resist … arg

#

I don’t wanna waste all my available space for databases my gosh

#

Generating the existing one took almost 13 days

boreal iron
#

Of course it is

#

It will just take forever

austere surge
#

i guess

lyric mountain
#

Or a metric fuckton of luck

austere surge
#

or a cheat somehow

lyric mountain
#

I mean, that's a git page so there has to be a hardcoded string on the repo

austere surge
#

possibly randomly generated on page load

lyric mountain
#

It uses common rng

#

Can be found if u manage to extract the seed

#

Just need to both open the page and generate a random value at the same time

boreal iron
#

lol if you know the possible chars and length it’s not hard

lyric mountain
#

Also 7 letters and 7 numbers

#

That leaves us with 26^7 + 10^7 combinations

#

Plus you can ignore combos that don't match the correct hash characters

#

Know what, now I'm interested in making an algo for that

boreal iron
#

Pff a good cpu will throw out the result@real@quick

#

Wtf

lyric mountain
#

Jokes aside, it will

boreal iron
#

This screen

lyric mountain
#

Less than a trillion? No prob

#

Oh wait, there's punctuation too

#

Still no prob

#

Also idk if I'm missing something, but I don't see him shuffling the pass

sudden geyser
#

omg guys look

boreal iron
#

Maybe does in the arrow expression

sudden geyser
#

I can't figure out how inspect element works

austere surge
sudden geyser
#

think smart not hard

austere surge
#

im tryna figure out how to get the password

lyric mountain
boreal iron
#

How can you have time to do shit like that?

lyric mountain
#

He doest shuffle after tgat

austere surge
#

im not very good at this so im not really making any progress

boreal iron
#

My day would actually need 72h

lyric mountain
#

I'll defo make an algo to crack that

#

If you have the target hash it ain't hard at all

boreal iron
#

Guess why I’m running a rainbow table freerealestate

#

I also have the unhashed value

#

Which makes me cheat, ha

lyric mountain
#

Cheetah

quartz kindle
boreal iron
#

Tim you’re too old

sudden geyser
#

victory

lyric mountain
#

But with hash

boreal iron
#

First encryption Tim knows was the one with replacing one char in any word be another char

#

Poor old ass

austere surge
#

i think i figured it out

lyric mountain
#

The target word is a 14-length word, with letters, numbers and punctuation

lyric mountain
austere surge
#

awe

sudden geyser
#

if you keep using breakpoints you can find the actual value

#

unhashed

austere surge
#

im not very good at this

quartz kindle
#

i still dont get it

#

lmao

lyric mountain
#

Tim

sudden geyser
#

tim man

lyric mountain
#

Hangman

sudden geyser
#

enter some value in the textbox

#

get hints

lyric mountain
#

Hangman with sha256

sudden geyser
#

or hangman yeah

boreal iron
lyric mountain
#

Nothing intricate

quartz kindle
#

hits for what? trying to guess the password you wrote in?

lyric mountain
#

No

#

You are guessing the random generated shit

sudden geyser
#

basically, the site generates a random password

#

and it's your job to figure out what that password was

#

it'll give you hints in the form of a sha 256 hash of the generated password

quartz kindle
#

oh there is already a password in there? besides the text input?

lyric mountain
#

Yes

sudden geyser
#

the text input is your guess

lyric mountain
#

When you load the page it generates a new random string

quartz kindle
#

ah lol

lyric mountain
#

With length 14

quartz kindle
#

that wasnt explained anywhere so i was completely lost

boreal iron
#

Give up Tim

#

Those young guys are weird

#

Having time to solve puzzles

#

Instead of working in mines

quartz kindle
#

but can you even guess it with sha256 hints like that? is sha256 that predictable?

#

or are you just trying to guess the hash

lyric mountain
#

When you have the source pool, generation method, the length and the final hash

quartz kindle
#

and not the actual password

lyric mountain
#

Yes, you can quite predict it

austere surge
#

got it

lyric mountain
#

Make a gif

#

To prove u didn't use inspect

boreal iron
#

sv_cheats 0

boreal iron
#

May I ask you about the next lottery combination?

austere surge
#

no :)

boreal iron
#

That’s egoistic

#

How dare you

quartz kindle
#

hi i come from the future

austere surge
#

now you come from the past

quartz kindle
#

the next winning lottery number is 3746832

austere surge
#

ok

boreal iron
quartz kindle
#

i am in bed

boreal iron
#

Or no internet time for you tomorrow

quartz kindle
#

just not sleeping yet

boreal iron
#

Fuck let me google what to do next

austere surge
#

lmao

quartz kindle
boreal iron
#

lmao "5 steps to get unstuck"

austere surge
#

"i dont know what to do with my life!"

austere surge
earnest phoenix
boreal iron
# quartz kindle

Does google intentionally show pills for you right of the search bar?

#

At least it looks like pills for me

quartz kindle
#

apparently its because this

austere surge
#

interesing

#

i see nothing

boreal iron
#

Ah damn if that would be caused by your search string I would have laughed my ass off

austere surge
#

yes

quartz kindle
#

exdee

boreal iron
#

Ok I see

#

You’re very tired

#

Sleep now

austere surge
#

i feel like this channel has become quite off topic

boreal iron
#

Nope it’s development and more

austere surge
#

ok

boreal iron
#

aka development++

#

Alright time for a shower and to sleep, too

austere surge
#

ok

boreal iron
#

And stop talking to Tim

#

He’s not allowed to use the internet today as he doesn’t follow the rules

quartz kindle
#

uvuvwevwevwe onyetenyevwe ugwemubwem ossas

boreal iron
#

Quiet!

quartz kindle
#

you know what grinds my gears? people who dont know when to use quiet and quite

#

:^)

bright thorn
#

I mentioned all things but they rejected

quartz kindle
#

not you tho, you used it correctly

bright thorn
#

Can anyone tell me how can i approach hin to give intent

boreal iron
quartz kindle
#

why do you need the intent?

bright thorn
#

For message command

quartz kindle
#

what message command?

bright thorn
#

Like i want keep continue with message commands not slash also i have slash

quartz kindle
#

you cant

boreal iron
#

That’s no valid reason, lol

quartz kindle
#

they already made it clear that they will not give people the intent only because they want to continue using normal commands

bright thorn
#

Then what can i do

quartz kindle
#

use slash commands

#

or use bot mention

austere surge
#

you can give them an "acceptable" reason to give you the intent

quartz kindle
#

if the bot is mentioned, you can still use normal commands without the intent

austere surge
#

really?

quartz kindle
#

yes

austere surge
#

interesting

boreal iron
#

Yeah as well as dm’s

bright thorn
#

No can you guys tell me some valid reason

austere surge
#

my bot is >100 message commands and i really dont wanna switch ;-;

quartz kindle
austere surge
quartz kindle
#

like automod

#

autotranslation

#

etc

bright thorn
#

Okay and for music bot?

austere surge
#

probably nothing

bright thorn
#

Setup channel?

austere surge
#

shouldnt be hard to switch to slash cmds in a music bot

boreal iron
#

It’s not just enough to lie to discord about the reason, you will at the end getting banned for it

#

Any and I mean any commands can be executed as slash commands

#

Only if the bot has to watch all message for security reasons it needs the intent

#

There literally no other reason

austere surge
#

do slash commands support inline text input

quartz kindle
#

basically, your bot needs the message intent if you have a feature that absolutely needs to watch peoples' normal messages without having to be commands

errant dragon
#

wait discords removing the ability to have a prefixed command?

quartz kindle
#

yes

errant dragon
#

dang

boreal iron
#

No

errant dragon
#

im not sure how to fix this

bright thorn
#

Yeah i need because we have music request channel

boreal iron
#

A mention is still a prefix

errant dragon
#

discord.py doesnt support slash commands and the repos dead

austere surge
quartz kindle
austere surge
quartz kindle
#

i mean

#

wdym by inline text input exactly?

boreal iron
#

They support lots of possible parameter types

#

Or in this case argument types

austere surge
sudden geyser
quartz kindle
#

you mean multiline?

sudden geyser
#

Or just use mentions

boreal iron
#

Strings, numbers, booleans, time date picker (soon)

austere surge
sudden geyser
#

yeah that's cool and all but give us variadic arguments already

quartz kindle
#

for multiline you will probably need to use modal

errant dragon
boreal iron
errant dragon
#

ill have to see how thats done

bright thorn
#

Or i want to know any support in djs to follow a announce channel by command

errant dragon
#

ill be back later

austere surge
#

i use a string option and replace \n in it with a newline

boreal iron
errant dragon
#

i joined because im getting a tag ug on top.gg

#

bug

quartz kindle
boreal iron
#

One second

boreal iron
#

There you go multiline support

austere surge
#

how

boreal iron
#

But the new line will not threated as space

quartz kindle
#

mobile?

#

lel

boreal iron
#

It doesn’t show the new line belongs to the string

#

But when sending it does

boreal iron
quartz kindle
#

mobile sux

#

:^)

boreal iron
#

Yeah

austere surge
#

yes

quartz kindle
#

also

#

android has issues with modals apparently

boreal iron
#

It’s probably not being threated as line break

austere surge
#

so is there a solution to the multiline other than what im currently doing ||\n||

boreal iron
#

CTRL + enter doesn’t work, too?

austere surge
#

i tried ctrl, alt, and shift

#

alt sends the command

#

ctrl and shift do nothing

#

is it possibly because there is other arguments after it

sudden geyser
#

It's not possible right now.

austere surge
#

sad

sudden geyser
#

You could use modals, but those are bulky.

austere surge
#

dk what that is

sudden geyser
#

Basically forms

austere surge
#

ok

boreal iron
#

Aka as popup

austere surge
#

im gonna stick to typing out \n then

boreal iron
#

How should the UI look like for a multiline string argument in the middle of other arguments

sudden geyser
#

That's my reason for thinking modals exist

boreal iron
#

Also I’m still waiting for nested sub commands

#

Guess they will never come

sudden geyser
#

you have subcommand groups

boreal iron
#

smh

austere surge
sudden geyser
#

oh yeah

#

I think that's disabled

earnest phoenix
austere surge
#

epic

boreal iron
#

I wonder when this will happen

#

Probably 2030

earnest phoenix
#

A redesign was planned a while ago, although they haven't started working on it, or probably haven't published previews of it

#

There are lots of features planned

quartz kindle
#

would be great if date picker gets released before the deadline

boreal iron
#

Hmm well let’s see if anything makes it way in before may

quartz kindle
#

otherwise i'll needs a bunch of options combinatios with autocomplete to replace it

earnest phoenix
austere surge
#

cool

quartz kindle
#

variadics would also be awesome

austere surge
#

age gated commands hm

quartz kindle
#

i have a lot of autocomplete options that are basically comma separated arrays

boreal iron
#

As you can’t enforce your own options

quartz kindle
#

enforce them server side like i already do

#

duh

boreal iron
#

Imagine you need 30s to enter your command, then it says sorry bad argument

#

Try again

austere surge
#

pain

boreal iron
#

I would throw my phone away

austere surge
#

cant really copy/paste it

quartz kindle
#

your fault for not picking my autocomplete options

#

:^)

boreal iron
#

Not on mobile at least

crude totem
#

Hey have anyone implemented a reward system for people voting in python? I'm kind of lost

boreal iron
#

To match one option

earnest phoenix
#

The UX for slash-commands in the Discord mobile client is a holy fuck moment

sudden geyser
#

I'd like to use variadic arguments for variables in my tag command

quartz kindle
#

autocomplete 40+ options or choices1 + choices2?

quartz kindle
lament rock
#

I have to specify required or not in order for mobile clients to work properly

#

otherwise, the client thinks they are required

#

at least, iOS

quartz kindle
#

when you register the command?

earnest phoenix
#

The slash-commands UI bugs out and barely even works in the Android clients KEKW

quartz kindle
#

like you have to specify required:false instead of omitting the field?

boreal iron
#

Let’s pray for the UI rework Voltrex mentioned

#

Even as atheists, let’s pray this happens ā€œsoonā€

#

And let’s hope they don’t fuck the rework up, too

#

As we know it’s still Discord who’s doing it

earnest phoenix
#

It'll probably be even worse than the current one because Discordā„¢

boreal iron
#

Hmm I somehow except the same

#

Now everyone who has to live without the message intent needs to deal with the shitty possibilities you have right now just to edit anything again after this rework shit comes up

#

I like it

boreal iron
#

For modals?

quartz kindle
#

so i have to add required: false on all my 20+ options

#

.>

lament rock
#

That's just from testing on my own client a while back. I doubt things got fixed recently, but

quartz kindle
#

first day designing my slash command structure and its already 500+ lines

#

lmao

boreal iron
#

Wut? Shouldn’t false be the default value anyways?

lament rock
#

My setup is jank as fuck

lament rock
boreal iron
#

Weird, indeed

#

Hmm didn’t register required: false for my command but I’m not forced to pass the argument on my iOS client

earnest phoenix
#

True peace will be achieved when Discord's clients become consistent with each other

austere surge
#

yes

earnest phoenix
#

Although, I don't think that'll ever happen

boreal iron
#

I wanna say except a few things which are hidden on iOS it does actually look very similar to thr browser version

#

But you better don’t look under the hood

lament rock
#

syntax highlighting on mobile when

boreal iron
#

Oh yeah I hate it so much

#

I don’t see a reason why it’s not available on iOS

earnest phoenix
#

I thought they had syntax highlighting on mobile

lament rock
#

something something react native

boreal iron
earnest phoenix
#

ha lozers

boreal iron
#

Also embed field titles aren’t bold

#

For some stupid reason

#

And there’s literally no padding between a value and the next field title

#

The list of client issues is close to be as long as the list of topgg’s site issues

#

nailed it

quartz kindle
#

desktop syntax highlighting doesnt work if theres too many characters

#

lul

boreal iron
#

one more on the list but discord can’t beat topgg

sudden geyser
#

@lyric mountain java nerd

#

when do you think project loom will be out

earnest phoenix
#

never

sudden geyser
#

making me cry

lyric mountain
sudden geyser
#

you never heard of project loom?

lyric mountain
#

Don't think so

earnest phoenix
earnest phoenix
restive nacelle
#

I have a question

austere surge
#

ok

restive nacelle
#

Is a bot able to track someone's IP or like when they get banned from a server and made another account, is a bot able to know its that exact person?

austere surge
#

no

#

that would be very bad

restive nacelle
#

alright

#

If there was a bot that was able to like track down to see if that user that was banned was from the same device, how would it happen?

quartz kindle
#

not possible

wheat mesa
#

Discord hides your IP from anyone else connected to the service

restive nacelle
#

ohh alright

#

thank you!

rocky hearth
#

how can I make a channel private? and accessible by only one member

austere surge
#

dont give anyone permission :troll:

rocky hearth
#

so how I do that with permissionOverwrites? what do I set there?

earnest phoenix
rocky hearth
#

ok I see

earnest phoenix
#
<Channel>.edit({
  permissionOverwrites: [
    {ID AND DENY perms}
  ]
})
#

permissionOverwrites takes an array of objects

#

that object you can define the id of the user/role you want to allow/deny perms of

pulsar bone
#

Q1:how to fetch a message by it content in py?
Ans:?

spark flint
#

look through messages, look for if X is in Y message

#

not recommended tho

pulsar bone
carmine summit
#

how do I fetch messages by channel id and message id?

spark flint
#

what language

carmine summit
#

js

#

how do I know if message is deleted?

#

.deleted will get depre

#

cant a bot edit message older than its start time?

spark flint
#

what do you mean

#

older than its start time

carmine summit
#

like the message sent is older than the bot's startup time so it cant edit the message

#

wait nvm im so dumb

#

forgot to put await

#

how do I ping using id?

#

<@id> okeh

pearl trail
#

<@!id> cooler

carmine summit
pearl trail
#

yes

carmine summit
#

why the !?

pearl trail
#

discord said that <@> will get deprecated

carmine summit
#

what? why?

pearl trail
#

mobiles didnt use !

carmine summit
#

why not update mobile instead of nuking hundreds of code?

pearl trail
#

discordā„¢ļø

#

tho we can still use both

marble juniper
#

not like message intent is already gonna nuke entire bots

carmine summit
#

is there a limit when a bot cant edit their message other than ratelimit, perms, and message deleted?

dry imp
old cliff
#

do you know in operator is also in js?

lyric mountain
#

do you know in operator is also in groovy?

quartz kindle
#

do you know the in operator is also in your head?

pulsar bone
wheat mesa
#

Do you know I’m in your walls?

quartz kindle
#

huehuheuheuehue

#

because fuck android right?

dry imp
boreal iron
cinder patio
#

Buying a product from Apple is like joining a cult

earnest phoenix
#

Pass me my iPhone 13 pro max running iOS 17 with 8k ultra hd video and 120hz display

earnest phoenix
sudden geyser
#

There are cultists but that's not why people buy their products

#

They just like them (like me)

quartz kindle
#

smh apple worshipper

sudden geyser
#

I like my green apples

maiden dragon
#

Hello I don't understand what to put here can someone help me it's to receive the person who voted

quartz kindle
#

the address of your webhook server

cinder patio
# sudden geyser How so

Because they're selling overpriced products, and people are still buying them like crazy. It's also confirmed that Apple purposefully slows down old models. I also said that because personally I haven't seen a single person who has just one apple product. There's nothing wrong with liking apple ofc. but people who own Apple usually defend it waaaay too much, too. Just my observations.

maiden dragon
quartz kindle
sudden geyser
#

People are willing to pay the absurd extra because they like their products + it's part of their appeal for "premium"

quartz kindle
#

where is your bot hosted?

maiden dragon
sudden geyser
#

Slowing down old models is true and they've been sued to death as a result

quartz kindle
#

then it would be your pc's ip address, and the port your server is running

sudden geyser
#

But it was because they didn't notify the user in a good manner

quartz kindle
#

and you probably also need to port forward your router, because routers usually block unknown ports

cinder patio
#

Personally I wouldn't buy from a company which does that on purpose

sudden geyser
#

I agree that people defend it too much but disagree where you say it's fine to like them as a company. I think this video does a good job explaining the problem + it's not limited to Apple. https://youtu.be/_hYHwkIuEMo

Let's get Right to Repair passed! https://gofund.me/1cba2545
We repair Macbook logic boards: https://rossmanngroup.com/macbook-logic-board-repair
šŸ‘‰ The horrible truth about Apple's repeated engineering failures: https://www.youtube.com/watch?v=AUaJ8pDlxi8

šŸ‘‰ Find tools used, recording gear, repair guides, chip sources, & cryptocurrency donation ...

ā–¶ Play video
cinder patio
#

Also them making you to buy charger when you buy a new phone (if u don't have one already). What a scam. I don't get how that would help the environment, lmao. Plastic straws issue all over again

quartz kindle
#

^ that was immediately made illegal in brazil lmao

#

apple is not allowed to sell phones without chargers in brazil

#

brazil laws > us laws

#

lmao

cinder patio
#

yeah, so people still praising the company and buying all their shit is still crazy to me

sudden geyser
#

I'd rather see governments mandate usb-c rather than force Apple to include the chargers

#

That would have a much bigger impact

quartz kindle
#

a few days ago i had to replace the keyboard on an old macbook 2009

#

ever tried doing that?

#

shit is all glued together, you have to remove everything, including the motherboard, then you have to break open the glued plastic thing

sudden geyser
#

Try replacing a MacBook today

#

It's much worse

#

Everything soldered to the board

#

Small $0.50 usd component damaged? $500 repair to replace motherboard

cinder patio
#

Also! I believe Apple denies further support and service if you've ever tampered with the device, like if you've done a repair yourself

#

I also think they started suing unauthorized repair shops for repairing apple products

sudden geyser
#

They've tried in the past

#

And a few times today

#

But for the most part they don't

cinder patio
#

still scummy

#

what a scummy company

sudden geyser
#

Instead they'll just tell manufacturers to not sell the components to anyone except Apple

earnest phoenix
#

are you defending google because your username

sudden geyser
#

Which sucks balls

earnest phoenix
sudden geyser
#

I think it's best to see Apple for what it is: a soulless company that makes great products to use for consumers

cinder patio
#

Yeah I gotta say the cameras on their phones are the best ever

sudden geyser
#

I like my MacBook on macOS Monterey

cinder patio
#

but that's not enough to make me buy one

sudden geyser
#

That's fine

#

Just don't buy one

cinder patio
#

Yeah I won't

sudden geyser
#

No way I could afford to shell out $2000 for their base laptop today

cinder patio
#

Yeah, their products are good, still overpriced though

earnest phoenix
#

I love how an actual camera costs less than an iphone and still has a better camera

#

Making apps is so hard too

#

Need a macbook + 99$ a year fee + high chance of having app removed from app store

cinder patio
#

It's hard to compare them because with a camera you can use different lenses, but for quality, an iphone camera is good as any professional one

sudden geyser
#

Learning Swift + SwiftUI + all the frameworks and paradigms taught me a lot

#

But App Store does suck

#

Giant monopoly

earnest phoenix
#

2000: We put a camera in a phone!
2022: We put a phone in a camera!