#development

1 messages · Page 769 of 1

prime fox
#

ffs

#

explain what hto

glad charm
#

Idk, why it should be unmuted?

prime fox
#

because it responding w/o using prefix

#

anymore

glad charm
#

Did you fix that?

prime fox
#

to only one guy

#

because he was being a dick to me

glad charm
#

That's not okay to do lol.

prime fox
#

then i stopped it

#

then it got muted

glad charm
#

That's still not okay.

stable horizon
#

That's still not OK lol

prime fox
#

The issue has been resolved tho

glad charm
#

You just proved you were acting like a child.

prime fox
#

was that the problem

#

i am

#

kinda a child anyways

#

im only 13

stable horizon
#

Don't act like child = no problems

glad charm
#

Rule 1 lol

stable horizon
#

So?

glad charm
#

Report it then.

stable horizon
#

Doesn't mean do it back

glad charm
#

Two wrongs don't make a right.

prime fox
#

Yeah well one wrong doesn't make a right either. At least two wrongs will make me feel better.

stable horizon
glad charm
#

No one claimed that? Stop acting like a child and just fess up to a mod or something.

prime fox
#

i did

glad charm
#

Then leave it at that.

prime fox
#

@sinful lotus I fixed my bot it doesn't respond without a prefix anymore. (645824637338386433)

sinful lotus
#

done

prime fox
#

thank you

sinful lotus
#

My comments on above discussion is

#

why do you test on production at the first place

stable horizon
#

Why not picardy

#

What could possibly go wrong

sinful lotus
#

have a proper test enviroment

#

even you did stop it, it still flooded #commands and I wont really let that left unoticed

#

so I muted it, so you the developer of the bot would make sure it wont happen again

marble juniper
#

what if it does

prime fox
#

it wont

#

They'll make sure

marble juniper
#
var sonicIcon = client.emojis.find(e => e.id == "667304852422131722").toString()
#

very simple code execpt

#

that it tells me it cannot read toString of null

restive furnace
#

except you are still using var

#

use let or const, var is outdated (on js, cause ur code seems to be js)

#

and why you need to make it to string

#

js automatically makes it string if you add it to string

marble juniper
#

k

tiny tinsel
#

Well.. not really since client.emojis.find will return an emoji object.

glad charm
#

It's called a method.

tiny tinsel
#

Also I'm not sure but e.id is a snowflake id (bigint)

#

Oh wait you're using ==

glad charm
#

So the class itself has a method to conver tit to the emoji id if it's implicit/explicit.

tiny tinsel
#

My bad. Erm.

#

I'm replying to js automatically makes it string if you add it to string

glad charm
#

Yeah

warm marsh
#

"var is outdated" not really, It's just a resource hog and doesn't really care too much for scoping.

tiny tinsel
#

client.emojis.find(e => e.id == "667304852422131722") returns an object.

marble juniper
#

but why is it null

#

the id isn't invalid

#

and the emoji with that id exists

#

and the bot is in that server

warm marsh
#

It might not be cached

#

Use fetch

#

That's if you're using v12.*

marble juniper
#

wait

#

ok kms the bot is not in that server

#

lol

#

that explains a lot

#

sorry

tiny tinsel
#

Var isn't outdated. Of course If you use Node.js I don't see the use to be honest. If you don't wanna use polyfills you can still use var for old browsers support.

#

Unless they updated it. I haven't tried in a while.

marble juniper
#

but doesn't mean you can't use var

#

it is still useable

tiny tinsel
#

What i mean't is.

#

const/let used not to work on IE11 by example.

#

It probably still don't.

marble juniper
#

and nope

#

I still have the same error

#

and the bot is in the server

warm marsh
#

Again, It's probably not cached

#

restart bot if you haven't done so already.

tiny tinsel
#

@marble juniper You are using Discord.js right?

marble juniper
#

yeah

tiny tinsel
#

So according to their docs:

All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you should use the `get` method. See [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) for details.
marble juniper
#

but its the same result for get

#

the same error

tiny tinsel
#

What happen if.

#

var emoji = client.emojis.first();

#

and try to console log it.

#

I mean the actual emoji object.

marble juniper
#

k

#

did work just fine

#

it got logged

tiny tinsel
#

Ok so It definitly can't find the id erm..

#

I will go look their docs I haven't used Discord.js in a while I use C#

#

Did you try to find it by name?

#

Oh wait.

#

What is client? Ain't that the whole Discord client.

#

Shouldn't you check who is sending where on what guild?

#

Through the message object.

warm marsh
#

Discord.js works funny.

#

Everything gets cached into the client so you just grab it from there.

tiny tinsel
#

🤔

#

Honestly don't know what to say.

warm marsh
#

Maybe the ID is incorrect?

tiny tinsel
#

Said It is correct. So I don't know.

warm marsh
#

Yeah but was it double checked? probably not.

tiny tinsel
#

@marble juniper Try to console.log(client.emojis)

warm marsh
#

Possibility that they copied the message id and not the emoji id

tiny tinsel
#

True.

marble juniper
#

thonk

#

I can try copying the ids again and see

tiny tinsel
#

Log the whole emojis array.

#

And check the id through there.

#

Because It gonna be an array of emojis object.

warm marsh
#

client.emojis will return a collection

#

use console.log(client.emojis.toArray());

marble juniper
#

it seems like I copied the message id yep

warm marsh
#

Lmao.

sterile minnow
#

@marble juniper linkus what will u dom

tiny tinsel
#

🤦‍♂️

sterile minnow
#

Doo?*

#

Do?*

tiny tinsel
#

That's like me earlier with my bot.. trying to understand why I kept getting error 403 from Discord.. saying I didn't have enough permissions. I double checked and I was in a channel where my bot couldn't reply in.

#

10/10.

warm marsh
#

User errors, Best errors.

tiny tinsel
#

It is was unclear though "Missing permissions".

#

There is more than just one permission.

warm marsh
#

Should add checks for stuff like that.

tiny tinsel
#

That's what I did at the same time earlier.

errant quarry
#

where can I change my prefix?

uneven wyvern
#

oh dude

#

do u have a command handler?

#

or a config file?

errant quarry
uneven wyvern
#

Do you use a Database?

#

Or else just change the whole Bot Prefix.

#

@errant quarry

lofty hamlet
half laurel
#

soo iam trying to make the progress bar floow the xp and that not realy working


const bar = Math.round(curxp / next); // curxp = the current xp the player has || next = 500/1000 <= 1000 is the next
.addBeveledRect(200, 120, bar, 25, 0)

i think that thing with the math but i have no idia how to fix it because iam sucks with math

#

do anyone know?

earnest phoenix
#

calculate the percentage of progress then create a bar with the width percentage (which is the percentage of progress) of the max width of the bar

#

p=xp/totalxp
w=max width * p

lofty hamlet
#

Don't skip my problem 😦

blissful scaffold
#

I don't know quickDB

slate wave
#

^

lofty hamlet
#

:/

restive furnace
#

wdym by splice

green kestrel
#

to all you developers out there, i have only one thing to say.

#

01010111 00100000 01110111 01011001 00100000 01100111 01111111 00100000 00110011 01110001 01101110

blissful scaffold
#

Ah yes

W wY g 3qn
restive furnace
#

62 55 02 00

#

hex

copper cradle
#

you can't make a meme using hex values

Me, and intellectual:

              #000000
        #000000      #000000
  #000000      #FFFFFF      #000000
sudden geyser
#

translate for me almighty doge ruler

copper cradle
#

black and white

glad charm
#

Would love to have the folder icons all aligned vertically.

slim heart
#

with pm2 is it possible to do pm2 logs [app], only return x amount of lines then completely quit. i know i can do it with certain amount of lines but how can i make it so once it's done it exits because ik it'll just keep going on logs

slender thistle
#

what lib, Panku

glad charm
#

D.js

vital lark
#

@glad charm I would put the folder by the guild name

#

example:
📁 DBL [3 Roles]

glad charm
#

Ooh that looks good.

#

Thanks for the save August 02kiss

#

I would still love to learn how to pad an embed though

vital lark
#

@glad charm pad it by the length of a string

#

with padEnd/padStart

glad charm
#

imagine bothering with that

sinful lotus
#

put the things that would not change in length in front, ex like the folder emoji

#

order it like that so it would look a lot better

uneven wyvern
earnest phoenix
#

idk

uneven wyvern
#

I get Error with the sever Cloudflare and the error code 401

frosty citrus
#

Hello, when my friends are attempting to add my bot to their server they get a "Forbidden" error, is this because the bot is still awaiting approval? Thanks

glad charm
#

No.

frosty citrus
#

thanks for the wealth of information

slender thistle
#

If they're trying to visit the bot page on top.gg, yes

blissful scaffold
#

@frosty citrus the top.gg page for your bot will not work if your bot hasnt been approved
You can give the invite link of the bot to your friends if they want your bot

lofty hamlet
#

Hi , if personn can help me

#

I have my array ["AB", "BC", "JA"] and i want delete BC with .splice and indexOf

green kestrel
#

@glad charm with your folder thing, can you use a unicode character to switch to right-to-left reading mode and back?

#

i think there is such a thing

#

then your first character is across to the right

slender thistle
#

_ _ free space for y'all

green kestrel
#

parks in it

slender thistle
#

bloblul plz

modest maple
#

Lewd

restive furnace
#

@lofty hamlet just get the array and then "array".fucnction()

lofty hamlet
#

@restive furnace ?

late hill
#

In the screenshot with your code

#

database.set(database) was probably not what you meant to do

lofty hamlet
#

var indexdon = db.get(`dresseur_${message.author.id}.Sac`).indexOf("Pingoléon (Normal)"); let newarray = db.get(`dresseur_${message.author.id}.Sac`).splice(indexdon, 1) db.set(`dresseur_${message.author.id}.Sac`, newarray); console.log(db.get(`dresseur_${message.author.id}.Sac`))
In my array .Sac i have 10 items and when i remove "Pingoleon" the array is just `["Pingoleon"] he rest just the indexOf

#

It's full bug

late hill
#

Splice returns whatever you removed/replaced so yes that makes sense

lofty hamlet
#

No quick db is just bug, with array with not quick db he does work

#

But with quick db does not work

late hill
#

It's not

#

This is purely a logic issue

lofty hamlet
#

No but with not quick db he does work

late hill
#

Javascript will execute everything you put on the right side of the = before assigning it to variable you picked

#

which means that your newarray variable is equal to whatever the splice method returns

#

Which as said before

Splice returns whatever you removed/replaced so yes that makes sense

west spoke
#

^

#

That's about any language

lofty hamlet
#

It's strange i say but with array with not wuick db it work, so with quick db how i can remove an item from array ?

west spoke
#

Eg for python you can
var = time.sleep(x)

#

Bad example

#

But you get it

late hill
#

It worked with the array because you did it differently

#

Actually

lofty hamlet
#

No

#

You want example ?

late hill
#

It worked with the array because the array is actually edited

#

Your db isn't until you've used set()

#

And you messed that part up

slender thistle
#

non-async sleep in async code bad

lofty hamlet
#

Uh, so with this i can make splice for remove just one item of array ?

late hill
#

Yes

lofty hamlet
#

How ?

#

But i searsh since 1 hours with test

#

But i do't find solution

late hill
#

I've told you the issue with the current code

#

You just have to change it so that doesn't happen

lofty hamlet
#

But i have not understand :/

late hill
#

You're setting the value

#

To what splice removed

#

That's the issue

#

And I explained why, up above

#

Do you understand that newarray is going to be the result of splice

lofty hamlet
#

MMmh

#

...

late hill
#

well

#

Now think about a way to prevent that from happening

lofty hamlet
#

Google stranslate is fucked

late hill
lofty hamlet
#

...

#

I can't because i have already not understand

#

I can't translate this in my language

#

Or i have just not understand what is the problem

#

Why he does work for array and does not work with quick db

late hill
#

bruh

#
let originalArray = ["a", "b", "c"];
let newArray = originalArray.splice(1, 1);
console.log(newArray) // ["b"] >>>> the result of splice
console.log(originalArray) // ["a", "c"] >>>> the updated array```
#

That's what you did with a regular array

lofty hamlet
#

Yeah

late hill
#

newArray is still not what you intend it to be

lofty hamlet
#

<And it work

late hill
#

but it edits the original so it doesn't matter

#

As explained, that doesn't work with your db

lofty hamlet
#

HUASZUYAZDDZA

#

Uh ok !

#

I have understand i think

late hill
#

because the splice will just edit your in-memory value

#

you have to use set() to update the db

#

and when you do

#

use the updated array

#

instead of what splice returned

lofty hamlet
#

So ...

#

I can do this with quick ?

late hill
#

Yes

#
  1. get the array from your db using it's key
  2. edit the array
  3. use the key again but this time, set it to the updated array
lofty hamlet
#

🤔

#

...

late hill
#

Did you do it

lofty hamlet
#

I can't do it

late hill
#

what did you try

lofty hamlet
#

var indexdon = db.get(`dresseur_${message.author.id}.Sac`).indexOf("Pingoléon (Normal)"); let newarray = db.get(`dresseur_${message.author.id}.Sac`).splice(indexdon, 1) db.set(`dresseur_${message.author.id}.Sac`, newarray);

late hill
#

so you didn't change anything

#

fuck it

#
let arr = db.get(key);
arr.splice(arr.indexOf(removal), 1);
db.set(key, arr);```
#

That's it

slender thistle
#

🥄!

late hill
#

Note how I'm not saving the return value of splice

#

Because it's not used for anything anyway

west spoke
#

I don't know what happened

#

But somewhere in this

#

It's outputting from the anime endpoint

#

No errors

lofty hamlet
#

Thx u dude wesley

west spoke
#

Nevermind

#

I found my problem

#

alright my problem is back

#

so why does it output iy

#

nevermind I'm dumb

#

it was from the init file

lofty hamlet
#

@late hill you know how i can know how many key exist for db.get(`gts_${message.author.id}`)

#

Because i do transform this in quick db : for (let item in GTS) { let text = `**${item}** - Personne : **${db.get(`gts_${message.author.id}.Personne`)[item]}** | Pokemon : **${db.get(`gts_${message.author.id}.Pokemon`)[item]}** | Prix : **${db.get(`gts_${message.author.id}.Prix`)[item]} P$**\n` items.push(text); }

#

The content is already transform but he rest in GTS

late hill
#

You want the amount of keys that an object has?

lofty hamlet
#

The amount of object who start by gts_

late hill
#

oh

#

idk how quikdb works

#

so don't know what you could use for that

lofty hamlet
#

Oh ok :/

surreal wagon
#

I dont understand why nobody use mysql or postgresql

ruby talon
#

@surreal wagon a lot of ppl use PostgreSQL

late hill
#

That

#

And maybe people who use them, actually know how to use them so they don't have to ask questions as frequently

ruby talon
#

Everyone has to learn.

#

¯_(ツ)_/¯

blissful scaffold
ruby talon
#

Teheck is quickdb

#

Never head of that lol

blissful scaffold
#

idk, but google helped me

#

was a 5 second google to find that

ruby talon
#

Thats pretty long.

#

xD

blissful scaffold
#

I had to type quickdb get keys

eager perch
#

This may be a dumb question, but how do I keep my site's navbar in view without it loading again? e.g. when you switch from home to advertise on https://top.gg, the navbar doesn't flicker or something -- it just stays there

modest maple
#

its called all in one site

#

so everything is loaded and part of essentailly one page not several pages of html

eager perch
#

How is a new page loaded? Does it load all at once and then just switch html files? I am confushion

modest maple
#

you dont have seperate html files

#

its essentailly

#

one page

#

and stuff is hidden until a event triggers it's unhiding

earnest phoenix
#

SPA

#

read up on it a bit

#

everything is done on one page

modest maple
#

what happened to ur profile pic cry

earnest phoenix
#

bout to go on a social media detox so i removed it to signal i wont be active for a while

blissful scaffold
#

@modest maple when you click a link there is still a server call to load the new data, but instead of refreshing the entire page it just overwrites the existing page.
Kinda like what you describe but still loading data when it is needed

earnest phoenix
#

well

#

yes and no

#

everything is sent to the client

#

at once

blissful scaffold
#

i hope not, else all the bot info would also send to the client when you open the first page

earnest phoenix
#

what

modest maple
#

what

#

we're talking about all in one websites

#

discord isnt one of them

blissful scaffold
lofty hamlet
#

Hi, how i can know if shard contain server id ?

modest maple
#

bot's pages are seperate

blissful scaffold
#

top.gg is an all in one website, but it still sends data to the client when the client requests it

earnest phoenix
#

yes

#

that yes

#

you were referencing actual pages which incorrect

#

which is*

#

i have dbs today can't spell

blissful scaffold
#

if you open the developer tools with F12 then you see that there is still a lot of data send to the client every time you go to a new page on the top.gg site
For example if you go from Advertise to Add Bot the server will still send the page to the client when you click on that link

sterile minnow
modest maple
#

yes

slender thistle
#

Are you sharding your bot

sterile minnow
#

yeah

modest maple
#

its not total

#

just

#

btw

sterile minnow
#

but what else?

modest maple
#

read le docs

sterile minnow
#

i've js

modest maple
#

ive had a long day

#

xD

sterile minnow
#

xD

#

i have it

#

client.shards lol

modest maple
#

xD

quartz kindle
#

are you on d.js v11 or v12?

sterile minnow
#

11

#

but it works with client.shards

quartz kindle
#

on v11 should be client.shard.count

sterile minnow
#

It works only with client.sharda

#

shards*

quartz kindle
#

are you sure? because client.shards doesnt exist in v11

lofty hamlet
#

Hi, how i can know if shard contain this server id : XXXX ?

quartz kindle
#

and your error said cannot read property 'total' of undefined which implies client.shards is undefined

sterile minnow
quartz kindle
#

that doesnt mean it works lol

#

it just means it doesnt have a syntax error

#

wait until the 600000 interval passes, then you will see if it works or not

sterile minnow
#

the bot posted the things and yea but okay i'll wait

quartz kindle
#

does it have the correct server and shard count in top.gg?

sterile minnow
#

yeah

quartz kindle
#

then it already posted automatically

#

not from postStats

#

doing dbl = new DBL('Your top.gg token', client); already enables the automatic poster

sterile minnow
#

no i tested it before

quartz kindle
#

well idk then, but you're literally doing dbl.postStats(client.guilds.size, undefined)

#

which is probably the same as sending guild size without shard count

sterile minnow
#

wait 10 mins pls

eager perch
#

Thanks y'all! Looking into react-router now :)

lofty hamlet
#

Hi, how i can know if shard contain this server id : XXXX ?

quartz kindle
#

if(client.guilds.has(id))

lofty hamlet
#

@quartz kindle thx

And how this code does not work ??

        let content = ""

        try {
            for (let i = 0; i < 10; i++) {
                let user = bot.users.get(lvl[i].ID.split('_')[1])
                content += `${i + 1}. __${db.get(`dresseur_${user.id}.NomDresseur`)}__ - **${lvl[i].data.Points}**\n`
            }
        } catch (err) {
            console.log(err)
        }
        console.log(content)```
#

TypeError: db.startsWith is not a function

#

I think startWith is remove from my quick db version so how i can make leaderboard like this ?

blissful scaffold
#

sortBy: '.Points'
should that be .Points or Points?

lofty hamlet
#

@blissful scaffold hu ? This is for example : db.get('dresseur_${message.author.id}.Points')

#

I think it's because the startwith is remove

blissful scaffold
lofty hamlet
#

It existed before

#

@blissful scaffold

#

So now how i can make leaderboard like this ?

#

Because startsWith exist after

#

I'm sur

#

Searsh in google

half laurel
#

iam trying to make my progress bar moving with the xp value of the player can anyone help me?
js

modest maple
#

do it off pct off of lvl up

lofty hamlet
modest maple
#

scale like that

half laurel
#

@earnest phoenix i try i didnt understand

earnest phoenix
#

i don't know how else i can simplify it for you

#

if you can't understand percentages, which is maths for 12 year olds, programming maybe isn't for you

half laurel
#

i know what you saying but its not working

earnest phoenix
#

you did it wrong then

blissful scaffold
#

(currentXp/xpPerLevel)*barLength = length of the xp bar in pixels
then you draw that on top of the full bar length

earnest phoenix
#

they already got told that

blissful scaffold
#

sometimes you need to repeat it so it also enters the 2nd eye/ear

lofty hamlet
#

Help me if u can 😉

earnest phoenix
#

<db>.startsWith isn't a function

blissful scaffold
quartz kindle
#

quick.db has bad documentation

earnest phoenix
#

what are you even trying to do?

hoary elm
#

Is it possible with Discord.JS to make it read a file from a GitHub repo?

So for example I have a version command with an open source bot so they can download and host their own copy obviously the open source project is available via my GitHub repo... What I am trying to accomplish is if they are hosting their own version of my bot and run the version check command it will check my GitHub repo for a file (versions.json) or something like this and inside that file will be the bots version (1.0.0 ect) and the bot will compare this to it's Versions.json file if the versions don't match it will send a message telling them to check for updates.

earnest phoenix
#

sure

#

but rather than doing files

#

that can easily be edited and broken

#

just have a const in code

#

You can use node-fetch

#

you can then compare that const to some versioning file in your github repo

hoary elm
#

So like const version = require('PathToRepo)

earnest phoenix
#

no

#

i-

#

how would that even work

#

i was pointing at a const string in your code

modest maple
#

so many issues xD

hoary elm
#

Oh

#

Sorry 🤦🏻‍♂️

#

Misunderstood

earnest phoenix
#

you have a const string that defines the version

hoary elm
#

Yeah

earnest phoenix
#

then you use node-fetch to make a request to the file hosted on github

#

and compare the version strings

west raptor
#

Nodejs can't automatically fetch from github btw, don't even try it because it won't work

earnest phoenix
#

thank you for saying what was said a few messages above

#

@west raptor that's why we suggested node-fetch

hoary elm
#

Yeah sorry misunderstood you the first time

earnest phoenix
#

it's fine

#

dw

west raptor
#

Oh well I'm fucking blind

hoary elm
#

😂😂 it happens

#

Thanks guys I will use your recommendation with node-fetch I was told I could also use the "HTTP" module

#

🤷🏻‍♂️

west raptor
#

"http" module in node is very bare bones

hoary elm
#

Yeah I've heard that's why I asked for another opinion

quartz kindle
#

i use the http module most of the times lol

#

but yeah, there are like 93746593 different http libraries out there

#

all of them based on the http module

hoary elm
#

Yeah the one I was told about is this one

#

The "built in" HTTP Module

#

But I haven't been able to find docs for or examples of it doing what I'm trying to do (if there even are any 🤷🏻‍♂️)

warm marsh
quartz kindle
green kestrel
#

Nodejs can't automatically fetch from github btw, don't even try it because it won't work
Really, there's no git client as an npm module? That's surprising.

earnest phoenix
#

you don't need to bloat your app with a package for everything

hoary elm
#

Thanks again 😁 sorry for the delay in response

sudden inlet
#

Can someone please help me host a bot on my laptop?

tiny tinsel
#

Why host it on your computer when you could use Heroku or Glitch?

ruby talon
#

If you want top host a bot I would reccomend using a VPS or rpi4.

flat pelican
#

A bot isn't made to be hosted on your personal computer

modest maple
#

@flat pelican you say that

earnest phoenix
#

you can

ruby talon
#

^^

#

cry, y would you?

modest maple
#

and self hosting is still better than glitch or heroku

flat pelican
#

You can - but this is just more than bad

modest maple
#

imo

earnest phoenix
#

if you have spare hardware it's really not bad

flat pelican
#

Never said that you can't

tiny tinsel
#

I mean you can host it locally while you develop it (normal)

modest maple
#

what lib?

earnest phoenix
#

i used to selfhost on my old laptop i rarely used

#

everything was fine

ruby talon
#

cry, the price you pay for electricity for the pc will probb be more than buying a VPS.

modest maple
#

well no

earnest phoenix
#

laptop not pc

#

also no

modest maple
#

most laptops use hardly anything

#

and for the specs electricity is cheaper

flat pelican
#

You can use an old computer for it, I mean it's bad to host a bot in a PC that you use everyday

#

for daily stuff

tiny tinsel
#

I love how this started a whole debate. Host it on a Rasperry pi.

ruby talon
#

cry, a laptop is a pc but a pc isn't specificly a laptop.

#

I didn't say desktop m8

earnest phoenix
#

ok

modest maple
#

rPis are quite good

#

power efficent and will host most bots

flat pelican
#

Raspberry if it's a simple bot for a few servers

ruby talon
#

@modest maple agreed.

modest maple
#

i say while using a massive overkill system to host mine

#

xD

ruby talon
#

xD

earnest phoenix
#

the investment into an rpi isn't worth it if you're only going to buy it for a discord bot

modest maple
#

if you have one laying around its great

#

but yh

tiny tinsel
#

Anyways you can host a bot anywhere you want.

#

It is up to everyone I guess.

flat pelican
#

No

#

A bot can be started from anywhere - but you can't keep it online anywhere

tiny tinsel
#

I'm not saying that in that way.

#

I'm saying that you can host it where you want.

modest maple
#

anyway

#

what was the lib

tiny tinsel
#

Could be using Linode, Digital Ocean, Azure.

flat pelican
#

Yes

earnest phoenix
#

azure lul

tiny tinsel
#

1,500$ Azure Server for a bot on 1 server 🧠

flat pelican
#

Contabo for best hosts

earnest phoenix
#

wasted my student credits for having a student account open

flat pelican
#

Cheap and high quality

#

I didn't even use my student credits

#

Their servers are expensive af

tiny tinsel
#

Contabo website ain't eye catchy.

flat pelican
#

Agreed

#

They are aware

unique nimbus
#

A website doesn't need to be eye catchy for the service to be good

#

I use Contabo

#

I have a website hosted

flat pelican
#

But they provide the best quality hosts

unique nimbus
#

my bot

tiny tinsel
#

Never said the service ain't good.

unique nimbus
#

Mail

tiny tinsel
#

I'm saying that their website ain't eye catchy.

unique nimbus
#

yes

blissful scaffold
#

contabo looks interesting

tiny tinsel
#

The price for what they offer is okay.

blissful scaffold
#

it's a lot cheaper than what I pay now

flat pelican
#

They just take activation fees

#

like 15 or 25$

#

the first time

#

should be 15

tiny tinsel
#

4.99$

quartz kindle
#

a person asks how "how to do X" and the whole community starts a discussion whether X is good or bad

#

lmao

modest maple
#

ik

#

we lost the entire first point

#

xD

tiny tinsel
#
CPU: ten cores
Intel® Xeon® E5-2620v3, E5-2630v4 or 4114 processor
60 GB RAM (guaranteed)
1600 GB disk space (100% SSD)
100% SSD disk space

for 29,99 eur.

#

That's good.

#

I might consider switching with them.

modest maple
#

No one by anychance

#

knows

#

how to find the position on a PDF

#

in terms of X and Y positions

#

for alignment

tiny tinsel
#

@modest maple Hmmm I know there is a lib Pdf.js for Javascript.

#

It renders PDF to HTML

#

You could then get positions. I guess.

modest maple
#

i need le X n Y pos to edit stuff

#

which is a pain

#

when there is no easy way to get

tiny tinsel
modest maple
#

im python

#

firstly xD

tiny tinsel
#

Oh that's for Plone.

#

Err.

#

No clue sorry.

modest maple
#

its not a render i need xD

#

i have a reader and writer set up

#

i need like an arrow going x = this and y = this

#

soemone needs to make an app for that

#

😂

green kestrel
#

@earnest phoenix wether or not there's a package for git client is what I was surprised at, if there isn't one that's a bit of a missing module, regardless of if someone decides to bloat out their node_modules 😁

#

I think I have four deps, aegis, mysqlclient, libz and libpcre. If I was going to do git from within my bot id probably just run git commands via the shell.

quartz kindle
#

there probably are multiple lol

sage bluff
#

hello ive posted here before about an issue about votes not getting recieved, seems votes just have a big delay sometimes

#

idrc that much just wanted to report the issue

flat pelican
#

@sage bluff it should be fixed since the last time (a day ago)

sage bluff
#

o cool

#

i only had a minor delay of about 5 mins just now

#

compared to yesterday

#

shouldnt be the same issue

trail axle
#

How do i make an mbed message for my bot?

hoary elm
#

Depends on the language

trail axle
#

js

hoary elm
#

const Discord = require('discord.js')

const embednamehere = new Discord.RichEmbed()

#

Then add title fields ect under that

#

That should help 😁

warm marsh
#

Or you can use an object js const PingEmbed = { title: "Pong!", // ... } <Channel>#send({ embed: PingEmbed });

topaz fjord
#

or like

knotty steeple
#

or just

#

pfft

topaz fjord
#

docs > any guide

knotty steeple
#

just use an embed object

#

😩

topaz fjord
#

embed object is also cool

knotty steeple
#
msg.channel.send({embed: {
color: 0x696969,
description: "nice"
}})```
hoary elm
#

I honestly forgot about that method ^^

knotty steeple
#

i only make my embeds like that

#

works in eris also lmao

grizzled raven
#

it is quicker

hoary elm
#

I like that... Its unique

grizzled raven
#

but like

#

im bad

hoary elm
#

Lol

knotty steeple
#

just look at the docs for the object

#

discord dev docs

#

lmao

hoary elm
#

I'm just so used to using RichEmbeds via the method I did an example of 🤷🏻‍♂️

#

I kinda forgot about the others lol

humble pendant
#

hey is it just me or is discord.js acting up

/root/node_modules/discord.js/src/structures/interfaces/Collector.js:211
          yield queue.shift();
          ^^^^^

SyntaxError: Unexpected strict mode reserved word
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/node_modules/discord.js/src/structures/MessageCollector.js:3:19)
tiny tinsel
#

@humble pendant Are you using strict mode?

#

@humble pendant Also please post a snippet.

#

Oh wait.

#

It comes directly from Discord.js my bad.

humble pendant
#

lol

tiny tinsel
#

That's weird.

humble pendant
#

yes

#

very

#

i had 4 errors before this error

#

lmao

west raptor
#

@humble pendant what version of d.js are you on

#

discordjs/discord.js repo has no current issues for it

sudden geyser
#

it may be their version of node

#

yesno what's your version of node

west raptor
#

Oh very true

molten escarp
#

Does anyone know of a bot that can track certain user's status messages?
Or know anyone that can make this

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

So basically in our discord we offer discounts and rewards for the advertisement link in their status, we would like it for tracking purposes to make sure they fulfill their end of the deal

#

@sage bobcat

humble pendant
#

@sudden geyser would i need to update it? i use v8.5.2 or smth like that

earnest phoenix
#

😳

humble pendant
#

lmao

molten escarp
#

So as my status has the discord link, we would like to add users to a tracking bot that would alert us if they changed their status message so we can determine if the discount/reward should be paid

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

Our discord offers services and we sell things

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

But the status message is just advertising

humble pendant
#

uhh

molten escarp
#

No not a scam at all

sage bobcat
#

One message removed from a suspended account.

molten escarp
#

It's for the game Runescape, we sell gold and services

glad charm
#

OH boy

#

RS3 or OSRS?

molten escarp
#

I don't know why you're inferring it's a scam

#

And osrs

glad charm
#

Time to tell god ash

earnest phoenix
#

indirect ads much

sage bobcat
#

One message removed from a suspended account.

molten escarp
#

Not trying to advertise either

#

:x

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

It's more of discounts rather than rewards

sage bobcat
#

One message removed from a suspended account.

molten escarp
#

Noooo

#

Nothing like that haha

#

We offer nothing of monetary value

#

Just discounts

glad charm
#

@sage bobcat Runescape is an old mmo and gold selling sites have been around forever.

sage bobcat
#

One message removed from a suspended account.

glad charm
#

However are against the games rules

humble pendant
#

oof

molten escarp
#

That is true

#

Will not lie about that

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

No

#

I am asking to get a bot that tracks status messages

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

molten escarp
#

So could creating a bot like this be possible? Or are you saying such as those bots, it is not possible?

glad charm
#

AFAIK there are no libs that can currently see a users custom status.

molten escarp
#

Ah alright

#

Which is probably intentional

glad charm
#

It's just newer is why I assume.

sage bobcat
#

One message removed from a suspended account.

molten escarp
#

Well friends, I appreciate the help so far

glad charm
#

Good luck in your ventures.

molten escarp
#

I just wonder if there's anything else I can do

glad charm
#

Probably find another way to go about advertising.

molten escarp
#

Advertising runescape services is no easy task

glad charm
#

Been playing the game for 14 years, I can kinda guess that.

#

Doesn't help when your game is full of bots either lol.

molten escarp
#

I can 100% agree

#

We may be breaking tos by offering services, but we are not the botting type

sage bobcat
#

One message removed from a suspended account.

glad charm
#

Lmao runescape isn't worth it :))

earnest phoenix
#

AFAIK there are no libs that can currently see a users custom status.
like 70% libs in dapi started supporting custom status the day it was released

#

mainly because it is rp under the hood

glad charm
#

Oh?

#

What libs?

earnest phoenix
glad charm
#

I can't see it on d.js.

earnest phoenix
#

it's on master iirc

glad charm
#

I can't find it on user/GuildMember on master.

#

Am I crazy?

earnest phoenix
#

give me a sec

#

need to check the docs

glad charm
#

Right

earnest phoenix
#

Presence#activities should contain the custom status

glad charm
#

I assumed activities would be Streaming/Playing... etc

blissful scaffold
#
Presence{status='online', activity=Activity{type=4, name='Custom Status', streamingUrl='null', richData=RichActivityBean{start=null, end=null, sessionId='null', applicationId=null, details='null', syncId='null', state='test status', emoji=EmojiResponse{name='blobnomchristmas', id=659077525464547338, animated=false}, instance=null, flags=null, partyId='null', currentPartySize=null, maxPartySize=null, largeImage='null', largeText='null', smallImage='null', smallText='null'} ActivityBean{name='Custom Status', type=4, url='null'}}}

This is the raw data that gets returned from the library that I use

#

It includes the custom status message and emoji

glad charm
#

Think someone earlier said it just returns Custom Status I'll have to test it in a minute

humble pendant
#

heyo if anyone could help me with this error, it would be highly greatful!

(node:4795) UnhandledPromiseRejectionWarning: MongoTimeoutError: Server selection timed out after 30000 ms
    at Timeout.setTimeout [as _onTimeout] (/root/node_modules/mongodb/lib/core/sdam/server_selection.js:309:9)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:4795) 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:4795) [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.
blissful scaffold
#

Looks like your mongo database did not respond within 30 seconds

humble pendant
#

yes

#

what would i do?

west raptor
#

I can't do much research but it seems to me it's incorrectly setup

#

Has this issue happened before?

humble pendant
#

no never

west raptor
#

Hmm weird, I have limited knowledge of mongo but you might wanna verify mongo is actually running?

humble pendant
#

``

#
sudo systemctl start mongod 
#

?

vital lark
#

check it with sudo systemctl status mongod

#

it should say active (running) if it's running

humble pendant
#
● mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-01-17 02:55:28 UTC; 22min ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 4732 (mongod)
   CGroup: /system.slice/mongod.service
           └─4732 /usr/bin/mongod --config /etc/mongod.conf

Jan 17 02:55:28 yesno1 systemd[1]: Started MongoDB Database Server.
vital lark
humble pendant
#

it's runnin

#

lmao

west raptor
#

Yeah idk then

humble pendant
#
/root/node_modules/mongodb/lib/core/sdam/server_selection.js:39
x  if (readPreference.maxStalenessSeconds == null || readPreference.maxStalenessSeconds < 0) {
   ^^

SyntaxError: Unexpected token if
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/root/node_modules/mongodb/lib/core/sdam/topology.js:32:25)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
#

aw great now what

vital lark
#

it could be it can't connect to the instance or you have your connection string wrong

west raptor
#

x

humble pendant
#

/root/node_modules/mongodb/lib/core/sdam/server_selection.js:39

blissful scaffold
#

there is an x in front of your if?

vital lark
#

@humble pendant what version of the library you're using

#

I never gotten that error on v3.4.1

humble pendant
#

woops that was my bad

#

i accidentally put the x

#

xD

#

oh i'm using v4.2.2?

vital lark
#

that's the mongo server version

#

I'm talking about the NPM library version in your package.json

humble pendant
#

OHH

#

xD

#

do you just want all the dependencies

west raptor
#

no they want mongodb version

humble pendant
#

oh well

"mongodb": "^3.4.1",
vital lark
#

weird

#

I use the same version and never gotten that error goose_thonk

humble pendant
#

lol

vital lark
#

only thing that can make sense that the library can't connect to your instance

humble pendant
#

hold on gimme a second

blissful scaffold
#

I think the ^ means 3.4.1 or higher
Maybe you got a newer version that breaks stuff?

humble pendant
blissful scaffold
#

Did you try turning it off and on again?

vital lark
#

^ means NPM will update the version when installing dependencies

humble pendant
#

welp

#

it keeps timing out

blissful scaffold
#

Did it work earlier? What did you change since the last time it worked?

sudden geyser
#

well, why is x really just sitting there

blissful scaffold
#

I think yesno already removed the x

humble pendant
#

yes i did

#

it was a accident xD

blissful scaffold
humble pendant
#

yep

#

soo any solution?

blissful scaffold
#

What did you change before it broke?

humble pendant
#

nothing really

unkempt ivy
#

Is it possible for bots to use external emotes?

#

MEE6 does

#

if so how do I get that

stable horizon
#

Bots have bot nitro

#

IE they can use emotes from any server they're in

unkempt ivy
#

Ah

#

they all have that automatically?

#

Or do you have to pay

#

time to selfbotum for free nitro

stable horizon
#

Auto

blissful scaffold
#

selfbotums are no real botums and don't have that
It is also a bannable offence

#

Only real bots with the bot tag can use all the emotes from the servers they are in

humble pendant
#

do \:emotename: for the emote info

unkempt ivy
restive furnace
#
  • warning: wont work on mobile
earnest phoenix
#

Is it possible to play a file from a link? I am using discord.js

restive furnace
#

Yes.

earnest phoenix
#

how?

blissful scaffold
#

You can add a file or url to an embed

earnest phoenix
#

im trying to play the file in a voiceconnection

fleet chasm
#

you have node-fetch installed correct?

earnest phoenix
#

yes

blissful scaffold
#

ah, cant help with any details about that, but you can play files in a voice channel

fleet chasm
#

you can try with play stream and stuff

#

discord.js has one

earnest phoenix
#

playStream and playFile?

fleet chasm
#

yeah

earnest phoenix
#

ok i will try it

restive furnace
#

except on master those doesnt exists, its just play on master

fleet chasm
#

tickYes _

sick cloud
#

i'm probably being an idiot but er

import * as express from 'express';
import port from './variables.js'

const server = express();

server.listen(port, console.log('Listening on port', port));
               ^

TypeError: express is not a function```
humble pendant
#

typescript?

glad charm
#

using import probably

vital lark
#

hm

sick cloud
#

just ES

#

not typescript

vital lark
#

u sure you're using the flag

glad charm
#

Imagine

#

he prob didn't install it

vital lark
#

I mean

#

node 13 is all about ES, node 12 needs a flag

glad charm
#

yarn add express

sick cloud
#

oh ok so apparently express is a commonjs module

glad charm
#

si

vital lark
#

oh

sick cloud
#

so i have to do import express from express

vital lark
#

ye

sick cloud
#

ok import express from 'express'; works fine

#

cool

vital lark
#

* as => default export

glad charm
#

yeah

earnest phoenix
#

Lennart#1406 bot

blissful scaffold
#

Lennart#1406selfbot

valid frigate
#

anyone got good resources on learning about pointers in c++

#

ive relied one resource so far but i feel like more would help since yknow

#

also most are paywalled

glad charm
#

Learning how to make a binary tree with nodes is a good way to get familiar with C++ pointers.

#

Or making a linked list.

valid frigate
#

i read about that yeah

#

god it's so mind numbing

glad charm
#

What is?

valid frigate
#

the general topic

glad charm
#

It's a little weird starting off but it's not bad.

valid frigate
#

afaik it's the actual low level part of c++ given that a lot of it seems high level

#

i guess practice makes perfect pepeded

glad charm
#

Do you know what a Binary tree is?

valid frigate
#

sort of, but i haven't gone in depth yet

#

i can do the research on my own though don't worry

glad charm
#

I'd say that'd be a good way to start and learn

valid frigate
#

yeah thanks

glad charm
#

That's how I teach my students at least

valid frigate
glad charm
#

we teach C++ here yay

valid frigate
#

aight

#

thanks again mate

glad charm
#

np

earnest phoenix
#

How do I download an audio file from a link? I tried using node-fetch but discord.js outputs “this.inputMedia.pipe” is not a function.

#

I also tried js-file-downloader and it also doesn’t work

quartz kindle
#

whats your code?

#

you should download it as buffer/binary and write to disk like that

#

you can also download it as a stream

#

but if you want to stream the file directly to discord, without writing to disk, thats another thing entirely

earnest phoenix
#

I want to stream the file directly to Discord without saving it

#
let tts2 = await googleTTS(`Congratulations, ${user.username}! Your ${stats.beys[stats.main].name} has levelled up!`, "en", 1);
        let file2 = fetch(tts2);
    console.log(tts2);
        connection.playStream(file2);
``` this is my code
#

Ok I somehow fixed it by playing the link directly

#

Thanks anyway

copper cradle
#

em

marble juniper
#

So you basically want to fetch a google tts into a file and then stream it into a voice channel

#

amiright

#

like making it a file but not saving It anywhere on the disk

earnest phoenix
#

I already solved it @marble juniper

#

just playStream the link

marble juniper
#

k

earnest phoenix
#

Ok so how do I make a voiceConnection listens to the “speaking” event until the connection is destroyed? I tried using .on(“speaking”) but it only fires it once.

quartz kindle
#

it shouldnt be firing only once, it should fire everytime a user starts/stops speaking

#

but if the user starts talking and doesnt stop, then it will not fire until the user stops

earnest phoenix
#

@quartz kindle but it only fires once for me. I am doing it in a command handler, does that have anything to do with it?

pure gust
#

hey peoople

#

i have a bot embed that list players

#

but how could i change the format of it so there is 3 names on one line, then moves to the next line and so on

earnest phoenix
#

add \n after 3 players?

pure gust
#

how can i write that in js?

#

because my code

#

literally just lists the players as a whole

earnest phoenix
#

Is it a string?

pure gust
earnest phoenix
#

split it to an array

#

and use the for loop to add a \n at the end of 3 players

#

\n works like "player1, player2, player3\nplayer4, player5"

summer torrent
#

join("\n")

earnest phoenix
#

won’t that make one player one line?

pure gust
#

its okay, everyone wants it the way it looks rn

#

so i dont need to care about the thing i wanted

vagrant stream
#

I use https://github.com/MarkisDev/discordoauth
Error:

Notice: Undefined index: id in /var/www/u0917781/data/www/help.avenger-bot/index.php on line 24

how to fix it?
I have already logged in to the site via Discord

earnest phoenix
#
const Discord = require("discord.js");
const fetch = require("node-fetch");
const googleTTS = require("google-tts-api");

async function listen(connection, db){
  connection.on("speaking", async (user,speaking) => {
    let stats = await db.collection("users").findOne({_id: user.id});
    if(speaking === true && stats !== null){
      console.log("ok");
      let xpAdd = Math.floor(Math.random() * 7) + 8;
      let xpAdd2 = Math.floor(Math.random() * 7) + 8;
      let main = stats.beys[stats.main];
      let nxtLvl = stats.level * 300;
      let nxtLvl2 = main.level * 300;
      stats.beys[stats.main].xp = stats.beys[stats.main].xp + xpAdd2;
      db.collection("users").updateOne({_id: user.id}, {$set: {xp: stats.xp + xpAdd, beys: stats.beys}});
      if (nxtLvl2 <= main.xp && main.level < 100) {
        stats.beys[stats.main].level = main.level + 1;
        db.collection("users").updateOne({_id: user.id}, {$set: {beys: stats.beys}});
        let tts2 = await googleTTS(`Congratulations, ${user.username}! Your ${stats.beys[stats.main].name} has levelled up to Level ${main.level+1}!`, "en", 1);
        let file2 = fetch(tts2);
        connection.playStream(tts2);
      }
      if(nxtLvl <= stats.xp){
        db.collection("users").updateOne({_id: user.id}, {$set: {level: stats.level + 1}});
        let tts = await googleTTS(`Congratulations, ${user.username}! You've levelled up to Level ${stats.level + 1}!`, "en", 1);
        let file = fetch(tts);
        connection.playStream(tts);
      }
    }
});
}
                

module.exports.run = async (client, message, args, prefix, player, db) => {
  let vc = message.member.voiceChannel;
  let connection;
  if(vc) connection = await vc.join(); else return message.reply("please join a voice channel first.");
  listen(connection, db);
}
``` little help here? The bot only listens to the event once
pure gust
#

any idea how to make a bot type server emojis

summer torrent
pure gust
#

whats the id?

#

oh

#

right

grizzled raven
#

all discord ids have a length of 18, right?

#

i take that as a yes

blissful scaffold
#

Discord ids are based on the time when the id is created

west raptor
#

17 and 18 iirc

blissful scaffold
#

They might have been shorter in the past

grizzled raven
#

how is it based off of the time?

blissful scaffold
#

I think I have seen old accounts where the id is 17 long

earnest phoenix
#

dont judge by length

#

thats what she said

modest maple
#

XD

blissful scaffold
#

You can get the user creation date from the user id

cerulean salmon
#

how to create an interactive command ?
GWaobloChildPepeSweat

earnest phoenix
#

interactive what

restive furnace
#

bruh, google...

blissful scaffold
#

Isn't every command that makes the bot send a response interactive?

earnest phoenix
#

Yes

neat vapor
#

Is it possible to make a bot using C/C++? If yes, I can't seem to find a guide in the pins here. I have at least 3 years experience with java.

green kestrel
#

yes it is.

#

my bot is written in C++

#

use a library like aegis.cpp @neat vapor

#

there are a few gotchas to writing a bot in C++, its not the most user friendly of environments. but if you prefer C++ as a language i'd say its worth it

glad charm
neat vapor
#

I want to try something new here and I will be using C++ in my next year in software dev and I just want a self project to get myself into C++.

green kestrel
#

@glad charm i'd avoid sleepy discord. it doesnt cache anything and its rate limiting is broken

mossy vine
#

i challenge anyone to write a fully functional discord bot in C

glad charm
#

C lol

green kestrel
#

so it causes a whole load of needless REST calls and can get you in trouble

glad charm
#

I might check out aegis, I assume they're done with the lib now

green kestrel
#

i originally wrote my bot using sleepy_discord, changed over to aegis

glad charm
#

Right

green kestrel
#

@glad charm aegis is still under active development, theyre about to gut out the promises implementation and replace it with more stable callbacks

#

ive uncovered a few issues as i have the biggest bot using the lib atm, so im kind of the pioneer

glad charm
#

I might try it out then. I remember a year ago the dude was still deving it.

neat vapor
#

I am aware my question will be asking for opinions but I will ask. What language should I write my first discord bot?

glad charm
#

I'm mainly a C++ dude myself so it'll be fun

green kestrel
#

hmm. whatever language youre most comfortable in

glad charm
#

JS / Python are gonna be the easiest ones.

green kestrel
#

ive rewritten my bot several times. first i tried perl. the library support was atrocious. that lasted a day. then i did php, the library support was again broken and dead... this wasnt using restcord.

neat vapor
#

I am comfortable with Java, learning a bit of Javascript and that's it.

green kestrel
#

then i went from there to sleepy_discord and there to aegis

#

there are some quite mature java libraries for discord

neat vapor
#

C and C++ are new to me and are something that I will need to know.

blissful scaffold
#

I'm a Java dev, so my bot is written in Java.
Most bots here are JS or Python.
But you should make it in the language you prefer

glad charm
#

If you're new to C++ I don't recommend it.

green kestrel
#

yeah, im not new to C++ thats why i chose to make my bot in it. ive written ircds and all sorts.

glad charm
#

You'll have to learn C++ and getting libs to work together, Cmake files probably and classes/pointers/ etc all on top of each other.

green kestrel
#

worse than that youll have to learn proper C++14/C++17, maybe some C++20

#

and not just the "C with objects" that college teaches you

glad charm
#

Just throw lambda'sm everywhere

green kestrel
#

lol

glad charm
#

Yeah college really only teaches C with objects.

neat vapor
#

Yikes,thank you for the help. I will work on a bot using java then. Will ask if I am struggling with anything or have questions on the guides pinned here.

#

Is there any difference in using X coding language or can they still carry out the same function without any difference?

#

Example, Python being quicker than Java.

glad charm
#

Some libs might not have the same methods and such

#

I'm not too sure

blissful scaffold
#

Most libs can do the same things, but some do it a different way

glad charm
#

^

neat vapor
#

libs == library(s)?

mossy vine
#

yes

blissful scaffold
#

There are even big differences between the different Java libs

neat vapor
#

Is it something I will find out or should know before jumping in?

blissful scaffold
#

I use discord4j, it is based around reactive code and promises.
There are also a few jda devs here and I think that library doesn't use reactive stuff.

#

But I have not looked closely at other libs besides discord4j

neat vapor
#

I want my bot to have emote reactions and to display X information about a game.

#

Like assigning roles for example.

blissful scaffold
#

Pretty much every library can do that

neat vapor
#

Oh that's good.

blissful scaffold
sudden geyser
#

php just sitting there with all reds

blissful scaffold
#

Php just being php

tiny tinsel
#

So you can't do anything with RestCord?

neat vapor
#

Thanks again for the help.

sudden geyser
#

you probably can, it just says there's no websocket support

blissful scaffold
#

Keep in mind that that list is almost 2 years old

tiny tinsel
#

Ohhh ws comparasation.

#

I though It had just nothing to do with it.

golden condor
#

Is / a banned prefix for this server?