#programming

1 messages Β· Page 27 of 1

urban lantern
#

If anyone started sending requests to the map tracker fullmap around an hour or two ago, can you please limit your requests to 1 per minute on fullmap please?

ember canyon
#

🀣

high sorrel
#

That sounds like it'd be handy to limit that lol

#

Seems... exciting otherwise

royal quiver
#

Just a quick question, but what is everyone's IDE (or text editor if you don't use one) of choice?

twin forge
hard mulch
#

hello

ebon garden
#

Visual Studio Code

royal quiver
#

I'd also consider myself a Visual Studio user, however I used to use Jetbrains' IDEs but it was a bit irritating to have to install a separate program for each language.

shadow marsh
#

I use Eclipse πŸ˜„

mossy cloud
#

I use PHPStorm for my PHP / Laravel work and VS Code for front end NodeJS / JS etc

unkempt hamlet
#

PHPStorm can handle frontend stuff.

#

PHP Storm is basically a stripped down Idea with powers of WebStorm

pulsar jungle
#

I use PHPStorm both for work and hobby stuff.

mossy cloud
raw notch
ember canyon
#

Na

#

That's better to let it messy.

cinder spear
#

display: grid is your friend

raw notch
cinder spear
unkempt hamlet
#

But they are all aligned by the content already think Not the prettiest example troll

cinder spear
#

at least until the ping jumps to multiple seconds Kapp

#

...or until I get a real ipv6 address in there

ember canyon
#

Hello

#

These horn sounds still do not come in crowded places. When will it be all right?

unkempt hamlet
#

That's not the right channel to ask this.

#

Check the channel topic.

ember canyon
#

Ok sorry CJMAXΔ°K

mild swallow
#

Anyone here using React?

unkempt hamlet
#

Some do.

cinder spear
#

'tis a part of my day job

raw notch
#

yes

mild swallow
#

I am starting learning react, do you have some suggestion?

unkempt hamlet
#

Learn React

quartz moth
#

CJ is so helpful

unkempt hamlet
#

Vague question demands for a vague answer.

quartz moth
#

Fair enough xD

unkempt hamlet
#

One major skill that developer should learn is how to build the questions correctly.

raw notch
# mild swallow I am starting learning react, do you have some suggestion?

have a real idea and implement it.
i should start from react docs on react official site and redux for state management (there are a lot of packages like it)

looking for react boilerplates online on github it's a good start because it install a complete structure implemented with the best practice

foggy osprey
unkempt hamlet
#

Looking nice

foggy osprey
#

Thanks! It uses Laravel with Livewire & Alpine, really nice stuff

mossy cloud
#

Very nice ^-^

tardy smelt
#

Looks clean!

royal quiver
foggy osprey
#

I mean.. i thought about adding logic to stop that.. but is staff really going to claim their own request? pepelol

unkempt hamlet
#

Yes.

foggy osprey
#

Would be interested to see tho, how it would react when you approve your own request to leave.. Since it soft deletes the account Blushthink

#

I'll have to test that some time haha

unkempt hamlet
#

Basically, what comes first - account deletion or approving logic. If first, then it should throw an exception because you don't have user data anymore.

foggy osprey
#

Yeah haha. I'll have to build some sort of validation for that then pepelol

royal quiver
foggy osprey
#

(A Discord Android screenshot, not BetterDiscord) thisisfine

shadow marsh
#

yeah, AMOLED-Skin, ikr

#

but that looks pretty sick, Phoenix Pog good job!

foggy osprey
#

Thanks phoenixlove

#

We have the same for driver applications. Recruitment team gets pinged when a new application comes in, so that it can be handled asap

#

Frontend for the site is made with Tailwind, so it looks smooth as hecc

shadow marsh
#

notbad well, I'm not really in webdevelopment (I tried it, but never got it working properly)

foggy osprey
#

I started messing around with websites when i was like 10, with drag-and-drop stuff like Wix and WordPress haha

#

And now web dev is my part-time job happykittycode

shadow marsh
#

Pretty amazing ^^ well, coding is just a hobby for me and I don't want to do that as job πŸ˜‚ but I have respect to those, who are coding for their job and as hobby ablobtonguewink I couldn't do that though

foggy osprey
#

Yeah it's both my hobby and job, and that's what I love about it tbh

#

Working doesn't really feel like working, since I code personal projects as well

shadow marsh
#

Oh well πŸ˜„

ebon garden
#

Nice

#

Im looking to do something similar with my application system but for now we just receive applications through email

foggy osprey
#

If your system works with Laravel, it should be pretty easy to implement

#

With notifications

raw notch
#

or events

ebon garden
#

Im thinking of maybe doing it with discord webhooks

foggy osprey
#

That would work as well, but it's pretty easy to implement a notification system

shadow marsh
#

is laravel making webdevelopment easier?

#

and do I need knowledge in it? peek

ebon garden
#

I have to learn web development first

foggy osprey
shadow marsh
#

oh RIP....

ebon garden
#

and im probably going to wait until I start getting some growth

foggy osprey
#

Laravel can make development easier for sure, but you still need to know your way around languages haha

ebon garden
#

since i dont need much automation right now

shadow marsh
#

then I'd stay with Java πŸ˜‚ ngl it's the only and once language I know

foggy osprey
#

Ah, Java, my enemy pepelol

ebon garden
#

I only know Python

shadow marsh
#

well, Java because of Minecraft πŸ˜›

foggy osprey
#

Had to learn java at school, really didn't like it tbh. But that may also have been because of the teacher haha

ebon garden
#

Im gonna join the coding club once covid ends

#

so i can learn some more python

shadow marsh
#

and since I know there's a bot api wrapper for java, I also don't just code MC-Plugins, also my Bot is written in πŸ˜„

ebon garden
#

Im really starting to forget python aswell

#

im gonna have to practice

#

all ive done with py is the discord bot

#

poggers

#

after doing about 2 minutes of research ive found a way of doing what i want to do

#

basically i just send the application data to a google spread sheet

#

and then use some third party software to send it as a discord embed

shadow marsh
#

Well, I tried HTML, PHP, Java, js and.... idk more πŸ˜‚ - oh well, C++ I tried.... but I never understood anything... except Java

urban lantern
#

Sorry about the tracker issues lately, trying to track down the bugs

urban lantern
#

I have been forced to put a blanket ratelimit of 20 req/sec on all map tracker endpoints and 1 req/s on /fullmap per ip address.

raw notch
#

for me no problem, i hit every 3 seconds the are endpoint and every minute the fullmap

ebon garden
#

Yay, my new application system works

#

Thanks to third party applications kekw

cinder spear
#

Good morning, I hope yours are better than mine

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md2 : active raid1 sdb1[2] sda2[0]
      20478912 blocks [2/1] [U_]
      [==================>..]  recovery = 92.8% (19013248/20478912) finish=0.4min speed=49160K/sec

md3 : active raid1 sdb2[2] sda3[0]
      1932506048 blocks [2/1] [U_]
        resync=DELAYED

unused devices: <none>
raw notch
#

uuuuuuuuh

unkempt hamlet
cinder spear
unkempt hamlet
#

screaming in NetApp shelf outages

sly moon
meager spoke
#

"The command isn't too complicated" - Starter pack chris_smile2

raw notch
#

always loved the parenthesis pyramid at the end

#

and seeing the amount of ) seems a callback hell

meager spoke
#

It is a callback hell ThisIsFine But works pretty good actually

#

This is onyl 1/3 of the command anyway

raw notch
#

it's why after two callbacks i start defining an async and working with promises

foggy osprey
#

oh my

opal arch
#

If you have that many conditions and callbacks, there is something wrong

meager spoke
#

I mean, it's just a lot of awaitMessages.then( collected => {})

unkempt hamlet
#

That's why I don't like async

#

And that's why I like Elixir

meager spoke
#

I'm a trash inexperienced dev so it's okay for me Smile

#

If it works, then it works. BigBrain

next prawn
#

Did you all hear of Roblox?

meager spoke
#

🀨

unkempt hamlet
#

If it is not a new progressive programming language, then no kekw

next prawn
#

Roblox Studio

#

You can create your own game

#

Own physics

#

I've been working on an F16 with physics

royal quiver
unkempt hamlet
#

Something with Discord API (I saw an embed reference)

cinder spear
#

but that much stuff in one function sounds like 🍝 either way

meager spoke
#

That's the node module, it's called spagehtItaHand.js

quick wadi
# meager spoke

This gives me severe anxiety as im starting to learn how to code, but i got told that this kind is bad, but still. Hella demotivating lmao

cinder spear
#

don't worry. It's perfectly normal in this industry to open up an old project, think "what kind of idiot wrote this" only to discover it's your own code.

quick wadi
#

Lol

#

First learning javascript for my bot tho. Ill prob fail that already...

#

Me big noob

royal quiver
#

Discord Py is probably easier for beginners truestory

quick wadi
#

guys how do i even get javascript? like where i can make those lines and stuff.

#

pls no booli for my nubness i just dont know how to start

unkempt hamlet
#

Um

#

What?

mystic ridge
ebon garden
#

Install JavaScript

quick wadi
ebon garden
#

That's visual studio code

unkempt hamlet
#

That's an editor, not a javascript.

ebon garden
#

I think

quick wadi
#

i already dont understand shit

ebon garden
#

You can use any editor

unkempt hamlet
ebon garden
#

You can even use notepad really kekw

quick wadi
ebon garden
#

Great

#

First learn everything you need to know before starting your first project

mystic ridge
#

Learn the basics first, don't worry about environments and IDEs, that is something for later

quick wadi
#

i dont even know what it is

#

lol

unkempt hamlet
#

Exactly.

quick wadi
#

correct if i say that ; end a line?

unkempt hamlet
#

Not always. There are some constructions when you don't need to add it. Also, modern syntax doesn't require ; at all.

quick wadi
#

but for JavaScript it does right?

mystic ridge
#

Experiment for yourself and see what happens

#

You can answer lots of questions like that yourself if you play around and see what the behaviours are, or you can read up on it troll

quick wadi
#

true

mystic ridge
#

Just whatever you do, don't always take documentation at face value for applications, as you'll often find that things don't work as they should looks at Microsoft

ebon garden
#

I got no idea how JS works kekw

quick wadi
ebon garden
#

Lol

quick wadi
#

amps check dms lol

ebon garden
#

hehe

cinder spear
#

even JS doesn't know how JS works

#

you get nonsense like [] == ![] equals true

raw notch
#

ahah

cinder spear
#

reasons why you always want === or even better, typescript

raw notch
#

just needed to use === because need to check null, true or false in separate ways πŸ˜„

#

stupid js

cinder spear
#

IIRC that specific example has to do with [], which is truthy, being converted to a string for comparison "", which is falsey, which matches ![], which is just false.

raw notch
#

i'm reading a code wrote 3 years ago.. and i'm... WTF I DID HERE

quick wadi
#

me not knowing what you guys are talking about

high plank
#

I half know whats going on

unkempt hamlet
#

Closure SCrunWTF

quick wadi
cinder spear
#

maybe the code from 2016 is so good it's not a good idea to change it Kapp said no-one ever

cinder spear
#

NaN is a fun little beast since the only good way to check for it is isNaN

narrow flame
cinder spear
unkempt hamlet
ebon garden
shadow marsh
#

that's awesome, 3v!

quick wadi
foggy osprey
#

Is there a rate limit on the TMP API? I have some features in mind for our VTC system, and would like to know if there is a max amount of requests per minute/hour/day that I need to keep in mind.

I won't be spamming the API ofc thisisfine, just would like to know if I may run into any issues.

cinder spear
#

API Consumers who require high rates of requests against our APIs should contact Krashnz, ShawnCZek, J-M & Kat_pw with a rationale and contact email for high-rate usage.

foggy osprey
#

Ye i saw that, just wondering what is seen as "high rates"

quartz moth
#

@foggy osprey CJ said 60 requests per limit around 7 months ago but that could have changed #programming message

unkempt hamlet
#

60 reqs/minute is enough, yes.

graceful belfry
#

I mean what would you need that many requests for kekW

foggy osprey
#

All good then, I won't be passing that limit

narrow cove
#

Hello :) Does anyone know a good resource with assembly x64 tutorials/examples? For windows...

mossy cloud
#

Has anyone got a link to the TMP API Docs please?

rugged copper
mossy cloud
#

Thanks πŸ™‚

#

Why it's under stats confuses me xD

unkempt hamlet
#

I knew that question will be next ><

mossy cloud
#

It's all good I'll just bookmark it πŸ˜‚

unkempt hamlet
#

We are planning to migrate API docs to more appropriate space, don't have any time do to it properly

rugged copper
#

Could stick it on github pages and make it open source πŸ˜„

unkempt hamlet
#

We want to do something like OpenAPI

rugged copper
#

❀️

cinder spear
#

open source docs πŸ’―

urban lantern
#

goes grpc only instead kattroll

cinder spear
#

twirp is better Kapp

#

definitely not biased Kapp

wooden glade
#

Hi, I wondered if someone could maybe help me? I'm looking to add a PHP maintenance switch mode/script to my website. So for example when I want the whole website to redirect to the maintenance screen I can just change a value. I've tried looking on Google and Github etc. for the solution but I have come to a stand still

unkempt hamlet
#

There are couple of ways to do that

#

First one - just a conditional redirect to a maintenance page

#

Other options might emerge once you tell us what framework(s) are you using for your project.

wooden glade
#

Ahh ok, how would I go about doing that? I'm not currently using any frameworks PHP wise at least if that makes sense?

#

I'm still learning PHP to be honest lol

unkempt hamlet
#

In Laravel, for example, there is a middleware that checks for an environment variable. If it is true, then redirect to a maintenance page (and other underlying framework-specific stuff).

#

So, you need to store a variable somewhere to check it out before the start of your application.

wooden glade
#

Ahh ok, I'll have to look in to that. Thank you πŸ™‚ I've never used Laravel

unkempt hamlet
#

Some can use something like redirects in Cloudflare.

wooden glade
#

Ahh ok, nice

unkempt hamlet
#

Anyway, the logic is to somehow break your application sequence and show the maintenance page instead.

wooden glade
#

Yeahh, that makes sense to be fair. I tried using some simple PHP code some had suggested on stack overflow but for some reason none of them worked, I'm not sure what I did wrong lol

mossy cloud
#

Are you coding in procedural PHP without a framework?

wooden glade
#

I think so, i'm new to PHP still learning so not tried any frameworks yet

unkempt hamlet
#

Maybe you're trying to redirect after you have your first piece of html (payload) sent.

mossy cloud
#

Sure πŸ™‚ Which web server are you using? Apache or Nginx?

wooden glade
#

Apache πŸ™‚

#

My current code:

<?php require_once './assets/inc/config.inc.php';
if(maintenance == 1) {
header('Location: ./maintenance.php');
}
else {
// do nothing
}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Hidden page | Roqitt Hosting</title>

    <!-- CSS -->
    <link rel="stylesheet" href="/assets/css/maintenance.min.css">
</head>
<body>
    <h1>Hidden web page</h1>
</body>

</html>

mossy cloud
#

Okay, create a file in your root (where your server files are) called .htaccess

#

And in that file, when you want to enable Maintenance Mode, have the following:

order deny,allow
deny from all
allow from <your ip> 
unkempt hamlet
mossy cloud
#

I would recommend using nginx where possible as it allows for more advanced possibilities, but you can't go too wrong with Apache πŸ™‚

wooden glade
#

Ahh ok thank you

wooden glade
quick glen
#

And just to clarify, what Penguin talked about there is a completely separate way to do maintance mode than from doing it in php πŸ˜‰

mossy cloud
#

Indeed

unkempt hamlet
#

Yeah. It is used if your whole application needs to be offline.

quick glen
#

Another thing: header('Location: ./maintenance.php'); the location here needs to be an actual url, not a file. You can imagine it like php telling your browser to go look somewhere else

unkempt hamlet
wooden glade
#

Ohh ok, yeahh that would make sense to be fair. I'm just so used to doing files paths in HTML and CSS I just presumed it would work the same lol. My bad

unkempt hamlet
#

Also, just for the future - do not use loose comparison operator ==, use a strict one === for your own sake

wooden glade
#

Ohh ok. Is there a reason behind this? πŸ™‚ - I'm just curious as I'm learning πŸ™‚

unkempt hamlet
wooden glade
#

Thank you, honestly I really appreciate it πŸ™‚

unkempt hamlet
#

No worries.

quick wadi
unkempt hamlet
foggy osprey
#

Nice! Looks good!

#

Can be really handy for sure, when searching for a user on Steam

heady spoke
#

Looks super cool!

quartz moth
#

@unkempt hamlet Is a .xpi file going to be included for Firefox?

unkempt hamlet
#

We'll see. I am thinking of providing a zip file with the code for a manual installation, Chrome and Firefox binaries will be from stores

#

Just need to write a proper workflow

quartz moth
#

Oki cool πŸ˜„

near drum
#

Hi.

#

I'm not finding in the API documentation, the variable to receive the total count of players playing.

foggy osprey
#

I don't think there's a way to get a total amount from the API, but you can get the amount per server: https://stats.truckersmp.com/api#servers

You could write a custom function to add those numbers up πŸ™‚

near drum
#

ok thanks

raw notch
unkempt hamlet
shadow marsh
#

I guess /* nice */ is a comment, though?

unkempt hamlet
#

Yes

quartz moth
#

@unkempt hamlet Just a small bug I guess with the new extension you've made, it shows that they are in a VTC even if they aren't. If that makes sense via the screenshot. Just thought I'd point it out πŸ˜„

quartz moth
#

Also really good work with the extension, I find it really useful to see if players are adding me just because I've banned them KappaLUL

unkempt hamlet
#

Will be fixed in the next release, thanks ablobcatheartsqueeze

unkempt hamlet
#

Oh wow, Cloudflare Pages is a great straightforward experience.

foggy osprey
mossy cloud
#

Has anyone used Summernote here?

#

I'd like to prevent the insertion of images into a WYSIWYG editor

quartz moth
#

yes I have used it before @mossy cloud

mossy cloud
#

Any ideas? πŸ™‚

quartz moth
#

When you are initialising it you should be able to select that is on the toolbar

#

I found this on their website

mossy cloud
#

Yeah I'm not looking for the ability to insert images, I want it to automatically remove them if a user pastes them in

#

We've had way too many examples of people pasting emojis in and it then shows full size when we view it

quartz moth
#

Ye so if you don't add that in maybe it doesn't show hmmm

#

Not too sure about that though

mossy cloud
#

This is how one ticket came out xD

quartz moth
mossy cloud
#

I'll either have to do it Summernote side / JS or on the HTML Purifier

foggy osprey
#

If you can't find a way to do it in Summernote, perhaps just a quick and dirty preg_replace in your PHP?

#

Im guessing that it outputs html code, so you should be able to filter out any img tags

mossy cloud
#

I found a way, so works great now, thanks though ❀️

foggy osprey
#

Awesome JustRight

unkempt hamlet
shadow marsh
quartz moth
cinder spear
#

that's actually pretty neat

royal quiver
#

@raw notch I assume you're aware of this but the Trucky overlay VTRPC shows an Iveco Hi-Way as the Iveco Stralis.

#

Same issue also applies to the TMP one...

royal quiver
#

maybe it's something to do with the game, as TMP also has the same issue...

raw notch
#

truck model name directly from the game

#

ask SCS truestory

royal quiver
#

Oh wow

royal quiver
#

woah this new Trucky VTRPC feature is so awesome

raw notch
#

actually is not documented feature

royal quiver
#

oh wow, it's still pretty cool soawesome

raw notch
#

if you like RPC, you will love what's coming

shadow marsh
#

Yeah, dow is a pretty good ingineur regarding that - glad we have him Panda_Love he does an amazing job with Trucky in general

royal quiver
raw notch
#

absolutely not πŸ˜„

#

@shadow marsh is a Patron and a Tester so he knows a lot of things πŸ˜„

shadow marsh
#

Of course ^^

rigid zenith
#

Downmeister Is it hard it change the rpc image in trucky

worldly tulip
#

@rigid zenith You can check Trucky KB for that, it's not hard

narrow flame
#

Is there a place where you provide a free virtual server or do you know?

unkempt hamlet
#

No.

narrow flame
#

It's providing a service here in Turkey and Azure and yet he wants to grace the front of a card. Unfortunately I can not give it either. Is there a different way?

raw notch
narrow flame
#

I am planning to monitor a website using languages ​​such as PHP, Node.js.

raw notch
mossy cloud
#

or Statuscake πŸ˜„

narrow flame
#

πŸ˜„

#

Ahh ridiculous google translate, I noticed new. Actually, what I mean is publishing a website using these languages.

unkempt hamlet
# unkempt hamlet Oh wow, Cloudflare Pages is a great straightforward experience.

Some personal news… πŸ™ŠπŸ™ŠπŸ™Š

Cloudflare Pages beta is now OPEN to all!

⚑️ Get started: https://t.co/BC4pTVdQRd
πŸ“š Docs: https://t.co/tvPYpd1wJW

This is just the beginning for our Cloudflare Pages platform. Can’t wait to see what you build! #JustGettingStarted

Likes

139

royal quiver
mossy cloud
mossy cloud
#

Now showing our VTC events in our systems so they can be found in both places #DevUpdates πŸ˜›

strong glacier
#

Thinking about creating a discord bot and aspiring to get a verified developer badge - any ideas?

mossy cloud
#

Don't create a bot just to get a verified badge

opal arch
#

Also, you cannot get the badge anymore since August 2020 iirc

arctic mica
#

THIS They stopped giving it as people were just making bots just to get the badge.

shadow marsh
#

I expected that ngl...

mystic ridge
#

🀣

raw notch
#

it's.. because... her last name is True...

shadow marsh
#

That joke was bad, dow πŸ˜‚

cinder spear
#

type confusion can often lead to security vulnerabilities πŸ€”

raw notch
#

no Maurice... fire the error because... nono..i dont want to believe it...

unkempt hamlet
shadow marsh
#

I mean, true is a boolean operator... I guess, the SQL can't write true in their DB πŸ˜‚ sounds funny to us developers, but is bad for the customers lol

mossy cloud
#

I'm suprised it's only come up now though, surely she would've encountered the error before being 6 months in?

mystic ridge
#

probably a recent change in the codebase which wasn't picked up with a test

mossy cloud
#

Makes sense :)

shadow marsh
#

Could be possible

cinder spear
#

reasons why code coverage is important

shadow marsh
#

True - I also had that once and wondered, why nothing has worked anymore. Changed it and tadaaa, it worked again

cinder spear
#

and fuzzing

#

insert QA engineer walks into a bar joke here

hollow otter
#

Hi devs 😎

foggy osprey
mossy cloud
#

noot Heya

quaint sand
mossy cloud
ember sorrel
#

Hey,
So I've made a custom Discord RPC but it only runs if I goto the Directory of it and run "node index.js" does anyone know how to make it run automatically?

unkempt hamlet
#

Automatically where?

raw notch
#

in his mind

ember sorrel
#

Like you'd open the rich presence and it run like automatically or is that not possible?

unkempt hamlet
#

Um... You fill RP with your own data, not vice versa.

#

Rich Presence doesn't know about your script a damn thing.

raw notch
#

he wants to start node index.js at windows startup

ember sorrel
#

yea ^

unkempt hamlet
#

If you do that while Discord is closed, it will crash.

#

It is better to do that manually, with a shortcut on a Desktop, for example

raw notch
unkempt hamlet
#

Depends on how you process the exceptions, but I don't have high hopes.

shadow marsh
#

Well, my app doesn't crash, if my discord is closed blobcateyes but I guess, that's true ^

raw notch
#

because are websockets fundamentally, so the error is an event

#

it tries to connect over and over and over until discord opens

#

this new laravel with WSL2 + docker + sail is damn nice

raw notch
#

mmmm maybe no...

cinder spear
#

a lot of different ways to autostart something in Windows, and it's easy enough to detect if Discord is running and only run rich presence when it is

dusty flume
#

use pkg

raw notch
#

or nexe

dusty flume
#

then just add to auto start

#

but add to auto start discord too

dusty flume
unkempt hamlet
#

Or node index.js in bat kek

dusty flume
#

no.

raw notch
dusty flume
#

you cant auto run bat (if i remember)

raw notch
unkempt hamlet
#

I can run .ahk, why I can't run .bat what

dusty flume
#

lol

#

just read all text bruh

raw notch
#

what file is ahk?

unkempt hamlet
#

AutoHotKey

ember canyon
#

salam

tame wolf
unkempt hamlet
#

Speak English here, please.

slim pendant
shadow marsh
#

Hey guys,

a friend and me are working on a special for our server designed launcher. So far, so good - I need now help for the Web-API (I'd like to do).

As the Server is whitelisted, I want to add this to the launcher. As I have the player's UUID there, I'd like to have an request to my (afterwards) self-written API, if this user is whitelisted or not (and maybe also display some other data from a different table though) - Anyway, I do NOT have any experience in Web-Development, so it would be awesome, if you could tell me, how I can realise this: https://prnt.sc/10i6wfl to api.mydomain.eu/whitelist/<uuid> and get the enabled as JSON from it. So we can parse this in the launcher.

Any help is apreciated Panda_Love Thanks in Advance!

Lightshot

Captured with Lightshot

quartz moth
#

Assuming you are just using PHP @shadow marsh the most simple way would be to set the header to return JSON and just echo whatever content you want

header('Content-Type: application/json');
echo json_encode($data);

#

I'm on my phone so I can't really type anything special out and I'm sure there are better ways to do it but that should work

shadow marsh
#

Alright, I'm trying to work with that ^^ hopefully I'm not too stupid for that πŸ˜‚

shadow marsh
#

Okay, with a bit help of a tutorial, I got it working and I kinda understand it now πŸ˜‚

#

never thought I manage it to get it running ngl

shadow marsh
#

Yeah, just don't kill me for the names - but I did some APIs now - thanks again!!! Panda_Love

quartz moth
#

No problem love

limber hill
#

If someone is new to programming, what language should he/she learn first? C++, Java,JS?

unkempt hamlet
#

Try them all and choose for yourself

timber stag
#

depends on what you want to doo

shadow marsh
mossy cloud
#

Some documentation is always better than no documentation so great job :)

#

You can't see the links very well against the background tho

#

It doesnt show what type of request to make, and what I should expect back? I can work out they're GET requests but it should say this

shadow marsh
#

wellll πŸ˜… I know, I need to re-color them somehow. And they are all GET-requests thisisfine but I will check that out, how to do that ^^ thanks for your criticsm :3

mossy cloud
#

No worries, not saying it to put you down, just to encourage you :)

sand berry
#

.

raw notch
#

@shadow marsh i'm dying..

shadow marsh
#

I know blobcateyes

#

I will fix that asap blobcateyes

tardy smelt
#

You should look at using a framework too like Laravel

shadow marsh
#

Well, I just used a template, added my own photos and removed things that I don't need blobcateyes

#

it's a wonder, that this site even runs πŸ˜‚

foggy osprey
shadow marsh
#

Well, that is possible

#

but I do not know, if our webserver supports that blobcateyes

#

and also, I am not a webdeveloper at all - I just did that, as my other Developer needs something to work with. It's not really meant to be public anyway until we have a good webdeveloper who cares about that thing - but that will never happen πŸ˜‚

timber stag
#

php poo

timber stag
mossy cloud
#

Have a look at Lumen, It's a laravel micro-framework
I use that for APIs

shadow marsh
#

I don't even know, what you guys are talking about πŸ˜‚ not gonna lie, I'm a native Java-Developer, I do NOT understand anything from Webdevelopment - the API was made in less than 30 mins and it does, what it should do blobcateyes Laravel here, Lumen there, I dunno about anything and I guess, I even don't have a license for that nor the webserver who supports such... whatever that actually all is blobcateyes I feel kinda lost now blobcatsad

mossy cloud
#

Do you have good knowledge of NodeJS at all?

green forge
slim pendant
shadow marsh
shadow marsh
raw notch
#

:D

#

always liked the acronym WAR in java.. is funny

shadow marsh
timber stag
shadow marsh
past shuttle
#

Quick question people, what free collaboration software to you all recommend?

unkempt hamlet
#

Depends on what is your goal.

past shuttle
#

Well, currently learning Python, moving onto a software development course next semester (hopefully), although looking to improve my web development knowledge etc, and kinda want to allow others to join in on the project.

unkempt hamlet
#

If you just need to share code and have a review features, Github/Gitlab are your friends. There are some other features like Wikis, Planning boards, etc.

mossy cloud
#

We started off using Trello for collaboration, then I just built a collaboration system for future use :) Seems to work well ^-^

unkempt hamlet
raw notch
#

WOT

ivory saddle
#

Lol

timber stag
#

Github combined with Visual Studip liveshare is the way to go

#

editor is obviously vscode

azure fox
#

is the tmp bans api down

#

https://api.truckersmp.com/v2/bans/

mossy cloud
#

Seems OK for me

azure fox
#

try putting a tmpid

#

in

#

even tho the player lookup api works i get this when using the ban api {"error":false,"response":[]}

cinder spear
#
'npm' is currently not installed, try running npm i -g npm

oh wow, why didn't I think of that? Kappa

cinder spear
azure fox
cinder spear
#

no

azure fox
#

then it does not work

green forge
#

You can still see bans From a while back if it’s selected as public

cinder spear
#

got an example broken ID?

green forge
#

If it’s private then you won’t see any bans I don’t think

azure fox
cinder spear
#

I've tried 1 and got bans, so I have a 100% success rate so far Kapp

azure fox
#

ye @green forge was right if there history is private u cant see it

#

thxs for the help both of u

green forge
#

You’re welcome πŸ˜‰

azure fox
#

means a lot xD

mystic ridge
twin forge
#

R* said they'll fix it, I'm really looking forward to that πŸ˜„

cinder spear
#

but will they really

#

also 10 megabytes of json is excessive for an initial loading screen

#

apparently according to pcgamer it's already out

#

Rockstar said that it would apply some of t0st's learnings in an update, and now it has: A patch has been released for GTA Online that implements the fix, and the results are immediately obvious.

twin forge
#

wow indeed. I can't try it for another week or so unfortunately

cinder spear
#

I'll give it a try nowas soon as the patch is downloaded

#

about a minute and 40 seconds notbad

#

still not great, but definitely a huge improvement

slim pendant
timber stag
#

whart

#

i dont think you understood

dusty falcon
#

Hello πŸ™‚ I am looking for some help with C# and API problems, if someone could give us a helping hand 😦

unkempt hamlet
#

Don't ask to ask, just ask.

shadow marsh
#

Okay, I need now your help (again) - i have Β§task here, is it possible to do an if statement, to get, if it's as example uuid_trimmed, uuid_full, userid or name?

So ppl can use one of four methods to get a player's info from our API (Code below)

raw notch
#

sincerely i didnt understand what you mena Maurice..

shadow marsh
#

well, you do currently isUser.php?user=<UUID>, but I want to allow ?name=AUserName or ?userid=1234 or ?uuid_full=<The UUID with "-"> and ?uuid_trimmed=<UUID without "-">

#

Well, in other words - is it possible to do a check, if it's ?name, ?userid, ?uuid_full or ?uuid_trimmed - the result should always be the same, so you can use 4 possible things to get an user from our API - is it more understandable? BlobFearSweat

raw notch
#

so you have to do something like isset($_GET["user"]) then select * from bla bla bla where uuid = ${task}
isset($_GET["name"]) then select * from bla bla bla where name = ${task}
isset($_GET["userid"]) then select * from bla bla bla where userid = ${task}

#

you have to check what's the parameter send and do the query accordingly

shadow marsh
#

ahh ^^ okay, will try that, thanks dow Panda_Love

shadow marsh
#

Okay, I kinda messed around now, but I still don't know, where I should put that exactly Catthink (I will attach a screenshot)

#

I mean, $task can't work, as I commented it out, but still Catthink I'm a noobie in PHP aPES_Giggle

past shuttle
#

Question for you all specifically web development related, do you all prefer to use a framework such as bootstrap? do you prefer to create your own framework? does it depend on the type of website that you use either?

mystic ridge
#

I see no reason not to use a framework, why reinvent the wheel unless you have specific case requirements? There are a variety of frameworks out there that have a range of feature sets

mossy cloud
#

Love it πŸ™‚

fervent axle
#

Laravel is a God's gift

timber stag
#

i have a config json in a variable called config
I get from my client side the key that i want to change in the form of "key1.key2"
If i then wanted to set that key in the json to something else, how would i do it?

I cant just simply config[optionToChange] because its "key.key"

#

hope thats not too confusing

past shuttle
#

How do you all edit bootstrap? do you all just create a new css file? edit the bootstrap.css file? just curious to see what you all do, not really sure if there is a "best way" of oding things

#

Btw i have not done this kind of things properly for years now so I may be a little slow KEKW

unkempt hamlet
#

SCSS athink

dusty falcon
#

How do I show content from an API inside a windows Form? e.g TMP Server List (C#) I'm having trouble with this.

raw notch
#

overriding bootstrap class per class is not a good idea

dusty falcon
#

I have class where I could get all the API data from TMP (server list)

#

Then in my main form I wrote this code

#

But nothing appears. What am I doing wrong? 😦

unkempt hamlet
#

Request is asynchronous

#

It won't have the data at the moment of building the form. Wait for the data to appear, then trigger this form.

#

Or update the contents on the fly.

cinder spear
#
  1. in your panel's paint you're creating a new Sinfo, but never assigning any values to it, so the variables are going to have their respective zero values (0 for numbers, empty string for strings)
  2. you're not assigning the data from your parsed json to anything.

It seems like you want something along the lines of calling ServerList.Main() when your form loads and having that return the parsed Sinfo instance(s) for the form to use and reuse. (Would also recommend renaming the method. Main is not descriptive of what it does.)

dusty falcon
#

How should I do it in order to get what i'm looking for ? (to show the list of servers) 😦 I've been like 4 weeks on this. sad

past shuttle
unkempt hamlet
past shuttle
#

I know sass, I just dont understand how I could use it it for bootstra pthough

#

Unless I am being a monkey Pepega

unkempt hamlet
past shuttle
#

Oh I see now, ty

ember canyon
#

Is there any API documentation for TruckersMP?

unkempt hamlet
ember canyon
#

Thanks!

cinder spear
#

everyone loves code reviews, am I right? Kapp

raw notch
#

accept PR

cinder spear
#

πŸ“š Video courses from JomaClass:
πŸŽ“ New to programming? Learn Python here: https://joma.tech/35gCJTd
πŸŽ“ Learn SQL for data science and data analytics: https://joma.tech/3nteQih
πŸŽ“ Data Structures and Algorithms: https://joma.tech/2W89H33

πŸ’¬ Chat with me on Discord:
https://discord.gg/EQwMWFsmQs

⭐ Support my channel to access my Private Discord Chat...

β–Ά Play video
raw notch
#

ahahaha

unkempt hamlet
#

True story

royal quiver
foggy osprey
north flax
shadow marsh
#

oui, now released PES_Hypers

foggy osprey
timber stag
#

Still waiting for the discord.js support

past shuttle
#

?

foggy osprey
#

!

unkempt hamlet
#

Understandable.

foggy osprey
#

Almost perfect vibe

mossy cloud
#

What site is that please?

unkempt hamlet
worldly tulip
#

You can open on Chrome Dev Tools > Lighthouse and run an audit

mossy cloud
celest silo
#

can i play truckermp on linux???

shadow marsh
#

No

#

Just ets2 itself

celest silo
#

πŸ˜”

mossy cloud
#

Theoretically you can with wine but it's not perfect

#

I believe a TMP Linux launcher has been made

celest silo
#

I have to use windows forever

#

:(

foggy osprey
#

But I wouldn't consider it stable

rigid zenith
#

Is there a way to connect a bot to a vtc so if they join the vtc it adds the required roles in Discord

foggy osprey
#

And that returns the user_id

#

so yea, probably would be possible

rigid zenith
#

Ill have a look at that properly tomorrow thanks for that

foggy osprey
#

blobthumbsup good luck

rigid zenith
#

It currently works of a comand at the moment

slim pendant
#

idk if ets2 implements vulcan

cinder spear
#

it doesn't, at least not yet

#

directx and opengl

past shuttle
#

Am I correct in guessing its recommended to use ReactJS with bootstrap?

raw notch
past shuttle
#

Ah ok, quick question, since Im still new to javascript, would I just import the bootstrap.js into a custom js file? or would I just use the bootstrap.js file? (if this makes sense)

raw notch
#

if you use it with plain js. Not with React.

past shuttle
#

Im guessing reactstrap 4 is only compatible with bootstrap 4?

raw notch
#

bootstrap 5 is still in beta and reading the changes they are doing, is not suggested to be used in production

past shuttle
raw notch
#

i mean, they are changing a lot, deprecating components and replacing them

unkempt hamlet
#

Yeah, they went like 1/4 framework changed last time with BS4 beta

raw notch
#

i think with 5 they arent planning to change so much, but things are changin, is a major, so it's normal

past shuttle
#

Is reactstrap compatible with bootstrap 5? or does it only support the stable versions of bootstrap?

raw notch
#

stable, the 4

#

"Easy to use React Bootstrap 4 components"

past shuttle
#

I was hoping there was something else I was missing lmao

#

Time to downgrade pog

raw notch
#

hardly you could find something already compatible with the v5

#

specially production ready

past shuttle
#

So, I would just use reactjs to build the website instead of using your typical html file?

raw notch
#

if you use react, could be a bit "against the pattern" including Jquery

#

because bootstrap needs it

#

(but I've used Jquery with react for small things because the Dom traversing is easier)

unkempt hamlet
#

Nowadays plain ES6 is up to the battle for DOM traversing

raw notch
#

technology is not always a straight path. it depends on what you have to build, your knowledge, the time :)

raw notch
#

if you want to use react and bootstrap, @past shuttle, i suggest reactstrap.
I've used it in three projects and never complain about it.
I've tried also mdboostrap in react, i didn't like it

past shuttle
#

Mainly just trying to find the best way to create it, if there is a "best way"

raw notch
#

there isn't, really

#

you could also consider Laravel, for example, for the backend or with vue / react frontend

past shuttle
#

Was thinking reactstrap for front end tbh

raw notch
#

I'm approaching now vue in Laravel, is nice

raw notch
past shuttle
raw notch
#

iirc with bootstrap, fundamentally reactstrap use only the css framework because reimplement all components in JSX

past shuttle
#

ah ok

raw notch
#

is why is really useful, instead of struggling with divs and classes you write only <FormGroup> or <Card>

past shuttle
#

Ah ok

#

Atm this is what I have, would I be missing anything vital?

raw notch
#

oh never look at node_modules :D or you will be scared as much packages are there :D

#

is like a black hole

past shuttle
#

lmao

unkempt hamlet
#

Hay! Is anyone of you interested in tech rundown of the latest Twitch Plays ETS2 stream?

cinder spear
#

yes

pulsar jungle
#

Interesting

unkempt hamlet
#

Okay, this Sunday at 6 pm UTC on my Twitch channel (in the profile)

raw notch
#

i didnt understand what you mean πŸ˜„

raw notch
#

indeed... what's the "twitch plays ets2 stream?" πŸ˜„

unkempt hamlet
raw notch
#

ah.. but why? πŸ˜„

unkempt hamlet
#

Why what exactly?

raw notch
#

why do this? πŸ˜„

unkempt hamlet
raw notch
#

the only reason would be just for fun πŸ˜„

unkempt hamlet
#

Why not? LoL

past shuttle
#

This wont end well KEKW

unkempt hamlet
#

I mean, 6 deliveries in 12 hours kekw

royal quiver
#

It was really hilarious

past shuttle
#

Got a bit of an issue, tried to add more spacing options on bootstrap but nothing seems to be updating, this is what I have, am I missing anything?

$spacer: 1rem !default;
    $spacers: () !default;
     // stylelint-disable-next-line scss/dollar-variable-default
    $spacers: map-merge(
        (
        0: 0,
        1: ($spacer * .25),    //4px
        2: ($spacer * .5),     //8px
        3: $spacer,            //16px
        4: ($spacer * 1.5),    //24px
        5: ($spacer * 3),      //48px
        6: ($spacer * 4),      //64px
        7: ($spacer * 5),      //80px
        8: ($spacer * 6.25),   //100px
        9: ($spacer * 7.5),    //120px
        10: ($spacer * 9.375)  //150px
       ),
    $spacers
);
neon crater
#

Hey, I want to make a program that is able to set game / configuration variables that effects the current game. I haven't really used the SCS SDK so not sure where to look or start πŸ˜…. Any help would be great

trail vector
# neon crater Hey, I want to make a program that is able to set game / configuration variables...

Well, the SCS SDK are read-only values, you can't edit/write anything with it. So if you want to change any config variables in the game without restarting you'll have to call some game function(s) directly, something like this. #programming message. With the cmd_execute function you can, as the name would suggest, execute a command in the game console and edit config variables that way.
Now, the addresses in that code are not correct anymore as they change when the game updates. Here's the new one for ETS2 (v1.39.4.17s): 0x00000001401B67A0. I don't have the one for ATS because I'm in 1.40 for that.

neon crater
# trail vector Well, the SCS SDK are read-only values, you can't edit/write anything with it. S...

Hey, sorry for the second ping. This might be being bad at c++ but I'm trying to run the commands with the updated address hex? (idk what the term would be) though I'm thrown a 'Access violation executing location' error. My first idea would be something to do with the address not being correct or the program not being able to find the process? Thanks again

Full error

Unhandled exception at 0x006767A0 in ConsoleApplication1.exe: 0xC0000005: Access violation executing location 0x006767A0.
unkempt hamlet
#

ooo that's neat new Discord function

royal quiver
#

Just imagine the features you could get with the power of Microsoft Bing KappaLUL

trail vector
next crane
#

cmd_execute
ATS (v.1.39.4.5): 0x00000001401B4580

opal arch
past shuttle
#

Anyone able to help out with my annoying issue? πŸ™‚

quick glen
raw notch
quick glen
#

Right

#

ok

#

Did not see that πŸ˜…

raw notch
past shuttle
#

Yeah

#

Well

#

Not Sass, but SCSS

#

Cant remember if its still the same file type or not lmao

raw notch
#

yeah the same

past shuttle
#

Ah ok thought so

raw notch
#

show your scss entry point, example style.scss where you are importing bootstrap, your variables and your custom classes

past shuttle
#

I assume you mean this?

raw notch
#

ok your variables scss must be at the top, before all other bootstrap scss

past shuttle
#

Should I just ignore this?

raw notch
#

well no, because is an error πŸ˜„

#

mine is

@import "custom";
@import "../../../node_modules/bootstrap/scss/bootstrap";

and i'm using darken() in custom.scss

past shuttle
#

Oh

raw notch
#

and darken is a built-in sass function

past shuttle
#

Thats in the bootstrap variables file, which I didnt touch PepoThink

raw notch
#

ah wait, the error is not darken is not defined but $color is an invalid object

past shuttle
#

Yeah, its $link-color but idk where thats used tbh

raw notch
#

are you using a bootswatch theme?

past shuttle
#

looks like I found it

$link-color:                              theme-color("primary") !default;
raw notch
#
$link-color:                $body-color !default;
$link-hover-color:          darken($link-color, 15%) !default;
$link-hover-decoration:     none !default;
past shuttle
#

I've got a bad feeling im using the wrong bootstrap version lmao

#

Somehow

raw notch
#

it's why theme-color is a bootstrap function

#

if you need to use the primary, you should override the $primary variable

#

and then $link-color: $primary

#

using the $primary variable is the gateway for the correct bootstrap customization, the default is blue, but if you want red with all shades (darken and lighter colors), define $primary is the way

past shuttle
#

Decided just to import all bootstrap tbh

raw notch
#

but always after your variables

past shuttle
#

got both variables and bootstrap in my custom.scss although nothing seems to have changed

raw notch
#

almost now should be correct. so you defined the $spacer in your variables?

past shuttle
#

yeah

neon crater
quick glen
#

@neon crater You do not actually need to inject it, if you are making it as a plugin then the game "injects it" for you.

#

What you are doing with the cmd_execute is function hooking using memory addresses. The addresses you've seen in this channel (ex. 0x00000001401B4580) are offsets from the base memory address of the game when its running. The base memory address of the game changes from each time you start the game (* it might not, depends on a lot of factors, but its not static and will vary from computer to computer, restart to restart) as its decided by windows where the game fits in ram, so you would have to get this dynamically and then add the offset to the function you want to execute. Now one very important aspect of this is that the offsets change for every single different build of the game (with rare exceptions). If the version number changes, you need to find a new offset to make it work with that new version.

neon crater
#

Ah ok. Do you have any links / examples for creation of a new ets2 plugin that I could use. In regards to the offsets, where do these come from and how are the obtained so I can update in the future? With passing the commands to be run, would a websocket work? i.e. have a local websocket server and send commands to be run into the DLL

quick glen
#

In the scs telemetry sdk there's a couple of working example plugins that you can use/modify to have a plugin going https://modding.scssoft.com/wiki/Documentation/Engine/SDK/Telemetry

The offsets come from reverse engineering the game; looking at the assembly code of the game, debugging the game and finding the function you're looking for. Theres a lot of ways to do this. Could even be automated by signature searching.

As for websockets.. Yeah. Its possible.

neon crater
#

Ah ok, this is great. Thanks for the help shiba_heart

next crane
#

@neon crater As the basis of your plugin, you can use the example from SCS, and further develop it for your tasks. You can find a basic example in the plugin folder \examples\telemetry.

If you plan to use cmd_execute within the plugin, it is better to do it within the SCS_TELEMETRY_EVENT_frame_end event, it's more safely.

#

If I understand the task correctly, you plan to establish a connection to your server for receive/send some commands. You can look to the side Socket.IO
https://github.com/socketio/socket.io-client-cpp
https://socket.io/

neon crater
unkempt hamlet
ember canyon
#

Hello

#

Can you help me how i get subscriber role?

unkempt hamlet
#

No way

north flax
#

Good

jovial jetty
#

Why does @hazy night use Discord.js commando?

#

🀣

unkempt hamlet
#

What's wrong?

jovial jetty
#

It's just ew innit

unkempt hamlet
#

What's wrong, again?

jovial jetty
#

I didn't say anything was wrong?

#

It's just ew

unkempt hamlet
#

Bruh

#

It doesn't make any sense.

jovial jetty
#

Just strange that it's made in TypeScript and uses Commando, something which was designed for those who are new(ish) to Discord.js or programming in general

unkempt hamlet
#

Who said it was designed for that?

raw notch
#

because Commando is simply great

jovial jetty
balmy tinsel
#

Commando is quite simply not great and there are far better alternatives for an easier development experience in discord.js

#

Β―_(ツ)_/Β―

raw notch
#

like what for example?

balmy tinsel
#

Source: I made several bots that I decided to never release lul

raw notch
#

because i didnt found anything good like Commando

balmy tinsel
#

Akairo

#

Far easier to use

#

And works brilliantly

#

Once you figure out a few of the little nuances in it, it works far better than Commando could ever dream to

unkempt hamlet
#

I don't need to use API directly if I can just use commando and have more time to make my application better, just like any other packages

balmy tinsel
#

Nah i dont think you're getting what I'm saying mate honestly

#

Akairo is a discord.js framework just like Commando

#

There's plenty out there

jovial jetty
#

Pure Discord.js > any Discord.js framwork

balmy tinsel
#

that's fact

#

make your own command handler wethinkBigbrain

unkempt hamlet
#

If I know commando very fine, why should I consider any other package?

balmy tinsel
#

Β―_(ツ)_/Β―

unkempt hamlet
#

It suits my needs

balmy tinsel
#

it's your choice ofc

unkempt hamlet
#

Exactly

balmy tinsel
#

am not saying u should switch

jovial jetty
#

πŸ‘€

balmy tinsel
#

just saying there's way better alternatives and commando can be a bit shit

opal blade
#

@jovial jetty pepelove

unkempt hamlet
#

It is going nowhere shrug1

balmy tinsel
#

ASshrug02 just like my life

mossy cloud
#

If it works it's not ew

jovial jetty
#

personal prefernece

unkempt hamlet
#

Exactly

balmy tinsel
#

I've used akairo for all my bots since making the worst command handler to ever exist

#

and akairo works beautifully

unkempt hamlet
#

"commando is not fine because of this, this and that, use akairo because this, that and particularly this one" - good recommendation
"commando ew, akairo fine" - bad

balmy tinsel
#

yeah that's a fair stance

#

akairo has pretty good command handling and allows easier categorising of commands and grouping commands of the same type together without needing to write an over-complicated command handler

#

it also has a lot of built in utils too

#

that can be done using raw d.js but akairo makes it waaaay easier

#

i can also copy paste my template bot and get a bot up in 5 mins

past shuttle
#

Btw was anyone able to figure out why my spacers dont work?

balmy tinsel
#

spacers?

#

eh?

jovial jetty
#

Also, CJ, does botranktir use prettier or a code formatter?

balmy tinsel
#

Beautiful code is best code

unkempt hamlet
#

Can't remember

jovial jetty
#

I just ran prettier --write . and some files are bruh

balmy tinsel
jovial jetty
#

42ms to format

unkempt hamlet
#

I prefer standardjs personally

jovial jetty
balmy tinsel
#

prettier is love

#

prettier is life

#

once i started using prettier on my files, never gone back to anything else

unkempt hamlet
balmy tinsel
#

Oh god

#

I really wanna get back into bot dev tbh

#

But I just have 0 ideas XD

past shuttle
jovial jetty
#

Oh, y'all just use StandardJS to format your code

#

That's what does it ew prettier makes the file 10x longer but looks sick

balmy tinsel
jovial jetty
#

and more lines = looks like it does more

balmy tinsel
#

I agree

unkempt hamlet
#

I mean, code conventions is not a number of lines

#

What are you talking about?

balmy tinsel
#

Code formatting

jovial jetty
#

Botrankir uses standardjs to format

#

But i prefer prettier

balmy tinsel
#

Making the code look ✨ pretty ✨

jovial jetty
#

anyway im off to aPES3_RollerCoaster

balmy tinsel
#

bruh moment

unkempt hamlet
past shuttle
#

So quick question for those who are some what experienced with bootstrap sass, so atm I have my $spacers all done, how would I use that in normal CSS, what I mean is that currently I have these $spacers

$spacer: 1rem !default;
    $spacers: () !default;
     // stylelint-disable-next-line scss/dollar-variable-default
    $spacers: map-merge(
        (
        0: 0,
        1: ($spacer * .25),    //4px
        2: ($spacer * .5),     //8px
        3: $spacer,            //16px
        4: ($spacer * 1.5),    //24px
        5: ($spacer * 3),      //48px
        6: ($spacer * 4),      //64px
        7: ($spacer * 5),      //80px
        8: ($spacer * 6.25),   //100px
        9: ($spacer * 7.5),    //120px
        10: ($spacer * 9.375)  //150px
       ),
    $spacers
);

How would I add this onto normal CSS, atm this is what I have

.py-6 {
    padding: $spacer !important;
}
#

Honestly kinda confused now

unkempt hamlet
#

Oh wow

unkempt hamlet
#

if you want to override Bootstrap values, you have to set the variables, then import bootstrap scss

mossy cloud
unkempt hamlet
#

Might be πŸ₯”

mossy cloud
#

Moron kappa

opal arch
ember canyon
#

Discord.js v13

#

For Slash Commands

jovial jetty
#

You can handle slash commands on D.js V12

#

@ember canyon

#

My Discord.js bot (written in TypeScript) handles them with ease 😎

ember canyon
#

Ye, but you have to install stuffs

#

I meant natove support.

#

Such as reply

jovial jetty
# ember canyon Ye, but you have to install stuffs

No. You can use client.on("raw") (shows all gateway events with that client) then filter it down to INTERACTION_CREATE and that is a slash command, then you make a POST request to another endpoint stating the type and data and boom, you have a response to a slash command.
Obviously, I've explained it really really rough, but there is currently a way of doing it and the way I do it on my bot. And it isn't really the easiest thing to do, but hey ho, it does the job and it looks cool & makes it look like I'm way smarter than I actually am-

ember canyon
#

🀣

#

Ye, but. I'm waiting for v13

jovial jetty
#

NeverTM; the PR has been open for ages 🀣

cinder spear
#

I heard you like PRs

timber stag
#

delete evetything
replace it with more inefficient spaghetti mess that takes double the space

#

coding

opal arch
wild cave
#

How can he access these files?

#

Ghidra?

unkempt hamlet
#

Ask the repo creator shrug1

opal arch
#

He cannot access any files. The code there consists of guesses

shadow marsh
#

So it may or may not work?

unkempt hamlet
#

Either working or not, it doesn't comply with our Terms of Service ToS

shadow marsh
#

don't worry, I won't do IFMP or whatever shrug_animated because I'm too stupid for CPP kEk if it was written in Java, perhaps I'd tried it out ngl

unkempt hamlet
royal quiver
#

this licence LUL

shadow marsh
#

sweet blobcateyes

unkempt hamlet
#

Some form of WTFPL LoL

shadow marsh
#

but still, I do not have any knowledge about CPP so it's kinda..... useless for me aPES_Giggle but maybe I will see something, I dunno

royal quiver
#

I have literally no idea how to compile it into something useful sadcatthumbsup

shadow marsh
#

same kEk or which IDE I should choose to work in it

royal quiver
#

I guess QualityMP will have to be put on hold KappaLUL

shadow marsh
#

In case of figuring out CPP and working with this code, I would do a small MP just for friends - means I will add somehow a whitelist - dunno how but it will be possible I guess

royal quiver
#

It probably requires a very old version of ETS, so I don't think a whitelist would be necessary

shadow marsh
#

Well, they can update it, so why can't we do that though

#

but you are right

royal quiver
#

I think trying to update from that version to 1.39 would be so much work...

shadow marsh
#

indeed

royal quiver
#

TMP has multiple developers and they have had the opportunity to update over time.

shadow marsh
#

And I'm a noob in CPP and don't have ppl who helps me - will kinda be funny kEk

wild cave
#

Probably mwl4 has taken a security measure for this situation. πŸ˜…

opal arch
#

One can never obtain the original source code from the final binary. You can only guess the original names and functionality like here:
<#programming message>

lost rose
#

While looking at the old repository, I wonder why TruckersMP is not open-source now

unkempt hamlet
#

I don't see any reason for it

lost rose
#

If I think about it, then (from my point of view) the disclosure of the source code with a suitable license would lead to more people being able to work on TruckersMP, even though they have no idea about reverse engineering but know how to code in C++. Maybe it would also help people learning how to do reverse engineering. FiveM is also a mp mod (not the same because the offer a mod framework) but if you look at the mp part it is slightly the same thing. tbh I actually don't see any disadvantage if you did it that way

unkempt hamlet
#

The problems are:

  1. TruckersMP is pretty niche compared to FiveM, which means less attention and less community in general.
  2. The actual cost of the open-source (including time spending) is really high, often without any positive outcome.
  3. I don't see us just sending the code in a wild to make ourselves competitors just for the sake of OSS community.
  4. The moment you have your code published, the attention from hackers (or script-kiddies) is way higher than usual.
  5. Per SCS EULA, nobody can reverse-engineer their code and redistribute it. So, open-sourced TruckersMP can lead to liability.
wild cave
#

Does this mean that no reverse engineering was used when coding the MP?

unkempt hamlet
#

Definitely not, but we have an agreements.

wild cave
#

Scs does not allow this but does not lock its files.

#

To be honest, Ghidra was opening the core_ets2mp.dll file when it was first released.

unkempt hamlet
#

Discord doesn't allow you but you can see their code client as is.

#

That's how legal things work.

lost rose
# unkempt hamlet The problems are: 1) TruckersMP is pretty niche compared to FiveM, which means ...
  1. Wouldn't really say that because the TruckersMP community (and also the ETS/ATS community in general) is still quite large with millions of users.
  2. Partly agreed, it takes a bit more time yes, but most of the time will be compensated with external contributions. So you actually save time instead of losing time.
  3. That's right, but as you are the "original" truck sim mp mod and have a very big community, you should definitely not be worried about that.
  4. Partly agreed. Normal "hackers" aren't interested in truck sims though. But players who manipulate their ingame positions for example could be a problem, but this could be partly solved with server-side checks.
  5. Yes, you can't redistribute the reverse-engineered code that's absolutely right, but you can distribute the mp mod code because it is your code and not SCS's code as far as I know
unkempt hamlet
#

but most of the time will be compensated with external contributions
Only if your code is used by many other projects (like Laravel). But you still need to review every single piece of code. That's even harder with open-source community.

#

With 3, you cannot compare it to FiveM, because GTA itself is made by a multi-billion company who doesn't care about it much. In our case, the possible lose is beyond any positive outcomes.

lost rose
opal arch
# lost rose While looking at the old repository, I wonder why TruckersMP is not open-source ...

I recommend reading the whole conversation that mwl4 took a part in: <#general message>
It is not about open-source projects, it is about multiplayer projects for ETS2. However, a lot of that applies to your question, too. Here is a brief recap:

Old source code has nothing πŸ˜‰ It is nothing compared to the current source code of truckersmp [...]
Basically creating multiplayer for a game to which you have source codes is very hard, and this will tell you every game developer
What about a game to which you don't have source code? [...]
but the thing is not only about lines of code, but also architecture of code, used solutions, patterns, etc [...]
[...] also GTA has scripting engine, so it makes a lot things easier πŸ˜„ [...]
about fivem: because of many contributors into code there is (or was) problem with server linux build; https://forum.fivem.net/t/important-fivem-linux-server-builds-at-risk/196509
So many contributors does not mean that code is fine πŸ˜‰ [...] sometimes you spot insecure code in open source after few years; https://twitter.com/3lbios/status/1087855341226942465
From my point of view, yes, this community has a lot of developers. But so far from what I have seen, there is hardly anybody who would make great additions to the code. The required skill level is just too high (it is not just about C++ language); only getting used to the reverse engineering part and the whole code base takes too much time.
Additionally, count the points mentioned by CJMAXiK. At the end, people would just use something we create in exchange for our time.

next crane
#

@lost rose In the context of the above, you can start with yourself. Start posting your research in the framework of reverse engineering of the game, your achievements and your code for community. Otherwise, your suggestion looks like "give me your code and we will do something about it within the community". It doesn't work that way.

ember canyon
#

Not really a computor program but, Im making a RIFLE, more specifically, a GUN that shoots HUGE rounds.
Anything I should know about 3d modeling on a PC to test stuff?

unkempt hamlet
#

I mean, you should know 3d modelling.

ember canyon
#

I know how to do 3d modeling, I just want some tips. I dont know what software to use too.

unkempt hamlet
#

Try to make your question more streamlined. What kind of software you're looking for, what goals do you pursue, what kind of features you want to see?

mossy cloud
ember canyon
royal quiver
#

Blender is fairly represen#tative of most CAD software, so I guess you have to get used to the number of features...

foggy osprey
royal quiver
#

I can see why some people try to avoid using on-line services now sadcatthumbsup

ebon garden
#

Yikes

distant atlas
#

Web Page Bug

#

Must be corrected

#

@ember canyon Developer

shadow marsh
#

Where's a bug?

distant atlas
#

''Reopen''

#

Only GMM

#

But I'm User

#

Player*

#

I Think This Is An Important Issue You Should Take Care Of

#

@opal arch

lilac aurora
opal arch
#

It should be already fixed

raw notch
#

my game just crashed changing the player tag color

royal quiver
#

I think that's a well know bug. The best way to change tag colour is to use the decimal colour code in the config.txt smile1

opal arch
naive yacht
#

Any developer available for a job?

quick glen
naive yacht
#

Its to create a website to a vtc

lilac aurora
livid shoal
#

Hello humans, cats and vehicles.
I'm developing a big platform for the government. It is mainly for the emergency services. When it's done I'll have to expand it to other related services that I can't disclose here as they're classified projects.

#

Nevertheless, I need help and suggestions in regards to the audit log. As you may expect, all transactions and movements on the platform have to be logged.

#

At the moment, I simply have a table with the logs, but the thing is with storing what changed. Here's how it is stored:
postAudit(entity, user, title, action, table, old, new, client)

  • entity, is the entity that the user works at
  • user, is the user
  • title, is a small description of what the user did
  • action, is the operation like update, create, delete, etc.
  • table, is the table of the record
  • old, stores the previous data that was in the records
  • new, stores the new record
  • client, stores the user device information like MAC, IP, location, etc.
#

So, when an auditor opens a log, it contains all the info of that log. The old and new are side by side and the differences are highlighted. However, I don't like how it is being done now, I believe is not efficient because I'm doubling unnecessary data. That's why I'm here asking if someone has some ideas of what and how I can improve this.

#

I thought I could check if the old data and the new data and only post the fields that where different. But before I re-structure the code to it, I would like to see if there were any suggestions.

#

Sorry if it sound vague or confusing, there's more behind how the logs work but that's government classified info so that's all I can provide.

winged schooner
#

I'm developing a big platform for the government. and ur asking on a trucking sim community in developer chat. Sounds weird

raw notch
#

by its nature, a log, must be verbose, so if you are doubling data, is necessary to keep coherence in the log

#

but yes, you should compare the two entities, and if they are different, write a log, otherwise there is no need to write a log if nothing changed

winged schooner
#

This including make it basic, make use of uid's

raw notch
#

depending on the language you are using there are many ways to compare objects, from prop to prop or by proprietary language comparison tool

#

and so on

livid shoal
#

All IDs are UUIDs

#

So, I may change the structure to something like this?

  • table, the table of the record
  • record_id, the affected id
  • no_operation, an incremental int
  • operation
  • user
  • entity
  • client
  • timestamp
  • old
  • new

I'm just concerned if using the "table" as a field could in some way compromise anything πŸ€”

raw notch
#

you are missing the "entity type"

#

ah it's the table?

#

it's weird to mind on tables on 2021... you should mind on Entities (class names, objects and so on)

livid shoal
#

I use MVC

raw notch
#

and missing also the operation type

raw notch
#

operation type = create, update, delete

livid shoal
#

I use classes

raw notch
#

old \ new what would be? a JSON serialization of objects?

livid shoal
#

I could do that, yes

livid shoal
#

Well I appreciate your help guys, however I just got told that I will have to change it all to .NET

#

So yes... RIP work done until now.

unkempt hamlet
#

I mean, that's why technical brief is out there - to outline tools, technologies and qualifications needed for the project.

livid shoal
#

Yeah, like, this project is being worked on for at least 4 years. We've settled on PHP due to some restrictions with .NET. But apparently, changed are being made by the IT "modernisation" department and they won't support PHP in the datacenters for new applications, so yeah... At least the development is on a early stage

unkempt hamlet
#

Government ultranice

livid shoal
#

Oh yeah, you don't have an idea of how hard is to make them understand a thing.

unkempt hamlet
#

I do actually

livid shoal
#

Oh, so you know the pain it is

unkempt hamlet
#

Yeah...

livid shoal
#

Well, it is what it is. I guess me and my team will have to learn ASP. Experience is always welcome.

#

I just hope that they won't change it again.

#

They're changing everything to AWS

royal quiver
#

AWS is kind of the future though

unkempt hamlet
#

I was an IT architect for a government social guarantees system for quite a while.

royal quiver
#

Cloud computing has a lot to offer. Just look at how much of the web runs on AWS or the Azure today Smile

livid shoal
#

Yes, I think the contract was a good one. AWS also has a very good reputation on their servers, security, performance, almost everything tbh and they already work with many government agencies.

livid shoal
unkempt hamlet
#

That's a tough task, good luck!

livid shoal
#

It is, probably I won't be the project coordinator as I don't have that experience yet. I will be happy that a project I took 1 year just in research was worth for something. Specially for experience πŸ™‚

#

And thank you

cinder spear
unkempt hamlet
#

Rust is a way to go kekw

cinder spear
#

be sure to checkout the white paper

unkempt hamlet
#

I don't understand NFT enough SCLOADING

cinder spear
#

don't need to

wet kite
#

not sure if this is the correct channel, tryna set up botranktir in my server but for some reason it says I'm missing a parameter. I'm admin in the server and have used the bot in some of my other servers. Any idea's what could be causing it?

The message is in an announcement channel so could that be the problem?

unkempt hamlet
#

What is the exact message you're getting?

wet kite
#

Message: -addrole #stream-announcements 831230051898622012 :punch: @Live Notified

Response: [EM] Murdoc Niccals, please, provide valid parameters! For more information, run command -help addrole

unkempt hamlet
#

Do not use @ if it is not in the role name

wet kite
#

weird, it works in normal channels but not in an announcement channel.

I'll try that now

#

still the same response

unkempt hamlet
wet kite
#

I was correct. The bot doesn't work if the message is in an announcement channel

I changed the channel to a normal channel and it worked straight away

#

no worries bud, thanks for your help πŸ™‚

cinder spear
#

Right?

opal arch
#

Imagine we used that for truck accessories

shadow marsh
#

TruckersMP will go brrr then - loading times are not 2 mins anymore, more like 10 seconds KappaJail

cinder spear
#

loading times are not 2 mins but 50 days Kapp

cursive orchid
#

Pretty random question, someone (a developer or someone who have access to the group code) could give me the exact R.G.B color code of the in-game Patreon group? Thannnks πŸ˜‰

cursive orchid
#

Thank you so much! πŸ˜‰

past shuttle
#

@livid shoal Gratz

livid shoal
north flax
mossy cloud
#

I can just imagine dependabot in GitHub having a seizure over the amount of vulnerabilities found πŸ˜‚

cursive orchid
#

Heyyy, small question for devs here.
Why did you guys are not reducing the slots on the Sim1?

Wouldn't it be better to have less players on Sim1, and more players on Sim2? In order to have a balance to get less stress.

I can see than the IP of the Sim1 are not the same as the Sim2, so different machine I assume? The sim2 do not have that problem.

Only the sim1 was really impacted by the OVH fire?

Thanks πŸ˜‰

unkempt hamlet
#

As said in Dev Update blog post, we are working on possible solutions.

#

Sim 2 is in different location and at different provider.

cursive orchid
#

This is not to sound boring. I'm just offering a solution as a player! Good luck with the problem solving.

timber stag
naive yacht
#

any available developer?

unkempt hamlet
#

For what?

naive yacht
#

for a job

unkempt hamlet
naive yacht
#

can u call me on private?

unkempt hamlet
#

I am not available for hire

naive yacht
#

so why do u even answer

unkempt hamlet
timber stag
quick glen
past shuttle