#development
1 messages · Page 1918 of 1
That can’t work since you need to go back 2 folders
Nah that wasn’t I was speaking about
Meant the path ../
../../
Oh I see your DM
Well got push notifications disabled
You better ping me here, won’t get a notification but will most likely take a look into this chat more often
I’m still driving 
Fake is always driving
Nah actually I’m not
It’s just the same time every day
When most people in here are online
Terrible idea as I usually don’t remember any virtual shit due lot of stress in the real world
Just throw your question in
There are more trolls in here not just me
Here, unstress
But be careful…
There are weird people in this channel.
Watch out for a dude called something like, Kuhakuwakabubku
He’s using … Java, yes Java!1!
Absolutely disturbing but it is how it is
And I heard he eats children

also be careful of brazilians, they come from huehuehueland
and you'll never know you're talking to one

Soon my new cores and NVME drives will be shipped if I don’t get scammed on eBay

One just ends up as database drive lol
I'm dead
is there any better than than doing .catch for all promies?
Not really. You can try to prevent an error from happening but you should always catch your promises
is it a good idea to do that to interaction.channel.send() functions to prevent permission errors?
You should, but the main thing you should be doing is to check for permission (with overwrites in mind)
If you check that, then it'll less likely to error (but not impossible)
Unless you don't cache channels/permission overwrites then I guess you can only try to send the message
If so catching it would be enough
ok
client.on('voiceStateUpdate', (oldMember, newMember) => {
let newUserChannel = newMember.voiceChannel
let oldUserChannel = oldMember.voiceChannel
newMember.send("welcome to vc")
})``` no error. it doesn't send anything either. I want it to send a message to a user when thye join a vc
Do u have guild_presences intent?
What is the point of defining newUserChannel and oldUserChannel when you haven't used them
// This returns the voice state of a guild member
client.on("voiceStateUpdate", (oldState, newState) => {
// Get the voice channel
const oldChannel = oldState.channel;
const newChannel = newState.channel;
// Get the guild member
const member = newState.member
// Send it to member's DM
if(member) member.send({ content: "welcome to vc" });
});
JAVA 😮
burn the heathen! lol
🍞
yea thanks just got done cleaning it up 
what was wrong with q map?
oh god my eyes
are you looking at my ”before” code
also
here's a tip for performance
data that's static like that should be created outside of the function
that way you're not re-creating it on every call
yes, that was horrid
glad you tidied it up, looks much nicer!
some unity questions:
- what does
usingdo in C# - visual studio community or visual studio code?
- what extensions are great for working with unity
- is it a great idea to make a game when you don't even know how to do
hello world
what are those funny words magic weeb
oh
well it imports everything to global
with (require("smth")) {
// entire rest of code
}
yes i had people from like 3-4 servers tell me to clean it up some days ago
is that a good thing or a bad thing that everything is top level
so I didn't need to wait 3 hours for .net to install
i use unity
yes unity c# is an ancient version of mono
its oogly
unity is a bit of a meme tbh
you have a .net lib for discord right
now im thinking between school work or game development?
Escape from Tarkov is made with unity
if you ask real game devs they dont want a language that holds your hands 😄
forgor to save my code before turning off my pc
unreal engine is where its at
I use VSC and replit's autosave and I have never pressed ctrl + s except 5 seconds ago
i use vsc and github
https://community.amethyst.rs/t/games-made-with-amethyst/134
only some crappy 2d games made with it?
Continuing from #142 on GitHub, I figured we could have an early go at this by editing this wiki-topic together. After a while we can try to sort them by things like “open source”, “education-friendly”, “status:complete” etc., but for now let’s just get as many games as possible listed. I’ll only put forth one soft requirement: Game must be eit...
respond to interaction
btw you can respond with 'thinking' then delete the response
does editing your followup count as responding
You still have to acknowledge the interaction and then remove the button
Acknowledging the interaction is not sending a message
delete your old response and create a new one ig
We had that discussion a few days ago.
You should probably edit the message with the exact same content.
Take a look above and below the message I linked
Yes, yes we did talk about a button interaction, too
Can someone help me with skip vote button (music bot) .
Language :- Js
Framework :- Node 16.3
Didnt u ask for java? 👀
No one gonna write you code here
for me they did 
well i already had my own code but they wrote code how i can clean my code
Exactly
you did a stackoverflow
That is not helping with writing code
i had if else spam
Skill issue
if you don't need elo or level, you can make it cooler const [, rankings, embedColor] = ...
I told you :|
I know it just gets messed when it comes to set a dj role
My bad I'm new to development .
i recommend using an object instead of a tuple. rank[2] doesn't mean anything but rank.color is a lot more clear
well its already a lot cleaner than the if else
I know I'm talking about the data structure
put the data outside the function too, like cry mentioned
it needs to get data from api when the command is run
and make the embed using the data it takes from api
it reads ELO from the Api to get the right image and color for the embed and rest of the stats also come from the api
how am i gonna put it in different file
Thoughts about storing bot prefixes in cache as well as in the db? Basically instead of hitting the db to check for prefixes on every command call, when the bot starts it would add all the set prefixes that are stored in the db to a collection (js) attached to the client. That way the bot will query the collection instead of the db. I'm just trying to make my code as efficient as possible and trying to keep db queries at a minimum. Obviously when a user sets or changes the bot prefix it would update in the collection and the db.
(slash commands are not a solution here)
Yes 100%
Do everything in cache unless it needs the db(then update the db if it needs it)
You could use DAO and have it reference the cache from there so you don't have to do it within each function
Yes, that’s exactly what I do
Pretty easy to implement
Yep yep 100%. I'm just re-writing everything to make it more efficient and cleaner
I'll probably implement it. I was just wondering if anyone saw any downsides.
i store prefixes with json 
Using json as a db is not what it was intended for
I would say store whatever possible (except large objects like for example a large obj which has user's warns just for an example ik ur bot is not moderation) in the cache. Would be faster to process
i only use the json for the prefixes
i feel like screaming after using json for a levelling bot
Especially considering writing to a json is not thread safe if done improperly iirc
the amount of times the json didn't save properly and levels were achieved multiple times
I've moved from Mysql to Postgres and I'm liking it a lot.
i moved from json to mysql and i'm so glad i did
Postgres is a life saver compared to sql
I was told early on by some C# folks to stay away for MySQL
Very glad they told me that
I was just used to mysql because of web dev
I moved from exel to json and its a lot better
storing 2.1k lines in a json file is shit for finding information
I can smell a copy pasta when i see one 💀
oh in computer science they are teaching us how to use csv for storing and i want to shoot myself
Yeah because that’s not the intended use case of json
Json isn’t meant to be used as a db
discord-db ftw
Lmao
Tbh when i was like a beginner and did not implement mongo, I used a message sent by the bot as the db to store prefix and log channel IDs in my custom server bot. I made a channel and made sure no one else would see it and made the bot send a message which is a json message inside a code block. And i used that as the db 💀
So yeah discord-db exists
Atleast for me
as long as you didn't do what i planned to do then ur fine
i was fully prepared to use Text files for blacklister
When prefix is updated, i get the message and then slice the code block back ticks, and then yeah JSON.parse() 
and looking back now i'm so glad i was talked out of it

Hey woob
imagine a 2.1k line long text file stored in the format
471409054594498561,stinky
discord-db actually exists though. And I'm pretty sure that's how it works 
'woob'.replace(/o/g, 'e') when
Pretty confident that's against discord tos
WHATAFAAAK
Mhmm
what the actual fuck
wait wait wait wait
What thee
DUDE
WHO IS MAINTAINING IT
WHERE TF ARE THE DATA STORED?
WHICH GUILD?
F the github is 404
Brooo these people are going out of hand
Imma create a npm package which is a whole bot too, and the user just needs to create a .js file
const bot = require('bot')
bot(token)
```Ez, how to create a bot in under 10 seconds
Lmao
More clones 😠
Kek, im just helping out my buddies who were pinged in #mod-logs
How can I restrict this 👇 command only for user who didn't vote and also this command should response only for user who is voted. In discord.py?
async def meme(ctx):
embed = discord.Embed(title="Memey Meme", description="")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/memes/.json?sort=hot') as r:
res = await r.json()
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=embed)
Shit host/bugged shard
I had a problem with my bot where it had like 3-4k ping for no reason and it was fixed by restarting
mongodb atlas probably
it's worse than I imagined
Is github down 😳
no
nice which lib
library
discord.js then I guess
this
did u write it by yourself?
u cant sent invites
oh
yes
i am learning to make
i made one but it is basic
like auto reply only
for now
i am learning to add commands
if u didn't copy from some tutorial then kudos for u
that's already a great thing to practice
umm i also didnt copy
i am learning from
learning from this currently
great
ah just a note btw
don't start on v12
it's already deprecated since v13 release
True
mongoDB
bio doesnt support hyper links
It's gonna appear just the same as how it would appear on a normal text
ayy
anyone here using brave and connected it to gemini?
kindly respond
I have a quick Question
Just ask your question and anyone who is using brave would respond
i connected my brave to gemini in last week of october
Payment date was 3 days ago But i didn't recieve my rewards this month neither in gemini nor in brave
WHY
use uphold
cant
i dont have minimum Bat to make uphold
whats the problem here
problem is you barely showed anything nor give any info
it dosent show
but the command wont work
i guess its the author part where it still scans it but dosent reply
again, I can't help u without a better context or more than 3 lines to work with
what command did u try?
what's the rest of the code?
oh my, those if chains
yeah
but well, show the command u tried
on discord
yes
put console.log("This works") right above that if chain
tell me if it appears on the console
put it above this line
yes 15 bat thats not much
yes
now run the bot and use any command
and for future reference, either extract command name + switch or make a proper command handler
did u use a command?

btw: invalid command message = bad, like really bad, so bad cthulhu would fear you
don't do it, it causes massive spam
Hey! In djs v13, how would i send an interaction to a specific channel? I have tried to cache the channel etc. and then channel.send({ embeds: [embed] });, but it doesnt seem to work.
ok, then the issue either lies on event name or prefix check
oh
"send interaction to specific channel"?
What are those, I don't seem to understand them?
you mean "send message"?
yes
activity stats works
if so, fetch the channel then send it
fetch?
that's boobstrap


put the console.log on the very first line of the event
before prefix check
this?
no
hm
yes, above prefix check
ye, there's that now
start the bot and say anything, see if "This works" appears on the console
that after you reset ur token
done
change message to messageCreate
so, it didn't work?
yeah
...yeah "it worked" or yeah "it didn't"?
it became online but commands just dont work
what abt the console? did it appear there?
What djs v you are using ?
no
well, idk then, check your intents
it got stuck
Close Visual Studio Code and re-open it.
I have never seen this regex before.

match a char if one exists
regex is like spain without the "s" :<
the "tasks"doesnt exist?
might be a difference in versions used
ah alr
cute gif ngl
MANAGE_CHANNELS
guys is there a quick way to handle errors with modals on express?
The solution is to make your code in such a way that you don't produce any errors in the first place
or just enjoy the peace and quiet of
process.on("unhandledRejection", () => void 0);
process.on("uncaughtException", () => void 0);
Does anyone know why this isn't working (isn't full code, it's the interaction part of the code)
Error:
^
TypeError: command.file.runInteraction is not a function```
all other interactions work, this one doesn't. probs did something wrong
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i think its the awaitMessages part most likelyyy
nvm imjust dumb
Java 
well mr waffle if someone said yes id go in detail
if no ones gives a f why do all that 🤠
If someone said yes they would indirectly be saying “I am willing to spend any amount of time helping you with your problem that I may or may not know the solution to”
It’s better to explain the problem rather than be lazy and let the rest of us suffer :p
but would take about 30-45 mins id hope, its supposed to be basic java coding (i just dont know what im doing) have to use an
if/else statement
switch statement
default constructor
and has to run successfuly
assignment is to prompt users to enter year, make, model, mileage, condition
then depending on that info it would lower or raise the price of said "car"
is that the info i would need to post mr waffle
That’s a good start yes
yeet
What have you tried so far
Since I don’t want to spoonfeed code to you if you’re not sure what it does
await interaction.channel.send({ content: ({ embeds: [q2] }), ephemeral: true });
is it not possible to have an embed as ephemeral, bc this isnt working?
Cus that’s the point of the assignment
You can have an embed as an ephemeral, but iirc you can’t do interaction.channel.send, you have to reply to the interaction
right i getchu i know what im supposed to know (like i can differentiate code that i wouldnt know) ive been trying to self teach but my class is on zoom and my dorms shit wifi wont let me connect 75% of the time
so far
Online classes are difficult to learn from I admit
yes and my dumbass cant pay attention for shit its so hard
So I assume it wants you to create a Car class of some sort?
^
RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string.```
doesnt work, assuming i messed up something syntax wise
What are you using to send the response?
(Code)
DiscordUser.findOneAndUpdate({ discordId: receiver }, { $inc: { credits: credits } }, { new: true }, (err, doc) => {
how can i check if the receiver exists before increasing it's credits L
runInteraction: async (client, interaction, args) => {
const code = args[0].toUpperCase()
const loareq = await tickets.findOne({ "LOACode": code })
if(loareq === null) {
return interaction.reply("Code does not exist in database. This is probably because you tried to end your LOA request that was already ended.")
}
if(loareq.UserID !== interaction.user.id) {
return interaction.reply("Nice try, you can't end someone else's LOA request. Provide your **own** LOA request code.")
}
else {
const q2 = new Discord.MessageEmbed()
.setTitle("Prompt: Confirmation")
.setDescription(`:warning: Are you **sure** you wish to end this LOA request? This action is **irreversible** and will cause the LOA request to be removed from the database. To continue, respond with **yes**, otherwise respond with **no**.`)
.setColor("RED")
.setFooter("To cancel this prompt, respond with cancel.")
let DM = await interaction.reply({ content: ({ embeds: [q2] }), ephemeral: true });
let sure = await DM.channel.awaitMessages(m => m.author.id === interaction.user.id, {
max: 1,
time: 120000
})```
`import java.util.Scanner;
public class car_shop {
public static void main(String[] args) {
Scanner inputData = new Scanner(System.in);
System.out.println("Enter mileage: ");
Integer mileage = inputData.nextInt();
System.out.println("Enter car condition: " + "\n" + "Excellent" + "\n" + "Fair" + "\n" + "Poor" + "\n");
String carCondition = inputData.nextLine();
}
}`
all i have so far
and
like i think im making it more complicated than it has to be
so im hurtin my own brain
Okay that’s pretty good so far, you should be using the int primitive type instead of the Integer class however
I'm trying to make it so the bot does replies with awaitMessages w/ slash cmds, would that work 
Integer is a class (as a wrapper for methods for ints), whereas int is a primitive type
As per Java name standards, anything you see starting with capital letter is usually a class (with a few exceptions)
Let me get on my pc and I’ll help some more rq
cuz the stuff u enter here is supposed to affect the price of the car (starting at 10k) so like if i put a year oler than five years it would make the price of the car go down
and then at the end its supposed to give you an estimated price of ur car based on the info of ur inputted info
okay sounds good i could also vc if it makes it easier
welp
I’ve got some homework to do of my own for a bit, if you need help quick then someone at https://discord.gg/java could probably help
Sorry 😞
imagine hoping waffle is gon help u
Got lots of homework due soon too lol
what if payyy you 
Sorry man 
I just got home from school and I’ve got like 5+ hours of homework due at midnight
Those people in the Java server are really helpful though, just ask in one of the unreserved channels and they’ll help you pretty quick
Add upsert: true in the options. It will check if the user exist, if yes ut updates it. If not it creates one
And I think if that's the case, u should remove new
I dont want to create one if it doesn't exist i just want to not do anything
If it doesnt exist
that's just a regular update with a try/catch
Ohh, then u can .findOne() and if returns the db of a user do nothing, if it returns undefined then create a new collection
Idk any better or if there is another mongoose function which does this better tho
Yeah can't i put a function so if the query doesnt exist it throws a warning
don't do findOne + save
I don't use mongodb for anything so I don't really know
Oh welp .. f

normally you'd do a sql query and attach a returning * at the end of it to see what you updated or found 
life is always harder when ur using a bad database 
Hhh ima do more research tomorrow
Well his requirement is, if the user's db already exists he doesn't want to create or update. He wants to do nothing
Only if the user doesn't have a db collection, he wants to create
No
The opposite
I want to add credits only to users who have an account
So basically this is a donation system
Ohh
It removes from ur account and it sends it to the other
wait what
But if it doesnt find the user it still proceeds to remove the credits from the donator
are you creating documents or collections
Its a collection called users with each user
Listed
I just wanna check if discord.Id exists on the users collection and if not then i want it to throw a warning and quit or whatever
Get it?
you're trying to transfer credits from one user to another no?
or whatever your currency is
Not really transferr i just remove from the donator the amount he is donating
and give it to the other person?
Yup
so...... a transfer
Yeah but is like manual
Its not like only 1 function
But yeah basically a transfer
I mean you're using mongodb so making this process atomic is going to be impossible
you're going to have to do multiple calls
find target user, if not exists fail
find caller, remove x
find target, add x
So what goes wrong is that even if it doesnt find the user it still removes my flippong credits
let DM = await message.author.send({ embeds:[q1] })
let plannedtime = await DM.channel.awaitMessages(m => m.author.id === message.author.id, {
max: 1,
time: 10000,
errors: ['time']
})```
Why isn't awaitMessages working?
d.js v13 ^^
Ah wait nvmI think it was renamed lemme try
Twas not renamed
Filter is now in the options part
const filter = m => m.author.id === message.author.id;
let plannedtime = await DM.channel.awaitMessages({ filter, max: 1, time: 10000, errors: ["time"] });
Got it ty
Well I tried that it sends the message but it doesnt get my content for some reason
let DM = await message.author.send({ embeds: [q1] })
let plannedtime = await DM.channel.awaitMessages({ filter, max: 1, time: 180000
})
console.log(plannedtime.first())
if (!plannedtime.size) {
return message.author.send({ embeds: [timeout] });
}
if (plannedtime.first().content.toLowerCase() == "cancel") {
return message.author.send("Prompt cancelled!")
}
let DM1 = await message.author.send({ embeds: [timeout] })
let reason = await DM1.channel.awaitMessages({
filter: m => m.author.id === message.author.id,
max: 1,
time: 180000
})
if (!reason.size) {
return message.author.send({ embeds: [timeout] });
}
if (reason.first().content.toLowerCase() == "cancel") {
return message.author.send("Prompt cancelled!")
}```
After it collects first msg, it goes to next embed
But for some reason it's not picking up the message
Cuz console.logging the first() of the response is undefined
Like it just sends the error embed after the 180 seconds
Hello.
I updated my discord.js to v13 and haven't been able to get my bot to successfully change channel perms. When running the line of code below, it says that it is not a function despite copying the documentation so I'm out of ideas.
message.channel.permissionOverwrites.edit(message.author, {SEND_MESSAGES: false});
You dont need first() if the max collected is only 1
Do u have direct messages intent enabled?
Get the message, it should have a property called embeds
Yes
Wait actually maybe not one sec
.content is the normal message, it would be inside .embeds
Ah yeah it was for my other bot, ty
yes is already .content
That makes a lot more sense
Remove .content after u fetch, or replace it with .embeds
Also I'm not sure what .fetch() returns, cuz I ain't used with djs. If it returns a promise, u gotta await it
fetch returns a promise
Means you have to await it before accessing the content property
Or wrap whatever you wanna do in a then() clause
would've caught it if you were using typescript
Eww 
Well it’s all about preferences tbh
Bump, assuming that's allowed.
Does it need to be "yes" instead of yes?
nope
its because fetch is a promise
and its not being awaited
you are awaitng embeds
you need to () the promise to await it like that
You again didn’t await it or wrap the response in a then() clause
you can't access embeds from an instance of Promise
To get a property from a promise, u can use 3 diff ways to await the promise
const yes = (await message.channel.messages.fetch("901248000947544065")).embeds
const yes = await message.channel.messages.fetch("901248000947544065")
yes.embeds
let yes;
await message.channel.messages.fetch("901248000947544065").then(msg => {
yes = msg.embeds;
})
Read the js docs on promises and you will understand what's happening
and yeah i literally spood fed 
🔫
Sorry 
Mods are otw 
me appollogaise
Ok it’s okay this time!
You’ll just get a fine of $500.
Gonna send you my PayPal address to verify the payment of your fine
pelease no faine pelease 
that third option is an atrocity
😂 true
how about this one

let yes;
await message.channel.messages.fetch("901248000947544065").then(msg => {
throw msg;
}).catch(msg => {
yes = msg;
})
:^)
My hopes were drowned
cmon you know me better than that
lol
i never miss the chance to troll
😂
@quartz kindle after assembling my hardware for the server I think I should be ready to change stuff at the weekend which will lead to a few new cloud servers
Means I’m gonna play around with load balancer a little and will report back
nice
Lemme do a better one
const { channel } = message;
const { messages } = channel;
const { fetch } = messages;
const ID = "901248000947544065";
const promise = fetch(ID)
let yes
try {
await promise.then(msg => { throw msg; }).catch(msg => { throw msg; })
} catch(msg) {
yes = msg;
}
if(yes) {
if(yes.embeds) {
yes.embeds
}
}
I hate this so fucking much
Yander Dev FTW
I actually consider blocking
lmao
Prepare for some more good code, Tim is typing for over 2 mins now
💀
give me back my #testing-1
i raise you ```js
let yes;
try {
await promise.then(msg => { throw msg; }).catch(msg => { throw msg; })
} catch(msg) {
yes = msg;
}
Oh perfect, lemme edit mine
There
xD
I better don’t ask why
I love the await promise.then()
Was there something specific you wanna know about the LBs, Tim?
const events = require("events");
const emitter = new events.EventEmitter();
try {
await promise.then(msg => { throw msg; }).catch(msg => { throw msg; })
} catch(msg) {
emitter.emit("error", msg);
}
process.on("uncaughtException", msg => {
const yes = msg;
})

its better to await a chain than to have 1 await per Promise
:^)
just curious if it does what i think it does, ie provide redundancy to an exposed ip address by redirecting to a list of other ip addresses
but like
If one is down?
what i had in mind was DNS level reduncancy
in case an entire provider is down
for example like it happen in the DO fire thing
or whatever it was
That’s always an issue if the provider uses own DNS servers
ye
just use 1.
how does a load balancer provide reduncancy if the load balancer itself is down?
at least DNS is distributed
pitty that A records dont support the same stuff as SRV records
Yo I started making a bot named Alice. So her prefix is set as ''Alice, ''. However since commands can only be one word I had to do a ''if message.content.startswith(Alice, can you do x?)'' thingie for longer commands.
BUT when I run the command I get an error saying ''Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "say," is not found''.
So I understand it mixes up the ''Alice, '' from the command and the Alice prefix but like;;;; is there a way to fix this?
Or do I have to go through another method than the ''if message.content.startswith()'' one? Is there a way to bypass the one word command rule? TT
I’m using 2 providers for my DNS servers, 3 regions and completely different providers for my domains.
2 domains using static records, 1 is self managed
make your own command handler
Thats probably the best way to get high redundancy
commands are usually just 1 continuous string because arguments are a thing
how do you have multiple providers for the same DNS? do you just add different providers to its authority servers?
but that still doesnt help if the ip address that the A record points to goes down
I haven’t, the NS records of each zone are my 3 DNS servers.
If one server is down, round robin automatically redirects you to another DNS server for the 2nd request.
If a hostname can’t be resolved due an outage, both other NS records being contacted to answer the request.
No matter multiple hostnames can’t be resolved or 2/3 DNS servers are down, the system still answers your request
Probably with a few 100ms delay due the request timeouts
Do I need to be like;;; advanced to do this?
100ms probably is enough for most cases, but under heavy load 📉
You should have a basic understanding of data structures and language features and problem solving
That depends on the region.
If requests travel from EU to US DNS server it can take up to 200ms usually
my NS servers are the default ones from my domain provider (porkbun), not too concerned about outages there, more concerned about outages in the IP the A records point to
Yeah. That too
@quartz kindle this is the most efficient code that I could make4 with all the improvements you suggested. Anymore changes?
delete nodejs
💀
lmao
Cuz we made it bug free
well promise is undefined
it really be like that
because most js libraries do not have built in command handlers like discord.py does, so there is a lot more community effort around them in js
everything is possible
just most people who use discord.py use its built in command handler, so there is less community discussions around making custom command handlers
manually memory management in JS when?
store everything in buffers
done
True
eris does 😏
DisBuf.js coming right up
lmao
Wdym by outages in the IP of the target?
Can it change its IP?
Don’t get it
i have a half finished half abandoned buffer project
js buffers cant be resized like c++ buffers can, so its a major pain
time to fuck with the built in net lib
you have an A record, pointing xyz.com to 999.999.99.999 right?
Yeah
so what if the vps that hosts that ip address goes down
Oops
thats what im talking about
the DNS still works
it still sends people to that IP
If the target is down?
yes
Oh that’s actually tricky since there’s no real solution for redundancy with A records
exactly, thats what im talking about
SRV records aren’t supported for what you do?
Orrr that’s not what I mean but they support weight and priorities for DNS records
Which means you can set up multiple target for the same hostname
the ideal solution would be that A records support priorities like SRV records do
which is unfortunately not the case
But if you’re concerned about the target being down… is there actually a redundancy there? I mean your target
2 targets are running with different IPs but the same content?
I mean if your target has no redundancy then trying to create one for the DNS is nonsense
yes but whatever redundancy the target can provide is useless if the entire provider goes down like in a datacenter fire
But what you would need to do to get rid of DNS timeouts if one target is down is using a failover IP in your case
Consistent monitoring and a failover IP getting in place if one target is down
Don’t pick OVH cough
that would require an API to live patch the DNS records right?
Yes and no.
1 way is to change the DNS record, yes with a very small TTL, making it live if a target fails
No if a providers provides a way to activate the failover IP in any way like Hetzners robot API
so you would transfer that IP to a different machine?
Yes it’s simply said the same DNS record change on the provider level
Active within seconds
but that wouldnt work if the entire provider goes down in a fire
anyhow, this is getting too much into trying to fix by myself something the providers are designed to fix instead
Yeah editing your own DNS record - using an API - with a low TTL is more redundant
Well you don’t have to setup your own DNS infrastructure like I do
You can use a DNS service for this
tbh i dont actually need any of this
Which lets you specify the TTL of the records (and zone record)
just exploring the possibilities due to being paranoid of my service possibly going down
xD
_Per month _
basically the API that im building is meant to power third party apps and services, so its gonna be a business to business mostly, and i really dont wanna screw it up
if the api goes down, a lot of services go down with it, and things get ugly
even tho i have 0 clients right now, i have to be prepared the best i can
brb 2 min
Cya
I had two 2 major outages so far.
One caused by Hetzner network being down in 2018 and one when they changed their DNS and servers.
Learned from both by deploying multiple DNS servers to multiple providers and 3 domains to 3 providers.
Just costs 3 DNS servers (small cloud servers) and 3 domains per year.
And the cloud servers are scalable seamlessly ofc.
Not much of a cost tbh.
Let’s start with 2 DNS servers and domains if you don’t wanna use a third party service then.
When cloudfare was down a while ago and with it 50% of the internet, my services were up
Even if 1/3 domains were technically down
Start up cheap and small and scale up if needed later if you need to even if you need to scale to third party service
Oops ping 
yeah thats what im gonna do anyway
im starting with a single hetzner cpx11, the one i got recently
i was going with a single core before, at least now i have 2 cores, so better concurrency at least
Yeah
when the time comes, if i get in trouble, i'll hire someone to do some network engineering for me then
Scaling up shouldn’t be too difficult if you’re already prepared in the backend
Or that one, yeah
How does the Discord cache work? I have two commands I set up for testing (cget and cremove which removes and gets the user from the cache) since I've had issues with retrieving users via the cache if they aren't cached, but when removing the user and then immediately getting them, cget works perfectly fine. The methods I used were message.client.users.cache.delete(mention.id); and message.client.users.cache.get(mention.id);.
mentions are automatically cached
discord sends the mentioned user data with the message
ah. alright thx
Generally said if you got trouble getting users which aren’t cached, then fetch them
👍 thx
Using fetch in general is the way to go if you need the user object
or just implement all collection and manager methods as commands :^)
Since it checks the cache first
alr ill prob do that. just testing to see how discord cache works rn haha

It’s just missing a process.exit
Is an user automatically cached if they join a VC?
can we use on_guild_join event just once in python ?
Mb analog .once() from js
Just slap a boolean and set it to true after it triggers once and return next time
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: can only concatenate str (not "NoneType") to str
Where is it raised?
ban command
def check(reaction, user):
return user == ctx.author and str(reaction.emoji) in [":tick:"] and reaction.message == msg
confirmation = await client.wait_for("reaction_add", check=check)
maybe this
@onyx torrent
Wait for a python Dev to arrive
I can't help
it was working when i made it
idk why not working now

Not sure though but this seems ok
how do i costumiz my website so i make a look for mobile?
Use CSS media queries
how?
How did you make your website?
@radiant kraken
which line caused it
@radiant kraken can u help?
no
why?
hm
He has the skill issue
maybe this ? @radiant kraken
oh ok
@radiant kraken
probably because of reaction.emoji returning None, which can't be casted to type str
do you have the proper intents?
bro sry
it is raising when member have dm closed
if member have dms closed how can i escape that block and process other part
its not processing other part as member have dms closed
@radiant kraken
oh okay
how can escape that block ?
and process other part
@radiant kraken
: (
add a check if the reaction.emoji is not None before the str(reaction.emoji) check in the function
ok
i mean escaping the part if members dm is closed
and i want to ignore that and process other part
i doubt there is a flag if a member's dm is closed, you can check if discord.Member.dm_channel is None and calling discord.Member.create_dm() fails
Ummm! Can someone tell me How to Design Bot Page on top.gg also help with the vote command
huh?
ok
Just add a try catch
try except
how do i costumiz my website so i make a look for mobile?
how often do you plan to send the exact same sentence? 👀
Google "responsive website creation" and try to learn. There is no way one could potentially help with this particular question of yours over text
There are lots of resources on the internet
ok ty lol
look up html viewport
and put that snippit at the top
yea ty
np
yep
how to move files on mobile
not on mobile
try dragging out tho
literally drag out of the folder
??
stop ghost pinging me
and no need to ping after replies - i get pinged anyways
like hold file and move my hand?
that ezz????????
leme try
yeah lol
do u know how i do it like if i opned https://mywebsite.com to send u to https://mywebsite.com/Home
anyidea
cuz i mad folders and i dont want to main (aka root) i want to the folder
just tell me u know or no?
What are you using for the site
Just HTML, or express.js/flask etc
ah just html
<meta http-equiv="Refresh" content="0; url='https://mywebsite.com/Home'" />
ok thanks
how do i add a image
like https://top.gg
they dont have
ok then like https://discordz.xyz
tf
in the meta or embed or what ever u call it
like in there
show u dumy link
Look up meta tags
ty
what dise the keyword do?
@royal herald
imagine asking someone what smth does when they slapped you with the docs
it basically tells your browser extra info about your html page
My gosh…
<meta property="og:type" content="website">
<meta property="og:site_name" content="Website Name">
<meta property="og:title" content="Title">
<meta property="og:description" content="This is an example">
<meta property="og:image" content="https://www.example.com/example.png">```
This channel doesn’t replace google, dude
how to import cjs in es6
pwease help me 🥺
No I don’t need technical assistance with Windows, thank you! hanging up
your phone call traveled through cell towers running linux 

or windows 
so that's why calls made on jio's network suck so much
you need role permissions
Ok
Here are some of the things Discord will check for on your website
https://ogp.me/
https://oembed.com/
https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
bruh i had to enable view audit logs permission
ty
can u just give me the thumbnail code pleas
the what?
and someone also sent it before me
the ogp did not work
Hello I need Project Gif
that's not how it works
"one fully implemented bot to go please" 
Finally Verified On Top.gg Thnxx
https://top.gg/bot/899500529707782156
lol that description

yet another music bot
yet another cringe emoji
Pls help
I cant find the thing on my keyboard
fastColoredTextBox1.Text thething;
what the fuck is that
needs more jpeg
.LaunchExploit() 🤨
I don’t think we can help you seeing as this looks like a WPF cheat program
How do i fix this?
Did you read the article?
read the article
I did
then you should understand it
What does the article say about the approval process?
My tiny brain doesn't understand it..
nw
Invite the bot to our Verification Center. How do i invite him?
brs will take care of it
Okay Thanks
yeah np
Topgg will invite it to it's verification center.
Oh Ok
{
content: `${this.category}`,
components: [
{
type: 3,
custom_id: 'test',
options: [
{
label: 'test',
value: 'test',
description: 'test'
}
],
placeholder: 'Choose a category',
min_values: 1,
max_values: 1
}
]
}
can someone explain why this keeps return a 400 error
needs to be in an action row
huh?
the select menu needs to be inside an action row
all components should be in an action row
Isn’t action row type 1?
Look for action row in components
options:
[
action row:
{
options:
[…
components
Array
lmfao
🤦♂️ err yeah
I’m trying to send a file, but I get the error that I can’t send an empty message. I’m 100% sure the file exists and checked and also tried using message.channel.send(“stuff”, { files: [“./dump-“ + id + “.txt”);, but that just sends “stuff” without the file.
Code:
https://sourceb.in/XYaDWPl00k
in djs v13 there's no two parameters
check the last example out https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=send
is there anyone who used structures in v12?
@solemn latch
ty
np
yes
how do i add a color to the embed website
@modern sable u are mega ultra active
24/7

lol
what do you mean with color to the embed?
Website meta tags + theme colour
idk how
i wouldn't share a message with a competitor bot list whilst talking to a community manager of a competitor bot list 
i can find the meta tag for you
e.g. this should modify the stripe in the left side
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
(not sure though, never tried yet)
its just an example...
<meta name="theme-color" content="#HEXCODE">
ok tysm
ikik
and for the metadata, you can check meta tags in general or https://ogp.me/ should get resolved aswell
this didnt work idk why
do u have the image aswell
<meta property="og:image" content="https://link.to/image.png" />
the og didnt work
i tryed many codes
make the content=" " link to the image








