#development
1 messages · Page 1958 of 1
C# not dead
All be it if you're not using it for game dev in unity then you really have no other major use for it tbh. At least I cant think of one rn
even with that game dev industry is probably the worst option left
you see how those devs get treated with all that crunching
I pray for their sanity.
Unreal is just too much
or hope they use something higher level
What is higher level ?
nice one
Also as for ur earthquake idea how would you even get the real time data. No api that I know of gives out that kind of info
scrape from here http://ds.iris.edu/seismon/index.phtml
Up-to-date map of the latest earthquakes with resources like news, lists, tools and a 3D viewer.
c++ looks less complicated than c# lmao
i mean
to me its easier to understand simpler stuff than those 10 billion different namespaces and classes that java and c# have
literally everything is SomeBIgAssNamespace.SomeClassThing.SomeConstructor.SomeMethod
yeah but it can be made simpler lul
im kinda tired of oop tbh
im starting to like funcional again
I didn't understand the difference between OOP and functional tbh
There is no escape from the "get this" "get that" philosophy of Java
never cared enough to look it up
Functional programming is about using functions as much as possible
At the highest level
OOP is more about coupling data and code together with objects
classes are good when they fit the use case, but then they dont fit, its a giant mess
It's hard to describe given there are two kinds of OOP
The original not being about what we see today
ok it just doesn't embed
I thought I fucked it up
Anyway, that library looks rather neat
damn thats a good ass website
see people? thats how you make a good website
clean, beautiful and above all fast as fuck
well it just has nothing to display
I swear 99% of the resources went to those blocks in the background
still, its a pleasant change compared to most other websites out there that are slow af and filled with ads
for a while now i think
Can someone tell me the difference from Set.entries and Set.values
Set doesn't have a key,pair relationship so I see no reason to have values and entrieis methods
its there for compatibility with the Map api
it doesnt really serve any purpose
Set.keys and Set.values return the same thing
I see
Set.entires returns an array of [key,value], which are both the same thing
When a dictionary fan works on your classes
Yea
but not with a Set since it has no keys
It just returns an iterator like the rest of those
I was using set to make a remove duplicates method on Array
ah yes, thats a good usecase
Array.prototype.removeDuplicates = function () {
return new Set(this).values()
}
i dont remember if i ever tested performance for that
lel
lmao
I also attached a random method to an array
Array.prototype.random= function () {
return this[Math.floor(Math.random() * this.length)]
}
xD
Cause why not
Never know when ima need to get something random from an array

I might learn java on the side to mess around with that game library
It would be a fun project
If you ever test the performance of that i'd like to know the results
wait i think im doing something wrong
alright so i tested a few things, and it is pretty much the best you can have. Sets are slower than object/map lookup if 80-90% of the items are unique
but if more than 10-20% of them are duplicates, then Set is much faster
with 100% uniques, object lookup took 8 seconds, map lookup took 8.6 seconds and Set took 9 seconds
with 100% duplicates, object and map took the same time as before, but Set took 1.3 seconds
So in some situations Set is a obv better choice
yeah the more duplicates the better
could I possibly send you my command list in dms and you could tell me what commands are fair to have and what ones arent?
I can’t even come up with ideas for 250+ commands I don’t even know how people manage to do that
They copy other bots
Actually I have about 212 and I thought about them myself because I use a lot of commands 
So probs came from memory of me using commands
Yeah I guess so but techincally every bot is a copy of another one
Plus 40% of the commands are probably just the config commands for other commands
Plus everything is worth a shot I wanna take where my bot is now and make it much better
Honest command count above 50 is too much
Could I send you the command list in DM’s? Cuz like I wanna make the perfect bot
No ty
Ok
That's being a little too generic
It's like saying tekken copied street fighter because it's a fighting game
There are also some bots which are the first of a kind
Like Tim's bot (not anymore probably, but was)
So all hope is not lost, you just need to find out what people want, and what you're willing to commit your time into
Would it be smarter to work on 1 section at a time like first moderation commands then fun commands then mini game commands ect ect..
I can only say for myself, but I like to start with a generalist bot
Then specialize it on the go
Unless you know what you'll choose for it already
I just want to make top quality bot that’s free for everyone to use
By that I just mean good quality bot
Starting with a generalist bot helps establishing a stable foundation
You'll setup your core structure, the longer you spend on it the bulkier it'll be
If I was to do that it’d be smarter to hire a developer instead of just paying one big fee wouldn’t it?
My bot started as a tool for my server, things I missed in other bots or that I thought was badly implemented
Over the time it steered toward card collection
Honestly stop making multi-purpose bots 😩
Now it's major focus is TCG
Multi purpose is good for a first project
Helps a lot learning fundamentals and improving techniques
yes but trying to make it successful in todays market is like beating a dead dog
You don't need to be the next mee6
I don’t care about it being successful tbh
I just want a good bot that’s free to use
Yea but those who try to be the next mee6 or even more successful are beating a dead dog
Experience is worth more than focusing on breaking the bank on the first try
You'll just exhaust yourself and give up to frustration
mee6 was here before the market was even a thing 
Idm multi-purpose bots when you're making one to get some experience
but tbh I feel like focusing on a specific goal like Moderation or a game bot is a better idea
As I said, start with a multi purpose then specialize over time
ye
Also KuuHaKu ur a java guy right? Where did you first start learning java? Was it like in a class or just on ur own
Well, both I guess
Everything started with android studio I guess
During university I had to make a graduation project, and I'm kinda like 3d modeling
oh sick
But finding the exact textures I need is quite exhausting
So I had the idea of making a photo-to-texture generator
Thing is, I sucked at performance, but I liked the syntax of java
Idk
That's where discord comes, my bot started as a JS project, but I hate how js is so lenient
Then I found out java was valid for making a bot as well, so I began practicing with it to learn new ways of reducing processing time
In the end, the project was indeed a success, and I got stuck to java
That's how I met java
You got the reference yay
lol
I was thinking of learning java or at least tinkering with it but wasnt sure if I should
My attention span is 0 and when I cant come up with something to make I just get rid of the idea of using the language
Find what you like
And try to make tools for it using the language you're trying
Try to make your hobbies easier, or automate tasks
how do i make my array like has five strings in it how do i do that? 
What?
depending on the language
let arr = ['Hello', 'World']
cracks fingers
that is how u make an array of strings
I was planning on learning java to mess around with lwgl
no not that i cant just find a way to explain it
Oh no we’re loosing another one to Java, god save us
okay php user
lol don’t start a comparison between Java and php
People will bash it, and bash those who use it, but it's a good language
Just stay away from jdk 8
Smh smh smh
wuts wrong with jdk 8
The reason for hatred against java is due to jdk 8
icic
Ah
Too many leaks, way too verbose, little QoL
Also wtf, I thought I ordered meatt witth my taco not a fucking shell 
My recommendation is start with AT LEAST 11, but newer versions are just as fine
11 contains many improvements, I can't list them all really
I think I have the latest jdk version installed cause of mc 1.18
Dumb… php 11 is not released yet

FakE php user
Proud php user
found it
Never heard of push?
I am not even going to mention how cursed that looks

Welp, I'll begone for now, bye guys
oof bye haku
bei
hey umm
is Interaction.reply not a thing anymore??
hey so,
when i use Math.abs on a 18bit string. its converting the last 2 digits to 00
ex: Math.abs("854250285334112513") -> is converted to 854250285334112500.
Is there a way i can tell it to not to that or something?
Calculate with bigints
how
It will allow you to calculate numbers larger than the max interger
thanks
Array(5).fill("x")
oh it's with you too
same with me
but maybe i did something wrong
yes 15 mins ago
yes,
im connecting to api using websocket but it closes connection after 1 minute
no errors, why is it happening?
wait
i forgot xd it was commented out for some reason
just for the sake of correctness, 18 bit does not mean 18 digits. snowflakes are 64 bits
gotcha
you can check it by doing number.toString(2).length
i still didnt understand why Math.abs doesnt take more than 16 digits
because js does not support 64 bit integers
all numbers in js are double precision floats, which have a maximum integer space of 53 bits
i see, so using bitint is an alternative
for anything bigger, you need to use the dedicated BigInt values
so i am making a bot that handles purchases on my site, like when u buy something from my site the bot is supposed to send a message
what could be the best way to trigger that
you can have the bot running on your server and just make api calls to backend which sends out messages
thats better than what i was typing
they are spereated
you can still use a server and log your bot in
thats what im currently doing. even mine is separated
right
imo best way would be this:
use oauth to sign into your site, and get users id, send trigger on purchase, check if in discord server, if yes then send message
make api calls to the server which has your bot logged in
already done that
the only problem is the call to the bot to send the message rn
yeah you can trigger that by using another server to listen to routes then just call the client to send DMs
just send it via http, no need for a client
^
class Manager {
constructor(options){
this.ops = options;
}
First()
{
// Another File
class first {
constructor() {}
FirstSecond() {}
FirstThird() {}
}
}
}
module.exports = Manager;
how can i do that Manager.First.FirstSecond()
Make First a property on Manager
@rustic nova
okay thanks
you want to do this js const Manager = require("./manager.js"); Manager.First.FirstSecond(); or this? ```js
const Manager = require("./manager.js");
const manager = new Manager();
manager.First.FirstSecond();
Second
also, you want to do this? js manager.First.FirstSecond(); or this? ```js
const first = new manager.First();
first.FirstSecond();
const Tickets = require("./TicketManager");
class Manager {
constructor(client, options){
this.client = client;
this.ops = options;
this.Collector = require("./ClientInteractionCollector")(client);
this.TicketManager = new Tickets(client, options);
}
}
module.exports = Manager;
Manager.TicketManager.Send(msg, {
channel: msg.channel
})
This works good
👍
Idk if it is true
yes that is the correct way to do it
What bot


my man just violated me

did you try anything? does it log anything? does it show any error? where is your bot hosted? did you try to console.log stuff to see if it works?
which does not work with anything Math related
replit
Hello, how can i deploy my slash commands globally?
google compute engine, galaxygate, hetzner
and vercel for nextjs
GCP
idk, i paid with paypal
no but cherryservers does
Bot hosted on replit , no error logged in the console , after I write any command it is logged in the console but the message not came in the channel
they're very highly priced tho
show code
does this happen with all commands or only a specific command?
all commands
interactions or message commands?
I use 2 repls . one for music , one for moderation
both repls are on
but the bot not responding
show your index.js
here is better
f
@cunning gust dm
just keep it here; no need to dm each other
That way everybody can offer advice
(And Tim is here, trust me, you want Tim)
you know you're fucked when this happens in your osless environment
yes, the square root of 2 is the square root of
im hoping its just a simple mistake with the string concat function
not with the actual heap allocator
it hurts to even think about
Why not just say the square root of 2 is the square root of 2 
thing is there isnt such a thing in my os yet so if it is happening (which it probably is) i wouldnt know
paging isnt set up properly yet
not sure how to go about it yet
why.
dude why do you need all this for?
const request = require("request");
const axios = require("axios");
const snekfetch = require("snekfetch");
const fetch = require("node-fetch");
those 4 literally do the same thing
require all of the http libs

where phin
what is your discord.js version?
request and snekfetch
achievement unlocked
wheres my nodejs certification
wait
that's not a version
discord.js vwait
v10.wait.notoutdated
12.5.3
as expected
at this point it's not even a joke that you should switch to detritus
Yes but keep in mind it doesn’t hold your hand as much as djs
does the prefix message work? when you mention the bot
Djs has a massive amount of resources for learning it
Yes
when the bot is responding that time
now it is not responding
show your event handler
wait
the other day i saw somebody's massive command handler for slash commands
meanwhile I have a one line command handler: new InteractionCommandClient();
wait, so the prefix message does not work?
const { PREFIX, LAVA_HOST, LAVA_PASSWORD, LAVA_PORT } = require('../../config');
const { MessageEmbed } = require("discord.js")
module.exports = async bot => {
console.log(${bot.user.username} is available now!)
setInterval(() => bot.user.setActivity(${bot.guilds.cache.size} Servers, { type: "WATCHING"}),5000)
};
Lmao true
ready.js
show message.js
does the activity work?
does the console.log(${bot.user.username} is available now!) work?
yes
actually my command handler is 60 lines long so i don't register invalid commands but yeah it's one line
where `
I have a one line command handler pretty much too
lost in time
This is what I use (don’t judge the foreach I’m lazy) ```ts
await client.addMultipleIn('commands', { subdirectories: true }).catch((...e) => {
console.log(e);
e.forEach(console.error);
err = true;
});
i dont think queue and map are a great combination
More queues = better performance of course!
queue and array sounds great tho
how about WeakMap
I use a Map of queues for my in progress bot that I’ve half given up on
does console.log(commandfile) work?
yes
maybe they're storing queue as Map<guildId, Array /* queue */>
that’s how I store mine
show the command file of one command that is not working
Except I just use the standard lightweight queue data structure
Instead of bothering with arrays directly
what about Set
I don’t use Sets for my setup
sets are depressed maps
you dont need to have this ```js
let prefix;
if (message.author.bot || message.channel.type === "dm") return;
try {
let fetched = await db.fetch(prefix_${message.guild.id});
if (fetched == null) {
prefix = PREFIX
} else {
prefix = fetched
}
} catch (e) {
console.log(e)
};
if(message.content.toLowerCase() === ${prefix}help){
}
you already do the prefix check and the content check in message.js
.
wha does this mean my bot is not responding when i get this
I'm helping my friend with his bot and yeah
code
umm
This is a log, correct?
no its a bot
the login i think my friend coded it im helping him
?
let me check his files
I don’t understand
I don’t see anything that would log something like that in the code you sent
When do you get this message. Like what do you do and this message is sent
You only log to the console twice in that code you sent, and neither of them are promises you have to await
Top tip; don’t try run code you don’t understand
^^
i hit run and i get it
My friend coded it
Again, code you don’t understand
I was helping him setup the hosting
If they coded it, get him to ask here
^^
...
…?
How can I generate unique ID's like the Discord user id's? (532515511863476226)
It should only contain numbers and should be unique ofc
discord generates ids a little differently
its encoded dates and some other params
but a simple way would be to have a string and attach x random numbers to it
how do i convert this bitfield to get permissions array or something, the "permissions" obj
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
If you're using discord.js there is a utility method which can generate IDs for you
I use normal nodejs it‘s not for a bot
you can also steal the code for it 
lol
tis free real estate
discordjs can do this for you i think if you're using it
instead of using the deconstruct method you generate one
??
Like you want to generate snowflake IDs https://en.wikipedia.org/wiki/Snowflake_ID ?
Tim had something posted a few days ago #development message
/workspace/commands/box-opening/chest.js:65
if (chss.rarity == 'Common') chr = Array(19).fill('nada');
^
TypeError: Cannot read properties of undefined (reading 'rarity')
at Object.run (/workspace/commands/box-opening/chest.js:65:12)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
why chss ( character randomized ) is giving undefined
let { chh } = require("../../object.js")
let arena = await db.get(`arena_${message.author.id}`)
if (!arena) arena = 0;
let chs = Object.values(chh).filter(element => element.arena <= arena);
if (!chs) chs = Object.values(chh).filter(element => element.arena === arena);
let chss = chs[Math.floor(Math.random() * chs.length)];
Hello, how can i deploy my slash commands globally?
By registering them to the API once
if (wins < 5) {
arena = training;
next = "Next arena in 5 wins";
arenms = "`Training Camp`";
} else if (trophies < 450 && wins >= 5) {
arena = goblin;
next = "Next arena in 450 trophies";
arenms = "**1**, `Goblin Stadium`";
} else if (trophies > 450) {
arena = bone;
next = "Next arena in 950 trophies";
arenms = "**2**, `Bone Pit`";
} else if (trophies > 950) {
arena = barbarian;
next = "Next arena in 1,400 trophies";
arenms = "**3**, `Barbarian Bowl`";
} else if (trophies > 1400) {
arena = pekka;
next = "Next arena in 2,000 trophies";
arenms = "**4**, `P.E.K.K.A's Playhouse`";
}
```^ and this doesn't work too, it's always saying arena 2 when I have 2000
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
It will take up to an hour until they are available in your guilds
The solution of Tim does the job quite well I think. Is the id also unique? I mean it has to because it's with time 🤔
It should be. So just make sure if you scale across process to change the workerId, and every once in a while clear out the sequence
As an example:
if(seq > 4194303) { seq = 0 }
That is the main benefit of Snowflakes
I made it more simple I guess I just used 2 times xD
since you have if (trophies > 450) if this condition is met it will stop and don't go farther, that's why you should start with the biggest number usually:
if (trophies > 1400) {
} else if (trophies > 950) {
} else if (trophies > 450 && wins >= 5) {
} else if (wins < 5) { // You can also change this last one to just an else statement if you want
}
yes
Does anyone know about sharding?
yes
@quartz kindle i fixed the "the square root of x is the square root of" thing
it was actually due to the lack of illegal memory access checks
the square root of x is indeed the square root of x
the smart pointer i made was actually deallocated prematurely by c++ because i transformed it into a normal pointer early which caused the space occupied by the result of the calculation to be freed and overwritten by the string created after it
another day of my amazing creations that work as expected firing back against me
that's what c++ is all about
xD
unfortunately
i realised that was the issue when i did something else and it started printing random memory
i really need to add a segfault system
but idk how
the gist of it is that each piece of memory is called a page and you can assign properties and privilege levels to those pages in a page directory
idk is this how they work
ive had enough of programs randomly reading memory they're not supposed to have access to
i'd rather get a segfault and break something than suffer for a couple days finding the issue
many would argue thats the same thing
what tf does that mean
code: https://srcb.in/rtSmBVjbq5
there is no .match
(also ignore that i have an "options" object and am not using it, wanted to remove that)
If I had to guess, it had an issue creating the Mongo client internally
NFTs don't necessarily suck
It's just how most people have implemented them that's sucked
I like how Drew Binsky has used them
Traveled to all 197 countries and plans to sell NFTs of places he's visited
Thing is, that's the official Next.js template for working with MongoDB
But idk what's wrong
It's just a guess, so the implementation may or may not be wrong.
Maybe it's cuz I'm using Typescript?
cuz yk, typescript is picky
didn't find anything online about this regarding MongoDB and Typescript
databases or anything with connections suck with nextjs
they're my turn off point for nextjs
because the connections dont persist forever
you probably have an odd typescript issue
yeah
idk how to fix it though
i had a similar error with mongoose, so I switched to MongoDB, since that's atleast more supported by Next.js
maybe its a weird bug
did you try completely restarting the server
(nextjs dev server)
yeah i did that
are you also making sure that the mongo code isnt running on the client side at all
i saw that if you make even one little import and dont use it inside of a server props method it gets compiled to the client side
it's not running on the client side
how can you be sure
are you 100% making all calls to the database inside of a getserversideprops function or something similar
and are you making use of the functions not leaving anything unused
i am making one call to the getserversideprops function
i am making use of it, but it still won't work
anyone else having the issue of: images your bot sends not showing?
Yeah a few people were complaining about this the last days
Happens to me too sometimes
If discord has any sort of trouble fetching them
Or with caching them… who knows
idk, some are sending find, but they all used to send find and just arent atm
oh wait its working now wth
i literally done nothing 😄
^ thats what it was sending less than an hour ago
for some reason the attachment just had 0bytes
but everything else was processing correctly
Yeah sometimes it works sometimes not
😓
hmmm, is it frequent?
Even if the request was logged as successful in your webserver
lol yea everything else was showing correctly
strange thing is only some commands were affected
others were still showing images properly
Yeah it seems to be totally random
it is the first ive ever seen it tbf
Whatever the issue is in Discord’s backend
Nah the issue exists for a long time already - probably almost more than a year
At least since I have issues with it
you find the issue occurs often?
Not often but always with new not already posted and cached images
Uhh yeah might happen more often for you then
😭
never happened to me
could be limited to interactions? im still using messages
hmm, yea it is using slash commands
havent noticed the issue with regular messages but i dont listen for those now lol
No happened to me in the past too, way before slash commands
pls help
TokenError: Invalid "redirect_uri" in request.
at Strategy.OAuth2Strategy.parseErrorResponse (/home/runner/bot/node_modules/passport-oauth2/lib/strategy.js:358:12)
at Strategy.OAuth2Strategy._createOAuthError (/home/runner/bot/node_modules/passport-oauth2/lib/strategy.js:405:16)
at /home/runner/bot/node_modules/passport-oauth2/lib/strategy.js:175:45
at /home/runner/bot/node_modules/oauth/lib/oauth2.js:191:18
at passBackControl (/home/runner/bot/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage.<anonymous> (/home/runner/bot/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
I doubt OAUTH allows a redirection to non-SSL secured endpoints
Try to use the https protocol/scheme if that’s available for your project domain
I don’t know if you got a valid ssl cert in place
Okay thanks
I mean, it works with localhost stuff which is non ssl
does anyone ever pay attention to this
Wtf are you talking
Nah
How tf can discord redirect you to localhost? That would be discord itself
what
it would hit your localhost
it does work with localhost:5000
as the redirect
i test all the time
yea tf you talking about fake
I literally use localhost to test my shit all the time with discord
useful for mobile apps or running local web servers for example
It works with whatever port you have assigned 
I use 3000 mmost of the time
Do even you know what we were talking about and what localhost means as URL redirection target wtf

I’m close to bonk you all
You said it doesn't redirect to a non ssl site, which if I am understanding correctly is anything with http. Now I assume it will treat localhost as non ssl
which discord does allow redirection to so why not any http site
Localhost never has a not self-signed cert
And you can not redirect a request to localhost from an external server
So you are telling me discord can not redirect to your locally hosted web server
localhost is just a placeholder for 127.0.0.1 and IPs will not get signed at least not by any CA I know
well yea
But I am trying to understand whether or not you think discord can't redirect to something locally hosted
What you’re talking about makes no sense at all
We’re talking about a redirection target URL
Not your (local) server requesting Discord’s API
I am also talking about redirection target url
You can actually redirect a user to localhost using Discord OAuth2. It's how most web devs test their authentication and stuff.
Discord allowed it for quick testing from local server, as far as I am concerned.
For testing purposes maybe
I doubt OAUTH allows a redirection to non-SSL secured endpoints
Just test it with a non-secured domain and you will get the same error as the guy above
I've never ran into that issue
because otherwise hackers will steal your discord account by intercepting the traffic
Wouldn’t make sense to allow unsecured endpoints for an authentication process
Yeah a good old man in the middle attack
they will also find your bank account and hack into it

I wish I had a bank account
And I wish people would have basic knowledge about networking, that would result in less weird discussions

Just because you’re using the public McDonald’s WiFi
I like the consistency of Discord removing access to the guild region for privacy reasons
And adding it back for users and guilds with interactions
(even if that seems to be useful)
And there’s still no fucking sub command nesting in the GUI after so many fucking months
ffs
geocoding is fun
searching for alto paraiso goias
what google returns:
Alto Paraíso de Goiás - State of Goiás, 73770-000, Brazil
what locationIQ returns:
Alto Paraíso de Goiás, Região Geográfica Imediata de Flores de Goiás, Região Geográfica Intermediária de Luziânia-Águas Lindas de Goiás, Goiás, Região Centro-Oeste, 73770000, Brasil
lmao
I understand this best

just do it
select.dropdown { width: 200%; min-width: 2000px; }


xD
And you know what… that’s compatible with any browser
Not like topgg being compatible with no browser 
Um.. What?
.addField('Date Joined', `${Member.joinedAt}\n<t:${Member.joinedTimestamp}:R>`, true)
NVM, joinedTimestamp is in ms I guess
Yeah the message format requires a Unix timestamp in seconds not ms
I didn't realize it was in ms, it doesn't say that in the docs so I was confused
Probably because the default timestamp in JS is in ms
But yeah a note would be helpful but too much work it seems 
It doesnt work because i tried with localhost and it kept on giving me a Connection Was Not Secure Error Or Something iirc
hey yall, so about a month ago my bot broke and I'm just getting around to fixing it but essentially the slash command is no longer working properly on mobile
The deploy command looks like:
and on desktop it works just fine
but when I try to do it on mobile it get this
anyone use postgres as DB? have you ever done partitioning
also can we partition a view?
local function getTime()
local date = os.date("*t") -- this creates a table with {year = 1998, month = 9, day = 16, yday = 259, wday = 4, hour = 23, min = 48, sec = 10, isdst = false}
return ("%02d:%02d:%02d"):format(((date.hour +1)), date.min,date.sec) -- gets the hour minutes and seconds within that table and formats it
end
while game:GetService("RunService").RenderStepped:wait() do
game:GetService("Lighting").TimeOfDay = getTime() -- set the time
end
L = game:GetService("Lighting")
while true do
wait(60)
T = L:GetMinutesAfterMidnight()
if T < 300 then --Night time, after midnight.
game.Lighting.OutdoorAmbient = Color3.new(30/255,30/255,30/255)
elseif T > 300 and T < 390 then --Dawn, sun rise.
game.Lighting.OutdoorAmbient = Color3.new((30+(T-300)/1.5)/255,(30+(T-300)/1.5)/255,(30+(T-300)/1.5)/255)
elseif T > 390 and T < 600 then --Morning.
game.Lighting.OutdoorAmbient = Color3.new((90+(T-390)/7)/255,(90+(T-390)/7)/255,(90+(T-390)/7)/255)
elseif T > 600 and T < 840 then --Day time.
game.Lighting.OutdoorAmbient = Color3.new(120/255,120/255,120/255)
elseif T > 840 and T < 1050 then --Afternoon.
game.Lighting.OutdoorAmbient = Color3.new((120-(T-840)/7)/255,(120-(T-840)/7)/255,(120-(T-840)/7)/255)
elseif T > 1050 and T < 1140 then --Evening, sun set.
game.Lighting.OutdoorAmbient = Color3.new((90-(T-1050)/1.5)/255,(90-(T-1050)/1.5)/255,(90-(T-1050)/1.5)/255)
elseif T > 1140 then --Night time, before midnight.
game.Lighting.OutdoorAmbient = Color3.new(30/255,30/255,30/255)
end
end
Syntax check, please
what language is that?
LUA
Can anyone help me for 24/7 in vc music bot
top.gg with IE
Delete the registered command and register it once again.
That will probably solve your issue.
Make sure after deleting it to check your mobile Discord app if the command is gone
Car car;
size_t num_name = line_contents.find("-");
car.number = stoi(line_contents.substr(0, num_name));
size_t num_brand = line_contents.find("-", num_name + 1);
car.brand = line_contents.substr(num_name + 1, num_brand);
size_t num_year = line_contents.find("-", num_brand + 1);
cout << num_name << " " << num_brand << " " << num_year << endl;
AM I GOING INSANE??
The data: 1234-Honda-2017
And the final result...
number: 1234
brand: Honda-2017
year: 2017
And the logged indexes:
4 10 15
WHY IS -2017 INCLUDED IN THE BRAND IF THE num_brand ENDS AT 10
Is the second parameter of your substr function a length instead of the index?
SAME CODE WITH JS AND IT'S CORRECT. C++ IS AT FAULT
second parameter of substr is where it should end
Yeah called the index but maybe it’s the length regarding the first parameter in your weird language 
It's not, substr is JS' slice and find exactly like indexOf. Works on both the number and the year, but not the brand
Haha FakE was right
It’s the length not the index (position)
The length based on your pos parameter
That would explain your issue as "Honda-2017" has exactly 10 characters
To make my day please try car.brand = …(num_name + 1, (num_brand - num_name));
No it has a length of 5, starting it’s position behind num_name + 1
Or am I wrong here?
brand - name = 5
both work
That’s not the only fucking language using length as second parameter for substr instead of the position to stop
they are all weird
Why would it do it like that, there are no benefits to it, only makes it more confusing. And it doesn't make it any more flexible or anything.
just a fuck you
Should be relative to the starting index
Yeah or if negative starting to count from the end of the string
Huh just joking 
At least it got sorted out
key expected bytes or bytearray, but got int
it literally told you what was wrong 
trace where that value was originated
the stack trace right there is useful
hello
so im making a discord bot forthe first time and im havind trouble reggistering my commands
im following a guide
its js tho so idk
lmfaoo all the traces where inside of libraries smh
yep defin read that
I have a problem in the bots description in top.gg:
If I make a "paragraph" (Key: Enter), then it makes 2 paragraphs, so 1 free line. How can I prevent that, so I only starts a new line without a free one?
using markdown or html?
using markdown it should be like this:
// same line
abc
xyz
// 2 lines
abc <- two spaces at the end
xyz
// paragraph (3 lines)
abc
xyz
I just saw that this: '*' and '-' makes the problem. There is always one free line
then i guess its just the way top.gg's css is setup
you can add your own css to change it
I fixed it with this ```md
<li>test</li>
<li>test</li>
Now `text` doesnt work any more 😅
Nvm. Lose-Win-Situation
what is "r"?
the language
just 'r'? A language which is called 'r'? Wow
theres c too
wanna use my way? no markdown needed
My ear is open :)
wait a sec
I use this • and I set things like this ```
• Combat
I just want to reproduce this.
points as a list, no free line and a red inline block
Very clever
Wow
and you can combine markdown with it
Thank you
Works fine. Thank you
using unicodes is very clever :P
ok
if switch is the only thing then you can
👍 so when you have these issues check first for unicode and then use css if theren's nothing
else switch
ok
this helps
any solution for this? ms edge not loading pages correctly
I have to reload it multiple times to get it working
all pages are same
poor internet connection
that doesnt mean anything
the page is failing to load css files
either something in the connection broke, or the stackoverflow server is broken
you can check your dev tools network tab
see what happened to the css files
stack overflow aint feeling too good
Maybe they copied a code piece from a post and pasted it in there source code and it broke lol /s
Hey! My bot went unresponsive, then went offline for about 4 minutes, then came back online but it didn't affect its uptime? (Its ping would reach 25 seconds.)
client.uptime is not affected by disconnects and reconnects
You can't
iirc that's not available anymore
@rustic nova do the command 
What if I don't

-verifybot
Hi! It seems like you are looking for information on how to get your bot verified.
Once your bot reaches 75 servers or more, you are eligible for bot verification. Since October 7, 2020, bots that reach 100 servers will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.
If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.
Please note:
- We cannot provide support on how to get your bot verified.
- We are not affiliated with discord's bot verification system.
- Getting your bot verified on top.gg (approved through our queue), does not mean you will also get verified by discord. Top.gg's queue has no correlation to discord's verification system whatsoever.
then i'll have to find a ss
they want the early verified bot developer badge
-nobadge
why
my gosh... there can't be anything more unnecessary than that
i have
anyone here who knows python ?
people cant be creative anymore smh

Don’t ask if anyone knows python, just ask your question and if someone does then they’ll respond :p
Guys, i need ideas for commands for a discord bot. My head is empty 
lmao
same
my gosh
smh
smh
smh
Do you remember the time this wasn't required to do every 5 min?

that api is so goddamn suspicious though dont you agree
I want to build an app which shows how suspicious someone is acting on a scale of 1 to 10 inside of a game
will even time them doing tasks to see if theyre faking
Errorcode 403 be like "Forbidden Request XY was ejected"
lmao
Yes just ask your question and save everyone's time
Because this applies
https://github.com/redis/redis-py what about this
There's a difference between not wanting to help and not speaking a snakish language
i saw the like but still flask login requires sql
n ion wanna use it
Flask login requires SQL..?
Why would you need that for Flask login
Is it possible to get shard count from discord.py client object
for server count i do len(client.guilds)
shard_count?
it requires user models n things n thats only on sql i think
oh good point
anyways no solution for >
Ah, flask-login
its not for discord @spark flint thanks for thought
yuhb :/
Does the embed char limit (1024) include header and footer?
Or just description and fields or just fields?!
Description is 2048 chars, iirc field values and their names along with titles are 1024
Not sure about footer, but overall char limit on an embed is 6k chars
Whenever I try to use db.set it sets them all as null (Quick.db latest @ djs latest)
db.set(`author_${message.channel.id}`, `${message.author.tag}`)
db.set(`author2_${message.channel.id}`, `${message.author.id}`)
db.set(`content_${message.channel.id}`, `- ${message.content}`)```
let auth1 = db.get(`author_${interaction.channel.id}`)
let auth = db.get(`author2_${interaction.channel.id}`)
let cont = db.get(`content_${interaction.channel.id}`)
Not sure how or why, but I can't ask in discord.gg/plexidev cause I'm banned? That's new news lol, can't seem to find a ban appeals for them either.
console.log(auth1, auth, cont)
Its null
Good thinking
You honestly don't look like you helped much
:))
i can't do anything tho
dunno if anyone here is interested in reading tech research but I thought this was really interesting https://www.csc.kth.se/utbildning/kth/kurser/DD143X/dkand12/Group5Mikael/final/Jonatan_Landsberg_and_Anton_Lundqvist.pdf
Damn it isn't from Berkeley
probably wouldn't be able to understand it if it was from berkeley lol

college dropout gang
why tf am I getting a missing permissions error from Discord when changing the bots nickname?
The permission for the bot (& everybody) is set properly
doesn't make any sense at all
Fetching the guild members permissions of the bot ALSO lists change_nickname as permission
wtf
ffs
Wtf are you talking?
The bot has no timeout 
Yes (someone asked this same question a few days ago), but it would be useful to read this as well: #development message
maybe yo
Probably null
No… it’s null
Just the default discord data being send with the request
asterisk
Will check that one. But for now, i gotta clear my eyes 
don't forget the bleach
said Mr. Trump
I can't believe there is a patern for uwu language
does anyone know like a simple prebuilt editor, so like an editor similair to google sites or wix or whatever, but with easy, beginner html that you can edit to actually learn something of how those things are built?
joomla
Odd
Haven’t really used ejs all that much
Just thought you might’ve meant require lol
is it this?
it worked like 2 mins ago
That’s what we will hear a lot in here in April
LMAO
its not done like that
i'm doing res.render()
and it renders an external ejs file
mmkay
How can I make my bot join a voice channel?
You should really provide more context if you want someone to help
things like saying what language you're writing it in, posting the code you already have, what you've already tried can help people help you.

First time I see you writing in development again since your promotion.
I thought as a rich employee you don’t need to deal with the “poor” people anymore

Lol
so, i always tought brotli was stupidly slow in js and there was soething wrong with it
it turns out that node just sets maximum possible compression by default, and you have to manually change the settings to prevent that
thats just stupid
like, deflate was taking 40ms, and brotli was taking 8000ms
pointer compress C:
but if i set brotli to level 6, then it takes 50ms
for some reason the default compression level is 11
I’m trying to and i must be right since he doesn’t respond to us plebs 

I was literally saying this 2h ago. This used to be the only channel I would hang out in and use, and now I barely open it at all
mainly because I've been investing a lot more time in top.gg and less in bot development, but also because I don't really have any questions I need to ask for help for
I'd mostly use this channel now just for general advice that's all.
But I honestly believe (and I said this to a team member earlier) this channel is super super valuable for new bot devs and I know (in my experience at least) the community here was far more helpful than any other dev server 
Anyone who helps out here is honestly the GOAT and has all my respect
🐐 < Tim
Tim needs a nerf
i need a buff, im bronze in league
My gosh always the people with their gamer slangs
If I would have spend more time playing games I would understand what’s going on
Huh no worries, I have no clue what’s going on behind the scenes and how much time it costs you.
Just didn’t see you for a “long” time when I do remember some nice conversations in the past which are unfortunately rare nowadays.
at least you’re still here
How do I center table and set width?
It works on mobile, until you add w-1/3 m-auto
(Using tailwind)
Always depends on the parent elements
Generally centering it works with setting margin: 0 auto;
As well as for divs
As long as they don’t have a width of 100% of course 
Elements should never be greater than your screen size




