#development

1 messages · Page 1608 of 1

earnest phoenix
#

you can compile to node bytecode

cinder patio
#

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

whole warren
#

what theme is that?

latent heron
#

Savi theme for atom

lament rock
#

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.

old cliff
#

why is -40%26 != 40%26 ?

#

huh ?

cinder patio
#

Because the one on the left is negative and the other one is positive

old cliff
#

should I use math.abs ?

#

to fix it ?

cinder patio
#

just... don't make the left number negative by removing the minus?

lament rock
#

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

old cliff
#

idk my logic is messy

lament rock
#

Well. What are you trying to do

old cliff
#

idk myself wait

lament rock
old cliff
#
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
lament rock
#

I understand everything I'm reading, but I'm rather lost 02derp

cinder patio
#

First off, what are you trying to do, the function name doesn't help

old cliff
#

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

lament rock
#

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.

old cliff
#

that is what I am trying to do

latent heron
#

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?

old cliff
#

I have used php

#

I can also melt your brain

latent heron
#
$$h="hello ";$w="world";echo$hello.$w;```
lament rock
#
const chars = string.split("");
for (const char of chars) {
   const index = alphaChars.indexOf(char);
   const opposite = alphaChars[alphaChars.length - index];
}
latent heron
lament rock
#

just an example of what I was thinking

old cliff
#

$$h

cinder patio
#

That would be the sanest way to do it

latent heron
#

Nope

old cliff
#

does it support negative values ?

latent heron
#

No error thrown

#

Welcome to php

old cliff
#

tf

#

nvm I am ditching the a+1 = b thing

latent heron
#

😂

old cliff
#

just reverse

cinder patio
old cliff
#

a = z

#

my brain is messed today

#

I will try again tomrrow

cinder patio
#

you don't even need the alphabet array, you can use the char codes

old cliff
#

hmm

cinder patio
# old cliff 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)));
}
cinder patio
old cliff
#

Thanks

lofty geyser
#

Guys I need help (discord bot py), I have issue

clever moat
#

tell me boi

snow urchin
safe creek
#

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

snow urchin
#

there isnt any "rules"
bulkDelete is limited to 100 msgs

pale vessel
#

100

safe creek
#

ok tyy

last geyser
#

and 14d age

safe creek
#

mmk well its been around for a few months soo

#

the age is np

last geyser
#

14d is the oldest you can delete via bulk

#

after that you've got to delete them individually

safe creek
#

oh

#

so would it be ok if a user uses the command after a message is pretty new like a day old

snow urchin
#

yes

safe creek
#

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?

pale vessel
#

you gave more arguments than needed

safe creek
#

well im not too sure why

pale vessel
#

what's your code?

safe creek
#

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

pale vessel
#

I don't think you need to provide self?

safe creek
#

oh my bad i didnt even see it

#

i made most of this at about 2am haha

#

ill try it without the self

modest maple
#

you're overriding your first error handler btw

safe creek
#

am i?

modest maple
#

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

safe creek
#

ahhh ok

modest maple
#

just move the second instance check into the other if block using elif

safe creek
#

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

modest maple
#

whats your new code

safe creek
#
    #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
modest maple
#

okay but thats not valid python code

safe creek
#

oh ok,

modest maple
#

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

safe creek
#

so keeping the instance correct after the elif?

#

i just woke up so please excuse me shibanervous

modest maple
#

shrug tias

safe creek
#

tias?

modest maple
#

try it and see

safe creek
#

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 :/

modest maple
#

pepehmm Is that valid code?

earnest phoenix
#

why is it not indented

safe creek
#

idfk i just woke up CRY

modest maple
#

thats like the least of the issues blobpain

#

Bro your srsly gotta know atleast the core of python

#

im not even asking for the basics

safe creek
#

i know a little python but can kept learning it

modest maple
#

im just asking you know the fundamentals like indentation, if blocks basic comparisons

safe creek
#

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

#

:/

modest maple
#

I mean this is very very very very very basic python

earnest phoenix
#

this is pain.

#

pure fucking pain.

#

but somehow

#

every single dude not knowing python, js, java etc

#

makes a fuCKING DISCORD BOT

safe creek
#

pure luck

#

if ill be honest

#

i should definitely learn more python or i can keep tourturing the development community hehe

modest maple
#

i mean the only one you're hurting is yourself mmLol

safe creek
#

trueee

#

ah shit thats so true it hurts

#

time to load up my phone

#

cya in a bit

earnest phoenix
#

you are coding on your phone..?

safe creek
#

no

#

my laptop

#

but i use sololearn to learn languages on my phone

#

pretty good app imo

earnest phoenix
#

this is me rn

safe creek
#

hmm yes i too look like an 2d 360p jpeg

slender thistle
#

SoloLearn is decent enough but you want to apply plenty of practice on top of theories

safe creek
#

ye ik idk why theres hate for it

#

its a really good app and allows you to share what you learnt etc

rare trail
#

embed image doesn't support imgur images or it's a simple bug?

safe creek
#

im pretty sure it does, it may be a bug

#

as its an image/gif

#

which embeds support

#

so its gotta be a bug

green kestrel
#

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

safe creek
#

@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

green kestrel
#

I won't be able to tell if I am lol

#

because the guilds aren't delivering messages

safe creek
#

fair enough, have you looked on discords status page for anything that may cause it?

green kestrel
#

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

safe creek
#

ahh ok i see

green kestrel
#

nothing on Discord status page but nothing new there, their status page is shit

#

it's manually updated with incidents

#

lol

safe creek
#

true, try reporting the bug somewhere you can get some sort of quick reply

#

as it is something to do with discords servers

green kestrel
#

ive asked on dapi and ddevs servers

#

to see if its something that can happen

#

ive never seen it before

safe creek
#

hmm any responce?

green kestrel
#

not yet

#

its stupid-o-clock for americans

safe creek
#

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

quartz kindle
#

Discord having issues as always

safe creek
#

mhm

quartz kindle
#

I have guilds that repeatedly send me GUILD_DELETE every 30 seconds

safe creek
#

damn so its a huge issue eh

earnest phoenix
#
    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

misty sigil
#

discord™️ or something idk

quartz kindle
#

@green kestrel does that happen in a "normal" guild? Because bots are broken in servers with too many bots

green kestrel
#

got reports from another cluster now

#

this is becoming a major issue :/

#

yeah these are "normal" guilds

misty sigil
#

I’ve seen a few issues relating to guilds lately

green kestrel
#

how are they broken @quartz kindle

misty sigil
#

wtf is discord doing

quartz kindle
#

Does the issue persist if you kill the shard and reidentify?

green kestrel
#

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

quartz kindle
#

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?

earnest phoenix
green kestrel
#

would that be the case for these broken spam deletes?

quartz kindle
#

Yes

green kestrel
#

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

quartz kindle
#

I believe so yes

#

And the guild role limits

green kestrel
#

are discord even aware of this issue

quartz kindle
#

They said it would be fixed when the role changes are apllied

green kestrel
#

whens that?

quartz kindle
#

Idk

green kestrel
#

i hate silent breakages

#

they didnt even announce this change

quartz kindle
#

I think they did, let me check

modest maple
#

not as bad as when they changed channel ratelimites mmLol

#

they only announced it when everyone complained

quartz kindle
#

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

quartz kindle
green kestrel
#

the servers with the issue just inexplicably came back again

#

no idea what it was

#

lol

green kestrel
#

like how only a "small number of bots" would need verification lul

quartz kindle
#

xD

modest maple
#

tbh thousands are a small number to discord

#

millions and millions vs a few thousand is pretty minor

static hornet
#

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?

cinder patio
#

It's best to join fiverr or upwork and sell custom bots there, nobody's going to buy a random executable

devout notch
#

do you guys know how to fix 'Fontconfig error: cannot load default config file'

quartz kindle
#

well, discord bot maker is on steam

#

might as well put yours on steam too lmao

marble juniper
#

I think small for discord is something different

devout notch
#

Im just using regular sans-serif trying to do something in canvas

marble juniper
#

lol

#

small = 100k

#

lol

quartz kindle
static hornet
#

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

cinder patio
#

If you want to sell an application that makes the discord bots, then as Tim said, you could put it up on steam

marble juniper
#

I really don't like bot makers

#

none of the current ones are good

cinder patio
marble juniper
#

they are mostly just money bait

devout notch
#

Im using apt-get install but it says Im not root

marble juniper
#

lol

#

or poorly designed

cinder patio
#

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

static hornet
marble juniper
#

just put it on there for 10$

#

lol

#

and give people a reason to buy it

#

lol

#

I will never buy it

#

personally

quartz kindle
devout notch
static hornet
# cinder patio or itch.io

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

devout notch
#

nvm it says command not found

static hornet
cinder patio
#

nope you can also release applications on there

marble juniper
#

.io games intensifies

quartz kindle
devout notch
#

I think its linux Im running this bot on repl.it so I really dont know

quartz kindle
#

ah

#

then you cant use sudo there

#

you cant use system fonts on repl.it

devout notch
#

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

marble juniper
#

yeah

#

lol

quartz kindle
#

you said you were using sans-serif

devout notch
#

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

quartz kindle
#

and you registered with registerFont?

devout notch
#

dont mind the return

#

I was just testing something but it wasn't there in the original code

quartz kindle
#

and you use only bebasneue right?

#

not bebasneue, sans-serif

devout notch
#

yeah I double checked, no other font other than bebasneue

quartz kindle
#

then im not sure if there is anything you can do

#

just ignore the error and move on

#

the font is working right?

devout notch
#

yeah

quartz kindle
#

so yeah

devout notch
#

thanks for the help

green kestrel
quartz kindle
#

i mean, piracy can be a good thing

green kestrel
#

I'll give you a compiled executable of my bot if you want lol

quartz kindle
#

many indie game developers got explosive popularity thanks to piracy

#

even went as far as thanking them

green kestrel
#

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

misty sigil
#

how huge is it

green kestrel
#

some indie devs actually put their own games on torrent sites

#

sec...

quartz kindle
#

you wont make money anyway if your product is not popular

#

piracy is free advertising

#

well not free

green kestrel
quartz kindle
#

but paid with copies of your product

#

instead of money

green kestrel
#

@misty sigil 137mb for module and 55mb for core

cinder patio
#

how long does that take to compile

misty sigil
#

fuckin hell

#

big

green kestrel
#

10 mins

misty sigil
#

what hardware

green kestrel
#

but I don't often build it from clean

#

D series Xeon 8 core 32gb ram

misty sigil
#

trivia bot build from clean new benchmark 👀

green kestrel
#

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

misty sigil
#

🧠

quartz kindle
#

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

misty sigil
#

damn

static hornet
green kestrel
#

just make it a self service system

#

where they can configure their own bot and set their config

quartz kindle
#

it feels stupid tho

green kestrel
#

lol

#

i get more performance increase with the opposite, make -j8

#

parallel compilation

quartz kindle
#

took so much time to separate the files only to join them together again because compile time became horrendous

modest maple
#

i just cargo build --release dab

green kestrel
#

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

modest maple
green kestrel
#

if i shielded it from the rest of the code with some class wrappers, they wouldnt need to directly include aegis

quartz kindle
#

my thing relies on pretty large dependency, so splitting it in multiple files made each separate file require the same dependency again

green kestrel
#

@modest maple my build process is:

make -j8
#

or if i want to do a build from clean, before the make, its cmake ..

modest maple
#

does it re-compile the dep for every time it's referenced @quartz kindle ??

quartz kindle
#

no

#

the dep is compiled only once

green kestrel
#

i love cmake.

quartz kindle
#

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

devout notch
#

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)
);
quartz kindle
#

are you sending the message from inside that .then() also?

devout notch
#

no

quartz kindle
#

then thats the problem

safe creek
#

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

devout notch
#

are you sure? Im just doing context.drawImage(avatar) thats the only time Im using avatar

quartz kindle
#

but you're doing it inside a promise

#

and not awaiting it

devout notch
#

oh yeah that makes sense okay

#

thanks

quartz kindle
#
a.then(() => {
  b // this happens after a while
})
c // this happens immediatelly
earnest phoenix
#

I did that already its the package, im using a almost same one thats working now bro but still thx

old cliff
#

if discord removes image metadata then how can someone store encrypted text in image metadata ?

#

how can this happen ?

rustic nova
#

read the bots name

#

and then look up that bots name

#

You'll learn what this is

honest perch
#

it removes meta data that can identify a user

old cliff
#

so if I store abcd = uwu metadata then it won't remove ?

rustic nova
# old cliff how can this happen ?

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

old cliff
#

how ?

#

metadata or what ?

rustic nova
#

It is not metadata

old cliff
#

hmm

dusky sundial
#

Look up different methods of Steganography and you'll probably find out ^^

rustic nova
#

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

honest perch
#

^

#

it only strips the sensitive meta tags

#

the rest will stay

rustic nova
#

geo tags for example get yeeted

misty sigil
#

yo I can upload chicken pictures at peace now

honest perch
#

so if you edited an image with photoshop, it will be in the meta tags

old cliff
#

nvm I'll just use another Steganography lib

dusky sundial
#

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

misty sigil
#

don’t hide my ip that’s a bit boring

old cliff
earnest phoenix
#

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)
rustic nova
#

iirc does canvas even support otf? or does it support both otf and ttf

earnest phoenix
#

i've saved other fonts before.

#

are you sure that's the font name

#

isn't it FontAwesome

#

without the dash

safe creek
#

(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?

lyric mountain
#

imagine print screen button

safe creek
#

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

meager dome
#

use browser

safe creek
#

I’ll have to login and don’t want to do the 2fa

#

But fine

lyric mountain
#

dot dot dot

safe creek
#

Since you all love screen shots

lyric mountain
#

it's easier to read

safe creek
#

I sent an imagine with the code that needs to be read

#

Tf you mean?

zenith terrace
lyric mountain
#

well, if you want coding help we first need to be able to read it

safe creek
#

You can tho

lyric mountain
#

and screen photos are kinda jagged

safe creek
#

Yeah yeah ok then

lyric mountain
#

nonetheless, looks like ur def indentation is wrong right before "with"

zenith terrace
#

all I can see from that is a red line under the word json

safe creek
#

It doesn’t error if it’s inside my main,oy but does inside my other files

lyric mountain
#

also, what's the error?

safe creek
#

Bruh

lyric mountain
#

bruh

safe creek
#

Read the text above my image

latent heron
#

can you screenshot?

safe creek
lyric mountain
# safe creek Read the text above my image

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

safe creek
lyric mountain
#

run it then

safe creek
#

I can’t because it won’t let me when it errors

lyric mountain
#

then show the error message

#

if it errors it does have a message

safe creek
#

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)]```
lyric mountain
#

yeah, fix that def before with

safe creek
#

so replace the def with an 'with'

lyric mountain
#

no

safe creek
#

or the other way round

lyric mountain
#

where it is VS where it should be

#

that def has nothing inside it

safe creek
#

oh yeah my bad

#

but

#

that doesnt fix the json

#

thats erroring

lyric mountain
#

the error is not with json

#

it's with indentation

safe creek
#

nooo

#

its with the

#

prefixes = json.load(f)

rocky hearth
#

can firebase hosting be used to host, discord bot?

lyric mountain
safe creek
#

its erroring at the json

lyric mountain
#

indentation

safe creek
#

bruh you stupid as

lyric mountain
#

am i?

safe creek
#

When you don’t listen then clearly

lyric mountain
#

your code is clearly saying the error is there

safe creek
#

My lord

nimble kiln
#

lmfao this guy is calling him stupid even tho the error tells him exactly that

modest maple
#

pithink dude you know that Kuu is right?

safe creek
#

great now it wont let me send screen shots

modest maple
#

You need to know the basics of Python before you start programming bots

#

starting with indentation

safe creek
#

thissss

#

omfggg

#

loook

#

the json

#

is erroring

modest maple
#

okay, well thats better but still indented wrong

safe creek
#

he asked for the consol

#

i sent him the console

modest maple
#

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 shrug

safe creek
#

nahh you dont say tho it doesnt say that in my main.py but this it does

modest maple
#

because different files have different scopes...

lyric mountain
#

show the whole file

modest maple
#

also probably wanna cuz the sarcasm because we're the ones helping you and we have considerably more experience than you

#

just a thought mmLol

lyric mountain
#

and as cf8 said, that still wont work due to wrong indentation

safe creek
#

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

modest maple
#

then dont get help lol

lyric mountain
safe creek
#

im still writing it but it will mostly be a r and w for the rest

#

omfg just forget it

modest maple
#

lol

lyric mountain
#

btw, what cf8 meant

modest maple
signal wagon
#

Today on "how to spot a 5head"

modest maple
#

the car:

#

this is your code as of right now^

lyric mountain
#

lul

earnest phoenix
#

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

modest maple
#

Its just a lack of basic python knowledge

#

like the fact that different files have different variable scopes

latent heron
#

say it loud and proud CF8

#

the dude came here to get spoonfed fixed code

modest maple
#

or the fact that indentation matters bonk

latent heron
#

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?

signal wagon
#

Hello yes pls give me working bot for free

earnest phoenix
latent heron
#

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)
earnest phoenix
#

boobie anime hihiehehe 🤤

swift cloak
#

yo

safe creek
#

heres the 'car' you asked for

latent heron
#

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

modest maple
#

also

swift cloak
#

can anyone here help me with portzilla

latent heron
#

docs

safe creek
#

you asked me to send a ss of my full screen so

signal wagon
#

lmao

dusky sundial
safe creek
#

bro i know how to im not sure why this is erroring tho as everything is good and should be ok

signal wagon
#

Everything is not good

dusky sundial
#

It's really not though, you have an event indented into a function, for one

modest maple
# safe creek heres the 'car' you asked for

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

safe creek
#

the code doesnt show any errors inside my bot.py file tho

modest maple
#

but you dont explicitly show it so shrug

safe creek
lyric mountain
#

and d.py events in an utils file...

modest maple
#

i mean ill keep adding it

dusky sundial
#

It's because not even VSC knows what you're trying to do

latent heron
#

did you actually expect to come in #development with flying colors expecting a neutral outcome? lmao

modest maple
#

i can go on

#

but

#

i think the initial list is enough for now

safe creek
#

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

modest maple
#

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

dusky sundial
latent heron
#

i don't think throwing swear words at us is going to help prove your case here Carpal

modest maple
#

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 mmLol

latent heron
#

if anything you look like a bigger asshole than we're trying to give you constructive criticism

safe creek
latent heron
#

you could've avoided the issue by

#

learning the language

modest maple
#

and

safe creek
#

And when I’ve clearly said I’m still coding it etc

#

And that’s what I mean

modest maple
latent heron
#

so if you're still coding it

#

why did you ask for help

safe creek
#

Just forget it

latent heron
#

lol

safe creek
#

I don’t care

#

Bye

latent heron
#

you clearly do

modest maple
#

bye

latent heron
#

cya

lyric mountain
#

look, first fix your syntax issues, that's the major error in ur code

modest maple
#

So many syntax errors mmLol

lyric mountain
#

THEN you can focus on other stuff

latent heron
#

i still dont know

#

wtf that code even does

modest maple
#

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

latent heron
#

through a listener event?

safe creek
#

Actually why would it read an prefixes json for an purge command?

latent heron
slim umbra
nova basin
#

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.

signal wagon
latent heron
#

NYOOM

safe creek
#

It doesn’t make sense no?

latent heron
#

no

latent heron
#

w3schools is bad

#

don't even link that

#

it's so dogshit

modest maple
modest maple
latent heron
#

lmaoo

signal wagon
#

Didn't look bad at first glance and was the first thing that came up when googling "python tutorial" lol

lyric mountain
modest maple
#

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™️
lyric mountain
#

but if it was declined then you're in deep waters

latent heron
#

for something as basic as an identation error

#

this is top tier sorcery shit

wary pollen
crimson vapor
#

w3schools is good but not as good as taking a class

#

at least imo

earnest phoenix
#

when you pay 1.2k for uni only to get a piece of paper so you don't get filtered out in job applications 😔

crimson vapor
#

cheap uni

#

where my brother goes he paid that in books only iirc

latent heron
modest maple
#

I mean hey i'd love to only pay 1.2k for a degree

#

normally that shit atleast 18k

crimson vapor
#

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

marble juniper
#

lol

crimson vapor
#

lol yea

modest maple
#

and im 17 mmLol

latent heron
#

this is why scholarships are big time

earnest phoenix
#

you can make bank as a freelancer if you find the right audience

latent heron
#

dont be a fool and neglect em

marble juniper
#

I only know javascript

crimson vapor
#

same

marble juniper
crimson vapor
#

but barely even know that

modest maple
latent heron
#

it helps to know more than 1 programming language

#

by such an immense margin

marble juniper
#

I know a little bit of python

#

but not much

latent heron
#

imo full-stack seems to be the ideal future of CS programmers

#

that's what every job seem to want now

marble juniper
#

meh

crimson vapor
#

imo thats dumb

latent heron
#

it is

#

you should just specialize in your craft

modest maple
#

You have the decent jobs then you have the shitty jobs

latent heron
#

but they dislike that

earnest phoenix
#

devops as well

latent heron
#

devops is huge

#

christ

modest maple
#

the shitty jobs are the ones that want you to code in everything

#

alot of shitty .Net and JS combo jobs around

earnest phoenix
#

yeah, i was looking over some jobs the other day as a backend dev, pretty much everyone requires aws or azure experience

modest maple
#

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

crimson vapor
thin turret
#
ayo.thePizzaHere()
// true
lyric mountain
#

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 🙂

quartz kindle
#

idk what this is but i like benchmarks so... nice 👍

brazen violet
#

how to put bot library in top.gg?

pale vessel
#

you can't

#

they're deprecating it

brazen violet
#

oh ok

swift cloak
#
<title>Cheems Media</title>
      <link
        href="https://cdn.discordapp.com/attachments/807359721950412831/810417078448029706/cheemsmedia.png"
        rel="icon"
      />```
Why isnt this workin?
pale vessel
#

where did you put that

umbral zealot
#

You can't change the site's favicon for your bot, I'm pretty sure of that

lyric mountain
#

lul

umbral zealot
#

That would require access to the <head> and you don't have that.

umbral zealot
#

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?

latent heron
#

i dont feel like

#

this is bot development

umbral zealot
#

This channel is not limited to bot dev

umbral zealot
#

Well, can you show us the rest of your HTML I mean

swift cloak
umbral zealot
#

And just to confirm : you're making your own website, not trying to add this to your top.gg bot page, right?

swift cloak
#

yes

umbral zealot
#

ok good

swift cloak
lyric mountain
#

type="image/png"

umbral zealot
#

Well it wouldn't work on a bot page

swift cloak
#

oh

swift cloak
lyric mountain
#

not in the code u sent

#

wtf my dude

umbral zealot
#

However, the format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors.

lyric mountain
#

html goes brrrrrrrrrr

umbral zealot
#

Just so we're clear, 1200x1200 isn't 32x32 😉

latent heron
#

oh no

swift cloak
lyric mountain
#

1200??

latent heron
#

well tbf

#

sometimes you need some <br/> in your life

#

just don't overuse it

umbral zealot
#

c'mon dude it's supposed to appear here, it's not like it needs 1000 megapixel precision.

lyric mountain
latent heron
#

view-source:transword.xyz

swift cloak
#

oh

latent heron
#

i use <br/> too blobpain

swift cloak
swift cloak
lyric mountain
#

use css

umbral zealot
#

use position:fixed and bottom:0

#

or just height: 100% on the wrapper div

cinder patio
#

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

swift cloak
#
<link
        href="https://cdn.discordapp.com/attachments/812206763872485379/813424240203792444/8BIg8rm.png"
        rel="icon"
      />```
#

ok i fiexd the image

#

its 32x32

#

still doesnt work

lyric mountain
#

type="image/png"

silent cloud
#

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)
  }
}
umbral zealot
#

dude

#

it's not in the fucking <HEAD>

swift cloak
#

oh lol

umbral zealot
#

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

#

(╯°□°)╯︵ ┻━┻

devout notch
#

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?

umbral zealot
#

that's my point. that's wrong, 100%

rugged cobalt
#

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

umbral zealot
#
<!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.

raven urchin
#

Not to bother or anything. I've recently been having these issues. Never had it before. Could it be the connection?

pale vessel
silent cloud
#

On which?

pale vessel
opal plank
silent cloud
#

Thats not hastebin, but thats hastebin, wtf?

#

Thats official url or what?

pale vessel
#

??
you can selfhost hastebin

silent cloud
#

Im so lazy to remake command

pale vessel
#

then use that

silent cloud
#

Lets try

raven urchin
umbral zealot
opal plank
#

that usually happens when theres too much to be chunked or your internet connection is bad

umbral zealot
#

next time pay attention to syntax and order 😛

swift cloak
#

yep. thx

opal plank
#

or the code is slow, but i dont think anyone would be able to write such unoptimized code to make it that bad

umbral zealot
#

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.
raven urchin
opal plank
#

you mean 8mbps?

raven urchin
#

No 8gbps

opal plank
#

but shared across thousands of users

raven urchin
#

Across 500 I believe

opal plank
#

danbot hosting is quite big, i doubt its that small

raven urchin
#

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

umbral zealot
#

is that the danbot.host website

#

just out of curiosity

remote lichen
#

is that the danbot.host website
@umbral zealot

host

#

its a hosting company

raven urchin
#

Yeah

remote lichen
#

and probably yes a website

pale vessel
#

Very cool

modest maple
#

if Danbot gives 8gbps im just setting up a fuck ton of streaming nodes on there

umbral zealot
modest maple
#

then yall wont have 8gbps

#

the data will be mine ducky_devil

umbral zealot
#

because if it is, I wouldn't trust someone that can't be bothered to make a simple website work right.

earnest phoenix
#

bruh you all know what happened

raven urchin
#

Because some of the nodes are in the US instead of using his dedi

pale vessel
quartz kindle
#

imagine if danbot decides to use everyone's bots for raiding

modest maple
#

I love the node uptime

pale vessel
modest maple
#

34 minutes

#

wow

pale vessel
#

What the hell is this

quartz kindle
#

xDD

umbral zealot
#

This is a shitty website made by someone who clearly can't run a host right.

earnest phoenix
#

a host banned me from their server and i have no backup of my bot and i need to code my bot again 😭

raven urchin
modest maple
#

also theservers themselves are hot trash

#

lul

umbral zealot
#

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.
pale vessel
cinder patio
#

Hey @opal plank you here

opal plank
raven urchin
umbral zealot
#

ok but you don't need

#

to prepare

raven urchin
#

Ik I don't

umbral zealot
#

you litearlly just add const client = new Discord.Client({ shards: 'auto' }); and you're sharding.

#

it requires no preparation at all whatsoever

earnest phoenix
cinder patio
# opal plank ye

I need your opinion on a database design for an app I'm working on

cinder patio
#

postgresql database

opal plank
#

is the app big?

modest maple
#

postgres is armstrong

cinder patio
#

It's not released yet so no

earnest phoenix
#

can i hire anyone of you?

opal plank
#

no, not what i mean

modest maple
#

if you pay my standard rate

opal plank
#

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

earnest phoenix
cinder patio
#

Not really, the app is meant to be just for my portfolio, but it could get big

modest maple
#

£20-40 / hr depending on the job

opal plank
#

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

earnest phoenix
umbral zealot
#

My rate's CND$50/hour

opal plank
#

what exactly you planning on doing?

earnest phoenix
#

also i have exams thats why i need

modest maple
#

my go to Db's are Scylla or Postgres depending on the type of data

umbral zealot
earnest phoenix
opal plank
#

isnt 500 yen like, 4 and a half dolars?

umbral zealot
#

Might as well spit in our faces at that price

earnest phoenix
#

a host banned me from their server and i have no backup of my bot and i need to code my bot again

misty sigil
#

fun /s

opal plank
#

oof

earnest phoenix
#

ik coding i dont have time

umbral zealot
#

"I didn't make backups" that's your problem buddy

#

if you don't have time, then make the time

misty sigil
earnest phoenix
misty sigil
#

it’s not hard

opal plank
#

and if they banned you im willing to say it wasnt for nothing

earnest phoenix
misty sigil
#

oh well sucks to be you!

umbral zealot
#

Why do we care about the exam

#

what's a bot got to do with exams

opal plank
earnest phoenix
misty sigil
#

wha

earnest phoenix
misty sigil
#

that was obviously gonna happen

opal plank
#

did the owner have a reason to tell you fu?

umbral zealot
opal plank
#

i doubt someone would randomly start talking like that to someone with at least a reason

earnest phoenix
opal plank
modest maple
#

I mean this is why you dont go with a shit host to begin with

umbral zealot
#

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.

modest maple
misty sigil
#

if you don’t have a backup

#

something bad is gonna happen

near stratus
earnest phoenix
earnest phoenix
misty sigil
#

(ask Aprixia kekw)

umbral zealot
#

YOU didn't backup your code
YOU got yourself banned
YOU did that last minute.

earnest phoenix
misty sigil
#

LMAO

#

THATS YOUR FAULT

cinder patio
# opal plank go ahead

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

near stratus
misty sigil
#

is this the dude that used 6-20gb of ram for their bot

opal plank
misty sigil
#

for like 140 servers

opal plank
#

and add an array of possibilities

#

string[]

earnest phoenix
near stratus
opal plank
#

or charVar[]

#

so, frmo what i gathered

umbral zealot
#

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.

earnest phoenix
misty sigil
#

BFHA

earnest phoenix
umbral zealot
#

ok

#

get a real host

#

you don't know what a real host is

#

short enough?

misty sigil
umbral zealot
#

Real hosts: DigitalOcean, AWS, OVH, Google, Vipr

modest maple
#

contabo

misty sigil
#

6-20gb for a bot

modest maple
#

not galaxy gate

misty sigil
#

bAhaha no wonder you were banned

umbral zealot
#

Fake hosts: litearlly any damn host that requires you to be on Discord to get an account isn't a real host.

opal plank
#

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?"]

near stratus
opal plank
#

wouldnt this work feud?

misty sigil
umbral zealot
#

yeah that one.

#

Hint: if their control panel is based on minecraft hosting systems, it's not a real host.

opal plank
#

it would be better overall to have 1 table than multiple, but you can use relational tables for it

misty sigil
#

LMAO

near stratus
opal plank
#

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

modest maple
#

Now we wait for no reply

umbral zealot
#

I call them "Ephemeral hosting services" when I feel like being polite.

misty sigil
#

I call them shitty fucking "hosts" when I feel like being polite

#

now being impolite

#

you might not wanna hear that

umbral zealot
#

yeah let's keep this room pg13 please 😛

wicked crown
misty sigil
#

right

wicked crown
#

Invalid Form Body

#

whats the problem?

misty sigil
#

imported discord twice

#

nice

wicked crown
#

still same error

misty sigil
#

What’s the full error

#

including stack trace

wicked crown
#

UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body

umbral zealot
#

you cannot send user and message.author directly in embeds

opal plank
#

@cinder patio did what i say make sense?

misty sigil
#

oh ok that’ll do

umbral zealot
#
.addField(`Banned User` , user)
.addField(`Banned By` , message.author)

These 2 lines are invalid

wicked crown
#

oh

umbral zealot
#

it can't show the embed

#

the error is about the embed not sending

wicked crown
#

its showing the embed

umbral zealot
wicked crown
#

but its not banning the user

quartz kindle
#

the owner said me fu i said go die thats why

#

lmfao

umbral zealot
#

ok then I guess it .toString()s it automatically

misty sigil
#

keep in mind

#

he had 6-20gb ram usage

umbral zealot
misty sigil
#

FOR 140 SERVERS

umbral zealot
#

oh wait you are

#

after the embed

opal plank
#

pppfff

umbral zealot
#

that's confusing

opal plank
#

i had 4gb for 2k

misty sigil
#

Tim has like < 200mb for 7k

opal plank
#

caching goes brrr

umbral zealot
#

you should use a .catch() and .then() on the ban() so that you know if the ban worked or not

quartz kindle
#

< 150

misty sigil
#

bloody hell

umbral zealot
#

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

opal plank
#

in fairness im keeping images loaded in memory for canvas, and they should be quite heavy too

wicked crown
#

lol

opal plank
#

as well as different use objects

quartz kindle
opal plank
#

8k servers pog

misty sigil
#

yo 8k poggers

cinder patio
boreal iron
#

What's the fasted method to access the guild id of a message? message.member.guild.id ?

near stratus
opal plank
opal plank
#

or if theres nothing, its an empty array

quartz kindle
#

fastest or shortest?

opal plank
#

or null

#

its up to you tbh

quartz kindle
#

because there is no performance difference lul

wicked crown
#

@near stratus still same error

near stratus
cinder patio
opal plank
#

no preblomo

boreal iron
#

I wonder I couldn't find a property in the console log but the documentation says there's a guild property of message

cinder patio
opal plank
#

cuz there is

near stratus
wicked crown
opal plank
#

dms and some other channels might not have guild in it

near stratus
#

The error shows that