#development

1 messages · Page 2056 of 1

wheat mesa
#

I think you meant to do NOT and NOT

fathom sonnet
#

ahh yea it is && not ||

pseudo spoke
#

hello How do I use the secure search feature in my music bot?

quartz kindle
#

you need to check with the music sources your bot uses

#

if you use soundcloud you have to look into the soundcloud's system for how to enable it, if they have one, or ask the soundcloud community

pseudo spoke
#

okay thanks

fathom sonnet
#

can you guys explain me what secure search actually is

quartz kindle
#

secure search or safe search is a feature present in most services that offer searching functionality, to filter out "unsafe" content like nsfw

fathom sonnet
#

tnx for the information

ancient nova
#

what is message.partial?

split hazel
#

for example if somoene reacts to a message that isnt cached it would be partial

#

and then you can call a method which would fetch that message and make it no longer partial

ancient nova
#

I see, so does it have any uses? I've just been reading some code on stack overflow about moderation logging and I came across that

#

if (message.partial) return;

solemn latch
#

So the reason you might want to return if the message is a partial is not having access to everything you need.

If you dont have partials enabled you don't really need to worry about them.

split hazel
#

youd use it to check if you need to fetch extra data or not

#

in a reactions case the message

#

dont see why youd ignore a partial message

ancient nova
#

it was place in the messageDelete event, the code was for ghost pings

#
    const settings = message.settings = getSettings(message.guild);
    if (!message.guild && settings.modLogChannel !== undefined) {
        const { members, roles, everyone } = message.mentions;
        if (members.size > 0 || roles.size > 0 || everyone) {
            const modLogChannel = settings.modLogChannel;
            const modLogChannelRegex = /^<#(\d+)>$/;

            let channelCheck, channelID;

            if (modLogChannelRegex.test(modLogChannel)) {
                channelCheck = message.guild.channels.cache.get(modLogChannel.replace(/<#(\d+)>/, "$1"));
            } else if ((channelID = modLogChannel.match(modLogChannelRegex)) !== null) {
                channelCheck = message.guild.channels.cache.get(channelID[1]);
            } else {
                channelCheck = message.guild.channels.cache.find(_ch => _ch.name.toLowerCase() === modLogChannel.toLowerCase());
            }
            if (channelCheck !== undefined) {
                const ghostPingLog = new MessageEmbed();
                ghostPingLog.setTitle("Moderation Logs");
                ghostPingLog.setDescription("GHOST PING DETECTED!");
                ghostPingLog.setColor(commandColor);
                ghostPingLog.addField("Content", message.content.slice(0, 512));
                ghostPingLog.addField("Author", message.author.tag);
                ghostPingLog.addField("Members", members.size.toString(), true);
                ghostPingLog.addField("Roles", roles.size.toString(), true);
                ghostPingLog.addField("Everyone", everyone.toString(), true);

                channelCheck.send({embeds: [ghostPingLog]});
            }
        }
    }
``` finished
#

I wasn't quite sure how to optimize it best that's why the syntax is so bad

#

any idea why ^ the above isn't working? no errors

fathom sonnet
#

i got a question, so in my idex.js file i have command which will reply on interaction if it is executed in DM, that code looks like this: ```js
client.on('interactionCreate', async (interaction) => {
const WarningEmbed = new MessageEmbed()
.setTitle('Warning!!')
.setDescription(You are not allowed to use this command here!!)
.setColor('RED')
.setTimestamp()

if(!interaction.guild) return interaction.reply({embeds: [WarningEmbed]})

}

Now, when user call slash comamnd in the dm, it will get warning message how he cant use it in DM, now, i have one command which need to be executed in dm, but idk how can i make it so it overwrite this "prevention" inside index.js

would it work if i use
```js
 if(interaction.guild) { return }
 else if(interaction.dm) { /* Do something else*/ }
#

or it should go like ```js
if(interaction.channel.type === 'dm') { /* Do something else*/ }

ancient nova
#

where tf is the documentation for events?

#

I can't find any info about roleCreate and roleDelete event????

ancient nova
#

that's typescript

#

I'm using JS

fathom sonnet
#

yea but these you have list of events but what you trying to do

ancient nova
#
            roleCreatedLog.setTitle("Moderation Logs (Action: Role Created)");
            roleCreatedLog.setColor(commandColor);
            roleCreatedLog.addField("Role Name", role.name || "No Name");
            roleCreatedLog.addField("Role Perms", rolePermissions || "No Permissions");
#

trying to look up how to get the author

#

the person who created the role

fathom sonnet
#

i dont even think that is possible

ancient nova
#

??? what

fathom sonnet
#

to check who created role

ancient nova
#

that's absurd

fathom sonnet
#

but does discord log that events in audit log?

ancient nova
#

: role is not defined

#

that's the error I've gotten

#

why is that?

fathom sonnet
#

can you show me the code

#

mostly the arg beefore the role is undefined

ancient nova
#

I deleted the entire event

#

I saved it into a zip just in case but it got corrupted for no reason 😭

fathom sonnet
#

guys...i ran into logical error...So i have slash command called "ticket" which will send an embeded message to the "defined channel" by server moderator and ir goona log theirs messages. and sent them to the channel, like

if user dosent call for /ticket command, bot not gonna log anything.

after user calls it, bot wil log every message that user sends in BOTs DM.

then, i need to create an /close-ticket command which will "close ticket" which mean that bot will no longer log users DM messages...

soo, i honestly dk how to do this, i got an idea...and just...lost it

#

for DB, i think that i should save Members id as well and then somehow create listener which will log users id when he "opens" a ticket

ancient nova
#

how do I check if the bot has permissions to check the audit log???

fathom sonnet
#

that is my theory

fathom sonnet
#

i think this is name of permission

tulip ledge
#

then just remove the id if they use clod ticket command

eternal osprey
#

hey guys, how would i see where a site pulls its info from?

#

Once someone told me to use like the networking tab and check the incoming requests

#

I tried it with the site i want to scrape but i only got shit back basically

ancient nova
#
module.exports = async (message, guild, user) => {
    const settings = message.settings = getSettings(message.guild);
    if (message.guild && settings.modLogChannel !== undefined) {
        const modLogChannel = settings.modLogChannel;
        const modLogChannelRegex = /^<#(\d+)>$/;

        let channelCheck, channelID;

        if (modLogChannelRegex.test(modLogChannel)) {
            channelCheck = guild.channels.cache.get(modLogChannel.replace(/<#(\d+)>/, "$1"));
        } else if ((channelID = modLogChannel.match(modLogChannelRegex)) !== null) {
            channelCheck = guild.channels.cache.get(channelID[1]);
        } else {
            channelCheck = guild.channels.cache.find(_ch => _ch.name.toLowerCase() === modLogChannel.toLowerCase());
        }

        if (channelCheck !== undefined) {
            const fetchAuditLog = await guild.fetchAuditLogs({ limit: 1, type: "MEMBER_BAN_ADD" });
            const fetchBannedLog = fetchAuditLog.entries.first();
            const memberBannedLog = new MessageEmbed();
            
            memberBannedLog.setTitle("Moderation Logs (Action: Member Banned)");
            memberBannedLog.setColor(commandColor);
            memberBannedLog.addField("Banned", `${user.tag} (${user.id})`);
            memberBannedLog.addField("Moderator", !fetchBannedLog ? "Unknown" : fetchBannedLog?.executor.tag);

            return channelCheck.send({embeds: [memberBannedLog]});
        }
    }
}
``` why doesns't this work?
#

no error, it just doesn't execute

spark flint
#
DiscordAPIError[20012]: You are not authorized to perform this action on this application
    at SequentialHandler.runRequest (C:\Users\Churt\Desktop\blacklister\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.js:198:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (C:\Users\Churt\Desktop\blacklister\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.js:99:20)
    at async C:\Users\Churt\Desktop\blacklister\bot.js:65:13 {
  rawError: {
    message: 'You are not authorized to perform this action on this application',
    code: 20012
  },
  code: 20012,
  status: 403,
  method: 'put',
  url: 'https://discord.com/api/v9/applications/987817633544015956/commands'
}```
#

that is deffo the user id

#

Logged in as Blacklister Development#5412 (987817633544015956)

earnest phoenix
#

help me with this buttons i need to change it as play, loop, skip, shuffle, stop

fathom sonnet
spark flint
#

thats whats confusing me

#

i'm making it push commands for client.user.id

earnest phoenix
spark flint
#

its a new bot application which makes me think thats why

spark flint
#

just wait for someone who knows what they are doing to help

earnest phoenix
#

okay

green kestrel
#

i thought i'd share this

fathom sonnet
green kestrel
#

i cant even understand what goes thru peoples heads

fathom sonnet
#

cpp? dayum

green kestrel
#

its a pr someone logged against a c++ discord lib, adding some random js and a comment into it

#

they probably thought they were EPIC until the CI and codacy laughed at them

spark flint
green kestrel
#

yeah ikr

spark flint
#

Unfortunately, you cannot send a response in a direct message using a slash command. The response will be sent in the same channel as the slash command was executed. You can send the response as a normal message.

fathom sonnet
#

lets apreciate that he making slash commands in cpp

green kestrel
#

but that code they put in is js

#

it wont even compile

spark flint
#

yeah

#

lol

green kestrel
fathom sonnet
#

...why whould u doo that?

spark flint
#

lol

green kestrel
#

lol

#

the pr is a copy and paste of a stackoverflow comment

fathom sonnet
#

someone really have time to waste

green kestrel
#

its much more powerful than a js or python lib Vjecni

fathom sonnet
#

imagine, trying to hijack bot made in cpp

green kestrel
#

you arent going to get 35 million users in 4.8gb ram on js

fathom sonnet
#

how would that go

green kestrel
#

have a go, @inner dirge is cpp

fathom sonnet
#

dayum...I gonna fully switch to cpp i swear

#

maybe i will die sooner but hey

fathom sonnet
#

i mean yea... cpp devs are diferent breed

quartz kindle
#

nah, just brain

fathom sonnet
#

nah, diferent breed

quartz kindle
#

brain is

#

not all cpp devs are

spark flint
#

tokens longer?

vivid fulcrum
#

probably something to do with the timestamp it was created at

split hazel
#

dynos token starts with MTU1MTQ5MTA4MTgzNjk1MzYw get hacking lads

solemn latch
#

The timestamp also can be approximated.
Look at the history of bot downtime, it will be within a window of it going down in the past.

Significantly limiting the values it could be(still a ton though)

eternal osprey
#

hey why is my attachment sending as this:

#

like can't an mp4 file be sent as embedded attachment? Just like this gif file right here

fathom sonnet
#

better question...why my freaking slash command dont want to update...

#

like it has been 5 hours

fathom sonnet
eternal osprey
woeful pike
#

you would technically have access to forging basically every bot token if you could figure out the secret key for the hmac right? Although they invalidate tokens so I imagine a properly signed token is still not valid unless you generate it

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

split hazel
#

bro just gen a random string and call it a day

eternal osprey
#

wahahahha

sharp geyser
# eternal osprey hey why is my attachment sending as this:

So apparently mp4 videos only embed if they are encoded with H.264 and nothing else. That is the only answer I seem to be able to find related to this issue, so not entirely sure if it is even correct (don't have the time to test it right now)

#

I don't myself see why this would be the issue, but due to only finding this answer I am just giving you what I found

eternal osprey
#

ah that's really strange, thanks tho misty. You are awesome!!

fathom sonnet
#

hear me out:
take the video
upload it to yt
when you send it, it goona embed 🙂

#

if you have embed perms ofc

eternal osprey
#

Vjecni you are honestly a life saver! I will make my bot upload dozens of videos to youtube and send them in the chat.

fathom sonnet
#

just not sure how u goona upload them but thats minor problem

#

just ask yt to do it for you

eternal osprey
#

no no no even better i will ask google to do it for me

fathom sonnet
#

(Internet Corporation for Assigned Names and Numbers)

sharp geyser
#

That's for the clarification on what ICANN is

fathom sonnet
eternal osprey
#

no no no ask IUPAC (International Union of Pure and Applied Chemistry)

sharp geyser
#

;)

fathom sonnet
sharp geyser
#

never heard of that being a thing

eternal osprey
#

bro discord fucks its own api with all these new updates.

fathom sonnet
#

yep

eternal osprey
#

I couldn't remember the size limit being implemented in v11 but that might have been my dumb ass,

sharp geyser
#

That was 2 years ago tho so it might be false now or was even false then

sharp geyser
#

Oh nice to know

#

I wish discord included that in their docs

solemn latch
#

I'm not sure the size limit, but ive had issues with it previously.

fathom sonnet
#

i goona lose my hair bcz of these music comamnds

sharp geyser
#

Music bots ain't the same without youtube

solemn latch
#

Music takes awhile to figure out when doing it from scratch

fathom sonnet
#

it has been 5 hours till i made it xd

solemn latch
#

Are you using guild specific commands?

fathom sonnet
#

no

#

global

solemn latch
#

Guild commands update instantly

#

Or near instantly

fathom sonnet
#

for global, ik theny take about few minutes, but not few hrs

sharp geyser
#

If you have made a change to the name/description of any command or their options I don't think discord automatically checks that for you

solemn latch
#

It was a few hours previously.

#

After you updated discord yeah

sharp geyser
fathom sonnet
#

...goona try to restart discord

sharp geyser
#

@solemn latch discord doesn't check for changes in the names/descriptions of your slash commands do they?

#

Not sure if you'd know this or not

solemn latch
#

You have to update discord on changes.

fathom sonnet
#

i made change on command function

eternal osprey
#

Misty totally off-topic, but weren’t you a mod in the past or am I tripping?

sharp geyser
#

Anything unrelated to the data you send to discord is out of their control

#

So it is likely a you issue if it isn't any command metadata

wheat mesa
#

Misty used to have bot dev role but his old account got termed

#

You might be thinking of that

fathom sonnet
#

sorry for my stupidity... I had 2 if() statements with same requirements

sharp geyser
#

Stupid discord

fathom sonnet
#

just goona delete them who even use music bots

#

xd

sharp geyser
#

I think music bots are becoming quite boring if all you have to listen to is soundcloud rappers

fathom sonnet
#

yeee agree

#

amm, how can I delete global slash command?

sharp geyser
#

What exactly are you using again

fathom sonnet
#

d.js

#

i want to delete these music comamnds but have no idea how

#

i know that i need to get id of command...somehow, btw, this is how my slash commands loog: ```js
data: new SlashCommandBuilder()
.setName('name')
.setDescription('Description'),

boreal iron
#

Get the command ID (or any command resolvable) and delete it.

global command:
await <client>.application.commands.delete(id);

guild command:
await <guild>.commands.delete(id);

#

If needed you can also clear all commands by updating the application command data with an empty array.

#

For example:

await <client>.application.commands.set([]);

fathom sonnet
#

Never had to delete commands

boreal iron
#

You need to fetch the commands in order to get the ID

#

client.application.commands.fetch()

#

This returns a promise

#

A collection of all registered commands

#

You gonna filter/find your command by it's name, after fetching the list and boom you got it's ID

fathom sonnet
#

where do I use these, in my main js file, in routes? I got no idea

boreal iron
#

you need to do this only once, when your bot is ready

#

so probably inside the ready event

fathom sonnet
#

Ahh kk, will try, tnx

spark flint
#

How can I make addChannelOption only show text channels

#

theres .addChannelTypes() but doing .addChannelTypes(["GuildText"]) doesn't work

sharp geyser
#

Am I the only one to assume that this is impossible to do in 3 days as a single person or am I just crazy

spark flint
#

.addChannelOption(option => option.setName('resultschannel').setDescription('Select a results channel').setRequired(true).addChannelTypes(...channelTypes))

sharp geyser
#

Is this something new to v14?

spark flint
#

not sure

quartz kindle
sharp geyser
quartz kindle
#

also tell them that "proffesional" is not very professional

sharp geyser
#

Lmao

#

I was going onto mc market and seeing if anyone was offering jobs and found that gem I now remember why I don't go to mc market anymore

quartz kindle
#

reminds me of this idiot who wanted a bot that had like 400 commands

#

for 200 bucks

sharp geyser
#

Apparently they don't know news channels exist anymore

#

Also the idea of sending a message to multiple guilds at a time yikes

wheat mesa
sharp geyser
wheat mesa
#

Boom

#

Money

#

It’s everything they asked for

sharp geyser
#

They wanted it all for free

#

so

wheat mesa
#

For free???? The fuck

#

I wouldn’t do that shit in 3 days for anything less than a thousand dollars tbh

sharp geyser
#

Yep

wheat mesa
#

That sounds like stress hell

sharp geyser
#

I wouldn't do it in 3 days period

#

that is too small of a deadline for 0 bugs

#

0 bugs in 3 days for 5-6 bots

wheat mesa
#

I could probably do it in 3 days with no bugs if some conditions were met

sharp geyser
#

I guarantee they have more requirements than that as well so have fun with that

wheat mesa
#
  1. I get paid a shit ton
  2. They pay for my coffee to stay up for 72 hours
sharp geyser
#

Those types of people never put what they really want in the description until after you give them the finished product

#

kek

#

"Oh, but I didn't mean like that, I wanted it like this"

wheat mesa
#

It’s funny because people think they can exploit freelancers

sharp geyser
#

"No money for you!"

wheat mesa
#

Fuck people that do that

#

Freelancing in the development world is often time very difficult and inconsistent work

#

Not to mention it’s impossible to find anyone that values your time

sharp geyser
#

It's more aggravating cause they are extremely vague in their description of what they actually want and leave it up to you to interpret

sharp geyser
#

It is starting to not look like a profitable job for the amount of time i've put into it

wheat mesa
#

Nobody said you had to freelance

#

Land a decent job and you’ll be set

#

It’s difficult to get into the industry but once you’re in you’ll have an easier time

quartz kindle
#

i want a job where i do nothing all day and make 10k a month

sharp geyser
wheat mesa
#

I’m lucky because I apparently have a few family members who are very experienced with the computer science industry

round cove
wheat mesa
#

Texas minimum wage is still $7.25 an hour but basically nobody works for anything under $10

sharp geyser
wheat mesa
#

Not even teenagers

quartz kindle
#

16 dollars an hour makes you 1 month's salary in brazil, in 12 hours

sharp geyser
#

His job description is to help around the complex and stop people who are going against the rules

#

but he just sits around for the most part

wheat mesa
round cove
#

Bro I make 39 an hour and sit around at home

#

software engineering is the way to go

wheat mesa
#

In California a 1 bedroom apartment costs like $2k a month at the least lol

round cove
#

yeah lmao

#

good thing i live in the midwest

sharp geyser
#

Washington is fucking insane

wheat mesa
#

Where I live it’s close to like $800 I think

sharp geyser
#

Here it is similar to california

round cove
#

I pay $1100 for a 2 bedroom place with cats

sharp geyser
#

it is just a little less iirc

quartz kindle
#

i can hardly pay 100 bucks a month

sharp geyser
round cove
quartz kindle
#

im not smart at making money

#

sadly

wheat mesa
#

My mom pays $1700 a month for our house, 3 bedrooms 2 bathrooms, it’s still overpriced as fuck though

round cove
#

"just get a job"

quartz kindle
#

ew jobs

#

:^)

sharp geyser
#

tim be your own boss

wheat mesa
#

#HireTim campaign when???

quartz kindle
#

i mean, jobs here are absolute garbage

sharp geyser
#

start a service tim

round cove
#

just work remote

#

store all your money in paypal or something stupid

sharp geyser
#

your smart enough to code up something dumb people will pay for

quartz kindle
#

im open for a remote job

wheat mesa
#

Evade taxes

#

Stonks

round cove
quartz kindle
#

lmao

sharp geyser
#

#TimForCEO

quartz kindle
#

i have zero CEO experience

round cove
#

don't need it

wheat mesa
#

You’re the CEO of your life

quartz kindle
#

lmao

wheat mesa
#

That’s CEO experience right there

sharp geyser
#

tim just code up something dumb people will pay for

#

not hard

quartz kindle
sharp geyser
#

good

#

money will roll in

round cove
#

tim watcha makin

sharp geyser
quartz kindle
#

hopefully my api will be ready in the next couple months

#

but for now i have to decide if im gonna go for snake case or not

#

xD

wheat mesa
#

The day I land a good paying job is the day I start donating to Tim’s projects bro

sharp geyser
round cove
#

tim what's the api for

quartz kindle
#

i got a sponsor for tiny-discord, which was nice

sharp geyser
quartz kindle
round cove
#

Oh that's right

sharp geyser
quartz kindle
#

wick bot

sharp geyser
#

What do they give u

quartz kindle
#

hundred bucks

sharp geyser
#

Well there is your rent

quartz kindle
#

ye

#

feels good man

wheat mesa
#

Free tim from society

sharp geyser
#

We should get the smartest people in top.gg together to make something that will get dumb people to pay for it

#

matter of fact lets start a pyramid scheme!

wheat mesa
#

It already exists

sharp geyser
quartz kindle
#

i hate marketing scams

wheat mesa
sharp geyser
#

good deal

quartz kindle
#

crypto scammer

#

reminds me of this dude from nigeria that was trying to convince me to sign up to his crypto platform

sharp geyser
#

I am surprised he didn't try and convince you he was a Nigerian prince

quartz kindle
#

he didnt know i knew

#

managed to have him click on an ip logger link

#

lmao

sharp geyser
#

Damn

round cove
quartz kindle
#

tried to convince him to pay me to "release my funds" but he called me a scammer

quartz kindle
sharp geyser
#

Honestly just tired of being broke 😔

boreal iron
#

for marketing purpose

#

lmao

#

"send me all your money to get rich, now"

sharp geyser
#

the cringiest place ever

wheat mesa
sharp geyser
wheat mesa
#

wat

sharp geyser
#

I know my number but without the card I can't get a job

wheat mesa
#

Request one

sharp geyser
#

Can't

wheat mesa
#

Yes u can

round cove
sharp geyser
#

Not without a workin car dingus

wheat mesa
#

Take a bus

spark flint
#

how can I wait for my forEach loop to finish before proceeding

sharp geyser
#

Who the fuck takes busses

wheat mesa
#

A lot of people

round cove
sharp geyser
#

I am not having my organs stolen by some crazy person

round cove
#

youc an request a new SSC online you dingus

sharp geyser
#

Not without an account

spark flint
#
            for await (const member of membersToCheck) {
                await membersToCheck.forEach(async function(member) {
                    const response = await fetch('https://api.phish.gg/username', { 
                        method: 'POST', 
                        body: JSON.stringify({ username:member.user.username }), 
                        headers: {
                            'Content-Type': 'application/json'
                        } 
                    });
                    const data = await response.json()
                    console.log(`${member.user.username}#${member.user.discriminator} (${member.user.id}) - ${JSON.stringify(data)}`)
                    if (data.match) {
                        flaggedMembers.push(`${member.user.username}#${member.user.discriminator} (${member.user.id}) - Flagged on Phish.gg API for ${data.reason}`)
                    }
                    msleep(250)
                })
            }

            let resultsEmbed = new MessageEmbed()
                .setDescription(`I found **${flaggedMembers.length}** possible scam accounts!\n${(flaggedMembers ? `Click the button below to see a saved copy of those user IDs.` : `Since I've not found any flagged accounts, there is nothing you need to do!`)}`)
                .setColor((flaggedMembers ? `#bf2828` : `#178234`))
            await channel.send({ content:`Hey <@${interaction.user.id}>, here is your server scan results!`, embeds:[resultsEmbed] })```
round cove
#

The account is your ssn lmao?

sharp geyser
#

and since I am under 18 I can't make an account

spark flint
#

thats my current code but its bad

round cove
#

Do you not know your ssn

sharp geyser
#

Do you not know how it works mmLol

round cove
#

im not DUMB and need a replacement

sharp geyser
#

I literally already tried everything you are saying

round cove
sharp geyser
#

just saying

round cove
spark flint
sharp geyser
#

Seems like you're a bit mad dylan

round cove
#

yeah

#

at this CODE

sharp geyser
#

I don't blame you

#

that code looks atrocious

#

my monitor warps it funny

round cove
#

there we go

#

@spark flint what is your issue again lol

sharp geyser
# round cove Do you not know your ssn

But yes I do have my ssn, thing is they don't allow you to use it to make an account unless you are 18 or older. Another thing, they don't allow you to use your parental figure's account to request for your card for some dumb ass reason.

#

Social Security is just really dumb

round cove
#

Do you have a passport

spark flint
sharp geyser
#

Nope

round cove
#

gg

sharp geyser
#

Never been out of the states

quartz kindle
spark flint
#

i mean it works with no errors

round cove
#

it can work and not do anything meaningful

#

it wont error

quartz kindle
#

either use a for loop and await each iteration, or map it into an array of promises and use Promise.all()

round cove
#

it just doesn't do anything

spark flint
#

oH shit wait

#

i've just realised how fucking stupid I am

quartz kindle
#

but since you're making http requests, better do it sequentially with a for loop

spark flint
#

brooooooo

round cove
#

membersToCheck.forEach -> await Promise.all(membersToCheck.map(() => { /*your code*/ } ))

spark flint
#

i did a loop twice

quartz kindle
#

dont use concurrent stuff on http requests

#

unless you wanna get limited/banned/flagged/blocked

round cove
#

right lmao

spark flint
#

its my own api

sharp geyser
#

Love it when you lose motivation to work on something you're passionate about

round cove
#

🤝

spark flint
#

i'm gonna do direct API requests to bypass CF ratelimits

quartz kindle
#

if its your own api, make an endpoint for fetching multiple things

spark flint
#

good point

sharp geyser
#

bun have you slept

spark flint
#

no

quartz kindle
#

too gay to sleep

sharp geyser
#

sounds like it is about time you do so

quartz kindle
#

or rather, sleeping is too straight

sharp geyser
#

Watch that become a thing in the future

boreal iron
#

wth is going on

quartz kindle
#

nothing, just insulting straight people

#

:^)

boreal iron
#

👍

wheat mesa
#

Check yourself before you wreck yourself

sharp geyser
spark flint
sharp geyser
#

I also realize I need to work on something but I am just meh

round cove
#

who has some poggers projects

sharp geyser
#

Wdym by that

quartz kindle
#

me

round cove
#

just talk about some cool things

#

that you be doin

sharp geyser
#

I mean I am kinda doing something cool

#

at least I think it's cool

spark flint
#

i kinda have some cool projects

#

antiscam shit which doesn't focus on scam links

round cove
#

what they be

spark flint
#

looks at the other ways scams occur

#

like scam usernames, malicious guilds

sharp geyser
#

I am mainly working on something to house short stories/books that people can read for free

spark flint
#

nice

quartz kindle
#

nice

sharp geyser
#

Pain to work on though

round cove
spark flint
#

theres several regexes i use for the usernames

#

the malicious guilds bit relies on user reports, and is for things like fake QR code verifications

#

latest is .gg/pizzashack

#

oop it broke

round cove
#

Right

sharp geyser
#

L

round cove
#

So you just add to the DB then?

spark flint
#

yeah

round cove
#

If it's known

#

Makes sense I guess

spark flint
#

yeah

#

returns {"match":true,"reason":"Fake QR code verification"}

sharp geyser
#

hey bun

spark flint
#

hi

sharp geyser
#

want some pizza from my shack?

spark flint
#

no joeverymad

sharp geyser
#

😔

#

I kind of want to learn a different language but I can never keep at it long enough to stick with it

spark flint
#

lmao i accidentally posted stats to my monitoring API from my test bot

#

fucked up the graph

sharp geyser
#

Not a very popular bot either

#

drops to 0 servers a few times

sharp geyser
#

But why

wheat mesa
#

Fast

#

Zoom

sharp geyser
#

ok and

wheat mesa
#

🚀s

sharp geyser
#

I don't have the mental will power to put myself through rust

wheat mesa
#

If you use rust you have an excuse to put “blazingly fast 🚀” in every section of your git repos

sharp geyser
#

lmao

#

I am not learning rust either way

sharp geyser
wheat mesa
#

Duality of man

#

Uhhh

#

Idk

#

Console project

#

My first project was ambitious, the math_parser_rs thing

sharp geyser
#

Yea no thanks

#

I may know programming basics, but I don't have the knowledge to try and solve a problem that complex

#

I guess a good place to start though is to actually install rust cause apparently I no longer have it

solemn latch
spark flint
#

Yup

quartz kindle
eternal osprey
#

@round cove

round cove
#

lol

round cove
#

wrogn dylan pal

#

@real rose

sharp geyser
#

🤔

round cove
#

they asked why i declined the bot so no

median ginkgo
#

How to count all the top.gg votes for my discord bot and display it ?

sharp geyser
#

am I missing messages

round cove
#

dms

sharp geyser
#

o

#

Anyone wanna help me with a code challenge real quick?

round cove
#

ascii...?

sharp geyser
#

So I am writing a program in rust that takes in a array of alphabetic chars that are lowercase e.g abc and assigns a value of 1-26 through the alphabet a being 1 and z being 26 ofc. Issue is, I accomplished this but in the least efficient way possible, so I am thinking I can use ascii instead as I am using chars. But I have 0 clue of how to efficiently get that value of a being 1 and b being 2 and so on.

#

forgot to mention I am adding the sum of those numbers so abc would end up equating to 6

round cove
#

literally just the ascii value - 65

#

or 96 in this case

#

for lowercase

sharp geyser
#

Wait what

round cove
#

You can do charVar as u32 and get it's ascii value then subtract -96 and if it's a then it'll equal 1 since a in ascii is 97

sharp geyser
#

Wouldn't I have to change the value I am subtracting by each time tho for each letter?

round cove
#

No?

sharp geyser
#

Wait what

#

Am I just really bad at math

round cove
#

yes

#

if a is 97 on the ascii table

#

GUESS what fucking b is

#

your mind WILL be blown away

sharp geyser
#

I feel like you have an attitude towards me

round cove
#

nah I just have the assumption you've been to college and you haven't

#

since in higghschool or something

sharp geyser
#

I am still in highschool

round cove
#

yeah

sharp geyser
#

Math was just never my best subject

round cove
#

I think it's more you don't know your ascii table

#

which is usually in the first CS class

sharp geyser
#

I also don't know that no

round cove
#

a is 97 and z is 122

#

b is 98

sharp geyser
#

I am still angry that my cs class taught me jack shit

round cove
#

so subtracting -96 will give you what you want

sharp geyser
#

I expected i'd learn something new in my cs class but I didn't

#

Well that worked thanks :)

round cove
#

(:

sharp geyser
#

I at least learned a good bit about rust during this

round cove
#

does it make sense at least

sharp geyser
#

Yea it does

ancient nova
#

MessageEmbed author name must be a string. ?

round cove
#

what were you doing before

round cove
ancient nova
round cove
#

sorry that was toxic

sharp geyser
#

Yes it must be a string

round cove
#

i just plasyed leage

ancient nova
#
        helpEmbed.setAuthor({text: `${client.user.username + " Help Menu", client.user.displayAvatarURL()}`});
#

oh nvm

sharp geyser
#

the fuck is that

round cove
#

lol

sharp geyser
#

text?

ancient nova
#

didn't see the issue

sharp geyser
#

I am so confused by that

sharp geyser
#

so I was subtracting 140 instead of 96 which obv wasn't giivng me the right results

round cove
#

nice

sharp geyser
#
use std::io;
use std::ops::Sub;

fn calc_sum(characters: Vec<char>) -> u32 {
    let mut sum = 0;
    for char in characters {
        if char.is_alphabetic() { sum += (char.to_ascii_lowercase() as u32).sub(96)  }
    }

    return sum;
}

fn main() {
    let mut characters: Vec<char> = Vec::new();
    let mut chars = String::new();

    println!("What letters would you like to sum up?");

    io::stdin()
        .read_line(&mut chars)
        .expect("Failed to read input");

    for char in chars.trim().chars() {
        characters.push(char)
    }

    println!("{}", calc_sum(characters));
}

I could probably still make this better somehow but I like my first time using rust

#

I learned a good bit about it just from this small challenge

ancient nova
#

does that make sense 💀

sharp geyser
#

no

#

but I stopped caring

#

if its fixed good job

sharp geyser
#

it should only be 91 as I ignore spaces

round cove
#

124 is correct

#

where did you get 91

sharp geyser
#

👀

#

ignore me dylan please

round cove
#

please tell me how you got 91

sharp geyser
#

There were some miscalculations involved

#

plus I forgot to add r and one of the o's

round cove
#

gg

sharp geyser
#

sad thing is I checked twice before asking

#

and still miscalculated both times

dry imp
#

math was truly not your best subject

sharp geyser
#

apparently

#

even tho I am passing math rn with a A-

round cove
#

ok

sharp geyser
#

Dylan how is ur day

round cove
#

fine

sharp geyser
#

You sure?

#

You seemed angry earlier

round cove
#

i wasn't mad at all lol

sharp geyser
#

I see

dry imp
sharp geyser
#

Well any A is better than B

dry imp
#

its a minus tho

sharp geyser
#

A- A A+ is how it goes here from what I noticed

#

B- B B+ A- A A+

ancient nova
sharp geyser
#

no

wheat mesa
#

how about a C++

austere surge
#

F--

radiant kraken
sharp geyser
#

What

#

that is a thing

#

😔

radiant kraken
#

yes

sharp geyser
#

Thank you for that

radiant kraken
sharp geyser
#

This might be a dumb question but I don't really mess with ascii so

radiant kraken
#

My first time using rust was all messy

sharp geyser
#

What if I already have the ascii representation, for example a is 97 on the ascii table that I looked at, so how would i then get that letter back?

#

This is under the assumption I don't have its letter I just have its ascii representation

sonic lodge
#

like you have the u8 byte?

radiant kraken
#

ascii representation as in what?

#

the index in the alphabet (0 -> 26) or the raw char code?

sharp geyser
#

a is 97 from what this table is

sonic lodge
#

you can cast to char

radiant kraken
#

num is u32

sharp geyser
#

oh god apparently I am fucking with lifetimes rn

#

At least I am getting a lifetime error

radiant kraken
#

what's the error

sharp geyser
#
3 | fn cipher(text: Vec<char>) -> &str {
  |                               ^ expected named lifetime parameter
  |
  = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments
help: consider using the `'static` lifetime
  |
3 | fn cipher(text: Vec<char>) -> &'static str {
#

I am new to rust so I am probably doing the return type all sorts of wrong

radiant kraken
#

what does the function cipher do

sharp geyser
#

It takes in the Vec of chars and does a ceaser cipher on them and returns the result back

radiant kraken
#

Use a String for that

sharp geyser
#

Mmm then I will have to rethink what I am doing

radiant kraken
#

to convert a Vec<char> into a String, you can turn it into an iterator again with .into_iter() and then call the .collect() function

sharp geyser
#
use std::ops::Sub;

fn cipher(text: Vec<char>) -> &str {

    let mut cipher = "";

    for char in text {
        let mut result = (char.to_ascii_lowercase() as u32).sub(96);

        if result == 26 {
            result -= 25
        } else { result += 1; }

        cipher += (result as char)
    }

    return cipher;
}

fn main() {
    println!("{}", cipher("hello world".trim().chars().collect::<Vec<char>>()));
}

This is what I was doing at first but I realize now that rust strings don't work the same as js

#

you can't add onto them like that

wheat mesa
#

just return a String here

#

it's easier

sharp geyser
#

Yea but I don't know how to get it to actually push the characters onto the string

radiant kraken
#

also since return cipher; is a return statement and it's the last line of the function, you can just use cipher

sharp geyser
#

mmm I tried that just now and got this:

error[E0604]: only `u8` can be cast as `char`, not `u32`
  --> src\main.rs:15:21
   |
15 |         cipher.push(result as char)
   |                     ^^^^^^^^^^^^^^ invalid cast
   |
help: try `char::from_u32` instead
  --> src\main.rs:15:21
   |
15 |         cipher.push(result as char)
radiant kraken
#

then do that ig

sharp geyser
#

Right, and changing the casting of result to u8 got me an overflow error with subtracting

#

thread 'main' panicked at 'attempt to subtract with overflow', /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e\library\core\src\ops\arith.rs:240:1

radiant kraken
#

why

sharp geyser
#

🤷‍♀️

radiant kraken
#

just do char::from_u32()

#

usually you should follow what the compiler says

sharp geyser
#

Mmm

#

I just did that and still getting a overflow error

radiant kraken
wheat mesa
#

you're subtracting too much

#

chars can only be unsigned ints

#

going into the negatives will cause overflow

sharp geyser
#

let mut result = (char.to_ascii_lowercase() as u32).sub(96); but it shouldn't be a negative number

radiant kraken
radiant kraken
wheat mesa
#

same thing potato potato

sharp geyser
radiant kraken
#

the char code of a is 97

wheat mesa
#

space is 32 in ascii

radiant kraken
#

subtracting it with 97 returns 0

sharp geyser
radiant kraken
#

also you don't need to call sub, number - 97 would still work

sharp geyser
#

either way null subtracting by 97 still causes an overflow

radiant kraken
#

that's because your example string contains a space

#

32 - 97 = negative mmulu

wheat mesa
#

log the value of the character, I guarantee it's a space causing the issue

radiant kraken
#

It is

sharp geyser
#

it is a space

#

I already know this now

radiant kraken
#

just do (char as u32) + yourCaesarOffset

wheat mesa
#
if char.is_alphabetic() {
  // perform cipher
}
sharp geyser
#

not exactly what I thought would happen

radiant kraken
sharp geyser
#

yea so then it'd be b

radiant kraken
#

no

#

the char code for b is 97

#

not 2

sharp geyser
#

Oh right

#

I might be like bun and need to sleep

radiant kraken
#

true

#

never do rust when you're sleep deprived

sharp geyser
#

I am thinking about this all wrong

#

Yea my sleep deprived brain can't think of a solution rn

radiant kraken
#

i hate it when people rewrite a project in rust and instead turns into a bloated nightmare

sharp geyser
#

hm?

#

are you talking bout me?

radiant kraken
#

no

#

not u

sharp geyser
#

So wait why am I even subtracting

#

my brain is all muddled now ima prob just go lay down or smth

radiant kraken
#

you should

radiant kraken
sharp geyser
#

WAIT

radiant kraken
#

that repo is not wrong; most big rust projects are like that ia_lul_haha

sharp geyser
#
What would you like to cipher?

Hello World
Here is your original input:
Hello World

Here is your ciphered output:
ifmmpxpsme

Got it working

radiant kraken
#

Congrats

#

now send me the code so i can refactor it

sharp geyser
#

Another useless project done

#

but I at least learned a bit

sharp geyser
# radiant kraken Congrats
use std::io;

fn cipher(text: Vec<char>) -> String {
    let mut cipher = String::new();

    for char in text {
        if char.is_alphabetic() {
            let mut result = char.to_ascii_lowercase() as u32;

            if result == 122 {
                result -= 25;
            } else { result += 1 }

            match char::from_u32(result) {
                Some(char) => { cipher.push(char) },
                None => { panic!("Invalid Char provided to cipher") }
            }
        }
    }

    cipher
}

fn main() {

    println!("What would you like to cipher?\n");

    let mut input = String::new();

    io::stdin()
        .read_line(&mut input)
        .expect("Failed to read input");

    println!("Here is your original input:\n{}\nHere is your ciphered output:\n{}", input, cipher(input.trim().chars().collect::<Vec<char>>()));
}
sharp geyser
radiant kraken
#

yea

sharp geyser
#

Is there even a key I can press that isn't a valid char?

#

I don't really see one on my keyboard

trim torrent
#

whats the best practise for perms btw?
is it best to require the same perm the bot would need to use the command, only have manage server perms to use commands, or both?

sharp geyser
#

Typically it is best practice to only require the perms required to do the action

#

you wouldn't want someone to have Administrator to be able to ban someone

trim torrent
#

surely u want people with administrator to be able to ban as its all perms

#

but i think i get what u mean

sharp geyser
#

Well yes but what I mean is

#

Don't make it so they HAVE to have it

#

logically speaking you'd wanna check for BAN_MEMBERS perm

trim torrent
#

^ gotchya

#

ty

deep mantle
#

Im creating an app that gets invite data from the discord.com/api/invites/ endpoint. However, I have been getting 429 errors after not that many requests. I have read the docs about ratelimits https://discord.com/developers/docs/topics/rate-limits and I am not exceeding 10,000 requests or 50 requests a second. If it is important the 429 error is not returning the X-RateLimit-Limit and X-RateLimit-Remaining and such headers, just a retry_after

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

lament rock
radiant kraken
cinder patio
fathom sonnet
radiant kraken
#

fixed it by creating function that does the same thing, but is not an implementation of Into<u32>

#

col is a struct btw, it's a pub struct Color(u32);

fathom sonnet
#

i logged commands, and this is what i got

#

now i need to find ID somehow cD

woeful pike
# radiant kraken what

give an explicit type to whatever that expression is being assigned to instead of casting

radiant kraken
#
impl Into<u16> for Color {
  #[inline]
  fn into(self) -> u16 {
    self.0 as u16
  }
}
``` fixes it
woeful pike
#

I doubt inline does anything for those trait implementations

split hazel
#

when you don't inline functions that do one tiny thing: 💀

#

I know gcc won't do it for you but idk about rust

boreal iron
fathom sonnet
#

ahh

boreal iron
#

const commands = await …fetch();

#

commands will be collection

#

You gotta find you command by searching it

#

const target = commands.find((cmd) => cmd.name === "command name");

#

Then using the var target like in my example to delete it

#

target is a command resolvable

radiant kraken
woeful pike
#

inline is still just a compiler hint though

fathom sonnet
#

ammm..hmmm thisis what i have tried, and this is what i got:
xD

radiant kraken
eternal osprey
fathom sonnet
#

you goona have 2 options

#

Moonlight and Moonlight II

#

i use default

#

one

boreal iron
fathom sonnet
#

yea but if i make commands a const or any other var type, i got: commands.find() is not a function

#

ah i got it, i got it

#

tnx man, tnx verry much ❤️

fathom sonnet
#

well as it says, pip3 is not recognized as the command, so either you dont have installed it or you havent added python to PATH in environment variables

#

nope, just add it to path

#

then it should worj

#

well check that link

#

it is easy

#

open start > search for: Edit environment variables > Environment Variables > under: System variables > click on path > then click edit > pop-up will appear > click new > add your pip3 path

wooden ember
#

finally found out why my crap wasnt starting on boot, it was cuz i have nodejs v12 installed via apt and v16installed via nvm so starting the bots just with the normal node command defaulted to the v12 verions and failed. i used whereis node and then used the path though nvm and now it all works through the script and directly off of cron too

fathom sonnet
#

pip3 should be in %path% (your disk where you installed py)/python 3/scripts/pip

#

or it is python3/bin/pip

#

idk

#

cant remember

#

i literaly wrote whole procces

#

up there

#

💀

#

you needto have this...

#

you can run them trough cmd

#

also

#
rundll32 sysdm.cpl,EditEnvironmentVariables
#

if you cant find it that way

#

or you can press START + R and paste ```fix
rundll32 sysdm.cpl,EditEnvironmentVariables

#

are you admin on the PC?

#

or there is someone else?

#

well, if you are admin then u should be able to use that comamnd

#

well...where did you installed it?

#

lol

#

if you didnt select custom path

#

then it is probably on C disk

#

so C:\Python310\Scripts\pip.exe

#

bro... how many disks u have on the pc?

#

also have you even installed it

earnest phoenix
#

I don't think you even have Python installed in the first place, try running the installer again and see what happens

#

Or you haven't installed it properly

fathom sonnet
#

yep

#

could be case

#

just reinstall it

earnest phoenix
#

Yeah

fathom sonnet
#

and follow installer instruction carrefully

rustic nova
#

you cant edit system variables

#

change your user env variables instead

fathom sonnet
#

yep u can do tht also

#

kk

#

yes

#

also

#

u can do customize

#

and select your own path

#

where you want it to be installed

#

ok now go next

#

now you can check these last 3 if you want to

#

but u dont need ti

#

now select your path

#

where you would like to isnstall py

earnest phoenix
#

The default settings should be good enough, for the first option on that list

#

You can choose to install for all users if you don't want to install them again

fathom sonnet
#

path?

#

no if you goona select your own

earnest phoenix
#

You don't need to copy the path, and you don't need to provide a custom path

fathom sonnet
earnest phoenix
#

Yeah go ahead

fathom sonnet
#

i mean..ok

earnest phoenix
#

It should, I suppose you didn't choose the option to add it to the path when you installed it first

#

You should probably close that terminal and open it again after Python was installed

turbid geyser
#

try restarting vsc

tight cypress
#

How can I do something like this, I spotted this on @rose warren's profile

earnest phoenix
tight cypress
turbid geyser
#

no problem

earnest phoenix
#

You're welcome

earnest phoenix
# tight cypress Ok thanks

Beware that the RPC library is deprecated and might stop working in the future, so it's recommended to use the GameSDK instead

tight cypress
#

Ok

turbid geyser
#

great job

earnest phoenix
#

Awesome

fathom sonnet
#

you welcome

viscid fox
#

What do I do if my bot is missing intents?

turbid geyser
viscid fox
turbid geyser
#

you should add intents:

viscid fox
#

I have added them

#

I tried all combinations

turbid geyser
#

show me

spark flint
#

Enable them on the developer dashboard

viscid fox
turbid geyser
#

show me your code

viscid fox
#

Uh

#

I'd rather not

turbid geyser
#

why?

viscid fox
#

I've made it for my close friends and it's kind of weird

spark flint
#

We can’t help unless we see the code

spark flint
#

What are the chances it’s a nuke bot kek

viscid fox
#

should I dm?

turbid geyser
#

no

#

post it here

viscid fox
#

oh well I hope I dont get banned

spark flint
#

People can help when it’s posted here

#

Ok

viscid fox
#

`const Discord = require ('discord.js') ;
const bot = new Discord.Client({intents: ["GUILDS", "GUILD_MESSAGES"] }) ;
const token = 'blah blah wont show it to you;
const PREFIX = 'W.';

bot.on('ready', () => {
console.log('I am online!')
})
bot.login(token)

client.on("message", (message) => {
if (message.content === "W.ping") {
let embed = new Discord.MessageEmbed()
.setTitle("🏓 Pong!")
.setDescription(${client.ws.ping}** Latency!)
.setColor("RANDOM")
.setFooter(Requested by $message.author.tag);
message.channel.send(embed);
}
})

if (message.content === "W.zelo") {
let nicknames = ["you're dumbass", "you're an idiot", "C U M", "You're gay", "SUS", "Fuck me"]
message.channel.send(${nicknames[Math.floor(Math.random() * nicknames.length)]} is what zelo wanted to tell or call you!)
}

if (message.content.startsWith("W.cum")) {
let victim = message.mentions.users.first()
if (!victim) message.reply("Mention someone to cum")
else {
message.channel.send(${victim} Got cummed lol)
}
}

if (message.content.startWith("W.hook")) {
let dude = message.mentions.users.first()
if (!dude) message.reply("Mention someone to hook")
else {
message.channel.send(${dude} Got hooked lol)
}
}
`

turbid geyser
#

can you use code block

viscid fox
#

code block?

turbid geyser
#

also its not client

viscid fox
#

what do you mean?

turbid geyser
#

use ```js

viscid fox
#

where?

turbid geyser
#

in your message

spark flint
#

At the tip

#

Top

#

Then the same at the bottom

viscid fox
#

it will get blocked because there is ` in the code

#

look

turbid geyser
viscid fox
#

ok changed it

turbid geyser
#

you are using discord.js v13 right?

viscid fox
#

yeah

turbid geyser
viscid fox
#

Anything wrong with it?

turbid geyser
#

look at v13 changes

viscid fox
#

hm alr

fathom sonnet
#

this type of embed sending is outdated

turbid geyser
#

^

fathom sonnet
#

u now use message.channel.send({embes: [embed]})

turbid geyser
#

also .setFooter({text:''})

fathom sonnet
#

DAYUM

turbid geyser
#

setAuthor({name: '', iconURL:''})

viscid fox
#

Ok

fathom sonnet
#

they really want to complicate using of djs

turbid geyser
#

eris is good at that topic

earnest phoenix
#

hi

turbid geyser
#

hi

tepid canyon
#

can't be that difficult to update or use djs tho just a timely matter depending on how much you got

lament rock
#

Wouldn't it be cool if you never had to update your code though

ember wedge
#

Someone could develop software that updates the code for you

lament rock
#

What? No. That's stupid

ember wedge
#

Is it?

#

What if you have a huge project and you want to upgrade the framework you're using

lament rock
#

Just use the raw API and never worry about having to update unless the API itself changes

ember wedge
#

would it be easier to have a build tools that allows you to update the code to the new framework or having to do it manually?

wheat mesa
#

That would definitely be an annoying and unreliable tool to develop

lament rock
#

You could never cover every edge case. Plus, you'd have to code logic for every update to convert

ember wedge
#

obviously this wouldn't be an automatic thing

wheat mesa
#

And then the users would blame you for breaking their code KEKW

split hazel
#

@foggy pilot bro the PAYE tax in the uk is horrible

ember wedge
split hazel
#

they've withheld like £50 of my paycheck bc of emergency tax or whatever (wrong channel)

lament rock
#

I switched to raw api and never have to deal with updates. Only when there's a new api version

ember wedge
#

sounds like the sanest thing to do indeed

lament rock
#

I can't tell if that's sarcasm, because the raw api is easy to deal with

ember wedge
#

no i'm being serious!

#

it's way easier to just use the raw api

#

maybe a simplistic wrapper for ease of use

foggy pilot
#

that is why

wheat mesa
#

If you truly care enough to use the raw api, it’s not too terrible if you know what you’re doing. If you want fast development time without boilerplate code, a library is a must

split hazel
#

my 20% going to fund bojos parties 😍

lament rock
#

There are awesome js libs for the raw api called SnowTransfer and CloudStorm

ember wedge
#

i'll take a look at those

lament rock
#

don't look at the contribs tho

ember wedge
#

hahaha why not?

lament rock
ember wedge
#

oh it's all you xD

sour mural
#

Hi, I have a question concerning .setPosition for roles creation.
I use role.setPosition(1) after creating my role but the position does not change and stay at the bottom of the roles' list.
Does someone has already gotten this problem ?
Thank you so much for your help

quartz kindle
#

that pretty much means v12 is officially dead

radiant kraken
#

people still use v12? ia_lul_haha

lament rock
#

Imagine sanity checking

#

This error aged poorly

rustic nova
#

uwu how yall devums doing

#

did I hear sanity check?

#

cant be me

spark flint
#

stupid question

#

but

#

i'm sending a post request with a 10k array as the post body

#

it returned Entity too large, so I upped the client_max_body_size whatever its called to 2500M and its still returning that

wheat mesa
#

have you tried... not sending a 10k array

spark flint
#

well uh

#

the alternative is sending 10k post requests

wheat mesa
#

to what

spark flint
#

my API

#

username checking

wheat mesa
#

have you tried smaller array sizes

#

and then queue requests that way

spark flint
#

idk how to make it smaller arryas

#

arrays

#
 body: JSON.stringify({ memberPayload:membersToCheck.map(member => [{ username:member.user.username, id:member.user.id }][0]) })```
#

what i currently do

#

membersToCheck is all the members of the server

wheat mesa
#

way

#

awit

#

wait

#

this is probably the ideal solution for you

spark flint
#

size = 10 means 10 arrays right?

wheat mesa
#

yes

#

no

#

it means how many elements you want per array

spark flint
#

ahh ok

quartz kindle
spark flint
#

basically

#

for .map

#

.map(member => { username:member.user.username, id:member.user.id }) won't work

#

because => { //code }

quartz kindle
#

member => ({ username:member.user.username, id:member.user.id })

spark flint
#

ah

#

well

#

that works

split hazel
#

i see so many libraries using lodash for one single feature

#

if that isnt bad enough