#permis

1 messages · Page 1 of 1 (latest)

gloomy sigil
#

pemissions

#

you bot need the permissions

shell moat
#

it has admin

gloomy sigil
#

hoo you are sending a message to guild not to a channel

shell moat
#

oh fuck

gloomy sigil
#

kkkk

#

lol

shell moat
#

i didnt notice that

sullen minnow
#

also there's no need to fetch guilds, they're already cached

#

neither channels

shell moat
#

do you prefer guilds.cache.get or guilds.fetch?

gloomy sigil
#

guilds.cache.get

shell moat
#

why

sullen minnow
#

always get from the cache instead of requesting the API when possible

shell moat
#

rate limit?

sullen minnow
#

if you fetch too often it might happen yeah

shell moat
#

alright

#

thanks

#

it was a stupid mistake tho

sullen minnow
#

anyways aside from that it's bad practice to always request the API for anything when you can avoid that

gloomy sigil
#

ya

sullen minnow
#

I wouldn't say it's API abusing but it's something near that

#

generally you can get everything from the cache but users and guild members (and maybe DMs but not too sure)

shell moat
#

member.user.defaultAvatarURL

#

is it wrong?

sullen minnow
#

it's a method

gloomy sigil
#

yes

shell moat
#

it doesnt fetch the pfp

gloomy sigil
#

member.user.displayAvatarURL()

#

this one

shell moat
#

its not a property?

gloomy sigil
#

is

shell moat
#

TypeError: member.user.defaultAvatarURL is not a function

sullen minnow
#

displayAvatarURL

#

I forgot about that

gloomy sigil
shell moat
#

i hate the updates

sullen minnow
#

well major changes were made in v12, luckily the transition to v13 was smoother

shell moat
#

finally

#

thanks btw

sullen minnow
#

np

shell moat
#

i need some time to get used to it