#development

1 messages · Page 1477 of 1

strong escarp
#

i sometime do it

atomic vault
#

use cache before get

strong escarp
#

when i type

#

( i use computer )

tribal siren
#

boom

#

what

#

oh

#

ye thx

strong escarp
#

yay thanks

near stratus
strong escarp
#

Server count posted!

near stratus
#

congratulations

strong escarp
#

;-;

near stratus
#

don't put the link

#

#no advertising

strong escarp
#

bruh when did i said that

near stratus
#

I kinda had a feeling that you are gonna

strong escarp
#

WORKING

#

LETS ** GO

near stratus
#

noooooooooooo

strong escarp
#

?

near stratus
#

No Advertising

strong escarp
#

when

near stratus
#

No Advertising

strong escarp
#

i just showed pic

near stratus
#

see rules

strong escarp
#

oops

#

i get it

#

:(

#

but works

#

:)

near stratus
#

😊

strong escarp
#

hi

#

i own 2 bots which are in top.gg

near stratus
#

sup ?

strong escarp
#

xd

#

gg

#

u are close!!

near stratus
#

yeah so close

strong escarp
#

who deleted the message

near stratus
#

He just realized he was in wrong channel

strong escarp
#

bruh when i send . it deletes it

lucid prawn
#

?

vale garden
#

hi

#
const id = args[0]
message.channel.send("e")
await message.guild.members.unban(id)
#

i have this

#

and it should perfectly work

#

but it isnt

#

and its annoying me

#

for some weird af reason im getting this error UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message

atomic vault
#

try .toString()

vale garden
#

ok i realized something

#

the reason i got that was

#
catch(e)
    {
      message.channel.send(e)
    }
#

i had this

#

but shouldnt that also send the error

#

actually nvm im dumb

#

i had to log that

atomic vault
#

do you know how to unban user not using id?

vale garden
#

nope

#

however im getting this now

#

TypeError: Cannot read property 'id' of undefined

vale garden
#
const user = message.mentions.users.first()
const member = message.client.users.fetch(user.id)
await message.guild.members.unban(member)
#

but it isnt

#

im getting the id err again

trim saddle
#

that means there's no user found in the mentions

vale garden
#

but i didnt mention a us3er

#

*user

trim saddle
#

if you didn't mention a user then it should be empty

vale garden
#

thats the point

#

idk whats wrong with my bot

#

i found this somewhere

#
Servers do not have users, they have MEMBERS, so use

message.mentions.members.first().id
#

which implies that users is useless cuz cmds will always be used in servers

near stratus
vale garden
#

im using users cuz thats what worked before

#

but it isnt working now

#

console.log(message.mentions.users.first().id) gives me the cannot find 'id' of undefined error

near stratus
#

can't you just use id to fetch user

vale garden
#

that isnt working either

#

im getting the same error

near stratus
#

okay let's say the bot sees the message like this
!unban @glossy raptor
so take the second argument and catch the user with the id (remove <, > and @)

wintry stream
#

you have to first check if .first() returns anything

vale garden
#

let id = args[0] user = message.client.users.fetch(id)

#

btw thats how its done right

#

@near stratus

near stratus
#

you can remove them and try

vale garden
#

kk

near stratus
#

hold on

#
let id = args[0]
user = message.client.users.fetch(id)

this also works

#

try :

let id = args[1];
message.guild.members.unban(id);
vale garden
#

ok but

#

the ban is working

vale garden
#

but how do i get the username

near stratus
#

you don't

vale garden
#

console.log(message.mentions.users.first().username) is giving an err again

#

bruh

#

shouldnt that work

near stratus
#

why do you need the username again

vale garden
#

for the embed

near stratus
#

anyway that should work

vale garden
#

bruh

#

it isnt

near stratus
#

no

vale garden
#

aaa

#

wha

near stratus
#

it shouldn't work

vale garden
#

whats wrong

#

there

near stratus
#

it should be
<message>.mentions.members.first();

#

not users

#

it doesn't exist

vale garden
#

even that isnt working

near stratus
#

are you even mentioning ?

vale garden
#

same error

#

bruh ofc

near stratus
#

if you mention someone that should work

vale garden
#

console.log(message.mentions.members.first().username)

near stratus
#

hold on

#

he's banned ?

#

How can you mention him then ?

vale garden
#

ye

#

using the id

near stratus
#

even in the server ?

vale garden
#

yea

near stratus
#

gimme a moment

vale garden
#

ok

near stratus
#

Thank you for making me kick a ban a bot from my server

#

it doesn't work

vale garden
#

huh

#

why does it work for me thenn

near stratus
#

You can't mention someone who is banned

vale garden
#

i can

near stratus
#

or not in server

near stratus
#

Are you using Discord ?

vale garden
#

um

#

wut

#

lol

near stratus
#

I sus

vale garden
#

im showing that the acc is banned

wintry stream
near stratus
wintry stream
#

you can't call .id or .username on nothing

#

that's what the error says

carmine summit
#

Hey, check if guild member intent is turned on

vale garden
#

oh

#

kk

river oracle
#

Hey guys. Just now, Discord updated discord.js library.

member.hasPermission(“ADMINISTRATOR”) has now been replaced with member.permissions.has(“ADMINISTRATOR”)

Any bot using this permission validation is now buggy by default so go update your buggy codes lmao 😂

long marsh
#

CodeBreaker ... name checks out

river oracle
lusty quest
#

good to know. but i use permissions.has now for a while bcs the other way where buggy for me since ive use V12

pale vessel
river oracle
pale vessel
#

What?

river oracle
#

second of all, my bot was declined because of this issue that's why am posting it here. But feel free to use whatever works for you

pale vessel
#

Not sure what you mean by message.guildmember.hasPermissions but okay

earnest phoenix
#

Error [SHARDING_NO_CHILD_EXISTS]: Shard 2 has no active process or worker.

#

How to repair this?

#

Ping me when u have a anwser xD

earnest phoenix
#

My beta bot keeps going online and offline i hosted it on uptime robot

#

why is that?

#

I have a original bot hosted there but my beta bot keeps going online and offline

#

(Its really unstable ngl)

obtuse niche
#

Both bots are hosted on uptime robot?

near stratus
earnest phoenix
#

yea

near stratus
#

wasn't it for pings ?

earnest phoenix
#

U can :/

#

Its for pings and hosting

#

here's a crazy idea

#

rent a vps

near stratus
#

what ?

earnest phoenix
#

mindblowing, right

near stratus
#

bruh

near stratus
obtuse niche
rocky hearth
#

in ts, I've a readonly array how do I create a variable whose value can be only from this array?

earnest phoenix
#

pog

#

how ye guys doin

wintry stream
#

can't you just pass values directly from that array instead ?

rocky hearth
#

yeah, but just in case.

#

actually I want the parameter of the function of that type

wintry stream
#

so check if it's in that array and throw if it's not ?

#

i mean if you have 'foo' in that array and 'foo' in a different variable isn't it the same thing ?

rocky hearth
#

hmmm hmm, i got it

wintry stream
#

like you could make that array a separate type and then have the parameter of that type

#

but if somebody passes a different instance of that type it might break

#

¯_(ツ)_/¯

earnest phoenix
#

since emojis are in the format:

<:python_is_gay:id>

would it be a good idea to use regex for this or parseInt since the snowflake can be parsed out as it's a number but discord names emojis uploaded on mobile as emote_somenumber by default so that might cause problems

string.match(/\d*/);
wintry stream
#

don't discord libs already parse emojis for you ?

earnest phoenix
pale vessel
#

like /<a?:\w+:(\d{17,18})>/g

earnest phoenix
#

@pale vessel the fuck

#

what the hell is that

wintry stream
#

i googled for discord emojis in message

lucid prawn
#

why is this not working

client.on('message', message => {
(channel => channel.name === 'akame-logs' + message.channel.send(console.log))
earnest phoenix
#

@wintry stream that exists???

#

thank fucking hell

#

I love you

wintry stream
lucid prawn
#

no errors

earnest phoenix
#

you shouldn't do that in the first place tf

#

@lucid prawn what are you even trying to do

#

get a proper logger, don't log to discord

pale vessel
#

/ - start of regex
<
a? a is optional
:
\w+ 0-9 a-z one character or above
:
(\d{17,18}) 17-18 digit long for snowflakes

/ - close of regex
g - global modifier to match all

earnest phoenix
#

especially not on every message

lucid prawn
#

i want everything in log to send to a channel

earnest phoenix
#

well, don't

#

@pale vessel you are a fucking wizard

earnest phoenix
#

detect message => send message

#

and WHY are you doing that anyways

lucid prawn
wintry stream
earnest phoenix
lucid prawn
#
const { name, region, memberCount, owner, afkTimeout } = guild
          ^

TypeError: Cannot destructure property 'name' of 'guild' as it is undefined.
    at Client.<anonymous> (/home/runner/SmoggyAffectionateCygwin/index.js:372:11)
    at Client.emit (events.js:327:22)
    at Client.EventEmitter.emit (domain.js:483:12)
    at MessageCreateAction.handle (/home/runner/SmoggyAffectionateCygwin/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/runner/SmoggyAffectionateCygwin/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/runner/SmoggyAffectionateCygwin/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/runner/SmoggyAffectionateCygwin/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/runner/SmoggyAffectionateCygwin/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/runner/SmoggyAffectionateCygwin/node_modules/ws/lib/event-target.js:132:16)
earnest phoenix
#

@lucid prawn ahh did you get muted in djs too?

lucid prawn
earnest phoenix
#

can you send your code again

lucid prawn
earnest phoenix
#

@lucid prawn guild is undefined; not because you never defined it but because the value you set to it was undefined

earnest phoenix
#

can you send the code where you defined guild@insane-personality#5066

#

@lucid prawn

#

fuck mentions

lucid prawn
#
  const { guild } = message
  const guild = client.guilds.cache.get("772658962112839680");
#

brb going to get on my laptop @earnest phoenix

earnest phoenix
#

@lucid prawn why are you defining it twice

lucid prawn
earnest phoenix
#

the guild is not cached

#

try using fetch and awaiting it

#
const guild = await client.guilds.fetch("id");
lucid prawn
#

ok#

lament rock
#

Guilds should always be cached in discord.js since the gateway always sends GUILD_CREATE for every available guild.

#

fetch is usually implemented for partials

earnest phoenix
#

@lament rock yeah but you never know

lucid prawn
#
client.on(`message`, message => {
let channel = client.channels.cache.get("791613097076195370")
if(!channel) return
channel.send(console.error)
let findchannel = client.channels.cache.find(channel => channel.name === '⛔akame-logs')
if(!findchannel) return
findchannel.send(console.log)
})

how do i get it not to say
function () { [native code] }
function () { [native code] }

pure lion
pure lion
earnest phoenix
#

@lucid prawn are you pretty experienced with javascript or are you just starting out

pure lion
#

Clearly starting out

lucid prawn
#

no

earnest phoenix
pale vessel
#

doesn't really mean anything tbh

pure lion
#

Yeah exactly

#

Like how the fuck does a bot with 8 commands get verified

earnest phoenix
#

im sure they'll reject my actually good bot with an actual purpose

carmine summit
#

@pure lion I got a bot with 1 command get verified

earnest phoenix
#

There is also dad bot on the site

ivory seal
#
    console.log(user.id)
  })```
this only returns the bot's id and my id
#

even though there are so many more members

#

can someone help?

earnest phoenix
#

member intent moment?

ivory seal
#

enabled

#

mb thought it was

obtuse jolt
#

v12 hurts my brain

earnest phoenix
#

rtfd

obtuse jolt
#

how about i just keep trying things until it works

lament rock
#

You need the presence intent enabled to get an entire list of members sent on ready

summer torrent
#
m.delete({ timeout:5000 })```
pale vessel
#

nice

upbeat prairie
#

guys, can someone help?

upbeat prairie
#

i keep incurring in an error

lament rock
#

member intent is for guild member create, delete and update

upbeat prairie
#

and i can't "unhost" my bot, mf doesnt even start now

lament rock
#

guild presences is what sends the entire member list on guild create

earnest phoenix
#

wat

pale vessel
#

So enable fetchAllMembers in ClientOptions or enable the guild presences intent ig

near stratus
lament rock
#

Otherwise, the request will timeout

pale vessel
lament rock
#

Oh. Interesting

pale vessel
lament rock
#

Of course

upbeat prairie
#

@near stratus I didnt

#

But I found out y

#

And in heroku

near stratus
upbeat prairie
#

Yes

near stratus
#

then it should run

upbeat prairie
#

App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-python
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: b9d08a15607ae0437be9dae0495ab34ec3fc1b4e
remote: !
remote: ! We have detected that you have triggered a build from source code with version b9d08a15607ae0437be9dae0495ab34ec3fc1b4e
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main

#

but even after setting it

#

i get the same error

pale vessel
#

I just wish for discord to allow users to fetch member presences without the intent like what they did to users/members

#

but presences are just not from REST

#

so I can understand that

earnest phoenix
#

PLEASE STAHP USING HEROKU

near stratus
#

how are you hosting ?
with GitHub or command line ?

pale vessel
#

I mean you can still search for members using queries via WS without the guild members intent

near stratus
rancid tulip
#

Heroku AMknife

earnest phoenix
#

READ THIS

upbeat prairie
#

what's the difference

misty sigil
#

aye thank ye

pale vessel
misty sigil
#

lmao

pale vessel
#

idk man I wouldn't want to hear it from you

near stratus
misty sigil
#

idk i wouldn't wanna hear it either

upbeat prairie
#

mhm, i think with command line

#

no wait

#

with git

near stratus
upbeat prairie
#

yeah

near stratus
#

then just add a comment somewhere and commit

#

but before

#

use git pull

#

then commit > push

upbeat prairie
#

i am just gonna host it on my pc, too complicated

#

thx tho

near stratus
upbeat prairie
#

fr

near stratus
#

I don't trust my internet service at least

upbeat prairie
#

me neither

rancid tulip
#

I don't trust my electric company.

earnest phoenix
#

Get a VPS

near stratus
upbeat prairie
#

yesterday my internet died, never happened before, and right at the moment the br wanted to review my bot

#

fuck my life

pale vessel
earnest phoenix
#

Don't say you cant get a vps because no money, you have nitro and are a booster

upbeat prairie
#

damn, i got nitro for 1 dollar

pale vessel
#

it just feels weird hearing a person that uses repl.it telling you to use a vps

upbeat prairie
#

...

earnest phoenix
upbeat prairie
#

and i got 2 boosts with it

near stratus
upbeat prairie
upbeat prairie
#

i am gonna work on my bot

#

cya

earnest phoenix
#

true 100% uptime doesn't exist

#

there's never an ideal condition to have 100% uptime

near stratus
earnest phoenix
#

maybe on your app/vm

#

but not on a discord bot

#

and even then

#

your app/vm is granted to crash someday

#

nothing is ideal in the real world

near stratus
#

20 mins off

earnest phoenix
#

exactly

#

nothing does

#

We all know 100% uptime doesn't exist because of the insane amount of offline declines in #mod-logs

#

lmfao

near stratus
earnest phoenix
#

sigh kids these days forever

near stratus
#

I watched a YouTube video saying How to make a discord bot without coding lol

vale garden
#

hi

#

lmfao what

haughty mirage
vale garden
#

lol

upbeat prairie
#

Try to put await send(smth) and see if it will send that

#

Await ctx.send

#

I mean

earnest phoenix
#

@earnest phoenix wouldn't you have to refetch the role after creating

upbeat prairie
#

Use user instead of member

#

Await user.add_roles

#

It worked for me

earnest phoenix
#

You got the role object then created a new role but then ur adding the old role object instead of the new one

upbeat prairie
#

Oooh, he right

#

It was code who helped, I was just a bystander lol

#

:))

#

Thx

stuck pike
#

it shows no error

#

doesnt work as well

pale vessel
#

Guild members intent moment?

stuck pike
#

ye

lament rock
#

ENOTFOUND sounds like the machine running the bot is either not connected to the internet or is trying to connect behind a firewall and discord.com is blocked

pale vessel
#

someone probably turned off their wifi

stuck pike
#

lawl

lament rock
#

(that url is the url the gateway tries to request to get the websocket url to connect to)

#

also lol. Api v7. Update your lib to use api v8 since v6/7 are deprecated

pale vessel
#

discord.js uses API v7 until the next major release

lament rock
#

v12 still uses api/gateway v7?

pale vessel
#

yes

lament rock
#

That's a bit strange

stuck pike
#

why it aint working

pale vessel
#

you sure you have the intent enabled in developer portal?

stuck pike
#

no errors but not working

eternal osprey
#

hey guys

#
allItems = fs.readFileSync("./cart.txt", "utf8").split("\n").map(x => x.split(/ +/))
console.log(allItems)
let filtered = allItems.filter(x => x[0] === message.author.id)
let final = filtered.map(x => x[1]).join("\n")``` these are my variables. Allitems contains all arrays of users. The filtered is just an array of 1 user. I am trying to remove the filtered from the allitmes.
#

how would i do that?

lament rock
#

You'll wanna loop over allItems and splice out entries which satisfy constraints which you can determine based on if there is an entry in filtered which matches the current

#

This will be a NodeJS question.
I'm looking to possibly integrate the worker_threads built in module into my gateway and main worker to reduce single threaded stress on multi-core platforms. I wanna know if it's more taxing on the system to spawn multiple threads on single core systems versus just having it all be on a single thread or if the scheduler is able to delegate cpu time as efficiently in either scenario

lusty quest
#

so you want to force a single threated application multi threaded?

#

it will probably will have a tax on the host system. since you add more stuff to the chain

lament rock
#

It'll mostly just be IPC between the gateway and main worker, just sharing the same memory space

lusty quest
#

i never looked into this tbh, i rather learn a multi threaded language than adding more headache to something that will maybe work but at what cost.

#

or look into microservices.

lament rock
#

Micro services is what I'm using currently, but I'm not sure if it would be more beneficial to IPC over http between the gateway worker and the main worker or to have the gateway and main share the same memory space just be on different threads

lament rock
lusty quest
#

you will probably get some better IPC out of it, but im not sure if its worth the hassle

#

also possible that you gain only 1-2% IPC improvement

crimson vapor
#

my credit now KEKW

lusty quest
#

i know that Brain got his Bot I/O locked while using C+, so its possible that offloading stuff to a different thread gets you also I/O limited

lament rock
#

Actually. You're probably right but for a different reason to continue to use micro services. I do have to restart the main worker sometimes and having to restart the gateway as well would be pretty taxing on the cache worker once all of the asynchronous events get emitted

crimson vapor
#

what are you attempting to do?

lament rock
#

multithreading

lusty quest
#

offloading stuff on a different Thread to improve IPC

lament rock
#

I think I could still make use of worker threads in different areas at least. I meant to make a worker to handle image manipulation, but

lusty quest
#

maybe look into a multi threaded Language, they can also be made in Micro service style but with the benefit to have stuff like your main worker in itself Multi threaded.

lament rock
#

any suggestions

lusty quest
#

i have no bot that require me to get better IPC or Micro Services since i have 1 Shard

lament rock
#

fair enough. I'm not at the point of absolutely requiring multi threading, but I plan to future proof since clustering multiple ws connections on a single thread can be very taxing down the line

lusty quest
#

would love to help you tho

#

i dont expect that my bot gets past 500 Guilds so im fine

lament rock
#

You might surprise yourself

lusty quest
#

im stuck now for 4 Months at around 300 Guilds

#

also the Game ive made the Bot for is about to die

lament rock
#

I was at a similar situation until YouTube started banning IPs of larger bots, which caused a pretty big surge. https://amanda.moe/to/stats

Ultimately, it was out of my control, but demand may increase or may not. Never know. You better be ready if it explodes though.

lusty quest
#

i dont think it will blow up. since its a niche with already some other way larger bots that do most of the same stuff.

lament rock
#

fair

earnest phoenix
#

i did like the bot reads every msg and if the msg is "this or that" then it responds (bot). is that (conversation) gonna save in my pc?

#

what

#

plz tell me this fast urgent needed

sudden geyser
idle comet
#

someone knows how to put a bot 24/7

earnest phoenix
#

rent a vps

lusty quest
#

use a vps

idle comet
#

How much does it cost

lusty quest
#

you pay what you get. so between 3-7$/Month usually

idle comet
#

Ok thanks

ivory seal
#

is there any alternative to user.roles.cache.has(level5) level5 is a role and ``user is a user`

pale vessel
#

What do you mean

ivory seal
#

like cache returns undefined sometimes right

#

is hter any other method to see if a user has a role?

earnest phoenix
#

fetch the user before trying to interact with it i guess

pale vessel
#

fetch the member?

ivory seal
#

i do fetch the member

#

const user = await client.users.fetch(`${member.id}`) and member is from a promis

pale vessel
#

That's a user

ivory seal
#

yes and im fetching the user righ?

pale vessel
#

Users can't have roles

#

they don't belong to a guild

#

you need to fetch a member

ivory seal
#

message.guild.members.fetch?

pale vessel
#

yes

ivory seal
#

got it thanks

earnest phoenix
sudden geyser
#

so your bot responds infinitely

#

is what you're trying to say

earnest phoenix
#

so i have confusion that those conversation will save in my pc or

near stratus
lament rock
#

They will not be saved to your PC. They only show up in your console until the console window is cleared or exited.

earnest phoenix
earnest phoenix
#

@near stratus i did like this

#

``if (msg.equals(".ping"))
{

        channel.sendMessage("pong!").queue();
    }

``

#

@near stratus i use java

near stratus
cinder stratus
#

Hey I don't know why my bot is giving me ping 10K ms

#
Shards: 5
Guilds: 2156
Hosting: Microsoft Azure (2 CPU, 4GB RAM)
#

I didn't face that problem when I had like 1500 servers

earnest phoenix
#

how are you on 5 shards but you don't have enough guilds to shard in the first place 🤔

cinder stratus
#

I know it's 2800 guilds

vague imp
#

You can divide you 5 guilds in 5 shard too

#

It's not like sharding means more guild

cinder stratus
#

@vague imp This is not a fun channel

earnest phoenix
cinder stratus
#

yep

lament rock
#

sharding is per 2500 guilds; Not 2800

cinder stratus
#

hmmm

#

So how much should I set?

earnest phoenix
#

you should let your library handle the amount of shards

lament rock
#

2 shards

earnest phoenix
#

which lib are you using

vague imp
#

You can shard auto then if you are predefining shard then you can shard 5 server too

cinder stratus
#

I use kurasuta

vague imp
#

I once divided my 1000 server in 2 shard

lament rock
#

Unless you are growing very quickly, then you should not use more than 2 shards currently

cinder stratus
vague imp
#

Just by predefining number of shard

cinder stratus
#

guildsPerShard: 1250

#

is that right I guess?

earnest phoenix
#

god that lib is trash

cinder stratus
#

I know

#

But still the ping issue?

earnest phoenix
#

how are you calculating the ping

lament rock
#

Where is the server located geographically

earnest phoenix
#

also that

vague imp
#

@cinder stratus try pinging api directly via terminal

#

See how much you get

lament rock
earnest phoenix
#

i mean

#

it won't be the same as doing a REST request to create a message

#

simply pinging the api is doing a GET and out, isn't the same as POSTing for a message and waiting for it to be created and returned to you

cinder stratus
#

I mean the Bot Latency not the api one

vague imp
#

It will help in find out what's the actual ping

earnest phoenix
#

no it won't

cinder stratus
#

my api latency is 18ms which is good

lament rock
#

gateway latency is different than rest

vague imp
#

@cinder stratus is your bot response is slow?

cinder stratus
#

yeah

#
        const latency = msg.createdTimestamp - message.createdTimestamp;
lament rock
#

Oh then your server is really close to US-east

vague imp
#

U are using discord.js

cinder stratus
#

yeah

vague imp
#

?

earnest phoenix
#

you shouldn't compare timestamps

cinder stratus
#

yep

vague imp
#

Have you installed optinal pakage?

#

Optional*

cinder stratus
#

yeah I guess

#

yeah I have

vague imp
#

Zlib-sync and etc

cinder stratus
#

yeah

vague imp
#

I see

lament rock
#

I'd probably explain the latency as network congestion or some other side effect of using 5 shards at such a small scale

earnest phoenix
#

measure ping with Date.now()

Date.now(); // store in a variable
await send();
Date.now() - previousDateNow; // this is your actual REST ping
cinder stratus
#

for comparing bot latency?

lament rock
#

gateway websocket latency would be different since it's independent of the rest, but how you calculate rest latency currently is not technically correct

cinder stratus
#

hmm

#
        const previousDate = Date.now();

        const msg = await message.channel.send('Pinging...');

        const latency = Date.now() - previousDate;
        
        msg.edit(`Bot Latency: \`${latency}ms\`, API Latency: \`${Math.round(this.client.ws.ping)}ms\``);
lament rock
#

Looks good, yeah.

cinder stratus
#

but still what to do about the ping issue

lament rock
#

Actually, your naming for the latency types are incorrect

cinder stratus
#

huh

#

?

lament rock
#

Bot latency should be renamed to Rest latency and API latency should be renamed to Gateway latency

cinder stratus
#

yes it's hosted in us-east

lament rock
cinder stratus
#

ok

#

I did that because some people are idiot

#

they don't understand technical things

lament rock
#

Some people don't have to understand it. You should be honest with what it is instead of trying to sugar coat it

cinder stratus
#

But still the rest latency is high what should I do about it?

novel slate
#

Hey, do you guys know any tutorial to do a multiselect input field like the carl bot has in its dashboard?

lament rock
#

It'll always be higher than ws latency

cinder stratus
#

but it's responding very slow

lament rock
#

Try not using 5 shards

cinder stratus
#

But at some point I have to use 5 shards

frail yarrow
#

hello

#

top gg has a token for an human?

lament rock
#

At some point, sure but that's at 10k guilds

cinder stratus
#

hm

#

ok lemme restart the bot

finite nimbus
#

Has anybody api like that:
Gives me image with code (to make verification)
And this code in string

earnest phoenix
#

const cheweyBotAnalyticsAPI=require("discord-bot-analytics")
const customAnalytics = new cheweyBotAnalyticsAPI("YOUR API TOKEN", client)

Can Anyone tell me what this is how do i onnect discord bot to website

umbral zealot
#

what website

restive furnace
cinder stratus
#

still high @lament rock

lament rock
#

02shrug Remind me what your bot's rest latency is

cinder stratus
lament rock
#

That's good rest latency

umbral zealot
#

Those are fine latencies

#

Great pings. 👍

cinder stratus
#

It was much lower when I hosted my bot on google cloud

#

gateway one was around 10ms

umbral zealot
#

You started this conversation by saying it was 10k ms ping so we literally thought you had 10 second pings.

stark abyss
#

ty

umbral zealot
#

This is still within normal operating parameters.

cinder stratus
#

yeah the old method showed around 80ms

#

when it was on google cloud

#

the timestamp

umbral zealot
#

Well yo'ure just on a slightly slower internet connection

cinder stratus
#

hmm

umbral zealot
#

there's nothing to "Fix" here, other than "choose a lower latency host"

novel slate
cinder stratus
#

I think I should get some more money and again move to google cloud

umbral zealot
#

oh you're on a free or really cheap host? yeah that would explain it.

cinder stratus
#

Currently on azure

#

and I also have aws

#

but it's too shity

restive furnace
#

i'm on cheap host and my latency is like 20ms.

umbral zealot
cinder patio
#

It should be pretty easy to do if you are using a framework like react or vue

umbral zealot
#

oh yeah with react it would be super simple

restive furnace
earnest phoenix
#

I am unable to make level system

#

Can anyone help me

lament rock
#

"should" doesn't reflect reality

cinder stratus
novel slate
umbral zealot
#

oh god jquery

#

Man you gotta go look into react or something

novel slate
#

Yeah, but i am just doing some basic stuff right now and was hoping there was an easy solution

#

I am also using php for the backend, so yeah

umbral zealot
#

I know I know I'm saying "go learn a framework!!!" but truly, really, seriously, all you need is create-react-app and maybe, I dunno, tailwindcss or chakra or something, and you are in for a treat of development

#

and your back-end can then be purely a REST API and have no bearing on what your front-end looks like

#

which is how it should be

novel slate
#

Thanks, i will look into that

earnest phoenix
#

CRA 🤢

umbral zealot
#

For starters, cry

novel slate
#

even though i am really bad when it comes to designing things xD

umbral zealot
#

c'mon you can't expect the first step of someone into react to be a fully customized snowpack+babel+plugins setup

novel slate
#

but yeah, that doesn´t change with using a framework or not, so thanks for the tip!

umbral zealot
#

I copy/paste boilerplate to make it look half decent

#

and I concentrate on code to make things work

novel slate
#

Just look at the website i am working on xD

#

I looks like a pile of shit, but it does its job

cinder patio
#

I use bootstrap for almost everything visually - then I just reskin it

umbral zealot
#

"Nice design job, right? Kek "

novel slate
#

But i am able to reskin it so badly it looks crappy

cinder stratus
#

@umbral zealot same I also copy/paste boilerplate

earnest phoenix
#

material-ui is my togo UI framework

cinder stratus
#

I suck at front-end

earnest phoenix
#

super stylable and it looks good out of the box

umbral zealot
#

ewww I can't stand material-ui tbh

#

unless I was making react-native apps

earnest phoenix
#

how come

umbral zealot
#

material is a mobile ui framework

#

it's shit for websites, imho

earnest phoenix
#

when was the last time you used it 🤔

umbral zealot
#

"oh sorry you wanted a nice navbar? HAH sorry, no"

earnest phoenix
#

i built multiple apps with MUI and all of them look super nice

umbral zealot
#

it's made to look like an android app or iphone app

cinder stratus
#

try flutter

umbral zealot
#

like I said, my opinion, and I'm highly opinionated

#

right now I'm trying out tailwind, it seems to be... nice enough

lament rock
#

web dev is it's own field for a reason. It isn't as simple to make a nice website as it is to make a bot that responds to !ping

novel slate
#

and that is the best thing

umbral zealot
earnest phoenix
novel slate
#

The login looks like something out of the 80s

earnest phoenix
#

and one of my electron apps is also MUI

umbral zealot
earnest phoenix
#

i mean yeah

#

it's a todo app, nothing fancy

umbral zealot
#

And that's where I don't like MUI, because it's mobile FIRST. instead of being mobile-friendly.

#

I do responsive designs, I don't do apps for mobiles that somehow still function on my PC, y'know? 😛

lusty quest
#

need to get into react. had first the idea to use plain HTML /CSS/jquery but its annoying to use, then ive had the idea to switch to express together with express-headers but react looks way better.

umbral zealot
#

React is just goddamn amazing

novel slate
#

Yeah, i´ll start learning react until family is here

earnest phoenix
#

this is an electron app built entirely with MUI, looks pretty good on all viewports

umbral zealot
#

I was hired as a web developer with react and I literally had no experience with it. And within 2 years I was basically senior level in knowledge. And that's not because I'm super smart or anything, it's because react is so goddamn easy.

lusty quest
#

any recomended toolchain for React?

novel slate
#

I´ll see where it goes xD

umbral zealot
#

Take react and add styled-components and what you have is basically as enjoyable as working with pure html, css, and javascript. Because, well, there's no special snowflake "decorators" and shit, so you have pure JS. Then your "HTML" is the JSX, basically xml that's just different names (but can mostly be pure html, with the occasional "Component" in it). And styled-components gives you that nice pure CSS syntax with a bit of js sprinkled in

earnest phoenix
#

also

#

a single html file

#

easy routing

umbral zealot
earnest phoenix
#

and more

mellow kelp
#

i sill dont understand what forwardref does KEKW

umbral zealot
#

oh yeah react-router-dom. gorgeous.

mellow kelp
#

client-side routing is beautiful

earnest phoenix
#

angular seems nice aswell but it doesn't seem to give me as much freedom as react does

umbral zealot
# lusty quest any recomended toolchain for React?

So, React + Styled-Components + react-router-dom. If you need "global state management" don't go with redux, take a look at zustand it's just as powerful and much, much simpler. If you want to integrate a CSS Framework, there's a lot of choices, though, so you'll have to explore around.

cinder patio
#

yeah SPA's are great, but make SEO a lot harder

umbral zealot
#

no angular is absolute horseshit omg.

earnest phoenix
#

i fell in love with it the moment i tried it

umbral zealot
cinder patio
#

like, render the main page server-side and the rest is client-side?

umbral zealot
earnest phoenix
#

good point

#

does anyone knows how to change background color of bot or server page?

#

but i mean you can always create a ghost component that just acts as a "portal"

mellow kelp
umbral zealot
mellow kelp
#

and switching between routes is pretty much seamless

#

so it makes it look like a native app

umbral zealot
# earnest phoenix but i mean you can always create a ghost component that just acts as a "portal"

yes but... see, this is in my App.js, outside of the components, it's just... loading my profile on page load: ```js
import userStore from './store/userStore';
const { me, setUser } = userStore.getState();
me().then((user) => {
if (user?.isLoaded) {
setUser(user);
}
});

I don't need a component for this. no hook. no complicated loading shit. This is all I need to know if my user is logged in if they load or refresh the page.
#

it just sits there and does its damn job 😄

novel slate
#

Man, if i use a REST-API for the Backend, i could actually implement it directly into my bot... Would make a lot of things really easy

earnest phoenix
#

it's often the most used approach

#

monolithic design

mellow kelp
#

yeah

#

i got a rest api for my bot

#

for changing guild settings and stuff

misty sigil
#

i use a rest api for transferring stats between bot n site

umbral zealot
#

yeah after I'm done this blog platform I really gotta do a bot dashboard

#

my old one still uses EJS. shudders

mellow kelp
#

gasp

novel slate
earnest phoenix
#

hello

mellow kelp
#

how about making a validation middleware?

earnest phoenix
#

I Want to make a website and want to store my discord bot analytics on the website how will i do that?

mellow kelp
#

learn backend stuff

earnest phoenix
#

IK But whats the best keyword to searcch it?

mellow kelp
#

idk

#

you know express?

earnest phoenix
#

no

mellow kelp
#

learn express first

quaint peak
#

how would i delete a specific users messages without going over any other messages, just that one users in discord.py.

novel slate
#

my backend is really messy... I have one function i always have to look at the code, because i always forget what it does. Even though the name is a good one, as it describes what it does...

lyric mountain
#

Oh my, functional react lul

umbral zealot
#

functional react is best react

cinder patio
#

I find classes more organised

lament rock
#

I just use pug

lyric mountain
#

Like, nothing against but funcional is getting discontinued

umbral zealot
#

I thought so at first but then I started using redux and mapStateToProps and willComponentRender and willComponentUnmount and omgHowManyFuckingFunctionsCanYouHave and I just tableflipped.

umbral zealot
#

you have it the wrong way around

#

functional is newer

#

Hooks are the future, everything is going to hooks, that's how it is

lyric mountain
#

Well, to each one their own

sudden geyser
#

functional programming 💪

umbral zealot
#

There's nothing inherently wrong with the class-based methods of react

#

But the team is aiming to make things faster and more efficient with functions

#

things they just can't do with classes

#

It's literally my job to know these things and to stay aware of the technologies, y'know 😂

earnest phoenix
lyric mountain
#

Weird flex but ok

umbral zealot
#

Congrats.

shell perch
#

i think it broken

#

idk

earnest phoenix
#

Nice caching and rate limiting @earnest phoenix

umbral zealot
#

That's the api they're using, not their code

#

if you think they could write an API you haven't been following their journey 😂

earnest phoenix
#

Oh 😂

sudden geyser
stark abyss
#
        let name = arr[i].slice(0, -5)
        let user = await msg.guild.members.fetch({ query: name, limit: 1 })
          .then(console.log)
          .catch(console.error);     
          if(user) console.log(user.first())```
Name is tag,  idk what I am doing wrong but it console logs `Collection(0) [Map] {}`
earnest phoenix
#

aren't you awaiting the catch

stark abyss
#

I don't understand smiles

lyric mountain
#

Free nordvpn premium lul

stark abyss
lyric mountain
#

His status

earnest phoenix
lyric mountain
#

So?

#

I'm proud that it's a google pfp

stark abyss
#

ngnl < code geass

lyric mountain
#

Different genres, can't compare a toast to a banana

earnest phoenix
stark abyss
#

yes

earnest phoenix
earnest phoenix
#

hi

stark abyss
#

hello

sudden geyser
#

NGNL is meh but it's entertaining at most

stark abyss
#

I would say better then other isekais

lyric mountain
#

The thing is that ngnl stopped too soon

earnest phoenix
#

erm this is development why we oof toopic

sudden geyser
#

anime is superior

stark abyss
#

^

earnest phoenix
stark abyss
#

3-1 we win

earnest phoenix
#

3 2

stark abyss
#

dang

earnest phoenix
#

💀

stark abyss
#

we still have the high ground

earnest phoenix
stark abyss
earnest phoenix
#

king

#

why tf this code

stark abyss
#

I can't read that not that I can help you

earnest phoenix
#

not workin\

lyric mountain
#

Oh java

#

Lemme handle this

#

You're using the deprecated builder

stark abyss
lyric mountain
#

It doesn't work anymore since the gateway update

earnest phoenix
#

``package store;

import javax.security.auth.login.LoginException;

import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.OnlineStatus;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;

public class Start {
public static String prefix = ".";

public static void main(String[] args, Object Game) throws LoginException
{
    JDABuilder builder = new JDABuilder();
    builder.setToken("Your-Token-Goes-Here");
    builder.setStatus(OnlineStatus.ONLINE);
    
    builder.addEventListeners(new GuildMessageReceivedEvent(null, 0, null));
    
    builder.build();
    }

}

#

oo

#

may u tell me plz

lyric mountain
#

Use the new builder

#

JDABuilder.create() iirc

#

You're using intellij, just press ctrl + space

earnest phoenix
#

am using

#

eclipse

prime glacier
#
opusscript_native_wasm.js:8
var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){ret

RangeError: Source is too large
    at Uint8Array.set (<anonymous>)
    at OpusScript.decode (C:\Users\gamin\node_modules\opusscript\index.js:78:17)
    at Decoder._decode (C:\Users\gamin\Documents\med1\node_modules\prism-media\src\opus\Opus.js:64:25)
    at Decoder._transform (C:\Users\gamin\Documents\med1\node_modules\prism-media\src\opus\Opus.js:189:20)
    at Decoder.Transform._read (_stream_transform.js:191:10)
    at Decoder.Transform._write (_stream_transform.js:179:12)
    at doWrite (_stream_writable.js:441:12)
    at writeOrBuffer (_stream_writable.js:425:5)
    at Decoder.Writable.write (_stream_writable.js:316:11)
    at PassThrough.ondata (_stream_readable.js:714:22)```
#

can someone help

lyric mountain
#

Oh, nvm them

#

First time seein dark mode eclipse

#

Anyway

#

Use the new builder

#

See JDA github page for an example

earnest phoenix
#

may i dm u plz

lyric mountain
#

No

#

See github docs

#

There's an entire tutorial about the new builder there

earnest phoenix
#

yes sure i will

prime glacier
#

🙄

lyric mountain
#

But mainly, it's JDABuilder.create

earnest phoenix
#

have other prob

lyric mountain
#

@prime glacier source is too big

earnest phoenix
#

may i plz plz

lyric mountain
#

Just ask here

prime glacier
earnest phoenix
#

am eating currently

mellow kelp
#

JDABuilder.createDefault("token")

earnest phoenix
#

and status and all?

lyric mountain
#

Opus probably have a limit on how big the input files can be

lyric mountain
mellow kelp
#

yea

lyric mountain
#

Nor presences

mellow kelp
#

there are more options

#

but like thats the simplest one for some cases

lyric mountain
#

Wow just noticed a major issue @earnest phoenix

#

You're doing the event listener completely wrong

#

You need to create a new event handler class to pass on addEventListener

#

Not pass an event to it

earnest phoenix
#

oo

#

check dm

#

i sended u 1 msg

restive furnace
#

...

#

send it publicly thx

pale vessel
#

don't forget the token, the essential part of posting bot code publicly

#

/s

earnest phoenix
#

How the hell do i open shell on repl.it on mobile

rustic nova
earnest phoenix
pale vessel
#

As you would say to other people, "don't use repl.it, rent a VPS"

earnest phoenix
#

@pale vessel brrr private testing botum

slender wagon
#

Is there i can get a message link using discord.js

pale vessel
#

message.url

slender wagon
#

thanks

earnest phoenix
pale vessel
#

why

earnest phoenix
#

kek

slender wagon
#

lol

#

i just had to do

giveaway.message.url
slender wagon
fair scaffold
#

client.on('ready', () => {
client.user.setPresence({ activity: { name: "$help", type: "WATCHING" } });
console.log("am ready");
});
I did the order and it didn't work the wachting

tired panther
#
Error [SHARDING_NO_CHILD_EXISTS]: Shard 2 has no active process or worker.
``` How to fix this ?
this is a bug in djs
how to prevent it?
earnest phoenix
#

how to set libary

earnest phoenix
#

you can keep console.log("am ready"); if you want

#

@fair scaffold

earnest phoenix
solemn latch
#

set library?

tired panther
#

How to end a process without restarting it?

solemn latch
#

like in the process itself?

tired panther
#

yes my bot is running two times and now I want to end a process

#

@solemn latch its an emergency xD, I do not have access in the server

slender wagon
#

VSC?

#

oh nvm

solemn latch
#

most process managers will restart a process when you close it, youll want to have server access.

tired panther
#

maybe I just renew the bot token

slender wagon
#

that will still restart...

tired panther
slender wagon
#

lol

solemn latch
#

itll logout the bot, yeah

tired panther
tired panther
#

lost 20 guilds bc of that problem xD

oak talon
#

Hello, can you tell me what's wrong with the bot?

slim heart
#

which bot

oak talon
#

PartyBeast

slim heart
#

this server isn't for help with bots it's for help with the site. go to the bot on the site and support server

quaint peak
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'snipes'

#

any idea how to fix this?

trim vector
restive furnace
earnest phoenix
regal siren
#

@blissful coral

#

Help

lyric mountain
#

Why did u just ping a bot reviewer?

odd stratus
#

Is it possible to have the bot generate an invite link on a guildMemberUpdate event? Can't seem to figure out how to make it work on this event

lyric mountain
#

You can, but why?

odd stratus
#

I want it to send them a one time invite link when they receive a certain role

lyric mountain
#

That'll easily DDDoS ur bot

#

Ratelimits yk

opal plank
#

why not simply , you know, GRANT them the role when they join?

#

rather than nviting them to give them a role

odd stratus
#

Because they need manual approval

opal plank
#

and how is automated links going to do that?

lyric mountain
odd stratus
#

By giving them the invite link when they get the role added to them?

#

That only has a one time usage

opal plank
#

thats not manual though

odd stratus
#

But they need to manually be given the role lol

opal plank
#

whats the difference between
making a link => having them click it => get role
give them role

both are going to end up being the same, everything is based on what THEY do, not you, theres nothing manual

#

make a reaction collector then

#

lots of bots already do that, where you have to react to a message saying you agree to rules n stuff

#

why not have them click the raction and give them the role?

lyric mountain
#

I think he has 2 servers, once someone reaches a certain level they're granted an invite to the second server

opal plank
#

then it wouldnt be on the guildMmeberAdd event

#

but rather on a different trigger

lyric mountain
#

He said guildMemberUpdate but yeah, it'd have nothing to do with member events

opal plank
#

how does a level ralate to "when they join they get dm'd a link for one time use role" ?

#

well rather than assuming, lets ask them

#

@odd stratus what exactly you trying to do?

odd stratus
#

The bot is in two servers, if an admin gives a member a specific role, I'd want the bot to send them a newly generated invite link to a Premium server which can only be used once and expires after 24 hours

opal plank
#

so you want something like

#

!invite @odd stratus

bot makes invite to new server wtih role set to expire for 24h, thats it?

odd stratus
#

Well not with a command

opal plank
#

and sends u the link in dm's

odd stratus
#

Just when they receive the role

opal plank
#

well, do you have a different trigger?

#

that'd still be under MemberUpdates iirc

#

role updates are sent

lyric mountain
#

Yep

#

Just need to check if the role that triggered the event is the chosen one

#

Then open user private channel and send a newly created invite

opal plank
#

but either way, once you get that trigger to happen, you'll need to do the following

let invite = client.guilds.cache.get('YOUR PREMIUM GUILD').createInvite({OPTIONS_HERE});
USER_RECIEVED_FROM_EVENT.send(invite + 'bla bla message, here, click this bla bla')
weary widget
#

does anyone know how i can make the "created_at" look good? right now it just sends the exact time and is it possible to make the time not utc but the servers region time?

lyric mountain
#

Use timestamp for that

#

It's the only way of making the same message adapt to user's local time

earnest phoenix
#

you can also instead format is as age

#

created x years y months z days ago
created x minutes y seconds ago etc

rare sierra
#

So what is cronjob?

lyric mountain
#

It's something that'll run on scheduled times

mellow kelp
#

its like a way to schedule a function

lyric mountain
#

Like, "run this every X seconds"

mellow kelp
#

crontab is hella confusing tho

rare sierra
#

Is it in your API?

lyric mountain
#

No

rare sierra
#

Could I get a gh link?

lyric mountain
#

But since you're using java, there's an official lib for that

mellow kelp
#

yea

#

crontab

rare sierra
#

btw how do you know I am using Java?

#

cause of Maven?

lyric mountain
#

You said maven

rare sierra
#

oh yh

lyric mountain
#

Just search "cron maven"

#

It'll get u a mavencentral page

#

Just add to ur dependencies

#

Then read the docs on how to setup

#

And use a cron generator to prevent headaches

rare sierra
#

ok cool, and how can I like read my server count?

lyric mountain
#

Once u set a cron job (for exemple: once per hour), just put the server count uploader inside it

#

What's good about cron is that you'll not rely on long no-restart periods to have the code execute

#

Cron is based on current time, not some internal timer

rare sierra
#

ok cool

#

thanks for the help

outer niche
#

Inside that link I have posted I have my HTML code I'm simply just trying to get text in the middle of the image

thin apex
#

@slow violet

#

What is your current. Code

#

I can help you

slow violet
#

client.on("ready", () =>{ console.log(Logged in as ${client.user.tag}!`);
client.user.setPresence({
status: "idle", // You can show online, idle... Do not disturb is dnd
game: {
name: "Into The Light", // The message shown
type: "LISTENING" // PLAYING, WATCHING, LISTENING, STREAMING,
}
});
});

client.on("ready", () => {
console.log("I am ready to receive and Send Mails :D")

client.user.setActivity("Into The Light")
})
`

thin apex
#

Paste it hee in a code block

#

What is the result?

slow violet
#

it just say playing a game

thin apex
#

Screenshot?

slow violet
#

ok brb

thin apex
#
client.on("ready", () =>{
    console.log(`Logged in as ${client.user.tag}!`);
    client.user.setPresence({
        status: "idle",  // You can show online, idle... Do not disturb is dnd
        game: {
            name: "Into The Light",  // The message shown
            type: "LISTENING" // PLAYING, WATCHING, LISTENING, STREAMING,
        }
    });
 });

client.on("ready", () => {
console.log("I am ready to receive and Send Mails :D")


client.user.setActivity("Into The Light")
})
slow violet
thin apex
#

So it looks like you set the presence twice

#

At client.user.setPresence

#

Near the bottom

#

And also at the top

#

So it might override

slow violet
#

yeah but thats cuz like when i only put it once

#

it didnt show teh status

lament rock
#

You should only add 1 event listener for a single event unless absolutely necessary

thin apex
#

Yeah

#

It does it twice

slow violet
#

ok so imma take one off

thin apex
#

If the first one doesn’t work

#

Yeah

#

Debug

slow violet
#

ok

thin apex
#

Take off one at a time

lament rock
#

Does one of the overloads for setActivity accept just a string?

thin apex
#

Yeah maybe it defaults to playing

#

And you have to specify more data

lament rock
#

Makes sense. Didn't know that

slow violet
#

it still says playing a game