#development
1 messages · Page 2042 of 1
if it looks like an exact copy, its usually not allowed
so just change it enough that it doesnt look like an exact copy
even if just tweaking the bot's text responses
you can give credits anywhere you like, but thats not what reviewers usually look for
they just dont want multiple copies of the exact same bots on the website
maybe try https://github.com/long2ice/asyncmy
okay thanks
use flexboxes
for (let i = 0; i < 4; i++){
workers[i].shift = i
console.log(workers[i].name + "'s shift for tomorrow:" + workers[i].shift)
}
how do i pass the console log out of the for loop function
whut
Hi, I was wondering if anyone knows the formatting of the website? I'm trying to make a good looking description 😄
wdym by "the formatting"
the lines, bold font, header for example https://top.gg/bot/235148962103951360
Custom commands, reaction role assignment, twitch, starboard, polls, levels, moderation, logging, timers, announcements, Dashboard
the description supports html, css and markdown
ah thanks ❤️
does anyone know how to get mobile status in the bot
Requirements for uploading the bot in discord bot list?
needs to be turkish
lmao
wdym
/nick new_nick:mezba
To have your nick changed, ask a mod 🙂
Oh nvm
your bot has to be in the language turkey
is it important?
not really
Is there any requirement or not?
yes
then tell me pls

if the code has a license you do need to give credits somewhere in the code if it asks for
not on the bot itself
So for example I would have 2 div elements, with a p element inside. One element's content is "Item 1" and the other one's content is "Item 11", but the second element is wider than the first one because it has a 2 digit number, instead of a 1 digit number. How could I make sure both elements have the same width?
pad
or fixed width
or better yet, use an enclosing div to be the maximum width, and set them items to fit said div
that way the largest div will define the width of all items
i need chat bot api
There are a lot of them out there. What do you need it for?
Support related chat, or more just general conversation?
For support / targeted chat I have used https://cloud.google.com/dialogflow a lot before with good success. It does require some time to integrate, train and configure tho
k
pov you have to implement localisation in your app
as general conversation api, i would recommend https://api.popcat.xyz/chatbot?msg=test
ok
the code already has the credits
nice croatian
imagine being able to fluently translate your native language to english
or i guess vice versa
I've installed Ubuntu on my laptop, and I have Ubuntu and Kali-Linux on my main (VM), what are some cool experiments to try on my laptop?
I remember reading how people would crack the password of their laptop administrator account or something, what else?
go wardriving
Do I need a cantenna?
I remember I can like make a home-made one. 💀
But what else can I try on my laptop (to hack into it)? Laptop IS using Ubuntu so I guess I can crack the password with my main machine but need to figure out how to do so.
ohno
oh nein
if I'm making a warning system what's the best way of going about storing the warns?
I'm currently using better-sqlite3 and was wondering if I could also use that but not sure]
I was thinking about using a collection but it would be pointless once the bot is restarted
how do I actually structure something like this again?
I want to be able to get the warn by it's ID like so const warned = warns.find(ID) and then use it with warned.warnReason
hi all! I was wondering if it's possible to set a command that will assign a role to a poster when enough people react to a post with a certain emoji (kind of like a starboard, but for people, or like a reverse reaction role)
I couldn't find a bot that does this already, but if you know of one that works too
ex: I post a dumb meme. 4 people react to it with
and that gives me a @fallen spear role
oh shoot sorry I did not expect that to be a name lol
why do i get this error even if i have this header?
headers: {
'Access-Control-Allow-Origin':'*',
'Content-Type': 'application/json',
}```
sorry not familiar with web stuff
I'm trying to display an image and then modify it with JS in the browser. However, if I just display the raw URL, I get an error in console saying it's forbidden. What's strange though is that when sending requests from Node, the image can be downloaded without issues. But since I'm attempting to bulk download images, it is more efficient to display the images on the web and then modify it using JSDOM rather than downloading the images and then displaying them. TLDR, how can I fix the issue of images being forbidden? Is there a way to bypass this without downloading the images first?
Is this Express?
yup
yes its possible
oh excellent
can you help me figure out the command and/or refer me to the right documentation
const express = require('express');
let port = 3000;
const cors = require('cors');
const app = express();
const corsOptions = {
origin: '*',
methods: ['POST', 'GET', 'PATCH', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization']
};
app.use(cors(corsOptions));
app.use(function (req, res, next) {
res.setHeader('Access-Control-Allow-Origin', your_host_like_localhost:3000);
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
res.setHeader('Access-Control-Allow-Credentials', true);
next();
});
app.listen(port);
Try that
It's scuffed but works for me
Or wait
I misread the error
https://144.172.71.157:8000 denies requests from outside sources I believe. Similar to my issue actually.
wait my bad, i said yes cause im used to express, no im not using it, im using fetch (sorry im too used to express)
preflight requests are done with the HEAD method, so you need to add a route for that, or use a middleware like eltik is suggesting
Yeah I misread the error
^
thank you :)
Essentially the host you're sending requests to denies requests from outside sources. If you were to try this in Node for example it would probably work, but in the browser it doesn't. I myself am trying to bypass this but the best option is probably to send requests from the backend, then display it via Express.
the url you are fetching is yours? is it a server you own and control?
yup, i host it on my vps, it succesfully accepts requests from other programs like thunder client (basically postcode built-in vscode)
its an express server (if thats what ur asking lol)
ok, will try that now, thank you :))
i hate it when i forget to hit 'reply'
still same error
show code
you need to listen to the reaction events and add count the number of reactions on a message
so i added this in the server file
you need to send the response lol
thanks. would that be similar to using reactioncollector? https://discord.js.org/#/docs/main/stable/class/ReactionCollector
i am indeed stupid
(sorry, v new to discord bots)
ok wait, this goes in the server or client that makes the request? cause in the server doesnt seem to work, but in the client i am using fetch so it would be a little different
the server
reaction collectors are more indicated for listeing to reactions on a specific message, ie a message from a command
mh ok, then its not working
if you want to listen to reactions on any message, better use the event
thanks
try this
app.all('/*', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
next();
});
note, this has to be placed before app.get(...)
show full code
and show full error again
the error might be slightly different, but look mostly the same
mh wait, mine is a post request, could need nomething different?
const express = require('express');
const app = express();
const http = require('http');
const port = process.env.PORT || 8080;
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.all('/*', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
next();
});
app.post('/', function(req, res) {
stuff here
});
app.listen(port);
console.log('API server started on ' + port);
wait ill remove the stuff in app.post
we love CORS
the error is different, so that means the headers are working
you need to add res.header("Access-Control-Allow-Headers", "*");
cors is a server thing, not a client thing
doesnt matter what you have in the request
and cors preflight requests are sent via OPTIONS, not GET nor POST
const client = new Client({
intents: intents, partials: ["MESSAGE", "REACTION"],
allowedMentions: { parse: ["roles"] }
});```
roles aren't being pinged
Unless you're pinging the role, incorrectly?
Not sure.. but try seeing if you need any other partial required, otherwise, you may need to wait for another answer.
in nodejs how do i check if a duplex stream has ended?
How do you execute a script, then wait until it's finished? For example:
for (let i = 0; i < pages.length; i++) {
axios.get("some_website").then(res => {
// do some task and send lots of requests
});
}
if (finished_requests) {
return;
}
Basically, I want to send requests to a website. But since awaiting would take too long, sending a bunch of requests, then waiting for all of them to be finished is more efficient. But I'm not sure how to check if all the requests are done. Is there a better way to do do this?
uhhh what I used a function and somehow instead of executing it just pasted itself there?
like how does that even happen
Send your code (the part that sends the message)
yeah i just realized that. thanks. looking into promise.all rn
Maybe you can find this helpful: https://stackoverflow.com/questions/22198883/check-if-nodejs-cleartextstream-stream-is-ended
"The warn ID is
Is there an end " at the end of the string
other functions work fine what's going on
You didn't even send the full code?
what do you mean I have
yes, it wouldn't have worked otherwise
The warn ID is <code> and you sent me the code for the part before that, so.. ?
Can you send the full code?
do you want the function module's code because I sent all there is to the warn command
return message.channel.send(👍 Warned ${member.user.tag || "Unable to Fetch User"} for ${toProperCase(reason) || "No Reason Provided"} The Warn ID is ${generateID});
oh now I see what is wrong
You sent the code of the function, and not really called the function itself, I believe.
You don't really need to be over-complicating yourself, here's what's best you can do, which is something I personally did as well:
On your warnStructure variable, create three properties, content, serverID, and userID:
- For content, it will list an array of objects whereas each object will have two properties, the moderatorID which stores the moderator who's warning the user, and the reason on why the moderator is warning the user.
- For serverID, you will store where the warning took place.
- For the userID, you will store who's the user who's getting warned.
This is an example on how the data structure looks like: https://cdn.hamoodihajjiri.com/VqpsZrskyl
However, this is via MongoDB but you should have a slight idea.
If I were to use Promise.all, would each Promise be resolved in order? For example:
let a = new Promise(1);
let b = new Promise(2);
Promise.all([a, b]); // <- 1, 2; not 2 1
I’m probably not understanding Promises correctly, but hopefully this makes sense.
no, it would not be in order
Isnt the spec that the array should be in order?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all
Returned values will be in order of the Promises passed, regardless of completion order.
i mean, yes, the result is in order
but the execution/completion is not
Ah yeah, I may have misunderstood the question
or i did
Who knows, they have all the information they need now 
I'm using enmap
I even tried talking to the creator they just ignored me I'm fucking done
no matter what I do this shitty ass <enmap>.filter function returns just "{}" or straight up undefined
it's not funny bro 😭
you're talking about me?
ong she kinda tried to help me, but then just straight up stopped responding
every single time I asked for an example or to show me how to do it she didn't do anything I even gave her the entire code for the command
she doesnt like helping beginners
she loves doing it then 💀
that code looks very wrong tho
i find her to be very hostile a lot of the time
I accidentally started an argument with her, I don't wanna be rude but she literally jokes about my lack of understanding of her package
can you please tell me what is wrong
I've been at this for like 5 or 6 hours at this point I just wanna finish
this is literally like a description of how the function works
the kind of stuff you see in documentations
not the actual code you should write
im pretty sure enmap's filter is exactly the same as collection's filter
I said that she doesn't like helping people and that her server lacks support and got banned
i mean, she is not wrong
I mean the code in the screenshot can be correc
free software does not include any kind of support, if you find an author that is willing to help you with using their software, then you're in luck
const filterResults = warnstorage.filter(value => value[0] === member.user.id);
``` this is my filterResults right now, I'm like 99% sure I've done it right
well if I ever publish a free package I'm definitely not gonna be like her
I know, I just wanted to make sure I tried everything before deciding to drop the bot
i agree with that sentiment and i do my best to help people who use mine, but that doesnt mean everyone should do it as well
you can console.log value to see if value actually is what you expect it to be
well if a person is using your package for the first time and you shit on them for not being able to use it then that is a problem
well support for big companies ofter comes from the communities that use them anyway
not directly from them
true
I have an output command
its definitely not a nice thing to do, but its still their right
you could have also caught them at a bad moment
that's not a reason to make somebody else's day worse
but people are like that
that means you are getting a Map object
tried also using Object.entires to resolve instead of stringify
well the other method that uses .get works but .get is used for a single value and I want to fetch every single warn from a person
then you're doing something wrong with how you store the data
// Check whether to list variables or get a variable by ID.
if (!member) {
// Declare our embed.
warningsEmbed = new MessageEmbed();
// Get variable by ID.
const filterResults = warnstorage.get(args[0]);
if (!filterResults) return message.channel.send("This user does not have any warnings!");
// Resolve our results
const resolvedResults = filterResults; //JSON.stringify(filterResults);
// Fetch warned user and the person who warned.
const warnedUser = await message.guild.members.cache.get(resolvedResults[0]);
const personWhoWarned = await message.guild.members.cache.get(resolvedResults[1]);
// Return embed
warningsEmbed.setTitle(`Z3RO Warn System (ID: ${args[0]})`);
warningsEmbed.addField("Warned User", warnedUser.user.tag);
warningsEmbed.addField("Reason", resolvedResults[2]);
warningsEmbed.addField("Moderator", personWhoWarned.user.tag);
return message.channel.send({embeds: [warningsEmbed] });
} else {
// Declare our embed.
warningsEmbed = new MessageEmbed();
// Get variable by ID.
const filterResults = warnstorage.filter(value => value[0] === member.user.id);
if (!filterResults) return message.channel.send("This user does not have any warnings!");
// Resolve our results
const resolvedResults = JSON.stringify(filterResults);
// Try sending all warning IDs
return message.channel.send("Fetched every warn ID: " + resolvedResults + "\nCount:" + resolvedResults.length);
}
the first statement with the !member works
anything after else doesn't
do you want to see how I store the enmap data?
how did you store the warnings?
// Prevent people from using the command for now.
if (message.author.id !== process.env.OWNER) return message.channel.send("Command isn't finished yet");
// Check for the valid permissions.
if (message.author.id !== process.env.OWNER && !message.member.permissions.has("MANAGE_MESAGES")) return message.channel.send("You do not have enough permissions to warn.");
// Fetch the warned user.
const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase());
if (!member) return message.channel.send("You have to mention a valid user to warn.");
// Prevent people from warning themseleves
if (member.user.id === message.author.id) return message.channel.send("You can't warn yourself.");
// Fetch the reason.
let reason = args.slice(1).join(" ");
if (reason.length < 1) reason = "No Reason Provided";
// Load the guilds settings.
const settings = getSettings(member.guild);
// Store the warn information
const generateWarnedID = await generateID(5);
warnstorage.set(generateWarnedID, [member.user.id, message.author.id, reason]);
// Show confirmation
return message.channel.send(`:thumbsup: Warned **${member.user.tag || "Unable to Fetch User"}** for **${toProperCase(reason) || "No Reason Provided"}** The Warn ID is **${generateWarnedID}**`);
the specific line is the one that uses warnstorage.set
ok, so when you use warnstorage.get("f8aj3") you get an array of [user id, author id, reason]
yep
so when you do warnstorage.filter(value => value[0] === user id) you get a sub-enmap of those entries
sub? what does that mean?
so you still need to get the values from it, as if it were a normal enmap
args[0]
then filter
wait
how would I write this?
for example, if warnstorage is an enmap of 10 entries
and you do filtered = warnstorage.filter(...)
and you match 5 entries
then filtered is an enmap of 5 entries
its still an enmap
then how do I resolve it?
you can use .map for example
omg okay give me a second
which transforms it into something else
I literally love u if that works
into what?
for example warnstorage.filter(...).map(value => value[2])
would give you an array of warning reasons
how would I get the key?
evie's docs say that the function is identical to array.map
the thing I generate with the warn command?
okay thanks let me try this
I literally can't believe she just didn't say that I needed to do .map at the end. that could've saved me 4 hours
😭
it doesn't work for the key but it does work for the value
doing key => key just returns all three params
show code
actually scrap that, it works my syntax was just wrong
I'm trying to format it like
field0 = ID then field0 reason and who warned
and both key and value return the full array?
nono it works, I was just hoping it would return an array where I can do array[0] for the key and array[1] for the value
yeah, then just return [key, value[0]]
yeah but can I not make the value be an array too? I could double box it
[key, [value]]
then I would do value[1][int] to look through the value array
would that work?
wut
okay okay let me explain
I have that map right
I want it to output an array with the key and then a second array with the 3 values, so 2 IDs and the reason
hmm that doesn't appear to work though
they all appear mapped as if you used forEach but I just called the map function and it shows everything that is stored there
eyy i got my CI/CD working
is that github?
why does it look different
this looks good ngl
well the map function returns an array of whatever you return inside the map function
so if you return [key, value]
then the end result is gonna be [[key, value], [key, value], [key, value]]
yeah I get u
I fixed that by doing 2 separate maps
Hey! Do you guys know if its currently possible for a discord bot to start a youtube together activity and start to play a video? Would be really cool for my bot but i cant find anything online. It might be possible using some kinda api request stuff. But idk
youtube banned the use of bots to stream videos beacuse it breaks their ToS
though I'm pretty sure they won't mind if you're aren't making the bot paid in any way
I'm not quite sure I only ever streamed music through the bot
I also cant find any like api references, i might try to use like chrome devtools to see if i can reverse engineer the endpoints it uses
good luck, just make sure not to get DMCA'd lol
Its not for a public bot its for a server, so i dont think its gonna be an issue
yeah if it's not public all good
exports.run = async (client, message, args, level) => {
// Prevent people from using the command for now.
if (message.author.id !== process.env.OWNER) return message.channel.send("Command isn't finished yet");
// Check for the valid permissions.
if (message.author.id !== process.env.OWNER && !message.member.permissions.has("MANAGE_MESAGES")) return message.channel.send("You do not have enough permissions to warn.");
// Get the ID of warn to remove.
const warnToRemove = args[0];
if (!args[0]) return message.channel.send("You have to give an ID for me to remove.");
// Lets try removing the warn.
// We are going to use try catch as there is no way to catch the error in case the ID is invalid.
try {
warnstorage.remove(warnToRemove);
} catch {
return message.channel.send("That ID does not exist in our database.");
}
// Show confirmation
return message.channel.send(`:thumbsup: Removed warn with the ID **${warnToRemove}**`);
}
``` I'm trying to write a command to delete the warns, I'm using `<enmap>.remove(ID);` for it but even though I've got no error it doesn't delete from the DB
<enmap>.delete(ID);
For some reason I want to switch to rust, even tho I have no clue about rust, just because it sounds so speedy and memory efficient. The decades it would take tho 
unless you're needing the performance then you really shouldn't
by that logic you should switch to writing everything in asm because you can optimize stuff better
use the language you're most familiar with, chances are you'll be the most productive with it and write the best code with it
I agree 100%
Fun fact: the fastest language is the one you know the most
A good python code can easily win against a bad assembly code
Like, 99 out of 100 times u ain't gonna write better low level code than a compiler
A big mistake is trying to outsmart something made to otimize your code
kurwa outsmarted
Who kurwa?
(Although it is fun to make things in optimized languages to learn)
i've been awake for almost 24 hours doing my final project
for school
that i have to turn in
otherwise i'll fail
and oh boy
i'm starting to hallucinate and i can't even code anymore
How can I produce icons such as these ones
I'm using react-icons to get Icons and chakra-ui
or do I have to write custom CSS for this?
yeah but sometimes the compiler optimisations are limited by the ABI spec
I also see the support for compilation with use of different instruction sets for better performance is often limited
that's due to gccs mission to work on any platform
(ignoring architecture of course)
but yeah most of the time it's better code because it can't mess up like a human
god humans are such hopeless creatures
Those icons are called FiGithub, FiLinkedin, FiTwitter .........
Just set background-color: black and color: white and they should look like that
IDK how they're done in chakre tho, google it
This is the outup
Those are kinda like outline
This one, not the one you're using
Oh those are FI
yea
There's VscGithubAlt too that looks same with thinner lines
Thanks but unfortunately they don't have discord one I guess
what does fi and fa actually mean?
fi => Feather icons
fa => font awesome
Thanks just checked and there are many more to play with
I use pycord and I want to delete a message after 5min. It all works but the problem is with persistent. Like when the bot restarts the buttons etc. don't work anymore (that's clear) and the message also doesn't get deleted after 5min.
I have this:
await interaction.response.send_message(embed=embed, view=view)
await asyncio.sleep(5) # Will be 300 in prod
await interaction.delete_original_message()
How can I make a persistent delete or something similar?
ignore my deleted messages
that's because when you sleep it's only present when the bot is running when you restart it it will be forgotten
the best way is to just keep the bot running without it restarting often otherwise you'll need to save that "sleep state" to a database somewhere where upon restart you can restore the sleep and interaction
Yes it will be up most of the time but f.e. when there‘s an update etc.
how I see other bots do it is only restart when there's a small amount of active prompts or none at all
aight👍
Join yuk
ga ah
ngak
indo
I have this input which is supposed to be a equation eg. x^3 + 3x^2 - x + 3 now I want to make this into a function so I can further use it to find the zero point(s) and other stuff. How would I turn this string into the form:
function equation(x) {
return (x^3 + 3x^2 - x + 3)
}
for game/economy bots, would it be better to use regular or slash commands
I use slash for mine
I'd use slash with ephemeral responses, so users don't clutter up channels using commands.
ty for the advice
So you want to convert the aforementioned example equation to a function? If so you can use the global Function constructor and providing the input equation to evaluate on call:
const equation = new Function('x', `return ${/* equation */}`);
or:
function equation(x) {
return eval(/* equation */);
}
keep in mind this is dangerous
If the input equation can be arbitrary entered by users then this is extremely unsafe, and I would recommend rather parsing the equation yourself and building the function string
not as dangerous as a c array without boundary checks
hii guys, so i have simple message embed on my bot, and I want to make my bot edit specific part of the message every x time. example: every 24h.
Problem is that i dont exactly know how should I do that, here is part of the code i have:
i need to edit time part in the embed description
btw mintime is not important at all soo just skip it
@earnest phoenix huh?
Are you using a library?
It wouldn't be unusual if the library is somewhat written in Go, if something is wrong in the aforementioned library I suppose
yeah im using smtp-parser
when receiving some emails the connection resets 💀
will file an issue (hope the github isnt dead)
Hi I want to change Channel Category but when I use setParent it will go to the top of the category how can I move it to the buttom?
any tips on tracing where that error is coming from?
Well the stacktrace shows the files those errors are thrown from, and exactly where the deadlock occurs
Unless it's from somewhere else, which is not easy to track down whatsoever
i see
just curious what is the best way to receive "string binary" and store it?
im doing this
but it feels illegal 💀
have a feeling the error is because of something else
Hmm, what exactly is the stream here? As in what type of stream is it?
const mailData = [];
...
mailData.push(data);
i wouldnt know maybe you can find out (i logged the stream) https://paste.gg/p/anonymous/ba3656d0103444e2b459c879bb960a5f
Oh it's a passthrough, then yeah what you're currently doing is fine and the best way mostly
it do be passing through
The love passing through your heart
yea:(
i think i know why its timing out
(resetting)
i havent yet tested my database on receiving and sending large amounts of data
Hmm, that's probably the reason
yeah its probably shitting itself for some reason 💀
should be a good test
hm thats working fine not sure what it is then
very fast too
it is worryingly fast
i think 1500000 bytes worth of uwus was a bit too much
bruh why did i set the max packet size to 1mb
thats goofy
uwu
i underestimated how much data my database can handle 💀
it is officially production ready time to deploy discord on it
just dont worry about the fact there arent any joins or advanced string queries
no one needs those anyways
finally my tcp handling code is robust
xD
right as i say that
this really isnt too different from osdev but instead of a segmentation fault you get random undefined behaviour
@lyric mountain you went all out on that PR for misty damn

¯_(ツ)_/¯
tbh, I had to write it twice cuz I mistakenly wrote git rm -rf . instead of git rm -rf --cached .
and I kinda learned something new from reading misty code
I didn't know %-20s was a thing
to unadd added git files
you gave up on discord-js and started discord-java?
since I had to reload .gitignore
No, I am not ever doing a lib in java
lmao
also I am still working on my ts lib just slowly
I got angry when channel cache was not working for guilds
😔
jetbrains made that gitignore themselves and put it someplace werid I didn't even know it existed
lucky for you, my ap cs class had an entire unit on printf
Fuck swing waffle
just puts the spaces on the right side of the string instead of the left
lmao
oh btw, a thing that might be useful, u can use %1$s or any other number for positional replacements
so u dont need fancy libs or repeating the same thing many times
@rare mist
I am currently building a website and do not want to use any express server..
How can I redirect https://website.com/invite to a given link?
(using Apache)
- Does rewriteCond work for that?
just be lazy like me
make a folder called invite
add a file called index.html
use HTML meta tag redirecting
that also allows you to use things like google analytics
@quartz kindle right I want to add fragmentation prevention to my db now but don't know how
right now all I have is a file which stores each record and fixed size values, with strings being a pointer to a location in another file where the records aren't fixed size
a full out solution would be to every once a while, create 2 new files, copy over all records that aren't deleted and for strings create the entries as you go
I can add record reusing where inserting will overwrite a deleted record but that doesn't really solve the string problem
and it breaks the order of insertion
why haven't modern operating systems yet figured out a way to delete data in between files
You can simply use a RewriteRule or Redirect in the virtual host of your website.com redirecting the path (invite) to your target
Both work
better yet if you use cloudflare just use page rules rofl
use the fetch api
iirc you post this object
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the fetch() or XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
i don't remember what key value pairs you're supposed to use
💀
Hi, what lenguage I need to make a bot?
English jk, you can use any, JavaScript, Java, C/C++, Rust, Dart, python, etc...
ah
i think
what easy?
I'm not them but some easy languaged are JavaScript and Python, it all depends on your skill level or if you ever programmed
discord bot maker
xd
phone or pc
both
k
Discord Bot Maker is a powerful bot development tool for the #1 text and voice chat service for gamers: Discord. With this tool, you and your teammates can take your social experience to the next level!ExplanationOne of the most prominent features provided by Discord is the official support for bot accounts. In a matter of 20 seconds, anyone can...
$9.99
2078
Well I would recommend learning a language knsted of paying... But you be you
ye
i can learn java script
Neat
wtf 10 dollar
so true, i aint paying 10 dollar for some discord bullshit
_says the nitro user paying for emojis _

fake this is nitro trial 
i aint that rich wasting money on nitro
Youtube, Google, StackOverflos
ah
I watched and English person and i learned
I can recommend a channel if you would like
k
´pls
in english i think
no?
Uhh, it is on english
XD ok
I can’t trust the words of a nitro user
You would sell your soul to get it, I’m sure

Hello there! discord bot makers, I have a question for you, how can I make some commands in my bot be used with top.gg voting obligation?
You can listen for incoming vote webhooks, then store it in your database: https://docs.top.gg/resources/webhooks/
Then in your command handler, check if they have voted within X amount of hours then allow/disallow them from using the command
thank you
You could also use an API call to check https://docs.top.gg/api/bot/#individual-user-vote, but is more likely to rate-limit
ok
music bots get banned?
By us? If so, no. By discord? Yeah, they dont verify music bots anymore
k
Well correction to the message above, they dont verify music bots that use YouTube, Spotify, SoundCloud etc. Breach of their terms
Oh really 👀
I mean, it is against YouTube, Soundcloud and Spotify's terms of service by redistributing their content. So better not do it 🤷♂️
But still everyone doing.
Yeah, and we know how that goes xD Seize and desist was served to the top music bots late last year if I remember correctly
Yep, but i don't think so that yt Spotify and SoundCloud aren't allowed. I have seen many music bots with yt support and actually discord not matters about what sources we are using.
Discord just don't verify music bots because of intents. Many bots are using message content intent without any reason that's why. Slash Commands is a better option.
The intents have no play in this, Discord doesn't go out of their way to decline bot verification forms just for intents, Discord has started unverifying a few of the popular music bots and might continue doing it
Nope. Some popular bots are stopped like rythm & groovy because they don't wanna use any other sources except yt. But hydra is still available.
Playing music directly from YouTube is against YouTube's ToS, although not against Spotify and SoundCloud's ToSs, as Spotify doesn't provide an endpoint or a way to directly retrieve streams of their songs and play it, SoundCloud probably does although not against their ToS
Then still hydra is playing with Spotify SoundCloud and Deezer.
rythm will be back
Yup!!
but probably unlike the old one
Lmao
Popular music bots are still available and verified, although some of them are unverified due to the YouTube takedown incident to avoid problems from their side, Hydra is up and running because it uses sources that aren't against the target platform's ToS
But Discord now seems to be verifying music bots again, but they might take a U turn again
Bruh i am owner of my music bot with yt support and its verified so? Lmfao
You may read the first part again, Discord doesn't really look at what sources your bot uses now; but be careful as YouTube might notice (ever in a lifetime probably)
¯_(ツ)_/¯
I notice that I get this error with certain commands but still don't understand why it doesn't work while it worked before
Could someone tel me what im doing wrong?
"stack": "TypeError: Cannot read properties of undefined (reading 'id')
at /home/container/src/utils/utils.js:466:73
at new Promise (<anonymous>)
at getTopGGVoteFromAPI (/home/container/src/utils/utils.js:463:12)
at Object.checkTopGGVote (/home/container/src/utils/utils.js:446:16)
at WhoIsCommand.run (/home/container/src/commands/info/whois.js:91:70)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)"
TypeError: Cannot read properties of undefined (reading 'id')
at /home/container/src/utils/utils.js:466:73
at new Promise (<anonymous>)```
What's on line 466 of your utils.js file?
Try logging config.apiKeys.topGG and see what it logs
2022-05-26 14:49:26 - error [index.js]: Cannot read properties of undefined (reading 'token')
"stack": "TypeError: Cannot read properties of undefined (reading 'token')
at /home/container/src/utils/utils.js:470:60
at new Promise (<anonymous>)
at getTopGGVoteFromAPI (/home/container/src/utils/utils.js:463:12)
at Object.checkTopGGVote (/home/container/src/utils/utils.js:446:16)
at WhoIsCommand.run (/home/container/src/commands/info/whois.js:91:70)
at processTicksAndRejections (node:internal/process/task_queues:96:5)"
TypeError: Cannot read properties of undefined (reading 'token')
at /home/container/src/utils/utils.js:470:60
at new Promise (<anonymous>)
at getTopGGVoteFromAPI (/home/container/src/utils/utils.js:463:12)
at Object.checkTopGGVote (/home/container/src/utils/utils.js:446:16)
at WhoIsCommand.run (/home/container/src/commands/info/whois.js:91:70)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
level: 'error',
[Symbol(level)]: 'error'
And you also have manual before token at line 470
The manual property is undefined, so correct it with what you logged and see what's the correct value
Awesome
Thank you very much for helping me, I really appreciate it
You're welcome
guys, so i was making a welcome system with mongoDB, and i set everything correctly since my bot create DB when I launch it. But, problem is: when i "trigger" function, it only say that Aplication Did not Respond no errors in console, nothing. Here is code for setChannel file: ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const {Permissions, MessageEmbed } = require('discord.js')
const { Schema } = require('../database-schema/welcome_msg.js')
module.exports = {
/**
* @param {Client} client
* @param {Message} client
*
*/
data: new SlashCommandBuilder()
.setName('setwelcome')
.setDescription('set channels for welcome messages')
.addChannelOption(option =>
option
.setName('channel')
.setDescription('Set the channel where you want bot to send welcome messages')
.setRequired(true)
),
async execute(interaction, client, message) {
try {
if(interaction.member.permissions.has('ADMINISTARTOR')) return
const channel = interaction.options.getChannel('channel')
Schema.findOne({Guild: interaction.guild.id}, async(err, data) => {
if(data) {
data.Channel = channel.id
data.save()
} else {
new Schema({
Guild: interaction.guild.id,
Channel: interaction.channel.id
}).save()
}
interaction.reply(`${channel} has been sent as the welcome channel!`)
})
}
catch(err) {
console.log(err)
}
}
}
and here is code for schema ```js
const mongoose = require('mongoose')
const Schema = new mongoose.Schema({
Guild: String,
Channel: String,
})
module.exports = mongoose.model('welcome-channel', Schema)
did you defer the interaction
how do you mean?
seems like you didn't and the discord client timed out
interaction.defer(): void
alright, lemme try
you use djs?
yes
DiscordAPIError: Invalid Form Body
components[0].components[0].emoji.id: Invalid emoji
components[0].components[1].emoji.id: Invalid emoji
components[0].components[2].emoji.id: Invalid emoji
components[0].components[3].emoji.id: Invalid emoji
components[0].components[4].emoji.id: Invalid emoji
components[1].components[0].emoji.id: Invalid emoji
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async TextChannel.send (/home/container/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:176:15)
at async module.exports (/home/container/events/player/trackStart.js:87:22) {
method: 'post',
path: '/channels/978735567967764546/messages',
code: 50035,
httpStatus: 400,
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
},
files: []
}
}
i think this wond work on djs 😄
The error is self-explanatory, the IDs provided are invalid emojis
ohk
yea, still same, aplication dod not respon & no errors in console & bot remains online
You're only responding to the interaction if the member has a specific permission, and it's supposed to be ADMINISTRATOR not ADMINISTARTOR
You've got a typo
Also, this works on djs. Deferring the interaction gives you up to 15 minutes to respond to it instead of the normal 3 seconds.
I'm using PDFKit to create a PDF with a bunch of images in a folder (see image). However, when looping through the directory, the script loops out of order. For example:
Adding for 0.png
Adding for 1.png
Adding for 10.png
Adding for 11.png
Adding for 12.png
Adding for 13.png
Adding for 14.png
Adding for 3.png
Adding for 4.png
Adding for 5.png
Adding for 6.png
Adding for 7.png
Adding for 8.png
Adding for 9.png
Is there a way to fix this?
Code: https://sourceb.in/1xFiRvv2o3
its looping in order
Which lang? 👀
but alphabetical, not numeric
if you want numeric, you need to extract the numbers from the file name and re-sort them
JavaScript
ohhhh i see.
so smth like:
let files = [];
for (let i = 0; i < images.length; i++) {
let file = images[i];
let a = file.split(".")[0];
files.push([file, parseInt(a ? a : NaN)]);
}
console.log(files);
files.sort((a, b) => a[1] - b[1]);
for (let i = 0; i < files.length; i++) {
// do smth
}
Hi, so im trying to setup a webwook when voting for the bot and would like to continue with voting rewards. I used this code from the topgg documentation but am unsure what to replace the content with in the last line (the "dblwebook" and "password")
import topgg
# This example uses topggpy's webhook system.
bot.topgg_webhook = topgg.WebhookManager(bot).dbl_webhook("/dblwebhook", "password")
yes, or just ```js
images.sort((a,b) => Number(a.split(".")[0]) - Number(b.split(".")[0]));
for(...)
dblwebhook would be your endpoint, password would be whatever u set in bot edit page
thank you 
no please no more please I beg you
ty!
does anyone here have experience with Puppeteer proxying? I kinda don't want to expose my servers IP when people screenshot things
Weird question. I'm sending requests to a website. I'm just curious whether this bit of code would get me IP banned or not.
for (let i = 0; i < links.length; i++) {
let link = links[i];
let request = new Promise((resolve, reject) => {
this.wait(this.throttle ? this.throttle : 50).then(() => {
this.downloadFile(link, join(__dirname, "./" + title + "/" + chapter + "/" + page + ".png")).then(() => {
resolve();
});
});
});
promises.push(request);
}
await Promise.all(promises);
This this.wait is pretty useless, but I'm just wondering if there's a way to not get blocked if I were to send requests this way.
something.value
/\ this is null
yes, all requests are being executed at the same time, so its possible you'll be limited
hm interesting. is there a better way to go abt this without having to wait an extremely long time for js to download images?
execute them sequentially
one at a time
if that takes too long, you can try executing a few at a time
with formdata
const fd = new FormData();
fd.append("file", file);
$.ajax({
type: "POST",
url: "upload.php",
data: fd,
success: success
});
the only thing i see here is you have let filetype = file.type, but file isn't defined anywhere. (not in that snipet anyway)
when you use showFile() are you passing anything through?
showFile(file) maybe?
hey @quartz kindle are u a cpp guy?
not really, just enough to make a cpp addon for node
nhe
do you need help with cpp? or with ccp?
just trying to disable alt key (but not alt combos)
🇨🇳
Okay. Thanks 👍
like, the company I work to uses alt as the "Function" key, and we're rewriting one of the programs in flutter
but windows is stupid and doesn't let me press alt without focusing the titlebar menu

I managed to remap alt to ctrl, but I also need to allow alt combos
idk how to detect if multiple keys are pressed in cpp
tbh I'd not even be touching cpp if fckin dart had a way to disable keyboard keys
thats not even a cpp issue, is more like a windows api hell issue
c++? why would you touch that garbage unsafe crippled mess of a language
become a rustacean today
flutter uses cpp for windows platform
like, I don't need to touch the cpp files, but I must
fuck it, I'll use a boolean switch
...except I cant cuz alt is pressed first
yeah:(
shouldve written my database in rust
but then i dont think my schools exam board project allowed languages allows rust
too new of a language
speedy's worst enemy
can you explain the joke
because it removes rust
It doesn’t really remove rust but who cares
ok guys, so about my problem with welcome message from today, it was because i missed (!) in permissions so thats why bot didnt answer, but now, when i call interaction, i got error: findOne() is not defined:
Using ElectronJS, how can I create an “overlay” in a sense? Ex. A window that is semi-transparent that doesnt go away if you are in full screen. One example includes Discord’s overlay that you can enable in settings.
Show setChannel.js
U first want to pick the programming language that ur bot is going to be written in. It could be any, from C++ to JS to Python. Make sure that u are comfortable with the programming u want to program in. Then find a lib to use. U could use this site (https://libs.advaith.io/) to see which one works out for u. once u have chosen, go ahead and read the docs and guides
Compares Discord libraries and their support of new API features
you probably wanna code them in julia
unfortunately people like that aren't willing to and will never learn
The programming language doesn't really matter. Plus Julia's discord lib is on API v6, which has been deprecated for a long time now
most of the time they resort to copypasting from youtube
i mean thats the joke
use python for everything 
look for properties akin to setAlwaysOnTop and setOpacity, if there's any it'll be in window manager
also u need to make it ignore pointer events
agreed but not really everything
i use it for everything
it depends on what field of programming you're interested on
use python when you can, use other lang when you must 
tbh just use whatever the fuck you want 
yes but you probably want python 
i used to be a python dev 2 years ago so i can't disagree with that
should've been for your whole life, im disappointed in you null
sticking to one language for your whole life can be boring 
ty
np
worthy to note that discords overlay is not electron
it's cpp
cry do u know if it's possible to disable alt key default function?
like, the one that focuses the titlebar's menu
to have a true overlay you need to have a directx/opengl hook that intercepts the game rendering pipeline, wait for the game frame to render, hook into the render, flush your buffer into it and then send it to the gpu/cpu to render
no idea i disable the titlebar
my electron apps are frameless
then in the frontend i create a custom frame
sadly it doesnt work for flutter
pressing alt still send focus to titlebar
oh flutter
i have absolutely 0 experience with it
sorry
been wanting to try it out though
im currently expanding my stack by using all kinds of UI app frameworks
I can write in the cpp files used for windows
that's why I asked since ur a cpp shaman
isn't he a c# shaman
here it is: ```js
const { SlashCommandBuilder } = require('@discordjs/builders')
const {Permissions, MessageEmbed } = require('discord.js')
const { Schema } = require('../database-schema/welcome_msg.js')
module.exports = {
/*
/**
* @param {Client} client
* @param {Message} client
*
*/
data: new SlashCommandBuilder()
.setName('setwelcome')
.setDescription('set channels for welcome messages')
.addChannelOption(option =>
option
.setName('channel')
.setDescription('Set the channel where you want bot to send welcome messages')
.setRequired(true)
),
async execute(interaction, client, message) {
try {
if(!interaction.member.permissions.has('ADMINISTRATOR')) return interaction.reply('You are not allowed to use this command')
const channel = interaction.options.getChannel('channel')
Schema.findOne({Guild: interaction.guild.id}, async(err, data) => {
if(data) {
data.Channel = channel.id
data.save()
} else {
new Schema({
Guild: interaction.guild.id,
Channel: interaction.channel.id
}).save()
}
})
interaction.deferReply({ ephemeral: true })
interaction.reply(`${channel} has been set as welcome channel`)
.then(console.log)
.catch(console.error)
}
catch(err) {
console.log(err)
}
}
}
const { Schema } = require('../database-schema/welcome_msg.js') is just schema
thats a mongoose/mongo schema right?
why are u importing it like that
just do
const WelcomeSchema = require('../database-schema/welcome_msg.js')
WelcomeSchema.findOne({}).then().catch()
if its a mongoose schema 💀
well that does look like a mongoose schema
then yea
Yep
yea u are importing it wrong ig
garbage database
use speedb instead

no memory leaks whatsoever
not even one byte
dem gonna try it then
🤦♂️
good stuff
known issue
also wrong channel to report stuf
it #support
but nothing we can do as you've already reported there
Hello there
I need some help :)
I have an array of different events and when these events take place. I want to find the next event, but not the closest event. I've searched for a long time, but didn't find anything helpful. Are any of you able to help? Thanks :)
please elaborate
apparently, this code executes, but the value of isPortrait is not updated after call
Were do you change is portrait
you said you knew react
Is the code in a useEffect? Then remove the eventListener on useEffect cleanup
i did
but the thhing is
the call to setIsPortrait didn't update the value of isPortrait at all
here is the variable defs
And the console.log in there did fire?
yeah
Wth
enourmous amount of times
but value didn't change
if you look at the code prior to this
what does your entire useEffect look like
it's relevant
It should have the setIsPortrait func as a dep I think
At least our linting rules force us to do that at work
In case the function is redefined
i don't want the whole thing to rerender
it will because of the state change
it's only defined once since the component won't rerender no matter what state changes
also
it won't
the resize event fires a bunch of times, you might consider adding a debounce
150ms or so should work fine
bruh
it only fires when the viewport changes from landscape to portrait
but that's not the stuff i need
the problem is the dispatch call didn't update the state for some reasons
and idk what's preventing it
the func call did hit
i am not talking about the effect firing
i just noted that the resize event will fire a bunch of times during resizing, log it in the console and see for yourself
adding a debounce will improve performance significantly
i returned immediately
so what's the point of debounce
and you are deviating away from the main problem
oh good point, i thought you were doing something else in the event as well
have you tried running in strictmode?
im just asking, strictmode is used for useful debugging info
stop being passive aggressive lol
i'm frustrated because you are providing me unrelated trivial stuffs
all i ask is what might have prevented the value from updating
According to the React documentation, the setState() method (setIsPortrait() in your case) is not guaranteed to change the state immediately, with the existing value staying until some of the checks behind the scenes are done, it also states that the state won't be changed if something is blocking it, such as a bottleneck
because you're giving us way less information than you know on your code, you cannot get mad at people for trying to pinpoint a problem with little information
i provided just enough information on my code:
- how those state vars are defined
- how and where it's called
useEffectreturns and dependencies
there's nothing else touching those state vars i mentioned
and therefore they are deemed to be reduntdant
get to the point already
Console log after set is portrait?
something also just popped into my mind, you're going to benefit from denouncing regardless
your user can keep resizing even after the landscape check passed
effectively circling to this issue
in 1 second, resizing within the bound of portrait
the shit thing is i can't defer or know when a state is marked for update
since window api is outside of react

Is there a way to somehow write a function to count all lines of code in a repo/organization? The api doesn't give you this data 
download the repo, scan every source file, done
Ok, so i have an array of all the Formula 1 races this year, containing their date and place. I want to sort them and return the next race, so that when a user uses a command, it replies with all the info about it.
Become a chad web scraperr
the value possibly lags back in setting the state, instead pass it an arrow function, the argument of the arrow func is granted to have the current value of the state, just invert it since it's a bool
hmm 😅 still the same lmao how does that work? xD
so you mean
define an arrow function instead of using the state variable directly in cb
yes, sec ill try to find a doc for it
Its not a good way kek
document.addEventListener ?
I was joking
perhaps you can sort them by unix timestamps
get current date as unix and use binary search to find the nearest one
assuming the data is a tuple
so just sort them based on date: array.sort((a,b) => a.date - b.date) then look up the next date from the current date array.find(x => x.date > Date.now())
(assuming js)
looks like
https://beta.reactjs.org/apis/usestate#updating-state-based-on-the-previous-state
you can also avoid that issue by, again, debouncing, because instead of firing setting the state 300 times in a second and everything lagging behind, you'll fire it once
yes it will
you're overloading react by updating the state so many times
not even useTransition would help
319 state changes a second meaning 319 re-renders a second
do you really think this is not an issue
didn't i mention it wouldn't rerender no matter what
the useEffect has explicitly 0 dependency
a component re-renders when its state changes
you have some serious misconceptions
effects are functions that run whenever a change is challenged in the component ergo effects
your component will re-render but the hook won't re-run
but the thing is
that state value doesn't change the component's output html
so on change it shouldn't rerender
doesn't matter
2nd argument is, didn't you already see the condition to trigger a state change and a possibly a rerender like you said?
react defaults to re-rendering behaviour when a components state is changed
how can someone resize between landscape and portrait 300+ times a second
Mate do a console log after setIsPotrait , so it were th prob is
💀 go away
you didn't get the problem
S-s-sorry
💀
your state change will run anytime the portrait check passes, although react won't re-render if the current state value is equal to the value of the argument, you're still calling the setstate and putting pressure on react
im out of ideas right now, just try debouncing as a last resort
if that doesn't work, no idea
still a false against true value
Why you are not waiting for resize end? You can do it by setTimeout and clearTimeout but im not too sure about performance
i would approach this by debouncing the resize event listener and putting isPortrait as an effect dependency
perhaps i can try adding the portrait as a dep
isPortrait? worth a shot
not a concern since similar values are returned immediately
bruh
i dont know react, but i found this in SO, idk if its of any use, if not just ignore
Does the same shit work in the same scope?
Ie after changing state
no
good news: dependency worked
bad news: refactor
now debounce it!!!!!!!!! :(
Maybe use affect ?
Brah there's a useeffect
you still didn't get the problem
it's a bit rude but i get where they're coming from, you're trying to help someone whose skill level is above yours
Yea, ive only used react for like a week
Js for a month
Definitely not your area of expertise then for that :p
if(!msg.author.roles.has('979751338831396884'))return;```
TypeError: Cannot read properties of undefined (reading 'has')
what is the problem ?
author is a User object, which does not have roles associated with it. Use msg.member instead
oh ok let me try
msg.member.roles.have is not a function
i use discord.js v12
- Update to v13
- Read the docs for member objects, I’ll send it here
i don't need v13 now
ik
msg.member.roles.cache.has()
oh ok
I personally love discord.js’s documentation, make sure to reference that whenever you’re having issues with it
Discord.js documentation and pretty much every other doc page assumes you understand data types and have an editor that supports it
If you don’t already know about data types then that is definitely something you need to know about
I mean. It's stupid to not have an editor that has intellisense
Well, a lot of people use replit that “has” intellisense, but it’s so slow that it doesn’t show up 90% of the time
So I understand why it can be difficult sometimes
i use replit not for my bot
a shop server bot .-.
Regardless of what you use though, knowing how to navigate and use the documentation is a very essential and useful tool to developing a discord bot
alright ty
Gl!
Ok bye
Hey hey! Don’t call my notepad stupid 
Selamunaleyküm
It’s some pure hardcore experience
How do i see which servers added my bot?
Using ElectronJS, how can I create an overlay similar to this? The overlay is able to stay on top even when an application is in full-screen, yet when I'm playing a videogame, win.setAlwaysOnTop doesn't always work (the window doesn't appear). Is there a way to achieve this?
What framework are you using?
<client>.guilds.cache
discord.js
this gives?
I got an queatuon, maybe it is Stupid but hey...
So i got and idea on to make d.js bot which will use image detection to detect specific objects on the image. So i just Wonder if that is posible
Ah, yeah. What @lyric mountain said too. The link I sent just emits an event when it joins a guild, his way lists out all the guilds that is in the cache
I would use it to "protect" Server from NSFW content...
checkout tensorflow. you can host models on aws
One way is to set a databse and collect guild ID (server ID) when bot is added to server
Okay man, thank you :)
most overlay systems dont work in fullscreen, only with borderless mode
this is true for most games as well
the only way for an overlay to work in true fullscreen is if that overlay injects itself into directX/openGL or whatever graphics engine the game uses
Ah I see. I'm playing MC in borderless though, but the Electron window can't display itself. As for injecting, how would I go about doing that? Is it possible?
if it works with any other window, then it should work on mc too, it basically always brings the window to the front of other windows
fullscreen doesnt use windows at all, the game takes full control over the screen and the desktop ceases to exist while the game is running
as for how to do that, i dont know either
only reason nvidia does is because it injects itself into the games display mode
nvm I just saw this 
random question: a friend wants to put gifs (from Tenor) in his embeds. Discord parses those gifs and displays them fine in text, but when embedding them, the embeds don't like it without the .gif and just simply adding that to the end of the links breaks them. Any idears on what we could try to just to play around with it?
because tenor links are not direct links
typical
when pasting them as a website, discord looks up the website's opengraph tags to decide what to display
for example
these are the links discord actually displays
so it would be better to just access the Tenor API and pull from there rather than trying to parse it out on his own?
so you have to do the same, fetch the tenor link and look for the direct link in the opengraph tags
if they have an api, yes
they do, just not one i've ever done anything with.
used one, used 'em all, rite?
||jk, biggest lie i've said all year||
ty tho
try it
anybody else having trouble with the v10 gateway and the client presence?
discord somehow doesn't show the client's presence for some reason
it has been set correctly and the client has the right presence
we got this https://tenor.com/76i3.gif, which is perfect. It's the url we needed, or so i thought? (it's randomized, but whatever) but discord still doesn't show it in the embed. just a blank image again
is it possible to fetch User from messageDelete event. (deletedMessage.author.id)
it's possible to catch who's message was deleted, but without accessing the audit logs, you can't tell who deleted it.
my bot has acces to audit logs but i should fetch it from audit logs?
because thats still not a direct link
in my opinion, yes? you can get more accurate information on:
the message from X.user was deleted by X.user: message = message```



