#development

1 messages ¡ Page 2058 of 1

wheat mesa
#

dear god I've overcomplicated this

quartz kindle
#

lmao

#

wait wheres that meme

wheat mesa
#

lol

#

that show is amazing

quartz kindle
#

i dont even know what show it is

wheat mesa
#

community

#

it's a comedy

quartz kindle
#

but its the standarized meme for "text is too small, cant read"

earnest phoenix
#

stereotype comedy

split hazel
#

is it because their eyes are narrow

wheat mesa
#

I have to think about my design again ugh

#

How should I represent my ECS, I have a GenerationalIndexArray<T> right now for each component

#

Which is basically just a vector, but more efficient

#

But the problem I'm facing is the fact that I need to be able to iterate over each component in different systems, but I don't know how to access them mutably

wheat mesa
#

Does anyone know how to get the components from the struct based on their type ```rs
pub struct Ecs {
pub entity_allocator: GenerationalIndexAllocator,

physics_components: EntityMap<PhysicsComponent>,
render_components: EntityMap<RenderComponent>,
// pub components: AnyMap,

pub physics_objects: Vec<Entity>,

}
with functions that look likers
pub fn get_component<T: 'static + Component>(&self) -> Option<&EntityMap<T>> {

}

pub fn get_component_mut<T: 'static + Component>(&mut self) -> Option<&mut EntityMap<T>> {
    
}
radiant kraken
#

The beauty of C is the segmentation faults and undefined behaviors

wheat mesa
#

yeah I'm saying fuck it and using specs instead now

sonic lodge
#

👍

sterile lantern
#

is it possible to essentially do this, add a role then return a message (and not run through rest of code)

radiant kraken
sterile lantern
maiden swan
sterile lantern
#

nah i just dont want it to run through the rest of the code

#

like its just checking if someone has a role

#

if they do, then i dont want them to be re-entered into something

maiden swan
#

you can do a break statement, or return 0

sterile lantern
#

i just did && lol

#

return add roles && send msg

maiden swan
#

that works as well

radiant kraken
wheat mesa
#

Meh

#

Fake it till you make it

#

Only been doing it for like

#

2 ish weeks

quartz kindle
#

@earnest phoenix i've been meaning to ask about this for years, why is Buffer.latin1Slice not documented anywhere? as well as other Buffer methods like hexSlice

#

like many of these have never been documented nor discussed anywhere

#

lots of other properties that exist on Buffer are also not documented nor typed, like Buffer.offset

radiant kraken
#

never knew that

quartz kindle
#

it seems they are all aliases for .toString(encoding, ...) and .write(..., encoding)

#

but there are some minor performance differences (used to be major differences, not anymore)

radiant kraken
#

then you probably have the reason why it wasn't documented

earnest phoenix
# quartz kindle

I'm not exactly sure what they were used for, but from what I've seen, I suppose they were either the original methods that were internally used, or was just documented but then undocumented for certain reasons

#

I think barely anybody in the organization even knows about those

ancient nova
#
welcomeMessageChannel.send({embeds: [welcomeMessageEmbed]});
``` how to capture the error if there isn't a channel I can message?
#

it still detects but doesn't seem to have permission to type there, is what I'm saying

ancient nova
#

my guildBanAdd event doesn't work, like at all

#

for no reason

tepid canyon
#

do you have the guild bans intent enabled?

tepid canyon
ancient nova
#

I think I enabled every intent there is tho

ancient nova
#

intents: [ Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MEMBERS ],

#

that's all the intents I've gotten

tepid canyon
#

Need Intents.FLAGS.GUILD_BANS

ancient nova
ancient nova
#

it does find it though since it does work

tepid canyon
#

If it finds but doesn't have permissions to send messages/ embeds, either need to put it in a try catch setup, or just <channel>.send(...).catch(...)

ancient nova
#

the event still doesn't fire

#

or is there something wrong with my code?

wheat mesa
#

what event doesn't fire? @ancient nova

wheat mesa
ancient nova
#

no idea why

#
module.exports = async (guild, user) => {
    const settings = getSettings(guild);
    if (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 guildBanLog = new MessageEmbed();
            
            guildBanLog.setTitle("Moderation Logs (Action: Member Banned)");
            guildBanLog.setColor(commandColor);
            guildBanLog.addField("Member Banned", user.tag + `(${user.id})`);

            return channelCheck.send({embeds: [guildBanLog]});
        }
    }
}
``` DiscordAPIError: Missing Permissions
#

I have no idea whether it's my fault or not

#

oth guild and user seem to be undefined?

wheat mesa
#

(guild, user) is not a thing according to the docs

#

it's just a ban object

#

you could do ({guild, user}) I believe

ancient nova
#

didn't work

wheat mesa
#

then use it like the docs say to use it

#

just (ban)

ancient nova
ancient nova
#

how else am I gonna get the guild?

#

or the person banned?

wheat mesa
#

read that and you'll see

ancient nova
#

I have

wheat mesa
#

obviously not otherwise you would know

#

that's what's given

ancient nova
#

oh so getting the ban parameter and doing ban.guild would work is that what you're saying?

#

that didn't appear to work either

wheat mesa
#

try debugging

ancient nova
#

I have, returns either undefined or Object object

wheat mesa
#

all I can tell you is what the docs say, I haven't seen more than like two lines of code

viral spade
#

anyone else getting "internal server errors" from discord api?

ancient nova
#

I panicked so hard I started clearing cookies n stuff accidentally deleted like 350 saved passwords

#

cool

#

I wanna die

wheat mesa
#

Ah yes because ddos = delete saved passwords 5Head

ancient nova
#

I got logged out of everything what am I supposed to do

wheat mesa
#

Funny thing is it seems like discord went down for everybody except me

ancient nova
#

it literally went down as my bot started dming me random errors

#

I got scared 😭

wheat mesa
#

Your bot probably isn’t even hosted anywhere near you

near stratus
ancient nova
ancient nova
#

so that's why other websites died as well

#

I legit thought someone hacked my PC started messing with connections idk why

wheat mesa
#

? ok then

ancient nova
# wheat mesa ? ok then

wouldn't you think the same if every website you visit suddenly has the 500 server timeout error seconds before your bot spamming ur dms about errors for no reason?

wheat mesa
#

No I would not

#

I would assume that there is either an issue with my home internet provider or an issue with top level companies such as the one that caused this exact issue

#

And given your bot also gave you errors then I would assume the 2nd one since my bot is hosted a thousand miles away from me :p

ancient nova
near stratus
#

You know you should have tried plugging out and plugging in your router first

ancient nova
#

even if an external library dmed the errors somehow to me how does it know my discord ID?

ancient nova
#

even restarted my PC

ancient nova
wheat mesa
#

Bot ain’t gonna randomly do something you didn’t tell it to

near stratus
ancient nova
wheat mesa
#

Your bot didn’t just become sentient and dm you errors out of the blue

boreal iron
wheat mesa
#

“Hey nodejs you know what would be funny”
“What”
“What if I became sentient and sent this dude errors to fuck with him”
“Yeah bro go ahead”

ancient nova
wheat mesa
#

I’m just saying that I hiiiiighly doubt you got sent errors without putting that in somewhere

near stratus
#

The bot started to DM random error

#

out of nowhere

wheat mesa
#

Never heard of that before

#

However no new features have been released for this event

near stratus
wheat mesa
#

I wouldn’t lay a finger on djs anymore KEKW

near stratus
ancient nova
#

¯_(ツ)_/¯

near stratus
#

13.8 works fine

ancient nova
#

I swear I didn't ever put any snippet of code that will make it DM me an error

near stratus
#

I'm not talking about this error anymore

ancient nova
#

I know, but I'm talking about the error I got

near stratus
#

I''m talking about the past when a library started breaking on it's own

boreal iron
#

Tbh moving to v14 now when editing your code makes sense as lot of stuff got changed again

#

yeah takes a while, while driving

ancient nova
#

but since upgrading I didn't get any error

near stratus
boreal iron
#

lol

#

They did things like on each major version

#

As least as long as I’m using it

#

Some days ago with the latest dev build lots of functions from the util class have become available globally

#

Idk why tbh

#

It’s confusing and I had to update my recently updated code again

radiant kraken
split hazel
#

@quartz kindle ima try the oracle cloud thing on a diff card now

#

completely different email and incognito mode in case they banned those too

boreal iron
#

Report back when you got in jail

split hazel
#

aight bro

#

idk why i got banned

#

they wont tell me why

#

its like i committed fraud or something

#

and i havent even signed up 💀

#

its probably because they saw that i faked my details initially

#

bc i dont feel comfortable giving oracle every spec of my info

#

but looks like i have to

#

declined again

#

but this time i think its because the bank is blocking it

#

i got a different message saying to check my details

quartz kindle
#

if it still doesnt work, send them an email from this new email of yours and tell them that its not working

#

if you're lucky, you'll get "we fixed some things and it should work now"

#

then it will work

wooden ember
#

is there an event for when a bot is kicked from a vc?

solemn latch
fathom sonnet
#

this starting ti be annoying, any1 know what can be cause of this?
I was making simple timoeut command,
After I restart bot, and call this command for the firs time. everything works fine, but after i call it for second time, I got this error...

BTW, i tried mongo forum & stackoverflow, bot it didnt help

const { SlashCommandBuilder } = require('@discordjs/builders')
const { MessageEmbed } = require('discord.js')
const Schema = require('../../models/timeout-schema')
const OWNER_ID = require('../../config/cfg.json')





module.exports = {
    data: new SlashCommandBuilder()
    .setName('timeout')
    .setDescription('Timeout a user for a set amount of time')
    .addUserOption(option =>
        option.setName('user')
            .setDescription('The user to timeout')
            .setRequired(true)
    )
    .addStringOption(option =>
        option
            .setName('duration')
            .setDescription('Duration of the timeout (In Minutes) ')
            .setRequired(true)
    )
    .addStringOption(option =>
        option
            .setName('reason')
            .setDescription('The reason for the timeout')
            .setRequired(false)

    ),
    async execute(interaction, client) {
        try {

            if(!interaction.member.permissions.has('DEAFEN_MEMBERS') || !interaction.member.id === OWNER_ID ) {
                interaction.reply('You are not allowed to use this command!!')
                return 
            }

            let user = interaction.options.getUser('user')
            let member = interaction.guild.members.cache.get(user.id) || await interaction.guild.members.fetch(user.id).cache                
            let duration = Number(interaction.options.getString('duration')) // Getting number from string
            let reason = interaction.options.getString('reason')
            if(!reason) reason = "No reason given" // If no reason is given, set it to "No reason given"
            
            let embed = new MessageEmbed()
            let embedPublic = new MessageEmbed()
            // need to get choices from option
                


                // DM Embed
                embed = new MessageEmbed()
                .setTitle('Timeout')
                .setDescription('You have been timed out for **' + duration + ' minutes.' + '\n**Reason: ** ' + reason + '**')
                .setThumbnail(member.user.avatarURL({dynamic: true, size: 512}))
                .setColor('#F66969')
                .setTimestamp()
                user.send({embeds: [embed]}).catch(() => { interaction.reply({ content: `I am unable to send message to ${user} because they either blocked communication with the BOT, or they have closed DM's.` }) })


                // Add the role to the user
                member.timeout(duration, reason)




                // remove role from user after duration has passed
                embedPublic = new MessageEmbed()
                .setTitle('User Timeouted')
                .setDescription(`${user.username} has been timeouted for **${duration}** minutes.
    **Reason**: ${reason}`)
                .setColor('#A7FFBE')
                .setTimestamp()
                interaction.reply({embeds: [embed]})
                



            Schema.findOne({ Guild: interaction.guild.id }, (err, data) => {
                
                if(data) {
                    data.User = member,
                    data.Duration = duration
                    data.Reason = reason
                    
                    data.save()
 
                }
                else {
                    new Schema({
                        Guild:  interaction.guild.id,
                        User: member,
                        Duration: duration,
                        Reason: reason,
                    }).save()

                }
            })

        } catch(err) {
                console.log(err)}
    }

}
``` here is whole code for timeout...
wheat mesa
#

Again, like before you’re adding the entire member object to your schema, when it’s not going to know how to serialize that. You need to be adding member.id, not member

fathom sonnet
#

Ahhh... Tnx man

sharp geyser
wheat mesa
#

turns out you can learn a lot in 2 weeks

#

I've got a decent understanding of rust now but I'm still working on understanding how to better structure an application

sharp geyser
#

I also have a decent understanding for only using it for 2 days

#

I at least understand the major parts of rust at a basic level

#

at least all the ones you told me to look at mmLol

split hazel
#

@quartz kindle turns out my bank flagged the transaction as fraudulent and placed a block on my card

#

i honestly dont blame them if i saw oracle trying to take 80p out of someones account id block it too

quartz kindle
#

lmao

split hazel
#

but it should be running again in 10 minutes

#

hopefully they havent blocked my card now because my bank blocked the transaction and refuse to tell me again why

wheat mesa
#

I got my card blocked when I was 13 or 14 for a full day because I was trying to buy PC parts after I had saved up enough for it

#

They blocked my card after I spent 60 bucks on a case lmao

split hazel
#

lol apparently some random company ive never made a transaction to taking 80p from my account aint usual activity

#

aight ima try again watch it get banned

wheat mesa
#

It also might be known that there is a verification charge for many VPS providers like Oracle, and I figure it wouldn't be too uncommon for people that get their cards stolen to be used as a botnet on VPS services

split hazel
#

bro why is it so hard to give 80p to oracle

wheat mesa
#

call your bank and tell them to fuck off

split hazel
#

i promise i havent done anything 😭

#

it might be because its a new card

#

yeah they havent banned my account i can try again

#

oh wait

#

could it be because im using brave

#

which blocks trackers

near stratus
# split hazel bruh

Awhile ago I saw an article somewhere that said because of it's free tier VMs Oracle can't process that many user requests so they're using an "AI based system" to fend away bots or Random users who're using it for free tier perks only.

#

I'll se if I can find the link

split hazel
#

💀

#

so tim is a business user who is clearly not trying to freeload but i am 😭

#

what if i tell them im running a startup business who is planning to use oracle

wheat mesa
#

I've had a VPS with oracle for like a year now, wonder if they'd let me hop on that 24gb ram train

split hazel
#

i need to wait like 6 minutes before my email verificaiton link expires otherwise it wont let me make a new one

#

oracle is a shithole 💀

boreal iron
#

My gosh… I’m close to create a new VM for you with the needed resources to end this mess

split hazel
#

nope i tried using chrome on my phone and it still didnt work

#

ima email them.. again

#

the card isnt banned so theres hope

split hazel
#

bro im not just gonna pass up 24gb ram easily

boreal iron
#

Gonna give you 25 to end this

#

I can also try to call Oracle, telling them I’m your mom and they should fucking give you the server to make you stop begging

split hazel
#

bruh

#

hosting is overpriced okay

#

so free hosting is a good deal

#

i also mentioned in the email im planning to migrate my services to oracle

#

in case that helps

#

i never said id be paying for it though

boreal iron
split hazel
#

otherwise ima go cry back to contabo

boreal iron
#

Not to say you won’t even get servers by level 1 or 2 providers as private person

split hazel
#

considering im a student with a part time job with an 8 hour contract for now since they're trialing me out its very expensive for me to get a decent vps for a good price

boreal iron
#

Well there are ways to earn fast money on the streets freerealestate

split hazel
#

maybe contabo has something good idk

#

im planning to invest in a proper server so i dont have to deal with these hosting companies

boreal iron
#

Hetzner is also quite cheap or ovh even if ovh is just trash

#

With a bad support and trash customer panel

split hazel
#

im looking for a uk server mostly

#

im planning to mostly use it as an alternative to WSL on my poor laptop

#

and to host some things occasionally

timber fractal
#

is there some kind of generator for css code that will add -ms and -webkit properties?

boreal iron
#

I don’t see why Germany or Finnland would be a noticeable difference

split hazel
#

yeah those should be close enough

#

i have a galaxygate vps which is in the US and the latencies are horrible

#

it keeps disconnecting too

boreal iron
timber fractal
#

oh

split hazel
#

i think i'll try out contabo for now

boreal iron
timber fractal
#

and another question, why doesn't the css for my email render in gmail but it does in different email clients?

boreal iron
#

Because there are 1000s of different email clients not rendering some html/css content for reasons, don’t ask me wh

#

Or simply don’t even support it

timber fractal
#

oh alright

#

how about inline css? in the style attribute

boreal iron
#

Since there are so unbelievable many things you would need to respect it’s a lot easier to use a common email html generator

#

Those usually manage to create compatible html code which will work in most of the email clients

timber fractal
#

thank you

split hazel
#

bruh contabo has a "one time setup fee"

#

ima hold off for now

#

this is kinda like digital ocean sketch type shit where they force you to topup a certain amount of money before you can access more expensive servers

#

even tho you're on a free trial

timber fractal
#

alright thanks not gonna buy digitalocean vps

split hazel
#

yeah i gave into it

#

digital ocean is mid

#

now i have a ÂŁ5 debt on it lol

timber fractal
#

lol

boreal iron
split hazel
#

actually its risen because of "penalty fees"

timber fractal
#

lmao

boreal iron
#

Not so for cloud or virtual servers

split hazel
#

dedicated servers id understand

timber fractal
#

i also have a 8 euro penalty fee for a "free service"

split hazel
#

but not virtual servers

boreal iron
#

If you think that’s expensive check what ordering IPv4s nowadays costs, a /29 subnet has a setup fee of more than 180€

split hazel
#

and the fee gets lower the more terms you commit

#

thats weird on its own

timber fractal
#

im trying right now to find affordable domain registration + email + vps to run express websites

#

lets just say its not that easy

boreal iron
#

Providers try to do things against this

#

Many also decline new customers and let them send pictures of themselves holding their ID card in the hand

#

It has become a little bit tricky as new customer nowadays to rent a server

#

But it’s good it is like that tbh

near stratus
#

welp
Since then I don't go for cheap things

boreal iron
#

Most TLDs cost about $12 per year, so it’s very affordable

near stratus
timber fractal
#

but i mean

#

most of the things i found

#

i'll go in debt if i buy that

timber fractal
#

the domain is affordable

#

the email is

#

the vps isnt

#

everything combined isnt

boreal iron
#

Stick to normal tlds like com for example, net or org etc

near stratus
timber fractal
#

uhhh

#

no

#

but i couldnt find everything combined wich would come to 2 usd / month

boreal iron
#

Well $2 for a virtual server is quite cheap tbh, you should expect around 5 bucks

near stratus
boreal iron
#

For something that’s reliable

timber fractal
sharp geyser
#

Just get your own servers

#

rent them out, and bam ez money /s

near stratus
sharp geyser
#

tf

boreal iron
#

Wtf

#

I wouldn’t even call this one a server

wheat mesa
#

that's a fucking raspberry pi divided between 30 people

boreal iron
#

Most of my USB sticks are more powerful than that

wheat mesa
#

pretty sure my alexa has more power than that

near stratus
#

Damn this is sus af

boreal iron
#

Bright green

#

Must be one of this super special advanced cheap providers

wheat mesa
#

5gb ssd storage

#

lol

near stratus
boreal iron
#

Yeah like I assumed

sharp geyser
#

is this the 2000's

wheat mesa
#

idk why VPS providers restrict storage so much... it's dirt cheap

boreal iron
wheat mesa
#

it's like 120 bucks for an 8tb HDD

sharp geyser
#

who uses HDD anymore

wheat mesa
#

a lot of people

near stratus
sharp geyser
#

all about that speed

wheat mesa
#

80 bucks for 1tb SSD

boreal iron
#

Since most environments use raid5 setups for their entire system

sharp geyser
#

SSD is more expensive than HDD though waffle

wheat mesa
#

I'm aware

#

Offer HDD and SSD space

#

Make it customizable

boreal iron
wheat mesa
#

I'm aware

boreal iron
#

No you’re not

wheat mesa
#

I'm just saying that 5gb SSD for a server... really... come on

sharp geyser
#

damn fake why being toxic

boreal iron
#

He’s calling you dingus so quiet dingus

#

damn I like this

sharp geyser
#

ok old man

boreal iron
#

Also like another 20gb as redundant backup storage providers have internally

wheat mesa
#

Looking at a 7.68tb data center SSD, it costs about 1050USD. If you give 5gb to each customer for $10.68 a year, you're making back $16,798.19 per year

#

I understand it's difficult to get that many customers but like... 5GB is nothing!

boreal iron
#

You can notice the difference yourself when ordering a dedicated server adding additional storage to it
That’s mostly damn cheap since it usually comes as raid1 (if you won’t to)

quartz kindle
#

yolo and make it raid0

wheat mesa
#

make it a man in the datacenter writing on a stone tablet every time he gets a signal through his dystopian neuralink implant

boreal iron
#

So investments are being shared between all customers

wheat mesa
#

I'm just saying that 5gb is barely anything

#

I pay nothing per year and get like 30gb I think

boreal iron
#

Yes that’s why I said that provider is trash

wheat mesa
#

Granted my vps is run by a multi billion dollar company that can easily afford it but still

boreal iron
#

Im not even sure if that offer was a server or just a container

#

I managed to try out every fucking known cheap provider existing in the eu the last 14y

#

And they were all trash without any exception

#

All those mini providers popping up and offering servers without having own datacenters relying and price and support stability of others are trash, pain in the ass

boreal iron
#

Some may need more ram, some more storage etc

#

It’s like most of the time things aren’t really flexible

#

Even if they could be

spark flint
fathom sonnet
#

ok...fixed this with db, but now ammm...instead of adding new data to mongo database, it doesnt do that, but instead it overwrite previous results

spark flint
#

for finding cheap servers

fathom sonnet
#

so...it's just overwtite, instead of adding new data.

solemn latch
fathom sonnet
#

sec

#

ik i could use myb, ammm** update()**

#

but dk where and how

solemn latch
#

so you're trying to upsert?

sharp geyser
fathom sonnet
#

upsert?

sharp geyser
#

So don't?

fathom sonnet
#

and I trying to add new data, instead of overwritting old one

#

as I said, ik for .update() but dk here should I use that

solemn latch
#

I'm assuming thats what you want.

Create a new row for a user if it doesnt exist, if it does update it.

boreal iron
#

Would make sense to add a document only if an user has a timeout role and completely remove the record if he doesn’t have anymore

#

Instead of blowing up the database without any reason

fathom sonnet
#

Well... It dosent have role, but yea, i Could rwmove rexords

broken cove
#

hi i dont can creat a token can somebody help me?

lyric mountain
#

a token where?

broken cove
broken cove
lyric mountain
#

you can't yet

#

you first need to get your bot reviewed and approved on top.gg

#

after that, you can find your token on bot edit page

broken cove
ancient nova
#

anyone got a good lyrics API?

#

don't rly wanna download a package

sick agate
#

extract the api from package perhaps

fathom sonnet
ancient nova
#

why wouldn't something like this work?

const test = function() { return test(); }();
boreal iron
#

wtf

#

function() { … }() <— ?

ancient nova
boreal iron
#

(() => { … })();

ancient nova
#

(function(param) { console.log(param) })("hi");

#

this will work

#

run it

boreal iron
#

Well I’m aware what self executing functions are

#

But you’re not

ancient nova
#

then why did u ask?

#

huh

#

what do you mean

#

I'm asking why u can't execute the same function again from the function you're calling it in

boreal iron
#

How would you example make sense in any way?
A self executing function that is bind to a var?

ancient nova
#

that's a constant variable and that's how I store functions for later use

boreal iron
ancient nova
boreal iron
#

But not like you did

earnest phoenix
ancient nova
#

then what am I doing wrong?

boreal iron
#

This example can never be self executing

earnest phoenix
#

The interpreter thinks that the () is unexpected, as the function isn't even interpreted properly

#

You can just wrap the function and then call it

ancient nova
#

no I can't call it by itself then call it again from somewhere else but I can't call the function inside itself

lyric mountain
#

the variable isn't assigned when the function is ran

ancient nova
lyric mountain
#

right-side of the assignment doesn't know what exists on the left-side

#

recursivity only works for traditional functions because it's hoisted (technically, every function is declared twice - once for the header and once for the body)

solemn latch
#

wouldnt a timer be easier here anyway?

lyric mountain
#

probably

ancient nova
solemn latch
ancient nova
#

I know what it is

#

but how would that help in my case

lyric mountain
#

cant u just use traditional function syntax?

ancient nova
vivid fulcrum
#

only real reason why you'd use a pattern like this is inline async functions

#

and that even could be bad design depending on the context

quartz kindle
#

why is it that every time i try to do something in typescript it ends up as being utterly impossible

#

fuck this im just gonna write a script to textedit my .d.ts files

warm swan
#

I'm currently having issues with my models

whitelisted = fields.ManyToManyField("models.UserModel", on_delete=fields.SET_NULL, null=True)
logs_channel = fields.ForeignKeyField("models.ChannelModel", on_delete=fields.SET_NULL, null=True)

split hazel
#

you're supposed to absolutely give up on whatever you're trying to do and find a different way to do it

warm swan
# warm swan

this error happens when im trying to init the database...

boreal iron
split hazel
#

whever ts users use that argument it makes my blood boil

#

MAYBE IF YOU DIDNT WRITE BLAND CODE 24/7 YOUD REALIZE

quartz kindle
#

except the only way to do what i want apparently is to manually write/hack .d.ts files myself

#

fuck ts

split hazel
#

from now on i only use jsdoc and use an actual statically typed standalone language instead of using typescript

#

because standalone statically typed languages have an ecosystem that has adapted to the use of strict types and so you rarely run into issues like that

boreal iron
quartz kindle
#

i was so happy with using jsdoc and getting all the strict type checking, until i found out its impossible to document events with it

boreal iron
#

lol

split hazel
#

i dont really like jsdoc but what can you do

boreal iron
#

Poor boy

split hazel
#

you know types in javascript are only really there to assist the programmer and for them to know what type something is

#

what if you just made it completely editor specific

#

like you can right click on something and set what type it is if it couldnt predict it

#

tricky adding types to a language that doesnt strictly enforce them

boreal iron
#

The editor doesn’t know shit

#

Or how to interpret your stuff

split hazel
#

notepad++?

boreal iron
#

Yeah

split hazel
#

notepad++ users after finishing their 2012 styled youtube coding tutorial:

boreal iron
#

lol

split hazel
#

its mostly the osdev youtube videos

boreal iron
#

To quote Waffle: Shut up dingus

split hazel
#

because there arent any sane osdev people nowadays

boreal iron
#

Im not switching my editor

#

I don’t like new stuff you know

#

So accept this and build something compatible for me smirk

split hazel
#

c++ users after realizing notepad++ isnt a c++ IDE

boreal iron
#

You’re making fun of this beautiful editor?

split hazel
#

maybe a tiny bit

#

but you do have something i dont have

#

an oracle 24gb vm

boreal iron
#

I actually have 192gb of ram

#

But just the half is available

split hazel
#

good for you

boreal iron
#

Hmm true

#

I still didn’t get what you need 1 cpu but 24gb of ram for?

split hazel
#

activities beyond your wildest imaginations

#

just nice having a free vps with ram

#

even tho oracle will probably find a reason sooner or later to take it away from you

boreal iron
#

Nvm it’s more than the half

boreal iron
split hazel
#

why cant javascript have type casting and pointers i always have to go to some online c++ compiler to test my prototype code

#

@earnest phoenix bro javascript pointer update drops when?

earnest phoenix
#

Don't worry ma'am, I'm about to drop the truly statically typed JavaScript in a few minutes

split hazel
#

javascript users when you ask them to perform integer division

#

without math.floor

earnest phoenix
split hazel
#

i was testing my code which predicts the output length of aes256 ciphertext

size_t encode_res_length(size_t length) {
    return 16 + (length / 16) * 16;
}

but then i forgot javascript has no integer division

#

thats inlined btw

#

gotta keep that performance

wheat mesa
#

I still barely understand when to inline something tbh

#

I guess it’s for when you have a function that basically just dispatches itself to other functions or quick one liners that can just be inserted anywhere instead of having to look them up in the call stack

split hazel
#

usually its when you have a very short function where its nice syntactical sugar to keep it as a function and so you dont repeat code but dont want to have the overhead of calling an actual function

#

if you try to inline a function thats too long the compiler will usually ignore it

quartz kindle
#

i think i have more or less found a way to properly document events with jsdoc like i wanted

#

its ugly af

#
class ABC extends EventEmitter {
        /**
         * @callback A
         * @param {"name"} event
         * @param {(data: string) => void} callback
         * @returns {this}
         *
         * @callback B
         * @param {"test"} event
         * @param {(data: number) => void} callback
         * @returns {this}
         */

        /**
         * @type {A & B}
         */
        this.on;
}
split hazel
#

bros doing AND operations in jsdoc 💀

quartz kindle
#

well its vsc jsdoc which is powered by typescript

#

so it supports everything typescript does

#

types wise

split hazel
#

tim just make a library already which adds types to code

#

ayo

#

let something = libraryInt(somedata.unknowntype);

wheat mesa
#

Just sounds like you want Number(somedata)

split hazel
#

what if you have a class

quartz kindle
#

easy ```js
module.exports = function libraryInt(unknowntype) {
return undefined;
}

split hazel
#

yeah nvm dont think that will work

#

can someone already make an ai powered jsdoc which can accurately predict types

wheat mesa
#

Lol an ai powered program

split hazel
#

dont laugh

wheat mesa
#

Sounds like fun for debugging

split hazel
#

stop it

#

i will use gpt 3 for it

#

and go bankrupt

wheat mesa
#

“Why the fuck is it crashing???”
ai maniacally laughing in the background

quartz kindle
#

you want to also predict runtime types by looking into the future and recording which types the program will ever receive?

#

quantum time travel type checker

earnest phoenix
#

It'll be much easier

quartz kindle
#

considering its a MAJOR breaking change to the entire js language

#

it will take a while until every js-powered thing out there will even support it

#

browsers, v8, node, vsc, etc

earnest phoenix
#

It's mostly based on the engine itself, so others are mostly irrelevant, but in case of them updating to the engine version that supports it, yeah that'll be a concern

quartz kindle
#

also all the relevant tooling would require updates

#

even things like browser console hints / autocomplete

earnest phoenix
#

I guess we'll be doing a shit ton of work to make this a possibility

split hazel
#

voltrex secretly laughing in a secret private v8 discussion repo coming up with a reason to deny it and when

quartz kindle
#

i cant see how adding native types to js is even realistic at this point

earnest phoenix
#

DogKek Maybe

split hazel
#

"no types for you"

quartz kindle
#

i feel like this is akin to "pls make discord.js support python"

split hazel
#

the proposal is cool but it is a major breaking change

#

it will basically kill any older unmaintained browser versions if a website decides to use them

quartz kindle
#

the only way i see it working is for the engine to treat all type syntax as comments

split hazel
#

actually looking more at the proposal it looks like its just trying to turn the whole language into typescript

earnest phoenix
quartz kindle
#

so basically is not typechecked js

#

its js that allows typescript syntax without complaining its invalid js

#

and ignore it

earnest phoenix
#

Yeah, you're basically just writing JSDocs but in a more expanded and easier way, as if you're using TypeScript without the actual type-checking

#

It would be pretty useful as writing JSDocs is a pain in the ass

quartz kindle
#

indeed

#

its still a breaking change that will take a long time to be adopted

earnest phoenix
#

Indeed

quartz kindle
#

as this "new" js will not work on older engines

#

petition to rename it to js++

earnest phoenix
#

V9 troll

quartz kindle
#

why is v8 still v8 if its already v10

#

:^)

woeful pike
#

type hints in python are so confusing because it feels like they should be checked but they don't. Don't want js to feel like that tbh

#

I don't wanna have to see

function a(): number {}

and wonder if it's a real type or a fake type lol

quartz kindle
#

true

woeful pike
#

probably not really confusing in the context of an existing project but

split hazel
#

2030 javascript developers wondering why their function marked as returning a string returns a number

earnest phoenix
woeful pike
#

much like 2022 typescript developers wondering why their function marked as returning string returns undefined because they don't have strict typechecking turned on

#

or a function marked as returning string returns literally anything at all because any still exists

quartz kindle
#

typescript devs wondering why their program is crashing with cant read x of undefined because they keep using var! everywhere

woeful pike
#

typescript devs wondering why their program is crashing because programming sucks and I hate it

quartz kindle
#

easy, dont be a typescript dev :^)

split hazel
#

typescript devs wondering why they cant pull

earnest phoenix
#

Imagine going back in time and making JavaScript a statically typed programming language from the very start

#

But even then, I don't think it would be as popular and widely used as it currently is, considering it's used mostly because it's simple and fast enough

split hazel
earnest phoenix
#

Java is literally hell

#

Java developers explaining why having 500 keywords is a good idea

split hazel
#

which mfs voted for this shit

quartz kindle
#

dafuq are those even

split hazel
#

decorators in js would be clean

#

i think they mean something like c++ has with its type overloading for streams

#

like std::cin >> variable

#

idk tho

quartz kindle
#

what about functions lol

earnest phoenix
#

Well decorators are stage 3 so expect it pretty soon

split hazel
#

:ooooooooooooooo

#

less go

quartz kindle
#

yes, less go and more stop

woeful pike
#

decorators have been supported by typescript ever since I started coding lol

#

C++ stream operators are so cursed, they're just an overload of bitshifts

#

I can't think of a more confusing way to implement them

split hazel
#

c++ streams are awful

quartz kindle
#

js is to typescript what discord is to bot devs
slowly but surely stealing its features

woeful pike
#

😭

earnest phoenix
split hazel
#

they add so much overhead its unbelievable

#

and for what worse syntax?

woeful pike
split hazel
#

some things are regular functions while some things are << >> or whatever

woeful pike
#

I don't understand why ppl want pipes

#

I love functional programming, but this seems like a pointlessly confusing feature

earnest phoenix
woeful pike
#

it works beautifully in elixir because it's baked into the language

split hazel
quartz kindle
#

these are the only things tha t matter tbh

woeful pike
#

there's no ^, piping stuff simply passes the return value as the first parameter and there's no async/await sugar

#

temporal is also huge

earnest phoenix
#

Btw, operating overloading was actually proposed, but it's currently inactive and probably just dead

woeful pike
#

pls no operator overloading

earnest phoenix
#

Maybe for the good, because it would make JavaScript an unpredictable hellscape

split hazel
#

javascript users wondering why a + b prints hello world to the console

quartz kindle
#

imagine ```js
+.prototype.... = ....

split hazel
#

i like operator overloading but its just not for javascript

quartz kindle
#
Operator.create("$", (a, b) => a + b + 10)
console.log(1 $ 2) // 13
earnest phoenix
quartz kindle
#

this one is very interesting

#

that would essentially make threading in js very similar to threading in other langs

#

the problem is that the underlying threading mechanism would probably still use worker_threads and would make people confused as to how it actually works under the hood

earnest phoenix
#

Yeah, unfortunately the proposal was also withdrawn as the champion is no longer participating in TC39

quartz kindle
#

yeah

#

how many years has it been since Temporal was proposed lol

earnest phoenix
#

About a year

quartz kindle
#

resizable buffers would also be top shit

quartz kindle
earnest phoenix
#

The proposed dates are shown in the tables, but that's when they were proposed to TC39, the ideas existed way before

quartz kindle
#

ye

#

also

#

watch resizable buffers be implemented only to be slower than creating new buffers and copying data

#

:^)

earnest phoenix
#

Lmao, I'm sure it'll be way faster and more efficient, as long as there's a viable approach

quartz kindle
#

xD

#

a lot of things usually start slow and then have performance improvments added later

#

like replaceAll used to be much slower than replace(//g)

earnest phoenix
#

Yeah

quartz kindle
#

Buffer.subarray used to be much slower than Buffer.slice

#

then you go and deprecate .slice

#

xD

earnest phoenix
#

Initial implementations of many features have always been way slower compared to their speed in today's world

#

I remember when Array.prototype.sort() was used to be extremely slow

quartz kindle
#

i posted in a server for the first time in 3 months

#

and got autoreplied by a bot saying "get a life"

earnest phoenix
#

Damn that's #deep

split hazel
#

tc39 pointer proposal

examples

let num1 = 5;
let num1ptr = &num1;

function a(ptr) {
  *ptr = 10;
};

a(num1ptr);

console.log(num1); // 10;
ancient nova
#

does anyone how why this doesn't work?

    Object.assign(document.body.children[0].style, {
        'background-image': 'url("https://i.imgur.com/uKVG1XM.jpeg")',
        'background-attachment': 'fixed',
        'background-position': 'center center',
        'background-size': 'cover',
        'background-repeat': 'no-repeat',
    });
``` I'm trying to change discords background to an image instead of a static color
#

it works for a second then changes back, I tried using a interval to change the CSS, but it never changed after the intitial change

#

btw I did check and it's not against ToS

earnest phoenix
#

It actually is against the ToS, any type of modification is; but mostly the Discord staff don't give a fuck about style changes

ancient nova
#

btw I also tried creating an overlay image with z positon behind all the text but that didn't work either

#

the color doesn't want to remain invisncible so the image gets hidden almost instantly

earnest phoenix
ancient nova
#

can anyone figure out why or what should I do?

split hazel
#

i was mainly joking but it wouldnt be a terrible idea tbh

ancient nova
#

tried injecting animaton frames/ hooking to a mutation observer

quartz kindle
#

pointers would defeat js's immutability

ancient nova
#

nothing seems to work

split hazel
#

it would be cool if functions that arent closures could modify another variable

quartz kindle
#

in order implement pointers, youd need to add a new mutable primitive type

split hazel
#

we make the whole language mutable

quartz kindle
#

js die

split hazel
#

so whos gonna make the proposal

#

:troll:

#

i still dont get why strings are immutable

quartz kindle
#

tc39: "js is now mutable"
v8 devs: FUUUUUUUUUUUUUUUUUUUU

earnest phoenix
#

troll epic troll

split hazel
#

when i began js i did get fucked up by the fact objects are passed by reference but types such as ints etc get passed as copies

#

c++ developers realizing passing a number as reference is slower and has greater overhead than just copying it

quartz kindle
#

number by copy: uint8 -> uint8

#

number by ref: double64 -> double64

ancient nova
#

soo

#

does anyone know what's wrong?

quartz kindle
#

the world is wrong

ancient nova
#

please 😭

split hazel
#

when tim trolls you know its over

ancient nova
#

tim, please I'm sure you know the answer

#

:c

split hazel
#

i wouldnt know i dont use features like object assign

quartz kindle
#

i dont even know what you're talking about

ancient nova
ancient nova
#

did you even read what I said

split hazel
#

lmao

quartz kindle
#

i have no idea what that is

#

what is the context?

#

is that for topgg description?

#

is that a browser extension?

#

is that your website?

#

what is that?

ancient nova
#

I'm trying to make discord's main body be an image while everything else be transparent

quartz kindle
#

using what?

#

dev tools?

ancient nova
#
(async window => {
    'use strict';
    Object.assign(document.body.children[0].style, {
        'background-image': 'url("https://i.imgur.com/uKVG1XM.jpeg")',
        'background-attachment': 'fixed',
        'background-position': 'center center',
        'background-size': 'cover',
        'background-repeat': 'no-repeat',
    });
    
})(window);
``` everything gets overriden instant the application opens though
#

using dev tools it works, but in a script it doesn't

#

I'm confused

quartz kindle
#

if it works in dev tools then you're probably running that too early

#

is that in a window load event?

ancient nova
quartz kindle
#

then you need to wait for the window load event

ancient nova
#

I tried already, also looks like this wrapper covers it

quartz kindle
#

check if its using !important

#

or other weird shenanigans

#

idk

#

anyway i g2g

split hazel
#

apparently its been withdrawn because google disagreed with it

#

@earnest phoenix any info?

#

the proposition owner really looked like google did something to him 💀

earnest phoenix
# split hazel <@456226577798135808> any info?

To be honest, I myself don't have any idea what really happened to that proposal but from what I've seen so far, it seems like the idea was being either rejected or withdrawn due to either "better" ideas existing that could replace this proposal or might be an issue with how the proposal is put up, about Demonic though, Google itself isn't really against them of course, just a few Googlers who are a part of the TC39 committee are against the idea and bringing up the aforementioned "better" ideas or similar, fighting up against protecting your own ideas and beliefs is extremely hard in these cases

#

And if you didn't know, everyone from every member company of the TC39 can object to stop/block the proposal from going forward due to reasons they might provide, as the whole thing must come down to full consensus, so it's a hard fight to partake in

split hazel
#

💀

#

did bros interrogate him

earnest phoenix
#

I don't think they would really dare, Demonic themselves are a Googler, things like this usually never happen enough to turn out like that

#

But that doesn't mean rejections/withdrawals are common

round cove
#

It still does honestly

spark flint
#

how can I line those up

#

with Tailwind

#
                  <button class="py-3 pl-5 pr-12 rounded-xl btn text-left">
                        <i class="fa-solid fa-triangle-exclamation text-3xl btnIcon"></i> <span class="ml-12">Create report</span>
                    </button>```
split hazel
#

oh so he is an employee too

#

that makes sense

#

i can see how they would pick on him because they didnt like something about the proposal or the constant questions and objections

lyric mountain
spark flint
#

no difference

round cove
#

flex and align center.

earnest phoenix
#

how to keep track postion 1 in setdescrption

#

for example track queued - position 1 <=

green kestrel
#

a monster of a pr

sharp geyser
#

Looks interesting brain

green kestrel
#

anyone tried out the new automod feature in discord yet?

#

i had a play with it, felt like it was designed for communities full of very young kids

#

the default block list filters words like.... those two things on a cows head followed by the letter Y

#

since when was that swearing lol

lyric mountain
radiant kraken
#

we need pointers in high level languages

green kestrel
#

pointers in js

#

talk about giving enough rope to hang a dev

#

needs an unsafe keyword too!

radiant kraken
#

why

#

you can already crash the Node.js process with native cpp bindings

sharp geyser
#

hello qt null

green kestrel
#

but to be able to do it without bindings

radiant kraken
#

hai misty

green kestrel
#

this is where the real game begins

radiant kraken
#

yes

sharp geyser
radiant kraken
#

why java

#

java and rust are very different

sharp geyser
sharp geyser
radiant kraken
#

fair enough

sharp geyser
#

As long as I understand how it works I am confident I will be able to bs my way through it in rust

radiant kraken
#

So you're planning on writing an interpreter

sharp geyser
#

I plan on writing an argument parser for my cli but this book just so happens to teach how to write that kind of stuff rather well

radiant kraken
#

just copy my argument parser code smh

sharp geyser
#

Can't if I don't know where it is null

radiant kraken
#

dms

sharp geyser
#

also I don't really feel like copying code I don't understand the concepts behind

radiant kraken
#

i'm sure you can understand it

lyric mountain
#

I have a feeling our talk about making a command parser unchained all this

lyric mountain
#

The urge to write a parser mmulu

sharp geyser
#

Actually nah it has nothing to do with what we talked about

lyric mountain
#

Ah

sharp geyser
#

I was planning on making a cli tool in rust but had no way of parsing arguments from the terminal

lyric mountain
#

If u can read java, I got a good example of implementation if u want

sharp geyser
#

So now i just have this shit show in java

lyric mountain
#

An official one I mean

#

Ah, that kind of parser u mean

sharp geyser
#

Well this is just me testing out making scanners and parsers

#

I plan on doing something a bit differently with my cli tool

lyric mountain
#

Try making a jetbrains language plugin

sharp geyser
#

👀

#

I don't know enough java to even attempt that

lyric mountain
#

It covers exactly that, and their tutorials are kinda good

lyric mountain
#

Only for type declarations and stuff

#

The rest is dealing with flexer

sharp geyser
lyric mountain
#

Give a read on lexers, they make that a lot easier

#

Maybe u can get something from how it's implemented internally

sharp geyser
#

I haven't gotten that far in the book only the first chapter which is setting up the scanner

lyric mountain
#

Ah

sharp geyser
#

The next chapter is setting stuff up for the parser to work smoothly

lyric mountain
#

Btw what's the null after each line?

sharp geyser
#

null is when it doesn't have a literal

lyric mountain
#

Ic

sharp geyser
#

I don't quite understand what they exactly mean by literal in this context

#

but I assume it is just when it doesn't have a value

#

like a string has value

#

it has the words inside it

#

Same with numbers

#

it just is represented in it's Double form

lyric mountain
#

I think it's because those tokens don't represent a value at all

sharp geyser
#

yea

lyric mountain
#

Like, in that case 100 represents 100, but var represents nothing, it's value is its existence

sharp geyser
#

yea

#

The book is pretty extensive on this topic of making a "language"

#

The one I am going through is the tree-walk interpreter

earnest phoenix
lyric mountain
#

When printing ur probably either looping or adding a new song

#

For loop just print the current index + 1, when adding just print the queue size + 1

wheat mesa
#

anything that doesn't have a literal associated with it is for the parser to understand

sharp geyser
#

makes sense

#

I am taking a break for today though

#

My head hurts after reading the second chapter forming the ast

round cove
sharp geyser
#

Seriously though it looks amazing

#

I love the look of it

#

What'd you use to make it all happen?

round cove
#

Made it more explicit.

sharp geyser
#

I kind of liked the other version

round cove
#

I did too but it wasn't very explicit to whoever saw it

wheat mesa
#

Nah I like that it's more explicitly known as a 404 page

round cove
#

yeah

sharp geyser
#

I feel like it conflicts with what you were going for tho but 🤷‍♀️

wheat mesa
#

otherwise some non technologically adept people may think that they're doing something wrong

wheat mesa
#

lol

sharp geyser
#

what non technological person would visit someone's portfolio

wheat mesa
#

lots of people

round cove
#

.... HR recruiters?

wheat mesa
#

you seen the people that post jobs online?

round cove
#

Misty about to learn abotu linkedin

wheat mesa
#

lmao

sharp geyser
#

Meh whatever, don't really wanna voice my opinions here

round cove
#

It's genuine.

wheat mesa
#
REQUIRED:
  - At least 25 years of experience in C, C++, Go, Swift, Kotlin, JavaScript, Pascal, FORTRAN, C#, Java, and Rust
  - Be able to program complex data structures in the most efficient assembly possible
  - Accept 0 salary for the first 3 months, then $1500/month afterwards
  - Be a team leader
  - Meet deadlines early
round cove
#

There are lots of recruiters that visit portfolios.

topaz portal
#

Hello is there anyone who developing bots to play games?

round cove
#

A friend suggested making the terminal type out a panku.io -h command and then it prints out 404 page not found

sharp geyser
#

why not the page name they tried visiting instead of -h?

wheat mesa
#

panku.io --route "route here" then print 404 page not found

sharp geyser
#

or that

round cove
#

kinda worried if they make the route long enough it takes years to type out lmao

lyric mountain
#

@wheat mesa btw, do u know anything about monte carlo or making ai for card games?

round cove
#

unironically big brained lmao

#

I'm making it a component now so i can reuse around the site and pass it an array of "commands" and "outputs" for each command so I can like

#

list skills and other things

#

make goofy outputs

sharp geyser
#

There ya go

#

make it output your address as an easter egg ;)

lyric mountain
#

I miss google url easter eggs

lyric mountain
#

Nhe

round cove
#

Got it in its own component

#

now should I make it type out the commands...

earnest grove
#

<@&817055174613794826> hello I am not able to select catergories

wheat mesa
royal portal
round cove
#

thanks

round cove
#

this was fun

pine nova
#

angular

round cove
#

yes

sharp geyser
round cove
#

Yeah I already fixed, was jkust copy/pasting to get the amount right

sharp geyser
#

Ah lol

earnest phoenix
round cove
#

I changed it to runescape

#

Lmao

bright hornet
#

I was trying to create a command that has cooldown on it. Im almost done and working perfectly fine, but the thing is. How do I create the automatic delete if its the right term after the time ends?

https://sourceb.in/jd4293SxFh

sharp geyser
#

Delete the message being sent when the command is being executed

austere oyster
#

Hey can somebody explain me this annoying error?

Error: querySrv EREFUSED _mongodb._tcp.cluster0.mofw2.mongodb.net
    at QueryReqWrap.onresolve [as oncomplete] (node:dns:276:19) {
  errno: undefined,
  code: 'EREFUSED',
  syscall: 'querySrv',
  hostname: '_mongodb._tcp.cluster0.mofw2.mongodb.net'
}```
#

couldnt find anything on internet

split hazel
austere oyster
#

and how can i solve that i tried everything

#

from making new cluster

#

to disabling and re enabling allow access from everywhere to ip settings

hollow anchor
#

I'm gonna sound nooby here but

#

When message is a valid channel it says false

#

y

pale vessel
#

what is $message[>]?

hollow anchor
#

Last word user put

#

Like "$create channel" the message = channel

#

In this case $checkz test

pale vessel
#

what did you put as channel?

hollow anchor
#

Channel is called test

#

If I type in $checkz test

#

It should say true

#

Instead it says false

pale vessel
#

are you sure it doesn't check for ID instead?

hollow anchor
#

channel Id exists?

#

how do I get it

#

mobile lmfaoo

#

bro deleted it

#

oh it's at the bottom

#

Hmmm

#

Restructured

#

$channelExists[$channelID[$message[>]]]

pale vessel
#

is there not a way to extract channel ID from "#development"?

#

is what that $channelID does?

hollow anchor
#

Mhm

#

Message -> ID -> Check

#

Messy though

#

It works

pale vessel
#

epic

hollow anchor
#

feel free to copy the code... for whatever requires needing to know if a channel exists

#

$channelExists[$channelID[$message[>]]]

#

$message[>] takes the last word and feeds it into $channelID then for $channelExists to determine

#

Dumb question probably no but with BDScript 1/2 can you automatically make the creator of a channel to have perms for that channel?

#

My current setup is

#

$nomention
$cooldown[3m;no spamming but nice try, wait 10m]
$createChannel[$message;text]

#

Can I make user who used command perms to channel?

#

(you don't have to spoon feed me. Just a y/n.)

abstract iron
#

Helloo, not Discord bot related, but I need help with Git.
How do I combine two different git history on top of each other?

For example, I have remote branch with these commits:

  • commit-0a
  • commit-1a
    Then I have commits on my local branch like this:
  • commit-0b
  • commit-1b

How do I combine them so that it would look like this:

  • commit-0a
  • commit-1a
  • commit-0b
  • commit-1b

(Local commits is on top of remote commits)

bright hornet
#

to automatically delete the data

dire mesa
#

Anybody familiar with how to update server count on Top.GG? I'm pretty sure my code follows the TopGG Java library docs to the tea but nothing seems to be happening on the website. Do I need to wait for the changes to appear?

    @Override
    public void onReady(@NotNull ReadyEvent event) {
        String TOPGG_TOKEN = bot.config.get("TOPGG_TOKEN");
        if (TOPGG_TOKEN != null) {
            DiscordBotListAPI api = new DiscordBotListAPI.Builder()
                    .token(TOPGG_TOKEN)
                    .botId(event.getJDA().getSelfUser().getId())
                    .build();
            api.setStats(event.getGuildTotalCount());
        }
    }
near stratus
#

They have some fixes

#

This message specially

dire mesa
#

Yes I already have that version

#

That dependency tag doesn't work so i forked the master branch myself

#

Should I just do a POST request instead using OkHTTP?

lyric mountain
feral aspen
#

Quick question, the systemctl list-units command attempts to show the loaded/active units, in addition to the --all switch which will list the active and the inactive service. What exactly does systemctl list-unit-files do?

livid lichen
#

lol

#

by chance does anyone here know how to remove their bot from a team?

pale vessel
# near stratus

they weren't even being an ass abt it, why did u have to say that?

fervent moss
#

Hey any idea how do I club this in a msg like-

User Votes
User#1 10
User#2 90

Type of thing?

I am trying this from long time, can you anyone help me pls

And yeah let that user#1 be the userid.

lyric mountain
fervent moss
lyric mountain
#

for id: <array>[index][0]
for votes: <array>[index][1]

solemn latch
fervent moss
lyric mountain
wheat mesa
#

index is the position in the array you want to access

lyric mountain
#

if u want to return both values just use <array>[index]

fervent moss
#

So it goes like 0,1,2,3......

wheat mesa
#

Yes

lyric mountain
#

unless ur using lua, yes

fervent moss
#

Hmm...thanks :)

lyric mountain
fervent moss
#

Hmm...

fervent moss
earnest phoenix
#

arr.map(x=> `${x[0]} ${x[1]} ` ).join('\n')

hollow anchor
earnest phoenix
#

hi

lyric mountain
hollow anchor
lyric mountain
#

idk, maybe it's because I'm used to programming, but

if (message.guild.channels.cache(channelID)) {
  // ...
}

seems easier

rigid maple
#

hey my goal is to make a router in React
I did something like this but it doesn't work
The site opens when I go to http://localhost:5000/dashboard
but but when I go to the http://localhost:5000/twitch/dashboard address, a white screen opens

#

routers don't work that way?

lyric mountain
#

why does http://localhost:5000/dashboard work?

#

I don't see that route there

rigid maple
#

I have no idea

lyric mountain
#

did u set ur root to that?

#

if so, the correct path would be http://localhost:5000/dashboard/twitch/dashboard for ur last message

rigid maple
#

I tried restarting but the problem is not solved

lyric mountain
#

restarting is literally the definition of madness

#

you need to find where u specified /dashboard as the root