#development

1 messages · Page 1427 of 1

cursive forge
#

That's the point of trial and error, so no

bitter jungle
#

example if your prefix is '!' that would match:

"! help"

earnest phoenix
#

it wouldn't

tranquil drum
#

it would match "! + help"

earnest phoenix
#

^

bitter jungle
#

without the '+' correct

#

sorry

earnest phoenix
#

without the plus yeah

tranquil drum
#

ahh

bitter jungle
#

I were answering this

cursive forge
#

Okie let me test it out

#

Okie it works thanks

silent cloud
#

:D

restive notch
#

Is there any way to lower ping to discord servers in my bots code?

earnest phoenix
#

no

restive notch
#

Darn

earnest phoenix
#

get a server close to either NYC or san francisco

#

the api servers are located there, it can significantly reduce latency

restive notch
#

I use physical servers and I live a while away from there I would but I can't sadly

earnest phoenix
#

oof

restive notch
#

Is there anyway to use some sort of CDN possibly?

earnest phoenix
#

for what 🤔

restive notch
#

Yeah good, point it's a stupid question

earnest phoenix
#

i mean if you absolutely don't have any other option, you could go through your code and optimize every nook and cranny

restive notch
#

I could

earnest phoenix
#

for example if you have any database calls, consider caching etc

restive notch
#

I don't have any database calls in my bot it's all local

earnest phoenix
#

ah

restive notch
#

And most of my code is already optimized for the most part

#

I'm using command handlers I'm using the least amount of code I NEED and I still need to make it so if you do E! Instead of e! It would work it doesn't do that yet

lunar sequoia
#

What is your ping? I wouldn't bother if the ping is anywhere around ~100

restive notch
#

It varies on servers

#

The most recent check I did was 59 MS lmao

lunar sequoia
#

That's more than enough. I wouldn't be too worried about it.

restive notch
#

But I can do more

lunar sequoia
#

You can but, I don't see a reason you want to reduce it even further. Do you have a specific purpose for low response time commands/interactions?

restive notch
#

Not really, now that I see it I'm trying to optimize it like I would a website or something like that

#

Yeah I guess 59 MS is ok

jade wedge
#

any of yall thinking of developing a new Rainbow Bot

drifting wedge
#

My bots latency is always like 100

#

But I don't get why

#

My servers are in states island

#

And when I heroku'd it it was like 20

#

Same code

earnest phoenix
#

yep I tried other hosts too its was about 100 ms.. On heroku i get about 20 - 14

drifting wedge
#

Ye, wierd

#

It's not the code

earnest phoenix
#

Maybe cuz their servers are close to the gateway or they have good bandwidth

drifting wedge
#

I doubt it

#

My heroku was in Virginia

#

And my current one is galaxygate in New York

#

So it should be even better

earnest phoenix
#

hm

trail lark
slender thistle
#

bot.comnandusages = 0

on_command:
bot.commandusages += 1

vague imp
#

Lol

#

@trail lark use a global variables to keep track of commands

#

Usage

#

That's it

long marsh
#

I'm slightly ignorant towards webhooks; however, are we essentially opening a port on our servers and allowing top.gg to send information?

tired panther
old latch
earnest phoenix
restive furnace
stiff walrus
long marsh
earnest phoenix
#

yes

#

top.gg needs to be able to hit your webserver

#

grammar 100

#

tldr webhooks are reverse apis

#

instead of you making requests to the api, the api makes requests to you

long marsh
#

Right, it’s a push-based system.

#

The only problem, at this point, is local testing - but I should be able to figure that out 👍🏻

#

Thank you for your help!

silent cloud
leaden lake
#

How can I have all results available ? (the 2 wait_for in my asyncio.wait) ```py
def checkchallenger(reaction, user):
return user == ChallengerUser and (str(reaction.emoji) == '✋' or str(reaction.emoji) == '✊' or str(reaction.emoji) == '🖖') and reaction.message.id == ChallengerMessage.id

        def checkchallenged(reaction, user):
            return user == ChallengedUser and (str(reaction.emoji) == '✋' or str(reaction.emoji) == '✊' or str(reaction.emoji) == '🖖') and reaction.message.id == ChallengedMessage.id

        
        done, pending = await asyncio.wait([
                                client.wait_for('reaction_add', timeout=120.0, check=checkchallenger),
                                client.wait_for('reaction_add', timeout=120.0, check=checkchallenged)
                            ], return_when=asyncio.ALL_COMPLETED)

        try:
            stuff = done.pop().result()
            print(stuff)
orchid cobalt
#

Hey I need help in connecting my discord.py to PostgreSQL database on RDP(windows), it works perfectly on my local pc but when I try to connect to it from RDP , create_pool throws an error that host denied the connection request.
I have explained my problem more specifically here,Please answer if you can https://stackoverflow.com/questions/65121640/how-to-connect-to-my-postgresql-database-from-rdp

lusty quest
#

so you want to use the local Database on your PC from a server outside of your network?

prisma wren
#

I just created my bot and was able to give it the ping command and it just went offline. Is there a way to fix that or do I just have to wait it out?

rustic nova
#

check what caused your bot to go offline

prisma wren
#

How do I do that?

lunar sequoia
#

Check your console for any errors.

prisma wren
#

ok

median timber
#

Guys I’m trying to code an help me command but it’s not mention the user... can I get advice

old latch
#

what language, what library and what exactly are you trying to do

humble rock
#

I'm trying to do a event log w/mongoose but...

client.on('channelCreate', channel => {
    channel.guild
            ^^^^^
            guild of undefined
})

I need property guild, how i can have it? (sorry for my english, i'm not en)

earnest phoenix
#

message.guild.members.cache.get('697348519295713302').displayAvatarURL() whats wrong in it ?

pale vessel
#

member.user.displayAvatarURL()

ionic dawn
#

user

#

you just beat me by 1s

pale vessel
#

What library?

humble rock
#

discord.js

#

the console say: guild of undefined

tired panther
#

I made a for loop, which will sent messages to other guilds 8 times each in one minute, how can I built in a sleep, that it does not overload the api

ionic dawn
#

just incase, can you send the code? not just the error

#

you should be able to get the guild doing something like this: let guild = channel.guild

humble rock
#

Ok

pale vessel
#

channel is undefined for them

tired panther
humble rock
strange warren
pale vessel
#

Can you not

tired panther
#

stop it

humble rock
#

Ban

tired panther
#

@humble rock do u have an idea in my prblem?

earnest phoenix
#

fuck off

tired panther
earnest phoenix
#

@weak parrot

earnest phoenix
pale vessel
#

you know it's cringe when cry had to ping a mod

earnest phoenix
#

i hate children

humble rock
#

Ban he!

earnest phoenix
#

@earnest phoenix you hate yourself ?

strange warren
#

im 50o yaers

earnest phoenix
#

i'll be an adult in 6 months

#

lol

#

but to answer your question, yes

pale vessel
#

OF in 6 months, nice

earnest phoenix
#

@earnest phoenix when you get adult you'll die KEKW

past needle
# humble rock No guild property

because it can be a DM channel, so they would not add the guild property in the properties list, but you'll see that if you add console.log(channel.guild) (if the channel is in a guild) then it will work

rustic nova
humble rock
#

Ok

past needle
#

,_,

#

can someone mute this guy

humble rock
#

ban

past needle
#

the thing is he thinks he's funny

pale vessel
#

soon

#

okay

humble rock
#

ban

#

ban

#

ban

rustic nova
#

underage probably

gilded plankBOT
#

dblMod Banned Mennesken#3750 (@strange warren)

woeful pike
#

noo not my mama :(

past needle
#

:D

earnest phoenix
#

i'm concerned that those are the only words in his vocabulary

pale vessel
#

Thanks

past needle
#

thank chu

pale vessel
#

They almost fucked my mama :(

past needle
#

:c

#

wait but

#

who was the mod

#

oh i think it's Le Dieu Revolx

#

i mean idk

pale vessel
#

Yeah

#

Anyway

weak parrot
#

Sorry was just busy with internship 😔

past needle
#

:c

#

np

supple oriole
#
Node "localhost" encountered an error: connect ECONNREFUSED 127.0.0.1:2333.
earnest phoenix
#

Damn

supple oriole
#

Help

earnest phoenix
#

Insta ban

past needle
#

it took 5 minutes but yea

earnest phoenix
#

No

supple oriole
#

nice

past needle
#

"ECONREFUSED" means that the it refused connexion

pale vessel
#

Maybe your node is offline?

#

Try restarting your server

supple oriole
#

Well lavalink said this

#
2020-12-02 08:39:19.996 ERROR 2576 --- [           main] o.s.boot.SpringApplication               : Application run failed
pale vessel
#

oof

past needle
#

oooooooooooh you're usin lavalink

pale vessel
#

No idea what that means

supple oriole
#

I have application.yml working

pale vessel
#

Do you have logs?

supple oriole
#

ye

#

spring logs

#
    at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_241]
    at java.lang.ClassLoader.defineClass(Unknown Source) ~[na:1.8.0_241]
    at java.security.SecureClassLoader.defineClass(Unknown Source) ~[na:1.8.0_241]
    at java.net.URLClassLoader.defineClass(Unknown Source) ~[na:1.8.0_241]
    at java.net.URLClassLoader.access$100(Unknown Source) ~[na:1.8.0_241]
    at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_241]
    at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_241]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_241]
    at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_241]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_241]
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93) ~[Lavalink.jar:na]
    at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_241]
    at lavalink.server.Launcher.getVersionInfo(Launcher.kt:50) [classes!/:na]
    at lavalink.server.Launcher.getVersionInfo$default(Launcher.kt:49) [classes!/:na]
#

Yea.........

#
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_241]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_241]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_241]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_241]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [Lavalink.jar:na]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [Lavalink.jar:na]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [Lavalink.jar:na]
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [Lavalink.jar:na]
#

@pale vessel Logs^

past needle
#

you're coding in xml ?

earnest phoenix
#

that isn't the full stacktrace

pale vessel
#

doesn't look like much yeah

supple oriole
#

ok.

earnest phoenix
#

so... send it?

#

you can hastebin it too

past needle
#

you can post it in hastebin

supple oriole
#

alr

#

lemme post it in hastbin

#

*haste

past needle
supple oriole
pale vessel
#

hastebin is very funny with their extensions

earnest phoenix
#

you're running an older version of java

supple oriole
#

how do I update it Thonk

past needle
#

i found

#

this

#

,v,

#

the same error

#

as yours

supple oriole
#

:o

earnest phoenix
#

no idea but you're running java 8

#

lavalink requires at least java 11

supple oriole
#

how do I update java Thonk

pale vessel
#

have you tried googling it

supple oriole
#

yes

#

no

past needle
#

at your own risks

earnest phoenix
#

windows - https://adoptopenjdk.net/
linux - use your package manager

AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.

supple oriole
#

ok.

past needle
#

ooooooooh linux

pale vessel
#

windows seven, ok

earnest phoenix
#

oh

#

adoptopenjdk also offers prebuilt binaries for linux and mac

#

sweet

#

so on linux you just download the tarball

tired panther
#

does any one have experience in making on top.gg in the field a nice look

rustic nova
#

the bot page?

past needle
#

,_, we'll never get the answer

timber fractal
#
client.on("ready", () => client.user.setPresence({
    activity: {
    name: "d!help | Luckie#6313 is the best because he made me!",
    type: "PLAYING"
    },
    status: "dnd"
}));```
Why if i use this code his status is not "dnd" but online
past needle
#

you change

#

dnd

#

to

#

online

#

,_,

tribal solar
delicate shore
#

Hey
Do you any npm package
which can return name of all songs
from a spotify playlist link

#

if you know

#

Then ping me

earnest phoenix
#

do it yourself 🤷‍♂️

#

it's not that hard to use spotify's api

past needle
#

yea there is litterally an api "spotify" '-'

delicate shore
#

Ok thanks .

#
  {
    "artists": [
      {
        "external_urls": {
          "spotify": "https://open.spotify.com/artist/5a2w2tgpLwv26BYJf2qYwu"
        },
        "href": "https://api.spotify.com/v1/artists/5a2w2tgpLwv26BYJf2qYwu",
        "id": "5a2w2tgpLwv26BYJf2qYwu",
        "name": "SOPHIE",
        "type": "artist",
        "uri": "spotify:artist:5a2w2tgpLwv26BYJf2qYwu"
      }
    ],
    "duration_ms": 188520,
    "episode": false,
    "explicit": false,
    "external_urls": {
      "spotify": "https://open.spotify.com/track/18yTgk0VgjB9XDj8h2q6Td"
    },
    "href": "https://api.spotify.com/v1/tracks/18yTgk0VgjB9XDj8h2q6Td",
    "id": "18yTgk0VgjB9XDj8h2q6Td",
    "name": "JUST LIKE WE NEVER SAID GOODBYE",
    "popularity": 34,
    "preview_url": "https://p.scdn.co/mp3-preview/d5790004de973f83756311075125ffc965e522c8?cid=a46f5c5745a14fbf826186da8da5ecc3",
    "type": "track",
    "uri": "spotify:track:18yTgk0VgjB9XDj8h2q6Td"
  }
]```
#

To get the name part

earnest phoenix
#

well uh

#

it's an array

#

you need to index it

#

i really don't understand why people bloat their node apps with REST api libs

#

like bruh you're already using a non typed language there's nothing to wrap

past needle
#

if what you sended is a variable, var[0].artists[0].name

delicate shore
#

Okk thanks

supple oriole
#
Node "localhost" encountered an error: connect ECONNREFUSED 127.0.0.1:2333.
(node:149) UnhandledPromiseRejectionWarning: RangeError: No available nodes.
#

Criiiiiiiii

lusty quest
#

to what did you try to connect?

supple oriole
#

Lavalink and erela

#

Trying to make a lavalink bot.

delicate shore
#

Omg

supple oriole
#

Used their example.

delicate shore
#

I did it

#

Myself

supple oriole
#

And this happen.

delicate shore
#

I got it

lusty quest
#

so everything is on the same machine right?

delicate shore
#

Let's go

#

boi

supple oriole
lusty quest
#

do you need to allow connections?

supple oriole
#

I don't know.

lusty quest
#

bcs it looks like whatever tryed to connect to port 2333 didnt found anything

supple oriole
#

Im connecting to port 7000

lusty quest
#

well the error expects 2333

supple oriole
#

what the

#

Im using their example

green kestrel
#

why do people with big bots not publically talk about/document what they do, implementation wise to scale their bots?
for example, its not as easy as just "i scale by adding more vps's"... theres code and infrastructure design that goes into making that possible.
I'm thinking of sharing what i've done, anyone interested in it if i do?

#

a lot of it if written generically works for any programming language

lusty quest
#

Mee6 made it public atleast what they do

green kestrel
#

where?

tight plinth
#

I guess that can be good yeah

lusty quest
#

they use a Kubernetes cluster

#

idk read it somewhere a while ago

supple oriole
#

a

#

Im using using their example and I got the error

tight plinth
#

the problem is from your lavalink node

tight plinth
#

not from the code

lusty quest
supple oriole
#

how do I fix that

green kestrel
#

i'm somewhere in the middle between 'small' and 'big' imho

tight plinth
#

well

#

ig you can learn how ports works

green kestrel
#

because im not yet at the point where discord give better ways to scale shards up and down without restarting clusters

#

not till i get to like 200k servers

tight plinth
#

if you know how to setup dbl web hook u know how to setup ll node

lusty quest
#

well Kubernetis makes it super easy to scale

supple oriole
#

Im just using their example bruh ;-;

lusty quest
#

if you need more horsepower add another worker node

green kestrel
#

you still have to code for that

lusty quest
#

yea thats sadly the issue

green kestrel
#

you cant just dump any old bot in a kubernetes and have it scale

#

thats the bit people dont share

lusty quest
#

but you can automate kubernetis so its possible

#

but i guess they wont make the scaling part public bcs its probably annoying to make or they dont want give everyone an easy way to compete

green kestrel
#

knowing how to scale doesnt give you any competitive advantage

supple oriole
#

how to setup ll node :cri:

green kestrel
#

you gotta get the users to invite your bot first to need it

lusty quest
#

well idk there is probably a stupid reason

#

the article contains some code snippets in how they scale

green kestrel
#

see the problem i see with discord is...

#

imagine i have a bot with 32 shards yes

#

and i have to scale up to 48 or 64

#

i cant just 'add 32 shards'

#

ALL the shards must be restarted together

#

because adding more shards shuffles around what servers belong on which shards

lusty quest
#

cant you make a rolling update with Kubernetis?

green kestrel
#

as its like guild_id >> 11 % shard count

#

and im sure that for huge bots, they do it in a way that doesnt need the total restart to scale up or down, but this is something discord are keeping tight lipped on

#

rolling update or not, adding extra shards means an update of every cluster, yes?

#

because each server then belongs on a different shard id and all shards must reconnect to establish what servers are on them and tell discord how many shards total ther are

#

the identify message says 'im shard X of Y', and Y has changed, so every instance needs to redo that

earnest phoenix
#

i'm certain that behind the scenes the monopoly bots like mee6 and dyno have dumpster fires

tight sand
#

does anyone know a good place to host a bot ?

earnest phoenix
#

check out pins

tight sand
#

thanks

lusty quest
#

cant you just force a shard id? (never did sharding so idk)

quartz kindle
#

you cant assign guilds to shard ids

lusty quest
#

yea just realized it

#

but a rolling update should still work i guess

quartz kindle
#

the only possible way to do seamless rolling update would be to tell old shards to disable specific guilds when a new shards connects

#

for example, new shard 0 connects, broadcast all its guild ids to all old shards, old shards flip switch to ignore all messages coming from those guilds

#

repeat for every new shard

#

once an old shard has disabled all its guilds, kill it

green kestrel
#

yeah

late kraken
#

do anyone have any bots that track how many people they have invited to the server. and you can make it so it automatically gives you somthing when you get a certain amount of invites???

rustic nova
#

sounds like a hard request, just look for it through the top.gg search feature

late kraken
#

cool thx

carmine summit
#

That seems pretty easy actually

#

I have made myself an invite manager bot

#

I can put something like

if (invites >= 25){
user.roles.add()
}
quartz kindle
#

its not nearly as easy as it could be if discord actually provided invite information in the memberAdd event

carmine summit
#

yeah

#

wait

#

that's what I store...

#

then if uses

#

comes more than 25

late kraken
#

jeez my respect for yall and this programming thing has increased lol v clever

carmine summit
#

the inviter will get the role

late kraken
#

wait so you can do the thing i asked

quartz kindle
#

ye but to increase that number you have to fetchInvites again every time someone joins

#

which is a pain

carmine summit
#
async function update(guild) {
  let invites = Array.from(await guild.fetchInvites())

  let guildInvites = []

  await invites.forEach(i => {
    let obj = {
      "inviteCode": i[0],
      "uses": i[1].uses,
      "inviter": i[1].inviter.id
    }
    guildInvites.push(obj)
  })
  db.set(`${guild.id}.invites.${guild.id}`, guildInvites)
}
late kraken
#

ahh ok cool well i found 1 which looks alright on top.gg

#

but if you make 1 that is :do anyone have any bots that track how many people they have invited to the server. and you can make it so it automatically gives you somthing when you get a certain amount of invites??? dm me pls thxxxx

carmine summit
#
  let guild = member.guild
  update(guild)
})```
#

smth like that

quartz kindle
#

i think they want a bot that does it, not code it themselves

carmine summit
#

smth like that lol

#

bot no have pfp lmao

hard anchor
#

Do you recommend using PRAW for reddit memes? with python 3.9

earnest phoenix
#

Do u know how to make the bot send a message when it joins a server (discord.js) I tried to do it but didn't work

rustic nova
#

i suggest sending it through the systemchannel of that server if one is set

carmine summit
#
client.on('guildCreate', guild => {
  <channel>.send()
})
#

@earnest phoenix

#
client.on('guildCreate', guild => {
  guild.channels.cache.forEach(c => {
    c.send('Hello!')
  })
})
hard anchor
#

Do you recommend using PRAW for reddit memes? with python 3.9

carmine summit
#

yes

quartz kindle
#

lmao

carmine summit
#

it does what he wanted to do

#

¯_(ツ)_/¯

#

he didnt say anything about it once

quartz kindle
#

imagine it being added to a server with 500 channels

carmine summit
#

PAIN

late kraken
#

ok ye bot trash

quartz kindle
#

one of my bots is in a server with 500 channels lul

late kraken
#

cwikks that bot u were just making about the invite count and the auto role added when getting to a ceratin amount of invites???

#

are you just messing around with t or are u gonna make it legit cuz i need it haha

earnest phoenix
#

Meh

#

@quartz kindle cap

#

250 channels is max

#

I think

carmine summit
#

hmm

#

im kinda lazy

#

but ill try

#

uh

late kraken
#

i like ur prof pic of doggo

quartz kindle
carmine summit
#

<img src="https://image.com/image.png">

#

<img src="./image.png">

slate oyster
#

Sometimes my bot gets a 30-second gateway latency, plus super slow API response timea, and I'm not sure why

carmine summit
#

is this correct?member.roles.add(guild.roles.cache.get(`8475364274834952647`))

summer acorn
hidden lynx
#

Hey would be glad if anybody could help me here or had similar experiences:
I'm using ytdl-core for my music bot bot recently i keep getting this stupid error when i try const result = await ytdl.getInfo(url):

ytdl-core version ^3.4.2

earnest phoenix
#

what os @summer acorn

summer acorn
#

Ubuntu 20.04

carmine summit
#

okok

earnest phoenix
#

ah oke lemme login real quick to my server

carmine summit
#

gotcha

earnest phoenix
#

should be in /etc/ngnix

quartz kindle
#

the main nginx.conf goes ^

#

the rest of the files you define in nginx.conf using includes

earnest phoenix
#

yes ^^
I dont use nginx, i use apache2

quartz kindle
#

for example in the link you posted, nginx.conf has include /etc/nginx/conf.d/*.conf;

carmine summit
quartz kindle
#

which means it will look for other conf files in that folder

summer acorn
#

oh I see, one of the people on the vps uses nginx for something, and I checked that folder and it was empty, so I was confused

earnest phoenix
#

apache2 u just drop the conf in sitesavailable then do a2ensite and type in the name

summer acorn
#
  • they're offline, which is why I didn't ask them
#

I see,

#

Thank you for the help ^^

earnest phoenix
carmine summit
#

wat dis mean

rustic nova
#

no access to whatever you're trying to do

#

such as channels

carmine summit
#

rightttt

rustic nova
#

for example getting messages from a channel the bot cannot access

astral yoke
#

this part breaks my code somehow but no errors appear let dm = bot.db.get(`dmmessage_${reaction.message.guild.id}`) if(dm === null) return dm = "{transcript} is your log" dm.replace("{transcript}", data)

#

anyone know why

lyric mountain
#

define "breaks"

#

like, what does it do that's not the expected result?

carmine summit
#

guild.members.cache.get() doesnt work?!?!?!

lyric mountain
#

it does, if you have caching enabled

carmine summit
#

caching.enable()

#

?

lyric mountain
#

no

#

look at the docs for the right way to enable cache

carmine summit
#

?

lyric mountain
carmine summit
lyric mountain
#

google -> "insert lib name how to enable cache"

carmine summit
#

@lyric mountain aaaa

#

??

lyric mountain
#

look at the results

carmine summit
carmine summit
cinder sandal
#

how do i get a json value that is in <this image>
using node-fetch

carmine summit
#

I dont see an official docs site

cinder sandal
#

how do i get a json value that is inside of something

lyric mountain
#

no? I've found it just by taking a glimpse at the image

carmine summit
#

no?

cinder patio
#

Um... in discord.js all caching is enabled by default and there is no official way to disable it (only exception to this are message caches)

carmine summit
#

@cinder patio guild.members.cache.get() doesnt work?!?!?!

cinder patio
#

Discord doesn't cache all guild members if there are more than 200 afaik

carmine summit
#

afaik

lyric mountain
carmine summit
#

what's afaik

#

how can I get a member?? I only have its ID

cinder sandal
#

how do i get the parent json

cinder patio
#

as far as I know

#

fetch it

#

guild.members.fetch

lyric mountain
#

that's the json you're trying to access

#

that was just an example

#

think of . as opening folders

#

a json can have more jsons

cinder sandal
#

where

lyric mountain
carmine summit
lyric mountain
#

a json is like a folder with files

#

it can also have other "folders" inside it

cinder patio
#

and that's it, it returns a promise which contains a GuildMember object

carmine summit
#

alrigthy

cinder sandal
# lyric mountain

UnhandledPromiseRejectionWarning: ReferenceError: response is not defined

lyric mountain
#

you're dealing with the json in the wrong place probably

carmine summit
cinder patio
#

show the code

carmine summit
#

guild.members.fetch(memberId).roles.add(roleId)

viscid gale
#

oof

#

ok check guild.members.fetch(memberId)

cinder patio
#

guild.members.fetch(memberId) returns a promise, not a GuildMember object. you need to resolve the promise using await or then

viscid gale
#

i wanna see what on earth that'd be instead

carmine summit
#

ah right

carmine summit
#

makes sense

#

100%

rustic nova
#

@scenic kelp here too

hidden lynx
#

Hey would be glad if anybody could help me here or had similar experiences:
I'm using ytdl-core for my music bot bot recently i keep getting this stupid error when i try const result = await ytdl.getInfo(url):
I tried several ytdl-core versions
ERROR: Error: Error parsing info: Unable to retrieve video metadata

astral yoke
#

how would i save an embed and then later outside of the code be able to change the color and title of it

loud ingot
#

how do i use the top.gg token and make it log the user who voted, and log it in the console? I'm on discord.js

astral yoke
vague imp
#

@astral yoke you can't change the color without writing code to edit it

astral yoke
#

I want to edit it

valid grotto
#

"Outside of the code" ?

astral yoke
#

so basically

#

    let sent = message.channel.send(new Discord.MessageEmbed()
    .setTitle('**Suggestion**')
    .setDescription(message.content)
    .setColor('75188c')
).then(embedMessage => {
  embedMessage.react(bot.emojis.cache.get("756063599469789264"))
  
  embedMessage.react(bot.emojis.cache.get("756063645317726278"));
})
message.delete()

  }```
#

was wondering how to make an acceptsuggestion command which changes the color and title to like "Accepted Suggestion" with setting the color green

vague imp
#

Like on react

valid grotto
astral yoke
#

how would i edit the embed properties though?

valid grotto
#

This is what I do most of the time @astral yoke

             message.channel.messages.fetch(ID).then(OldEmbed => {
                NewEmbed = OldEmbed ;
                NewEmbed.embeds[0].color = xxxx;
                OldEmbed.edit({embed: NewEmbed.embeds[0]});
             })
astral yoke
#

Whatsthe NewEmbed = OldEmbed part?

valid grotto
#

NewEmbed will get your OldEmbed's properties.

#

May be a better way to do it, I'm not sure but this work just fine

gentle lynx
#

If i enable fetchMembers how long will the bot take to turn on?

#

I have tried it on my testing bot which is in 3 servers and its taking a long time to turn on

#

So I was wondering it its even worth it to put it in my main bot

#

If

lunar sequoia
#

That isn't suggested to have enabled at all. What is your use case for having all members fetched at startup?

gentle lynx
#

to get all members

loud ingot
gentle lynx
#

For example in client.users.cache

#

Itd be better if it has access to all members

#

Instead of the cached ones

lunar sequoia
#

Having the fetchAllMembers client option is really bad for your cache memory since as your bot grows, the amount of ram consumed keeps increasing. This is not recommended for larger bots.

However, to answer your first question, yes, the login times do increase but, how long it would take before it fires the ready event is completely dependent on how many members that the bot had to cache.

carmine summit
#

How do I get the name of an id of a role?

gentle lynx
#

Well how before, you could turn on your bot just as fast as now and still be able to get all members?

lunar sequoia
carmine summit
#

guild.roles.fetch()

#

then how do I get the data

#
let roles = await guild.roles.fetch()
roles.get()
```?
lunar sequoia
astral yoke
#

thank you @valid grotto

valid grotto
earnest phoenix
#

Server vanity url?

carmine summit
#

dbl

astral yoke
#

Yeah, I added a title part which changes the title, works perfect, exactly what I wanted @valid grotto

lunar sequoia
carmine summit
#

i mean

#

I have to do it multiple times

#

it will lag the bot

#

I have an array of which roles to collect

#

its better to cache it then run .get() multiple times, rather than running .fetch() multiple times

lunar sequoia
#

Once you fetch the roles, you can get the desired role by doing <RoleManager>.cache.get('ROLE_ID')

carmine summit
#
let roles = await guild.roles.fetch()
roleArray.forEach(r => roles.cache.get(r).name)
#

correct me if im wrong

#

ok now

valid grotto
#

You're trying to get the name?

lunar sequoia
#

Ah yes now

carmine summit
#

right

lunar sequoia
#

Do r.id

carmine summit
#

roleArray is an array that consist of multiple role ids

lunar sequoia
#

Also, you should be doing something with the name since right now, you're not storing those names anywhere

carmine summit
#

?eval

lunar sequoia
#

That means that the role list does not have the role id that you were searching for.

carmine summit
#

ok

eternal osprey
#

hey how do i set my embed in python to a random color each time the embed gets called?

#

i know how to in javascript, just can't get the hang of it in python.

lyric mountain
#

generate a random hex each time

green kestrel
#

i might make two containers on my server and put mysql in them to try it

#

right now im running on a single instance

livid lichen
#
  RandomPuppy(RandomSub).then(async url => {
    const Image = ({
      files: [{
        attachment: url,
        name: "Dogo.png"
      }]
    })

    const RedditEmbend = new Discord.MessageEmbed()
      .setTitle("Here's a cute image of a dog!")
      .setImage(Image)
      .setURL(`https://reddit.com/r/${RandomSub}/`)
      .setFooter(`*Dog image from r/${RandomSub}*`, process.env.bot_logo)
      .setColor("#0099ff")
      .setTimestamp()

    message.reply(RedditEmbend) ``` `Unhandled rejection error! DiscordAPIError: Invalid Form Body
embed.image.url: Could not interpret "{'files': [{'name': 'Dogo.png'}]}" as string`. I don't know what to do.
crimson vapor
#

setImage requires a string as the input iirc

livid lichen
crimson vapor
#

you should be able to do Image.files[0].attachment

#

but if not you have to check the docs

livid lichen
crimson vapor
#

what do you mean by a blank image?

livid lichen
carmine summit
#

blank image

crimson vapor
#

so no image

livid lichen
crimson vapor
#

because I would assume a blank image has size but is either all white or invisible

crimson vapor
#

im not sure you should check the docs

dusky mason
#
async def on_message(message):
    if f"<@!{client.user.id}>" in message.content:
#

what would i use

#

instead of message.content

#

for just the message

slender thistle
#

sorry

#

what

dusky mason
#

because if it's in the content then you can do like p!battle @(bot) and the bot would send it

#

like

#

if its in the content

#

it would send if it's included

#

i want it to be

#

just the ping

crimson vapor
#

does py have a built in mentions

slender thistle
#

You can do if client.user.mention in message.content

crimson vapor
#

like how djs you can do message.mentions

slender thistle
#

or iirc user.mentioned_in exists too

dusky mason
#

but how would i make it

#

so it only responds when ONLY the ping

#

not the ping and some word

slender thistle
#

Then you would use comparison instead of inclusion

#

== instead of in

dusky mason
#
async def on_message(message):
    if client.user.mention == message.content:```
#

that?

crimson vapor
#

would message.content not be p!battle @(bot)

dusky mason
#

because if i mention my bot

#

it would send that message

#

when you ping it

#

and it's really annoying

#

i want it to send the "welcome" message when its pinged individually

slender thistle
#

Try it

dusky mason
slender thistle
#

Right

#

I hate Discord

dusky mason
#

lmao i've never seen anything so sad tho

#

like

#

i was so happy

#

and then

slender thistle
#

Well the issue is Discord for some unknown to Zeus reasons has two types of mentions

dusky mason
slender thistle
#

So, yeah. I take my words back regaring the user.mention thing and advise you to do it the way you did

dusky mason
#

yeah i got it

#
async def on_message(message):
    if f"<@!{client.user.id}>" == message.content:```
#

just had to do ==

#

thanks tho

slender thistle
#

Include the mention without the exclamation mark also

dusky mason
#

k

slender thistle
#

use or for that

crimson vapor
#

is there a String.includes function?

#

like there is in js

hollow sedge
#

you can just use in

dusky mason
#

if f"<@{client.user.id}>" == message.content:

#

like that shiv?

crimson vapor
#

so would you not just want to do if "<@{client.user.id}>" in message.content

#

so any message with a mention would work

slender thistle
#

that's literally what they are doing

dusky mason
#

thats the exact opposite i want

#

i want any message with the mention not to work

slender thistle
#

except the in

#

yeah

slender thistle
dusky mason
#

oh so if... == message.content or if!@... == message.content?

#

like two if statements?

hollow sedge
#

When you use or you don't need another if

slender thistle
#

mhm

crimson vapor
#

the ! in the <@!>

slender thistle
#

What Cloud said

lyric mountain
#

does someone know how can I build a standalone c++ executable? (CLion/MinGW)

slender thistle
#

You could try asking Brain if he has ever attempted to do that

lyric mountain
#

the code runs fine when executed from clion, but the generated .exe gives 0xc000007b error

dusky mason
#

if f"<@{client.user.id}>" == message.content or f"<@!{client.user.id}>" == message.content:

#

so that?

hollow sedge
#

Yes

dusky mason
#

alr tysm

slender thistle
#

inb4 message.content.lower() KEKW

lyric mountain
#

.lower() is kinda unnecessary there tho

dusky mason
#

yeah since it's a ping

crystal sedge
#

yeah, it's just a mention

dusky mason
#

can't caps lock a mention

#

@ BEARIC

thick gull
#

@thick gull

lyric mountain
#

theorethically there are lower/upper versions of numbers

hollow sedge
#

I think he was just saying that mentions are really finicky

lyric mountain
#

computers just don't use them

slender thistle
#

r/wooosh

thick gull
#

reddit outside of reddit

#

cring

crimson vapor
#

tbh what is r/wooosh?

lyric mountain
#

not a wooosh at all tho

hollow sedge
#

How is that cringe though

slender thistle
#

It was a joke but definitely not a decent one

lyric mountain
#

considering I've seem even worse things in this channel, I'd not be surprised if someone actually .lower() a number

slender thistle
#

KEKW

#

.lower() an empty string

sudden geyser
#

building.lower()

slender thistle
#

kekw

crimson vapor
#

69.lower()

slender thistle
sudden geyser
#
[member.lower() for member in guild.members if member.nick.startswith("!")]```
dusky mason
#

so should i do .lower()?

slender thistle
#

Nah, not in this case

dusky mason
#

also when my friend does it

#

it doesn't send it

#

but when i do it does

slender thistle
#

print message.content ffs

pale vessel
#

In color or black and white?

slender thistle
#

In a rainbow

dusky mason
#

so this happened

#

when i ping it

#

it works

#

and prints @feral valve

#

but when my friend does

#

it doesn't print anything

slender thistle
#

Could you screenshot what it printed

#

Show your full on_message

dusky mason
#
async def on_message(message):
    if f"<@{client.user.id}>" == message.content or f"<@!{client.user.id}>" == message.content:
        embed = discord.Embed(title="**PandaMod**",
                              description=f"**Hello** {message.author.mention}**! ![roowave](https://cdn.discordapp.com/emojis/743874097678778509.webp?size=128 "roowave") I'm PandaMod, a multipurpose, musical, fun, cute bot! To get started, my prefix is** `{prefix}` **and you can do** `{prefix}help`** to pull up the full list of commands. Enjoy!**\n\n[**Support Server**](https://discord.gg/WN9TDts)\n\n[**Invite**](https://discord.com/oauth2/authorize?client_id=750179163582890034&permissions=8&redirect_uri=https://discord.com/invite/WN9TDts&response_type=code&scope=bot)",
                              url='https://pandamod.xyz',
                              color=0x2F3136)
        embed.set_thumbnail(url="https://i.ibb.co/4gvzWRr/Panda-Mod-2-copy-346.png")
        embed.set_image(url='https://media.giphy.com/media/Dy2XVRrADOlg6x35TN/giphy.gif')
        embed.set_footer(text="")
        await message.channel.send(embed=embed)
        print(message.content)
    await client.process_commands(message)```
hollow sedge
#

you dont have to set a footer if you arent going to put anything in it

dusky mason
#

oh, but thats not the problem

#

unless

hollow sedge
#

ik

#

im just saying

dusky mason
#

thanks tho

slender thistle
#

Dear lord

#

Please use ```

dusky mason
#

i did tho

slender thistle
#

????????

#

Okay Discord

dusky mason
slender thistle
#

Where do I downgrade from this clusterfuck of an update

dusky mason
#

i would go report it

#

but im banned off dtesters

slender thistle
#

It's well-known

#

Put the print above the if

dusky mason
#

omg shiv

#

do u know

#

what just happened

#

since i put the print before

#

it sends me every message

#

people are saying right now

#

omg privacy invasion

#

lemme fix that

slender thistle
#

Ah right

dusky mason
#

lmao

slender thistle
#

Probably a stupid question but

#

Are you sure the mentioned bot is the same bot that's running your code

dusky mason
#

uhhh odd question

#

should be

#

i mean the only other one i made

#

is currently offline right now

#

so it should be this one

#

works now

#

when my friend pings it

hollow sedge
slender thistle
#

^

dusky mason
#

already have one

silent cloud
#

Yo guys

#

Can someone help me

hollow sedge
#

then how is it sending you all the messages that people send?

silent cloud
#
    let bUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(argsban[0]));
    if (!bUser) return message.channel.send("Не могу найти человека!");
    if (!message.member.hasPermission("BAN_MEMBERS")) return message.channel.send("К сожалению у тебя не хватает прав друг!");
    if (bUser.hasPermission("MANAGE_MESSAGES")) return message.channel.send("Этот человек не может быть забанен");
    let embed = new MessageEmbed()
    .setTitle('')
    .setDescription('Это бан! \nЯ заметила, что кого-то забанили!')
    .addFields(
      {name: "Забанен человек:", value: `${bUser} с ID ${bUser.id}`},
      {name: "Забанен человеком:", value: `<@${message.author.id}> с ID ${message.author.id}`}
    )
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558746793978888212/22-20-09-5cb9faa6d6e6b2279867707da2100ea3.jpg')
    .setColor('0x2c69d3')
    .setTimestamp();

     message.guild.member(bUser).ban("Забанен Моникой");
     message.channel.send({embed});
dusky mason
#

because i put it before the if

#

so it was on_message

#

so every message

#

was people

earnest phoenix
#

i'm getting an error about quick.db i think but i don't know how to fix it (when i uninstall it and install one more time i'm getting found 1 low severity vulnerability
run npm audit fix to fix them, or npm audit for details) what can i do i cant use many commands need quick.db

lunar sequoia
silent cloud
#

so

#

i need to do this?

pseudo wadi
#

?

silent cloud
#

message.guild.members.ban(bUser, {"Забанен Моникой"});

#

?

pseudo wadi
#

no

#

message.guild.ban(bUser, {"Reason"}); @silent cloud

silent cloud
#

where members

#

lets try, but idk

lunar sequoia
silent cloud
#

-.-

#

what is true

pseudo wadi
#

try either

lunar sequoia
#

The one that I pointed out to.

lunar sequoia
pseudo wadi
#

oh

#

?

hard anchor
#
from discord.ext import commands
import praw
import random

bot = commands.Bot(command_prefix='>')

@bot.command()
async def meme(ctx):
    subreddit = reddit.subreddit("memes")
    all_subs[]

    top = subreddit.top(limit = 5)

    for submission in top:
        all_subs.append(submission)

        random_sub = random.choice(all_subs)

        name = random_sub.title
        url = random_sub.url

        em = discord.Embed(title = name)

        em.set_image(url = reddit.com)

        await ctx.send(embed= em) 


          ```
#

I have problems

#

syntax error

silent cloud
#

why error

pseudo wadi
#

whats the error

silent cloud
#

щр

#

oh

#

i fixed it by deleting {}

#

now it message.guild.members.ban(bUser, "Забанен Моникой");

lunar sequoia
# silent cloud

It should be message.guild.members.ban(bUser, {reason: "Забанен Моникой"});. Remember that the 2nd parameter takes an object and you have to provide a key for it.

silent cloud
#

ohhh

#

yep

#

woring

#

lets try

earnest phoenix
#

my bot got's IA u.u

carmine summit
#

Excuse me?

#

Wdyn AI

earnest phoenix
#

Sorry, on spanish it's IA and i speak spanish xd

carmine summit
#

What's IA

earnest phoenix
#

AI

#

But on spanish it's IA

#

English: AI-Artificial Inteligency
Spanish: IA-Inteligencia Artificial

#

uses an api
looK GUYS IM SMART I codedded AI!!

#

i didn't say i code AI.

slender wagon
#
for (const warning of results.warnings) {
          const { author, timestamp, reason } = warning
          if(warning === null){        
            // no warnings code
            message.reply(`This member doesn't have any warnings`)
            return
            } else {
          reply += `By ${author} on ${new Date(timestamp).toLocaleDateString()} for "${reason}"\n\n`
            }
        }

i did this to prevent the bot crashing where there is no warnings in the database but it doesn't seem to work

#
TypeError: Cannot read property 'warnings' of null
earnest phoenix
slender wagon
#

i did read it carefully but i can't seem to fix it

lyric mountain
#

yo cry, do you know c++?

#

more specifically cmake?

earnest phoenix
#

i know a bit of cpp but i don't work with cmake, never really had to

lyric mountain
#

meh, wonder if I'll find someone here who knows how to use it

#

building the executable is harder than coding itself

pseudo wadi
#

So i have a function that generates a random number when u run it and saves it to the database, but i want it to add to the existing number to the database if there is one!

#

e.g: if 4 is in the database and i generate 5 , 4 + 5 to update but all it does is overwrites

earnest phoenix
astral yoke
#

@valid grotto our conversation 2 hours ago, how would i edit it and add field?

quartz kindle
pseudo wadi
crimson vapor
#

Hi Tim

lyric mountain
quartz kindle
#

lmao

pseudo wadi
#

but how would i add the number from the database n the generated number to then push it?

quartz kindle
#

which database is it?

#

mongo?

pseudo wadi
#

yes

lyric mountain
#

I mean, people say java is ugly and confuse but cpp's docs are unreadable

#

exceptions doesn't help either

#

I didn't even mentioned the type declarations

astral yoke
#

@quartz kindle with this code message.channel.messages.fetch(ID).then(OldEmbed => { NewEmbed = OldEmbed ; NewEmbed.embeds[0].color = xxxx; OldEmbed.edit({embed: NewEmbed.embeds[0]}); }) how would you add a field?

quartz kindle
pseudo wadi
#

i have it but it just overwrites the old with the new, I want it to add to the one in the database

quartz kindle
#

embed = new Discord.Embed(old.embeds[0])

astral yoke
#

im making a suggestion command, so im wanting to edit it, and was just trying to see how to make a field into it with other stuff like .color, .title etc

#

because .field dosent do anything

quartz kindle
#

create a new one like i showed

#

then do embed.addField(...)

#

if you want to remove an existing field, it should be embed.fields[index]

quartz kindle
#

you're not using the $inc option

pseudo wadi
#

oh wait i kinda understand

#

i get this UnhandledPromiseRejectionWarning: MongoError: Cannot increment with non-numeric argument: {coal: "4"}

quartz kindle
#

"4" is not a number

#

its a string

pseudo wadi
#

so?

#

do i have to change the type to number

tired panther
#

you have to give it , as a number

sterile lantern
#

how would you add two DB values

for example; money_user , bank_user

in a cmd, Total Balance = db.fetch(money_user , bank _user);

would that work? just an example, not actual code

lyric mountain
#

you need to fetch for each field ig

#

then sum normally

#

probably mongo has a sum attribute tho

sterile lantern
#

so;
db.fetch(money)
db.fetch(bank)

total balance: money + bank

#

idk

#

im using quick db (sqlite)

pseudo wadi
#

i was coming with another error but it was simple

earnest phoenix
#

anyone have a good free hosting site??

weary socket
#

How can I put this : https://codepen.io/matchboxhero/pen/JrLJeb?editors=1100 In my Server background?

elder loom
#

but it depends if you are using data files such as .json to store user files

#

if you would be storing those data in files don't use heroku

#

else it's good

rustic nova
#

@oak cliff token leak

oak cliff
#

@hard anchor i recommend going and regenerating your token

#

and then not posting it here ;)

hard anchor
#

ok

oak cliff
#

crop any screenshots you send above the bot.run part

latent cave
#

How can I make a shout script for my bot? I'm kinda confused

earnest phoenix
#

thank you for coming to my ted talk

latent cave
#

😂 Bruh

hard anchor
latent cave
#

@hard anchor Great job!

hard anchor
#

I have a problem

latent cave
#

Fix it

hard anchor
#

I think the error is from a library, because it is well written

latent cave
#

I'm not sure

hard anchor
crimson vapor
#

lol

sudden geyser
#

The invalid syntax is probably because you aren't using python3

hard anchor
#

i am using python 3.9 and i just updated pip

scarlet stratus
#

does someone have knowledge with python bots and githup

glad charm
#

do python -v

#

Xd

scarlet stratus
#

oh ok

latent cave
#

How can I make shout events bot tho? I'm confused on making that

scarlet stratus
sudden geyser
#

You need to explain what a shout event is

glad charm
latent cave
sudden geyser
hard anchor
#

which version of python to download?

sudden geyser
#

Yes, but what is a shout event.

latent cave
#

Training/ Tryouts

#

UHH

scarlet stratus
#

dang it

latent cave
#

I need the bot to shout in a channel that I want, The prefix should be !shout

#

Then it will direct message you for the info of the shout

pure glen
#

hi

latent cave
#

Hi

scarlet stratus
#

only thing i wanted to know was how to add the bot to github lmao

sudden geyser
#

So like !shout <channel> <message>

latent cave
#

Can we like add the script that when we say !shout it will only shout it on the wanted channel

#

If I'm saying it right

latent cave
latent cave
#

How can script that, Can you teach me? It's my 3rd day of scripting I don't really know much about scripting

weary socket
drifting wedge
#

sharding isnt bad right? if i have 500 severs, 1 shard is fine?

hard anchor
#

What version of python do you recommend for praw?

drifting wedge
#

dont use it

#

use aiohttp

#

i got a reddit api aiohttp that one of my devs made we r prob gonna opensource

#

so lmk

tired panther
#

@quartz kindle You are the developer of djs light? really?
are there any problems when you want to use djs light by sharding

silent cloud
#

guys

#

why it haves an error

#

message.guild.members.kick(kUser, {reason: "Кикнут Моникой"});

quartz kindle
#

yes i am, and no there shouldnt be any problems, but i personally dont use the sharding manager so i dont test it much

#

but if you find any problem, report it to me and i'll fix it

tired panther
silent cloud
quartz kindle
sand condor
silent cloud
#

message.guild.member.kick is not a function

sand condor
#

literally right here wym

#

i didn't say that

#

i said Member.kick

#

which means a member object

silent cloud
#

facepalm

quartz kindle
#

for example, if you use .cache.get() or .cache.find() or any other .cache thing, you will need to either replace it with .fetch() or enable the relevant cache in the client options. Also permissions are disabled by default, if you need them you have to enable roles and overwrites in the client options@tired panther

floral creek
#

Why does my bot dosent connect?

stark abyss
#

maybe you hit a rate limit

floral creek
#

?

#

hit limit?

#

so like in conections=

#

?

short portal
#

what error code are you getting?

floral creek
#

Nothing

short portal
#

i think discord is having a moment cause im getting 4000

floral creek
#

O yes

stark abyss
#

debug it

floral creek
slender thistle
#

Oh great

floral creek
#

...

short portal
#

looks like discord is dying then

floral creek
#

hm

slender wagon
#

does the lavalink server has to be hosted in the same server as where the bot is hosted?

short portal
#

don't think so

earnest phoenix
solemn latch
#

oh its so much nicer

silent cloud
#

ypeError: Cannot read property 'kick' of undefined

earnest phoenix
silent cloud
#

message.members.kick(kUser, {reason: "Кикнут Моникой"});

pale vessel
#

guild.members

solemn latch
#

did you do all the stuff yourself @earnest phoenix?

pale vessel
#

message doesn't have the members property

silent cloud
earnest phoenix
#

yes

silent cloud
#

one man say me just menbers

pale vessel
#

that one man was wrong I guess

sand condor
#

i said Member.kick() idk where he got that from

#

and i linked docs

#

so

earnest phoenix
#

@solemn latch spent about 5-6 days on it XD

pale vessel
#

it's either member.kick() or GuildMemberManager.kick()

earnest phoenix
#

Vibe dog

sand condor
#

no there isn't

pale vessel
#

oh

sand condor
#

there is no kick method for guildMemberManager

pale vessel
#

only ban

solemn latch
#

its so rare to get unique stuff like it @earnest phoenix

sand condor
#

so that's why i said Member.kick()

molten yarrow
earnest phoenix
pale vessel
#

kind of stupid, they have ban but no kick

earnest phoenix
#

Love my nickname

sand condor
#

because ban can ban users outside the server

pale vessel
#

so just member.kick()?

earnest phoenix
sand condor
molten yarrow
pale vessel
#

you can't kick a user 4head

molten yarrow
#

im not the author from d.js guide xDD

pale vessel
#

whoever made that, grrrr

#

that is obviously a member smh

molten yarrow
#

yep

silent cloud
#

...

#

my bot have all permissions

pale vessel
#

Are you sure

silent cloud
#

yep

crimson vapor
#

Are you kicking an admin or owner

silent cloud
#

not

pale vessel
#

or someone that has a higher role than the bot

silent cloud
#

it doesnt have permissions

molten yarrow
#

if you trying to kick someone with a role above your Bot role, you cant