#development

1 messages · Page 1192 of 1

plush magnet
#

Yeah that's it

carmine summit
#

how do i push something into a map?

plush magnet
#

You're running the debugger so now your code will stop at any breakpoints

#

@carmine summit did you google?

earnest phoenix
#

^

plush magnet
#

Cause I can guarantee its the first thing you will see

carmine summit
#

yes but i didnt understand

earnest phoenix
plush magnet
#

Do you know how maps work?

earnest phoenix
#

I am done

solemn leaf
#
(node:10336) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
    at VoiceConnection.authenticateFailed (c:\Users\Owner\Desktop\discordjs2\node_modules\discord.js\src\client\voice\VoiceConnection.js:296:27)
    at c:\Users\Owner\Desktop\discordjs2\node_modules\discord.js\src\client\voice\VoiceConnection.js:324:61
    at Timeout.<anonymous> (c:\Users\Owner\Desktop\discordjs2\node_modules\discord.js\src\client\BaseClient.js:83:7)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)
<node_internals>/internal/process/warning.js:32

only stuff I got

plush magnet
#

Yeah cause you stopped your code before the connection so it timed out

solemn leaf
#

oh

plush magnet
#

It hit a breakpoint during the connection probably

solemn leaf
#

so where should I put the dot

#

right when the connection is made?

plush magnet
#

After the connection or where you think/know things aren't working

carmine summit
#

pls help

solemn leaf
#

UnhandledPromiseRejectionWarning: #<Object>

plush magnet
#

@carmine summit do you know how maps work

carmine summit
#

NO

solemn leaf
#

{code: 403, message: 'The request cannot be completed because you …youtube/v3/getting-started#quota">quota</a>.', errors: Array(1)}

plush magnet
#

Then find out how maps work first before you do anything with them

carmine summit
#

umm

#

im here to learn

#

¯_(ツ)_/¯

solemn leaf
#

wrong place

#

google .com is for that

plush magnet
#

Were not teachers. Were helpers

solemn leaf
#

^^

carmine summit
#

i cannot understand google . com

solemn leaf
#

okay super

#

I did it

#

the code stoped

#

now wha

plush magnet
#

Aki you're making progress so I'm sure you can slowly work things out. I recommend testing the debugger on a simple command so you know how it works. I'm going to have to go in a bit.

#

If you hover over values

#

It should display info

#

Now is when you can also watch that video

#

This will help too

#

You need to form a hypothesis

Test that hypothesis

And see if that helps you find your solution

#

For your problem

carmine summit
#

ummmm

wheat mesa
#

what does this error mean?

#

(node:24036) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

solemn leaf
#

happy new hour guys

earnest phoenix
#

@wheat mesa don't create a new handler for each command, instead put them all in one listener

wheat mesa
#

Okay

delicate shore
#

I'm trying to convert window.parent.purchaseItem(type, item, cost);

#

to window.postMessage

#

instead of window.parent.* i guess

#

but apparently i have to also use an event listener?

solemn leaf
#
{
  code: 403,
  message: 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.',
  errors: [
    {
      message: 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.',
      domain: 'youtube.quota',
      reason: 'quotaExceeded'
    }
  ]
}

do I have to make a new api key then?>

topaz fjord
#

Yes or wait for the quota to reset

real nacelle
#

can anyone send me python bot, docs?

#

i want to read something

#

I can't find proper docs

warm marsh
solemn leaf
#

@topaz fjord

#

did that

#

now im gettin

#
{
  code: 400,
  message: 'API key expired. Please renew the API key.',
  errors: [
    {
      message: 'API key expired. Please renew the API key.',
      domain: 'global',
      reason: 'badRequest'
    }
  ],
  status: 'INVALID_ARGUMENT'
}
faint prism
#

Get a new token

solemn leaf
#

I did

#

and got this again

#
{
  code: 403,
  message: 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.',
  errors: [
    {
      message: 'The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.',
      domain: 'youtube.quota',
      reason: 'quotaExceeded'
    }
  ]
}
faint prism
#

You're being rate limited

#

It basically means you made too many calls to the API, and you're being blocked for a certain amount of time

solemn leaf
#

3 hours

#

how can I prevent this

faint prism
#

Since it says quota, I'm assuming you can only make a certain amount of calls during a certain period of time

#

So be careful to space it out I guess, not much you can do

solemn leaf
#

every 3 hours it is 10,000

#

can I buy more?

faint prism
#

Idk maybe. That'd be something to Google

earnest phoenix
#

the (official) youtube api sucks ass

calm junco
#

does anyone know how to get an activity on ur bot, mine keeps getting loads of errors.?

earnest phoenix
#

you have a syntax error

#

probably a result of copypasting

calm junco
#

im new to coding so

#

how do u fix it

earnest phoenix
#

recheck your syntax

calm junco
#

?

#

im new to coding so
@calm junco wdym a syntax

earnest phoenix
#

the error is complaining about a missing parenthesis

calm junco
#

btw im using discord.js

#

i have no idea what these things are ;-;

earnest phoenix
#

you can use google to find out what the respective terms are

calm junco
#

wdymmmmm

#

??

hazy sparrow
#
const cooldown = new Set();
   cooldown.add(message.author.tag);
    setTimeout(() => {
        cooldown.delete(message.author.tag);
    }, 5000);

how can i see how much time is left before leaving the set?

calm junco
#

it wont let me send code

clever vector
#

hey guys what is the code that like

earnest phoenix
#

you can't directly @hazy sparrow

calm junco
#

wdymmmmm
@calm junco

clever vector
#

Guys i want my bot status to Invented by {owner}

#

how

calm junco
#

me to

#

but i want it to be watching

earnest phoenix
#

a solution at the top of my head is to just grab the current date and store it somewhere alongside the timeout object that's returned from setTimeout(), from there on you can calculate how much time is left; cc: bow pro

#

@clever vector which lib

calm junco
#

can someone tell me how to add watching status

#

im new to making bots and stuff so i will not understand anything u say

earnest phoenix
#

"new to bots" is not an excuse for not knowing the language you're working with

#

there are plethora of resources online

#

if you don't know a specific term, google it, it's there for a reason

calm junco
#

but like

#

i have these errors

#

how do ik why there there

earnest phoenix
#

i told you what they are and how to fix them

hazy sparrow
#

you can't directly @hazy sparrow
@earnest phoenix then how

earnest phoenix
#

if you had listened to me you would've already fixed it

calm junco
#

i did

earnest phoenix
#

i told you how @hazy sparrow, read a bit down

calm junco
#

but idk what u meannn

hazy sparrow
#

oki

earnest phoenix
#

if you don't know a specific term, google it, it's there for a reason
@earnest phoenix

#

i cannot explain CS basics to you

calm junco
#

ok

#

but what are the teams

earnest phoenix
#

teams?

calm junco
#

i am so stopid

#

specific term

earnest phoenix
#

...the ones you don't know

calm junco
#

i dont know anh

earnest phoenix
#

i told you exactly what to do and why the error is happening

calm junco
#

if it's missing, what would be the logical thing to do?
@earnest phoenix but
codecademy
@torn ravine ?

#

tell me again plss

earnest phoenix
#

scroll up

calm junco
#

missing parenthesis

#

ok

#

but how do i fix it

earnest phoenix
#

👁️ 👄 👁️

calm junco
#

?

earnest phoenix
#

if it's missing, what would be the logical thing to do?

faint prism
#

Do the thing

torn ravine
#

every 3 hours it is 10,000
@solemn leaf this is a lavalink error right

calm junco
#

if it's missing, what would be the logical thing to do?
@earnest phoenix but what do i put there

#

and were

earnest phoenix
#

the thing that it is missing

torn ravine
#

you’re going to know how to easily rotate ipv6’s on the fly

calm junco
#

AHH THIS SO CONFUSING

earnest phoenix
#

lavalink doesn't use the official api, @torn ravine

torn ravine
#

How does that work?

earnest phoenix
#

lavalink uses the private api that's exposed to browsers when you go to youtube.com via massive amounts of reverse engineering and scraping

solemn leaf
#

@torn ravine no

#

its ydtl

sonic lodge
#

@calm junco i suggest you take a course on your programming language; you should learn at least the basics before getting into bot development

calm junco
#

nu

#

i will

#

but not now

#

rn i just wanna see what its like and test it and stuff

torn ravine
#

you can’t really program without prior knowledge

sonic lodge
#

you need to know the basics to "test it"

solemn leaf
#

its bcs Im maxed

calm junco
#

i have coded a custom avtivity status before but now it shows 3 errors

earnest phoenix
#

and you not knowing how to fix it is a huge red flag that's screaming you should learn the language

torn ravine
#

it seems like your problem is a syntax error

calm junco
#

anyway most courses cost money and my dad isnt gonna pay money for a course :(

torn ravine
#

means there’s a typo

earnest phoenix
#

a lot of courses online are paid, a lot of them are free

torn ravine
#

maybe if you tell him that you want to learn something useful, He’ll understand

calm junco
#

but free ones are hard to find

#

.-.

pulsar forge
torn ravine
#

codecademy

earnest phoenix
#

style it with css @pulsar forge

pulsar forge
#

How

earnest phoenix
#

using the html style tag

calm junco
#

codecademy
@torn ravine ?

sonic lodge
pulsar forge
#

Im still learning were is that

sonic lodge
#

found some resources

torn ravine
#
calm junco
#

hmm

#

ty but im still so confused lol

#

wait

torn ravine
#

its a website

sonic lodge
#

what are you confused on?

torn ravine
#

that teaches you to code

#

for free

calm junco
#

is discord.js javascript orr..

pulsar forge
#

using the html style tag
@earnest phoenix were is that

sonic lodge
#

discord.js is an api wrapper that is written in javascript

calm junco
#

oh ok

#

ill look at it ty

restive furnace
#

or w3schools

clever vector
#

@clever vector which lib
@earnest phoenix discord.js

sand skiff
#

Help

#

how do i set custom sstatus

#

with code

#

for bot

calm junco
#

everyone keeps asking that lol

sand skiff
#

oop

calm junco
#

are u using discord.js

sand skiff
#

Yes

calm junco
fringe axle
#

You want more then one status @sand skiff?

calm junco
#

wdym

fringe axle
#

More status. Random

calm junco
#

i want a watching status

fringe axle
#

Wrong @

calm junco
#

??

fringe axle
#

I @ the wrong person.

sharp thicket
#

um

#

anyone know what this means

#
State changed from down to starting
2020-08-27T04:28:16.000000+00:00 app[api]: Build succeeded
2020-08-27T04:28:19.055345+00:00 heroku[worker.1]: Starting process with command `node index.js`
2020-08-27T04:28:19.786655+00:00 heroku[worker.1]: State changed from starting to up
2020-08-27T04:28:19.798526+00:00 heroku[worker.1]: Idling
2020-08-27T04:28:19.800454+00:00 heroku[worker.1]: State changed from up to down
2020-08-27T04:28:19.809648+00:00 heroku[worker.1]: Idling because quota is exhausted
2020-08-27T04:28:22.351356+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2020-08-27T04:28:22.474174+00:00 heroku[worker.1]: Process exited with status 143```
calm junco
#

wdymm vale

sand skiff
#

You want more then one status @sand skiff?
@fringe axle no just one

fringe axle
#

Okay

sharp thicket
#
State changed from down to starting
2020-08-27T04:28:16.000000+00:00 app[api]: Build succeeded
2020-08-27T04:28:19.055345+00:00 heroku[worker.1]: Starting process with command `node index.js`
2020-08-27T04:28:19.786655+00:00 heroku[worker.1]: State changed from starting to up
2020-08-27T04:28:19.798526+00:00 heroku[worker.1]: Idling
2020-08-27T04:28:19.800454+00:00 heroku[worker.1]: State changed from up to down
2020-08-27T04:28:19.809648+00:00 heroku[worker.1]: Idling because quota is exhausted
2020-08-27T04:28:22.351356+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2020-08-27T04:28:22.474174+00:00 heroku[worker.1]: Process exited with status 143```

@sharp thicket anyone any help?

#

now im getting

#
2020-08-27T04:31:12.307660+00:00 app[worker.1]: Error waiting for network: Resource temporarily unavailable```
fringe axle
#

Network error

sharp thicket
#

did i break something??

fringe axle
#

I don‘t use Heroku

sharp thicket
#

i was sleeping so most likely not

sand skiff
#

Lol

#

@fringe axle

#

so

fringe axle
#

So?

sand skiff
#

i want it to be like

#

Playing -help

fringe axle
#
client.user.setActivity(`-help`, {
    type: 'PLAYING'
  });
#

@sand skiff

sharp thicket
#

its fine if you just remove the playing part

fringe axle
#

Yea, but if you want that he‘s listening you can change it

sharp thicket
#
client.user.setActivity(`-help`)```
#

ik

#

anyone know how to fix this tho

#
2020-08-27T04:33:26.000000+00:00 app[api]: Build succeeded
2020-08-27T04:33:27.502366+00:00 heroku[worker.1]: Starting process with command `node index.js`
2020-08-27T04:33:28.265496+00:00 heroku[worker.1]: State changed from starting to up
2020-08-27T04:33:28.275726+00:00 heroku[worker.1]: Idling
2020-08-27T04:33:28.277540+00:00 heroku[worker.1]: State changed from up to down
2020-08-27T04:33:28.286585+00:00 heroku[worker.1]: Idling because quota is exhausted
2020-08-27T04:33:34.530371+00:00 app[worker.1]: Error waiting for network: Resource temporarily unavailable```
solemn leaf
#
const Discord = require("discord.js");

    module.exports = {
        config: {
            name: 'spotify',
            category: "fun",
            noalias: "No Aliases",
            description: "shows stats of the person listening",
            usage: "[no mention | mention (optional)]",
            accessableby: 'everyone'
        },
        run: async (bot, message, args) => {
            let user = message.mentions.users.first() || message.author;

            if (user.presence.activities !== null && user.presence.activities.find(a => a.type === "LISTENING") && user.presence.activities.name === 'Spotify' && user.presence.activities.assets !== null) {

                let trackIMG = `https://i.scdn.co/image/${user.presence.activities.assets.largeImage.slice(8)}`;
                let trackURL = `https://open.spotify.com/track/${user.presence.activities.syncID}`;
                let trackName = user.presence.activities.details;
                let trackAuthor = user.presence.activities.state;
                let trackAlbum = user.presence.activities.assets.largeText;

                message.channel.send(embed);
            } else {
                message.channel.send('**This user isn\'t listening to Spotify!**');
            }
        }
    }
}

module.exports.help = {
    name: "spotify"
}

why doesnt this send a msg

#
                const embed = new Discord.MessageEmbed()
                    .setAuthor('Spotify Track Info', 'https://cdn.discordapp.com/emojis/653135129870336031.png?v=1')
                    .setColor("GREEN")
                    .setThumbnail(trackIMG)
                    .addFields(
                        { name: 'Song Name', value: trackName, inline: true },
                        { name: 'Album', value: trackAlbum, inline: true },
                        { name: 'Author', value: trackAuthor, inline: false },
                        { name: 'Listen to Track', value: `${trackURL}`, inline: false }
                    )
                    .setFooter(message.member.displayName, message.author.displayAvatarURL())
                    .setTimestamp()

how to cut out the embed so I could send

earnest phoenix
#

What the fuck is this

solemn leaf
#

okay now I got it to kinda work

verbal niche
#

Hello

solemn leaf
#

it always say that

spare gale
#

how to get bot self join to guild event? (if bot invited to guild - function () )

earnest phoenix
#

When env files don't get loaded in to the environment on repl.it for a temporary bug so you use em like JSON files and parse em in your code and repl.it will still hide the file

solemn leaf
#

?

spare gale
#

hm

crystal socket
#

imagine hosting on repl

#

just buy a vps

spare gale
#

spot @inner idol

#

(srry for ping)

weak rain
#

How to make autoleave code

spare gale
#

what u mean?

solemn leaf
#
            let trackIMG = `https://i.scdn.co/image/${user.user.presence.activities.assets.largeImage.slice(8)}`;
            let trackURL = `https://open.spotify.com/track/${user.user.presence.activities.syncID}`;
            let trackName = user.user.presence.activities.details;
            let trackAuthor = user.user.presence.activities.state;
            let trackAlbum = user.user.presence.activities.assets.largeText;

can someone help with spotify command

 Cannot read property 'largeImage' of undefined
restive pebble
#

its array now

sharp thicket
#

just buy a vps
@crystal socket um you know most devs are broke students and the sickness thats going around at this time e.e

restive pebble
#

presence#activities is an array @solemn leaf

sharp thicket
#

yeah not the ideal time to spend money on a vps sadcatthumbsup

crystal socket
#

and you know that most vps cost less than 3$/month?

sharp thicket
#

ik

spare gale
#

user.user.presence.activities.assets=undefined @solemn leaf :/

solemn leaf
#

wait

sharp thicket
#

just host on heroku its that easy

solemn leaf
#

what do I fix

restive pebble
#

array

#

i told u

solemn leaf
#

so

restive pebble
#

presence.activities is an array

solemn leaf
#

presence.activities[0]

restive pebble
#

yes

spare gale
#

spot @inner idol

crystal socket
#

bot commands don't work in here

spare gale
#

its self-bot

crystal socket
spare gale
#

and it dying :(

crystal socket
#

can you ping it?

spare gale
#

ping

#

:((

solemn leaf
#

@restive pebble

crystal socket
#

can you mention the bot?

spare gale
#

wtf(

#

its self-user bot

restive pebble
#

song name is detail

crystal socket
#

yes so can you @mention it?

solemn leaf
#

soo

restive pebble
#

activities[0].details

spare gale
#

its on my token -.-

solemn leaf
#

yeah

restive pebble
#

song name

crystal socket
#

ping

spare gale
#

but he dont listen this guild, wtf

calm junco
#

right

earnest phoenix
#

um you know most devs are broke students and the sickness thats going around at this time e.e
@sharp thicket r/technicallythetruththateveryonehates

solemn leaf
#

@restive pebble

#

is there a way to hide the link

earnest phoenix
#

yes

solemn leaf
#

with like here

earnest phoenix
#

mask it

solemn leaf
#

how

earnest phoenix
solemn leaf
#

wh

#

a

earnest phoenix
#

that's how you mask links in markdown

spare gale
#

ping

earnest phoenix
#

and also in embeds

restive pebble
#

markdown

earnest phoenix
#

you can't mask links in normal messages tho

weak rain
#

what u mean?
@spare gale that the bot will automatically leave servers with x members (as seted)

solemn leaf
#

```[text]`${trackURL}````

calm junco
#

my discord.js status code keeps gettings errors and someone said abbout syntax, so i took a free course and i saw the word in it?

earnest phoenix
#

@spare gale that the bot will automatically leave servers with x members (as seted)
@weak rain api abuse

calm junco
weak rain
#

@weak rain api abuse
@earnest phoenix why

earnest phoenix
#

because

#

it is unfair

solemn leaf
#

@earnest phoenix

earnest phoenix
#

for people who have small servers

weak rain
#

kk

earnest phoenix
#

@solemn leaf ????

#

wtf is that

solemn leaf
#

[text]${trackURL}

weak rain
#

will my bot decline if i have this feature

earnest phoenix
#

no

#

Ughh, this guy says u have to put 'node .' to make the bot go online in CMD prompt, and when i do that, it doesnt go online, wtf

#

that's not how it works

sharp thicket
#

Ye ik @earnest phoenix

solemn leaf
#

then how does it

#

bcs you legit said

crystal socket
#

did you cd into it @earnest phoenix

solemn leaf
#

[text]

earnest phoenix
#
`[hey](${link must be in ()})`
#

did you cd into it @earnest phoenix
@crystal socket is it supposed to have cd? he never said

#

link must be in ()

thick gull
#

thats not api abuse??

#

leaving servers with x members

#

isn't api abuse

crystal socket
#

@WetBax is it supposed to have cd? he never said
@earnest phoenix, 🤦‍♂️

earnest phoenix
#

that's unfair tho

thick gull
#

so??

#

discord bots are paywalled/votelocked and its not api abuse

crystal socket
#

ping

weak rain
#

but my bot is added in small servers and its irritating

thick gull
#

thats technically unfair too

spare gale
#

ping
that not check this guild :(

topaz fjord
#

I mean

thick gull
#

oh i thought this man was wanting to leave larger servers

topaz fjord
#

more servers isn't a bad thing

weak rain
#

and i can add it in big servers though

crystal socket
#

that not check this guild :(
@spare gale, which guild then?

earnest phoenix
#

i put cd in it like "cd node ."

thick gull
#

thunder

spare gale
#

ping

weak rain
#

oh i thought this man was wanting to leave larger servers
@thick gull Lmao

thick gull
#

when you get a guild add event

#

check the total members

crystal socket
#

i put cd in it like "cd node ."
@earnest phoenix, nope

#

thats not how it works

weak rain
#

hm

earnest phoenix
#

and i can add it in big servers though
@weak rain we won't help then if you do unfair stuff

thick gull
#

it might not get approved though

#

cause the testing server is small

crystal socket
#

look at a better guide

weak rain
#

@weak rain we won't help then if you do unfair stuff
@earnest phoenix oh sorry

earnest phoenix
#

pretty sure you can't leave a servwr on your own

crystal socket
#

cause its kinda hard to write-up

thick gull
#

yeah you can

#

p sure

earnest phoenix
#

in bot form

#

thats not how it works
Im new to making discord bots, and new to coding all together, so yeah, just tell me how it workds

weak rain
#

then i will not do that

earnest phoenix
#

of course don't

topaz fjord
#

a majority of traffic to bots isn't from big servers so it'll probably hurt growth

crystal socket
#

Im new to making discord bots, and new to coding all together, so yeah, just tell me how it workds
@earnest phoenix, well you have to cd into the folder's path which has your code

#

so you do cd [yourbotspath] node .

thick gull
topaz fjord
#

lmao

thick gull
#

if you want to leave

earnest phoenix
#

so you do cd [yourbotspath] node .
@crystal socket so the folder the bot is in

topaz fjord
#

why are people so angry

crystal socket
#

yeah

weak rain
#

no i dont want to do that

#

i m good

thick gull
#

ok

weak rain
earnest phoenix
#

why are people so angry
@topaz fjord you're indirectly making him get closer to adding that feature

thick gull
#

so???

#

it doesnt matter

#

its his bot

topaz fjord
#

I'm telling him not to?

earnest phoenix
#

the command prompt system said it could not be specified

thick gull
#

i'm literally just helping

topaz fjord
#

he said he wanted to leave small servers?

earnest phoenix
#

a majority of traffic to bots isn't from big servers so it'll probably hurt growth

crystal socket
#

@earnest phoenix screenshot

topaz fjord
#

yes leaving small servers will hurt growth

earnest phoenix
#

alright let's stop cuz I'm gonna eat brekfust

topaz fjord
#

that's what it meant

thick gull
#

man

spare gale
#

how to get bot self-join to guild event? (if bot joined to server - function () )

thick gull
#

guildCreate

#

event

earnest phoenix
#

self-join????

thick gull
#

@spare gale are you using discord.js?

#

he means when its added

#

to a server

spare gale
#

@spare gale are you using discord.js?
yep

#

@spare gale is it a self bot?
nope

earnest phoenix
#

three pings

#

now four

#

this guy loves quoting with pings ig

#

lmao

thick gull
spare gale
#

self-join????
Bot - Example
Example invited to guild
Event activated

thick gull
#

yes

crystal socket
earnest phoenix
#

@earnest phoenix you were just supposed to cd to the folder ans type node . not smth else

thick gull
#

you use that event

spare gale
thick gull
#

@earnest phoenix say your bot is here: C:/users/Daniel Sweetin/Desktop/DiscordBot , you would ONLY run node .

calm junco
#

hmmm

thick gull
#

depending on your code ofc

#

but it should run

#

like that

spare gale
#

and last
how to join guild by invite url? (discord.js)

thick gull
#

you cant

#

?

earnest phoenix
#

i ran it like: cd main.js (folder) node .
and i've tried just node . as well

thick gull
#

i dont think that top one works

#

and last
how to join guild by invite url? (discord.js)
@spare gale do you mean someone sends the bot like <discord.gg/dbl> and the bot joins?

restive furnace
#

cd path && node . works tho

thick gull
#

or when it joins you get an invite

earnest phoenix
#

cd (folder) node .

sacred sedge
#

no

#

they have to be on new lines

restive furnace
#

or

cd path && node . works tho
@restive furnace

earnest phoenix
#

huhhh?

spare gale
#

f

#

amm

thick gull
#

cd (folder)
THEN
node .

#

or do what free says

#

idk if it works though

spare gale
#

what

#

123

thick gull
#

it got deleted cause theres an invite in it

#

sorry

#

dont quote my message

spare gale
#

xD

earnest phoenix
#

bruv, it won't let me put new lines in command prompt, wdym ;-;

restive furnace
#

just use my method then 🤷

sacred sedge
#

you need to type the first part

#

then hit enter

#

and then type the second part

restive furnace
#

thats basic command line by the way

thick gull
#

so lodiur

#

you want the bot to join

#

when someone messages it an invite

#

?

solemn leaf
#

how can I get the length of the spotify song

thick gull
#

you can't do that, someone with manage_server needs to add it with the bot's link

spare gale
#

@thick gull
my project have 3 bots, 1 core bot and 2 fun/admin bots
core bot joining guild and inviting last 2

thick gull
#

you can't do that

earnest phoenix
#

When i put
cd (folder)
(next line)
node .
all it does is give me a long ass paragraph

thick gull
#

you need the person who invited it to invite it

spare gale
#

bot can?

thick gull
#

no

#

you can send a message on join and have a link to those bots

spare gale
#

invite other bot

thick gull
#

but bots cant add bots

spare gale
#

hmm

real nacelle
#

please send me python coding docs

#

If someone have

solemn leaf
#

google

#

it

#

cough

#

cough

real nacelle
#

I can't find proper ones on google/

#

cough?

solemn leaf
#

COUGH

thick gull
#

@solemn leaf dont tell people to googlethings:)

real nacelle
#

Thanks!!

thick gull
#

but yeah first result on google

#

._.

solemn leaf
#

your right @thick gull you google them yourself then give them the link

#

and take all the credit

thick gull
#

i got in trouble for sending a lmgtfy/telling people to google it

earnest phoenix
#

Ughhh

real nacelle
#

lmgtfy??

solemn leaf
#

how can I get the length of a spotify song

thick gull
#

@real nacelle

#

thats what it is

real nacelle
#

lol k

earnest phoenix
#

uhhhghhhhh

real nacelle
#

what's the difference between lmgtfy and google?

thick gull
#

.).

real nacelle
#

-_-'

sacred sedge
#

@earnest phoenix what was that paragraph you were talking about

#

making a bot isn't easy

#

and this is the easiest part ...

earnest phoenix
#

How do i make bot go online with command prompt?

real nacelle
#

clck ur shift key 5 times

#

and press enter

thick gull
#

???

#

type node . in the prompt

#

in the folder

solemn leaf
sacred sedge
#

How do i make bot go online with command prompt?
@earnest phoenix you said you got a paragraph when you did node . what did it say??

earnest phoenix
#

I did

thick gull
#

i didnt send them that

earnest phoenix
#

Oh, that long ass paragraph disappeared
its when i did
cd (folder)
(next line)
``node .`

sacred sedge
#

well then your bot should be online

earnest phoenix
#

It isnt

sacred sedge
#

as soon as you do node . your bot should be online as long as the cmd remains open

earnest phoenix
#

it doesnt work, m8

sacred sedge
#

¯_(ツ)_/¯

thick gull
#

can you send a screenshot?

earnest phoenix
#

How can i prove that it doesnt work?

thick gull
#

sending a screenshot

earnest phoenix
#

bruv.

thick gull
#

i dont know what you're seeing

#

i dont know if you're even on the right location in prompt

earnest phoenix
#

I can invite u to my server, and stream me putting the stuff in

#

But like, i cant send a screenshot of my bot being offline

thick gull
#

???

#

send a screenshot of prompt

#

command prompt

earnest phoenix
#

ah, aight

thick gull
#

thats an error with your code

earnest phoenix
#

When you spend half your day's internet to download Unity only to realize they removed JavaScript

#

Well, wtf is it

thick gull
#

did you do const discord = require('discord.js')

#

something along the lines of that

earnest phoenix
#

OHHH, now i know why it doesnt work

thick gull
earnest phoenix
#

you don't even know how to run stuff in node.js and you're trying to make a bot

#

i deleted the folder in Visual Studio

thick gull
#

so you dont have discord.js installed?

earnest phoenix
#

No, i do

thick gull
#

?? ? ?

#

your error is that there is no discord.js

earnest phoenix
#

dude learn javascript

#

before doing smth

lament meteor
#

its fun to see code say "learn javascript"

earnest phoenix
#

I'm a new coder, and new bot developer, u whore, LMAOO, don't be so rude, mate

lament meteor
#

coding app? pls not on the phone

thick gull
#
const discord = require('discord.js')
const client = new discord.Client()

iirc

lament meteor
#

coding on the phone is quite the sin

earnest phoenix
#

Yeah, thats in visual studio folder

thick gull
#

@lament meteor ? ? ?

gritty fractal
#

hey what should my prefix be guys

#

its t right now

#

but thats dumb

earnest phoenix
#

it should be "lad"

#

lad help
lad music

thick gull
#

t+ t- t! t. t/ t~

lament meteor
#

lad hoes are mad

thick gull
#

literally anything

#

just please not something common mmulu

lament meteor
#

tbf imma steal lad for a prefix

earnest phoenix
#

xD, aight

lament meteor
#

lad pls save me the devils are chasing

gritty fractal
#

what prefix

#

do I use

earnest phoenix
#

bruv

lament meteor
#

LAD

earnest phoenix
#

whats the name of ur bot

gritty fractal
#

its called island lol

earnest phoenix
#

i!

thick gull
#

t+ t- t! t. t/ t~
literally anything
just please not something common mmulu

gritty fractal
#

cool

thick gull
#

it's called island?

gritty fractal
#

yes

thick gull
#

i?

#

i-

#

i!

#

literally

#

anything

earnest phoenix
#

Yeah

lament meteor
#

iamstupid

earnest phoenix
#

My bot's prefix is gonna be "k!" since its name starts with a k

lament meteor
#

also @earnest phoenix i suggest learning a bit more basic js then proceeding to bot development... it will help quite a bit in the future

thick gull
#

any letter and a ! is common asf

lament meteor
#

and if ur lazy... learn how to read documentation

thick gull
#

i read documentation KEKW

lament meteor
#
thick gull
#

documentation is my bible

gritty fractal
#

is o a good prefix

lament meteor
#

anything is a good prefix

#

that is the web javascript docs but it works for both rlly just some stuff arent in node

earnest phoenix
#

also @earnest phoenix i suggest learning a bit more basic js then proceeding to bot development... it will help quite a bit in the future
Well, i don't know where to learn that stuff, and besides, i can watch tutorials, and learn how to start it
its what ive been doing with making games on roblox (don't judge its where i started scripting/coding)

lament meteor
#

i wont judge lmao i started with makin mc command blocks(not rlly the same but its kinda the same concept)

gritty fractal
#

guys thanks

#

I made my prefix o

#

thx

#

bye

earnest phoenix
#

I've done 5 tutorials on scripting for roblox, now i know the basics, and upper

lament meteor
#

the issue i have with tutorials is they might not be up to date and spoon feeding might be a bit too real

#

learning to read documentation, tutorials on the basics will be sufficient

earnest phoenix
#

Ah, well, making a bot for discord is small as crap when it comes to my goal

solemn leaf
#

how

#

can I get where the user is at on a spotify song

earnest phoenix
#

bruv.

thick gull
#

i wont judge lmao i started with makin mc command blocks(not rlly the same but its kinda the same concept)
@lament meteor haha i started with roblox lua , html , and mc command blocks

lament meteor
#

probably usin their rich presence?

solemn leaf
#

ye

#

@thick gull same

lament meteor
#

mc cmd blocks is probs harder than dbots

thick gull
#

it is

solemn leaf
#

like

#

lefit

#

the same

#

thing

lament meteor
#

the limitations are real

solemn leaf
#

and it isnt lua roblox

#

its luau

lament meteor
#

html is not a programming language

thick gull
#

shut

lament meteor
#

lua isnt roblox

earnest phoenix
#

mc cmd blocks is probs harder than dbots
I'd agree on that, ngl

lament meteor
#

just roblox uses lua

thick gull
#

lua C is roblox

solemn leaf
#

its luau

#

luau

earnest phoenix
#

I've started learning Java, Json, Python, Lua, and unity

lament meteor
#

unity is not a programming language?

solemn leaf
#

@lament meteor so what

lament meteor
#

unity uses c#

earnest phoenix
#

It isn't, not really

solemn leaf
#

unity isnt a lang

lament meteor
#

idk how does rich presence show up?

solemn leaf
#

so what do I do to get where yeah are

thick gull
#

atleast they're making it easier for datapack devs now @lament meteor

solemn leaf
#

@lament meteor

thick gull
#

you can now make custom dimensions which is pog

lament meteor
#

meh datapacks are still kinda shit... u cant customize player data yet

solemn leaf
#

this is what Im doing for other stuff

#

let trackAlbum = user.user.presence.activities[0].assets.largeText;

thick gull
#

yeah

lament meteor
#

iirc in 1.16.2 u can now

#

what does an rpc data return Aki?

#

im in class so brb

solemn leaf
#

user.user.presence.activities[0].timestamps

#

returns

#

object object

earnest phoenix
#

I've started making games on roblox, and started making discord bots, (still doing and is in development) and ive started making maps for minecraft,
i'm also trying to learn every coding lang

lament meteor
#

JSON.stringify it

weak rain
#

how to use Guild.create event

karmic compass
#

In discord.js how would I take an object from a message? Ex:
!embed {"title":"ha"}
Please mention me in the response if anyone responds thanks

weak rain
#

and psuedo code?

solemn leaf
#

1 sec

#

spotify ads

earnest phoenix
#

bruv.

solemn leaf
#

@lament meteor

lament meteor
#

i c

#

hmm

#

new Date(start).getTimestamp() ?

#

and do it for the end

solemn leaf
#

and -?

lament meteor
#

then minus the two it returns the ms lenght of the song

#

hyperClap this is why the basics are important when u are coding

solemn leaf
#

let t1 = new Date(start).getTimestamp()
let t2 = new Date(end).getTimestamp()
let time = t1 - t2

lament meteor
#

other way around

#

or u could just positive the time

solemn leaf
#

start is not defined

#

cough

#

this?

#
        let t1 = new Date(user.user.presence.activities[0].timestamps.start).getTimestamp()
        let t2 = new Date(user.user.presence.activities[0].timestamps.end).getTimestamp()
lament meteor
#

probs

solemn leaf
#

.getTimestamp

lament meteor
#

check documentation for the time thingy

#

its meant to be for gettin the ms time from jan 1991 or smthn

solemn leaf
lament meteor
#

thats in ms sad

solemn leaf
#

I just removed .gettimestamp

lament meteor
#

i mean that works

solemn leaf
#

oh

#

I should require ms

#

okay 1 sec

lament meteor
#

i mean u could either require ms or make ur own

solemn leaf
#

im missing my mute command

#

I have no idea where it went

lament meteor
#

smh

solemn leaf
#

I found it in a older verison of my bot

#

¯_(ツ)_/¯

earnest phoenix
#

bippity boppity

solemn leaf
#

@lament meteor I required ms

lament meteor
#

what now

solemn leaf
#

but it said that gettimestamp isnt a thing

lament meteor
#

huh?

#

gettimestamp probs doesnt exist it might be unders mthn

ionic dawn
#

any moderation bot that mute when a certain user with x role is pinged?

solemn leaf
#

const ms = require("ms")

ionic dawn
#

lazy to makeit

lament meteor
#

@solemn leaf read the docs

solemn leaf
#

where at

#

cant find on google

lament meteor
solemn leaf
#

lmao

#

so

#

ms(time)

#

did it just round?

#

@lament meteor ?

lament meteor
#

¯_(ツ)_/¯

solemn leaf
#

how do I fix

#

so it doesnt round

forest drift
#

ermmmm how do i make it so my bot is different on each server? cause currently its transfering over variables that should only be accessible by the specific server...

sonic lodge
#

why does your bot have server-specific commands

forest drift
#

server specific variables

sonic lodge
#

please elaborate?

forest drift
#

so, when it saves variables part of the name it uses for the database incudes the server id, same with loading items from that database

sonic lodge
#

i don't understand

#

i can't think of a case where it would be practical to have server specific commands

forest drift
#
var pingname = message.guild.id + "|" + "pingrole";

thats one of the varaibles that later gets stored in a database. when loading it uses the same name

#

i can't think of a case where it would be practical to have server specific commands
@sonic lodge server specififc variables, not commands

#

so each server can have its own specific customizable prefix

sonic lodge
#

make sure that you're grabbing the data of that server and not some other one

forest drift
#

i am, as i said, part of the name it uses when storing is the actual server id

#

so unless 2 servers have the same id idk whats going on

sonic lodge
#

if the data for one server is being used for another then there must be something wrong with the code that queries your database

#

what does that code look like?

forest drift
#

i just realised the problem lol

#

so the database variables set code variables, but nothing resets those variables, so if one servers database says "blah" and the other server hasnt got a database yet, then it wouldnt work with the current system i have and would just use the preset variables

#

idk how to explain it, but basically i was being dumb

sonic lodge
#

obviously not because you figured it out yourself

forest drift
#

yes, you definately helped

sonic lodge
#

is that sarcasm lmao

forest drift
#

no but u actualy did

sonic lodge
#

😎

forest drift
#

if i didnt speak here i wouldnt have checked

#

is there an easy way to just make it so the entire script resets to deafault for every server 🤣

#

or do i just need server only database variables

#

for everything

sonic lodge
#

from the way you described your solution it seems like that's already what happens?

forest drift
#

yeah, i just wish there was a single command that just do it... eh welcome to discord

#

ah it works now :D

#

i think i might rewrite the entire bot soon just to neaten everything up and make it more compact

sonic lodge
#

good luck with that

forest drift
#

can someone please explain how module.exports work?

#

im still using everything in 1 file

#

i tried module.exports but the tutorial doc didnt explain how to add variables to the module export that exist in a file located before the command file

sonic lodge
#

when you require a js file, the program executes the file, then returns module.exports

#

example

// ./module.js
module.exports = function() {
  return 2;
}

// ./index.js
const m = require('./module.js'); // function
console.log(m()); // 2```
forest drift
#

yeah... but lets say i have a variable only located in index, how would i get that variable on module exports?

solemn leaf
#

why

#

am I getting this error

#

UnhandledPromiseRejectionWarning: #<Object>

sonic lodge
#

you can export anything that you've declared in the file

forest drift
#

so for example, 4 files:

botname/index.js
botname/variables.json < my set variables
botname/commands/moderation/kick.js
botname/(database file)

how would i get botname/commands/moderation/kick.js to access that database?

sonic lodge
#

you have a file for your database?

#

is it a json db

forest drift
#

Sqlite

solemn leaf
#

how can I make ms not round

#

let time = ms(t2 - t1, { long: true })

forest drift
#

i use sequelize for connecting, but sqlite for storing

solemn leaf
forest drift
#
const sequelize = new Sequelize('database', 'user', 'password', {
    host: 'localhost',
    dialect: 'sqlite',
    logging: false,
    storage: 'database.sqlite',
});
const strvarsave = sequelize.define('strvarsave1', {
    name: {
        type: Sequelize.STRING,
        unique: true,
    },
    description: Sequelize.STRING,
});```
sonic lodge
#

interesting, i have no experience using sqlite

#

@solemn leaf compute the minutes and seconds yourself

forest drift
#

im just curious how i would link it to a database thats in a file before the actual module

solemn leaf
#

how

sonic lodge
#

math

solemn leaf
#

which math

sonic lodge
#

the math that ships with each grade of school

solemn leaf
#

let t1 = new Date(user.user.presence.activities[0].timestamps.start)
let t2 = new Date(user.user.presence.activities[0].timestamps.end)

forest drift
#

use the actual time milisecond code and minus it from the millisecond duration of the song

solemn leaf
#

@sonic lodge what math

forest drift
#
callTime = (new Date()).getTime();
var timerinterval = setInterval(function(){
    if(bumpcooldown===true){
    var duration = 7200000-((new Date()).getTime() - callTime );
            var milliseconds = parseInt((duration % 1000) / 100),
            seconds = Math.floor((duration / 1000) % 60);
            minutes = Math.floor((duration / (1000 * 60)) % 60);
            hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
            hours = (hours < 10) ? "0" + hours : hours;
            minutes = (minutes < 10) ? "0" + minutes : minutes;
            seconds = (seconds < 10) ? "0" + seconds : seconds;
            combined = "**`" + hours + "`** : **`" + minutes + "`** : **`" + seconds + "`**";

Thats what i use for my servers timer

sonic lodge
#

wdym "what math"

solemn leaf
#

(t2 - t1)/60

sonic lodge
#

you start with milliseconds, and you need to get to minutes

forest drift
#

7200000 is 2 hrs in millisecond, so just multiply ur time in seconds by 1k, or ur time in minutes by 60k

mystic pike
#

how do i make good bot

forest drift
#

with pain

#

and hatred

mystic pike
#

thank you

forest drift
#

never passion

mystic pike
#

I will try that next time

forest drift
#

u start with passion but lose it after the 500th error message

mystic pike
#

I haven't lost passion yet tho

forest drift
#

ur lucky

mystic pike
#

whenever I get an error I come here and people help

#

thats why I love this server so much

forest drift
#

same, but eventualy what u think is an "easy" bot turns out to be extremely hard

mystic pike
#

so far it can edit message, send embeds, generate random images and send stuff

#

basic stuff

forest drift
#

(index.js code)

const sequelize = new Sequelize('database', 'user', 'password', {
    host: 'localhost',
    dialect: 'sqlite',
    logging: false,
    storage: 'database.sqlite',
});
const strvarsave = sequelize.define('strvarsave1', {
    name: {
        type: Sequelize.STRING,
        unique: true,
    },
    description: Sequelize.STRING,
});

so for example, 4 files:

botname/index.js
botname/variables.json < my set variables
botname/commands/moderation/kick.js
botname/(database file)

how would i get botname/commands/moderation/kick.js to access that database?

#

so far it can edit message, send embeds, generate random images and send stuff
@mystic pike pls, how do u edit a message multiple times?

mystic pike
#

multiple .then s

forest drift
#

i wanna edit an embed every 7.2 seconds

mystic pike
#

.then(edit message or something I cant remember what goes here)
.then(again)

plush magnet
#

Use set interval then

forest drift
#

im doing that, but when i tried the .edits it stuffed up everything so decided id rather delete and resend than trouble shoot for a day... but now ive decided to deal with it

solemn leaf
#

@sonic lodge

#
        var minutes = Math.floor(time / 60);
        var seconds = time - minutes * 60;
        let timefull = `${minutes} Minutes ${seconds} Seconds.`
#

math?

mystic pike
#

math

sonic lodge
#

math

plush magnet
#

.edits?

solemn leaf
#

that correct math>?

sonic lodge
#

time is what unit?

solemn leaf
#

its in seconds

#

let time = (t2 - t1)

forest drift
#
var timerbumpembed = {
    color: embedtimercolor,
    title: 'Time Till Bump Avaliable',
    author: {
        name: 'DisboardReminder',
        icon_url: boticon,
        url: topggsitelink
    },
    description: combined,
    thumbnail: {
        url: boticonmix,
    },
    fields: [
    ],
    footer: {
        icon_url: boticon,
        text: "Watching for : dbr!help & !d bump"
    },
};
    
    client.channels.cache.get(channelping).send({embed: timerbumpembed});
#

what would i use to edit a message that sends that kind of embed?

plush magnet
#

Ew ew ew use the functions man its much easier

sonic lodge
#

try it and see

forest drift
#

functions?

#

oh the export object things?

solemn leaf
#

@sonic lodge

#

yes correct math

plush magnet
#

Yes discord.js has the MessageEmbed class

#

Anyways

sonic lodge
#

time is probably not seconds, but milliseconds

solemn leaf
#

lmao

plush magnet
#

If you collect the message

solemn leaf
#

so to convert to seconds I do what

forest drift
#

(index.js code)

const sequelize = new Sequelize('database', 'user', 'password', {
    host: 'localhost',
    dialect: 'sqlite',
    logging: false,
    storage: 'database.sqlite',
});
const strvarsave = sequelize.define('strvarsave1', {
    name: {
        type: Sequelize.STRING,
        unique: true,
    },
    description: Sequelize.STRING,
});

so for example, 4 files:

botname/index.js
botname/variables.json < my set variables
botname/commands/moderation/kick.js
botname/(database file)

how would i get botname/commands/moderation/kick.js to access that database?

how would i get botname/commands/moderation/kick.js to access botname/variables.json
@plush magnet this is the question im stuck on

sonic lodge
#

you use math

#

there are 1000 milliseconds in 1 second

solemn leaf
#

so

#

math.floor(time / 1000)

sonic lodge
#

try it and see

plush magnet
#

What database are you using?

forest drift
#

Sqlite

plush magnet
#

Fkn hick

solemn leaf
#

lets go I passed school

forest drift
#

hey give me a break, i only started learning databses yesterday

sonic lodge
#

congrats, onto multivariable calculus

solemn leaf
#

thanks

#

I dont know which to do

plush magnet
#

Just use couch. Its much more user friendly and it gives and saves JSON. But that's up to you. Is it sqlite3?

forest drift
#

ummmmmmmmmmmm

#

ermmmmmmmm

plush magnet
#

Or just send me a link

forest drift
#

I believe its the latest version?

#

invite link?

plush magnet
#

No. Link for the database you're using

forest drift
#
const sequelize = new Sequelize('database', 'user', 'password', {
    host: 'localhost',
    dialect: 'sqlite',
    logging: false,
    storage: 'database.sqlite',
});
const strvarsave = sequelize.define('strvarsave1', {
    name: {
        type: Sequelize.STRING,
        unique: true,
    },
    description: Sequelize.STRING,
});

thats the code for it, creates and runs the database...

#

i dont have a link

solemn leaf
#

@forest drift dms

earnest phoenix
#

hello i want a random number generator from 0 to 10 but so that 0 has an 80% chance of the rest as it comes (Discord Js)

plush magnet
#

Is sequelize the package name?

earnest phoenix
#

Discord js

forest drift
#

Is sequelize the package name?
@plush magnet yes? i think

plush magnet
forest drift
cinder sandal
#

f for my bot files

#

they are on a hard disk that is broken

earnest phoenix
#

@plush magnet thanks

plush magnet
#

@forest drift I need to go now unfortunately but take a look at this database instead. Its much easier but that's up to you

https://pouchdb.com/

forest drift
#

k

#

im planning on completely rewriting the code better anyways so will do

pure lion
#

Helo

#

I want to move the cursor so it's at the top of the box

#

Not sure how, so help me uwu

wheat jolt
#

can you attach 2 files with the same filename to a single message?

still merlin
#

What lib?

wheat jolt
#

does it matter?

#

I'm talking in general

solemn leaf
#

How can I get what time the user playing a song is on/

#

like this time

#

the 1:42

clever vector
#

Can we make same bot but different VS Code?

#

Like my friend want to code the same bot with me

#

not on vps

dusk vault
#

sup

wheat jolt
#

yes

forest drift
earnest phoenix
#

Don't want (Bot me ) to get married from ( Discord.gg )

tough lynx
#

Hi

#

How are you@grave jay

#

@grave jay I good😁

#

😁

#

Haha

#

Xd

#

Yea

#

Ooo

#

Xd

#

Oh 😆

#

Xd

summer torrent
carmine summit
#

heyo

#

i have a variable

#

but if it once executed: (console.log or smth)

#

it like resets himself

#

and decided to go undefined

#

how do i fix it?

cinder patio
#

there's no way it resets itself, you must be setting it to null

carmine summit
#

no?

cinder patio
#

show your code

carmine summit
#
if (command == "timers") {
        var sent = true
        var first = true
        setInterval(async function() {
            if (minutes <= 0 || first == true) {
              first = false
                console.log('searching')
                var getMagma = async () => {
                    var response = await axios.get('https://hypixel-api.inventivetalent.org/api/skyblock/bosstimer/magma/estimatedSpawn');
                    var magma = response.data;
                    return magma;
                }
                var magmaValue = await getMagma()
                var estimate = magmaValue.estimate
            }
            console.log(estimate)
            if (sent) {
                msg = await message.channel.send(estimate)
                sent = false
            }
            msg.edit(estimate)
        }, 1200);
    }```
#

estimate is going undefined

cinder patio
#

use const for estimate instead of var

delicate shore
#

Yes

carmine summit
#

why tho

delicate shore
#

Idk why people use var

cinder patio
#

Because var fucks everything up

midnight blaze
#

they was he used var is bad

cinder patio
#

Most of the times var can be changed to let or const

midnight blaze
#

var sent = true
var first = true

weird variables

#

simply use true

#

xd

queen needle
#
message.channel.send("F").then(msg => {
msg.react("740064337212997683")
const filter = (reaction, user) => {
    return reaction.emoji.name === ":Database:" && user.id === message.author.id;
};

const collector = message.createReactionCollector(filter, { time: 15000 });

collector.on('collect', (reaction, user) => {
    message.reply("reacted")
});
})```
is there anyway to use custom emojis in a reaction collector?
i use that and it just reacts collector bot doesnt do anything when they react
pale vessel
queen needle
#

and then the same id i used to react?

pale vessel
#

yes

#

the custom emoji id

queen needle
#

when i react it doesnt send a message saying reacted

thick gull
#

Does anyone here have a picture of an embed that broke on mobile?

floral creek
#
import aiohttp
from discord.ext.commands import MissingRequiredArgument, BadArgument, MissingPermissions, BotMissingPermissions
from discord.ext import commands
from discord import Embed, Member
from datetime import date
from googletrans import Translator


import random

import aiohttp
color = 0x75aef5

async def fetch(session, url):
    async with session.get(url) as response:
        return await response.json()

async def get_random_gif_by_theme(theme: str):
    async with aiohttp.ClientSession() as session:
        response = await fetch(session, f"https://api.tenor.com/v1/random?q={theme.replace(' ', '+')}&contentfilter=medium")
        await session.close()
        return response["results"][random.randint(0, len(response["results"]) - 1)]["media"][0]["gif"]["url"]


async def get_answer(question: str):
    async with aiohttp.ClientSession() as session:
        response = await fetch(session, f"https://8ball.delegator.com/magic/JSON/{question}")
        await session.close()
        return response["magic"]["answer"]


class Ball(commands.Cog):

    def __init__(self, bot):
        self.bot = bot

    @commands.command()
    async def ball(self, ctx, *, question: str):
        trans = Translator
        print(await get_answer(question))
        translated_response = trans.translate(await get_answer(question), src='en', dest='es')
        print(translated_response)
        await ctx.send(f"{ctx.message.author.mention}, ¡{translated_response.text}!")


def setup(bot):
    bot.add_cog(Ball(bot))
#

why it dosent translate?

earnest phoenix
#
node-pre-gyp' is not recognized as an internal or external command,

im trying to install canvas (node.js)
and this is the error

carmine summit
#

@cinder patio now it says that estimated is not defined ._.

#

help 😕

forest whale
#

did someone know how i can disabled the default login page in java spring securrity they have remove the option to disable it in the application.properties, what i just know is that i have to override the SecurrityConfig but i have know idea what i exactly have to change/override

carmine summit
#

@delicate shore

amber junco
#

@dense zephyr Bonjour!

tight plinth
#

French in shitpost k thx

delicate shore
#

Wait what

#

Why ping

eternal osprey
#

hey guys

#

how do i put a comma between the input of 4 coordinates?

#

like this: $po distance x1,y1 x2,y2

tight plinth
#

you just did lol

#

also learn how to use args

eternal osprey
#

what?

#

i mean

nocturne grove
#

if you want the true, let's say human member count, in a server, are the only possible ways to toggle fetchAllMembers to true or turning the presences intent on?

orchid vortex
#

ok damn a guy is also making hypixel timers aaaaa

eternal osprey
#

my bot only responds on the command $Po distance x1 y1 x2 y2

tight plinth
#

@nocturne grove fetch all members

eternal osprey
#

but i want it to respond on $po distance x1,y1 x2,y2

#

in python

tight plinth
#

learn python then

#

do you know what each line of your code does

#

if yes, you should be able to edit your code to make that possible

nocturne grove
#

@tight plinth yeah so no other option? Or can you fetch members in one guild only? (it's not in the docs)

tight plinth
#

idk

#

if you can't, you can't

nocturne grove
#

okay lol

tight plinth
#

but I think guild.members.fetch() fetches all members in the guild

eternal osprey
#

sorry but you are one of the worst helpers in this whole server.@tight plinth

nocturne grove
#

oh that's a smart one haha. Thanks

tight plinth
#

@eternal osprey depepnds how you define helpers

eternal osprey
#

you could also just help me a bit out

#

with a little hint.

timid flume
#

can i ask? mUmBlanket

tight plinth
#

idk if I can't see your code I can't help you

eternal osprey
#

exactly, I am not even allowed to say 'helper'

#

well you could say that instead of saying that i have to learn python

#

after asking a question

tight plinth
#

I mean if you know the language, you could be able to do it yourself

timid flume
#

how to setup vote webhook for javascript? mUmBlanket

earnest phoenix
#

is there a way to change how time work in javascript or vps? i just moved from a vps in Germany to vps in Israel, and now whenever im running the ping command it shows "Latency: 25199797ms", and whenever im doing "new Discord.MessageEmbed().setTimestamp()" its showing my time+6 hours,and its very weird because it wasnt like that when i had a vps in Germany

carmine summit
#

Why ping
you said const would fix it but its still broken

eternal osprey
#

well i am having trouple with doing that

#

trouble(

#

nvm okay.

tight plinth
#

@earnest phoenix whqt are you using to get latency

#

and no you can't change how unix timestamps works

earnest phoenix
#

Date.now()-message.createdTimestamp

#

the date is returning the date its supposed to return + 6 hours

tight plinth
#

client.ws.ping should work

earnest phoenix
#

its the api latency im doing

#

and also the message embed, and every moderation log there is

timid flume
#

how to setup vote webhook for javascript? emoji_51

nocturne grove
#

and I guess your answer is there already

timid flume
#

but i need more detail mUmBlanket

carmine summit
#
if (command == "timers") {
        var sent = true
        var first = true
        setInterval(async function() {
            if (minutes <= 0 || first == true) {
              first = false
                console.log('searching')
                var getMagma = async () => {
                    var response = await axios.get('https://hypixel-api.inventivetalent.org/api/skyblock/bosstimer/magma/estimatedSpawn');
                    var magma = response.data;
                    return magma;
                }
                var magmaValue = await getMagma()
                var estimate = magmaValue.estimate
            }
            console.log(estimate)
            if (sent) {
                msg = await message.channel.send(estimate)
                sent = false
            }
            msg.edit(estimate)
        }, 1200);
    }```
`estimate` is undefined
plush magnet
#

theres a lot you can change with that code

#
if (command == "timers") {
        var sent = true
        var first = true
        setInterval(async function() {
            if (minutes <= 0 || first == true) {
              first = false
                console.log('searching')
                var getMagma = async () => {
                    var response = await axios.get('https://hypixel-api.inventivetalent.org/api/skyblock/bosstimer/magma/estimatedSpawn').catch(err =>                      {
                    // log/ catch errors. sometimes the response can be bad or not existent
                    });
                    return response.data;
                }
                var magmaValue = await getMagma()
                var estimate = magmaValue.estimate
            }
            console.log(estimate)
            if (sent) {
                msg = await message.channel.send(estimate)
                sent = false
            }
            msg.edit(estimate)
        }, 1200);
    }
#

if you land in the catch then something with axios went wrong

#

@carmine summit

carmine summit
#

umm

#

tbh

#

i dont know how to use