#development
1 messages · Page 1608 of 1
The V8 engine does the all of the work, I'm pretty sure all major javascript engines use JIT, otherwise they would be super slow
what theme is that?
Savi theme for atom
destructuring in js provides no benefits other than casting Array entries/Object properties to variable names in the scope you're destructuring them in. They are efficient, though as destructuring does not duplicate the data and instead creates a reference to the destructured element.
How modules work is that the entirety of the file is loaded into memory in the require cache and then compiled. (The method is called Module._compile so yes it's compiling) As such, you cannot partially require a module.
Because the one on the left is negative and the other one is positive
just... don't make the left number negative by removing the minus?
You should probably look at your logic to see if it makes sense for them to be opposite signs
if it does make sense, then yes. Use Math.abs
idk my logic is messy
Well. What are you trying to do
idk myself wait

const alphaString = 'abcdefghijklmnopqrstuvwxyz'.split("");
const numericString = '0123456789'.split("");
lol(text,number,reverse = false) {
let txtArr = text.split("");
return txtArr.map(char => {
if(alphaString.includes(char.toLowerCase())){
let i = char.toLowerCase().charCodeAt(0) - 97;
if(reverse){
return getOppositeCase(char,alphaString[Math.abs(25 - i) % 26]);
}
return getOppositeCase(char,alphaString[Math.abs(i + number)]);
} else if (numericString.includes(char)){
let i = parseInt(char,10);
if(reverse){
return numericString[Math.abs(9 - i)];
}
return numericString[Math.abs(i + number) % 10]
} else return char;
}).join("");
}```
I need to fix this
I understand everything I'm reading, but I'm rather lost 
First off, what are you trying to do, the function name doesn't help
getting the opposite char
a = z
b = y
and vice versa
if reverse is true
if reverse is false
get a + number
ex -> a+1 = b
b + 3 = e
Couldn't you just get the index of the current character in the alpha array then subtract that from the array length and get the character at that index to be the opposite.
that is what I am trying to do
If you want to see cursed code
I can write some PHP code that will make your dick retract inside your body
Ever heard of variable variables?
$$h="hello ";$w="world";echo$hello.$w;```
const chars = string.split("");
for (const char of chars) {
const index = alphaChars.indexOf(char);
const opposite = alphaChars[alphaChars.length - index];
}
This prints "hello world"
just an example of what I was thinking
That would be the sanest way to do it
Nope
does it support negative values ?
😂
just reverse
That's not hard to do
you don't even need the alphabet array, you can use the char codes
hmm
// For lowercase only
const a = 97;
const z = 122;
const text = Input.toLowerCase();
let res = "";
for (const char of text) {
res += String.fromCharCode(a + (z - char.charCodeAt(0)));
}
For this you'd just do:
// Again, lowercase only
const charCode = char.charCodeAt(0);
res += charCode === 122 ? "a":String.fromCharCode(charCode + 1);
Thanks
Guys I need help (discord bot py), I have issue
tell me boi
https://i.callumdev.pw/unyed.png
Why is this not working? Sometimes it works, other times it does nothing at all
Hey so how many messages can the bot delete at once without it breaking any rules
sorta forgot and just want to double check for my clear command
there isnt any "rules"
bulkDelete is limited to 100 msgs
100
ok tyy
and 14d age
14d is the oldest you can delete via bulk
after that you've got to delete them individually
oh
so would it be ok if a user uses the command after a message is pretty new like a day old
yes
sweet thank god
tysm
File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\core.py", line 71, in wrapped
ret = await coro(*args, **kwargs)
TypeError: ban_error() takes 2 positional arguments but 3 were given
The above exception was the direct cause of the following exception:```
i got this error from an error lookout for my command? im a little confused why as it doesnt error and should work properly
and not sure why its giving 3 instead of 2?
you gave more arguments than needed
well im not too sure why
what's your code?
want me to supply the code?
nvm
will do
@has_permissions(ban_members=True)
@commands.command()
async def ban(self, ctx, user: discord.Member, *, reason=None):
"""ban specific user from the server"""
await user.ban(reason=reason)
await ctx.send(f"**{user.mention} has been banned**")
#checks for ban
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.MissingRequiredArgument):
await ctx.send("Please provide an valid user to ban. e.g. !ban <[user]> <[reason]>")
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.BotMissingPermissions):
await ctx.send(f"{commands.BotMissingPermissions}")
#end of ban checks```
theres the checkers (what i call em) for my ban and the ban its self
@pale vessel
oh my bad i didnt even see it
i made most of this at about 2am haha
ill try it without the self
you're overriding your first error handler btw
am i?
and also yes you're missing self
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.MissingRequiredArgument):
await ctx.send("Please provide an valid user to ban. e.g. !ban <[user]> <[reason]>")
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.BotMissingPermissions):
await ctx.send(f"{commands.BotMissingPermissions}")```
ban_error is just gonna override / shadow the previous ban_error
ahhh ok
just move the second instance check into the other if block using elif
never thought to do that, tyy
so i added an else but the secind ban error says its not defined, is that supposed to happen and should i delete the @loud warren.error @modest maple
sorry for the ping
whats your new code
#checks for ban
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.MissingRequiredArgument):
await ctx.send("Please provide an valid user to ban. e.g. !ban <[user]> <[reason]>")
else:
@ban.error
async def ban_error(ctx, error):
if isinstance(error, commands.BotMissingPermissions):
await ctx.send(f"{commands.BotMissingPermissions}")
#end of ban checks``` I tried using the elif but it kept giving me an error so i decided to use the else statement
okay but thats not valid python code
oh ok,
when i said add it on to your existing if block using elif i didnt mean add a random else
i mean remove the duplicate function and just use elif
tias
tias?
try it and see
ahh ok
my bad
well
elif:
isinstance(error, commands.BotMissingPermissions):
await ctx.send(f"{commands.BotMissingPermissions}")``` i ended up with ehis and 2 errors with the collons and the await statement
so that didnt work :/
Is that valid code?
what the fuck
why is it not indented
idfk i just woke up 
thats like the least of the issues 
Bro your srsly gotta know atleast the core of python
im not even asking for the basics
i know a little python but can kept learning it
im just asking you know the fundamentals like indentation, if blocks basic comparisons
i know really how to make an print but somehow made the code read jsons but i cant do a single fucking error handler properly
:/
I mean this is very very very very very basic python
this is pain.
pure fucking pain.
but somehow
every single dude not knowing python, js, java etc
makes a fuCKING DISCORD BOT
pure luck
if ill be honest
i should definitely learn more python or i can keep tourturing the development community 
i mean the only one you're hurting is yourself 
you are coding on your phone..?
no
my laptop
but i use sololearn to learn languages on my phone
pretty good app imo
this is me rn
hmm yes i too look like an 2d 360p jpeg
SoloLearn is decent enough but you want to apply plenty of practice on top of theories
ye ik idk why theres hate for it
its a really good app and allows you to share what you learnt etc
embed image doesn't support imgur images or it's a simple bug?
im pretty sure it does, it may be a bug
as its an image/gif
which embeds support
so its gotta be a bug
anyone else having odd issues atm
out of 48 shards, we have one where discord are reporting it connected fine, giving me normal looking GUILD_CREATE messages with unavailable = false
but for a bunch of servers on that shard, the bot shows as offline
does discord always report local outages correctly, or is it as flaky as we've come to expect from discord
@green kestrel i havent been having any problems but discord should be fixing it and should be dealt with in a day or a few hours so i wouldnt worry toooo much but should stil worry a tiny bit
if your losing users etc
fair enough, have you looked on discords status page for anything that may cause it?
it's a small enough percent of my shards that I wouldn't have known if someone hadn't told me
especially as my dashboard logs the shard as online and a-ok
ahh ok i see
nothing on Discord status page but nothing new there, their status page is shit
it's manually updated with incidents
lol
true, try reporting the bug somewhere you can get some sort of quick reply
as it is something to do with discords servers
ive asked on dapi and ddevs servers
to see if its something that can happen
ive never seen it before
hmm any responce?
true lol
where you at?
uk or?
anyway i wish you luck
and the shards shouldnt (hopfully) take too long to get back up and working from discord
Discord having issues as always
mhm
I have guilds that repeatedly send me GUILD_DELETE every 30 seconds
damn so its a huge issue eh
at /home/container/node_modules/passport-discord/lib/strategy.js:108:32
at passBackControl (/home/container/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage.<anonymous> (/home/container/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (events.js:326:22)```
Is it normal ?
It happens sometimes
discord™️ or something idk
@green kestrel does that happen in a "normal" guild? Because bots are broken in servers with too many bots
got reports from another cluster now
this is becoming a major issue :/
yeah these are "normal" guilds
I’ve seen a few issues relating to guilds lately
how are they broken @quartz kindle
wtf is discord doing
Does the issue persist if you kill the shard and reidentify?
yes
ive restarted whole clusters
and added logging code to log if i receive a server with unavailable = true
im not getting any of those
Guilds with too many bots are conpletely broken, you receive delete events repeatedly but your bot never leaves them, all requests return api error, you cant even leave them yoirself
Are you looking for unavailable:true in guild deletes also?
Does somebody knows the issue ?
nope
would that be the case for these broken spam deletes?
Yes
im logging kicks, not seeing any excessive number of kicks
is this part of their plan to make it so people cant have more than 50 bots in a server @quartz kindle
are discord even aware of this issue
They said it would be fixed when the role changes are apllied
whens that?
Idk
I think they did, let me check
not as bad as when they changed channel ratelimites 
they only announced it when everyone complained
On another note, a couple days ago we announce some changes to bot roles and the max guild roles (https://github.com/discord/discord-api-docs/issues/2616). These changes were originally scoped for March 12, but we're going to be moving those changes up to next week due to infrastructure reasons.
i think this is related to the guild deletes issue
Not sure if also to your issue
Log delete events with unavailable true, aka the "guild became unavailable event"
the servers with the issue just inexplicably came back again
no idea what it was
lol
While this change affects a very small number of guilds
lol, in discord terms this means "theres going to be thousands"
like how only a "small number of bots" would need verification 
xD
tbh thousands are a small number to discord
millions and millions vs a few thousand is pretty minor
I don't know how reasonable this is but where would be a good place to sell a bot. Like an executable version for you to buy, download and run yourself?
It's best to join fiverr or upwork and sell custom bots there, nobody's going to buy a random executable
do you guys know how to fix 'Fontconfig error: cannot load default config file'
I think small for discord is something different
Im just using regular sans-serif trying to do something in canvas
install fontconfig (apt not npm)
I see what you mean. That's fair. The idea here is that it's more of a modular system/framework that allows you to compose a bot with whatever configurable commands you want via a plugin system. That would require you to host it yourself tho. Where would it get some eyes on it tho
If you want to sell an application that makes the discord bots, then as Tim said, you could put it up on steam
they are mostly just money bait
Im using apt-get install but it says Im not root
Note that there's a 100$ fee if you want to put it on steam so be sure that you're going to make those $100 back
Its not so much a plain maker. More a skelleton to build/add to
just put it on there for 10$
lol
and give people a reason to buy it
lol
I will never buy it
personally
do you have root access? if so, add sudo before the command
nope I dont have root I forgot about sudo
fair enough. Cant expect everyone to buy it. If you can code one yourself, then you're not quite the target audiance anyway so that's fine. Thanks for the feedback tho. My bad. Wrong reply
Isn't that only for games?
.io games intensifies
whats your operating system?
I downloaded a font and the font works but it still says Fontconfig error
like canvas uses the font I downloaded but it still throws that error in the console
you said you were using sans-serif
I used sans-serif and it didn't work and threw the exact same error in the console
now I installed bebasneue.ttf and that one works but it still throws an error
and you registered with registerFont?
yep
dont mind the return
I was just testing something but it wasn't there in the original code
yeah I double checked, no other font other than bebasneue
then im not sure if there is anything you can do
just ignore the error and move on
the font is working right?
yeah
so yeah
thanks for the help
@static hornet if you're doing this don't sell the executable. you're asking to be pirated. sell it as a hosted service with a monthly fee and don't let end users anywhere near anything they can self host
i mean, piracy can be a good thing
I'll give you a compiled executable of my bot if you want lol
many indie game developers got explosive popularity thanks to piracy
even went as far as thanking them
it's huge and useless without a configuration file and database
@quartz kindle depends, but I don't see it being such a good thing if you want to make money out of a bot
how huge is it
you wont make money anyway if your product is not popular
piracy is free advertising
well not free
@misty sigil 137mb for module and 55mb for core
how long does that take to compile
10 mins
what hardware
trivia bot build from clean new benchmark 👀
most of the size and compile time issues are because of header only libs
some SMRT person thought it clever to put all implementation in the .h
so every reference to it is 50k extra lines to compile
🧠
i made my compile times 10x faster by adding a small script that copies all the text from the cpp files into a single cpp file before compile
xD
damn
Well then there will be issues with configuration, which is the whole point.
just make it a self service system
where they can configure their own bot and set their config
large brain
it feels stupid tho
lol
i get more performance increase with the opposite, make -j8
parallel compilation
took so much time to separate the files only to join them together again because compile time became horrendous
i just cargo build --release 
yeah, but youre not actually compiling 😉
i could speed up my compiles hugely by making a wrapper class around aegis
the minute i introduce aegis.cpp into my build compilation of a cpp file goes up from like 30 secs to 5 mins

if i shielded it from the rest of the code with some class wrappers, they wouldnt need to directly include aegis
my thing relies on pretty large dependency, so splitting it in multiple files made each separate file require the same dependency again
@modest maple my build process is:
make -j8
or if i want to do a build from clean, before the make, its cmake ..
does it re-compile the dep for every time it's referenced @quartz kindle ??
i love cmake.
but its included in the headers
and each separate file requires the same headers again
// myheader.h
#include <libheader.h>
// file1.cpp
#include <myheader.h>
// file2.cpp
#include <myheader.h>
// file3.cpp
#include <myheader.h>
each of my files no matter how small it is, takes like 3-4 seconds to compile because of this
quick question is there something wrong with this code it's supposed to draw my avatar but it doesn't work
Canvas.loadImage(parameters.message.member.user.displayAvatarURL({ format: 'jpg' })).then(
avatar => context.drawImage(avatar, 25, 25, 100, 100)
);
are you sending the message from inside that .then() also?
no
then thats the problem
how would i get rid of the already made help comand inside disocrd.py as i want to make my own but it wont go away. ive tried py client = commands.Bot(command_prefix="!", case_insensitive= False, Help_command = False) (if that helps) but it still wont go away
are you sure? Im just doing context.drawImage(avatar) thats the only time Im using avatar
a.then(() => {
b // this happens after a while
})
c // this happens immediatelly
I did that already its the package, im using a almost same one thats working now bro but still thx
if discord removes image metadata then how can someone store encrypted text in image metadata ?
how can this happen ?
it removes meta data that can identify a user
so if I store abcd = uwu metadata then it won't remove ?
Steganography is the practice of concealing a message within another message or a physical object. In computing/electronic contexts, a computer file, message, image, or video is concealed within another file, message, image, or video. The word steganography comes from Greek steganographia, which combines the words steganós, meaning "covered or concealed", and -graphiameaning "writing".
- Wikipedia
the image doesn't have metadata
there's a message hidden inside the image using Steganography
It is not metadata
hmm
Look up different methods of Steganography and you'll probably find out ^^
Steganography ( (listen) STEG-ə-NOG-rə-fee) is the practice of concealing a message within another message or a physical object. In computing/electronic contexts, a computer file, message, image, or video is concealed within another file, message, image, or video. The word steganography comes from Greek steganographia, which combines the words s...
Read this
Discord deletes sensitive metadata iirc
geo tags for example get yeeted
yo I can upload chicken pictures at peace now
so if you edited an image with photoshop, it will be in the meta tags
nvm I'll just use another Steganography lib
Heya! We do strip some data (EXIF geocoding data mostly) and run the images through our resizing player to hide your IP!
This is from Discord's Twitter
don’t hide my ip that’s a bit boring

How can I use Font Awesome font on canvas? I'm doing registerFont, but I get an error that the pangoWarning font could not be loaded.
ctx.fillStyle = "RED";
ctx.font = "50px Font-Awesome"
ctx.fillText("", 350, 100)
iirc does canvas even support otf? or does it support both otf and ttf
yes it supports.
i've saved other fonts before.
are you sure that's the font name
isn't it FontAwesome
without the dash
(I get that it’s outside of the cog but it still errors inside or out) I’m writing an custom prefix command inside my utility file and it’s erroring?
imagine print screen button
I can’t really use discord as my pc will slow down a bit due to the fact my laptops shit
And it can only handle google and vsc
use browser
dot dot dot
Since you all love screen shots
it's easier to read
dot post atMods pls ban
well, if you want coding help we first need to be able to read it
You can tho
and screen photos are kinda jagged
Yeah yeah ok then
nonetheless, looks like ur def indentation is wrong right before "with"
all I can see from that is a red line under the word json
also, what's the error?
Bruh
bruh
Read the text above my image
can barely read it
can you screenshot?
Fine give me a min to login on my laptop
yeah, I don't think ur console is saying "(I get that it’s outside of the cog but it still errors inside or out) I’m writing an custom prefix command inside my utility file and it’s erroring?"
console error please
How when I haven’t ran it?
run it then
I can’t because it won’t let me when it errors
I’ll show you when I login
Give me a min
here
@lyric mountain
def get_pref(client, message):
with open('prefixes.json', 'r') as f:
prefixes = json.load(f)
@commands.event
async def on_guild_join(guild):
def get_pref(client, message):
with open('prefixes.json', 'r') as f:
prefixes = json.load(f)
return prefixes[str(message.guild.id)]
return prefixes[str(message.guild.id)]```
yeah, fix that def before with
so replace the def with an 'with'
no
or the other way round
can firebase hosting be used to host, discord bot?
its erroring at the json
indentation
bruh you stupid as
am i?
When you don’t listen then clearly
your code is clearly saying the error is there
My lord
lmfao this guy is calling him stupid even tho the error tells him exactly that
dude you know that Kuu is right?
great now it wont let me send screen shots
You need to know the basics of Python before you start programming bots
starting with indentation
okay, well thats better but still indented wrong
and that looks like it's and error because json isnt in the namespace at first glance
but again you're sharing so little of the code we cant tell 
because different files have different scopes...
show the whole file
also probably wanna cuz the sarcasm because we're the ones helping you and we have considerably more experience than you
just a thought 
and as cf8 said, that still wont work due to wrong indentation
im not going to show you code i dont need to when the code in the ss is the code i currently have writtent for the command @lyric mountain
so you want car assistance without showing the car?
lol
btw, what cf8 meant
Plz help my car doesnt work, but you cant see the car
Today on "how to spot a 5head"
lul
imagine going to the doctors because youve been coughing, but you conveniently didn't tell your doctor you smoke 2 packs of cigs a day
you can't pick and choose what to show if you expect proper help
nobody wants to steal your garbage code
Its just a lack of basic python knowledge
like the fact that different files have different variable scopes
or the fact that indentation matters 
without bothering to learn the actual lang
how many times does it have to be repeated until people understand to not make a discord bot as their first project?
Hello yes pls give me working bot for free
what do you mean i cant have a stroke on my tab key??????
hey guys!! im new programr (sry if english is lilt bad) can u help me find hte rro rplease?
@commands.command(name='booba')
async def anime(ctx=None):
guild = ctx.guild
def is_guild():
if isinstance(guild, discord.Guild):
return True
embed = discord.Embed.from_dict("cutewaifus.json")
if ctx.guild == guild:
if is_guild():
try:
await ctx.send(embed=embed)
boobie anime hihiehehe 🤤
yo
heres the 'car' you asked for
that code is what it feels like to see someone who didn't bother trying to learn the programming language try to code a discord bot
not the 'car' we wanted, thats 'part of the car'
also
can anyone here help me with portzilla
docs
you asked me to send a ss of my full screen so
lmao
I would advise you to learn Python before trying to make a discord bot. It's hard to write a book in a language you don't understand
bro i know how to im not sure why this is erroring tho as everything is good and should be ok
Everything is not good
It's really not though, you have an event indented into a function, for one
Issues:
- Empty function with nothing beneath it is a syntax error
- commands.event isnt a thing
- get_pref is defined a new event every time its called
- the on_guild_join is never used
- you shadow your event handlers
there's more that ik is wrong
but you dont explicitly show it so 
i said im stil coding it holy shit
i mean ill keep adding it
It's because not even VSC knows what you're trying to do
did you actually expect to come in #development with flying colors expecting a neutral outcome? lmao
- Dont import json in the file
- Mess of functions
- Missing self
i can go on
but
i think the initial list is enough for now

i came here to get help not to get fucking told to go learn this or that just over a simple error that doesnt show up in my bot.py file
ill happily show you
what i mean
I mean you're demonstrating a lack of willingness to learn
and the fact that your code is an amazing example of what happens when people lack that prior knowledge
First of all, it's not a simple error. And we're simply telling you to learn proper syntax, because people won't write your code for you.
i don't think throwing swear words at us is going to help prove your case here Carpal
Ive given you a list of errors in your code, they're not hard errors they're very basic and you should know how to fix them with basic python 
if anything you look like a bigger asshole than we're trying to give you constructive criticism
I get that but I don’t want to have 4 people just poking fun and telling me to go learn this and that etc
and
Its the fact that you put
Just forget it
lol
you clearly do
bye
cya
look, first fix your syntax issues, that's the major error in ur code
So many syntax errors 
THEN you can focus on other stuff
looking at his code he's essentially making a purge command
or atleast what the code he's written is attempting todo
or his naming is just so random he's called a ban command clear
through a listener event?
Actually why would it read an prefixes json for an purge command?

fun moments https://i-love.helper.wtf/cBrft5L.png
Hello a few weeks ago I lost my account because of the A2F and as I lost the account I also lost my bot and I wanted to start again I had made a description that took me 1 week and is there any way to recover at least the description that I took 1 week to make it please the bot that I lost is called Ripa Topa.
NYOOM
It doesn’t make sense no?
no
nope
none of the code makes sense but continue
atleast is uses indentation 😔
lmaoo
Didn't look bad at first glance and was the first thing that came up when googling "python tutorial" lol
if it didn't get declined, MAYBE you can ask the mods if they can recover it for u
Heres the list of stuff carpal is gonna run into:
- Removes the prefix shit cuz its not neeeded, maybe doesnt get a parsing error
- Then he'll be stuck working out why his error handlers dont work
- Because shadowing™️
but if it was declined then you're in deep waters
Okey thanks
When you pay 600 euros for books and end up using w3schools your whole study
when you pay 1.2k for uni only to get a piece of paper so you don't get filtered out in job applications 😔
you paid money just to fake a degree? 
a degree isn't fake, it shows that you actually know what you are doing
and it also shows that you are able to learn
unlike those people in here who use botghost
lol
lol yea
well, idk about you but the amount of graduates i end up having to teach python or computer science is concerning
and im 17 
this is why scholarships are big time
you can make bank as a freelancer if you find the right audience
dont be a fool and neglect em
LOL
I only know javascript
same

but barely even know that
sneaker bots, scummy sure but very profitable
imo full-stack seems to be the ideal future of CS programmers
that's what every job seem to want now
meh
imo thats dumb
You have the decent jobs then you have the shitty jobs
but they dislike that
devops as well
the shitty jobs are the ones that want you to code in everything
alot of shitty .Net and JS combo jobs around
yeah, i was looking over some jobs the other day as a backend dev, pretty much everyone requires aws or azure experience
azure and aws dont take too much to learn though
although initially its a bit daunting
but its not too bad
though ngl the amount of companies that blindly go for serverless when they shouldnt is impressive
"lets run our heavily network based server on a serverless system cuz what could go wrong" then you realise that bandwidth is charged by the GB

ayo.thePizzaHere()
// true
so, I made some tests regarding java's most common methods of converting a bufferedimage to byte array, here're my results so far (each test being ran individually, generating 100 images like this one below)
using a ByteArrayOutputStream (most common method)
using a ByteArrayOutputStream with a BufferedOutputStream
using file-based conversion (some stackoverflow answers said this one was the fastest)
cached being default ImageIO settings, while cache-less being ImageIO.setUseCache set to false
high stands for highest peak in processing time, and low being the lowest
the generated images were 512px in size, and each pixel was totally random
just some benchmarking info for those who use ImageIO 🙂
idk what this is but i like benchmarks so... nice 👍
oh ok
<title>Cheems Media</title>
<link
href="https://cdn.discordapp.com/attachments/807359721950412831/810417078448029706/cheemsmedia.png"
rel="icon"
/>```
Why isnt this workin?
where did you put that
You can't change the site's favicon for your bot, I'm pretty sure of that
lul
That would require access to the <head> and you don't have that.
its in my headers
It's in your head? In your head... ZOMBIE ZOMBIE ZOMBIE IE IE IE
Ok so... can you show us the rest of that, then?
This channel is not limited to bot dev
wdym
Well, can you show us the rest of your HTML I mean
throw that on https://paste.gg/
A sensible, modern pastebin. Share text and source code snippets with no hassle.
And just to confirm : you're making your own website, not trying to add this to your top.gg bot page, right?
yes
ok good
wait why? is something bad? or something?
type="image/png"
Well it wouldn't work on a bot page
oh
i have that
However, the format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors.
html goes brrrrrrrrrr
Just so we're clear, 1200x1200 isn't 32x32 😉
oh no
look in line 31
1200??
ohh
c'mon dude it's supposed to appear here, it's not like it needs 1000 megapixel precision.
that's not rel icon
view-source:transword.xyz
oh
i use <br/> too 
lol nice
yep i dont know how to make spaces for the bottom
use css
So I'm working on something like a forms app, and I'm wondering how to structure the database (relational). Right now I'm thinking of having a Form table, which has an id, and then there's the Form_Parts table, which basically represents something in the form (section, title, or a question). The Form_Parts table could have a data column, which is an id to a question. A question can be of type TEXT, MULTIPLE_CHOICE, CHECKBOX, DROPDOWN, DATE. So, do I make a different table for each type of question, or is there another solution that I'm not seeing
How would the relations work if every type of question is a different table..hmm
<link
href="https://cdn.discordapp.com/attachments/812206763872485379/813424240203792444/8BIg8rm.png"
rel="icon"
/>```
ok i fiexd the image
its 32x32
still doesnt work
type="image/png"
Yo
I have error in hastebin command
How i can fix it
const fetch = require('node-fetch')
const EscapeMarkdown = (text) => text.replace(/(\*|~+|`)/g, '')
const baseURL = 'https://hastebin.com'
module.exports = class Hastebin extends Command {
constructor (client) {
super({
name: 'hastebin',
aliases: ['haste'],
category: 'utility',
parameters: [{
type: 'string',
full: true,
missingError: 'commands:hastebin.missingCode'
}]
}, client)
}
async run ({ t, author, channel, message }, code) {
const embed = new MonikaEmbed()
const { key } = await fetch(`${baseURL}/documents`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: EscapeMarkdown(code)
}).then(res => res.json())
embed
.setAuthor(t('commands:hastebin.hereIsYourURL'))
.setDescription(`${baseURL}/${key}`)
channel.send(embed)
}
}
oh lol
no
<head> doesn't go in <body>
and body doesn't go in head
don't you know your basic anatomy?
you have a head in a body in a head
(╯°□°)╯︵ ┻━┻
guys I have a question, is there a way to not have to write
context.function();
context.font = foobar;
context.function();
...
like I mean just make all that more compact instead of having to write context everytime?
that's my point. that's wrong, 100%
How would I update only numberOne without deleting both numberTwo and numberThree? When I try doing something like the code beneath the document, it gets rid of the other two numbers https://sourceb.in/1L3U4f5n3q
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
<h1>Your Body Here</h1>
<p>etc...</p>
</body>
</html>
@swift cloak here's a basic HTML template. That structure must be respected, you can't just randomly change this, it's a defined, solid, mandatory syntax.
of course I mean in canvas
Anyone?
Not to bother or anything. I've recently been having these issues. Never had it before. Could it be the connection?
change hastebin baseURL
hastebin.com is broken
On which?
like https://paste.mod.gg
how big is your bot and how bad is your internet?
??
you can selfhost hastebin
Im so lazy to remake command
then use that
Lets try
It's around 230+ servers but I'm just testing it. And using a server
@swift cloak here you go buddy. All working now, with the proper syntax. https://paste.gg/p/anonymous/d1475a6c29ed433094aa60de64f0c7d7
that usually happens when theres too much to be chunked or your internet connection is bad
oh i alr fixed
lmao
thx tho
yep. thx
or the code is slow, but i dont think anyone would be able to write such unoptimized code to make it that bad
did you know all you need to shard is ```js
const client = new Discord.Client({ shards: 'auto' });
And you don't have anything else to do? And you only need to do that at 2000+ guilds.
I'm using danbot hosting which has good internet. I believe 8gb. But could be that since it only started happening so could be connection issue
you mean 8mbps?
No 8gbps
but shared across thousands of users
Across 500 I believe
danbot hosting is quite big, i doubt its that small
There's a lot of nodes now, there's a donator node which is super fast but has a lot of users using that server
Yeah
and probably yes a website
Very cool
if Danbot gives 8gbps im just setting up a fuck ton of streaming nodes on there
yeah I'm literally asking if it's https://danbot.host/
because if it is, I wouldn't trust someone that can't be bothered to make a simple website work right.
bruh you all know what happened
Because some of the nodes are in the US instead of using his dedi
imagine if danbot decides to use everyone's bots for raiding
I love the node uptime
no
What the hell is this
xDD
This is a shitty website made by someone who clearly can't run a host right.
a host banned me from their server and i have no backup of my bot and i need to code my bot again 😭
That's what I'm afraid of.
So anyways TL;DR
- You don't need to shard
- You're 2000 guilds away from needing to shard
- You can just use
const client = new Discord.Client({ shards: 'auto' });to shard so you don't need to "prepare" - Your host is crap in a box.
Hey @opal plank you here
ye
Ik, it's just to test to be prepared you know
Ik I don't
you litearlly just add const client = new Discord.Client({ shards: 'auto' }); and you're sharding.
it requires no preparation at all whatsoever
im gonna hier a coder or search
*** host bot 24/7 online free*** cuz of this
I need your opinion on a database design for an app I'm working on
go ahead
postgresql database
is the app big?
postgres is 
It's not released yet so no
can i hire anyone of you?
no, not what i mean
i mean as is, do you plan for scaling?
and large scaling
postgres has basically 2 features that you want as a database, relation/foreing tables and scalability
how much
Not really, the app is meant to be just for my portfolio, but it could get big
£20-40 / hr depending on the job
if you arent using neither, it might be better to use a document based db
but if you want to stick to postgres its fine, im able to give help on that
oh my see my status i can't pay more than 500₹
My rate's CND$50/hour
what exactly you planning on doing?
also i have exams thats why i need
my go to Db's are Scylla or Postgres depending on the type of data
Then go learn coding yourself, you will not get any help for us at under $10
dont you know what happened
isnt 500 yen like, 4 and a half dolars?
Might as well spit in our faces at that price
a host banned me from their server and i have no backup of my bot and i need to code my bot again
fun /s
ik coding i dont have time
"I didn't make backups" that's your problem buddy
if you don't have time, then make the time
This is why you use GitHub or something similar
bruh i said INR
it’s not hard
and if they banned you im willing to say it wasnt for nothing
tomorrow is exam
oh well sucks to be you!
the owner said me fu i said go die thats why
wha
okay 7$
that was obviously gonna happen
did the owner have a reason to tell you fu?
i doubt someone would randomly start talking like that to someone with at least a reason
no and he says i didn't said

I mean this is why you dont go with a shit host to begin with
Your lesson today @earnest phoenix , take responsibility for the things you've said and done, and your lack of preparedness. Your issues are not our responsibility, they're yours and yours alone.

literally this bro
if you don’t have a backup
something bad is gonna happen
"GitHub" : laughing with wine meme here
i was the one who kept his chat alive
ok
(ask Aprixia kekw)
YOU didn't backup your code
YOU got yourself banned
YOU did that last minute.
ehh
That's all YOUr fault
btw im banned from all hosts for asking more ram
It's something like a survey website where you can make surveys / forms, and I'm not sure how to design the database. The database for sure is going to have a Forms table, with an id and other settings, but I'm not sure how to store the questions because there are different types, ex. text, multiple choice, date, linear scale. Do I just create one table called form_questions and cram all columns for the different types there (e. g. possible_choices array for the multiple choice type, date for date questions, text for text questions) or do I create a different table for every type of question, and how would the relationships work if so
the fuq was the host ?
is this the dude that used 6-20gb of ram for their bot
add a type for each form_question
for like 140 servers
i am banned from mystics host and i forgot many like tich host falix nodes and Many more for asking more ram
Maybe he used react dev version there
There's so many teens out there that make shitty fucking "hosts" and they have no idea how to handle a business or how to make things work, they just want to emulate all the other kids making their own host and they think they can make money from it. So basically, the problem here is, you're not actually banned from "hosts" you're banned from children's pet hosting projects.
Go get a real hosting.
yes lol
BFHA
im not gonna read that big thingy

Real hosts: DigitalOcean, AWS, OVH, Google, Vipr
contabo
6-20gb for a bot
not galaxy gate
bAhaha no wonder you were banned
Fake hosts: litearlly any damn host that requires you to be on Discord to get an account isn't a real host.
id | timestamp | type | questions |
1 | 2020/10/10 | possible_choices | [1, 2, 3]
2 | 1999/2/45 | date | [Date, date, date]
3 | 1987/87/34 | text | ["ac?", "bac?", "cd?"]
You know you can use Google Forms
wouldnt this work feud?
they want to make their own?
Vultr
yeah that one.
Hint: if their control panel is based on minecraft hosting systems, it's not a real host.
it would be better overall to have 1 table than multiple, but you can use relational tables for it
LMAO
Google gives a clean api though
But that's possible.
I saw a code on GitHub I'll grab it
but i wouldnt advise using it unless you must, in your case doesnt look like a valid need from what i gatehered
adding foreing keys and relations adds more queries on the db
so while it shouldnt affect much at all, its still unecessary querries
You just killed him bro
Now we wait for no reply
I call them "Ephemeral hosting services" when I feel like being polite.
I call them shitty fucking "hosts" when I feel like being polite
now being impolite
you might not wanna hear that
yeah let's keep this room pg13 please 😛
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
right
UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
you cannot send user and message.author directly in embeds
@cinder patio did what i say make sense?
oh ok that’ll do
.addField(`Banned User` , user)
.addField(`Banned By` , message.author)
These 2 lines are invalid
it shows the embed but its not banning the user
oh

but its not banning the user
ok then I guess it .toString()s it automatically
yeah cuz... you're not calling .ban() on anything
FOR 140 SERVERS
pppfff
i am
that's confusing
Tim has like < 200mb for 7k
caching goes brrr
you should use a .catch() and .then() on the ban() so that you know if the ban worked or not
< 150
bloody hell
because right now it'll always say the user is banned even when it doesn't have permissions or anything and that's obviously a shitty design
in fairness im keeping images loaded in memory for canvas, and they should be quite heavy too
lol
as well as different use objects
8k servers pog
yo 8k poggers
I guess, but if the type is text, then questions (or I would call it possible_choices) would be null, because it's an open question, same with date.
What's the fasted method to access the guild id of a message? message.member.guild.id ?
It's not related but does message.mentions.users.first() exist ?
shouldn't it be message.mentions.members.first()
thats why you set an array, if its a single question, either pull [0] or dont even read it in code
i ll try
message.guild.id
or if theres nothing, its an empty array
fastest or shortest?
because there is no performance difference lul
@near stratus still same error
mine is shortest
Okay thanks, that's how I'm gonna do it
no preblomo
I wonder I couldn't find a property in the console log but the documentation says there's a guild property of message
no
cuz there is
which line was the error on ?
there is yes
is it a guild message?
it just says Invalid Form Body
dms and some other channels might not have guild in it





