#development
1 messages Β· Page 1264 of 1
what are cookies and why do websites beg us to enable them 
Cookies are small files that websites send to your device that the sites then use to monitor you and remember certain information about you β like what's in your shopping cart on an e-commerce site, or your login information.
Dec 10, 2019
why do websites beg us to enable them
I see no point in disabling anyways
Some use for analytics or basic functions
tfw websites still uses cookies when session/local storage exists
Some are so you don't see the re-login page every time you click a link or button
tfw websites still uses cookies when session/local storage exists
@fluid basin very true
well essential cookies are justifiable
but not the non-essential ones
and they usually refer to the latter
well companies use analytics so they know what kind of stuff we like so they don't bombard us with pointless shit but give us actual meaningful stuff
yet some people think a byte of data from their computer being revealed is the end of the world
IT'S IN THE COMPANIES' FUCKING PRIVACY POLICY MATE THEY WON'T REVEAL YOUR DATA WITHOUT YOU AGREEING AND WHY DO I PRESS SHIFT ENTER AT THE WRONG TIMES
tfw ad banner stores cookies
and also peeps, if you really think using incognito stops websites and stuff from tracking you, think again
theres many more methods to track you, one of which is browser fingerprinting
some of the advanced techniques used by certain websites
and don't forget, if you're using chrome, all your data could be accessed by google without your knowledge
...YOUR DATA...
@earnest phoenix Websites are free in exchange for privacy π
imagine using Google Ads to advertise your shit trying to get people to use your search engine and NOT use Google
DuckDuckGo's epic marketing strategies
So I have the basics of coding down. Like I know what I need to do. How can I get this compatable with a bot. I watched a YouTube video about making it for a discord bot. I followed the steps but made it for my command. Can somebody look over the code and tell me if it'll even work.
Ok so it's complicated but I can't
Try it
because you're a beginner and nobody is born with programming superpowers so you'll need to learn more
(trust me it sucks to make bots when you're only one month into programming)
I don't have the ability to download things on my computer and I have no idea how to get this into a discord bot.
I don't know how to link the box to the code so I'm just trying to make the code first at least
wat
I'm confuzzled too
then run it in your browser 
I'm confuzzled too
@earnest phoenix fuzzle fuzzle fuzzle....
Your code fizzled!
I don't have the ability to download things on my computer and I have no idea how to get this into a discord bot.
@earnest phoenix WHAT THE FUCK YOU CAN'T DOWNLOAD STUFF ON YOUR COMPUTER
No not on my Chromebook
yes you can
I can but I can't open files
I am running a bot from my chromebook
bruh
so Ik you can too
It's blocked because it's my school computer
well that's why
But it's my only way to
run it from your android phone
I can try. I don't really know how to
@earnest phoenix chill lol
Play store: Termux -> apt install nodejs or node or something
Bless you
It's blocked because it's my school computer
@earnest phoenix just imagine trying to use your school computer to host a freakin' discord bot
also if you are in school right now we can stop swearing if your teacher is staring at your discord
Nah it's online school
I can try. I don't really know how to
@earnest phoenix hosting anything on android === kaboom
And it hasn't started yet
are you freaking telling me YOUR ONLINE SCHOOL HASN'T STARTED EVEN THOUGH WE'RE 9 MONTHS INTO 2020 i envy this guy i seriously envy every single thing about this guy
I mean the school day hasn't started
@earnest phoenix
A bot running from Android
Poor fucking display is more shattered than my mental health during the pandemic
It's an old phone don't worry
Poor fucking display is more shattered than my mental health during the pandemic
@slender thistle auger's pfp....?
The photo
you won't get it
my jokes are too complex to understand
So what do I download to get it to run
I mean the bot
@earnest phoenix node.js
termux first
node.js is used to run javascript
listen to Auger he'll guide you through the installation cuz me no linux boi
So what do I do
I'm confused like what is my first step
install termux
Reread my msgs dude
then node.js
I shouldn't have to say this, but this is for an Android phone
I'm on android
alright, good
I shouldn't have to say this, but this is for an Android phone
@faint prism he's using a school chromebook..... apparently he's messing my mind now
He was
Not anymore lol
If you want to do it on the chromebook, you'd have to setup a chroot or the linux subsystem
~/codeco-discord-bot$ node command-generator.js
What is the name of the command?
random
A short description for the command:
Generates random stuff like cats and doggos. Do `c.random help` for the stuff which you can do with it.
Should it be allowed in DMs? Give a boolean value in lowercase with no whitespace
true
Should it be hidden to the help command? Give a boolean value in lowercase with no whitespace
false
Any aliases? Seperate each with a "," without any space. Reply with "null" if none
null
Generated the boilerplate for the command file. Check it and edit the stuff where there are comments.
~/codeco-discord-bot$
epic command generator
I'm downloading termux
I'm downloading termux
@earnest phoenix Get familiar with Linux bash commands while you're at it
Que
anybody wanna help me test my server vote webhook? I'm on timer (imagine voting your own server)
(please don't throw a https://dontasktoask.com at my face i didn't know any other way to phrase the question)
Like touch, man, grep and stuff?
What do I need them for
Like touch, man, grep and stuff?
@earnest phoenix ayy you already know some?
I'm confused on what I will need the bash commands. what step in the process of making a discord bot does that do
I know almost nothing about Bash
A lot of people get frightened by CLIs, so it helps if you know at least how to use echo, cat, ls, nano or vim
basic editing from bash
I'm confused on what I will need the bash commands. what step in the process of making a discord bot does that do
@earnest phoenix creating files, running your bot code (crucial thing), deleting files, using npm, doing almost ANYTHING, etc.
Ok
So I don't need to learn it ;)
Mostly you'll just be changing directories, making folders, maybe use git if you have a repo, and nano to edit
A lot of people get frightened by CLIs, so it helps if you know at least how to use echo, cat, ls, nano or vim
@faint prism only stuff i know:["echo","that's it"]
I'm probably going to make a main.js
ok
Right
That's an example of what I can do?
I'm probably going to make a main.js
@earnest phoenix index.js will be a better name cuz it's industry standard
You mean "default" lol
@earnest phoenix not really tbh
I don't know I'm so confused
I don't know I'm so confused
@earnest phoenix with what?
index.js is just commonly used, but not to be strictly followed
This is helping but slowly
unless you're making a module or something
repl.it not allowing deletion of index.js intensifies
I'm slowly catching on to this
well electron uses main.js
and not to mention its usually better to name a file after what it does
This is helping but slowly
@earnest phoenix that's great
Why is discord using my mic for no reason 
Feck

and not to mention its usually better to name a file after what it does
@fluid basin repl.it won't lemme delete index.js so i made it a side-process to my bot because it's not a good idea to store your express.js server code in the file that gets a hundred edits a second (bot-code.js)
Itβs still using my mic
Itβs still using my mic
@obtuse jolt blow into it
@obtuse jolt blow into it
@faint prism yes
anyone here know the command code for memes
anyone here know the command code for memes
@steel shell that's spoonfeedingwe won't just give you code
lol imagine asking in both #development and #topgg-api
@steel shell that's spoonfeeding
we won't just give you code
@earnest phoenix give me some code
I told my server it would take months to fix my api token checker, in reality it look about 5-10 minutes
@earnest phoenix give me some code
@obtuse jolt
Here's a dramatic way to leak your.env
const express = require("express");
const app = express();
app.listen(8080);
app.use(express.static(__dirname + "/.env"));
And a dramatic way to delete it:
const fs = require("fs");
fs.unlink("./.env");
yoink
Because I like copy and pasting code
Assemble code, run code
**undecancered fucking terrible unfunny name (@earnest phoenix) ** is typing...
why you guys use non qwerty characters it sucks
On a serious note, it requires knowledge of a programming language
Imagine being able to not comment on every single thing you don't like
hey
how do i fix this problem? (node:3632) DeprecationWarning: Collection#find: pass a function instead
Imagine being able to not comment on every single thing you don't like
@slender thistle then why you guys decancer names in five seconds of spotting
code keeping his opinions to himself? impossibru
how do i fix this problem? (node:3632) DeprecationWarning: Collection#find: pass a function instead
@eternal osprey that's not a problem that's a deprecation warning
We don't make a big deal out of any unmentionable names afaik unlike you 
so it won't intervene with my code?
anyone here know the command code for memes
@steel shell
client.on('message', message => {
message.reply('no u');
}
@eternal osprey it is a problem, are you using discord.js v11?
so it won't intervene with my code?
@eternal osprey not necessarily
v12
afaik it was completely removed in v12
i made a discord to twitter bot
i usually don't care for deprecation warnings (unless they're for one of my dependencies instead of a weirdo built-in node module that i don't use anyways)
i usually don't care for deprecation warnings
@earnest phoenix that's pretty bad...
I can imagine the rage of the devs who actually put those deprecation warnings there
Especially if they are breaking
just for them to be utterly ignored
@eternal osprey you're using .find("a","b") right?
yeah
@eternal osprey
DeprecationWarning: Collection#find: pass a function instead
If you're getting a warning about passing a function when using Collection#find, this is because Discord.js version 12 removes the ability to use .find("name", "value") and will require a function instead. For 11.x you can easily ignore this warning (deprecation does not mean "not working", just that it will be removed). It's good practice to prepare for the future, however, so here's how you use a function in find():
// get a role by name
guild.roles.find(role => role.name === "Rolename");
// get a user by tag
client.users.find(user => user.tag === "username#1234")
// find a channel that starts with "test-"
guild.channels.find(channel => channel.name.startsWith("test-"))```
are you sure you're on v12? im pretty sure it was removed completely in v12
gtg guys mom is bringing a knife
Gl
^
on it guys
Expected end of life for v11 is 7th Oct when intents are introduced, unless you have modified the library to fix that (which is pretty complex trust me)
this should cover most breaking changes in v12, but again go back to the docs if something isn't working correctly
That reminds me I have 2 weeks to update literally all my bots.
JS libs in nutshell:
Eris -> No breaking changes (do it properly first time) + supporting latest gateway.
Discord.js -> Many breaking changes + support latest (probably even more % than eris) gateway.
I'm not saying D.JS is bad/awful, it's just the fact + I use D.JS too.
That reminds me I have 2 weeks to update literally all my bots.
LOL same
my almost-3-year-old bot finally needs an upgrade
just remembered i have a bot still running on discord.js v12.0.0-dev
That reminds me I have 2 weeks to update literally all my bots.
@umbral zealot how much do u have
just ctrl + h
uh... actually just Etiket officially but I made a bot for work and I should probably update it for them even if I'm leaving the job next week
that would be quite the fun: "you left last week and now the bot is broken, gee thanks buddy". good way to burn bridges.
Ahhahahahahahah
uh... actually just Etiket officially but I made a bot for work and I should probably update it for them even if I'm leaving the job next week
@umbral zealot Might want to show them how to maintain it themselves
uh... actually just Etiket officially but I made a bot for work and I should probably update it for them even if I'm leaving the job next week
@umbral zealot burn bridges or cause hormonal chaos...
hormonal chaos
You mean hysteria
I mean I actually did send them the code, but it's v11 code, so I will update and send them again

does anyone know if i can change grafana's localization?:
i hate that its pulling my local language for uptime

Even though browser lang is english
I mean I actually did send them the code, but it's v11 code, so I will update and send them again
@umbral zealot That's a good amount of work for that
I'd probably pivot to just showing them how to update it themselves
Eeeeeh it's a little bit of work, mostly I'm just using the caches thing so it's not that hard
I'll just host the damn thing until it breaks
I'll just host the damn thing until it breaks
@umbral zealot You're hosting a service for a company?
Don't they own their own servers?
yeah they do but it was sort of a thing I did on my own time
yeah they do but it was sort of a thing I did on my own time
@umbral zealot so uh... Was it something you were paid for?
not officially no
officially
Shady bizz
I could most definitely go "oh whatever I don't owe them anything" but I don't wanna be the asshole
wha-
By that I mean I officially did this on my own personal time, but unofficially I did some work during business hours.
If they want it maintained and not abandoned, ask them to buy it wtf
Has anyone here done much work with youtube-dl/ffmpeg for discord.py? I'm getting some errors, that I have a solution for but can't use that solution. (if that made any sense at all)
Quick overview:
I'm basically trying to download and play music with my bot. this works fine
The issue happens when I try to download music. I haven't added my ffmpeg to my PATH in favor of just keeping it inside my bot folder. I know I could move it into PATH, but I much rather not. The error effectively is the downloader being unable to find the ffmpeg executables.
Does anyone know of a way I can reference the location of the executables to youtube-dl?
I was getting paid $77k/year I think I was properly compensated.
eh, yeah sure, more or less. it's a gray area I guess.
If you worked on it AT ALL while on the clock, it's their IP
or at least they have a claim
I gave them the code already, so that part is covered. Β―_(γ)_/Β―
That is true, but it costs me exactly nothing to keep it alive until they do , and for the forseeable future.
I dont see why not profit it
So, you can explain to them how to host, or you're essentially a hosting their IP from a rouge server (your own)
i see it as either 'profit' or 'not profit', not as 'not an issue' or 'issue'
you are providing an extra service and not being paid for
I dont see why not profit it
@opal plank you can't profit from their IP though if you leave the company
Once you leave, you don't own it anymore and can't use it anymore
i mean, i guess
is anyone here has a music bot that uses ytdl core?
Right.
My point is, I don't recommend hosting it even if "it costs me exactly nothing to keep it alive"
while your outside the company
Hello
Sounds like a potential legal issue
i use the lib YTDL-Core, sometimes it gives me "Couldn't Find player config", any idea?
@faint prism dude it's a moderation bot for a server, not a merchandise store, geeze. π
I've given them the instructions on how to configure it and run it, and the bot can be kicked from the server once they've done that. At that point, I'll know, and delete the whole thing from my end.
yes, usually for one-off projects the company/business should be the handling infrastructure and what nots
I'm just saying
I mean you're right in saying it, but this isn't a case for the lawyers. MindGeek is not so anal as to sue an ex-employee for running a moderation bot done as a side-project to help the server.
Job opening for Content Protection and Anti-Piracy Expert
at MindGeek Careers
You're good anyways lmao
lmao
By that I mean I officially did this on my own personal time, but unofficially I did some work during business hours.
it would be arguable then, if you have proof that you spent most of your personal time on that it will be mostly owned by you
although some companies can be real dicks
Good luck surviving the suit though
I mean most of this code was boilerplates I wrote years ago too
wtf why are they hiring so many PHP devs
well you gotta know corporate is at least a few years behind latest standards and technology (especially big companies that do not specialise in the tech field)
php
what's their discord tho
I wish my company had a discord lmao
But they are probably still using COBOL for their mainframe
so I doubt they know what discord is
although some companies can be real dicks
if they don't like you they will try take everything from you, literally
I watched Silicon Valley 
@faint prism because pornhub and every single back-end is written in PHP, that's why.
Also most API systems
Where is that statistic from?
myanimelist 
pixiv 
From literally being an employee there.... 
and Angular for FE
From literally being an employee there.... :tHONK:
@umbral zealot You worked for PH?
I work for MindGeek which owns PH and most of the largest adult entertainment domains out there
oh shit
I mean, I work, for the next week, then I'm gone, but yeah
what are you planning to do next though?
MindGeek has its origins in Mansef and Interhub (owners of Brazzers and Pornhub respectively)
But they are probably still using COBOL for their mainframe
so I doubt they know what discord is
@faint prism A lot of large companies still use COBOL
Oh I guess we're going for an /r/iama. I'm moving to a more local startup company doing some B2B2C app for residential building owners providing services to their residents.
I already did π
Sorry, the startup itself provides the b2b2c apps, I'm going to work for them.
it's usewalter.com if you wanna take a look. Cool stuff, not as exciting as adult entertainment, but the techs used are some that I haven't used so I'm just learning new stuff.
wew netlify
I can't click back when I select an option reeee
I'm assuming vue/angular for the website?
lol
oh gatsby
reactjs it is
no wonder the website structure looks so much like react
com.janitor.app really? weird org name LOL
Because it's used by residents to request things, as one would a janitorial staff.
y'all are just gonna poke at this for hours aren't you. I really shouldn't link this anymore.
nah, just interested on their stack XD
I think gatsby is only used for the site (since, y'know, it's a marketing site), but the stack itself is react, react-native for mobile, graphql for APIs (apollo), that's pretty much what I know.
wew, as expected from a company using react. The app is react native
ah nice
graphql, a nice one too
oof app ratings are a bit low
at least they're willing to adopt new technologies
Well it's a startup so... yeah.
Tbh their site and app pics look great
imagine a startup buying an AS/400 and doing jquery development π
v modern looking
wait what official languages are there in canada
kinda nice also to see everything offered in english first
FR and EN
ah
most of these 1-star reviews are people that had an issue with the app and decided negative feedback were the way to go. Ugh. people.
Yeah, that's the problem with people only wanting to leave feedback if they had a bad experience
lmao @thick gull why did you react with π to my server's rules
hey
owo
development
ok
hey
@eternal osprey What's up?
more like WASSSAAAAAAAAAAAAAAAAP
Can you use Firebase's database in a Discord bot?
They don't have anything for Node.js applications
lvltog = pre["Levels_Toggled"]
KeyError: 'Levels_Toggled'```
why doesnt think work?
tjhats the error
levle = collection.find(guild_id2)
for pre in levle:
lvltog = pre["Levels_Toggled"]```
help me to fix this i dont know how
help me to fix this i dont know how
@fluid widget please send the code on https://hasteb.in because we cannot help without knowing what anarchy is going on in the back
The first one sounds like a rate limit
oh my
how do i see my shards lmao
i know i sound dumb rn
but never understood shards
client.shard
omg
thereβs docs
wait u on DJS?
ye
https://discord.js.org/#/docs/main/stable/class/ShardClientUtil @earnest phoenix this might help then
thatβs client.shard
cheers mate π
@earnest phoenix https://hasteb.in/dugirove.js
@fluid widget slightly more readable
https://hasteb.in/ebazihes.js
whitespace is important dude :kekw:
Hello can I get some help
Hello can I get some help
@frozen crest just ask your question
@frozen crest https://dontasktoask.com
How long do you think it takes for it for my bot to be done
wat
huh
what is "done"?
wHAT
I left my bot to this 2 weeks ago
6+ weeks
^
I thought it was +5 wks for approval rn
edit: oh it is 6, damn
went up ig
@faint prism sorry, i have recently made a bot that send twitter mesasges to discord.
i there any way to do it the other way around?
a webhook?
yeah
either webhook, or api.
does anyone have a moment to check out my website?
i am using twit package
I need feedback
oh
alright
I'm just asking people if they like the website I'm making, to make it look better to everyone
I'm sure you can find a better place to ask people to rate your website. There are plenty of general programming guilds, maybe even some ux-specific ones.
^^^^^^
or just send pics of it in #memes-and-media
@faint prism is not work
alright @umbral zealot
@faint prism is not work
@fluid widget https://discordapp.com/channels/264445053596991498/272764566411149314/758365799848214561

I did not understand you @faint prism
an internal server error?
sounds like a ratelimit
wouldnt the library return something more descriptive in that case since it must be common?
It might lose some details being inside a promise function, idk
hmm
I did not understand
wouldnt that mean that something is discords fault if its returning a 500
you have a code ban timer @faint prism
uhhh
wot moment
@faint prism can you give me the code ban timer
what is that
server?
@faint prism can you give me the code ban timer
@fluid widget pls stop pinging me
I have no idea what you're asking me for

What is This Group?
@earnest phoenix This channel is for talking about development topics
Not Me Sorry
Thx
lol no
It's guide written by idiots for beginners*
if u want guide what doesn't explain anything, then use this non-idiot guide: https://discordjs.guide
yeah both are fine
I just got rick rolled.
@earnest phoenix Not sure if you mean that literally or not
When i say rickrolled i mean that it's no help yet.
@earnest phoenix That's not a rickroll...
That just means you haven't read the website links. Because it literally has a step by step guide
This actually looks pretty nice https://anidiots.guide/first-bot
That was a good link. so was the other one
@client.command()
async def send(ctx,member:discord.Member,amount = None):
await open_account(ctx.author)
await open_account(member)
if amount == None:
await ctx.send('Please enter the amount of WCash to send')
return
bal = await update_bank(ctx.author)
amount = int(amount)
if amount>bal[1]:
await ctx.send('You dont enough WCash to send')
return
if amount<0:
await ctx.send('WCash must be positive')
return
await update_bank(ctx.author,-1*amount,'bank')
await update_bank(member,amount,'bank')
await ctx.send(f'You sent {amount} WCash to (member:discord.Member)')```
i get this reply ``You dont enough WCash to send``
though i have 98 and wanted to send 20
can someone help me with this?
if amount>bal[1]:
await ctx.send('You dont enough WCash to send') check this line of code :D
isnt it the same lol
What is the 8bl command?
@earnest phoenix It's just finding a random number then if it's above 50/100 say "true" else say "false"
Pretty easy to do
Wuts a key error
I'd imagine it means the index/key doesn't exist in the dictionary
oh
@earnest phoenix https://discordapp.com/channels/264445053596991498/265156286406983680/752949715162759312 an example from a while ago
guys please help me its a my bot log's screenshot
client.on('guildCreate', guild => {
console.log('Bot added: ' + guild.name + ' ID: ' + guild.id)
client.shard.broadcastEval(`
const Discord = require('discord.js');
let cortex = new Discord.RichEmbed()
.setColor("GREEN")
.addField("Guild Name:", '${guild.name}')
.addField("Guild Owner", '${guild.owner}')
.addField("Guild ID", '${guild.id}'
.addField("Guild User Count:", '${guild.memberCount}')
.setThumbnail('${guild.iconURL}')
this.channels.get("604740616584429574").send(cortex)`)
})```
green on black π€’
COLOR 0a ftw
Read it
RichEmbed
its a impossible
Use V12
v12?
yeah
i using shard.js
v11 is deprecated
I thought I told you what KeyError is
yeah
better do it in development and not in prod
nice.
@faint prism
client.on("guildMemberAdd", async member => {
let use_channel = await db.fetch(`register_${member.guild.id}.channel`)
if (!use_channel) return;
member.setNickname(`Type a name`)```
i make it this but so high memory using now
discord.js v11
Is that the entire block?
}
If you dont close that event it will stack with other events
Which will cause a memory leak
If you dont close that event it will stack with other events
@thin turret wtf JS is insane
Its just a matter of })
okay but i dont send all my code
i dont send all code
Just make sure that event actually closes before the next event inline
where can i get my patreon bearer token
omg i dont fixed...
how i make the reaction work only if the user has specific permission or role
Using a filter in the function
can sqlite dbs break from connections overwriting each other?
not if you use WAL mode
as well as syncronous
look up PRAGMA for journal_mode and synchronous
thread locking :p
lock (obj)
mutex
lock (obj)
@faint prism ew sync
semaphore slim is pretty good but it's still pretty bulky
it's like 71ns compared to lock around a few ns
What the fuck is a memory leak
ooh cardi b's getting into programming
ooh cardi b's getting into programming
??????
does anyone how to hide your source code from other poeple viewing it? (html/js/css)
@sonic lodge thanks bro
or make it harder to look at it
there's no way to hide the front end bits
you cant
what
probably can encrypt it, but theres no point
I'll try
its just unnecessary, inspect element & decrypt
also, why are you even trying to hide ur code?
uh ok
there shouldn't really be anything sensitive
its not that big of a deal, you can view any sites client side code
@digital ibex yeah, still I'm not really okay with it
how can i do if string 'true' or str 'false' not in arg
@drifting wedgestr === 'true'?
How can I use Turkish characters like ΓΆ Δ Γ§ Ε in node-fetch? In URL
I tried to escape but I couldn't
@drifting wedge
str === 'true'?
@thin turret if not
get an api which url is in turkish or something
encodeURI()
oh yeah and that lol
@thin turret if not
@drifting wedge use!==
!==?
!== is not operator
idk what he's talking about
str !== 'true'
not in python no
thats not a thing in python p sure
Are you python or js?
py
Sorry I assume you are js
use is 0Exe
can't you block the use of developer tools for poeple visiting your website though?
no
str?
so like not if str == true
@drifting wedge
if not str === 'true':
@thin turret
that
That what
if (myBalloon)
my balloon lol
?

await message.guild.channels.create(`ticket-${message.author.username}`, { type: 'text', permissionOverwrites: [
{
id: message.author.id,
deny: ['VIEW_CHANNEL'],
},
] });
``` Why wont this add any actual permissionOverwrites, It's like its ignored

yeah, ide think it's possible thinking it through more
What were you trying to do?
You can obfuscate it. But client-side is public
@faint prism yeah I did obfuscate it but the problem is, I would have to put the obfuscated code in the index too, which means I won't be able to edit the website anymore
I wasn't really keep up with the convo prior to now..
oh
yeah
you can't do what you're asking
I see
HTML is meant to be plaintext, so you know, it can be interpreted by the browser
You can remove newlines to make it hard to read, but pretty-print is a thing so...
oh wait
yeah the thing is I have few strings of code that I REALLY want to hidr
@ancient nova then you should not have them in the html...
no you're approaching this wrong
you should not have secrets in the html at all
That's what APIs are for
It sounds like you're asking for exactly what an API would give you
an API is basically code that runs on your own protected server and sends the result to the client
So a website can be like: "Hey API, give me the data for X." and the API uses some secrets to build X and says, "Here you go website" hands over X.
@ancient nova And boom, no secrets exposed
I see
in discord.js how do i get total servers throughout all shards
using discord.js shardingmanager
@faint prism I just want to obfuscate meta parts of the html tbh
nothing else matters to me
why
because I have card stuff in there
Can you show an example?
uh sure
in discord.js how do i get total servers throughout all shards
@indigo folio broadcastEval
it returns a promise that resolves to an array
<meta charset="utf-8" />
PING
so i just have to add up each value in the array
<meta charset="utf-8" />
@ancient nova That's needed by the browser
client.shard.broadcastEval("this.guilds.cache.size") then reduce it
Why would you hide that
donβt use .then tho it doesnβt work
because I want to keep those parts private
i saw that but i was wondering if there was a simpler way of going about it
But thatβs needed
i saw that but i was wondering if there was a simpler way of going about it
@indigo folio not really
because I want to keep those parts private
@ancient nova metadata is supposed to be public
ok ty
@ancient nova use google analytics for your website
@misty sigil so there's no way to obfuscate/hide it or make it harder to acess IN ANY WAY?

like what?
For example. You can't and shouldn't hide this
what is your end goal
this is an http://xyproblem.info
Asking about your attempted solution rather than your actual problem
I just want to hide that and only that one part
He's trying to hide some card data in metatags for some reason
BUHT WHYY
no idea
BECAUSE
use an api to hide data
just wanna hide it
ITS METADATAAAAAA
just because lol
you donβt hide metadata
reeeee


Yeah, you can come to my house, just dont look at the ceiling nor the floor, just look at the wall trophies
I've been trying to hide it
thats basically what you are trying to do
Donβt hide metadata
what's your reason to
"because" is not a valid reason
because that's not it's purpose
this is exactly why xyproblem forms
@earnest phoenix ok theres no reason I just don't feel like sharing that part of html code to anyone
bruh
that's what an API is for
nothing else in particullar
it has to be shared
so dont have metadata there in the first place

Or just donβt put metadata
@earnest phoenix I need it for a lot of things
what
html is always going to be public and you can't hide it, it tells the device how to behave
alright then I guess 
BEST case scenario use an api to make it harder to get that info
that wya you can dynamically inject code from api rather than having it directly on the site
js script to fetch from API => getByElementId() => replace content
tfw hide secrets in your html just for your bot to scrape it bc you don't know how to make an API
lmao
Itβs so fucking stupid
security through obscurity is no security
if I could star that, I would. Everyone should know that fact
theres no reason whatsoever to hide stuff with html
out of curiosity, what exactly do you want to hide?
for some reason I feel unsafe sharing my keys, metas etc im html code
i know you said meta, but what specxifically?
"card stuff"
keys, cards, fonts etc
well I guess you could say that
I see but what about the keys
do you NEED keys?
and keys for what?
without a proper explanation of what it is i cant think of a way to help you find a better solution
sounds like you just need a database or an api
like for example adding image to a card you paste a key to get that image from your assets
then rather than doing that
database then
I don't like that
key? isn't that just the path to the file

website/assets/(filename)
fetch from database or somewhere for a href to replace the last bit of the url
You can't use HTML metatags in place of a database. Wtf, I shouldn't have to say that reeeeee
your client (browser) is going to make a request to the image anyways which will show in console and networking tab so there's no point in hiding it
I just realised how easy it is to steal content from someone lol
get the client to convert base64 into their browser
firefox evaluates b64 properly
it SHOULD be fine to use b64 but i cant see if being friendly whatsoever if you start doing it a lot
no url there
Β―_(γ)_/Β―
nor keys
b64 is not security
I mean like I can go to facebooks page , get's it source and make my own website with it called firebook.xyz and boom I'm a billionare like Mark Zuckerberg
it isnt about security
it seems like you're misusing html
he wants to not have keys in the html
I mean like I can go to facebooks page , get's it source and make my own website with it called firebook.xyz and boom I'm a billionare like Mark Zuckerberg
@ancient nova no.
im providing ways he can avoid it
You need backend too
If I see base64 I always decode it
I'm just saying
and then the database systems
not that you could actually do thst
You canβt do that
so easily
you need a backend server if you don't want to expose api keys, fin. every other attempt at a solution makes you look like an idiot
Shitty example then
like i told him auger, he can use a logo/watermark to prevent stolen assets.
His next concern was keys, which is from what i gathered the identifier of the card
With a database he can request the card by name rather than key and beam the b64 converted image to the client
@faint prism
I see
disable CORS on your backend and you're good
So are you trying to scrape your own website html or something
no all I wanna do is hide like 4 lines of code with like 4k chars at max but
I'm giving up
ITS FRONTEND ITS SUPPOSED TO BE DISPLAYED 
reminds me of a Google CTF a while ago about a JS Safe 2.0 or something
I think that's it
couple more hours and i'll test the cache stability
rip
so i'm making a bot in BDscript and I was wondering if there's a way to use a user's username instead of mentioning them
like how dankmemer does
By making a bot in js or similar languages
go nag the developer
ok
so i'm making a bot in BDscript and I was wondering if there's a way to use a user's username instead of mentioning them
@earnest phoenix embeds don't mention users
nobody provides support for bot makers because you don't have direct control over the code, go nag the developer of the maker for that
yeah but they get mentioned when you run the command
then code it differently
man i dont know what to uh
eh i'm replying to an old message lol
but
does discord contact you about your verification form via email?
ES5+BD.js is the java library i'm using
Is it normal for the node not to respond after starting its bot? When mine says "Ready!", I can't give any more commands on the terminal.
l0l
kek
Is it normal for the node not to respond after starting its bot? When mine says "Ready!", I can't give any more commands on the terminal.
@earnest phoenix yeah. Because it's a running CLI application
you can interact when the node process exits
and unless you are reading in a character(s) from console, then it's output only
Oh, thanks> _ <
how do i get a bot in my server
how do i get a bot in my server
@iron mantle invite one
o k
i killed my debugger console again with the sheer spam lmao
fml cant believe imma have to restart cuz of this
rip
Hello
hi
Hey, just a quick question...
For example GET GUILD CHANNELS
Returns a list of guild channel objects.
Is it possible to define the fields of the channel object I wanna receive instead of receiving the whole object?
(within the request)
Hey, just a quick question...
For example GET GUILD CHANNELS
Returns a list of guild channel objects.Is it possible to define the fields of the channel object I wanna receive instead of receiving the whole object?
@boreal iron Can you give an example?
Because you can get a guild or all guilds and filter it by a channel or channels that match a specific property
Opinions?
opinions on what
still adding some extra monitors to the bot, though this is only the twitch one
on how it looks
Hey guys, have any of you had success sending a buffer as an image attachment? (using discordjs)
Trying to do so, but all I can get is the following when sending a valid png buffer
File size is right, works when writing to disk then sending using the path to the img
@faint prism
Example API request: GET /channels/{channel.id}/messages
It will return a list of messages as object.
I donβt need to receive the whole message object.
Just need the message[id] and message[content]
^^
@grizzled ivy https://github.com/discordjs/discord.js/blob/master/docs/examples/attachments.md#sending-a-local-file-or-buffer
yup, doing so
just can't get the image to display, either with or without passing a filename as argument
Β―_(γ)_/Β―
if you save that same file sent and open it, opens fine as an image?
yup, writing the buffer to a file and reading from same file works fine
or even sending from that file for that matter
its just sending the buffer directly that somehow doesnt create a preview
Ok ty
for embeds i mean
oh, its a regular attachment
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
did you provide the extension and such?
pic.png?
yup, well, the filename
both with and without
const attachment = new Discord.MessageAttachment(buf, 'image.png');``` Β―\_(γ)_/Β―
hmmmm i havent had that problem before, though i dont usually send them
i guess a workaround is to simply use locally
though thats a bit odd
actually
holdup
i may know the culprit
well, kind of a wreck in term of perf and disk usage having to write the image to disk then reading from it instead of directly passing the buffer from memory, but guess I don't have a choice
anyone here play among us?
aight, lemme see
i edited
actually
my bad again, you need that as second param
i just noticed that field i was checking is second parameter
oops lmao
Hmmmmm

doesnt....
holdup
i have seen a friend encounter the same issue
but im not sure it has been fixed
this almost makes me miss doing string extraction with from executables in node lol
yeah im lost on this one too tbh
Same, works perfectly offline, its kinda peculiar, encoding input to images uses rgba as values, but never had any probs loading the images anywhere else
i thought the repo i first showed was outdated
then i went to the recent docs to check under the <channel>send()
which does have attachments
but i guess theres something missing
yeah, guess i'll have to find some workaround, thanks for looking though!
Not bad!
ty
I'm kinda stuck on my end, can't verify my bot cuz my ID is expired lol
im gonna cry if my verification on twitch comes before my discord one
Cuz leviathan started as a Discord Bot


Sad
F
Passport expired last month too, same time as ID, i'm 25, so no "guardian" to help here, just gotta wait for the administration to take its time.
oh shit
F in chat then
Only stripe would deny a month old expired ID
verification effects go active next month 
Would still be valid for anything else here.
same here
Can you just show them a bill with your name on it???
DNA samples should work too 
wait
waiting
how do i invite a bot into my server
with an url/invite
im dumb so im getting my friend and cousin on it
Nope, only accept passport and id and drivers license
oh ocean man
take me by the hand
give me a sun tan
lead me to the land
a place you understand
ok
how can i use slice and join here ${sampiyon[oh.freeChampionIds]}
But yeah, regarding the images, guess i'll just write them with a random filename, send and then delete file
Just creates unnecessary write time and stress to the disk, tho this bot is mostly on private servers
@earnest phoenix what?
One message removed from a suspended account.
async def prefix(ctx):
mongo_url = "url"
cluster = MongoClient("pp")
db = cluster["db3"]
collection = db["prefixes"]
guild_id = int(ctx.guild.id)
guild_id2 = {"_id": guild_id}
prf = collection.find(guild_id2)
for pre in prf:
preefix = pre["prefix"]
client = commands.Bot(command_prefix = f"{preefix}")```
how can i make this work
I'm trying but I'm getting an error ${sampiyon[oh.freeChampionIds].slice(0,5).join('\n')}
TypeError: Cannot read property 'slice' of undefined
then sampiyon[oh.freeChampionIds] is undefined
log that value beforehand
@earnest phoenix
How do I save a canvas into a embed thumbnail?
I need big help
I have some code I want to have in a discord bot
And I'm using js and termux
But I big confused on how to set up what I need to code and where to do so
what are you confused about? is this your first time? do you know javascript l? what code do you want?
It's my first time. I know JavaScript and have the basics of my commands already written
okay, what are you confused about? whats the problem
I just don't know what to do once I'm in termux
Like how to set everything up to the point where I can enter the code
ahh, you need to login with your token
thats one -5IQ of cooldown your commands
yes
Hm?
that function simply says you can use the command after 3 seconds, it doesnt block any other attempt
Oh yeah that's on purpose

and it just sends the message after 3 seconds
It needs to log a certain message exactly three seconds after you make the command
doenst do anything
then use a collector

we won't just give you code








