#development
1 messages Β· Page 1336 of 1
Yo that's sick
Hope it goes well for ya
and this is the server selector
Wait that's so cute!
ya
This makes me wanna redesign my bot dashboard 
wuts urs?
we're adding darkmode dw
lol
this is like really basic we've been doing it for like a week now
and the other dude whos doing it with me is in australia so we only got a couple hrs per day
so itll take a ton of time
@main trench wuts urs like?
one of my devs is called goose lol
pog
i deleted it
cuz im not supposed to be showing it
but thats it
u on windows 86?
also win 86 isnt a thing
lol
head
& shoulders
Pog
is there a way for my bot to display the amount of servers its in?
like in an embed or something
do script tags go anywhere?
not in the body
nothing wrong with script tags in the body
hello
anyone know how to get a dev key from pastebin.com ?
cuz im trying to use their api
if you want to create bins just use better alternatives i.e. hastebin and hastebin forks
yes but i want to do it with my bot
so?
does hastebin have an api?
yes
whats it called?
it isn't
what
k
POST to https://hastebin.com/documents with string content
kk
well im too lazy to do that so i found an api
thx for reminding me hastebin exists
is there a way for my bot to display the amount of servers its in and put it in an embed?
of course
<script>
window.onload = function(){
document.querySelector('.btn').onclick = function(){
if(this.className.match('btn_red')) {
this.className = 'btn';
}
else {
this.className = 'btn btn_red';
}
};
};
</script> ``` this is the js on my head script tag for html
what do the classname = mean?
take a guess
ik its the class name but isnt the id related?
in this example? no
you're selecting a class and working with classes
no mention of an id
how come you managed to design that dashboard but you don't know the distinction between classes and ids 
are you using a template
@earnest phoenix im getting help lol
im doing this by myself
for the dashboard i do it with some toher ppl
can an embed use emojis in its footer?
I don't think it can use custom emojis or Twitter emojis, but it can use raw emojis like \π
ok thanks
I'm using zombie.js to visit a website (multiple times) to gather data. It almost completes gathering it all before saying there's too many listeners.
It's always when there's two left.
Does anyone know why after visiting 100s of pages it's only on the last two that there's too many listeners?
Or a way to check the current amount of listeners and make sure the limit isn't exceeded?
where are the listeners? what are they attached to?
I uh, just used browser.visit and executed a function from that.
Sorry for the delayed response.
i mean
what does the full error say
usually its says "too many YYY listeners attached to XXX"
(node:4532) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 idle listeners added to [EventLoop]. Use emitter.setMaxListeners() to increase limit
(node:4532) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Browser]. Use emitter.setMaxListeners() to increase limit
(node:4532) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 tick listeners added to [EventLoop]. Use emitter.setMaxListeners() to increase limit
Hmm.
Like node line is different than before.
can you show your code?
what is the purpose of this?
So that it doesn't visit the webpages too fast.
I haven't re-tested, but when I wrote this code it caused my bot to crash inconsistently. I guessed it was because the website blocked access due to how fast it was visiting the different pages.
there are better ways to achieve that
Yeah, probably.
currently your code is basically blocking itself
the reason for the warning is that you are executing an async function in a loop
so every single browser.visit is done all at once
at the same time
Oh right, I was supposed to move the delay so that doesn't happen, but instead I left it out of the most frequently called loop...
the best approach is to use promises
Ah yes. I've heard that word and expected it to be useful but uh, foolishly? never looked into it more.
using promises with the async/await syntax allows you to properly queue requests, even inside a for loop
so that the next loop only continues once the previous is done, and it does so without blocking your process
So I should research promises and integrate it into the loop.
Automatic queuing sounds very convenient.
Thanks for your help!
does anyone know how to get author id from guildDestroy event?
well cant only the guild owner delete the guild? because then you can just get the guild owners' user id from the guild object or however ur language works
^ that
no, guildDestroy event is when bot leaves the guild or get's kicked from it
guildDestroy concerns when the guild is deleted as well
ah, dont think you can find out who kicked it, or why it left unless it was via your own command.
@sonic lodge ah I see, didn't know that
Unfortunately, all you know is that the bot is no longer in the server, cant really find out why or anything
(node:2432) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
at RequestHandler.execute (/home/runner/Bot
/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
Hi, I have a problem with my bot that is sending error messages in the console, I went through all the code but did not find the error, could someone help me?
It says that permissions are missing, but I have them well configured, even in the invitation administrator is required for the bot
It could be anything the bot is tryna do my dude
I had a similar error, luckily after a LOT of debugging it was the bot accessing the audit log when it doesn't have perms
mmm it can also be that problem with the audit log because I have a fetch for the messageDelete event
but it still enters the audit log
So if I had: ```py
def test(i):
return i*2
async def test(i):
return i*3
print(test(1))
print(await test(1))
Would this work in theory
how do you import views in Django Rest Framework?
it's like from something import views
I'm not sure what something is
yeah

If I am sending a message to a user via dms and it can't send the message how do I catch it
I am dumb rn
Sorry
@waxen tinsel test is defined twice, it would error
Also, why would you mix sync & async like that?
Was wondering if I could essentially copy + paste all methods in https://auxilus.ml/resources/sqliteObj_module, then convert them to async, in a way that supported the old functions as well without changing names
I was trying to be lazy in summary

does anyone know why my Django Rest API says No Module name Webapp but I don't have webapp anywhere in my code?
would i need js to use mongo in html?
you can't use mongo in html without a backend
backend is flask
we can input data
but how do we get data?
like for example from an input box
why can't you use pymongo if you're already using flask?
i can
but how would i get data
like i can use vars in html from flask
but how do i give flask data?
π€·
@drifting wedge https://stackoverflow.com/questions/49861167/how-to-get-html-input-using-python-flask
@glad charm do the tag
@reef carbon That's a general error
Could be fucked up directory structure, a typo, etc.
Anyone know of a good alternative to youtube-dl? I'm trying to use it for my bot but I'm getting JSON parsing issues that make it impossible to use
from . import views Cannot import name 'views' @earnest phoenix
What's your directory tree look like?
You don't have a file named views.py ?
i've only done startproject
I think you are in a project directory which controls all the apps for Django, you need to create an app
Honestly at this point, I'd just suggest another guide, with more info @reef carbon
Corey Shcafer has a good series about it, plus it gives you LOT more information, like custom domain, HTTPs setup, etc.
That guide doesn't even show you how to setup apps, or to serve them
oh ok
https://www.youtube.com/watch?v=Sa_kQheCnds&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p&index=13
@earnest phoenix is that basically the help article but better?
It uses Apache instead & SQLite
oh
Its a better guide, but the database it uses isn't as good as Postgres, but you can find a separate guide to set that up v. easily or just use the info in that article
isn't nginx easier than apache?
Apache config can be hell, but Corey takes care of it in the videos, so it shouldn't be too hard
I know that feeling, lmao
But its so satisfying once you finally get said problem fixed & working
yeah that's basically what keeps you going

well, thanks for the help. I'm gonna start tomorrow.
Np
@slender thistle Ik u said u donβt wanna be part of a bot team, but I was wondering If youβd be interested in working on a dashboard, and server stuff? Lmk!
Ain't cut out for any sort of group development, thanks
Aight, thanks anyways
group development sucks, the only kind i like is downloading libraries
@solemn latch for me itβs been working out great
Gotten a ton more work done
more work compared to what π€
you solo
or compared to what youd each do individually either way
@solemn latch we each have things we r good at
I would have NEVER gotten this far without their help
Itβs like we each do things we r good at
It's possible.
i have tried it out but if i do user.send its says cannot send
Maybe that user DM is closed.
client.users.cache.get('<id>').send('<message>'); - This should work right?
cause i can get id from the object
is it better to develop a bot using only classes or functions? or does it have no relevant differences?
how to check if in an array there is already an element that i want to add?
opus is moody about installs
if I want to only get the 2 and 3rd args in a message to be used in a part of a command how do I weed out the stuff after those arguments? I know how to weed out before but not after
i just know opus has requirements
and you need to look at those requirements to install it
Figured it out
wait my node is latest version
and you need to look at those requirements to install it
@solemn latch where can i find them
π€·ββοΈ

hiya, just wondering if anyone knows some fairly simple eris bots that i could take a look at
dank memer
im moving over from discord.js, and i've read the docs, but seeing something actually being used helps me understand it better
yes 
also, i love my old code, its so efficient >.>
@solemn latch it worked
Developer essential tools something weren't installed on my VPS
Is there any website that hosts bots for free?
No, @sick fable. There exists nothing such as free on the internet.
No, @sick fable. There exists nothing such as free on the internet.
@still cliff π₯Ί Fr?
π
:{
You can however sign up for AWS which will give you its free tier for one year.
You can however sign up for AWS which will give you its free tier for one year.
@still cliff thanks <3
Yo woo
well i have a bunch of this keys in my JSON https://i.imgur.com/rgpfZvA.png
how do i obtain a key with the object inside it in NodeJS (like searching for the key and then obtaining the name object)
yo pg
Alright, I coded some commands and I am coding this discord.py bot warn command.I really need some help like if a Moderator types ,warn , it should send Please specify a user!.
@client.command()
async def warn(ctx, user: discord.Member,, reason):
embed=discord.Embed(title=f"Succesfuly Warned {user.name}!" , description = f"User warned by : {ctx.author.name}\nReason** : {reason}" , colour=discord.Colour.green())
await ctx.send(embed=embed)
emb=discord.Embed(title = f"You have been warned From {ctx.guild.name}!" , description = f"Reason : {reason}" , colour = discord.Colour.teal())
await user.send(embed=emb)***
Help me asap before I post this query on stack overflow!
just see if there are args or no
also, i love my old code, its so efficient >.>
my memory usage is like 0-10mb yesh
so really efficient is yours 
Why would you ever use bold and not specifically codeblocks
Why would you ever use bold and not specifically codeblocks
@slender thistle idk π
set reason arg's default value to None and in the command itself check if reason is None
set reason arg's default value to None and in the command itself check if
reason is None
@slender thistle kk
set reason arg's default value to None and in the command itself check if
reason is None
@slender thistle thank you brother β€οΈ
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: UnboundLocalError: local variable 'embed' referenced before assignment
What does it mean?
K
How do you change a selection's attributes in d3?
@pale vessel hey chip bot how are you sending messages outside of testing channels
element.attr("href", "https://top.gg")
So what is the difference between horizontal scaling and vertical for databases
Does anyone know how to load opus?
Im having trouble setting up my music bot to work with Heroku. It works perfectly fine on my host machine, however, I get an "Opus Not Loaded" error when I run the bot in Heroku. I already have a ffmpeg buildpack(https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git)(https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git) w (https://github.com/dubsmash/heroku-buildpack-opus.git). I also have youtube_dl and discord.py[voice] in my requirements.txt file
Command raised an exception: OpusNotLoaded:
@placid iron Is it strange to have a verified bot while hosted for free on heroku then? π
Isn't setting up opus on Heroku a pain?
(As I'm unfamiliar with the differences, they're both similar to me
)
Not really I guess, heroku just has a few flaws compared to a VPS @vestal walrus my bot is in 660 servers and still on heroku π©
Yeah, I have no idea about Opus tho. It could be that you do need to not use heroku to use Opus, or you just forgot to install something else. No idea
Then how am I getting an opus error? when using ffmeg
Of course, only a socket.io client though @earnest phoenix
@cinder patio so the server can only be node.js but the client can be either node.js or browser javascript
@client.command(pass_context=True, aliases=['p', 'pla'])
async def play(ctx, url: str):
global allcommands
allcommands += 1
song_there = os.path.isfile("song.mp3")
try:
if song_there:
os.remove("song.mp3")
print("Removed old song file")
except PermissionError:
print("Trying to delete song file, but it's being played")
await ctx.send("ERROR: Music playing")
return
await ctx.send('βΆοΈ``Getting everything ready now``')
voice = get(client.voice_clients, guild=ctx.guild)
ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
print("Downloading audio now\n")
ydl.download([url])
for file in os.listdir("./"):
if file.endswith(".mp3"):
name = file
print(f"Renamed File: {file}\n")
os.rename(file, "song.mp3")
voice.play(discord.FFmpegPCMAudio("song.mp3"), after=lambda e: print("Song done!"))
voice.source = discord.PCMVolumeTransformer(voice.source)
voice.source.volume = 0.07
nname = name.rsplit("-", 2)
embed = discord.Embed(
title = f"Playing: {nname[0]}",
colour = discord.Color.green()
)
await ctx.send(embed=embed)
print("playing\n")
@placid iron please stop using heroku π
@earnest phoenix yes
@vestal walrus use code blocks and for code snippets larger than 10 lines use an external service like https://hatseb.in π
@cinder patio aweaome
I'm making a public among us chat thingy
@vestal walrus sorry, I don't know how to fix that.
https://stackoverflow.com/questions/49806427/heroku-deployment-libopus-not-found
One Google search
if not discord.opus.is_loaded():
# the 'opus' library here is opus.dll on windows
# or libopus.so on linux in the current directory
# you should replace this with the location the
# opus library is located in and with the proper filename.
# note that on windows this DLL is automatically provided for you
discord.opus.load_opus('opus')
Where am I supposed to put this?
Apparently this loads it??
I guess in on_ready ?
is there not something similar to once in node in python
Not that I'm aware of, at least
Its not hard to just make a bool to check if it's already been done though
oh yeah I somehow missed the if statement in that snippet
Comments = reduced readability
Confirmed

yea very confirmed
all hail god emperor trump
@earnest phoenix I have GitHub student now so I have 24/7 with no restarts now
Which is nice I guess
you must all kneel and give your children wifes and yourselfs as slaves to our holy roman emperor the supreme Trump
I like the restarts tho. Clears out the cache
And my bot turn on in like 4s so it's not a problem
@earnest phoenix can you not
see pins
π©
Was my point unclear somehow
@slender thistle how much time does it take to get your bot verified on top.gg?
@sick fable a few weeks
Damn π¦
Relax 
K
invalid user 
i love greek pita bread
@quartz ember Development
i need help
discord want my picture id to get verified
will they approve me if im not 18+?
yes
how old i need to be?
13
oh then good
at least 13
Hi !
Do someone know how can I create a "card" (such as mee6 for departures / arrivals with a member avatar, member name... I use python for my bot.
@hasty grove You mean something like this?
This type of images
Oh, got you
(I use embeds for send images, but I don't know how create the image)
canvas 
Well, it is embed.set_image(url=YourInput) for images
Read about canvas, is pretty easy to use
create a template in ps then just fill out everything else in your code, best way to save resources
Maybe this article helps: https://stackoverflow.com/questions/61724373/how-to-make-a-canvas-profile-card-in-discord-python-bot
I need help with discord.py. I've been creating a bot on python, so I wanted to make a canvas profile card with this bot. The problem is, I did not find anything in google about it, only node.js. I...
Read about canvas, is pretty easy to use
@ionic dawn Do you know the best library for canvas ?
lol
let embed = new Discord.MessageEmbed()
.setImage('http://blabla/bla.png')
msg.chn.send(embed)```
@ionic dawn Do you know the best library for canvas ?
@hasty grove huh?
for edit my background image to add the member name/avatar
there's a guide that shows how to make canvas with users img/username etc
give me a sec ill link it
do you have with python not JS ?
OK
I'm looking on https://stackoverflow.com/questions/61724373/how-to-make-a-canvas-profile-card-in-discord-python-bot if it is great
I need help with discord.py. I've been creating a bot on python, so I wanted to make a canvas profile card with this bot. The problem is, I did not find anything in google about it, only node.js. I...
Use PIL but be aware of blocking
this library block the rest of the bot when it works ?
@hasty grove web canvas API is supposed to be used with javascript
there are other, better libraries for python
let embed = new Discord.MessageEmbed()
.setImage('http://blabla/bla.png')
msg.chn.send(embed)
@ionic dawn it's not chn it's channel
this library block the rest of the bot when it works ?
yes
There's a small tricky fucky workaround d.py documentation suggests, though
i smell asynchronous pogeyramming
let embed = new Discord.MessageEmbed()
.setImage('http://blabla/bla.png')msg.chn.send(embed)
@ionic dawn it's notchnit'schannel
@earnest phoenix What?
i was making it shorter
Maybe this article helps: https://stackoverflow.com/questions/61724373/how-to-make-a-canvas-profile-card-in-discord-python-bot
@whole knot I began to look at that it seems see great
I need help with discord.py. I've been creating a bot on python, so I wanted to make a canvas profile card with this bot. The problem is, I did not find anything in google about it, only node.js. I...
Good to hear, good luck! If you need more help I will also look at the article and try to help
you did not specify that you made it shorter
@earnest phoenix isnt msg also, its message
delete packages, reinstall them, make sure you have c++ compiler and python intepreter.
@earnest phoenix isnt msg also, its message :scared:
@ionic dawn you can renamemessagetomsgand discord.js won't care but if you renamechanneltochndiscord.js will yeet bean hammer at ya
unless you extend your message class and when it's contructed, make aliases
As far as I knkw that happend with Canvas 2.6.0 or sqlite
quick.db is fucked up on windows
period

ffmpeg-binaries
Show the last prt of the error
prt
what's the point of the last part anyways
isn't that just a bunch of debug log file paths
what's the point of the last part anyways
isn't that just a bunch of debug log file paths
@earnest phoenix well, the last part shows the pckage that originates the error, atleast when I has those errors
@stuck scaffold izma-native@3.0.8, whats that?
</style>
.titleandvote > a:first-child {
color: red;
}
</style>
``` @delicate zephyr
so?
Try reinstalling that or moving fallback
π€·
<style> </style>
</style> </style> is invalid
how should it be?
Hey π ! I created this server info command. I am just having this doubt that I coded this thing which will show that on which time you joined this server at:-
member.joined_guild._at.strftime("%a, %d %B %Y , %I %M %p UTC")
Will this command work?
Try it and see?
<style>
.titleandvote > a:first-child {
color: red;
}
</style>
``` does not work either @pale vessel
The preview dos not show changed color button
you want it to be like this? https://flazepe.became.gay/b7O-jnRtDh.png
the selector is .titleandvote span. if you want to change the background, it's background-color: red;, not color. color is for the text
<style>
.titleandvote span> a:first-child {
background-color: red;
}
</style>
``` so?
@pale vessel
how do you set multiple classes for the same tag?
can u add hover effects?
how do you set multiple classes for the same tag?
@earnest phoenix commas
a.foo, a.bar {
}```
So I need to replace the spaces here with commas?
.attr("class","notif success_notif");
ok
@earnest phoenix how to make it biggger?
you're just going to be changing the attribute
@earnest phoenix how to make it biggger?
@tired panther size ig
what should i set the background color for error notifications
normal red seems too dark
normal red can be fine if you make the text legible
where can i find the name of the elements?
inspect element
client.on('message', async (msg) => {
const args = msg.content.slice(prefix.length).trim().split(/ +/);
const isCommand = msg.content.startsWith(prefix);
const cmd = args.shift().toLowerCase();
let counter = 0;
client.on('message', async (msg) => {
const chanID = msg.channel.id;
if (isCommand) {return}
else if (msg.author.id === "768011584643268619") {return}
else if (!(isCommand) && !(msg.author.id === "768011584643268619")) {
counter++
console.log(counter);
if (counter % 2 === 0 && counter !== 0) {
client.channels.cache.get(chanID).send('yeet').then(() => {
counter = 0;
console.log("new: "+counter);
})
}
}
})
hi so i have this
hmm
and for some reason when i send 2 messages
the counter goes like this
but why does this happen
the second 1 comes outta nowhere
ignored
good luck mate
i removed that
add everything inside the first event to the second one
I just deleted the 18000 line stylesheet I stole from discord
gtg use ahk window spy to see discord's color stuff
xd
client.on('message', async (msg) => {
const args = msg.content.slice(prefix.length).trim().split(/ +/);
const isCommand = msg.content.startsWith(prefix);
const cmd = args.shift().toLowerCase();
let counter = 0;
const chanID = msg.channel.id;
if (isCommand) {return}
else if (msg.author.id === "768011584643268619") {return}
else if (!(isCommand) && !(msg.author.id === "768011584643268619")) {
counter++
console.log(counter);
if (counter % 2 === 0 && counter !== 0) {
client.channels.cache.get(chanID).send('yeet').then(() => {
counter = 0;
console.log("new: "+counter);
})
}
}
its stuck at 1 not 0
idekwhy
put the counter outside the event
oh
it'll always be 1 https://flazepe.became.gay/yrZ7c1GU1V.png
nice
yea i just realized
your bot requires administrator for one of its commands
I saw admin perm is in most declined reasons, what is t means?
@gray river the bot asks for admin even tho it only needs one perm
admin gives all perms
so there's no point in giving admin
and the bot might use it badly
So i cant create a command that requires admin perm?
@gray river admin allows users to bypass some stuff so if you really really REALLY need it then you gotta explain why
that's allowed
@gray river admin allows users to bypass some stuff so if you really really REALLY need it then you gotta explain why
@earnest phoenix such as?
channel overwrites
literally what Minh said
Uncaught ReferenceError: d3 is not defined
at <anonymous>:1:1
discord noobs they don't use d3
yes I'm hacking into discord's stylesheet because yes

Is cloudflare down?
Β―\_(γ)_/Β―
so when you guys say cache the guild prefixes, you mean like locally save to a JSON or something else?
JSON Database
Is this bait?
Mongo DB for actual storing stuff but reading from that on every command invoke is pretty expensive isn't it?
Hardly when comparing it to an serializing and a IO operation
hmm so how would you go about caching the prefixes in python 
Cache would imply keeping it in memory
my bot dont play music why but Δ± set it
But synchronized with the database preferably
I'm not approved for priveleged intents so I can't use the guild member events in v8?
is there a way to remove al falsy values from an object?
v8 of what
i see, i just see most people saying here it's better to cache guild prefixes but wasn't sure how they were even doing that 
discordum
v8 seems fun
waiting for d.js 13v so we can cache the amount of atoms in the sun too
is there a way to remove al falsy values from an object?
@earnest phoenix someone who knows JS maps will reply to this. I'm sure of it
is there a way to remove al falsy values from an object?
so if i have an object:
{
yeet: "yeet",
lol: null,
potato: NaN
}
it becomes:
{
yeet: "yeet"
}
my keboard sees to be havigna bad ie today
leme go reload the pae
Can you use .filter on maps?
for(let [key, val] of Object.entries(OBJECTHERE)) if(!value) OBJECTHERE[key] = undefined```
300 iq one liner


that wouldn't shrink the obj though right
yes, though cuz its undefined it should be fine
for(let [key, val] of Object.entries(OBJECTHERE))
if(value) OBJECTHERE[key] = value
to make it true
oh yeah
Where is that one guy who recommends maps for everything
for(let [key, val] of Object.entries(OBJECTHERE)) if(!value) OBJECTHERE[key] = undefined```

for (let property of object) {
if (!property) delete object.property;
}

idk, what's the map solution here
its basically a 2.0 object/array with an index
technically this won't work right
maps are super handy
it will
doesn't map make a new array with elements from the previous?
object.property this will alwas remain the same
no duplicates, can be referenced, has handy methods, has indexes, can have any value, that shit is like VSC when you are in the a place full of notepads and N++'s
@earnest phoenix you could do this
lemme try shiv's solution first
for(let [key, val] of Object.entries(OBJECTHERE)) if(!value) delete OBJECTHERE[key]```
wdym shivs solution
he copied my snippet
heheheh

not really
shhh

sssshhhhhhhhh
that didn't work lol
witch?
with?
l = {1: "a", 2: "b", 3: "c", 4: undefined, 5: null, 6: ""}
for (let [key, val] of Object.entries(l)) if (!val) delete l[key];
Object { 1: "a", 2: "b", 3: "c" }
erwin's solution
you guys suck at spoonfeeding 
undefined definetly works cuz ive used that nasty method before
@opal plank don't really remember
i havent tried removing properties on a whimp like that though with the delete
one thing, JS requires let on variable decl
eww global scope
RBRAVE JSUT FOFIVE MNUTE WO PROPERLY AD SOP UCIGN MY KEBOARD
@earnest phoenix i was trying to say BRAVE JUST FOR FIVE MINUTES WORK PROPERLY AND STOP FUCKING MY KEYBOARD
i use Regex for command parsing, i use EmbedBuilders, i use VARs, i like forEach() loops, and i take screenshots of my code with my phone
i use Regex for command parsing, i use EmbedBuilders, i use VARs, i like forEach() loops, and i take screenshots of my code with my phone
@opal plank says the guy who yelled at me for VARs
no
I got 180 score in my "Programming Knowledge" IQ Test
if the joke didnt get thru, the avarage person iq varies between 85-105
That's the average?
oh btw i didn't tell you why i needed to remove all falsy values from an object
this should tell you:
<press F12 and clicks on any message>
<goes to console tab>
$0.style
i think imma go for more drunk coding
@pale vessel green and red both look disgusting

i hate the colors, ngl
as a Pythonisteer, I rate it very ugly and non-functional
it's the vsc atom theme

rate how ugly this typescript porn is
@earnest phoenix that actually looks cool
it's for IPC communication
it's the vsc atom theme
@earnest phoenix time to send mail in the poop to github
(yes mail in the poop)
i love typescript generics

i took a bit of a different approach with IPC since im communicating with c# so i get to take advantage of the super powerful tasks and threading api
i love typecasting shit as unkown then as thing, shows a complete lack of proper interfacing when importing your types and promises

Imagine using dynamic datatypes
imagine not doing 19 pipes long types for different types of data
imagine try/catching your own function
data: type1 | type2 | type3 | type4| type5 | type11 | type12 | type13 = await something
i would rather not do frontend tbh

im having fun with my twitch ddoss project, thank you
speaking of which, i cant login on my host

im having fun with my twitch ddoss project, thank you
@opal plank does your Twitch account that owns the token have PII in it?
front makes me want to rip my hair out i spent a good chunk of my day yesterday trying to figure out why my flexbox alignment wasn't working
...my container wasn't a flexbox
It's simple
cant login with neither powershell nor putty
Twitch DDOSsed you back
...my container wasn't a flexbox

thats not even twitch doe
NEW CHANNEL:
https://www.youtube.com/channel/UCEjwgKUADCmMzhGHrlueKYw
This channel will become inactive in a few weeks. Thank you all for watching :)
thats me host
the worst part is: it was working at the morning, i left it on while i took a nap, woke up, boom, gone
no changes at all
4h and it went from working to non working

thats how it works ig
When you have sudo apt full-upgrade -y in a cron tab 
when you compile everything yourself π
@restive furnace Are you saying you don't use APT?
well gentoo is what i use sometimes when im bored and have lots of time
fixed my keyboard
the usb cable was loose
(it doesnt use apt tho)
how do i force the HTML layout to put element Y on the right of element X
css float property
time to read MDN

Or use the deprecated tag <center></center> 
flexboxes are OP ngl
flexboxes are life
yay
or, rather,
l
i
f
e
flexboxes are boxes
they're not life
you are about to become a squishy box if you don't shut up 
Just asking,
Is it an API abuse ?
setTimeout(async function() { res.daily = false; res.save().catch(error => console.log(error)); }, 86400000);
24 hrs? no
yes
the data you store lol
oh
So is it an api abuse or not lol?
etc.
So is it an api abuse or not lol?
@balmy anchor dont think so
so i need to put heroku?
everything that you store from discord needs to be written in that box
k thx
nono, the stuff you store
bruh
I store user Ids
didnt you make the bot lol
idk what i store
what does your database store
ok
then say that
ty lol
is it only the data related to Discord or something else?
yes
ye
read the last one
You don't have any database ur using?
ahh
You don't have any database ur using?
@balmy anchor no
no
k i guess
economy system?
no
tooth repairing?
lmao
You need to say anything that uses discord things
oh so 1 more question
How come custom prefixes work without storing GuildID?
How come custom prefixes work without storing GuildID?
@restive furnace ohhh, i see
so basically, userids, guildids etc
can someone please help
How come custom prefixes work without storing GuildID?
@restive furnace magikck
πͺ
im scared i will mess things up
-verifybot
Hi! It seems like you are looking for information on how to get your bot verified.
Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.
If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.
We cannot provide support on how to get your bot verified.
P.S. read the last bit
oh
sorry
what if i dont understand a question there?
can i ask?
@slender thistle
put it in ``
it'll still get detected
is it something for me?
yes
if yes just dm it
ty
π join the auctions gang and never bid, cry

why do I always see a d20 in discord dev's logo
Same tbh
-verifybottr
trying is what matters
Fetching messages for 272764566411149314 between undefined and undefined.
awesome
-> $0.style.font
<- ""
but $0 is my message???
@opal plank hey Erwin, sorry for the ping, i just wanted you to know, my bot is getting verified, and i think its only because of you, and i think you didnt even notice, you helped me so much, i had to say ty,
i will never forget you.
@abstract coyote set the background-image property to the body element
thanks!
Ok broken tooth i know i don't have anything to do with it but that was very moving c:
βΊοΈ
I'm getting this error. it was working this morning and now it doesn't. I didn't change anything in the code.
HTTPError [AbortError]: The user aborted a request.
at RequestHandler.execute (/root/heimdallr/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
code: 500,
method: 'get',
path: '/gateway/bot'
}
yo gamers
@abstract coyote he saw it
how do you change the position of an element relative to its container in d3.js?
@pale vessel help me daddy
i have this in the HTML:
<pre>
<!-- nothing inside yet-->
</pre>
this adds the element:
d3.select("pre").append("p");
but i want to move the appended element to the above of the container <pre>
add a class or change the style attribute or something
@pale vesselselection.style("position","top");?
how could i change the detailed description section's background?
css
yeah ik but which bit am i styling?
how could i change the detailed description section's background?
@abstract coyote pressF12on Chrome, find the div element for that section then use the class of the div element in your CSS
What should be the code for my bot to automatically get the server invite by typing a command?
no one is going to spoonfeed you
Lol k
why ain't d3.js changing the styling when i do .style("position","absolute");?
it's changing all other styling properties i say but just not this one
sloth,
first check if the guild has a vanity url (https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild.vanity_invite)
if not, then either create an invite (https://discordpy.readthedocs.io/en/latest/api.html#discord.TextChannel.create_invite) or take the first existing invite (https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.GuildChannel.invites)
cry is (no longer) typing...
i'd help you but i never used d3js
f
@pale vessel daddy i need help again
with
why ain't d3.js changing the styling when i do
.style("position","absolute");?
it's changing all other styling properties i say but just not this one
thonk
i just realized i can do .attr("style","my shit") 
yea
just the css
easier
change the style attribute or something
oh i did say that
still not working 
IT'S NOT EVEN SETTING THE FREAKING ATTRIBUTE
time to workaround it by using an external CSS stylesheet
const market = await fetch('https://ro-webserver.herokuapp.com/items', {
headers: {
authorization: 'lol'
}
}).then(res => res.json());
const items = market.filter(x => x.buyable)
.slice(amount - 5, amount)
.map(x => `${x.emoji} **${x.name}** β ${x.price} \n ${x.description}`)
if (items.length <= 5) page = 1;
else if (items.length <= 10) page = 2;
else if (items.length <= 15) page = 3;
else if (items.length <= 15) page = 4;
else if (items.length <= 15) page = 5;```
how can i do this easier?
hm
time to workaround it by using an external CSS stylesheet
@earnest phoenix you can just style a class
switch statement
add the class to the element on click or something
@earnest phoenix you can just style a class
@pale vessel that will style every single thing and i only want to do it for one...
ok so this is what i'm gonna do:
if there is already a global variable remove the id from it
send notification to user
set a lts_notif id to it
make it a global variable
repeat every time the function is run
yeah i know epic markdown code block styling on plain text
the external CSS stylesheet will control the styling for that specific IDed element
yes IDed
Is there a way to log IP's in HTML, I am maybe going to sell stuff, and I would like to stop scams.
no
Can I import a function?
that can do that
HyperText Markup Language
use a backend
^
it's for making the webpage if you want to do that logging stuff use smth like JavaScript or PHP
haha
anything on the frontend can be edited and disabled
the user has the right to do so
anything on the backend cannot be
also please put it in your privacy policy why you want to log IPs else karens will wreck you
and where you're storing them
if you're mining using their browser, tell them too
i don't fancy having my IP leaked by an insecure quick.db hosted on repl tbh
if you're mining using their browser, tell them too
this
a user expects just a site
not mining, not an ip logger etc
it's actually against the law in so many countries to do it and not notify the user of it
the entirety of EU disallows that iirc
if you can get sensitive shit from an ip why is it public
you tell me
cuz u need it to connect to things
can you change the container in which the element is in?
like if element #p is inside the first pre element move it to the other pre element
via js
because this is what's happening rn
via js
@earnest phoenix yeah d3.js
i know there are DOM methods
or normal js will work fine
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/before &
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/after
The ChildNode.before() method inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.
wowza
that's actually not what i wanted but it's a lot better than my current method of doing shit
my dashboard is 35 mb so far
is that too much?
@drifting wedge yes
if you don't have a CDN it's too large
so i should get a cdn?
yes
how much per page
1 mb?
i will ig
why not lol
but it loads fast
we just have like a fucking huge dashboard
like its 5k files
lol
too many assets
ill use arc
yep
free munies too
total size of a website is not relevant
what matters is the size of each page, how long it takes to load each page
idealy, every page should load in less than 2 seconds
it's why people use SPAs nowadays
a bit of a slower initial load however there's no delay loading other pages because of SPA routing
@quartz kindle it loads pretty fast
so should be fine
ill get a cdn cuz why not
Does someone knows how to appendfiles in JS? (Without the module, since I am not in a node.js project)
Or is that not even possible?
So, I tried coding the bot which can automatically get the invite of the guild but i failed in it
I am sending the code
invite = await guild.create_invite()
dont do it
@earnest phoenix what are you actually doing, cause it seems like an http://xyproblem.info
Asking about your attempted solution rather than your actual problem
@earnest phoenix what are you actually doing, cause it seems like an http://xyproblem.info
@earnest phoenix ?
what?
I am trying to appendfiles
@drifting wedge its a command that does it
@drifting wedge its a command that does it
@misty sigil you can def do it, but u need to make it disclosed
why, what are you doing
I am trying to save error logs
sry go on
\















