#development

1 messages ยท Page 1762 of 1

last geyser
#

forever ago

severe cedar
#

we only recently made this bot

slender thistle
#

I can guess that she found an old answer somewhere on the internet back from the async days

severe cedar
#

wait

#

was it me or her that made this code

last geyser
severe cedar
#

i think it was me

#

woops

last geyser
#

i mean does it matter?

slender thistle
#

^

#

It doesn't matter by now. Learn from your mistake and move on ๐Ÿ˜›

severe cedar
#

encouraging words

slender thistle
last geyser
#

๐Ÿ˜‚

slender thistle
last geyser
#

you think im joking

#

anyway, ot

umbral zealot
#

Ah yes code that's almost as old as my daughter, that'll work for sure

slender thistle
#

lmfaooooo

severe cedar
#

ok then

umbral zealot
#

Who's 10 year old.

slender thistle
#

I mean, if it's Python 2.7... maybe?

severe cedar
#

I would say send her my regards but thinking about it that seems weirdchamp

last geyser
umbral zealot
#

My point being if the code you're about to copy is about to hit puberty maybe you should reconsider copying it.

last geyser
#

well that's one way to say it ๐Ÿ‘€

umbral zealot
#

I could have phrased that much more awkwardly but I don't want to break your brains kekface

solemn latch
#

๐Ÿ‘€

slender thistle
last geyser
#

can I find it on SO?

#

python answers tend to be trivial tbh, especially if it includes a traceback

slender thistle
#

Surprisingly though, it's been quite helpful with Sphinx, so I'd still give it credit ๐Ÿ˜›

severe cedar
#

changed it to wait_for. and now we get this:

    reactionFire = await self.bot.wait_for.reaction('๐Ÿ”ฅ')
AttributeError: 'function' object has no attribute 'reaction'```
slender thistle
#

rtfd

#

here

last geyser
stiff lynx
#

lol

slender thistle
#

wait_for is a method that takes multiple parameters

severe cedar
last geyser
#

no it's not

slender thistle
#

you did wait_for.reaction

last geyser
#

please, learn the language before the library

umbral zealot
#

"I'm helping my friend with her restaurant"
"Do you know how to cook?"
"I know how to boil an egg."
notlikeduck

slender thistle
#

Am I the only one here who doesn't understand the point of requesting a review from yourself?

slender thistle
#

๐Ÿ˜‚

severe cedar
#

hold on hold on

last geyser
#

oh wait you manage the python sdk don't you

#

I thought I recognised your name

slender thistle
#

It's not my PR, so I guess it makes sense

#

Yup

severe cedar
#

reaction, user = await self.bot.wait_for("reaction_add", timeout=10.0, check=check)

#

see?

last geyser
#

Ok that's not the code you sent before

severe cedar
#

wait~

#

OHHHHHHHHHHHHHHHHHHHH

#

i added it there

#

but not in that other one

last geyser
#

That should work, assuming you defined check as a function

severe cedar
#

yes I did

severe cedar
#

since check isn't defined as a function there

last geyser
#

dk how you're doing what?

#

but... didn't you just say you defined it?

severe cedar
#

I added it in the last one

#

not the first one

#

thats line 22

last geyser
#

bear in mind i can't see line numbers here

severe cedar
#

ok lemme give you an idea of the code

last geyser
#

ok so just

#

move the function up?

#

like... define it at the start of the command

severe cedar
#

like that?

last geyser
#

yeah

#

also that'll only work for one emoji

earnest phoenix
#

Why is bot.wait_for.reaction still there lulw

last geyser
#

also line 34, still bad

#

39 my bad

severe cedar
#

ok i get how to fixthat

#

but

#

it only works for 1 emoji right?

#

i need it for 3

last geyser
#

so

#

python has iterables

#

namely lists, tuples and sets

#

and it has the in operator

severe cedar
#

ok

slender thistle
#

Poor generators not getting enough credit

last geyser
slender thistle
#

LMAO

last geyser
#

only thing gens are good for is memory usage smh

#

No, I'm not able to suggest 9 subreddits to add to your bot

#

im just not capable

slender thistle
#

They still deserve credit smh

severe cedar
last geyser
#

You're developing a bot, are you not?

#

with a moderately advanced library, are you not?

#

so you should be able to piece this one together

#

if not, you really need to learn lang before lib

last geyser
slender thistle
#

Memory usage XGWkekwlaugh

serene cliff
#

python: is animated emote part of payload.emoji?

last geyser
#

anything else?

severe cedar
serene cliff
#

ty

severe cedar
#

i'm not good at picking up on stuff like that

last geyser
# slender thistle Memory usage <a:XGWkekwlaugh:804751854222704640>
eek@eek ~/W/toppy.docs> sudo service [bot] status
* [bot].service - [bot] Bot Daemon
   Loaded: loaded (/etc/systemd/system/[bot].service; enabled; vendor preset:
   Active: active (running) since Mon 2021-05-24 19:42:22 UTC; 21h ago
 Main PID: 119 (python3)
    Tasks: 6 (limit: 1041)
   Memory: 1.1G

hahaha who needs memory

slender thistle
#

LMFAO

last geyser
#

I can easily sustain 8gb ram after a week if I don't restart

#

this bot has just under 1000 servers

#

im not an expert but like

#

there may be a mem leak somewhere

slender thistle
#

I wonder where

last geyser
#

somewhere within (at least) 8k lines

slender thistle
ancient gulch
#

Hello, i want to know how i can remove a specific permission on every role on my server

#

The documentation isn't clear on this

#

I know it's the #setPermissions method but how i can deny something

umbral zealot
#

You cannot deny a permission on roles

#

you can deny them only on channel overrides

#

Though you can turn them to "off" on roles

green kestrel
#

are we all ready for BUTTONS DAY tomorrow?! ๐Ÿ˜„

#

anyone got any plans to use interaction components in their own bots?

slender thistle
#

Oh, huh

#

I was going to use that for logs settings

green kestrel
#

as i see it, its going to completely remove the need for silly things like role reactions and reaction based pagers

slender thistle
#

Private bot so not that big of a deal

#

Exactly. Prettier interface for the user and that kind of crap

green kestrel
#

discord.js doesnt support it yet though does it, its a third party addon

#

i mean they dont even have slash commands except in their beta branch?

#

i know d.py has good support for it coming up

#

so python users get to use it immediately tomorrow

slender thistle
#

I use speedcord anyway. Wanna torture myself with direct API requests and manual caching

green kestrel
#

lol

quartz kindle
#

buttons come out tomorrow?

#

oh jeez

wary swan
#

button day monkaS

placid iron
#

Interesting

#

Unfortunately I don't have a use case because even though they are good, I like the small ness of reactions

#

Buttons are a bit large and chunky

wary swan
#

buttons are good for pagination but i think they are too big

wary swan
#

my handler and commands are already crying with registering slash command interactions as messages for compability

snow urchin
#

anyway for a bot to play audio in a stage channel with discord.js?

quartz kindle
#

only in discord.js master

green kestrel
#

universal command handler that makes prefixed commands and slash commands work the same from the same handler ๐Ÿ˜‰

static tartan
#

dude, im so happy, when did discord add this?

#

its sooo gud

wary swan
green kestrel
#

yeah

#

you could learn ๐Ÿ˜‰

#

but the same idea could be carried over to js

#

basically you have to unify the 'reply' function, and internally it routes it to the right place

#

based on the values in the command_source src parameter

#

thats why there is no guild id

wary swan
#

wow maybe i need to revise my way of handling slash commands

sudden geyser
slender thistle
#

Say, small (reaction-sized), medium, and large

placid iron
#

sounds good

wary swan
#

would be cool

slender thistle
#

Heh

willow mirage
#

what I have to do when React is can't import my .css file?

lyric mountain
#

native or js?

willow mirage
#

React.js

#

with Chakra but maybe not importain

lyric mountain
willow mirage
#

I already read it

lyric mountain
#

then check your path

#

show file structure

willow mirage
#

changed my webpack.config.js for a lots of time

#

did too

lyric mountain
#

is DashboardPage inside index.jsx?

willow mirage
#

there are 3 index.jsx

#

which one

#

lmao

lyric mountain
#

tell me which

lyric mountain
willow mirage
#

these 2 file

willow mirage
lyric mountain
#

idk then, I don't see any issue

willow mirage
#

yeah

lyric mountain
#

silly question, but did you save the files?

willow mirage
#

I have no clue

#

yes

#

for sure

willow mirage
#

cause I wrote files manually

#

for the webpack.config.js

keen cobalt
#

How do I get roles

umbral zealot
#

in what context are you asking

#

with your bot? on a server? with someone else's bot? on this server???

woeful pike
#

you should have 0 css files when you're using css-in-js

willow mirage
woeful pike
#

????

#

why on earth are you using chakra ui then

pale vessel
#

...then why use it?

woeful pike
#

chakra is absolutely amazing I have no idea why you'd use anything else but I guess it's down to taste at some point

#

we're adding it to top.gg this week hopefully ๐Ÿ™‚

willow mirage
#

cause It takes at lots of lines and I hate it

woeful pike
#

you're supposed to wrap the components you style around other components

#

it takes many lines in css too lol

#

you should still be able to import css with default CRA tho idk why you're having issues

#

oh you ejected?

willow mirage
woeful pike
#

why are you even touching webpack

willow mirage
#

ehh

#

I want to render .svg files

woeful pike
#

I can't think of any reason why you'd want to eject a modern CRA template

willow mirage
#

and <path>

marble juniper
#

how can I get emojis from a message using discord.js? do I have to use a regex or does any function exist for this

#

lol

woeful pike
#

you can still do that just put it inside a jsx file

willow mirage
#

nope, I think <path> won't work in normal .jsx?

lyric mountain
woeful pike
#

looks like a regular html element to me

lyric mountain
#

else yes, you'll need regex

willow mirage
#

smh

#

nvm

marble juniper
#

dammit

lyric mountain
#

<a?:\w+:\d+>

willow mirage
#

imma remove the fucking css-loader and move others components to external files and import them

woeful pike
#

importing svgs with paths working fine for us

marble juniper
willow mirage
#

I think i just got overthinked

#

:<

#

spent time for nothing

woeful pike
#

don't mess with webpack

#

it's not worth it

lyric mountain
willow mirage
#

nvm, fuck webpack

marble juniper
#

kk

#

I don't understand regex

#

time to use that magic website

willow mirage
#

lmao

lyric mountain
#

(?<=...) means "find stuff that suceeds this part, but keep this out of result"

#

(?=...) means "find stuff that preceeds this part, but keep this out of result"

#

(?<=...)\d+(?=...) means "find digits that are between X and Y, but keep X and Y out of the result"

woeful pike
#

or... you can just do
...(\d+)...

#

lookbehinds are pretty pointless

#

just use capture groups

willow mirage
sudden geyser
#

learning regex is like learning to ride a bike

#

you'll fall and scrape your knee but get used to it

lyric mountain
#

ah yes, forgot js has that stuff

woeful pike
#

every regex engine has capture groups

#

but not all have lookbehind

lyric mountain
#

this is why I didn't mention that

woeful pike
#

yeah... you're supposed to access the capture group lol

lyric mountain
#

ik, that's why I forgot

woeful pike
#

it matches the correct thing

pale vessel
#

you can even name your capture groups which is p epic

woeful pike
#

js supports that too now iirc

#

which is pretty pog

willow mirage
woeful pike
#

used to be a python exclusive feature

pale vessel
#

ecmascript 2018 iirc

woeful pike
#

chakra will also typecheck your css

#

and autocomplete.. and give you ez mobile-first media queries

#

easily the best css library I've ever used

willow mirage
#

now i see chakra is a great choice

#

but still hate the inline css

#

I hope they make a external css

woeful pike
#

why

#

I mean it's a common problem when people get into css-in-js first time

willow mirage
toxic herald
#

Hi guys, how can I know, publish my bot in discord bots, but I don't know how long it will take for them to review it, someone can let me know how it is.

woeful pike
#

but css is a part of your components like there's not much reason for it to be separated into a different file

willow mirage
#

like this shit

woeful pike
#

there is a very good video on this topic if you wanna watch it https://youtu.be/0ZNIQOO2sfA

๐Ÿ’– Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction

Separation of concerns is pretty misunderstood concept, in programming in general, no just JavaScript and web development. I talk about separation of concerns in the context of React and combining HTML, CSS and JavaScript in one place, but also in the more general p...

โ–ถ Play video
earnest phoenix
#

Xetera, dblstatistics is your website right ?

woeful pike
#

nope

earnest phoenix
willow mirage
#

from the mods

#

i guess

woeful pike
#

luke and xignotic

earnest phoenix
#

because it's dead

woeful pike
#

yeah idk ping luke maybe

earnest phoenix
#

nah it's okay ty

woeful pike
lyric mountain
#

oh cool, didn't know about named groups

woeful pike
#

idk why you have a fixed heading though I feel like you're definitely doing something wrong

lyric mountain
#

that actually makes string extraction quite easy

woeful pike
#

giving text elements a set width is almost always a bad idea

#

unless you want to truncate with ellipsis

willow mirage
woeful pike
#
const styles = {
  position: "fixed",
  zIndex: 1031
}
<Spinner {...styles} />
willow mirage
#

ohhh

#

kk

fossil bough
#

I want to have a feature based on if the server owner votes for the bot it gives them a feature for that month of voting. So I have webhooks setup so I get a log when someone votes but I want to check if the user who voted is in any of the servers with the bot and if they are the owner.

woeful pike
#

yeah the whole top="calc(...)" thing looks wrong to me I think you need to read up on flexbox and what not

willow mirage
woeful pike
#

yikes

#

make the parent a flexbox and align/justify center

#

don't use fixed positioning

#

you're probably looking at css questions from 10 years ago on stackoverflow

willow mirage
#

yes . . .

woeful pike
#

yeah stackoverflow is a terrible resource for css

willow mirage
#

hmmmm

#

interessting

woeful pike
#

go learn flex and grid and then continue your website

#

you will be absolutely miserable trying to center shit with calculating offsets from random percentages

marble juniper
#

centering a div

#

one of the hard things in css

#

lol

vivid fulcrum
#

โœจ flexbox โœจ

marble juniper
#

yes

vivid fulcrum
#

it's a shame so many people don't know about flexbox in 2021

marble juniper
#

most frontend devs flex with how much flex boxes they use

vivid fulcrum
#

mostly because they copypaste old so answers

marble juniper
#

stackoverflow

lyric mountain
#

flextape, flexglue, flexseal, flexbox

willow mirage
#

lmao, I never felt so happy then today

#

just centered my fucking DIV

#

OMGGGGG

#

btw Vertically too

#

@woeful pike sr for ping but you how I can set this height to max?
tried height="100%"

willow mirage
#

I think you should make a server

#

that allows topgg make POST or GET request

#

so you can see who vote for your bot

fossil bough
#

I can already see who voted I have that setup that as for now it just console.logs when someone votes

willow mirage
#

and then simple get there Id and check does the server that the bot in has owner that the same id

willow mirage
#

so you can get the guilds list

fossil bough
#

Ah so I would just have to for each guild check if the id matches the owner id

willow mirage
#

yes

#

or use .find()

#

or .filter()

gaunt turtle
#

Ne dion dayฤฑ

fossil bough
willow mirage
#

or something

gaunt turtle
willow mirage
#

i guess

gaunt turtle
#

Fak

#

Shsusue

sick blaze
#

Getting This Error While Running Bot's Help Command,Can Anyone Help?

willow mirage
#

or previous lines too

sick blaze
#

ok

gaunt turtle
#

Ne

willow mirage
gaunt turtle
#

Napim

willow mirage
#

so you debug things easier

marble juniper
#

errors are not just randomized gibberish

#

errors have a purpose

sick blaze
marble juniper
#

lol

gaunt turtle
#

Ne dionuz aw

willow mirage
#

because Channel doesn't have message property and it doesn't exist

sick blaze
#

I Am Noob Coder

willow mirage
#

no problem bro

willow mirage
#

Im too

#

everyone was a noob

marble juniper
#

everyone starts somewhere

willow mirage
#

yes

earnest phoenix
#

how do i get the bot to allow me to mute people

willow mirage
#

or invite a bot?

earnest phoenix
#

nvm wrong server i guess

willow mirage
sick blaze
#

How Do I Make A Dashboard For My Bot?๐Ÿคฃ

willow mirage
#

that allows website to talk with the bot

sick blaze
#

ok

#

Then

willow mirage
# sick blaze ok

#webdev #javascript #discordbot

In this series, we are going to build a Discord Bot Dashboard. We will be using React, Express, MongoDB, and Node.js, aka MERN stack.

Part 2: https://www.youtube.com/watch?v=DomtnrQ4f3Q&feature=youtu.be

Want to support me and the channel? Donations are not required but greatly appreciated!

Become a Patreon: h...

โ–ถ Play video
#

this playlist is kinda usefull

#

you should watch it

sick blaze
#

Thanks

willow mirage
#

but might be out-dated

sick blaze
#

I'll Watch It

willow mirage
#

I dunno

sick blaze
#

OK

eternal osprey
#

how do i deny viewing channels and messages perms on a guild.roles.create

opal plank
#

channel overrides are channel bound, not guild/role bound

eternal osprey
#

hmm alright

opal plank
#

make a role and then have that id excluded in the channels of that server or, downright remove the VIEW_MESSAGES permission

eternal osprey
#

alrighty, will do that then. Thanks

opal plank
rose warren
#

Is it just me or is Patreon's API a shitshow?

vivid fulcrum
#

it's a shitshow

#

i haven't used it for about 2 years now

#

but last time i did

#

it was horrible

#

don't nuke servers, it's against the tos

#

no it's not, you're just being an asshole

#

if you don't like whoever's in the server, leave it

#

as simple as that

lyric mountain
#

patreon cant

#

so shit >>> patreon api

rose warren
vivid fulcrum
#

i tried integrating patreon with my bot and patreon was using both v1 and v2 of their apis

#

v2 provided data that wasn't in v1

#

but v1 provided data that wasn't in v2

rose warren
#

I'm tempted to just move away from Patreon altogether and charge through PayPal

vivid fulcrum
#

horrid

lyric mountain
#

then v4 provided no data at all

woeful pike
#

I've heard good things about chargebee

rose warren
#

Yeah I'm looking at the data from v1 and v2 and I just can't get my head around how I'd even start to implement something

#

Never heard of chargebee

vivid fulcrum
#

do you think it'd be easier to spin up a puppeteer instance and then grab elements via xpath

#

instead of using their api

#

lol

rose warren
#

Probably lol

#

Sending a rocket to the moon to bring back paper copies of the Patreon data is easier at this point tbh

lyric mountain
#

the issue with patreon is not the documentation or the lack thereof

#

but the payload is an absolute mess

#

like, I don't even know WHAT to look for

#

all values look the same, tbf the whole structure looks like a recursive json builder

#

"what you need is pledge" ok, but WHICH one

#

there are like 99 keys called pledge, all of them contain the same data

rose warren
#

Yeah it's a nightmare

#

I think I'll just make my own subscription system using Discord and PayPal's APIs

#

I can't be bothered with Patreon's API and I'm tired of the fees and bad support

lyric mountain
#

the only thing that worries me is the service's insistence in getting a 200 code

#

like, if someone ever donates while the bot is off

#

the service must retry after some time

rose warren
#

Which? PayPal?

lyric mountain
#

idk, never checked it

#

but some services don't retry at all

rose warren
#

Hm yeah but it would be totally separate to my bot. Users would log in on my website (different host to the bot) using their Discord account then subscribe using PayPal and the response would add them to the db of subscribers

#

Bot can be offline wouldn't make a difference

woeful pike
rose warren
#

Braintree looks simple enough. I see Dyno use it for their billing.

#

Chargebee also looks like a good alternative if you're using PayPal

woeful pike
#

if I was monetizing my own product today, I could not consider a solution that doesn't support paypal

#

every single person I know pays for online things through paypal and not a credit card

rose warren
#

Yeah same here

#

Chargebee looks promising. Thanks for the suggestion @woeful pike I'm looking into it ๐Ÿ˜‰

woeful pike
#

nice nice

prime mist
#

The thought of writing type definitions manually is painful.

earnest phoenix
#

discord.js v12

command doesnt work

odd stratus
earnest phoenix
#

delete a mentioned role

#

with my bot

odd stratus
#

Well youโ€™re doing it incorrectly

earnest phoenix
#

see

odd stratus
#

let role = message.mentions.roles.first()
role.delete()

Could try something like that ๐Ÿค”

earnest phoenix
#

ill try

#

nop

#

it doesnt works

#

can i send my code? @odd stratus sorry x ping

odd stratus
#

Ok

#

I already said message.guild.roles.delete is not a thing which is what youโ€™re doing rn

#

Do rolero.delete()

earnest phoenix
#

k

earnest phoenix
odd stratus
#

Doesnโ€™t really help with you saying โ€œit doesnโ€™t workโ€. Thereโ€™s some sort of stack trace with an error, no?

earnest phoenix
#

the console does not tell me anything, it is as if the bot ignored the command

#

the weird thing is that when I use the create role property, it works

odd stratus
#

How would the console not be logging anything

#

Unless the message event is not being emitted for whatever reason I donโ€™t see how

earnest phoenix
earnest phoenix
odd stratus
#

Nice

pale vessel
#

new color

earnest phoenix
#

ah?

pale vessel
#

ah.

crystal wigeon
#

Something going with discord??

#

Shards keep dying and doesn't restart

#

But it shows the shards are alive

#

But the bot ded

craggy pine
crystal wigeon
#

ik how to get the shard id and guilds

#

idk the different pings and vcs and users

#

mmmmmmmmm

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

for the ping and vc count?

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

i see, wil check

#

what about the color schema

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

crystal wigeon
#

got it

#

i usually monitor on the server itself and saw that all shards were up but the bot was ded in some servers, and i see no error logs

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

lol im not asking for free code

#

just a "logic"

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

crystal wigeon
#

yeah, thanks!

drifting shell
#
update discord_user_premium inner join discord_users on discord_user_premium.id = discord_users.id set discord_user_premium.discord_api_id = discord_users.user_id;
``` I'm trying to update my table to have discord_api_id be the value of the appropriate row in discord_users, however when I perform the update query I get duplicate entry for key discord_user_premium_discord_api_id_unique even tho the row itself is unique and not used again within the discord_user_premium table.
#

I'm really confused

#

wait im a dumbass

#

im trying to update the unique row with an already used id

earnest phoenix
#

lol

drifting shell
#

i was updating the fucking primary key

#

im glad that query failed honestly

stiff lynx
#

How can I do commands in bot's private message?

lusty quest
#

depending on the language / lib you use you can just send a message to the message author or fetch the user and send a message to the user object

stiff lynx
#

I'm using discord.js

#

I want to send directly a message to the bot

#

and get the command done inside a server

rapid wharf
earnest phoenix
#

What if I want stuff to my top.gg page?

#

Like icons

#

Change the colour of some stuff

#

Make it better

rapid wharf
uncut night
#

Guys how to make bot

#

jk

green kestrel
#

pay me

#

also jk

rapid wharf
#

N O I C E

uncut night
#

H A H A

rapid wharf
#

H A H A x2

rapid wharf
earnest phoenix
rapid wharf
uncut night
earnest phoenix
#

Ahh okies

rapid wharf
rapid wharf
uncut night
#

me too

#

hehe

rapid wharf
#

noice

uncut night
#

i live in saudi arabia

rapid wharf
#

ohh

uncut night
#

I am frm gujarat

#

u

#

?

rapid wharf
#

MP

torpid otter
#
module.exports = {
 name: 'warn',
 description: 'warn a member',
 
 
 async run (client, message, args) {
 if(!message.member.hasPermission('MANAGE_MESSAGES')){
  const embed = new MessageEmbed()
  .setColor('RED')
  .setTitle('Insufficient Permission')
  .setDescription('You much have the permission of MANAGE_MESSAGES')
  return message.channel.send(embed);
 }
 let member =
 message.mentions.members.first()
 if(!member) return message.reply("Ping a valid user!");

 const reason = args.slice(1).join(" ")

  if(!reason) {
      return message.channel.send("Please provide reason to warn - warn @mention <reason>")
    }
    const channel = message.guild.channels.cache.find(c => c.name === 'logs');
    if(!channel) return message.channel.send('please create channel named `logs`!')
    const embed = new MessageEmbed()
   .setColor("#0e2b82")
   .addField("Warned User", `${message.mentions.members.first()}`)
   .addField("Warned By", `<@${message.author.id}>`)
   .addField("Warned In", message.channel)
   .setFooter("warn")
   .setTimestamp()
   .addField("Reason", `${reason}`);
    return message.channel.send(embed)

  

}
}```
#

how can i improve this

green kestrel
#

let the user configure the channel name, store it in a database or config file per guild by id, storing the channel id

#

a lot of people wont use a bot that forces people to have specific channel names (for example, what about other languages)

uncut night
# torpid otter ```js module.exports = { name: 'warn', description: 'warn a member', asyn...
module.exports = {
 name: 'warn',
 description: 'warn a member',
 
 
 async run (client, message, args) {
 if(!message.member.hasPermission('MANAGE_MESSAGES')){
  const embed = new MessageEmbed()
  .setColor('RED')
  .setTitle('Insufficient Permission')
  .setDescription('You much have the permission of MANAGE_MESSAGES')
  return message.channel.send(embed);
 }
 let member = message.mentions.members.first()
 if(!member) return message.reply("Ping a valid user!");

 let reason = args.slice(1).join(" ")

  if(reason === null) reason = "N/A" 
    const channel = message.guild.channels.cache.find(c => c.name === 'logs');
    if(!channel) return message.channel.send('please create channel named `logs`!')
let member = message.mentions.members.first()
    const embed = new MessageEmbed()
   .setColor("#0e2b82")
   .addField("Warned User", `${member}`)
   .addField("Warned By", `<@${message.author.id}>`)
   .addField("Warned In", message.channel)
   .setFooter("warn")
   .setTimestamp()
   .addField("Reason", `${reason}`);
    return message.channel.send(embed)
member.send(new Discord.MessageEmbed()
.setTitle('You have been warned')
   .addField("Warned User", `${member}`)
   .addField("Warned By", `<@${message.author.id}>`)
   .addField("Warned In", message.channel)
.setColor("RED"))


  

}

}

torpid otter
uncut night
#

Custom Logging channel?

torpid otter
#

like

#

yes

uncut night
#

use enmap db or quick.db

#

if u want to make easily

#

if not then use mongodb or sql or something else

torpid otter
#

i am use mongodb on my test bot

uncut night
#

i am currently learning mongo

torpid otter
#

cool

lofty cedar
#

any1 knows how i can make a pro version for my bot with patreon? i mean how with patreon i can automatically add a guild id as pro

lusty quest
lusty quest
lofty cedar
#

ok, ty, does patreon let me ask a question at the buying? so i can have the guild id

lusty quest
#

nope

lofty cedar
#

oh ok

lusty quest
#

patreon is not a billing software

lofty cedar
#

do you have any alternative?

lusty quest
#

build your own shop and use something like chargebee

lofty cedar
#

ok, ty

lusty quest
#

then you can ask for discord ids and such on checkout

lofty cedar
#

ok, tysm

dreamy dirge
#

! rank

#

!rank

keen wedge
#

this is not the channel for that my g

tepid agate
#

can someone help me

lusty quest
#

define voice

earnest phoenix
#

Probably because you're passing the parameters in an incorrect order

tepid agate
earnest phoenix
#

Show us how you're passing the parameters in your main file to execute the commands

#

command.execute(...)

torpid otter
#

how do make warned like this const Warned = args.slice(2).join(" ")

   if(!Warned) {
     return message.channel.send("you have be warned");
   }
earnest phoenix
#

You just revealed your token

#

Regenerate it

tepid agate
#

Already

earnest phoenix
tepid agate
#

"discord.js": "^12.5.3",

earnest phoenix
#

Try logging message.constructor.name in your play command file

#

And see what it logs

#

is there a way to get access to the top.gg code?

#

so i can edit my bots page?

tepid agate
earnest phoenix
tepid agate
lethal sun
#

How can you merge multiple ReadableStream's from VoiceReceiver.createStream()?

earnest phoenix
earnest phoenix
#

do i need to click the edit button again?

#

where?

#

yes, to edit your bot page; click on the "Edit" button and modify the long description with html/css to give it a nice look

earnest phoenix
#

You can use <style></style> tags for CSS

#

what if i want to change the profile picture?

#

With CSS?

#

yea

#

like move it around

#

You can do that, just apply the CSS animations on it with keyframes

#

but where though?

tepid agate
#

@earnest phoenix This happent

earnest phoenix
#

ahh okies

lethal sun
#

How can you merge multiple ReadableStream's from VoiceReceiver.createStream() in Discord.js?

earnest phoenix
#

wheres the inspect element?

#

Umm, you never did inspect element before?

#

no

#

What browser do you use?

#

google

#

Browser, not search engine

#

Like Chrome, Firefox, Brave

#

chrome

earnest phoenix
#

am i allowed to change the way this image looks here?

earnest phoenix
# earnest phoenix Use the `PassThrough` class from the built-in `stream` module and pipe all the s...
// Deconstruct `PassThrough` class from built-in module `stream`.
const { PassThrough } = require('stream');

// Declare function for later use.
function mergeStreams(...streams) {
  // Construct a new `PassThrough` instance.
  let pt = new PassThrough(),
  // Get the amount of streams passed through.
  l = streams.length;
  
  // Iterate through the streams.
  for (const stream of streams) {
    // Pipe the current stream to the PassThrough instance without ending.
    pt = stream.pipe(pt, { end: false });
  
    // Once the stream is finished and there are no more streams, emit the end event of the PassThrough instance.
    stream.once('end', () => {
      if (--l === 0) pass.emit('end');
    });
  }
  
  // Return PassThrough
  return pt;
}```
earnest phoenix
earnest phoenix
#

like make it a circle?

#

Sure

lethal sun
quartz kindle
#

you can do whatever you want with the page

#

as long as it doesnt hide or remove top.gg content

earnest phoenix
#

okies

#

So i'm using css grid to align items like so:

/-------\         /--------\         /-----------\
| first | [space] | second | [space] | [nothing] |
\-------/         \--------/         \-----------/

The second item is centered horizontally, but not vertically. How do I alignit vertically for that grid cell only?
PS align-items: "center" on the container doesn't work

woeful pike
#

the grid element itself needs to be wrapped in a div that wraps the text second

earnest phoenix
#

Discord mobile Bismillah

woeful pike
#

when in doubt, add more wrapping elements

quartz kindle
#

looks like a spaceship

slender thistle
#

Aliens have arrived

earnest phoenix
slender thistle
#

Is there any case when a grid isn't appropriate as opposed to a flexbox and vice versa?

earnest phoenix
earnest phoenix
#

yeah i tried flexbox before

quartz kindle
#

i like flexbox much better than grids

earnest phoenix
#

but i needed to align the first item to the left and the second in the center

woeful pike
#

flex also doesn't universally support the gap property yet

#

safari just released support for it like last week

slender thistle
#

Aaah, I see. Thanks

woeful pike
#

also grid elements are easier to resize based on screen width if you look at auto-fill and auto-fit

slender thistle
#

Ooooo

#

Thwn it's worth taking a look

earnest phoenix
#

how do you vertically align in a div....

woeful pike
#

flexbox the parent

#

that's why you wrap the thing you want to align in another element

feral aspen
#

Heyo.

#

Not sure why the red lines...

#

config()

#

OH

#

๐Ÿคฆโ€โ™‚๏ธ

quartz kindle
#

token: prcess...

earnest phoenix
#

That's not how auto property construction works

feral aspen
#

Thank you! ๐Ÿ‘

slender thistle
#
>pypy3
ModuleNotFoundError: No module named 'encodings'
debug: OperationError:
debug:  operror-type: ModuleNotFoundError
debug:  operror-value: No module named 'encodings'

I've tried installing pypy3 but I get this error no matter what I try to do with the binary. What can cause the issue? I don't use any virtual environments.

lofty cedar
#

@client.event async def on_dsl_vote(data): votes = json.load(open(f"votes.json")) if not data[user] in votes: votes[user] = {"votes":"1"} json.dump(votes, open (f"votes.json", "w")) if data[user] in votes: votes[user]["votes"] = str(int(votes[user]["votes"] + 1)) json.dump(votes, open (f"votes.json", "w"))
can this be right?

slender thistle
#

if not x in votes -> if x not in votes

#

user must be a string

#

Starting from topggpy v1.1 you can also use data.user

#

Why do you stringify the amount of votes also

#

int(votes[user]["votes"] + 1) this is a pointless typecast

lofty cedar
#

for data is that right to use data[user] ?

earnest phoenix
#

user must be a string

lofty cedar
#

i mean to get the id of who voted

slender thistle
#

It's half-correct

earnest phoenix
#

user = "user" troll

slender thistle
#

data[user] would imply that you are getting a key that references a variable user

#

If you want to access the key user itself, you need to wrap it in quotation marks/apostrophes

prime mist
feral aspen
#

data[user] mostly means you are trying to access a property which's name is stored as a value of the user variable.

lofty cedar
slender thistle
#

If your topggpy version is v1.1.0, yes

lofty cedar
#

ok

slender thistle
#

Let's see if copying the encodings package from the lib_python folder will do anything lol

prime mist
#

Oh right lol. Sounds like the environment is messed up.

#

๐ŸŽ‰ Finally got code generation working from the discord API docs.

Can track discord API changes way easier now :)

Not that many people here implement their own clients lol.

feral aspen
#

Did I do something wrong?

#

I'm getting a console log of Shard #0 instead of Shard #1.

require("dotenv").config();
const { ShardingManager } = require("discord.js");

const manager = new ShardingManager("./src/index.js", {
    token: process.env.TOKEN,
    totalShards: "auto"
});

manager.on("shardCreate", shard => {
    console.log(`Shard #${shard.id} is online.`);
});

manager.spawn();
module.exports = async bot => {
    if (bot.shard.ids[0] === 0) console.log(`Attitude is now online serving ${bot.guilds.cache.size} servers, ${bot.users.cache.size} members & ${bot.channels.cache.size} channels.`)
};
#

In the ready event, all bot.users.cache.size will be changed to the new sharding one, I believe.

prime mist
#

Shard IDs start from 0

feral aspen
#

.. and I get this error. ๐Ÿ˜ (node:5948) UnhandledPromiseRejectionWarning: TypeError: bot.shard.fetchClientValues(...).reduce is not a function

module.exports = async bot => {
    if (bot.shard.ids[0] === 0) console.log(`Attitude is now online serving ${bot.shard.fetchClientValues("guilds.cache.size").reduce((a, b) => b + a)} servers, ${bot.shard.fetchClientValues("users.cache.size").reduce((a, b) => b + a)} members & ${bot.shard.fetchClientValues("channels.cache.size").reduce((a, b) => b + a)} channels.`)
};
prime mist
#

Looks like you need to resolve the promise first.

cinder patio
#

delete that screenshot

#

it has your token in it

earnest phoenix
zinc wharf
#

I normally go to CMD and use the node command

#

node index.js, in the directory of your application/bot

feral aspen
#

I'm confused, according to the documentation, if I put that line, there should be no error that should be caused. *guide

zinc wharf
#

Like so

#

@earnest phoenix ^^

feral aspen
#

Ah.. Attitude is now online serving [object Promise] servers, [object Promise] members & [object Promise] channels.

cinder patio
#

fetchClientValues returns a promise

feral aspen
#

I got it! ๐Ÿ‘

earnest phoenix
#

how do i do it ?

#

i usually do from vscode

zinc wharf
#

cd to your directory

earnest phoenix
#

hm

#

k

feral aspen
zinc wharf
#

Windows key, type cmd, press enter. cd to your directory, once in your directory do node index.js

feral aspen
#

.. and even if I did so, it yet says that it is not a function. ๐Ÿ˜

prime mist
prime mist
feral aspen
#

Hm..

#

Let me see what it returns without the reduce

prime mist
#

You have to do it for all of those function calls.

feral aspen
#

Wot.. it didn't even return an array.

earnest phoenix
#

@zinc wharf

#

never happened before since last 8 months

zinc wharf
# earnest phoenix k ty

Try and do npm init, and follow through what it says, you might have a broke package.json now that I think about it

earnest phoenix
#

yes maybe since i updated the version

prime mist
feral aspen
#
const manager = new ShardingManager("./src/index.js", {
    token: process.env.TOKEN,
    totalShards: "auto"
});

I think since I putted this on "auto" meaning it just generated 1 shard therefore NOT returning an array, I think if I putted this on 2, it would work?

earnest phoenix
#

sad

#

@zinc wharf

zinc wharf
#

Is your main your js file name?

earnest phoenix
#

yes

#

i updated it 3 months ago

#

from index to main

zinc wharf
#

Awesome, now try and do node bot.js and see if that works

earnest phoenix
#

to bot

#

sad

zinc wharf
#

sad indeed lmao

#

Wait, do it in CMD

earnest phoenix
#

ok

#

sad moment

zinc wharf
#

One weird error

earnest phoenix
#

ok i can try uninstalling npm init

#

then reinstall

#

it will ask for a file directory

#

but still not work

zinc wharf
earnest phoenix
#

hmm

#

lmao again same error

#

something has changed it seems

#

it was working fine yesterday

zinc wharf
#

Yeah thoonk

earnest phoenix
#

how to check version ?

#

of discord.js

#

k

#

hm

#

something is sus

zinc wharf
#

npm discord.js -v

earnest phoenix
#

amog sus

earnest phoenix
zinc wharf
#

I'm running 6.14.12

earnest phoenix
#

hmm

#

latest is which one?

zinc wharf
#

According to the npm page, its on 12.5.3

earnest phoenix
#

ohh

#

so i have version v12

zinc wharf
#

You do yes

earnest phoenix
#

ye

#

hmm

#

reinstalled 2 times yet no

#

sa

#

sad

#

i never shared code with any one

#

not even github

#

or ig i have to make new file

#

folder

earnest phoenix
#

in your package.json

#

u have this

#
{
  "name": "saboyana",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Sopow",
  "license": "ISC",
  "dependencies": {
    "canvacord": "^5.2.0",
    "canvas": "^2.7.0",
    "discord-giveaways": "^4.5.1",
    "discord-xp": "^1.1.14",
    "discord.js": "^12.5.3",
    "dotenv": "^8.2.0",
    "got": "^11.8.2",
    "humanize-duration": "^3.25.2",
    "moment": "^2.29.1",
    "node-gyp": "^8.0.0",
    "nodemon": "^2.0.7",
    "opusscript": "0.0.8",
    "parse-duration": "^1.0.0",
    "quick.db": "^7.1.3",
    "yt-search": "^2.8.0",
    "ytdl-core": "^4.5.0"
  },
  "devDependencies": {
    "ms": "^2.1.3"
  }
}
#

verify if ur main is "index.js"

#

@earnest phoenix

zinc wharf
earnest phoenix
#

ok

zinc wharf
earnest phoenix
#

change bot.js to index.js i think

feral aspen
#

I'm having troubles with sharding.

#
(node:10592) UnhandledPromiseRejectionWarning: Error [SHARDING_IN_PROCESS]: Shards are still being spawned.
#

This error occures on my ready event.. therefore I did manager.spawn(10000); but yet still gives another error of ```js
(node:4568) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_TIMEOUT]: Shard 1's Client took too long to become ready.

#

Well...

#

This is my ready.js file.

#
module.exports = async bot => {
    if (bot.shard.ids[0] === 0) console.log(`Attitude is now online serving ${await bot.shard.fetchClientValues("guilds.cache.size")} servers, ${await bot.shard.fetchClientValues("users.cache.size")} members & ${await bot.shard.fetchClientValues("channels.cache.size")} channels.`)
};
cinder patio
#

You are using bot.shard.fetchClientValues when shard 0 becomes ready

#

The rest of the shards aren't ready yet

#

you should probably do this in another event

feral aspen
#

What do you mean do this in another event?

earnest phoenix
#

exporting a function named bot in a file named ready

feral aspen
#

๐Ÿ˜

cinder patio
#

The function's not named bot

#

Maybe do this in an event in which all shards are guaranteed to be ready

feral aspen
#

My node.js runs shard.js which runs index.js which runs ready.js

feral aspen
cinder patio
#

okay but you can't get information like guild size when only one of your shards is ready

feral aspen
#

I did this... manager.spawn(10000);

#

.. isn't there some way to await it to make all shards ready then execute the ready.js?

cinder patio
#

Wait... doesn't that mean that you're spawning 10k shards

cinder patio
#

oh... uh... I thought that was the ShardingManager spawn method

#

wait

feral aspen
#

Here...

#
require("dotenv").config();
const { ShardingManager } = require("discord.js");

const manager = new ShardingManager("./src/index.js", {
    token: process.env.TOKEN,
    totalShards: 2
});

manager.on("shardCreate", shard => {
    console.log(`Shard #${shard.id} is online.`);
});

manager.spawn(10000);
#

I usually do this...

#

The method you mentioned.

cinder patio
#

doesn't look like you're looking at the right thing

feral aspen
#

Oh sh-

#

I looked at the Shard not Sharding Manager

#

Let me make some changes real quick.

#

Well... I still get the error.

earnest phoenix
feral aspen
#
manager.spawn(manager.totalShards, 10000);
#

I changed the above.

cinder patio
#

If you know the amount of shards you want to spawn then you can execute the code at the last shard spawn

#

if bot.shard.ids[0] === totalShards

#

also

#

Is that code inside the shard's ready event?

#

you can directly put it inside the shard manager's shardCreate event

#

if shard.id === manager.totalShards - 1 { ... }

feral aspen
cinder patio
#

put it inside the shardCreate event instead and check for the last shard, not the first

feral aspen
#

Do I remove the ready.js file?

cinder patio
#

I mean if you don't need it...

feral aspen
#

Wait.. let me keep it as console.log("Hi") for now.

#

Bruh...

#

async

#

One moment...

#

bot is not defined, where should I pass bot now?

cinder patio
#

use manager instead of bot.shard

feral aspen
#
(node:12364) UnhandledPromiseRejectionWarning: Error [SHARDING_NO_CHILD_EXISTS]: Shard 1 has no active process or worker.
cinder patio
#

show code...

feral aspen
#
require("dotenv").config();
const { ShardingManager } = require("discord.js");

const manager = new ShardingManager("./src/index.js", {
    token: process.env.TOKEN,
    totalShards: 2
});

manager.on("shardCreate", async shard => {
    console.log(`Shard #${shard.id} is online.`);
    if (shard.id === manager.totalShards - 1) {
        console.log(`Attitude is now online serving ${await manager.fetchClientValues("guilds.cache.size")} servers, ${await manager.fetchClientValues("users.cache.size")} members & ${await manager.fetchClientValues("channels.cache.size")} channels.`)
    }
});

manager.spawn(manager.totalShards, 10000);
cinder patio
#

hmmm...

#

maybe try...

if (shard.id === manager.totalShards - 1) {
        console.log(`Attitude is now online serving ${await manager.fetchClientValues("guilds.cache.size")} servers, ${await manager.fetchClientValues("users.cache.size")} members & ${await manager.fetchClientValues("channels.cache.size")} channels.`)
    }
});```
feral aspen
#

Shard didn't operate.

#

My bot is in 4 servers and I'm trying this, does that affect?

#

Since I'm trying to test.

cinder patio
#

generally it shouldn't matter, unless discord.js does something

#

wait actually try

feral aspen
#

Yeah..

#

ยฏ_(ใƒ„)_/ยฏ

cinder patio
#
if (shard.id === manager.totalShards - 1) {
   shard.on("ready", async () => {
    console.log(`Attitude is now online serving ${await manager.fetchClientValues("guilds.cache.size")} servers, ${await manager.fetchClientValues("users.cache.size")} members & ${await manager.fetchClientValues("channels.cache.size")} channels.`)
});
}
#

I don't understand why that wouldn't work thonk

feral aspen
#

RIP shard.. didn't work as well.

earnest phoenix
#

can you use pseudo classes in css in js

#

im using inline styles on my react component so i can dynamically modify it

cinder patio
#

use styled-components

#

or some other similar lib

feral aspen
#

Well... still didn't work.

#

@cinder patio I realised something...

#

Shit nevermind.

#

Shard #0 is ready but so as Shard #1 logs that it is ready but 10 seconds after that, comes this error. (node:17544) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_TIMEOUT]: Shard 1's Client took too long to become ready.

earnest phoenix
#

Is there a way to execute mongo queries from a string? Im using js mongoose, i googled and found eval but its deprecated..

feral aspen
#

I realised that if I put this in the ready.js if (bot.shard.ids[0] === 0), it errors (node:17324) UnhandledPromiseRejectionWarning: Error [SHARDING_IN_PROCESS]: Shards are still being spawned. but if it was === 1 then it doesn't.

wary flame
earnest phoenix
earnest phoenix
#

Im talking about mongo eval...

wary flame
#

Which you could still use for something like this, I don't think there are other options

earnest phoenix
#

You can still use the eval itself to query things through mongo, without mongo's own eval

#

I could probably define db as mongoose.connection.db in the eval and execute functions of it

#

Okay, ill try that, thanks!

#

Reminder that db.eval() is just a wrapper of eval()

#

i assume there is a eval function in mongo shell since its based on js

wary flame
#

Be carefull the command (assuming it's a discord bot) is only available to you because when using eval like this you can still execute other code

earnest phoenix
#

yea ofc

feral aspen
#

Heyo.

#
const manager = new ShardingManager("./src/index.js", {
    token: process.env.TOKEN,
    totalShards: "auto"
});

I want to use the amount of totalShards as the if (bot.shard.ids[0] === GOES_HERE)

#

Is that possible?

feral aspen
#

Use ``` before and after the code.

sick blaze
#

K

#

Thanks

wary flame
#

```langshort
Code
```

tulip ledge
#

Anyone knows how to fix this? I'm on windows and these are my start scripts:

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "electron-react": "concurrently \"SET BROWSER=none && npm start\" \"wait-on http://localhost:3005 && electron .\""
  },
trail finch
#
let member = !args[0] ? await client.tools.resolveMember(message.author.id, message.guild) : await client.tools.resolveMember(args[0], message.guild)```

```Error: 
TypeError: Cannot read property 'resolveMember' of undefined```
#

discord.js btw

umbral zealot
#

client.tools is undefined, that doesn't exist in discord.js

woeful pike
#

client.tools.resolveMember(message.author.id, message.guild) = message.member

tulip ledge
#

not sure that that's how it works

trail finch
#

um k

novel jetty
#

What does this mean?

umbral zealot
#

still waiting to see code in another server

tulip ledge
#

is there legit no one who knows how to solve this issue? Google doesn't even know how

umbral zealot
#

Honestly seeing that you've been asking for at least 24 hours, you should consider asking in a react-related server, or an electron-related server maybe?

tulip ledge
#

I don't know any

umbral zealot
woeful pike
#

development on windows lol

sick blaze
#

?

umbral zealot
#

"the bot"?

#

we can't really help you make a random bot you found on github, to run on an external service.

stable eagle
#

What happens if I update an npm package I already modified myself?

amber wagon
#

I'm sending gifs through Imgur links on pc it loads fast but on phone its very slow when I checked the gif size was increased 4times on phone. why is this change of size happening ?

umbral zealot
clear marlin
#

Unless the package is yours

stable eagle
clear marlin
#

nothing happens

umbral zealot
#

You can't republish someone else's npm package so... you cannot.

stable eagle
#

oh, so it doesnt like remove my modified stuff?

umbral zealot
#

If you're trying to change code in node_modules, that's... not gonna work

clear marlin
#

unless you require('../node_modules/packagename')

#

this actually works

umbral zealot
#

yeah but the next time you do an npm i it'll overwrite

#

so... bad idea.

clear marlin
#

yeah

round cove
amber wagon
umbral zealot
#

lol

umbral zealot
clear marlin
#

does the size increase really matter?

round cove
#

I wish I could explain the amount of pain I felt when I learned he wasted all that time.

clear marlin
#

I mean it does do the job well, doesn't it?

amber wagon
#

Alright

umbral zealot
amber wagon
#

I also tried using discord links as well

#

Still same issues

clear marlin
#

but does the issue matter lmfao

amber wagon
#

It loads very slowing

clear marlin
#

I mean you're not saving the gif are you? You could use a optimizer to decrease the size of the gif

amber wagon
#

No just links

clear marlin
#

ยฏ_(ใƒ„)_/ยฏ

sturdy dock
#

using d.js how would I get a unicode string to send as an emoji? ex. I want \U0001F95A to send as ๐Ÿฅš

#

\u1F95A doesn't work either

earnest phoenix
#

try sending it as \๐Ÿฅš

sturdy dock
#

yep, that works

#

just curious if there's a way to send it as the unicode string

#

since i'm parsing it

earnest phoenix
#

ยฏ_(ใƒ„)_/ยฏ

#

idk

sturdy dock
#

aight

#

couldnt find anything online so ig not

earnest phoenix
#

for thing that i just do this \:egg:

sturdy dock
#

ahh that would work better

#

thanks

twilit rapids
#

I've been having some latency issues for a while and I finally started to debug today. Every 10s it there's a spike as to how long it took for the msg to be send to us. (Simply Date.now() - msg.createdTimestamp)

#

So i added a simple check to see if it's delayed here as well

#

And yup, perfect on every 10 seconds it increases

[2:20:43 PM] Took 1029ms
[2:20:43 PM] Took 900ms
[2:20:43 PM] Took 958ms
[2:20:43 PM] Took 875ms

[2:20:48 PM] Took 1205ms
[2:20:48 PM] Took 1099ms
[2:20:48 PM] Took 782ms
[2:20:48 PM] Took 1175ms
[2:20:48 PM] Took 772ms

[2:20:53 PM] Took 974ms
[2:20:53 PM] Took 906ms
[2:20:53 PM] Took 958ms

[2:20:58 PM] Took 1051ms
[2:20:58 PM] Took 806ms
[2:20:58 PM] Took 1084ms
[2:20:58 PM] Took 921ms

[2:21:03 PM] Took 921ms
[2:21:03 PM] Took 835ms
[2:21:03 PM] Took 1147ms

[2:21:08 PM] Took 752ms
[2:21:08 PM] Took 822ms
#

Now this could mean Discord is being wack but i doubt that, so it has to be an issue with networking on my machine
But I have no idea how to debug this

quartz kindle
#

does your bot do anything on an interval?

twilit rapids
#

Quite a few things, but I've already tested to remove them and the issue persists

#

It does seem to be on different timestamps per cluster btw, e.g. Cluster 0 is on :04, and cluster 1 on :07

earnest phoenix
#

For how long have you been having these latency issues?

#

For the past few days?

twilit rapids
#

Past few months

#

I didn't really bother before