#development

1 messages · Page 1496 of 1

terse swallow
#

re

opal plank
#

i'll take a look at it when you finish xD

#

dun worreh

terse swallow
#

🤞 😂

terse swallow
opal plank
#

yeah that should work fine

earnest phoenix
#

Anyone wanna test my bot in my server?

#

you can... test it yourself?

opal plank
#

2 things you should ask for here. testers and people to code with you, those usually lead in disaster

#

oh, and ideas

earnest phoenix
earnest phoenix
pale vessel
#

well

#

is that not enough?

earnest phoenix
#

You guys helped a lot thanks

#

you're going to be the only one who's familiar with your code, so you're the best tester for the bot

distant mango
#

true

sacred trout
#

hello

#

i need some help

earnest phoenix
sacred trout
#

if isinstance(error,commands.MissingPermissions): embed = discord.Embed(title = "Error!", color = discord.Colour.red()) embed.add_field(name = "oops", value=f" You cannont kick that user {member.mention}.") await ctx.send(embed=embed)

#

please help

earnest phoenix
distant mango
#

Isn't it discord.MissingPermissions

#

Also what even is your error

#

or problem

sacred trout
#

where is that/

distant mango
#

Did you copy paste code without understanding it

earnest phoenix
#

lmao

sacred trout
#

whaT????

#

loal

distant mango
#

loal

mellow kelp
#

loal

earnest phoenix
#

loal

sacred trout
#

loal

earnest phoenix
#

dont spam

sacred trout
#

k

wanton nova
sacred trout
#

loal

earnest phoenix
distant mango
#

Well, with no more info about your problem I can't help you @sacred trout, especially when you copy pasted it somewhere

sacred trout
#

i didn't copy paste it

#

lol

#

the error is nothing

distant mango
#

Then you'd know what I am talking about

sacred trout
#

it just doesn't send

terse swallow
#

it works but i also want to do it wherever we can see another person "/ user-info @ Jukenoi02"
|| @opal plank ||

distant mango
#

But what

sacred trout
#

what?

sacred trout
opal plank
#

try /user-info @SomeOtherUser

earnest phoenix
#
            for (let i = 0; i < args.length; i++ ) {
                if(args[i].toLowerCase().includes('-ping')) 
                args.slice(i, 1).join('');
            }
            mention = true;
        } else mention = false;``` This doesnt remove the word -ping after being used in message
distant mango
#

It's like
embed = discord.Embed(title='Helpppppp')
await ctx.channel.send(embed=embed)
whaT??? It not work help

#

I need way more context

earnest phoenix
opal plank
#

thats python

earnest phoenix
quartz kindle
#

then you did it wrong

earnest phoenix
#

code is above

quartz kindle
#

which is wrong

#

its using slice

earnest phoenix
quartz kindle
#

not splice

earnest phoenix
#

I did splice too

quartz kindle
#

then you did it wrong

distant mango
sacred trout
#

yea?

earnest phoenix
#

can you examine code and tell whats wrong other than slice

sacred trout
#

lol

terse swallow
opal plank
#

try this then

quartz kindle
distant mango
sacred trout
#

umm

umbral zealot
#

And more context === more code

distant mango
#

Indeed

umbral zealot
#

we need to see more code

terse swallow
sacred trout
#

so my coed doesn't work no error and no result

distant mango
#

oof

#

And more context === more code

umbral zealot
#

ok so show us your coed

distant mango
#

code

earnest phoenix
# quartz kindle not enough context
        if(args.some((val) => val.toLowerCase() === '-ping')) {
            for (let i = 0; i < args.length; i++ ) {
                if(args[i].toLowerCase().includes('-ping')) 
                args.splice(i, 1).join('');
            }
            mention = true;
        } else mention = false;

        if(mention === true) announcementchannel.send('@everyone');
        const embedAnnounce = new Discord.MessageEmbed()
        .setTitle("Announcement")```
sacred trout
#

l

distant mango
#

You

opal plank
#

let user = msg.mentions.members.first()?.user || msg.author @terse swallow

sacred trout
#

@client.event async def on_error_kick_1(ctx,error): if isinstance(error,commands.MissingPermissions): embed = discord.Embed(title = "Error!", color = discord.Colour.red()) embed.add_field(name = "oops", value=f" You cannont kick that user {member.mention}.") await ctx.send(embed=embed)

#
async def on_error_kick_1(ctx,error):
    if isinstance(error,commands.MissingPermissions):
        embed = discord.Embed(title = "Error!", color = discord.Colour.red())
        embed.add_field(name = "oops", value=f" You cannont kick that user {member.mention}.")
        await ctx.send(embed=embed)```
gilded olive
#

What the

gilded olive
#

wrong my guy

#

what are you trying

umbral zealot
#

What in heavens is commands in this context? Where would it get commands from?

sacred trout
#

lol

distant mango
#

on_error_kick_1 isn't a thing

sacred trout
#

oh fuc me

distant mango
#

rather not

umbral zealot
#

I mean I don't really know python so I have no idea but this doesn't look like any good code.

sacred trout
#

lol

gilded olive
#

It is for the most part

earnest phoenix
quartz kindle
sacred trout
gilded olive
#

change

distant mango
sacred trout
gilded olive
#

Dude

sacred trout
#

lol

umbral zealot
#

Guys this is a troll.

distant mango
#

Is it working?

gilded olive
#

Make it a local error handler

sacred trout
#

no

distant mango
#

Really?

sacred trout
#

yes

distant mango
#

I see

umbral zealot
#

Clearly, a troll, as no one could possibly write such bad code if not on purpose.

gilded olive
#

what is your command signiture for your kick command called @sacred trout

sacred trout
#

lol

umbral zealot
#

It's impossibly bad.

sacred trout
#

kick

gilded olive
#

It is not bad code once again

#

Oh

#

Change the decorator

#

To kick.error

sacred trout
#

oh

umbral zealot
#

I do'nt even know python and I can tell it's horrible code >.<

lyric mountain
distant mango
#

Ye

#

Same

sacred trout
#

wtf?

gilded olive
#

does it work now

sacred trout
#

wait

#

nop3 haha

terse swallow
gilded olive
lyric mountain
#

Hastebin is a thing

sacred trout
#

discord.ext.commands.errors.MissingPermissions: You are missing Kick Members permission(s) to run this comman

gilded olive
#

normal

sacred trout
#

lol

gilded olive
#

You are missing them

terse swallow
#

@opal plank

opal plank
#

pong

sacred trout
#

no that's the point

opal plank
gilded olive
#

Well it works yes?

sacred trout
#

no

gilded olive
#

What's not working

sacred trout
#

@client.event async def on_error_kick(ctx,error): if isinstance(error,commands.MissingPermissions): embed = discord.Embed(title = "Error!", color = discord.Colour.red()) embed.add_field(name = "oops", value=f" You cannont kick that user {member.mention}.") await ctx.send(embed=embed)

#

this this thsi this this this

gilded olive
#

You idiot bruh

sacred trout
#

ikr

gilded olive
#

i told you to change the decorator

#

To

opal plank
gilded olive
#

@kick.error

sacred trout
#

ok

gilded olive
#

And you still have client.event

#

Sigh

opal plank
#

100% can see that code

umbral zealot
lyric mountain
#

Cannont

opal plank
#

sarcasm

quartz kindle
#

i mean

lyric mountain
#

No, i mean

lyric mountain
#

The error message

#

Cannont

mellow kelp
#

coden't

gilded olive
#

971 lines?

opal plank
#

is that ads?

gilded olive
quartz kindle
#

wanna see bad code? just check any code written by that dude who started making a bot in the past 2-3 days

opal plank
#

@ modums ads

distant mango
gilded olive
#

Poggers

distant mango
#

It is possible to have negative common sense

sacred trout
#

is ctx.author.mention a thing???

distant mango
#

Yes

gilded olive
#

I was helping someone with a tourney system, a lurking guy stole the code, then came to ask why it wasnt working

sacred trout
#

ok

lyric mountain
#

The fun thing about os steal is how the thief becomes lost af and start to ask how the code works

sacred trout
#

how can i remove name in embed

#

embed.add_field(name = "to nothing like this"

terse swallow
gilded olive
#

empty whitespace character

opal plank
#

pong

gilded olive
#

Afaik you cant remove it

#

Just make it empty

sacred trout
sacred trout
#

didn't work

opal plank
#

the updated one

lyric mountain
#

Use \u0000

lyric mountain
#

Null character

sacred trout
#

empty doesn't work @gilded olive

lyric mountain
sacred trout
#

embed.add_field(name = ""<

#

oh

lyric mountain
#

Idk how unicode works in python

sacred trout
#

lmo

lyric mountain
#

But try \u0000

sacred trout
#

lmo

terse swallow
opal plank
#

çpong

lyric mountain
#

That's how it works in most langs

distant mango
gilded olive
sacred trout
#

yes

umbral zealot
opal plank
#

@terse swallow does that not work? it looks fine to me

lyric mountain
#

Ook...

opal plank
#

did you restart bot?

lyric mountain
#

Python parsed the null character

umbral zealot
#

That thought makes me whelmed.

terse swallow
umbral zealot
#

define "doesn't work"

#

what doesn't work

opal plank
#

what error?

terse swallow
#

it's no error just no send embed

opal plank
#

malformed embed?

#

but that would send an error

#

cannot send empty message

earnest phoenix
#

how are you sure there's no error

#

you don't seem to have proper error handling so there's a chance it gets swallowed

terse swallow
#

no its not even sending a message when I execute the command

distant mango
#

Could anyone give me an example recieving a vote webhook from dbl? I don't have any webhook experience so I am a bit lost. (Language python)

opal plank
umbral zealot
opal plank
#

they have working examples

distant mango
distant mango
#

No complete examples

distant mango
umbral zealot
#

@terse swallow do you know what === means in javascript?

terse swallow
umbral zealot
#

yeah I know why. Do you know what === means?

umbral zealot
#

Ok then

#

please read

opal plank
distant mango
opal plank
#

thats literally what i said before

opal plank
earnest phoenix
#

you didn't find it because you skimmed it

umbral zealot
#

didn't see, like, the super obvious link on the left ¯_(ツ)_/¯

slender thistle
#

New dblpy docs will include examples with more in-depth explanations

umbral zealot
terse swallow
slender thistle
#

What is?

gilded olive
#

dblpy

slender thistle
#

Yeah

gilded olive
#

Link

#

?

opal plank
misty sigil
#

It has a live chat with shiv

slender thistle
gilded olive
#

Poggers

#

Ight

slender thistle
#

Yet to be updated to match recent changes though

opal plank
#

i keep helping node-sdk and dblapi.js but i dont get lib dev role, whats this discrimination about @slender thistle ?

slender thistle
#

Probably because you're not the official maintainer sure

opal plank
#

:c

#

i smel bs

opal plank
#

look in the commits?

#

see what changed?

#

check changelogs?

slender thistle
#

Nah

opal plank
#

👀

gilded olive
#

Mobile github is fucked

#

I dont even bother

slender thistle
#

The repo name change, some internal plannings

opal plank
terse swallow
#

so you read what i said? @umbral zealot

opal plank
#

you didnt check the docs

umbral zealot
#

Yeah I read what you said. Do you understand what I was leading at?

#

Why would === be bad in this situation

opal plank
#

and now you arent checking the commit history cuz "it doesnt look well on mobile"?

gilded olive
#

Yes? Because im turning on my pc to look at it properly then?

gilded olive
opal plank
gilded olive
#

Even worse imo

opal plank
#

2 clicks away

terse swallow
umbral zealot
#

No... even loose equality

#

why does message.content EQUALS /user-info not make any sense

#

Think for second

terse swallow
#

ok

umbral zealot
#

Are Hello and Hello darkness, my old friend equal?

terse swallow
#

no

umbral zealot
#

So, "equals" is the wrong thing

#

How would you express a condition to match those 2 things, in english?

#

You have Hello and you need to match it with Hello Darkness, my old friend, Hello, is it me you're looking for? and Hello, it's me, I was wondering if after all these years you'd like to meet. How do express this in english?

terse swallow
#

==

earnest phoenix
#

lol

umbral zealot
#

How the hell does Hello EQUAL any of those?

#

and also how is == english?

#

"Hello equal equal Hello Darkness, my old friend"

#

Yes, yes, hmm, makes perfect sense.

opal plank
#

tip: startsWith() or includes()

quartz kindle
#

you are checking if the message.content equals /user-info but the moment you type /user-info abc the message.content no longer equals /user-info

umbral zealot
#

I was tryign to get them to actually think for a moment but alright guys.

opal plank
#

i know, but the language is already screwing with them

#

since they're french and from the looks of it they are translating it

#

prob easier to fowards to the docs and translate the whole page

slender thistle
#

Evie, you'll be going in circles for a while

opal plank
#

^^

#

the docs syntax MOST of the times translate fine to other langs

umbral zealot
#

in my guild they'd already be muted for a week so they actually went to read docs ¯_(ツ)_/¯

opal plank
#

might be a hell lot easier to understand

#

LMAO

terse swallow
slender thistle
#

It's hard to help someone who doesn't help others help them

umbral zealot
#

You're what's called a "help vampire" or a "tyler", meaning, you don't want to take the time to learn the language and expect everyone else to fix your problems.

#

You can keep relying on everyone else to program for you, or you can take the time to learn, but if you choose to continue to be a help vampire you can expect a high level of resistance everywhere you go.

#

Si ça aide je peux t'expliquer en Français pourquoi faut aller prendre le temps d'apprendre la langue que tu veux utiliser avant de programmer des bots, au lieu de te fier sur tout le monde autour de toi pour régler tout tes problèmes?

gilded olive
#

wowzers

umbral zealot
#

After 4 years you learn to recognise the vampires 😄

outer niche
#

Because every time I do it it does not seem to show

quiet topaz
#

(discord.js)

umbral zealot
young flame
outer niche
#

because I is a white page I would like to put a navigation bar at the top of the page but every time I put the code in for the navigation bar it does not even show up

quiet topaz
#

but when did they make it boolean?

young flame
#

whenever they did

#

why is this important

#

god autocorrect smh

#

if it doesnt fuck up everything then whats the problem

quiet topaz
#

it does

young flame
#

well the fix it

quiet topaz
#

yeah but why is it boolean

#

it never was

young flame
#

ok

#

its boolean because it is

mellow kelp
#

pretty sure it should be a string

umbral zealot
young flame
#

i can eval it if you want

#

¯\_(ツ)_/¯

outer niche
#

Do you want the CSS too?

umbral zealot
mellow kelp
#

im getting string in my eval

quiet topaz
#

but some lines below it is

mellow kelp
#

probably you changed it to a boolean

quiet topaz
#

oh yeah

#

i think i did

mellow kelp
umbral zealot
young flame
#

@umbral zealot if couldnt tell i was being sarcastic

#

if you*

umbral zealot
umbral zealot
#

Then stop shitposting

young flame
#

im not

young flame
quiet topaz
#

yeah

#

i did !=

young flame
#

console log it in both statements

umbral zealot
#

=! isn't how you do not equal

#

it's !=

young flame
#

^^^

umbral zealot
#

You are literally turning it into a boolean right there

quiet topaz
#

i know...

#

i just realized it

umbral zealot
#

by saying message.author.id = !"something" 😄

quiet topaz
#

i just realized it

young flame
#

thats why i said console.log it in both statements

quiet topaz
#

i overwrited message.member too... and that was the reason, why everything stopped working

young flame
#

coolflushed because if it changes its most likely something you did

outer niche
umbral zealot
#

it also doesn't look anything like the code you linked before

#

maybe try Saving the index.html file 😉

gilded olive
amber thistle
mellow kelp
#

iframes i think

amber thistle
#

i inspected it and its a <embed> thingy

gilded olive
#

Damn looks cool

amber thistle
#

but aren't we only allowed able to use css?

gilded olive
#

I mean if they're doing it

#

should be allowed right

solemn latch
#

html is allowed

#

which has iframes

amber thistle
#

woa

#

didnt knew that until now

young flame
#

@umbral zealot wait you made yui?

#

thats pogggerszsssssss

umbral zealot
#

what?

gilded olive
#

Joke

young flame
#

o wait

#

H

#

@umbral zealot nVm

umbral zealot
young flame
#

your still poggers doe

amber thistle
#

🫂

#

man just pinged the wrong guy

young flame
#

shush

#

we dont speak on it

umbral zealot
#

My poggers status has nothing to do with any bot I made. lol.

outer niche
umbral zealot
#

Ok good! Now we can see it

#

So, now, try to add your navigation bar and let's see why it doesn't work

outer niche
#

Ok

#

Done

umbral zealot
#

well ok so you have the HTML

#

... you do'nt have any related CSS Though

#

is that supposed to be bootstrap?

outer niche
#

Bootstrap?

umbral zealot
#

where did you get this code from

#

Because this looks like bootstrap classes

outer niche
#

Idk my friend had put it in

umbral zealot
#

So ask your friend how to use this then

gilded olive
umbral zealot
#

copy/pasting random html from a random website usually doesn't work out the way you think it does.

outer niche
#

I would have to wait two months to do that

#

I mean it works in all the other pages

umbral zealot
#

Well then you have better get started on actually learning html and css 👍

#

In the meantime you're missing the bootstrap CSS import in your <head>.

craggy pine
#

w3schools is where I learned HTML / CSS highly suggest it

gilded olive
#

w3schools is lit

#

There and freecodecamp

outer niche
#

But I see it

full mango
#

how can i make an event listener .. which look for a particular post on twitter and put's it on the discord channel?

solemn latch
#

an event listener for a particular post?

full mango
#

yup

gilded olive
#

sounds like webhooks

earnest phoenix
#

You should use any twitter's api(?

gilded olive
#

if you're using python you can check out tweepy

solemn latch
#

the way its phrased it sounds like he wants to search every twitter post until something specific is posted

#

which i doubt twitter has a webhook for.

gilded olive
#

uh idk much about twitters api but dont posts have ids

#

or something unique about them

solemn latch
#

yeah, but you wouldnt have an event listener for something already posted.

gilded olive
#

true

solemn latch
#

they use the snowflake system

#

which is what discord ID's are

#

same basic consept.

gilded olive
#

I see

full mango
gilded olive
#

like as soon as the post is made?

full mango
#

yeah

gilded olive
#

language

full mango
#

in python

gilded olive
#

If it's javascript maybe Woo can help you but if it's python I can help

#

ayeee ight

#

this is a popular lib for it

full mango
#

ohh cool .. thanks

gilded olive
#

I have not used it but let me see if I can find something

gilded olive
tulip ledge
#

UnhandledPromiseRejectionWarning: Error [GUILD_MEMBERS_TIMEOUT]: Members didn't arrive in time.

#

it's a private bot

#

why would I need intents on that

#

and how would I do it otherwise?

#

await guild.members.fetch();

earnest phoenix
#

intents are required if you want to fetch all members from gateway

#

they do not care if the bot is private or not

cinder patio
#

You don't need verification to enable member intents if your bot is meant to be private, though

lyric mountain
#

Up to 100 servers u can use all intents u want

distant mango
#

Hi, does anyone have an idea to what I asked in #topgg-api?

tough wyvern
#

Guys how can i add how many chards my bot have ?

opal plank
#

For joining guilds*

crimson vapor
#

how would I go about making a ws use less memory?

cinder patio
#

you can't do much

crimson vapor
#

I mean I see d.js-light using almost no memory while I use 50mb on liteally just a ws

cinder patio
#

d.js-light removes the caching from discord, it doesn't do anything to the websocket connection

#

Do you have a websocket server or a websocket client?

crimson vapor
#

client I think

#

I assume

#

since im not hosting it just connecting to it

cinder patio
#

You probably have a memory leak somewhere in your code, or you are just using a lot of memory in general. Does your app handle a lot of data?

crimson vapor
#

not really

#

but its possible that I created a memleak

cinder patio
#

Just one websocket connection cannot use up to 50 mb of memory, so maybe something else is using up all the memory. Do you know how frequently the websocket client receives messages?

opal plank
#

tip, use chrome's debugger

#

chrome has a ram profiling tool

#

it takes a while to learn, but the gist is:

expose port from node startup
attach on chrome
run profiling

#

@crimson vapor

halcyon kite
#

hey guys so i am trying to make a quest command and so far i cant seem to stop it from making a different command how do i stop this? heres code

opal plank
mellow kelp
#

that's not enough context

cinder patio
#

I'm not sure what you mean

crimson vapor
#

its for veldchat

#

so it doesn't get many calls

cinder patio
#

what's veldchat

opal plank
#

^^

crimson vapor
#

veld.chat

opal plank
#

thanks

#

that explains a lot

#

so, an IRC ?

crimson vapor
#

ig

opal plank
#

hmmm interesting

crimson vapor
#

veld's discord clone basically

opal plank
crimson vapor
#

yes

#

this veld

opal plank
#

wait wot?

#

its their stuff?

crimson vapor
#

yep

opal plank
#

huh, interesting

crimson vapor
#

yea

opal plank
#

i think i got too much data

crimson vapor
#

nah

opal plank
#

@earnest phoenix check new metrics

earnest phoenix
#

wow that is awesome

opal plank
#

i dont think i can possibly fit more data into a single bot

#

votes, logs, guild logs, command logs, presences parsed, amount of users playing genshin, cache, ram, cpu, error logs, it legit has everything

cinder patio
#

735 mb with 260 guilds?

opal plank
#

yup

#

the guilds isnt the big killer though

#

its the users

#

i have my own user cache

#

base d.js is around 350-450

#

the rest is mine caching a shit ton of stuff

cinder patio
#

ah

#

that makes sense

opal plank
#

image buffers, cached entries, API cache, cached characters, completely new user object, its a ton of stuff im keeping in memory

#

ngl, half of it could be put on Redis instead

#

which would probably improve it a bit, redis does have a little bit of compression

hearty palm
#

why when i use
if (!message.author.id === "any id") return;

the bot just keep replying to everyone

cinder patio
#

Because !message.author.id always returns false

misty sigil
cinder patio
opal plank
hearty palm
#

even the id i have entered ?

opal plank
#

its your syntax thats wrong neru

#

just like brackets, its scopes

#

!(true) => returns false

#

!(true === false) returns true

#

!true === false returns true

#

because its resolving !true first, not (true === false)

hearty palm
#

So what should I use if I want the bot to answer me alone?

opal plank
#

do a little bit of thinking, i explained what is wrong with your scopes

cinder patio
#

you should be able to come to your own conclusion with the info above

opal plank
#

your thought is right, your syntax is wrong

hearty palm
#

@opal plank can u fix it for me ,? nooo

opal plank
#

@hearty palm you got Dev in your name, this is basic stuff, i believe in you

#

i also believe in the power of reading the rules and not spoonfeeding beginners

misty sigil
#

imagine having dev in your name but not knowing how to use if statements and how to compare things

#

bro

drifting wedge
#

how do i style a radio thing?

#

like give an example

#

htmlcss

earnest phoenix
#

guys i need help collecting reactions... i want this to be all the reactions collected but idk what else i can do exceptjs const reaction = collected.first();

#

like i tried collected.all();

stark abyss
#

does anyone know if I can create gifs with the canvas framework/npm

cinder patio
earnest phoenix
#

hum ok ill try

#

collected is not a function

cinder patio
#

yeah, it's a collection

misty sigil
#

remove ()

#

not func

cinder patio
#

why are you calling it?

misty sigil
#

collection

crimson vapor
#

isn't it delete()?

earnest phoenix
#

that's my whole code

#
if(msg.content.startsWith("!role")) {
    const Role1 = msg.guild.roles.cache.get("789631347773669377");
    const Role2 = msg.guild.roles.cache.get("795378771372277801");

    // Creating a filter.
    const Filter = (reaction, user) => user.id == msg.author.id;

    // Creating the embed message.
    const Embed = new MessageEmbed()
        .setDescription(`Choose a role: \n ✔️ ${Role1.name} \n🔔 ${Role2.name}`)
    
    // Awaiting for the embed message to be sent.
    const reactionMessage = await msg.channel.send(Embed);

    // Reacting to the embed message.
    await reactionMessage.react("✔️");
    await reactionMessage.react("🔔")

    // Awaiting a reaction to the embed message. Time is measured in ms. (30000 ms - 30 seconds)
    reactionMessage.awaitReactions(Filter, {max: 1, time: 30000, errors: ["time"]}).then(collected => {
        // Getting the first reaction in the collection.
        const reaction = collected.first();
        
        // Creating a switch statement for reaction.emoji.name.
        switch (reaction.emoji.name) {
            case "✔️":
                // Adding the role.
                msg.member.roles.add(Role1);
            case "🔔":
                // Adding the role.
                msg.member.roles.add(Role2);
        }
    }
)}}
)```
cinder patio
#

I doubt you wrote any of this code...

earnest phoenix
#

fact

#

but that's not the point

misty sigil
#

lmao

#

it is the point

earnest phoenix
#

I JUST WANT REACTION ROLESSSSSSSSSSSSSSSS

#

HAAAAAAAAAAAAAAAAAAAAA

misty sigil
#

you shouldn't use awaitReactions for that?

cinder patio
#

you should understand how the code you copied works before you copy it blindly and ask for help

misty sigil
#

and ^^

stark abyss
#

Often people get frustrated when you copy paste code

earnest phoenix
#

anyway

misty sigil
#

no. this is NOT the right approach

stark abyss
#

it's better to learn it even if it takes more time

misty sigil
#

do not use awaitReactions for reaction roles

stark abyss
#

are you hitting rate limit? what's the issue

crimson vapor
#

well doesn't awaitReactions just create a reactionCollector?

misty sigil
#

yes but it times out.

crimson vapor
#

oh

#

that makes sense

misty sigil
#

the best approach would be to use a messageReact / raw event

#

use this

earnest phoenix
#

could i use .array?

misty sigil
#

what?

quartz kindle
#

you cant use awaitReactions for reaction roles (technically you can but its a very stupid idea)

misty sigil
#

you'd be better to use a reaction collector

#

but the best way is using messageReactionAdd / raw event

quartz kindle
#

awaitReactions is designed for short term usage, for example to answer a question with a reaction

earnest phoenix
#

hooo

#

ok...

young flame
#

if you use await reactions you better set it to expire in 100 years KEK

#

its called awaitReactions for a reason

#

once the time limit is up if they do still react it wont work

quartz kindle
#

and you'd have to keep destroying it an making a new one on every single reaction

misty sigil
#

time: Infinity

opal plank
#

me, an intellectual : {time: -1}

crimson vapor
#

does that work?

#

or does it instantly close

earnest phoenix
#

@opal plank lol

#

It’s 5 @crimson vapor

crimson vapor
#

huh

earnest phoenix
#

Cuz -1 it will instantly close

#

Lol

opal plank
#

pong

earnest phoenix
#

What- lol

opal plank
#

you pinged me

#

so i ponged you

#

ping/pong

earnest phoenix
#

Pcong tf

opal plank
#

also a lot of stuff uses -1 to remove it

#

-1 is almost standard

earnest phoenix
#

Lol

misty sigil
#

im gonna fix that code

#
if(msg.content.startsWith("!role")) {
const Role1 = msg.guild.roles.cache.get("789631347773669377");
const Role2 = msg.guild.roles.cache.get("795378771372277801");

const Embed = new MessageEmbed()
    .setDescription(`Choose a role: \n ✔️ ${Role1.name} \n🔔 ${Role2.name}`);
    const reactionMessage = await msg.channel.send(Embed);

    await reactionMessage.react("✔️");
    await reactionMessage.react("🔔");
    function role() {
      reactionMessage.awaitReactions(Filter, {max: 1, time: Infinity, errors: ["time"]}).then(collected => {
          const reaction = collected.first();
          switch (reaction.emoji.name) {
              case "✔️":
                  msg.member.roles.add(Role1);
                  role()
              case "🔔":
                  msg.member.roles.add(Role2);
                  role()
          }
      })
    }
}```
quartz kindle
#

lol rly

earnest phoenix
#

yes I know it’s copy n pasted, but uh what’s wrong with this coding nor is it showing any uh errors

craggy pine
#

Should learn JS before copy and pasting then asking why it's not working.

mellow kelp
#

im having a stroke reading this KEKW

earnest phoenix
#

Lo

quartz kindle
#
while(true) {
  reaction = await message.awaitReactions(filter, {max:1,time:Infinity});
  // do shit here
}
cosmic panther
#

Hello,
My bot was in 75 servers so i got the message from discord to verify my bot. My bot was in 4 servers of the own the rest was organic growth. It took about 1,5 months to get it to 75 servers but for some reason in the past 3 days it grew like 15-20 servers. And when i went to apply for verification i got a message saying my bot didn't grow organically and that they cant review it at the moment? Should i just make a support ticket? Or should i just wait a week and apply again?

mellow kelp
#

not sure

solemn latch
#

its best to ask in the dev server

mellow kelp
#

you could ask for support in the dev server

#

yea

cosmic panther
#

Do you have a link for the server?

solemn latch
cosmic panther
#

ty <3

quartz kindle
earnest phoenix
#

What language should i learn for a discord bot

#

So should I delete it? @quartz kindle

quartz kindle
#

whoever made that code has a lot more code in other places that are required for that specific piece of code to work

earnest phoenix
#

Lol

quartz kindle
#

i believe i told you about this before

#

code is like a puzzle

earnest phoenix
#

Yep Ik

#

I remember

quartz kindle
#

copy pasted code has a 99% chance of not working

earnest phoenix
#

Hm why that?

lyric mountain
#

After that your bot gets locked

mellow kelp
lyric mountain
#

Just as if u didn't do verification

opal plank
lyric mountain
#

It doesn't

earnest phoenix
#

Ah ok

opal plank
#

are you 100% sure?

lyric mountain
#

Yes

#

Been there, done that

opal plank
#

cuz i remember having to keep the bot online for over 3 weeks without downage because i couldnt restart it

#

or it'd lose intents

quartz kindle
# earnest phoenix Hm why that?

In programming there is a very important thing called "implementation". Its the process of adapting a piece of code to fit into your existing code. Nearly all pieces of code that you find out there need to be implemented into your code, aka, converted/transformed/edited to fit with your existing code. Of course this requires knowledge of programming, which is what you are lacking

lyric mountain
#

Had to send discord a new requirement to unlock GUILD_PRESENCES gateway because I forgot to request it during verification

#

My bot was around 300+ servers

#

And it got locked until I disabled that intent or got approved for the gateway

earnest phoenix
lyric mountain
#

It only grays out if you're approved

#

Then it locks on enabled state

earnest phoenix
#

Wtf this

#

Am I blind or smth

#

I don't see anything wrong

#

Omg nvm

#

Wtf?

sly marten
#

so my bot used to work but then some people told me to put each command in different files. then the commands didnt work so i put them all back how i had them before
but still they arent working.

#

does anyone know how to fix this?

#

vsc doesnt show any errors

quartz kindle
# earnest phoenix

i've explained this one to you before, remember const Discord = require("discord.js")?

earnest phoenix
#

Oh yeah ye

#

What about taht @quartz kindle

#

oh yeah

#

I gotta delete it

#

I got it thanks

quartz kindle
#

the keyword "const" is used to create a constant variable. const utils means you're creating a constant variable named "utils"

#

once the variable is created, the name "utils" is no longer available for use, its reserved by this variable

earnest phoenix
#

I’ll delete it

quartz kindle
#

and the value can also not longer be changed, because its a constant

earnest phoenix
#

Alr

#

Thanks

#

Was kinda confused at first thanks?

#

My bad !*

gritty bolt
#

does discord.js have native support for / commands yet?

mellow kelp
#

not yet

#

they're probably gonna be added in v13 ig

gritty bolt
#

yeah

#

thanks

mellow kelp
#

np

earnest phoenix
#

Here comes the moneeey

#

@quartz kindle lmao I deleted all the coding it showed like 29 errors

cinder patio
#

learn js my dude

pale vessel
#

is db.get() even a promise

opal plank
#

@earnest phoenix thank you

#

i was trying to solve an issue and you just reminded me that Promise.race is a thing, which is exactly what i needed

crimson vapor
#

what the fuck is a Promise.race()

earnest phoenix
#

im guessing it completes as soon as one of multiple promises finishes

pale vessel
#

it gets the first promise that fulfills first, reject or resolve

#

good for timeout

earnest phoenix
#

c# has an equivalent called WhenAny

crimson vapor
#

Promise.race() doesn't have to do with db tho

low skiff
#

How do I make a redirect when my bot is added to a server?

earnest phoenix
#

...huh?

drifting wedge
#

how do i style a radio input?

mellow basin
#

Wdym?

#

Ah sorry I understand now

#

If you go on the top.gg website

#

And search

#

sym it comes up with show your method and other options

#

It says there

lucid prawn
#

how do you stop your bot joining server with the same owner

misty sigil
#

store owner

#

check owner

mellow basin
#

delete owner

#

add new owner

rustic ridge
#

you can't stop it joining

#

you just make the bot leave

distant light
#

how to make the status change every few moments?

lucid prawn
#

discord said this inorganically grown

mellow basin
#

statuschange.dev=true

distant light
lucid prawn
mellow basin
lucid prawn
mellow basin
#

Don't ask me

#

How tf am I meant to know

earnest phoenix
#

Help please?..

#

Had to do it fast since

rustic ridge
#

my mans screenshared his code

#

try sending it in a hastebin

earnest phoenix
#

Lol not mine really

#

How?

rustic ridge
#

along with the error message

earnest phoenix
#

The error message is this

rustic ridge
#

u gotta hit save

earnest phoenix
#

@rustic ridge

#

Something about util error

#

@rustic ridge what’s the problem you see?

#

I gtg hurry

rustic ridge
#

you haven't sent the error

earnest phoenix
#

It wa

rustic ridge
#

do you have a file called error.js in your util folder?

earnest phoenix
#

Lemme see

rustic ridge
#

hint: no

earnest phoenix
#

No

#

Ye

#

I gtg fast @rustic ridge just dm me it

rustic ridge
#

what

#

i just told u

earnest phoenix
#

The problem

#

What problem?

rustic ridge
#

you dont have a the error file in ur util folder

earnest phoenix
#

You didn’t...

#

Then why is it showing error...

#

Confusing @rustic ridge

placid iron
earnest phoenix
#

@placid iron uh can ya explain what he means?

placid iron
#

no

earnest phoenix
#

Alr I just need help with the

#

Why is it showing util error?

#

I’m confused

misty sigil
#

WHAT error

earnest phoenix
#

Some util ass error lol

stark abyss
#

if you need help, you may wanna tell us that error

umbral zealot
#

SyntaxError: util ass ah yes a very common error.

stark abyss
umbral zealot
#

There is no file called error.js in the folder called util

#

I'd advance the theory that this is yet another piece of copied code you have no understanding of.

snow tendon
#

I have a problem that im not sure how to fix

umbral zealot
#

I mean you could, just, use SudhanPlayz music bot instead of just stealing their code, @earnest phoenix

snow tendon
#

but it seems u guys r already chatting abt a problem so should I come back later?

earnest phoenix
#

@umbral zealot it’s not stealing

#

@umbral zealot I got perm bruh...

umbral zealot
snow tendon
#

lol ok

#

I am a noob as well uwu

earnest phoenix
snow tendon
#

so it's not triggering the vote function

#

when I press this test button

distant mango
#

@snow tendon look at my code in there, you need to pass more info

snow tendon
#

ok

#

that might fix it

#

I did read that in the docs but I wasn't sure if that was the problem

#

does it matter what port I put it on?

#

where do I get the webhook and the password tho?

distant mango
distant mango
snow tendon
#

ok

#

do I replace the context with anything or is that just part of the link?

#

also how exactly do I figure out which port to use?

#

and where do I find/set my password?

#

many questions

#

help meh

lost isle
#

hi

#

client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!)
client.user.setActivity('All Commands', { type: ""})

})

#

can anyone help

#

me make status change

earnest phoenix
#

is this right?

var Schannel = client.channels.fetch("789294581333884948");
halcyon kite
halcyon kite
earnest phoenix
#

that's not the problem, when i try to send something to that channel it says "Schannel.send is not a function"

earnest phoenix
#

oh right

lost isle
#

can anyone help

#

me get a custom status change

#
    console.log(`Logged in as ${client.user.tag}!`)
    client.user.setActivity('All Commands', { type: ""})

})```
halcyon kite
#

let Schannel = message.client.channels.fetch("789294581333884948");

lost isle
#

this is what i have rn

#

waht is that

halcyon kite
earnest phoenix
#

why is he talking on third person?

lost isle
#

who

earnest phoenix
#

You

lost isle
#

how

#

lmao

earnest phoenix
#

"me"

#

nvm

lost isle
#

can someone help me

#

lmao

#
    console.log(`Logged in as ${client.user.tag}!`)
    client.user.setActivity('All Commands', { type: ""})

})```
#

how do i make the stauts change

shy turret
#

type: ""

halcyon kite
#

back

#

ok sorry

shy turret
#

what's ur type

lost isle
#

Watching

halcyon kite
#

Type this in the ""

#

WATCHING

shy turret
#

type:"WATCHING"

lost isle
#

yea ik

#

xd

halcyon kite
#

all caps

lost isle
#

but to make the thing change

#

xd

halcyon kite
#

in order to randomize

earnest phoenix
#

lmao

halcyon kite
#

ill send pick

#

pic

lost isle
#

ok

#

thanks

earnest phoenix
#

also you can make a function like this:

function presence (){
  client.user.setPresence({
    status:"idle",
    activity: {
      name: client.guilds.cache.reduce((total, guild) =>  total + guild.memberCount, 0)+' Users',
      type: "WATCHING"
    }
  })
}
halcyon kite
#

heres what i did

#

tho

lost isle
#

wahts the red

halcyon kite
#

i crossed out the console.log

lost isle
#

lin

#

ok

#

xddd

halcyon kite
#

thats red

#

everything else is nessesary

#

well the client.once

#

isnt

#

just make it a function

earnest phoenix
#

like this:

function presence (){
  client.user.setPresence({
    status:"idle",
    activity: {
      name: client.guilds.cache.reduce((total, guild) =>  total + guild.memberCount, 0)+' Users',
      type: "WATCHING"
    }
  })
}
lost isle
#

where do i put

#

btw im new to coding

#

xd

earnest phoenix
#

don't do C&P

#

that's an example

lost isle
#

im so confued

#

xd

earnest phoenix
#

uh

#

what's your native language?

lost isle
#

discord.js

earnest phoenix
#

i mean idiom

lost isle
#

xddd

#

english

earnest phoenix
#

i looks like your native language isn't english

#

spanish, turkish, russian...?

lost isle
#

no its english

earnest phoenix
#

Uh

#

Ok

#

So

#

use the function that i use as an example

#

don't C&P

lost isle
#

but where does the function go

earnest phoenix
#

before the ready event

lost isle
#

ok

#

ok i did that

#

now what

#

run it?

earnest phoenix
#

._.

lost isle
#

im new

#

xd

earnest phoenix
#

first save and then run it

lost isle
#

oh dudh

#

xd

earnest phoenix
#

You must learn JS before making a discord bot...

regal creek
lost isle
#

xd

#

all it says is

#

watching all commands

#

x

regal creek
#

I made alot of people angry. 😌

lost isle
#

damn

earnest phoenix
#

lmao

regal creek
#

@lost isle but dont go my route. You might want to learn how to read docs. Watch yt tutorials. Steal github code cough stackoverflow cough

lost isle
#

@regal creek can you help me make a discordjs custom status move

regal creek
#

No

#

I will give you the steps

lost isle
#

ok

regal creek
#

Then you can do reasearch on how to do it

lost isle
#

kk

regal creek
#

Steps:
Make a timer
Edit status
Repeat()

lost isle
#

ok

#

can you walk me through each one

#

xd

sinful plover
#

Helo

regal creek
#

No you heard me. Now stop talking here because you will just Get angry people at you and you are gonna thank me later. If you cannot reasearch on your own you might aswell just not code.

regal creek
earnest phoenix
#

i'm officially dumb.

#

I was looking for the error on the var that fetchs an specific channel

#

and the error was:

regal creek
#

You have earnt the year's first award: 🧢

earnest phoenix
regal creek
#

😳

#

😂

earnest phoenix
#

i'm stupid.

regal creek
#

Do like me

earnest phoenix
#

ok so let's try the code again

regal creek
#

Put everything in await

earnest phoenix
#

I tried changing a const

#

xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

#

i tried that too

#

Didn't know what they meant by "TypeError: Trying To Change Const" cuz I'm stupid

#

Then I realised

#

How stupid I was

#

lmao

halcyon kite
#

hi again

#

uhhh

#

i has a question

earnest phoenix
#

?

#

Just ask it

#

@halcyon kite the error with the var Schannel wans't using var

#

it was i didn't write the await

#

lmao

halcyon kite
#

here

#

so i want that peice of code to run

#

even if the db part that restricts the command

#

is on

#

that pick ture of code

earnest phoenix
#

Didn't really understand what u want to do

halcyon kite
#

so im making a quest command

#

i want it so only the

#

if(submit === 'submit') {

#

part

#

works