#development

1 messages ยท Page 643 of 1

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

Idk i'm tired dv

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

and i have never used mongoose

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Idk how mongoose work

#

I'm using only sql

mint sinew
#

hey guys im having an issue with my senpai bot
she wont play most music anymore. is there a fix
?
[ERROR] Something broke when playing the track.
Song was skipped due error.

mossy vine
#

@sage bobcat you arent putting the result of findOne into a variable. you are checking for !<Model | Collection> which would evaluate to something weird anyways, therefore going past the if statement

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

put the results of findOne into a variable and deal with it in the if statement..

mint sinew
#

that happens with most songs when i try to play a song

#

what should i do

#

is there an update i dont know about?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

you still arent putting it in a variable..

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

@mint sinew wrong server

mint sinew
#

ah i was told to come here from general

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

do you not understand variables in javascript

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

this isnt even relevant to discord.js wtf

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

no offense but you kinda are being that, yeah

opaque eagle
#

Pls dont shitpost here @sage bobcat

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

opaque eagle
#

no trolling either

earnest phoenix
#

@mint sinew Look the topic of the channel

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

opaque eagle
#

ur trolling rn

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

@mint sinew go to the owner of the repo with the issue, we usually dont offer support for opensource selfhostable bots

mint sinew
#

ok

mossy vine
#

i think they have a problem with a public bot but ok

earnest phoenix
#

Keep this channel on topic dont start a drama for nothing

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

nah senpai is a selfhostable bot

#

otherwise they wouldn't be getting error logs

#

Maybe his bot is called senpaibot

#

doubt it

mossy vine
#

or it sends as a message in channel

west spoke
#
class URLConnectionReader {

    public static String main(String[] args) throws MalformedURLException, IOException {

        URL url = new URL("test-url");
        BufferedReader in = new BufferedReader(
                new InputStreamReader(
                        url.openStream()));

        String inputLine;

        if ((inputLine = in.readLine()) != null)
            return inputLine;

        in.close();
    }
}
#

Im not getting any errors, but how would I return the text from it to another class

#

ive been working at this for at least a day.

sage bobcat
#

One message removed from a suspended account.

topaz fjord
#

?

opaque eagle
#

Is that Sequelize? @sage bobcat

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

opaque eagle
#

Oh idk then

sage bobcat
#

One message removed from a suspended account.

opaque eagle
#

cool

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

west spoke
#

i guess pong me when you can help cri

sage bobcat
#

One message removed from a suspended account.

opaque eagle
#

What's the error?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

outer niche
#

What do I need to do

slender thistle
earnest phoenix
#

not run bots on phone

opaque eagle
#

What dependencies do u need to have installed to run node-canvas on an alpine docker image?

west spoke
#

@outer niche oh god

#

I know that app.

If you dont know how to use pip on it dont even bother m8

outer niche
#

ATM I'm switching everything over to my computer

stray garnet
#

@outer niche PythonThonk

outer niche
#

yes

late hill
#

@sage bobcat because Model.findOne() is async

#

You'll have to await it

#

Or use .then

unique nimbus
#

@outer niche pip install discord.py in command prompt

late hill
#

You already set the function to async

#

So I'd recommend just adding await

#

Which was probably what you meant to do but you just forgot

#

๐Ÿ‘€

outer niche
slender thistle
#

Outside of your python interpreter

west spoke
#

@outer niche

#

WIN+r

#

Enter cmd

#

Then type pip install discord

#

And do I see roblox

outer niche
#

yes

west spoke
#

how old are you

earnest phoenix
#

inb4false age over 18

west spoke
#

^

outer niche
#

atm i do not play

#

I just developed four friends

hidden ginkgo
#

that's impressive

#

what kind of machine learning do you use? mmLol

west spoke
#

^

sage bobcat
#

One message removed from a suspended account.

warm marsh
#

Then fix them.

#

It tells you what you need to fix.

slender thistle
#

Is pm2 a good replacement for systemd

late hill
#

show the schema then

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

warm marsh
#

Can you use ```js ```

#

or ts

#

depending on what you're using.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

grim aspen
#

definetely d.js

sage bobcat
#

One message removed from a suspended account.

grim aspen
#

2nd line second block of code

warm marsh
#

I know it's d.js I am asking if you could use code blocks correctly. It's easier to read when it's highlighted correctly.

earnest phoenix
#

it's easier to read when it's posted @ hastebin instead of cluttering the chat ๐Ÿ™ƒ

warm marsh
#

Fair.

#

But what's even the issue?

#

Looks like a lot of stolen code to me.

split hazel
#

99% of the time copy/pasting code you don't understand won't work

warm marsh
#

It's also the reason you may miss a lot of things or get a lot of errors.

somber verge
#

when i don't understand a function's description in the api reference, i look at it's code

#

that's a skill i have

warm marsh
#

Reading?

somber verge
#

understanding code

warm marsh
#

Everyone has that ability. Just some choose to ignore it.

somber verge
#

you know, sometimes just reading the code isn't enough

#

you have to think like the compiler/interpreter

#

then you'd know exactly what the function does

warm marsh
#

You'd also know what it does if you read the code correctly and knew how to code.

#

Just saying.

somber verge
#

i know how to code

warm marsh
#

I never said you didn't.

somber verge
#

yeah but it's not easy to read code and know what it does without further analisys

late hill
#

Yes

earnest phoenix
#

everyone can understand the code they're reading if they know the language (which like 50% bot devs here dont) => which is why there's a lot of copypasting and not understanding what it does - they never interacted with the language before, they saw it for the first time when they clicked on the first result of google when searching "how 2 mak discord bat plz??!???"

late hill
#

@sage bobcat It's just syntax errors

somber verge
#

it was great the tut i read was in js

late hill
#

If you're using an ide you should see them underlined? ๐Ÿ‘€

somber verge
#

cuz i already knew js then

late hill
#

like

somber verge
#

i barely knew it, but enough to make a functional bot

late hill
warm marsh
#

Oooh, What IDE?

late hill
#

intellij on top

somber verge
#

i thought it was vsc actually

#

wait wtf is "let"

warm marsh
#

oh my.

somber verge
#

i've never seen "let" in js before

late hill
#

Yeh

warm marsh
#

"let" is a scoped variable.

late hill
#

Because code you see on stackoverflow has old sad code

warm marsh
#

unlike var and const.

late hill
#

with var

somber verge
#

i'll look this up

late hill
#

const is also block scope

#

lol

warm marsh
#

Yes.

sage bobcat
#

One message removed from a suspended account.

late hill
#

๐Ÿ‘

sage bobcat
#

One message removed from a suspended account.

warm marsh
#

wtf

late hill
#

That's still

#

..

sage bobcat
#

One message removed from a suspended account.

warm marsh
#

Doesn't mean its fixed.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

warm marsh
#

More broken by the looks of it.

#
let, gold, toadd = Math.ceil(Math.random() * 50), gold, findOne
#

One line and there is loads of problems.

spice nymph
late hill
#

You probably ended the statement on the previous line

warm marsh
#

You put a semi colon line above?

late hill
#

^

spice nymph
#

I will see

warm marsh
#

It's so mad, A load of people code with their phones.

split hazel
#
  • glitch
late hill
#

๐Ÿคท

molten yarrow
#

Hellou need a bit of Help :)

how can i change embed Description to the Item from the Object for every page

let items = ['5321', '6546', '1', '5416', '51613', '8974', '7456', '9546', '5611']

        let pages = items.length;
        let page = 1;

        
        var embed = new Discord.RichEmbed()

            .setColor(0xffffff)

        for (let i=0; i<pages; i++){
            // console.log(items[i])
            embed.setDescription(items[i])
            embed.setFooter(`Page ${page} of ${pages}`)
                        
        }

console.log gives this out: 5321
6546
1
5416
51613
8974
7456
9546
5611

prime cliff
#

So?

split hazel
#

Well you're telling your code to log the array in a for loop

late hill
#

Are you making a reaction pages thing?

molten yarrow
#

yes

late hill
#

right

#

Do you already have the code for it

#

Like

#

Does it do anything at all when you react

molten yarrow
#

yes pages works fine

late hill
#

ok

molten yarrow
#

need only help with Description and loop

late hill
#

Then it's just items[page] ?

spice nymph
#

Someone use glitch ?

warm marsh
#

items[page-1]

#

What's the issue Sakura?

split hazel
#

I usually only use glitch for testing my html websites

#

That's its main purpose after all

molten yarrow
#

works perfect. thank you โค

limpid raptor
#

Hi, I need help

#

I use event messageReactionAdd but it doesn't work, I read on stackoverflow that it works only for cached messages. Anybody know how to use that ?

somber verge
#

lib?

earnest phoenix
#

messageReactionAdd for what?

#

its js qeaML

somber verge
#

ok i wont help

#

js 2 hard 4 me

limpid raptor
#

discord.js sorry

somber verge
#

i only know how to d.py

limpid raptor
#

To check if reaction has been added '-'

#

Ow

#

'-'

earnest phoenix
#

for a reaction collector?

#

or for other thing

limpid raptor
#

No, an event

#

the event messageReactionAdd

earnest phoenix
#

ohh

#

Wait

limpid raptor
#

Okay ^^

earnest phoenix
#

```client.on('messageReactionAdd', (reaction, user) => { console.log(${user.username} reacted with "${reaction.emoji.name}".); });

client.on('messageReactionRemove', (reaction, user) => { console.log(${user.username} removed their "${reaction.emoji.name}" reaction.); });```

limpid raptor
#

I tried to use : js bot.on("messageReactionAdd", function (reaction, user) { console.log("Reaction added") }) but it doesn't work

earnest phoenix
#

taken from djs guide

limpid raptor
#

Okay i will try

#

discord js guide ?

earnest phoenix
limpid raptor
#

Thanks

#

I will try

#

No

#

Nothing in the console

#

It's what I was saying

spice nymph
#

Why itโ€™s not fonctionnal ๐Ÿ˜ฎ

limpid raptor
#

show your code entirely

spice nymph
#

@limpid raptor > dm

limpid raptor
#

Okay

frail ocean
#

@spice nymph If it isn't fixed already, send your code here. The error will be on the setFooter line (most likely you did ; afterwards)

limpid raptor
#

Just..

#

i never never never used ; and everything is okay '-'

frail ocean
#

Can I see the whole code please

earnest phoenix
#

; no needed in js

#

but the code look better with

#

So add ;

sick vine
#

So my therapy bot is supposed to DM me to remind me about my meds because I forget sometimes. Is there a cron command to make him DM me at 10am and 10pm only? The bot is in Javascript/

#

Would I just do like, 0 10,22 * * * ?

earnest phoenix
#

What

sick vine
#

Have you not heard of cron commands?

earnest phoenix
#

Use unix timestamp

sick vine
#

It's a means of scheduling.

frail ocean
#

@earnest phoenix From how it looks, it seems that after the setFooter there is a ; meaning that it thinks setDescription isn't in the richembed.

earnest phoenix
#

Ah yup just in richembed

sick vine
#

That makes little sense to me but ok, I suppose...

#

Thank you

heavy timber
#

Whatโ€™s the text thatโ€™s needed to put in for an eval Command, so that I can view the list of servers, with names that the bot is in?.

somber verge
#

i just for loop through client.guilds, appending guild.name to a list and then return that string once done

earnest phoenix
#

console.log(mapped)```
#

in djs

somber verge
heavy timber
#

Cheers.

frail ocean
#

@spice nymph (From DM'ed code) I removed the ; like I said, it is now fine

spice nymph
#

Hoooo ty

earnest phoenix
#

this bad boy can fit so many loops

#

did you say loops brother?

spice nymph
slender thistle
frail ocean
#

^

#

For example: DBL

#

It appears you forgot the ) after the URL.

spice nymph
#

No I donโ€™t

earnest phoenix
#

you did lol

slender thistle
frail ocean
#

Mhm

spice nymph
#

I donโ€™t know why itโ€™s showing this

frail ocean
#

You clearly forgot the ) after the url.

spice nymph
#

I have that in my code ;

#

  .setTimestamp()
   .setFooter('Created by ๐‘บ๐’‚๐’Œ๐’–๐’“๐’‚.#0113', 'https://i.imgur.com/wSTFkRM.png')
   .setDescription('[text](https://url.com/');
    message.channel.send(exampleEmbed).then(m => m.react(emoji))
console.log()
earnest phoenix
#

do you

frail ocean
#

Show the line of code its on then

earnest phoenix
#

you dont

#

lol

frail ocean
#

You don;t.

earnest phoenix
#

you have a ); which indicates the end of a method

spice nymph
#

What ?

frail ocean
earnest phoenix
#

but not in the string itself

frail ocean
#

('[text](https://url.com/)');

spice nymph
#

Hooooo

frail ocean
#

Check your work for simple errors please, (forgetting ) etc)

rugged kelp
#

And this is error

spice nymph
#

My description is not like I want ๐Ÿ˜‚ see

late hill
#

don't rainbow role

frail ocean
#

Thats since you have it above the fields.

earnest phoenix
#

you have it in the description, the screenshot you posted has it in a field value

frail ocean
#

Mhm

spice nymph
#

setDescription is after the field

#

@frail ocean

earnest phoenix
#

it doesn't matter

frail ocean
#

It's in the order of how it works

#

Title > Description > Fields > Footer

earnest phoenix
#

^

late hill
#

@rugged kelp the issue is that the code your showing isn't the code you were running

#

But still

#

Don't rainbow role

spice nymph
#

I want my description after FooterText

earnest phoenix
#

you can't

frail ocean
#

You can't.

earnest phoenix
#

we told you already, put it in the field value

#

the image above shows how discord renders the embed order

spice nymph
frail ocean
#

field value. 3rd time now.

#

Put it in the bottom of a field value.

spice nymph
#

๐Ÿค”

#

@frail ocean I donโ€™t understand ๐Ÿ˜ญ

frail ocean
#

To get it at the bottom, you need to put it in a addField, which would go at the bottom

spice nymph
#

Can you give me an exemple ?

frail ocean
#

I don't need to

#

you have addFields?

earnest phoenix
#

there's literally a doc link above on how to use it

frail ocean
#

At the bottom just do .addField("Links",put you links bit here)

#

Mhm

spice nymph
#

Ho okay , ty

frail ocean
#

By how you did it before, and adding | in between.

spice nymph
#

Its hard for me to understand you

#

I am French

earnest phoenix
#

and im croatian, but here we are

#

most people here are natively not speaking english lol

lusty palm
#

Hwo to change bot status

west spoke
#

Lang?

#

@lusty palm

frail ocean
#

]]moreinfo

covert turtleBOT
#

Please provide as much information as possible to get the most efficient assistance as soon as possible; state the library, language, the specific part of the code in question, and what you are trying to do and/or what you think may be causing the error.

west spoke
#

^

#

@frail ocean tbh I was just gonna Google it and send here mmlol

frail ocean
#

Haha I already have that link.

west spoke
frail ocean
#

Otherwise, we need to know the other language

earnest phoenix
#

could've just lmgtfy

limpid raptor
#

Rehello

#

Can someone help me to use messageReactionAdd in Discord.JS ? I wanna use the event even if the message was posted before the bot reload

frail ocean
west spoke
#

You would need to store the ID in some sort of database I believe

#

Or at least that's what I ro

#

do

frail ocean
#

^

limpid raptor
#

๐Ÿค”

frail ocean
#

That link seems to not be working

limpid raptor
#

I look the link

#

oh

frail ocean
#

Is the working link

limpid raptor
#

Yeah, it uses raw

#

And when i saw a code with raw...

#

Let me a second

#
client.on('raw', packet => {
    // We don't want this to run on unrelated packets
    if (!['MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE'].includes(packet.t)) return;
    // Grab the channel to check the message from
    const channel = client.channels.get(packet.d.channel_id);
    // There's no need to emit if the message is cached, because the event will fire anyway for that
    if (channel.messages.has(packet.d.message_id)) return;
    // Since we have confirmed the message is not cached, let's fetch it
    channel.fetchMessage(packet.d.message_id).then(message => {
        // Emojis can have identifiers of name:id format, so we have to account for that case as well
        const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
        // This gives us the reaction we need to emit the event properly, in top of the message object
        const reaction = message.reactions.get(emoji);
        // Adds the currently reacting user to the reaction's users collection.
        if (reaction) reaction.users.set(packet.d.user_id, client.users.get(packet.d.user_id));
        // Check which type of event it is before emitting
        if (packet.t === 'MESSAGE_REACTION_ADD') {
            client.emit('messageReactionAdd', reaction, client.users.get(packet.d.user_id));
        }
        if (packet.t === 'MESSAGE_REACTION_REMOVE') {
            client.emit('messageReactionRemove', reaction, client.users.get(packet.d.user_id));
        }
    });
});```
#

I FOUND IT !

#

And I died.

#

oh

#

oh

#

oh guys

#

IT WORKINGGGG

frail ocean
#

๐Ÿ˜ƒ

#

Enjoy it

limpid raptor
#

Thanks ๐Ÿ˜

frail ocean
#

No problem, make sure to come back if you have further issues.

limpid raptor
#

Yes, i have an other issue '-'

frail ocean
#

@limpid raptor Go ahead?

limpid raptor
#

i try everythiiing but i can't add a role to the user who react

frail ocean
#

Code? Error?

#

Still Discord.JS?

limpid raptor
#

Yeah still discord.js

#

The error is everything xD

devout flicker
#

then rm -rf project

frail ocean
#

]]moreinfo

covert turtleBOT
#

Please provide as much information as possible to get the most efficient assistance as soon as possible; state the library, language, the specific part of the code in question, and what you are trying to do and/or what you think may be causing the error.

frail ocean
#

We need your current code etc

devout flicker
#

snippet

#

not all

limpid raptor
#
if(reaction.emoji.name === "๐Ÿ‘จ") {
            reaction.guild.member(user).addRole(bot.guilds.get("592946670128594955").roles.get("593156730654031873"))
        }```
#

It's like a message.guild.member(...).addRole but with reactions, it doesn't work

earnest phoenix
#

a reaction doesnt have a guild prop

frail ocean
#

^

#

But in the collector it has a user prop?

limpid raptor
#

?

earnest phoenix
#

huh?

limpid raptor
#

the addRole is working, i only can't find the user

#

and react... oooooh

frail ocean
#

Thats your issue

limpid raptor
#

i will try something

#

uh, i look

#

no

earnest phoenix
#

the reaction has a message prop, there you can find a guild

limpid raptor
#

I try that after a lot of tests

#

oooooooooh

#

thank youu

devout flicker
limpid raptor
#

I'm so stupid..

#

Thanks a lot ๐Ÿ˜

frail ocean
#

๐Ÿ˜ƒ Enjoy

earnest phoenix
#

Hello, do you know how to catch this error? Happens in bulkDelete function:

(node:18244) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message

devout flicker
#

max 100

earnest phoenix
#

yeah i set limit

devout flicker
#

then why is msg.delete(5000) there

frail ocean
#

That deletes the message after 5000ms

limpid raptor
#

Really ?

frail ocean
#

Yes, thats how you delay message deletion

limpid raptor
#

How FTNL bot delete a loooooooooooooot of messages quickly so ?

devout flicker
#

oh dont have that prop

earnest phoenix
#

im guessing the channel doesn't have that many messages

#

hmm, so this message is unknown, but um... how to catch it as error?

#

umm nvm, I wrote catch after msg.delete and error disappeared

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

olive spoke
slender thistle
#
  1. Nobody can see your bot page until it's approved.
  2. You kinda chose the wrong channel.
olive spoke
#

oh where may i post help then?

slender thistle
#

I mean, do you need help with Markdown?

olive spoke
#

yeah

slender thistle
#

Put one empty new line after every command

timber tulip
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

first o all, why do you have a comma after a let statement

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

second of all, there are likely more errors in the co- okay jesus fucking christ i need some water

sage bobcat
#

One message removed from a suspended account.

idle basalt
#

why are you all so upset

mossy vine
#

look at that GoldfindOne, its not a surprise it wants to put commas

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

idle basalt
#

i mean... if you knew js syntax youd be fine

mossy vine
#

GoldfindOne({}) (gold)

sage bobcat
#

One message removed from a suspended account.

idle basalt
#

vsc isnt perfect

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

vscode is trying its best to correct your misunderstandings

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

because err is likely not a function

idle basalt
#

just comment it all out and rewrite it how you intended it, with proper syntax

sage bobcat
#

One message removed from a suspended account.

idle basalt
#

i cant tell what youre even trying to do from that screenshot

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

idle basalt
#

i meant what youre trying to do with the code, its clear youre making money

mossy vine
#

do you prefer reading books or reading documentation or trying to figure it out from there

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

if its the first, this book series explains many quirks of javascript extremely well. "up & going" and "async & performance" are relevant to what you are trying to do. i suggest you give them a read
https://github.com/getify/You-Dont-Know-JS

idle basalt
#

tsc is OOF

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

its literally free

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

for profit and in case someone wants to donate. i bought 3 of them in an ebook bundle because it helped me a lot and i wanted to support him and other authors whose books were in that bundle

#

anyways

#

really great books

#

i highly suggest you read them

#

they might clear up a lot of confusion youre having with javascript

dry oracle
#

Do u have an api for overwatch api ?

#

To get stats

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

you could always search online

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

dry oracle
#

I already search on google but i don't find anything

earnest phoenix
dry oracle
#

?

mossy vine
#

@dry oracle the top results on google are literally what you are looking for

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

first of all, on line 5. thats not how if statements work

#

second of all, on line 10 you are closing your if statement incorrectly

#

third of all, this might be just something you unnecessarily pasted as well, but you are closing your else statement twice

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

Shit xD

mossy vine
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mossy vine
#

you can read guides and documentation

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

trust me, documentation is the best thing to ever exist

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

i mean, if youre using mongo, id suggest reading the mongo documentation

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

Use sql

mossy vine
#

no but all you need is saving and fetching data. the fact that you are using it with discord doesnt matter at all

earnest phoenix
#

mongoose is bad for coins system

mossy vine
#

@earnest phoenix thats not helpful at all. they would likely have more trouble with SQL because of SQL injections and the fact that it requires a completely different syntax

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

grr

sage bobcat
#

One message removed from a suspended account.

mossy vine
#

you need to save and fetch data

sage bobcat
#

One message removed from a suspended account.

sage bobcat
#

One message removed from a suspended account.

warm marsh
#

Does anyone know how to use pm2 on heroku?

#

or install it

west spoke
#

Self host

somber verge
#

i also self host

#

and also on my phone

west spoke
#

e.e

warm marsh
#

Fair

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Ello, so im trying to set up webhooks for voting, and i have this code on my bot:

const LibDBL=require('dblapi.js');
const GlobDBLHandle=new LibDBL(GlobDBLToken,{webhookPort:5000,webhookAuth:GlobWebhookAuth},GlobDiscordClient);
    GlobDBLHandle.webhook.on('ready',hook=>{console.log('Webhook started at http://'+hook.hostname+':'+hook.port+hook.path);});
    GlobDBLHandle.webhook.on('vote',vote=>{console.log(FindUser(vote.user).UserName+' voted');});

And i get to log Webhook started at http://0.0.0.0:5000/dblwebhook
On the website i have webhook url set to http://openbot.ga:5000/dblwebhook
openbot.ga is my domain, i have also tried my ip and same result.
i then click the test button and wait

the .on 'vote' never gets called. anyone know why?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

opaque eagle
#

Don't use TheSourceCode, their tutorials are terrible.

#

Same with An Idiot's Guide

earnest phoenix
#

anyone know my problem?

inner jewel
#

is the port open?

acoustic citrus
#

hey so my bot has a leveling type thing, is this a good idea for how the leveling works? const curLevel = Math.floor((0.1 * score.points) % score.level);

coarse vapor
#

My bot, @PRIZM, was declined due to more than 50% of the commands on the help page not providing a response... Can you please tell me what commands you used?

#

Actually I'll just DM them directly

spice nymph
#

7 servers invited my bot ๐Ÿ˜ฎ how I can see all server where my bot is ? #BadLanguageSorryIAmNotEnglish

#

@coarse vapor Me my bot was accepted ๐Ÿ˜ƒ @fast epoch

topaz fjord
split lantern
#

@spice nymph Please dont post in 2 channels

earnest phoenix
#

@coarse vapor send me ur bot id

#

ask to the mod who has declined your bot

spice nymph
#

@earnest phoenix

coarse vapor
#

No I figured out what was wrong

#

I'm fixing it rn

spice nymph
#

With the declined bot , he/she receive a reason

earnest phoenix
#

Yes??

#

And what

#

@spice nymph bot.guilds.map(g => g.name).join('/n')

spice nymph
#

๐Ÿค”

earnest phoenix
#

just map the guild

#

This is what do you want i think

spice nymph
#

I want see all server is my bot

earnest phoenix
#

So use what i have put above

spice nymph
#

How use ?

#

I am bad in djs

earnest phoenix
#

message.channel.send(code)

spice nymph
#

message.channel.send(code)

topaz fjord
west spoke
#

bruh

spice nymph
#

message.channel.send(bot.guilds.map(g => g.name).join('/n'))

#

?

earnest phoenix
#

Yes

spice nymph
#

Ho okay

#

Ty

topaz fjord
#

you should brush up on the docs and some js before starting

earnest phoenix
#

Np

spice nymph
#

I donโ€™t will learn js before djs

#

Its not the same

#

@topaz fjord

topaz fjord
#

you need to know js before you use djs

#

djs is built upon js

earnest phoenix
#

or read djs docs

#

very helpful

dusky marsh
#

Any good resources on making a starboard? I have my own mostly planned out, but I don't think it's very efficient. For discord.js

topaz fjord
#

but you still have to know how to apply the things in the docs

earnest phoenix
#

Add a jump to @dusky marsh

#

With the link of the starred message

spice nymph
#

@earnest phoenix

#
    
    message.channel.send(bot.guilds.map(g => g.name).join('/n'))
  } ```
#

Nothing

#

When I type .serverlist

earnest phoenix
#

No error?

#

@spice nymph try to put it into a const

spice nymph
#

0 error

earnest phoenix
#

const code = bot.guilds....
message.channel.send(code)

spice nymph
#
    const code = bot.guilds.map(g => g.name).join('/n')
message.channel.send(code)
  }

#

@earnest phoenix ?

earnest phoenix
#

Yes

spice nymph
#

Nothing

#

0 error

earnest phoenix
#

@spice nymph hum

#

Not possible

#

maybe the command name

topaz fjord
#

could you send more code

amber fractal
#

^

#

Was just about to ask

topaz fjord
#

hastebin it

earnest phoenix
#

i get ignoredd

#

๐Ÿ˜ฆ

amber fractal
#

@earnest phoenix no, we just dont know c#

earnest phoenix
#

same

#

idk c#

amber fractal
#

We cant help you with a lang we dont know

spice nymph
#

On Glitch.com i do the command not on the good project x) @earnest phoenix

earnest phoenix
#

pls god

spice nymph
#

x)

topaz fjord
#

@spice nymph to help you, we need to see more code

spice nymph
#

But he said me the name of all servers but he donโ€™t make an invite

earnest phoenix
#

await Bot._client.GetGuild(580112544778158080).GetTextChannel(587873876231454720).SendMessageAsync("rawr"); idk but ill send this here how do a given channel instead of the 1 guild and channel

spice nymph
#

I want when I type .serverlist , my bot send me an invitation on all server is in

earnest phoenix
#

i have commands for that

#

๐Ÿ˜ƒ

spice nymph
#

Can you send me please ?

earnest phoenix
#

so you want to join the guilds that your bot is in?

spice nymph
#

I want my bot send me an invite on all guild my bot are

#

With a command

earnest phoenix
#

one sec

spice nymph
#

Okay

earnest phoenix
#

dm me ๐Ÿ˜ƒ

cunning oxide
#

Plz donโ€™t spoon feed ๐Ÿ˜ฆ

topaz fjord
#

^

earnest phoenix
#

ight

#

:3

spice nymph
#

I dm you @earnest phoenix

sage bobcat
#

One message removed from a suspended account.

topaz fjord
#

can you show code @sage bobcat

spice nymph
#

@earnest phoenix Can you give me the code in dm please ?

earnest phoenix
#

they said i cant spoon feed, sorry

spice nymph
#

Omg

#

Its your dad ?

#

I just need the code

#

Its in dm

topaz fjord
#

what

spice nymph
#

@cunning oxide its not a discord admin , in dm you can @earnest phoenix

topaz fjord
#

and?

#

server rules say not spoonfeed

earnest phoenix
#

:C

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

spice nymph
#

x)

#

He just want to give me a code

sage bobcat
#

One message removed from a suspended account.

spice nymph
#

AHAHAHAHAHAH a

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

:C

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

i need to go from guild ids to guild channel's

#

so it find's a channel

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

await Bot._client.GetGuild(580112544778158080).GetTextChannel(587873876231454720).SendMessageAsync("rawr");

acoustic citrus
#

hey so my bot has a leveling type thing, is this a good idea for how the leveling works?
const curLevel = Math.floor((0.1 * score.points) % score.level);

topaz fjord
#

can you log the item gold @sage bobcat

earnest phoenix
#

@spice nymph stop talking about that if you dont want to get muted

topaz fjord
#

it seems that the object gold doesn't have the property gold in it

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.

topaz fjord
#
Gold.findOne({ userID: message.author.id }, (err, gold) => { ... });
#

can you log gold

sage bobcat
#

One message removed from a suspended account.

topaz fjord
#

to see if it actually exists

#

I also found your error

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

cunning oxide
#

Sakura, the reason Iโ€™d say no spoonfeeding is because you literally asked for him to send u code.

topaz fjord
#
if (!Gold) {
#

this needs to be lowercase gold

cunning oxide
#

Thatโ€™s cool I guess, however, you should try and learn. It will prove more useful in the future.

topaz fjord
#

because upercase Gold checks if the schema exists, but lowercase gold checks if the document exists

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.

topaz fjord
#

basically

#

no

#
message.channel.send(`You have ${gold.gold} gold!`)
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

@deft ivy

#

What language?

deft ivy
#

portuguese @earnest phoenix

earnest phoenix
#

lol

deft ivy
#

:)

#

i'm from brasil

earnest phoenix
#

@deft ivy i mean the language of your bot

deft ivy
#

@earnest phoenix I set it up for the Discord bot designer for now, but I'm creating it js

earnest phoenix
#

To get the name of a guild

deft ivy
#

oh

#

but at the moment it is in the Discord bot designer at the moment, it will take a little of it to get 100% in java script

#

@earnest phoenix

west spoke
#

How would I do something like

{
"users":{
      "name":(name),
      "password":(password),
      "avatar":(avatar)}
}```
#

In python

near ether
#

how can i edit an existing RichEmbed I've sent?

west spoke
#

Lib?

#

Code?

near ether
#

discord js

west spoke
#

Google

#
                            with open(f'accounts.json', 'r+') as f:    
                              data = json.load(f)
                              username_temp = str(message.content.split(prefix+"register ")[1]).split(' ')[0]
                              password_temp = str(message.content.split(prefix+"register ")[1]).split(' ')[1]
                              data[f"{username_temp}"] = '['+f'"name":{username_temp},"password":{password_temp},"avatar":{message.author.avatar_url}'+']'
                              
                              
                              f.seek(0) 
                              json.dump(data, f, indent=4)
                              f.truncate()                         
earnest phoenix
#
.setTitle('Oliy is fat')

// for edit 
embed.setTitle('Oliy is very fat') 

#

Not hard

#

@near ether

near ether
#

wow

#

thank you lmao

#

and this will update an embed that has already sent?

west spoke
#

Wait

earnest phoenix
#

yes

cunning oxide
#

Yep

west spoke
#

I just realized what I did

#

oof

near ether
#

awesome

#

thank you!

cunning oxide
#

Json

earnest phoenix
#

np

cunning oxide
#

MonkaS

inner jewel
#

data[f"{username_temp}"] = '['+f'"name":{username_temp},"password":{password_temp},"avatar":{message.author.avatar_url}'+']'

#

people can just inject arbitrary data into your json

west spoke
#

I'll try it, ty

inner jewel
#

that's literally the code above

west spoke
#

Ik. Ima make it only do it if the "author" is equal to the message author's id

#

Rn I'm just testing it

inner jewel
#

<prefix>register },{mycooljson},{ somerandompassword

west spoke
#

It splits the two parts automatically

#

<username> <password>

#

This was my problem tho

inner jewel
#

yes

#

because it's being escaped

#

as it should

#

otherwise any random string could corrupt your json

west spoke
#

that's supposed to happen?

#

Ah

inner jewel
#

yes

#

you're setting the value to a string

west spoke
#

I thought it was something I did

inner jewel
#

so it saves as a string

west spoke
#

Ty!

west spoke
#

It sends it to a webserver, along with another one that way it has a backup.

#

It then deletes it from my main computer.

#

Then when needed will draw it

#

We have our own ways of doing things, some people do things other ways.

earnest phoenix
#

your logic is fallible

#

also what you just said is even worse than just keeping the file at the same place

#

it's basically equivalent of shouting "hey you! over there! i want you to break my database and leak data because i love web vulnerability"

west spoke
#

We have a thing called opinions

earnest phoenix
#

opinions are futile in a place where logic takes power

trail dagger
#

i use json

west spoke
#

Whitename

trail dagger
#

๐Ÿ˜ข

west spoke
#

Emil is fine. You dont try to force others to do things their way

#

Cry, though, is different.

trail dagger
#

๐Ÿ˜Š

earnest phoenix
#

i'm not forcing you to use x

#

i'm telling you not to use y

west spoke
#

Still wanting me to change my ways

earnest phoenix
#

because it's bad

west spoke
#

I honestly dont care if its bad

earnest phoenix
#

and unsafe

west spoke
#

It works

trail dagger
#

Why spend money when you can do the same for free?

#

json is a good way to store, but yea everyone can have their opinion

earnest phoenix
#

person x: "Hey, your addiction to drugs is really getting bad, you should stop."
person y: "It makes me happy, it works, therefore I don't need to stop."

that's your logic right there, and it's fallible

#

json is not a way to store data, it was never meant to be that

inner jewel
#

nearly every usage of json to store data i've seen so far is extremely broken

#

it may appear to work in a testing environment

west spoke
#

Right now it is testing

inner jewel
#

but as soon as you have two simultaneous writes, you just lost your data

west spoke
#

I'm just trying to get it to work.

earnest phoenix
#

there wouldn't be testing if you hadn't planned to use it in prod

#

imagine if bots like mee6 used json for storage

#

how long would it take to fetch your levels

inner jewel
#

it is possible to use json safely, but everyone who knows enough on how to do it also knows why a database is better so they just use databases

earnest phoenix
#

just because something works (which json storage barely does), doesn't mean you should use it

west spoke
#

Can you shut up about it

trail dagger
#

you have your opinion we have ours

west spoke
#

^

trail dagger
#

shut up

west spoke
#

Dont care

earnest phoenix
#

it's basic coding practices

cunning oxide
#

Ok calm it down here

#

Stop arguing in this channel tyvm

earnest phoenix
cunning oxide
#

People will have opinions, and everyone does things differently. I myself donโ€™t use json, but if Emil and Neko decide to use it, thatโ€™s just what they wanna do.

west spoke
#

^

trail dagger
#

as long as it works for me i dont really care tbh

west spoke
#

thank you

earnest phoenix
#
JustEmilToday at 2:32 AM
as long as it works for me i dont really care tbh```

"these drugs make me calm, i should continue to abuse them!!"
trail dagger
#

You should also go to sleep

#

2:32am

earnest phoenix
#

I'm going to sleep

trail dagger
#

same

earnest phoenix
gilded plankBOT
#

๐Ÿค Muted cry#2046 (@queen cobalt)

cunning oxide
#

Everyone cut it out

trail dagger
#

Good night

west spoke
#

1 hour is a bit merciful imo.
But you're the mod

humble gyro
#

uwu owo

bold dock
earnest phoenix
#

@bold dock henlo

#

do you need help?

humble gyro
#

wait

bold dock
#

Not really, I was owo'ing to Veld. But I appreciate that you asked

humble gyro
#

how did you get here

bold dock
#

By joining

humble gyro
#

or rather

#

how did you find me here

#

owo'ing

bold dock
#

When I'm bored I go through every Discord Server reading what's up

humble gyro
#

Nice

cunning oxide
humble gyro
#

Working on the permissions stuff

#

sweating1 I was about to move it to a development topic

#

Trying to access the internal instance object from anything in my commands is hard

earnest phoenix
#

Did discord change their permission flags or something? Not sure why my code which worked before is now suddenly throwing an invalid permission string/integer error.

RangeError: Invalid permission string or number.

  permissionsFlags:new Permissions([
    'SEND_MESSAGES',
    'EMBED_LINKS',
    'ATTACH_FILES',
    'ADD_REACTIONS',
    'USE_EXTERNAL_EMOJIS'
  ])


if (channelObj.permissionsFor(clientMember).has(local.permissionsFlags, false) == false) //this is where the error is
humble gyro
#

doesn't seem a discord issue

#

not sure which language this is

earnest phoenix
#

discord.js

#

node js

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

C# BOIS

pale marsh
#

C# is hot

humble gyro
#

very hot

#

tbh

#

especially with core

#

C# could become a really good language imo

pale marsh
#

Yup

#

At least it made osu playable on linux LUL

humble gyro
#

lmfao

pale marsh
humble gyro
#

I mean

#

.NET 5 tho

pale marsh
#

It's been a while. What's new?

humble gyro
#

it's basically

#

unifying .net framework and .net core

#

into one multiplatform subsystem again

pale marsh
#

That's pretty neat

#

So .NetFX will cease to exist soon I assume?

humble gyro
#

yeah

pale marsh
#

Sounds like a plan

humble gyro
#

same for netcore tho

pale marsh
#

A good one imp lol

#

Wdym?

humble gyro
#

it's a full rebrand technically

pale marsh
#

Oh?

#

Even for core? Lol

humble gyro
pale marsh
#

That one makes no sense to me. I would just assume Core would take over

humble gyro
#

Yeah basically

pale marsh
#

Oh. I misunderstood then

humble gyro
#

net core is basically the future

#

but it's going to be renamed to simply .net

pale marsh
#

Which makes way more sense now

humble gyro
#

AkatsukiGasm CoreFX will be extended to support static compilation of .NET (ahead-of-time โ€“ AOT), smaller footprints and support for more operating systems.

pale marsh
#

That's pretty neat tbh

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

yeah

sage bobcat
#

One message removed from a suspended account.

pale marsh
#

Yup

humble gyro
#

owo epic

#

I dunno man

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

C# is really the language for me

pale marsh
#

A custom api wrapper as well iirc?

humble gyro
#

yeah

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

it's not feature-complete tho

pale marsh
#

Ads banblob

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

oh shti

#

it's open source

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

public domain

pale marsh
#

Lmao xD

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

secretly I wish I had more devs on miki tho

pale marsh
sage bobcat
#

One message removed from a suspended account.

humble gyro
#

having to do every aspect of miki kinda sucks

pale marsh
#

I would've offered to help if O hadn't been stuck with uni stuff

#

I*

humble gyro
#

yeah same rn

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

im moving to amsterdam this weekend

sage bobcat
#

One message removed from a suspended account.

pale marsh
#

Good luck bud

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

Uber took me under their wing Peach_Love

#

so I'll be a backend programmer there

earnest phoenix
#

Owo nice

pale marsh
#

That's pretty great veld lmao. Congrats man xD

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

yeah

inner jewel
#

plz convince them to save a cache of the map locally for bad internets kthx

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

lmao

pale marsh
#

Off to bed. Night y'all

humble gyro
#

I'll see what I can do

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

not sure if I can share what team im in

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Lol

humble gyro
#

but I might be able to actually bring that up lmao

trail dagger
#

gn kef

humble gyro
#

night boi

sage bobcat
#

One message removed from a suspended account.

trail dagger
#

i should go to sleep aswell its 3:24am for me

#

and i need to get up 8am

humble gyro
#

damn same

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

nani

#

I used to write for the dbl blog

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

yea

trail dagger
#

Yea bye gotta go to bed aswell gn

humble gyro
#

gnight boi

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

nani

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.

humble gyro
sage bobcat
#

One message removed from a suspended account.

humble gyro
#

is that typeorm?

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

yeah but the db

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

oh

#

reminded me of typeorm

earnest phoenix
#

i have been summoned

humble gyro
#

for typescript

#

hi uber

#

thank you for hiring me

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

imagine using python in 2019

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

but half of all discord bots are

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

oof

earnest phoenix
#

to be fair you struggled with constructing an embed, calling other bots ass is dumb :/

inner jewel
#

half use js, about 20-30% are python, rest is other libs

#

at least it was around that last time i checked (data from dbl because it's the largest dataset)

humble gyro
#

don't take it too seriously

#

Just shitposting

slender thistle
humble gyro
#

shit

#

but it's python

#

isn't that development? sweating1

sage bobcat
#

One message removed from a suspended account.

slender thistle
#

sarcasm.status()
sarcasm.is_gone

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

is is_gone a value that could be in status()?

#

sweating1 this interface is hella confusing

earnest phoenix
#

nullref

sage bobcat
#

One message removed from a suspended account.

slender thistle
#

With magic and force

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

no it's not a function?

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

how is that an error Kappa

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

humble gyro
#

what botto? owoAwoo

earnest phoenix
#

it's still better than implementing unkicks and halfway through realizing unkicks are not a thing

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

oh cool

sage bobcat
#

One message removed from a suspended account.

humble gyro
#

yee

#

sounds interesting

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.