#development
1 messages · Page 1969 of 1
for example, if i want to know what were the coordinates of a planet or star in a specific date 500+ years ago
first of all the gregorian calendar didnt exist back then
they used the julian calendar
then they didnt have a constant methods of time keeping like clocks, they used sundials and sun based stuff, aka apparent/solar time
so any important date you find in history books is likely gonna be recorded as apparent time in the julian calendar
so you have to convert all that crap to something modern first
and pray they're using the same system
they didnt have timezones either
so you have to assume their "local solar time" from the geographical longitude
(which honestly its easier than all the timezone crap)
Remember gregorian calendar technically has a 13th and 14th months
Undecimber and Duodecimber
Undecimber or Undecember is a name for a thirteenth month in a calendar that normally has twelve months. Duodecimber or Duodecember is similarly a fourteenth month.
0x1F so what is this caleld again? Cause elixir treats it as an integer
This claim has no contemporary evidence; Cicero refers to the months as intercalaris prior and intercalaris posterior in his letters.[4]
hex literal
ah right
hey, I got a sick idea
what is it
what if we added 2 more months to a year?
brooo let's fckin do it
Historian Cassius Dio tells that Licinus, procurator of Gaul, added two months to the year 15 BC, because taxes were paid by the month.[5] Though not named by Dio, who wrote in Greek, August Immanuel Bekker suggested these might have been called "Undecember" and "Duodecember".[citation needed]
Yo shut up
Ah yes, taxes
always damn taxes
So they could milk +2 months worth per year
true

Isn't texas just an arid shrubland with small towns where people shoot eachother at noon while wearing cowboy attire?
Haha no

Don't ads please
No, that's Alabama!

Texas does have a thing for cowboy attires though
You'll see guards at the mexican border whipping people to stay out while riding a horse
And spitting tobacco on bins
no
we have walmarts
that sell guns
Do you pet tumbleweeds?
no we eat them
Does anyone know of a list of sussy nitro scam links?
Doesn't Discord host their own?
Javascript question:
Lets say I have args from a card lookup command. First thing I need to match is a category from a json of categories.
console.log(args)
//[ 'Final', 'Fantasy', 'TCG', "y'shtola" ]
The match for the category would be [ 'Final', 'Fantasy', 'TCG' ] as that's the name of the category and "y'shtola" as the name for the card
I can already set the variable for category no problemo by just setting category to the json category name.
how could I get the content after the category so I can set it to a variable named cardName?
Category can be many lengths with spaces and so can cardName
Is the JSON data big? How many cards are there?
This looks pretty inefficient but it works
Thank you 🙂
this is what the categories would look like if you were wondering. The card is not important in this case just returning basically what you did while. [category, cardName]
{
"Categories": [
{
"CategoryId": 4,
"Name": "Axis & Allies"
},
{
"CategoryId": 5,
"Name": "Boardgames"
},
{
"CategoryId": 16,
"Name": "Cardfight Vanguard"
},
{
"CategoryId": 6,
"Name": "D & D Miniatures"
},
{
"CategoryId": 18,
"Name": "Dice Masters"
}
]
}
It's longer however
Using regex might be a better way 👀
Loop through each object inside the Categories array and create a regex with the category name. Match it with the joinedArgs. If it matches, assign the matched string to category and break out of the loop and then slice joinedArgs with category.length to get the card name
Probably more inefficient than what flaz said but this is how I did it
let category
let check = args.join(" ")
for(i=0;i<cat.length;i++) {
if(check.toLowerCase().includes(cat[i].Name.toLowerCase())) {
category = cat[i].Name
}
}
if(!cat.map(item => item.Name).join("\n").includes(category)) {
const errorEmbed = client.extends.errorEmbed(`I could not find the category that you searched for!`)
message.channel.send({embeds: [errorEmbed]})
} else {
let cardName = check.slice(category.length + 1, check.length)
//More code...
Better off using ```js
const check = args.join(" ").toLowerCase(),
category = cat.find(_cat => check.includes(_cat.Name.toLowerCase()));
Or at least break the loop once you find the correct cat since it'd just continue looping for no reason otherwise
I'll try ur first example really quick but ya I forgot to break 
!cat.map(item => item.Name).join("\n").includes(category) could be changed to just !cat.some(item => item.Name === category) to avoid unnecessary mutation
never heard of .some but I'll also try that. Thank you
It's like array.includes() but it takes a function instead of string
Oh neato
Well you are already off to a bad start if you think that is java
Also why are you trying to use for each on an array with one element
In regards to this that you sent me
category = cat.find(_cat => check.includes(_cat.Name.toLowerCase()));
Can I have it only return cat.Name not { CategoryId: 24, Name: 'Final Fantasy TCG' }
I obviously can just do category.Name but figured I'd ask
Like cat.find(_cat => check.includes(_cat.Name.toLowerCase()))?.Name;?
ah yep
Ty
I need to study more on this kinda stuff. I would've never figured out .? would have been a thing either 
Doesn't seem like no reason to me
Also wrong channel
eww
can't I publish public packages to npm with names like this @blah/dlah?
you can
it errors, saying Scope not found. How do I create one?
it needs to be your username
Hi, my name is stupid.
To the point, I forgot what npm module could create a executable (and no, not react)
nvm electron
I think you should try to specify the language and what the errors are 🙂
Show your package.json code
Sorry. I was busy somewhere else. Try to validate your package.json with https://jsonlint.com/
JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format.
Yeah you're missing : after start
cc @pale vessel this is what i explained in the previous message 👀
for reference, obj is the object that the guy sent in here 👀
What's the purpose of Database Col Types? Like just to only have specific type of values in it?
did you mean: BTEC rust
no just R
R is a programming language for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing. Created by statisticians Ross Ihaka and Robert Gentleman, R is used among data miners and statisticians for data analysis and developing statistical software. Users have created packages to augment the f...

Anyone know R ?
maybe post your question instead of asking, it might be something general or something someone that doesn't know R can work out
you could've gotten an answer twice by now
Hello, I am trying to make a system that performs voice-gender analysis. I found a project about this on github but I'm new to R so I have no idea what to do. I'm building my project using node.js and using the r-integration module to include R. Since I can't find which function to enter the sound file in, I can't get the output correctly either.
https://github.com/primaryobjects/voice-gender/tree/master/Web
I imported 2 files into my own project (gender.R, server.R)
In this project, it reflects the output to the website, but my purpose is to log it to the console.
(translated by google translate)
Hey, everyone. I would like to ask that I have this mapped data code:-
const mappedData = Object.keys(inventory.inventory)
.filter(key => inventory.inventory[key] !== 0)
.map((key) => {
const { name, id, logo } = items.find((val) => val.id === key.toLowerCase());
return `${logo} **${name}** ─ ${inventory.inventory[key].toLocaleString()}\n**ID:** \`${id}\``;
})
.join("\n\n")
Although, sometimes, items.find((val) => val.id === key.toLowerCase()) can return undefined due to some coding reasons, how can I add a filter that if it was undefined, then it would contine or skip since I can't seem to figure it out.
There isn't an easy way
I would just write a single for loop, or if you want to do it this way then make sure the item exists beforehand, possibly in the filter callback
yeah get rid of that double loop in there, terrible performance
find inside map is bad
Maybe create a Map beforehand so it's faster
you'll have && map.has(key) in the filter
it depends on how big the data is tbh
copilot just breaks half the time
Does anyone have a list of malicious links
Private message me it please
Thank you.
make your life easier
direct link to the json
💀
lol the list
never trust the .xyz xd
I wonder how they collected them
or did they just use a AI to guess what they might be
probably just requests from users
what about discord fishing links?
in case we want some fish
discord sells fishing hooks?
the one that got me is on the list
how can you fall for this
some terrible timing and nice deception
Well that’s the issue not blocking JavaScript on random sites.
fun fact shifting bits to the left or right is an optimised way of dividing/multiplying by 2
disabling javascript cringe
Yeah that should be the default policy on any site, no exceptions
yuck
imagine having to enable that for each site I visit
that's just annoying
and so many sites depend on more javascript today
unless you're google
we have gigabytes worth of memory
That’s just the reason lazy people catching viruses, fall for scam links etc.
yet we scream at developers who add 10 kb for an animated header
people that call themselves front end devs can't write javascript properly
while turning a blind eye to steam games taking 200 gb of storage
it is, but disabling javascript shouldn't be our answer
How does that matter when being too lazy to enforce security?
we have many other means of security
This is the answer
Why do think is flash gone?
because slow
because steve jobs killed it
Just another example of an huge security hole
among us is a data miner
That’s exactly the answer, you gotta enable it for any sources you trust
why do you think most browsers enable it by default
because they know there's much more content the user cares about that supports javascript
RIP https://abc.xyz
Alphabet Inc. is a holding company that gives ambitious projects the resources, freedom, and focus to make their ideas happen — and will be the parent company of Google, Nest, and other ventures. Alphabet supports and develops companies applying technology to the world’s biggest challenges.
the stuff the user cares about as opposed to enabling it each time
lol
"enable javascript pls" for the user is just settling for average security
and relies on the user not being ignorant
Bullshit. Because people are too stupid to understand or use the internet, the browser, the Pc…
cough dm scams
Aye it does
There should be no reason to have JavaScript most of the time
Just a few annoying sites that still does client side react
You gotta enable it for sources you trust without any exceptions
is java going to fail in the lambda space for the same reason it failed with applets?
yes
Java Applets failed for entirely different reasons than lambdas.
lambda space?
aws lambdas, cloudflare workers, etc
ah, you mean it doesn't work there?
yeah, because of cold starts
i thought java failed with applets because it was so slow
thought you were talking about function lambdas, like (x) -> x
that's EXACTLY why I got confused
maybe serverless is a better term
serverless means it scales from 0 instances right?
dynamic scaling it seems
add and reduce resources for demand
java does have slow startup time
some things like graalvm improves it
you can increase the minimum heap size
that'll make the jvm start with more resources loaded
wouldn't that make it take longer to load?
not really
like, the jvm start time will be the same, but it'll run whatever ur running in it faster cuz it'll unload less stuff
usually you want to set -Xms based on your available ram
instead of leaving it at bare minimum
there are also a lot of optimization args you can use
i guess it wouldn't slow it down. it's just claiming the ram, not actually doing anything to it initially
ye
the hello world aws lambdas for java use 512mb and the nodejs use 128mb
lower xms means the GC will collect more stuff due to lower bottom limit
lambdas can help hide java memory leaks too
because they shut down and spin up all the time
and nodejs memory leaks
the GC is shutting down the instance
google needs to work on the jvm
zgc is zero-latency garbage collector, it doesn't halt the runtime
but oracle sued them
there's also shenandoah depending on ur jvm version
kekw fuck oracle
and now java is dying
tbh it's been a looooong time since I used oracle's jvm
nah, not really, there's still openjdk and ibm's openj9
google wanted to make a nicer version of the java api
like micro java or something
JetBrains's
oh, now kotlin has +10 social credit with me
this is an interesting thing about java
about the try/catch/finally issue with java
and the type system
tcf issue?
the exception system makes me hate java more than i already do
it forces you to explicitly label/handle exceptions
not really, there are 2 types of exceptions
that is a good thing but annoying
Exception is for exceptions that are expected to happen if you fck something in the code
"runtime exceptions"
while RuntimeException is something that might happen due to user input
then idk
you're talking abt Exception
something like threadsleeptimeout
that's Exception, specifically InterruptedException
^ that's why it requires try-catch/throws
Hello Fellow coders
i am in dire need of assistance
updating java onto a debian machine
is anyone able to help me pelase
help
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: unban_error() missing 1 required positional argument: 'error'
i can't seem to fix this
okay
I think the complaint is the design choice of handling exceptions. Some methods have checked exceptions, some are unchecked. Some methods return signal codes rather than exceptions (e.g. indexOf), while the others just throw and break the control flow.
Personally, I like languages where exceptions are a last-case scenario only in cases of emergency, like Rust where you have an Error enum (treat it like any other enum), or you can panic!, which acts external.
example?
i dont use rust but it sounds interesting
Sure, though I was slightly wrong—Rust has a Result type.
use std::fs::File;
fn main() {
let f = File::open("hello.txt");
let f = match f {
Ok(file) => file,
Err(error) => panic!("Problem opening the file: {:?}", error),
};
}
f is a Result containing either a value (Ok), containing a file, or an error (Err), containing some value (usually from the Error struct).
In the code, f will only be a File because if an error occurred, the program would've panicked (crash). Most people just let errors propagate and be handled explicitly.
With the system, you don't have to consider if some call will throw an exception since there's no throwing. You handle the error explicitly.
Rust seems like an interesting language to learn I just dont have the mental capacity to stay focused to learn it

don't worry most of us don't
Rust is interesting, but I'm mostly building applications that'll be used by general users
All the low-level capabilities and "blazingly fast" technology is simply not a necessity.
Rust also has the ? operator which makes error handling sooooooooooooooo much cleaner and easier
Yeah but you're just delegating the problem to someone else
yeah, handle all ur errors in one place
That sounds good on paper but usually doesn't work in practice.
Since you're in such an abstract position where you can't.
can u give me an example?
i don't really code in html
i just tried making a desc
for top.gg
that's it
but like idk anything ab it
that's what i did
i couldn't find out
how else do u think i made this "desc" 😂
without knowing anything in html
or just a simple inline-block?
shh
lel
For some reasons i find it kidna rude lol
kinda
i literally said i don't know anything about html
so what a perfect time to learn
well then you may be out of options 
If u say so 🤷♂️
when the server access you
but well, you probably flipped the formula
it's current - before not before - current
negative response time is still possible because of Snowflake timestamps
something something discord is weird
eh?
You litterally cannot have a negative latency, time does not allow it
anyone have any massive lists of phishing links?
I've gotten negative latency even with the correct formula
I think it depends on if you hit when machines are synchronizing their time
createdTimestamp and edited timestamp

Discord doesn't have a nuclear clock it seems
And you do this to measure the REST latency or the WS latency?
and you take the timestamp differences instead of just measuring the Round trip latency which is the thing you actually care about because??
Yeah. Of course I have to await them so it is round trip
what
message = await send(stuff)
update = await edit(newStuff)
edit(update.editedTimestamp - message.createdTimestamp)
not exactly that but im on mobile so
that example is bidirectional
Discord has to respond right?
anyone have any massive lists of phishing links?
why do you keep asking this
cus i need more xd
why???
trainin AI
gOTTa mAKe the MOD bOt
You don't really need an AI to detect links similar to discord's
mate you got a better chance just using the defacto spam detection algorithm than trying to do some fancy AI based purely on links
yes, but overdoing is it pog
its not pog
- levenshtein distance between the name of the site and "discord"
- If the domain name is not .com
Is enough to detect a scam link
a personal, generic discord bot
just for whatever server I want it in
like my own
it's mostly just information, like retrieving a user's avatar, trivia, wikipedia articles, etc.
thats quite hard because you would need a pretty big edit distance which gets pretty slow
Error
if (command.aliases.length === 0) command.aliases = null;
^
TypeError: Cannot read property 'length' of undefined```
Code: https://www.toptal.com/developers/hastebin/kisoluqopi.js
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
error is command.aliases is undefined
so you should figure out why it's not set sometimes
i have client.aliases = new Discord.Collection();
omg
then what do i do?
Just read my second sentence
It’s basically a map, which also has no length property but a size
That's not the root of the problem though
And I doubt command.aliases is actually a collection
It's common for people following a Discord.js guide to make the global aliases a collection but export aliases as an array
I guess command.aliases is one too then since we don’t know better
But yes it’s just guessing until he’s telling us more
99.9% sure they're using an array
given (client/command).aliases
what does an alias attached to a command have to point to
Yeah it is just checked his link
It’s probably at least one command he loads without an alias defined in the structure
ah
well I did add a new Help command
it started having the issues when i added the new command
I think i found it
yep i found my issue
You didn’t define aliases in its structure
yep
Also remove the statement from your code
I FIXED IT!
if(command.aliases) …
else command.aliases = null;
You should always be consistent in your module structure
If no alias exists then define aliases: null in the module
Checking for each property of the module in your code when loading it is inefficient.
Keep the structure consistent, always
Or you will run into the same issue next time you do forget an alias again
@boreal iron I forgot to add js aliases: [], In my New Commands I coded
when i added it to the commands it worked
if(command.aliases) …
else command.aliases = null;
And I got this in my Output So I knew it worked
⚠️ I am in 5 Servers ⚠️ ⚠️ and I am in 113 channels ⚠️ ⚠️ and 37 Users use me ⚠️
It shouldn't be that bad. Just default to an empty array (or nullif you're fine checking)
My bot sends a Incoming Request to one of my webhooks and It tells the webhook what to send and every time My command works i have it logged in a channel saying
"Command Was Registered and was Successful "
He wouldn’t have that issue when changing his statement as I wrote or being consistent in his modules
Yeah My commands Only work if the Module is written in my Index
And sometimes i am an idiot and forget to add the module in my index
I mean we could go on and step through your code but hmm… no time to
Also think about to not listen two times to the same event
You have 2 event listeners for message events
0.98666666666
Trolled a game dev scammer. Was fun to know that they're really dumb when it comes down to actual code stuff
why does this say unexpected indent?
because the intent was unexpected
because python cares about indentation
indentation creates scope
your scope is where await is
yet you've indented it by two blocks, creating a different scope
when i indent await twice it says - unindent does not match any outer indentation level
what does this mean?
its the indent
you're supposed to remove the indentation
ok thank you
im trying to make a system to where it checks a verification status via http request. the request is contained in a function and i set the function equal to a variable named status. the issue is the code is running before the function returns a response making it an undefined promise. how can i make the program wait until it receives a response?
code: ```js
let status = await verify(message.author.id)
console.log(status)
if(status === "error") {
const collector22 = m1.createMessageComponentCollector(filter, { componentType: 'BUTTON', time: 200000 });
collector22.on('collect', async (i) => {
if(i.customId === 'continue_verify') {
status = await verify(message.author.id)
if(status === "error") {
console.log('g')
err(message)
} else {
console.log('h')
next(status, message)
}
} else {
console.log("hh")
next(status, message)
}
})```
You could check if Discord.js provides a simpler method than createMessageComponentCollector, like how they have .awaitMessages that returns a promise resolving to the messages returned.
The issue isn't with the collector, its that the code is running before it gets the response from the verify() function.
Yes, and that comes from using verify with the collector callback.
Like I said, you can either do what I said above, or you could programmatically create a promise yourself and wait for it to be resolved.
Alright I'll look into it.
why is this invalid syntax?
does it need indent
it says unexpected indent afterwards
its basically a command like the dank memer post meme just adjusted
yeah wasnt sure how much i was allowed to put but here
You should put as much details as possible that you think is relevant to your problem
But this may be due to something missing to pair the else: with and/or an indentation error.
Usually you'll use else: with if: or try:
e.g.
if day == "Friday":
print("Yeah, Friday!")
else:
print("I hate my life.")
What does else: in your code pair with?
i got it thanks for this
const modifier = require(`${process.cwd()}/util/modifier`);
const message = await modifier.modify(`{user}, Joined the server`, member);
return client.channels.cache.get(data.greeter.welcome.channel).send(message);
../util/modifier
const moment = require('moment');
async function modify(str, member){
const owner = await member.guild.members.fetch(member.guild.ownerID);
const modifiers = {
"{user}": member.user.username,
};
const regexp = new RegExp(Object.keys(modifiers).join('|'), 'g');
return str.replace(regexp, word => {
return modifiers[word] || word;
});
};
module.exports = { modify };
user should be the member.user.username but for some reason it's nothing (it was working before!)
any help?
Can anyone can help
Umm wait
import discord
client = discord.Client()
@client.event
async def on_ready():
print('we have logged in as (0.user)'.format(client))
@client.event
async def on_message():
if message.author == client.user:
return
if message.content.startwith('$hello')
await message.channel.send('Hello')
client.run()
@dry imp
do you know what the error means?
and dont ping multiple times
💀
you know how to code in python?
Am beginner
you should learn the basic first
Ok
im saying this because you might come into the same/harder problem and you wont know how to fix it
indentation is very simple and if you dont know what indentation is then you should start with somethn simple first
u need to indent the return statement under the if statement. like press tab before the return statement smthing like that check this out https://www.educba.com/indentation-error-in-python/#:~:text=The indentation error can occur,can be a show stopper.
python is beginner friendly, they said...
it is
unless you are a beginner expecting to get spoonfed
mfw indentation causes errors
python has semi colon? 💀
never used it yea
It’s just a thing that helps if you’re a psychopath
💀
Indentation is one of the main reasons I hate python so much
Makes it harder to see unintended behavior
“I wanted this variable in this scope but I accidentally put it in the wrong scope and didn’t know why my program wasn’t working properly”
naa
Yea that's for the help

and this line
if message.content.startwith('$hello')
add : at the end too
yea
But if you copy paste
but it should automatically format, depending on what text editor u using, if he using idle then understandable
i see
How do you handle guilds,which use your bot for abusive stuff? Since I have a guild,which used it for an acc shop.So I just disconneted all listeners for the guild.
Yea I done that
Umm
Can I anyone can tell me
How to add .env file
Perhaps implement blacklisted guild IDs system, where your bot leaves a guild it joins if you mark it as blacklisted..?
Not the doge pfp 
What
Long story.
Ohh
I’m sorry for his loss 

thats how it look likes
Do you have an eval command?
yes
If you have the guild Id you can force the bot to leave it.
so its not my problem,that they used our bot for malcious stuff?
I mean you gave Discord your ID right lol
Probably make a TOS and say Do not use bot for X stuff blah blah legal stuff. But I imagine you have liability for this especially since you know about it.
Replit laging again 
yeah we have a tos and policy
"Any type of Selfbotting or Misusage of our Bot is strictly prohibited
You are not allowed to break the Discord TOS or third-party TOS.
""
import discord
import os
client = discord.Client()
@client.event
async def on_ready():
print('we have logged in as (0.user)'.format(client))
@client.event
async def on_message():
if message.author == client.user:
return
if message.content.startwith('$hello'):
await message.channel.send('Hello')
client.run
Can anyone can tell whats worng with it 😑

oh
It's because of laging
if message.content.startwith('$hello'):
await message.channel.send('Hello')
``` this line is outside of ur on_message event
ig
thats why
I don’t know how py libs work very much, but shouldn’t it be on_message(message):?
yea
Ummm
To create .env file do we have to create sectret and name the key .env file ???
homie doesn't even know how .env files work?

Not the weeb pfp 😭
Can't be weeb if not real anime :^)
for example
key token
value your bot token
And call process.env.token
because repl deprecated them
homie doesnt know what is key and value tho
Me?
thats js
And how to use sectret
not u

Oh i didnt see he is using py
then they probably ignored the lines learn js before reading this on discord.js guide
I showed for js dont know how py works
Ohh
*py
i might be wrong but there is this thing called google and you can find answer there
but ill help you anyway
let's make it a rule to always slap whitenames with the docs
child
a fake bash terminal in html
with who
ur mom
your mom

baited
why its bad tho
Pay to use
at this point mee6 is better than carl-bot
because cough every fucking thing on discord should be free right? right?
they fucked carl-bot real bad
And only feature is dashboard
F
ever since botlabs owned it
carl bot fucked me real bad
well
there must be some
free commands
too
no
💀 imagine listening to music on discord
Think it
well
imagine not using adblock
this tbh
but discord vc the quality is shit
no flex but opera's sidebar player can skip spotify ads
If i add music bot ill have better music bot
And I don't have to lose my pocket money to mee6
yo never knew that 😳
thanks for info
switch to opera, safari user
gonna get banned soon
adblock can remove spotify ads lmao
I am not listening music on discord just an example
important bookmarks
Spotify premium
what.
youtube vanced
vanced lame

why is that still a thing
i thought youtube would take action against something that literally destroys their only source of income
i had to download mod apk for spotify prem
can i have your home address
not really noone cares abt vanced
Just open new account and enter fake payment
this knife needs some sharpening
Its fbi scret
:)
lmao but free trial expires too yk
Then best idea for you just download musics you listen
sectret
Did you guys noticed? Youtube Music have better quality than Spotify.
I don’t think so
YouTube music forces me back to the same 3 songs every time I click on a playlist
and YouTube Music just uses YouTube
It doesn't
it does
Test it on max quality vs YouTube Music
youtube music is bad
Music quality doesnt depend just on the app you are using. It depends on your internet connection, the earphones you are using, your device, and mostly your ears
Spotify uses 320 Kbps MP3 and youtube music uses 256Kbps AAC. But in daily life you will not notice the differences. AAC codec is much better than mp3 and those instrumentals are very clear where Spotify will give a little bit more bass that you will not notice in your everyday life.
I just need my songs to play while im working. 💀
Just try same song on Spotify and then YouTube Music. Same 30 seconds. You will figure it out.
damn malik, you really loves songs and frequency huh
Bro.... like literally
😂
If im not gonna notice something in my everyday life, im not gonna spend my time trying to notice it
I just noticed. Accidentally because I got premium subscription on both.
I could not possibly care less about the slightly better instrumentals on YouTube music when the automatic playlists there suck ass 
It’s like YouTube music is intentionally trying to play my most hated songs on repeat
Waffle you love those songs secretly dont lie
Why do i get this error and how do i fix it? DiscordAPIError: Invalid Form Body 11.options[1].type: This field is required 11.options[2].type: This field is required 11.options[3].type: This field is requiredcode https://srcb.in/qvASF9xatE
Command options are supposed to have types like STRING or BOOLEAN
Ye raha
Lmao
Fr, like those slight differences are really not noticable in daily activities....
can someone tell me why I can't see the invite ppl option?
you dont have the permission to invite people
How can i color this buttons and other to a custom color?
css
ik but idk what css it use
like i just want to change it color
i want to know what class it use
inspect
ye inspect
Nope you’re in queue and gotta wait like anybody else.
Bsdk yaha to sudar ja
reminds me of a song
you gotta wait like everybody else
anyways bye
please stop saying bb it sounds like you're saying baby
Okay bb
bb
something is badly indented
if blabla:
<-->another code
<-->another code
<-->another code
<-->else: <------ ERROR
bruh, at least give me 10s to read anything
red snake = error
Oh god
indent
This is why I don’t check this channel
your return is at the same level as the previous if

INDENT
while that did sound rude, he's right
Ok keep getting spooned
you're missing basic python syntax knowledge
like, python requires STRICT indentation
you need to have a certain indentation inside blocks
_that’s why you don’t use a snakish language _
if ...:
TAB code
TAB code
TAB code
TAB return
else:
TAB code
TAB code
you can't have```
if ...:
TAB code
TAB code
TAB code
return
else:
TAB code
TAB code
cuz the return is misaligned there
@earnest phoenix don't simply go away
read this ^
- u have to pay
run
Lmao
I don't get why people jump right into python thinking it's easier
I mean, it does LOOK easier, but it's as hard as, say, JS
maybe somewhere between lua and js
...I pointed where the error is
^
it generally is
and has most of what an application wants built in
press tab
or whatever u used for indentation
whatever u put before the if, put before return
be it space, tab,  , etc
On mobile you should use spaces unless you have a special keyboard with a tab key
Do you have a computer you can use? If so, it’s easier to use something like vscode, sublime, or atom
You get stuff like intellisense
wait u were coding on mobile?
probably because you don't have a specific version set in your package json
does anyone know how to upload files to scaleway object storage using nodejs
I would just use their s3 api
i tried
but i;m getting errors
its saying path.replace undefined 
You want to go lower then v12?
even tho its the module returning the replce error
no
Using the aws library?
It’s the scaleway one
I dont know the scaleway library
You can use any s3 library if the scaleway library doesn't work
Alr
'Need some help,
Let's say I have this array stored somewhere
[
{
"1": "test",
"2": "yes",
"value": "h"
},
{
"1": "ball",
"2": "pit",
"value": "fun"
}
]```
And then I have a array of message content arguments, how would I search thru the first array if the message includes both of those in 1 of the keys
So you want to see if a message contains test and yes in this case?
Yeah from what it looks like you just want an array
Those keys are pointless
You’d just be adding extra processing time
Yes
What do you want the keys for
Alright let me say the point of this
I'm making a "ai" bot
User sends a dm with their issue
The bot looks thru the content
updated it again
I’m still confused
So lets grab the first key which "1" & "2"
And the message is I like test which yes
It should look thru all the args
I, like, test, which, yes
It should search thru and see if something matches
Use an array, not an object then
How would I use it then?
If the array includes something from your message, send whatever it was you were going to send
There are going to be 2 arguments that will be used
Then use &&
I’ve got to go, this sounds like you’re over complicating it. If you’re just grabbing values from an object regardless of keys just to respond once to it then you probably shouldn’t be using an object
just a tip, you're in to a LOT of trouble
what you want to make is a neural network basically
cool
cool yes, but there's a reason there's a whole specialization about it
i just gave up with scaleway
moved to google cloud storage instead
Why this reply isnt yellow
But shouldn’t a user mention be yellow
Itsnt reply
not if u disable user mentions
like, u can make a message mention the user but not ping him
See the picture, it is @ something
there's another
like, u can make a message mention the user but not ping him
bots can mention without pinging
even without replying
well, I tried to find it in the docs but too lazy to click on all links to find the part about allowed mentions
but basically you can disable pinging globally
And thats not solve of my problem thanks
where is the error?
/workspace/node_modules/discord.js/src/rest/RequestHandler.js:154
throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Invalid Form Body
embed.thumbnail.url: Not a well formed URL.
embeds[0].thumbnail.url: Not a well formed URL.
at RequestHandler.execute (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
method: 'post',
path: '/channels/804274092730875904/messages',
code: 50035,
httpStatus: 400
}
embeds[0].thumbnail.url: Not a well formed URL.
Your .setThumbnail url isnt valid
anyone know how to set Auth keys on Google Cloud storage nodejs module?
yeah but i have my bot running from 9 days ago and i don't know the error is
sanitize your inputs
where is that error happening?
maybe it's a wrong imgur url or null user avatar
It's because you don't catch errors of your promises
yes but how do i set them
read the docs
couldnt find it ¯_(ツ)_/¯
and i fixed it already
deleted the command 
that's indeed a working solution
const modifier = require(`${process.cwd()}/util/modifier`);
const message = await modifier.modify(`{user}, Joined the server`, member);
return client.channels.cache.get(data.greeter.welcome.channel).send(message);
../util/modifier
const moment = require('moment');
async function modify(str, member){
const modifiers = {
"{user}": member.user.username,
};
const regexp = new RegExp(Object.keys(modifiers).join('|'), 'g');
return str.replace(regexp, word => {
return modifiers[word] || word;
});
};
module.exports = { modify };
user should be the member.user.username but for some reason it's nothing (it was working before!)
any help?
why do you fetch the owner if you dont use it?
I will check it
@lyric mountain I still can't find the problem it looks okay for me
try using replaceAll first, your method is prone to regex injection
return str.replaceAll(regexp, word => {
return modifiers[word] || word;
});
?
not working
^
kk
how can i send message to a specific channel with channel id (v13 slash commands)
fetch the channel, proceed as always
like specifying the id and sending it with "test.send(etc. etc.)"?
because i tried that and it doesn't work weirdly.
no
guild.channels to get all channels in a guild
then either use cache or fetch depending on whether ur caching or not
oh alr its working now
thanks
btw can we set a minimum integer like 1000000 or something
For slash commands? No.
The types are very unspecific and I doubt that will change soon.
You need to validate the input yourself even if Discord (already) enforces the type.
Bruh later i discovered that the problem was from the sentence that stored in the database 😩
Anyway sorry for that and thanks for your helping @lyric mountain
actually yes
lol
it's been a thing for two months now
Well I’m not studying the docs everyday to look for changes 
Do you?
exposing you for late reply
I’m not hanging around in general the whole day like you lazy OS dev
I’m working to keep the economy running , Sir!
Which means I just randomly open discord if i have time for
actually i've been quite busy
waiting for interview decision for a job and whilst i did i was lining up another job interview in case i get declined from my primary choice
im all set
now i sit back and relax
Still, use replaceAll
gl speedy
Concatting usernames into regex is dangerous
Works as a door dasher
Why
because if my username is .+ you're not going to have a fun time
That would actually be an easier job… and less time consuming
janitor?
Injection
lmao
Users could set their username in a way to fck ur code up
Read the story of "little bobby tables" and you'll understand
Someone grab the xkcd url please

Anyone has any idea why I'm getting 502 on https://astro-bot.space/api/v1/info ?
I'm using ktor for the web server
But it's weird that I get 502
it shouldn't be ktor
you know you're an average java developer when you use log4j instead of your own logging
502 means the proxy_pass target can't be reached
query localhost:11000 through curl on the host machine first
on the vps?
yes
Yes on the local host
It bugged idk why
so weird
Yeah I love it tho
But
Sometimes intellij completely bugs
And doesn't analyze code correctly
Still unsure whether spring would be better
doubt
maybe you should fix your server first
when will this be updated to 3.10?
no maintainer
hm?
does python break libs every single version?
cuz like, shouldn't 3.6 suffice for later versions until 4.0?
not really
wdym "no maintainer?"
nobody to update it
research how to use a flex box or grid layout



