#development

1 messages · Page 413 of 1

lilac owl
#

ok thanks

#

it seems to just be the dblpy.post_server_count() that causing the problems

abstract crystal
#

(maybe can i recommend you my lib? dblapi) @lilac owl

lilac owl
#

its not the Discord library that has the problem

abstract crystal
#

@verbal night off topic, he has a problem with posting DBL stats

lilac owl
#

its the dbl library

#

link? @abstract crystal

abstract crystal
#

i'm gonna update the github now pip install dblapi

lilac owl
#

I mean

#

I just realised

#

its just a POST request right?

abstract crystal
lilac owl
#

Might as well just do it that way

abstract crystal
#

yes

#

it's really simple with the aiohttp lib

lilac owl
#

yeah I think i'll do it that way then

#

thanks for the help guys

abstract crystal
#

np

carmine vapor
#

Can u make a game bot

solid cliff
#

game bot think

verbal night
#

@carmine vapor more specific please?

carmine vapor
#

Like a game

#

Like connect 4 or like tic tax toe

abstract crystal
#

yes you can

verbal night
#

you're pretty limited on what you can actually do though xD

carmine vapor
#

Ok

abstract crystal
verbal night
#

okay i take that back, you're not as limited as i originally thought

#

you just have to be incredibly creative

abstract crystal
#

^

verbal night
#

buuut you're still limited

abstract crystal
#

well you can't really create a 3rd person shooter but yes

verbal night
#

@abstract crystal I mean, you could create a top down shooter of some sort using reactions however
or a dungeon crawler, hell even via commands 🤷

#

you're still limited with what you're able to do with that severely however

abstract crystal
earnest phoenix
#

is anyone else having issues with the api? mores specifically, finding out if a user has voted?

night imp
#

I was earlier, however it was a problem with my modified module

#

Are you using webhooks or API requests

mental solstice
#

Some of them are depreciated.. GetVotersById, and the other one similar dont work properly

earnest phoenix
#

What u think is the best db to use for bot?

#

Discord.js bot

abstract crystal
#

sqlite if it's not big

quasi forge
#

u can try using json files instead of db

abstract crystal
#

just don't use json to store data

quasi forge
#

why not?

wanton needle
#

I really need help. I have an approved bot here and I need a really good person to help me with a warn, clear specific warn, and warning command for my bot

earnest phoenix
#

I mean for storing custom prefixes, commands from servers etc

abstract crystal
#

it's json, ment for storing static data in files, not dynamic

quasi forge
#

it can dood

#

store dynamic data

#

who gives a fuck about what it's meant to

abstract crystal
#

whoa why are you so agressive

mental solstice
#

Lol

wanton needle
#

Anyone know warn commands?

mental solstice
#

He takes json seriously.. ease up

#

Matt what do u mean?

wanton needle
#

I need a coder for a warn, clear specific warn, and show warnings command

knotty steeple
#

json for static data

mental solstice
#

@#warn @user ... User has been warned

#

?

knotty steeple
#

json can corrupt easily like everyone says

abstract crystal
#

^

wanton needle
#

Like ?warn @user reason

#

?warnings @user

#

?clearwarn 1

#

?clearwarn 2

knotty steeple
#

need a db

#

for that

abstract crystal
#

yup

mental solstice
#

Ofc ull need a db. Then send queries based on what u want to accomplish

quasi forge
#

lol

#

I am sorry if I went aggressive

#

I didn't mean to

mental solstice
#

Like a wild boar

knotty steeple
#

just dont be so about json

#

json is gud but not that good

mental solstice
#

Yeh xml better for storage

knotty steeple
#

xml 🤢

mental solstice
#

😂

quasi forge
#

lmao

night imp
#

@earnest phoenix if you are using sqlite do better-sqlite3

quasi forge
#

true tho

night imp
#

It is faster and asynchronous

inner jewel
#

ini files are better storage than xml/json

night imp
#

^

quasi forge
#

I only use MySql as a db

night imp
knotty steeple
#

ini

#

pls

quasi forge
#

lol

inner jewel
#

it's true

#

¯_(ツ)_/¯

night imp
#

I store my data in hastebin

inner jewel
#

you can only parse until you find the data you want

#

no need to parse the whole file

night imp
#

^

#

Json is for bots with very little data

knotty steeple
#

i use json to store my 3 keys/tokens, and prefix, and random playing messages

mental solstice
#

Id rather hard code all information, it takes longer.. but no corruption or connection issues

inner jewel
#

json is fine for config

low owl
#

I also use JSON for most tokens etc and an actual database for configuration.

keen nest
#

I think we just do a class

#

Like a barebones export

wooden linden
#

not using TOML

quasi forge
#

there are tons of options use anything u like

earnest phoenix
#
  if(!message.author.id === "395248246529851405") message.channel.send("You aren't my owner.");
  message.channel.send("My owner requested me to leave this server. Therefor I must leave. Bye @everyone !");
  message.guild.leave();
```would that work?
#

(Discord.js)

low wasp
#

no

#
  message.channel.send("My owner requested me to leave this server. Therefor I must leave. Bye @everyone !");
  message.guild.leave();```
#

add a return to stop the bot from continuting

topaz fjord
#

also

#

why ping *@*everyone

low wasp
#

^^

halcyon torrent
#

does it ping actually?

frozen bough
#

How can i let the bot react on his own messages
it only add reactions on my command
i'm using discord.net.

ashen quail
inner jewel
elder rapids
#

Isn't it funny how sometimes you can just google the error and then it tells you a fix

brave bolt
#

need a let me google that for you bot hha

elder rapids
#

Hey @tidal ridge

brave bolt
vital bluff
#

@tidal ridge

#

@google help

#

srsly

#

@google search hello

#

@tidal ridge help

elder rapids
#

Bot's don't work here

vital bluff
#

o

elder rapids
#

Wrong place to do them anyways => testing channels

vital bluff
#

That explains

#

Okk

ashen quail
#

Trixter I am using glitch, so I can't do that...

inner jewel
#

you can

#

i've seen people do it

earnest phoenix
#

whats a dbl token?

elder rapids
#

a token

earnest phoenix
#

where can i get it?

inner jewel
#

on your bot's edit page

ashen quail
#

serving at http://2f74fab75618/:3000, http://172.17.0.81/:3000, http://127.0.0.1/:3000

My bot won't turn on

toxic oracle
#

and what are we supposed to do

#

we dont know your code

#

or error

verbal night
#

^

knotty steeple
#

how do i get the link of this

#

without the [""]

inner jewel
#

parse the json

#

and get the first element of the array

knotty steeple
#

ok

#

it worked thanks

#

still dont know how i forgot that 😄

topaz fjord
#

what the fuck

#

why would you run a bot and an express server in the same process

inner jewel
#

glitch

topaz fjord
#

2 seperate processes pls

inner jewel
#

so people using glitch abuse that by making requests to themselves once in a while

acoustic juniper
#

so i'm trying to make a music bot with ytdl-core then i heard that ytdl-core stopped working, is there a alternative to ytdl-core? btw this is my code https://hastebin.com/umewiviyoy.php

brave bolt
#

oh he's back

inner jewel
#

lavalink would be an alternative

acoustic juniper
#

i heard of lavalink i just can't figure out how to use it do you run it seperatly

brave bolt
#

yes

acoustic juniper
#

so you run the discord bot then lavalink?

trim plinth
#

@acoustic juniper you need an instance of lavalink running

brave bolt
#

lavalink should be online first

trim plinth
#

^

brave bolt
#

if you have a snazzy bot you can add nodes on the fly

acoustic juniper
#

using npm

brave bolt
acoustic juniper
#

something like npm install lavalink maybe

brave bolt
inner jewel
#

lavalink is java

topaz fjord
brave bolt
#

there are language specific libs in that readme

inner jewel
#

but has an API which other languages can use

brave bolt
#

^

elder rapids
#

You can also program your own ytdl huehhueheujeheuheh

brave bolt
#

pls

topaz fjord
#

lavalink might each my ram

#

just a bit

#

a tad

acoustic juniper
#

@elder rapids how do you program your own

trim plinth
#

@elder rapids no u

elder rapids
#

But who wants to spend the time doing cipher decodes and such

acoustic juniper
#

me

elder rapids
#

Oh wait me

#

I made my own ytdl in c#

trim plinth
#

oh boi

elder rapids
#

It's since been abandoned

acoustic juniper
#

how do you do that?

elder rapids
#

No longer used

acoustic juniper
#

how would you code your own?

#

may you please teach me?

brave bolt
#

I believe rule 7b applies here pepeThink

acoustic juniper
#

kinda

raw sandal
#

i mean i have a shit book i used to try to learn

#

im working on one but im pretty bad xD

topaz fjord
#

Lavalink.go here i come

verbal night
#

@brave bolt You could give them an idea on what to do and they could go from there xD

brave bolt
#

We already have pepeThink

acoustic juniper
#

can you just direct me to somewhere i could learn or something

verbal night
#

I'm curious why in that language @topaz fjord :p

topaz fjord
#

@verbal night cus no wrapper yet

raw sandal
#

i recoomend you learn the basics through reading

topaz fjord
raw sandal
#

¯_(ツ)_/¯

topaz fjord
#

^this can help

acoustic juniper
#

@topaz fjord that may not be a good idea...

raw sandal
#

heck i dont know shit either

topaz fjord
#

why

raw sandal
#

lol node

#

that was fun

acoustic juniper
#

because go is a developmental programming language

topaz fjord
#

and

verbal night
#

ah makes sense, also again @topaz fjord have fun trying to make a wrapper for my open source project xD

raw sandal
#

and?

topaz fjord
#

who says i cant use it

acoustic juniper
#

they haven't finished it much

topaz fjord
#

@verbal night i stuggle my way through it

verbal night
#

@topaz fjord 😛 I'm sure once you finish with a wrapper id be able to find ways to make it easier on you and others 😛

raw sandal
#

isnt that what makes programming a challenge?

acoustic juniper
#

@elder rapids where did you learn to make a alternative for ytdl

topaz fjord
#

yes

#

he learned the language

#

thats pretty much how you do anything

elder rapids
#

Learned c#

#

Did research

#

Research on ytdl and the cipher and stuff

brave bolt
#

he copied and pasted from stackoverflow

topaz fjord
#

stackoverflow is pretty good

brave bolt
acoustic juniper
#

lol

elder rapids
#

Actually I read a lot of ytdl core code

#

Then translated it to c#

#

Ofc learning and researching in the process

#

It's really that simple

acoustic juniper
#

wow thats... amazing

verbal night
#

prices

#

prices

#

prices

elder rapids
#

Process

#

Why prices phone

#

Tf is this gay shit

verbal night
#

xD

trim plinth
#

stackoverflow is gud

elder rapids
#

Indeed it is

#

A good developer makes use of their resources

acoustic juniper
#

yup

raw sandal
#

good

#

you lose me there

topaz fjord
#

wut does this have to do with the subject

acoustic juniper
#

idk

topaz fjord
#

then why paste the link

acoustic juniper
#

idk

topaz fjord
#

great answer

acoustic juniper
#

ikr

topaz fjord
#

its sarcastic but k

elder rapids
trim plinth
#

idk == very telling and good answer

acoustic juniper
#

i love how this is a bunch of professional developers all using very unprofessional acronyms and such

topaz fjord
#

who says we need to speak proper english

trim plinth
#

not a lot of people here are professionals per say

elder rapids
#

We're professional?

topaz fjord
#

english is hard

elder rapids
#

Since when

topaz fjord
#

kthx

acoustic juniper
#

every one @topaz fjord

raw sandal
#

proffesionals?

trim plinth
#

yes I am very """professional"""

acoustic juniper
#

@elder rapids yes we are professional

topaz fjord
#

are you telling me what to do

brave bolt
#

We use acronyms other developers understand pepeThink

verbal night
#

I'm as far from professional as you can get

acoustic juniper
#

lol

raw sandal
#

im utter crappy programmer

topaz fjord
#

hello i would like to ask you what a professiona; is

verbal night
#

^

raw sandal
#

i qualify for helmet tier

elder rapids
#

I'll consider myself an average developer

brave bolt
#

I suppose earning a living off writing code makes you a pro?

acoustic juniper
#

yup

brave bolt
trim plinth
#

I consider my self a unprofessional developer

raw sandal
#

im heading back into it after failing badly xD

elder rapids
#

If earning money off your programming means you're a pro

#

I'm a pro

raw sandal
#

¯_(ツ)_/¯

#

i suppose

acoustic juniper
#

lol

low owl
#

@acoustic juniper How does one rule out the other?

topaz fjord
#

who says im earning money off my code

verbal night
#

^

topaz fjord
#

i dont even have a patreon

#

¯_(ツ)_/¯

verbal night
#

^

low owl
#

Pro devs are also just humans. And lazy 👀

verbal night
#

^

acoustic juniper
#

lol

trim plinth
topaz fjord
#

i like how lol is the repsonse

#

no actual response

trim plinth
#

hahahahahahahahahaha I am laughing out loud

topaz fjord
#

im laughing out loud cause im getting told im wrong

trim plinth
#

oof

topaz fjord
#

and they disappeared

verbal night
#

:p

earnest phoenix
#

!help

acoustic juniper
#

is there a tutorial or something that explains how to create a version of ytdl?

inner jewel
#

no

#

and it's not easy either

verbal night
#

^

glossy sand
#
public class YTDL {
    public static void main(String[] args) {
        Runtime.getRuntime().exec("wget " + args[0]);
    }
}
acoustic juniper
#

@glossy sand that won't work ytdl stopped working

glossy sand
#

wha

#

that's a joke

brave bolt
#

this guy man facepalm

topaz fjord
#

lmfao

acoustic juniper
topaz fjord
#

thats very much not js

#

what nines sent

inner jewel
#

wdym

#

java == javascript

acoustic juniper
#

no thats js

glossy sand
#

excuse me

#

java === javascript

acoustic juniper
#

@inner jewel No java is way different

inner jewel
#

cmp java, javascript
jne CRASH

topaz fjord
#

@acoustic juniper what nines sent isnt js

brave bolt
acoustic juniper
#

ik

#

it's java

brave bolt
#

let java = 'javascript';

inner jewel
#

java ^ javascript == 0 right @glossy sand

brave bolt
glossy sand
#
\delta_{{\rm java}\,{\rm javascript}} = 1
verbal night
#

:p

earnest phoenix
#

hello my fellow developers

languid dragon
#

pr0fessionals

earnest phoenix
#

well thank you

cosmic cipher
#

Hey guys, I wonder if there is any info about how to best scale up a bot. We have a small bot that now just passed 2500 servers, so we had to enable sharding. We are now wondering how bigger bots handle that. For now we can do it manually, but once you have a couple of shards then updating will become very time consuming. Is there any ansible/kubernetes/AWS deployment strategy to handle auto scaling, without coding anything from scratch?

#

Also, do you guys mostly use small servers (like 1, 2 shards per server), or do you get big ones with 64/128GB RAM?

languid dragon
#

are you looking for a way to automatically create new shards without needing to update the bot

#

or are you looking for something that automatically updates the bot, say, when you push to github

#

@cosmic cipher

mental solstice
#

Discord only allowed my bot on 100 servers.. lucky. Havent looked into sharing, kinda killed my motivation after i hit 200 servers my 2nd day and got rate limited

verbal night
#

o.o

cosmic cipher
#

@mental solstice How did you get rate limited? I mean why did discord care that you were on 100 servers?

mental solstice
#

Idk i emailed them and i was limited to 100 servers and i needed to look into shards

#

Ohh i just reread it.. they sent me a 2 part email

#

An end point only gets 100 servers.. and i should look into sharding

cosmic cipher
#

@languid dragon A combination of both. Deploying after a github commit wouldn't be that hard, but I'm more looking for a guide/some experiences of people who went through the process. I mean if the current rate of growing continues we should hit 5k servers in about 3 weeks. In the best case, if the bot gets really popular, you have to create new shards every other day, which means you have to restart them all. And because we're definitely not the first ones with that problem, I was curious if there already exists some kind of repo or guide how to handle that (ideally that would include a feature for starting the bot with the new shards before shutting down the old one, to reduce downtime, etc.)

languid dragon
#

well at the moment i've been working on a sharding utility but it's been purely for my bot only, however with the github automatic update thing it would be fine you'd just need to make sure your bot has safety checks and that if you update something that doesn't work, it wont break

#

;/ev components.app.newShard().shards.length

cosmic cipher
#

My code usually doesn't have any errors 🙃

languid dragon
#

do you develop your bot on windows?

cosmic cipher
#

I have a mac but my friend is working on windows I think

#

Are you planning on open sourcing your sharding utility?

languid dragon
#

im assuming your bot is on a linux machine

cosmic cipher
#

yes

languid dragon
#

yeah,

#

some things work on windows and/or mac but work differently on linux, i've come accross that a lot

#

what language/lib are you using

cosmic cipher
#

We use yamdbf which is based on discord.js

languid dragon
#

what's the differences (nvm i googled it)

cosmic cipher
#

yamdbf is basically just a wrapper around discord.js with some additional featuers (typescript + guild storage)

languid dragon
#

yeah

#

i may be willing to open source my bot, it's still heavily in the development stages and a lot of it isn't up to acceptable standards at the moment

#

so it'd be a while before i do (open source it), im still having a few issues with my own sharding utility

cosmic cipher
#

Ok. Yeah our bot isn't open source yet as well for the same reason 😛

languid dragon
#

understandable

verbal night
#

^

cosmic cipher
#

I mean for now we should be good, it was just weird to not find much information about sharding in general

languid dragon
#

yeah especially with d.js i think they want you to strictly use their sharder

#

¯_(ツ)_/¯

cosmic cipher
#

I still wonder if it's better to have many small VPSs or a one/a couple big ones

#

Well but their sharder only works on one machine

#

Which is not really feasable in most cases I guess?

languid dragon
#

well as long as you have good internet, having the bot on one server isn't bad

#

@fair grail is on a large server of it's own

cosmic cipher
#

How many servers is it on?

languid dragon
#

-botinfo @fair grail

gilded plankBOT
#
Bot info <:dblCertified:392249976639455232>
ID

270904126974590976

Username

Dank Memer

Discriminator

6539

Short Description

Memes out the butt, tons of image generation, soundboard/mememusic, and a super fun and sassy economy system.

Library

Eris

Prefix

pls

Upvotes

105947

Server Count

211344 Servers

Owner(s)

@keen anvil dblMod dblCertifiedDev
@karmic parcel dblCertifiedDev
@uncut slate dblMod dblCertifiedDev

languid dragon
#

that many

cosmic cipher
#

Wow

languid dragon
#

until you have something like well above 1 million users, i dont think splitting the load over different servers would be necessary

cosmic cipher
#

That's like 80 shards on one server

languid dragon
#

ye

#

big boy server

#

;/ev -g 2+2

river compassBOT
#
Shard: 1
4
Shard: 2
4
Shard: 3
4
Shard: 4
4
languid dragon
#

;/ev -g -j 2+2

river compassBOT
#
Result ~
16
languid dragon
#

shh

#

that's a bit of my sharder

#

idk if that showcases anything lmfao but yeha

cosmic cipher
#

What is the 4? Shard 1 of 4?

languid dragon
#

that's me doing eval on each shard

#

2+2 = 4

cosmic cipher
#

Aaaah

#

Lol

#

Nice

languid dragon
#

;/ev components.app.newShard().shards.length

river compassBOT
#
Result ~
5
languid dragon
#

;/ping

river compassBOT
#

Pong! ~ owo

API :: 1557ms
MSG :: 428ms

#

Pong! ~ owo

API :: 277ms
MSG :: 467ms

languid dragon
#

for some reason i can't postspawn shards (yet)

cosmic cipher
#

Well I'm looking forward to take a look at your bot once its open source

#

Postspawn?

languid dragon
#

ye

cosmic cipher
#

what do you mean by that?

languid dragon
#

;/ev components.app.shards.length

river compassBOT
#
Result ~
1
languid dragon
#

;/ev components.app.newShard()

river compassBOT
#
Result ~
Shardcount now at 2, spawned new shard: 1
languid dragon
#

;/ev components.app.shards.length

river compassBOT
#
Result ~
2
#
Result ~
2
languid dragon
#

but it still double posts

#

probably no easy way around it

cosmic cipher
#

So when you spawn a new shard, does it also restart all the other ones?

#

I mean it has to pretty much

#

Or can you change that on the fly?

languid dragon
#

testing that rn

cosmic cipher
#

The problem is that our bot tracks invites/memberAdds, so it is pretty important that the bot is not down for a long period of time. So if we have to update all shards, we would have to start the new ones before we shut off the old ones. If you can change shards on the fly that would actually be amazing because you can just add one more and update the others...

lament meteor
lime arch
#

ive never looked into sharding, but discord.py suppose autosharding correct?

lament meteor
#

not sure

#

also Ken u using d.js not eris?

languid dragon
#

ye

#

ok i fixed it

#

lmao

#

;/ev components.app.shards.length

river compassBOT
#
Result ~
1
languid dragon
#

;/ev components.app.newShard()

river compassBOT
#
Result ~
Shardcount now at 2, spawned new shard: 2
languid dragon
#

;/ev components.app.shards.length

river compassBOT
#
Result ~
2
lament meteor
languid dragon
#

ecksdee

#

;/ev -g client.guilds.size

river compassBOT
#
Shard: 1
90
Shard: 2
93
languid dragon
#

ezpz

lament meteor
#

noice

languid dragon
#

just discovered some pretty cool shit my dude

cosmic cipher
#

nice!

#

What did you discover?

languid dragon
#

my code is a mess

#

also this

#

;/ev -s components.app.newShard(m)

river compassBOT
#

Removing all shards and rebirthing...
Shard 0 destroyed...
Shard 0 birthed.
Shard 1 destroyed...
Shard 1 birthed.
No shard to destroy => Creating a new one...
Shard 2 birthed.
3 birthed shards.

cosmic cipher
#

Nice

languid dragon
#

ok now it actually works properly and doesn't double post anymore LUL

toxic oracle
#

yes

tiny turtle
#

I see bots you can subscribe to and they auto post commands daily at a specific time, how do you go about doing that?

halcyon abyss
#

save channel or channel id, and run specific function at specified time

restive silo
#

this kinda run a callback of an Timeout at the given time

#

resolve channel by saved id and then save

frail kestrel
#

what's the syntax for setting client options in discord.js?

#

oh wait nvm

#

think i got it

#

obobo

bitter sundial
#

read the docs mmLol

fossil portal
acoustic juniper
#

lol tickYes

pulsar cairn
#

Does anyone know how to get the bot discrim and username in eris

fervent steeple
#

Eris doesn't have documentation?

solemn obsidian
#

yes it does?

fervent steeple
#

So why is he asking so pointless thing here?

#

When he can search it in documentation lmao

#

People dunno how to read documentation, they want only spoon feed

prime cliff
#

Same

austere meadow
#

for anyone who knows how to use sequelize, could you help me try to get a better understanding of what sequelize.sync() does?
i want to try and achieve a system where if a user is missing data from a column in a table (ie, the data in the table is null because that user hasn't had data put there) i can automatically set that user's column to the default value that i defined for that column in my model file, is this possible

low owl
#

So basically a fallback for missing data?

austere meadow
#

yeah essentially

restive silo
#

yes it is blake

#

so basecally

#

.sync() syncs your model with your database

#

and when you now have models with default values

#

you can use findOrCreate() method to find a user by id and if not present, create one with default values

#

i did that before using a framework

#

or if you have already created the user instance then there was a method to reset colums to default value

#

idk how that was called tho

austere meadow
#

yeah in my case the user instance already exists, its just 1 or 2 columns that are missing values and i want to set them to default

#

but yeah thanks for the help

torpid trail
#

@bitter sundial

bitter sundial
#

the port is in use by another process

torpid trail
#

thx

grizzled isle
#

If you fetch messages, you are caching them into the bot, correct?

low wasp
#

yes

topaz fjord
#

Yes

grizzled isle
#

Okay. Thank you

lilac owl
#

discord.errors.Forbidden: FORBIDDEN (status code: 403): Missing Permissions

low wasp
#

its probs muted

lilac owl
#

How do I know

low wasp
#

tag it and see if its got the muted tag

lilac owl
#

what do you mean by muted tag

low wasp
#

whats your bot?

lilac owl
#

@noble fossil

quiet bobcat
#

it's muted

lilac owl
#

ah yeah ok

low wasp
#

its got the muted role

lilac owl
#

cool atleast its not my code thats broken lol

#

thanks

low wasp
#

your code is broken because its muted

lilac owl
#

Yeah but I mean its not my code that is causing the problem

#

if you see what I mean

#

I am about to fix the non-handling of the error

low wasp
lilac owl
#

hm

#

👍

low wasp
#

if(message.author.bot) return;

quiet bobcat
#

^

lilac owl
#

Yeah, thanks

#

Who deals with muting bots?

low wasp
#

any mod

#

ask the one who muted it to unmute

lilac owl
#

ok

#

Well, can I just tag them here?

#

Or should I message them

quiet bobcat
#

message them imo

#

you can tag them aswell but it might get lost

quasi hearth
#

can we use multiple bot.on('message') things, or will this break things?

topaz fjord
#

you can

#

but waste of memory

spring ember
#

if you wait for one message I guess it is fine

uncut slate
#

hooking up multiple listeners could be useful if you want to do things in parallel

topaz fjord
#

@uncut slate no u

uncut slate
#

k

inner jewel
#

"waste of memory"

#

you'd ""waste"" a couple bytes at most

topaz fjord
#

i will waste ur memory

lilac owl
#

Is there ever a possibility that a channels ID will change?

quasi hearth
#

i doubt it

lilac owl
#

I have a test server and that seems to have happened, but I might have deleted & remade the channel a while ago, can't remember

quasi hearth
#

probably the latter

topaz fjord
#

channels ids change if u delete

#

and recreate

#

if u edit the channel it wont change id

lilac owl
#

ok I expect that is what has happened then

#

ty

inner jewel
#

no ids will ever change

#

unless someone with discord's database access wants to troll

dreamy arrow
#

hi

#

babes

#

shy verge
#

@earnest phoenix ok, can you please like

dreamy arrow
#

EXPLAIN

shy verge
#

not use the github web ui to create files

dreamy arrow
#

**

earnest phoenix
#

hello

#

I am here

#

I has been tagged

dreamy arrow
#

.

shy verge
#

send a screenshot of your LOCAL bot directory

#

not on github, the bot files on your machine

dreamy arrow
#

yes

earnest phoenix
solid cliff
#

yes

shy verge
#

close enough

earnest phoenix
#

ok

#

now what

#

do I win?

#

xd

solid cliff
#

donoe

#

yes

dreamy arrow
#

yes

#

yes

earnest phoenix
#

does it hide my token?

shy verge
#

now gitpull it back into your bot directory and see if git will stage your config

earnest phoenix
#

can my bot be hosted on Heroku?

dreamy arrow
#

yes

#

maybe

topaz fjord
#

o no

shy verge
#

yes, but it sucks

earnest phoenix
#

what
now gitpull it back into your bot directory and see if git will stage your config

topaz fjord
#

discord.js-commando

dreamy arrow
shy verge
#

do you know how git works at all?

earnest phoenix
#

i do not understand nerd

dreamy arrow
#

i do

shy verge
#

FUCK

earnest phoenix
#

i do not understand git

#

i do not understand life

topaz fjord
#

if were nerds why are u coding zoomeyes

earnest phoenix
#

i understand javascript

dreamy arrow
#

u got mac.window

earnest phoenix
#

i understand memes

topaz fjord
#

this is off topic

earnest phoenix
#

I got windows boi

shy verge
topaz fjord
dreamy arrow
#

he needs to download git directory on his windows

#

so he can git xD

shy verge
#

inb4 he doesn't even have git installed

earnest phoenix
solid cliff
#

it will hide ur token if ur token is in config.js

earnest phoenix
#

{
"token":"bishbashbosh123-69-180"
}

#

that's inside the config.json

dreamy arrow
#

lol

solid cliff
#

then why js

topaz fjord
#

js !== json

shy verge
#

idfk, pull it back into your bot directory and see if git ignores your config file

dreamy arrow
#

you mean

earnest phoenix
#

realised it was a .json not a .js

#

quickly edits it

dreamy arrow
#

js === json

topaz fjord
#

no

earnest phoenix
#

very moist toitoise = uwu

#

just saying

#

lol

shy verge
#

????????????

#

pls

earnest phoenix
#

offtopic lol

topaz fjord
#

this channel is for development

#

it is offtopic

dreamy arrow
#

ok so are we done

shy verge
#

ok we need to know whether or not you even know what you're doing

#
git status

@earnest phoenix what does this do?

earnest phoenix
#

erm

#

it says the status of the git

shy verge
#

can you be any more specific?

earnest phoenix
#

it also reads the files of the git thingy mabobg

topaz fjord
#

use that

earnest phoenix
#

it does (use "git add <file>..." to include in what will be committed) and then a bunch of file names

dreamy arrow
#

@earnest phoenix Its easy

#

took me like a day

#

to learn "git"

earnest phoenix
#

I got 20m

#

k

dreamy arrow
#

lol

#

just run on pc

inner jewel
#

don't run bots in heroku/glitch

#

they're not made for bots

shy verge
#

then you don't need a fucking config file, just use ENV vars

inner jewel
#

and suck a lot [for bots]

topaz fjord
#

use a vps

earnest phoenix
#

im a noob k

#

what the frick is an ENV

#

is it like ENG

topaz fjord
#

also just saying

earnest phoenix
#

england is cool

topaz fjord
#

ur token is on github

earnest phoenix
#

england is my city

#

#meme

#

where is it

#

no it's not

topaz fjord
#

you can check commit history

earnest phoenix
#

it shouldn't be

shy verge
#

and that's ok, we just expect you to learn somewhat quickly, and not fucking spam #development

topaz fjord
#

commit history shows ur token kek

earnest phoenix
#

kek I changed it bish

#

like 1 hour ago

topaz fjord
#

nope

#

no u

earnest phoenix
#

no me?

#

@topaz fjord do you english

topaz fjord
#

yes i do

dreamy arrow
#

"do you english"

earnest phoenix
#

(node:12804) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided. at WebSocketConnection.client.ws.connection.once.event (C:\Users\Tom\node_modules\discord.js\src\client\ClientManager.js:47:41) at Object.onceWrapper (events.js:273:13) at WebSocketConnection.emit (events.js:182:13) at WebSocketConnection.onClose (C:\Users\Tom\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:390:10) at WebSocket.onClose (C:\Users\Tom\node_modules\ws\lib\event-target.js:124:16) at WebSocket.emit (events.js:182:13) at _receiver.cleanup (C:\Users\Tom\node_modules\ws\lib\websocket.js:220:12) at Receiver.cleanup (C:\Users\Tom\node_modules\ws\lib\receiver.js:535:15) at WebSocket.finalize (C:\Users\Tom\node_modules\ws\lib\websocket.js:206:20) at TLSSocket.emit (events.js:187:15) (node:12804) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:12804) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#

what does this mean

topaz fjord
#

your token is invalid

earnest phoenix
#

cwap

topaz fjord
#

@earnest phoenix i thought u did ur bot in python

earnest phoenix
#

no

#

I said I used to

#

and I changed to javascript

#

cos python is for dummies

shy verge
#

@solid cliff fite him

topaz fjord
#

weeb

earnest phoenix
#

css is ez

#

@solid cliff they said fight so let's fight 🥊 🤜 🔪 ❤

spring ember
#

Not here pls

earnest phoenix
#

it's a joke Donkuu

#

Donkku*

spring ember
solid cliff
south finch
#

Joke or not, doesn't belong in here

tepid hedge
#

Does anyone know how i should code to make a randomly generated response from 1-100

restive silo
#

well i would add these 100 responses in an array and then use something like Math.random() * array.length to get an random index and then acess the index of that array

#

👀

tepid hedge
#

thanks

restive silo
meager garden
#

got a ping in this channel? 🤔

low owl
#

Probably a ghost ping

earnest phoenix
#

wazaaaaa

wet ferry
#

hey @everyone
I have an object array like this:

"messages":{"407711330943107072":21,"383404775326351360":119,"382504483483025410":586,"445408817233002506":1,"444651257760710656":8,"433368385082884106":2,"419945483704729609":1,"444667571858309121":2}

Those are channel-ids and their message count. I was wondering how I could order them from highest to lowest and get their position in an array. Does any1 know how this is possible?

( I ❤ fake pings 😉 )

elder rapids
#

.sort

wet ferry
#

ik, but it doesn't work with things inside object arrays

#

or I can't find out how to do it.

#

Could you show me a snippet of code for that @elder rapids

elder rapids
#

sort() works fine you just need a custom compare function

shy verge
#

@sterile thistle RichEmbed?

sterile thistle
#

Either or

tiny lodge
#

just loop through the array and .addField for each value

sterile thistle
#

Just a embed I guess

#

I tried but I think I’m doing something wrong

shy verge
#
var myArray = [1, 2, 3]
var embed = new RichEmbed()
    .EmbedFormattingStuff();
myArray.forEach(b => {
    embed.addField(b, b);
});

My JS isn't that good, and you'll probably need to modify this to fit your needs

sterile thistle
#

OHH

#

DRFINE .EXE HAS STOPPED RESPONDING

#

I just did addfield

#

I’m stup

#

Stupid

uncut slate
#

if you're using raw embeds you'd myEmbed.fields.push({ name: 'x', value: 'y' }) instead of the addField call

tiny lodge
#

he's using a richembed tho

#

and omegalul it's .addField

#

camelcase

sterile thistle
#

They are both useful

uncut slate
knotty steeple
#

wrong channel

#

also

uncut slate
#

¿

wet ferry
#

@elder rapids how would I do that?

vagrant imp
#

can anyone teach me how to make my biot auto give new joiners a roleÉ

shy verge
#

in what language?

vagrant imp
#

discord.js

shy verge
#

this is just for one guild?

vagrant imp
#

yes

#

it is just for one server

shy verge
#
client.on("guildMemberAdd", u => {
    u.addRole("ID of the role you want to add");
});
#

insert that into your existing bot code

vagrant imp
#

to add a member role what would the code look like( ia m bran new to bot makeing)

shy verge
#

I directly gave you code to insert into your bot, you should be able to figure out the rest

vagrant imp
#

ok à

#

what do i put where the guildmemberadd is. leave it or changeÉ

#

what is the role idÉ

night imp
tepid hedge
#

how do i check what servers my bot has been added to if my bot was offline during that period? tag me with answer please

floral stone
#

you can't @tepid hedge

tepid hedge
#

k

floral stone
#

unless you start saving server ids to a file

elder rapids
#

Why would you want to check what servers your bot was added to while offline

floral stone
#

^

elder rapids
#

They probably kicked the bot by then tbh bloblul

tepid hedge
#

to know

#

if they are in bigger servers

elder rapids
#

sigh you'll eventually get to a point where you won't care

tepid hedge
#

yeah i know

elder rapids
#

As it'll just be 100 guilds a second spamming

tepid hedge
#

the moment my bot was authorized 100 notifications turned on

shy verge
#

@elder rapids are you secretly rythm dev

#

who tf gets 100 guild updates a second

elder rapids
#

maybe

#

maybe lavalink for d.net was for Rythm all along

tepid hedge
#

@shy verge join/leave messages

shy verge
#

i know

sterile thistle
#

I hate JavaScript

#

Stupid

#

I’m moving to python

elder rapids
#

Using JavaScript outside web

#

oh wait I'm a hypocrite for that

#

I use node.js

shy verge
#

don't even use 🅱ython

elder rapids
#

use 🅱#

shy verge
#

or 🅱otlin

#

its java

#

but better

elder rapids
#

or 🅱o

#

@steel nacelle

#

No wait don't use Bo

#

use Go

shy verge
#

apparently go is speedy boi

elder rapids
#

How can a language bully you

sterile thistle
#

Because

elder rapids
#

You're bullying yourself then

sterile thistle
#

OH HEY I FIXED IT

#

nevermind, everyone carry on.

shy verge
#

this is why you use a real oo lang

#

JavaScriptIsAss

sterile thistle
#

k

rain orbit
#

GWcodesJs > GWcodesPython

native narwhal
#

discord.asm when?

mental willow
#

anyone know what the line of code to stop a bot from replying to a command in python.

if (message.author.bot) return```
this is for discord.js so what is it for python
rain orbit
#

yesteryear

#

idk

#

i do js ... not python

mental willow
#

lol same

native narwhal
#

ctx.message.author.bot?

lament meteor
#

@mental willow so ur using python, js and java?

mental willow
#

no i am experimenting with python

#

@lament meteor

lament meteor
#

o

rain orbit
#

cool

#

i only ever experiment with html and js

mental willow
#

lol

rain orbit
#

basic boii

mental willow
#

lol

#

i like JS

rain orbit
#

i do too

#

GWcodesJs > all

earnest phoenix
#

@austere meadow How do I get my dblToken?

solid cliff
#

on ur bots edit page

earnest phoenix
#

my bot client id?

solid cliff
austere meadow
#

thats another way

earnest phoenix
#

API Key?

solid cliff
restive silo
#

@native narwhal```Java
int mb = 1024 * 1024;
long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
long usedMB = used / mb;

#

so i would say my bot itself uses 7 mb 👀

native narwhal
#

👀

restive silo
#

maybe i have an issue

native narwhal
#

What does the system you're on say the application is using

restive silo
#

hard to say since i build inside of IntelliJ atm but i would say 34mb

native narwhal
#

🤔

restive silo
#

7mb is only the bot itself and the rest is JVM overhaul i guess

native narwhal
#

@restive silo This is running on a bot with 1 server that has like 5 members 👀 (The only thing existent in this application is the code to start the bot)

restive silo
#

yea well its not JDA taking that much RAM as i said its the JVM overhaul around your Java application

#

could you eval what i sent?

native narwhal
#

Not sure why there are two Java applications I closed one of them and the bot continued running so let's say it only used 70

topaz fjord
#

@restive silo tf urs is 7 zoomeyes mine is 256

low owl
#

@topaz fjord @restive silo C# > Java zoomeyes

native narwhal
#

Ew

amber token
#

Can i get help in developing my bot here?

night imp
#

Yeah but not spoon fed

#

I recommend watching some youtube tutorials first or learning the language

amber token
#

Oh thanks for the big suggestion

night imp
#

Here is a good resource^

earnest phoenix
#

Hello.

#

I am looking to add some new commands to my bot and I don’t know what to add.

#

Wait nvm

#

I know what to do.

#

Fix the say command.

#

Idk why I have the say command.

#

When I have embed but yeah.

#

When ever I use the say command the bot also says say.

#

For example if I say .M>say Hi.

#

The bot will say: say Hi.

#

(I used the period before M> because I didn’t want to trigger the command.

#

)

austere meadow
#

unrelated but how you gonna trigger the command if its in the middle of your sentence

low owl
#

Probably search for a substring of the message

#

I guess what he does is:
.M> is the prefix and gets stripped out of the message. But he forgets to also remove the command say.
Without sharing code I've no idea what actually happens tho.

earnest phoenix
#

Ok here is the code:

#

Check what’s in my bin.

amber token
#

Lel

#

Oh

earnest phoenix
#

hi

amber token
#

Hey

#

Which bot you have?

earnest phoenix
#

-bots

gilded plankBOT
#
DevinThePancake#5559
Bots <:dblCertifiedDev:401725450470031362>

@elder surge dblCertified
@indigo juniper dblCertified

amber token
#

OMG

#

Lel

#

The god of pancake

earnest phoenix
#

lol no u

forest juniper
#

-bots

amber token
#

Me?

earnest phoenix
#

thewsomeguy is

gilded plankBOT
#

This user has no bots

earnest phoenix
#

So no one can help me?

#

oof

#

@earnest phoenix what’s da issue

amber token
#

K savitar

earnest phoenix
#

ok and?

#

This code screws up with me.

quasi forge
#

-bots

gilded plankBOT
#
♓S#1624
Bots

@earnest tiger

quasi forge
#

cool

earnest phoenix
#

When I use the command it says the command name too.

#

@earnest phoenix what error

#

oh

#

uh idfk

#

E.G.: M>say hi

#

Say hi

#

oh

#

That is what will happen.

amber token
#

Lel

earnest phoenix
#

just slice or trim it

amber token
#

Then change the command name to M

#

And prefix >

#

-bots

gilded plankBOT
#
Program#6710
Bots

@tame falcon

earnest phoenix
#

Nah too much bots have the prefix >

#

it’s to do with your args @earnest phoenix

#

2

#

so add a slice and join

#

How?

quasi forge
#

Just how much can a discord.js bot handle without lagging!

earnest phoenix
#

@quasi forge use eris lol

quasi forge
#

It doesn't lag

earnest phoenix
#

nah

#

Sorry I am not used to node.js discord.js

#

it’s ok

quasi forge
#

I am now going to add economy features to my bot

earnest phoenix
#

just google it

quasi forge
#

let's see if it lags then

earnest phoenix
#

lol

#

how many servers?

quasi forge
#

lemme check out

#

7

#

lol

#

I didn't advertise

earnest phoenix
#

once you reach 100 it’ll start dying probably 😂

quasi forge
#

lol

#

We'll see about that

#

I will just enter big servers and start advertising if they have advertisment channel

earnest phoenix
#

do you have music?

quasi forge
#

no

earnest phoenix
#

ok

quasi forge
#

I kept failing at it for like 19 times

earnest phoenix
#

and just add ur bot to this website

#

it’ll grow

quasi forge
#

which one?

earnest phoenix
#

dbl

quasi forge
#

lol

earnest phoenix
#

this server

quasi forge
#

it is here

earnest phoenix
#

o

quasi forge
#

can't u see I am a bot dev

earnest phoenix
#

oh 😂😂

quasi forge
#

I have an approved bot here

earnest phoenix
#

i’m dumb

quasi forge
#

ok lol

#

I say "lol" too much

#

don't u think?

earnest phoenix
#

i know i do

#

lol

quasi forge
#

xD

earnest phoenix
#

Oh this is development chat fucking kill myself

quasi forge
#

lmao

#

Planning an economy bot is so tiring

toxic oracle
#

Facebook live it @earnest phoenix

earnest phoenix
#

My bot is almost to 100 servers and it is already dead.

#

@toxic oracle ok

#

ripp

#

Actually.

#

It was at 90 servers yesterday.

quasi forge
#

ok

amber token
#

Lel

earnest phoenix
#

Now it is at 94

quasi forge
#

I am a performance freak

#

I keep changing it to improve performance

earnest phoenix
#

With 26k users using the bot.

quasi forge
#

ok

earnest phoenix
#

27k

#

pancake recently hit 80k and wings just hit 10.3k

#

27k now.

quasi forge
#

-bots @earnest phoenix

gilded plankBOT
#
DevinThePancake#5559
Bots <:dblCertifiedDev:401725450470031362>

@elder surge dblCertified
@indigo juniper dblCertified

quasi forge
#

Hey u are Pancake's dev!

earnest phoenix
#

I never knew my bot went up 1k in one hour.

quasi forge
#

I didn't even fucking observe!

earnest phoenix
#

well i don’t dev it anymore but i own it still xD

#

1k users?

#

@earnest phoenix

#

27k

amber token
#

You mostly get members if your bot is famous

earnest phoenix
#

well you said went up 1k

amber token
#

xD

earnest phoenix
#

Yeah.

#

From 26k

#

To 27k

#

you shouldn’t concentrate on members though

amber token
#

Know me?

earnest phoenix
#

it’s not accurate

amber token
#

IKR

earnest phoenix
#

Servers

amber token
#

I dont care my server has less then 10 people

earnest phoenix
#

What should I concentrate on?

#

Servers?

amber token
#

And i have more then 20 bots in it

earnest phoenix
#

just making a good bot 😂 you’ll get servers from that (but yea servers)

#

Well my bots development has become slow.

#

same lol

#

Before it was a team of 3 working on it.

amber token
#

Same

earnest phoenix
#

Me and 2 other of my devs.

#

Now it is just me.

#

i used to code on phone 😂

amber token
#

I had a famous bot with 2000 servers

earnest phoenix
#

I get all my errors when I code on phone.

amber token
#

But due to the new command called >R everybody quited

#

Cause that command did nothing xD

earnest phoenix
#

what did it do

#

What does >R do?

#

Oh ok.

#

oof

#

So why even have it?