#development

1 messages · Page 804 of 1

earnest phoenix
#

the first step to checking if your token is right is printing it from your app
to see if your app gets the correct token in the first place

honest perch
#

and how would i do that?

earnest phoenix
#

yikes

#

bye

#

I'm facing error

#
  if (format.isHLS || format.isDashMPD) {
             ^
TypeError: Cannot read property 'isHLS' of null
nocturne grove
#

@honest perch he means you're using console.log(token) to check if it's really available

earnest phoenix
#

when I play music and then I add bassboost it throws that error

#
                this.current = this.queue.shift();
        const format = this.current.src === 'youtube' ? 'webm' : null;

          voiceConnection.play(ytdl(this.current.id, { 
            filter: 'audioonly',
            quality: 'highestaudio',
            encoderArgs: this.bassBoost,
            format: this.bassBoost ? null : format,
            highWaterMark: 1<<25,
          }));```
honest perch
#

it doesnt print anything

earnest phoenix
#

which means that your token, in fact, isn't correct - because it isn't there in the first place

nocturne grove
#

and of course, I don't know how you called your token variable

#

hope you understood that

honest perch
#

its TOKEN=

#

it worked fine on glitch

earnest phoenix
#

lol

#

hello i have a probleme with my bot:

    at new MessageEmbed (C:\Users\Administrateur\Desktop\Neotux\node_modules\discord.js\src\structures\MessageEmbed.js:13:60)
    at Object.run (C:\Users\Administrateur\Desktop\Neotux\commands\help.js:10:27)
    at module.exports (C:\Users\Administrateur\Desktop\Neotux\event\message.js:9:20)
    at Client.emit (events.js:311:20)
    at MessageCreateHandler.handle (C:\Users\Administrateur\Desktop\Neotux\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\Administrateur\Desktop\Neotux\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:108:65)
    at WebSocketConnection.onPacket (C:\Users\Administrateur\Desktop\Neotux\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:336:35)
    at WebSocketConnection.onMessage (C:\Users\Administrateur\Desktop\Neotux\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:299:17)
    at WebSocket.onMessage (C:\Users\Administrateur\Desktop\Neotux\node_modules\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:311:20)
(node:4056) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4056) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
quartz kindle
#

@honest perch show your client.login

honest perch
quartz kindle
#

now do console.log(process.env)

summer torrent
#

@earnest phoenix show help.js 10th line

earnest phoenix
#

This ? var commandList = new MessageEmbed()

summer torrent
#

what is "MessageEmbed"

earnest phoenix
#

My bot is in discord.js v12

quartz kindle
#

its v12's version of RichEmbed

earnest phoenix
#

yes thanks you

summer torrent
#

i know

earnest phoenix
#

It's my help.js:

    MessageEmbed
} = require('discord.js');

module.exports = {
    name: 'help',
    category: 'bot',
    async run(client, message) {
        var commands = client.commands;
        var commandList = new MessageEmbed()
            .setAuthor(message.author.username, await message.author.displayAvatarURL(), client.opt.url)
            .setDescription(`Voici la liste de mes commandes | prefix: ${client.opt.prefix}`)
            .setThumbnail(await client.user.displayAvatarURL())
            .setColor(client.opt.color)
            .addField('Bot', '`' + commands.filter(e => e.category === 'bot').map(c => c.name).join('`, `', true) + '`')
            .addField('Music', '`' + commands.filter(e => e.category === 'music').map(c => c.name).join('`, `', true) + '`');


        message.channel.send({
            embed: commandList
        }).catch(console.error);
    }
}```
steel heath
#

this is a pretty shiny command ngl

#

most people here are beginners and they don't do it this clean

honest perch
#

@quartz kindle does nothing

steel heath
#

anyway you sure it's run(client, message)?

earnest phoenix
#

Umh... yes ?

steel heath
#

can you console.log(client) right after run()

quartz kindle
#

@honest perch does your console show nothing?

steel heath
#

and you don't need await there, it's not a problem but just saying

earnest phoenix
#

What ?

steel heath
#

await message.author.displayAvatarURL() here

quartz kindle
#

@earnest phoenix is that all the error says? because MessageEmbed doesnt event have anything on line 13. is your discord.js updated?

honest perch
#

nvm its fcked anyway

earnest phoenix
#

Bad when I try to download discord.js v12 there is an error so I download discord.js in another file and it works

quartz kindle
#

lol

#

what error?

earnest phoenix
#

2 minut

#
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/discord.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrateur\AppData\Roaming\npm-cache\_logs\2020-03-01T15_01_16_217Z-debug.log```
#

I don't understand this error

quartz kindle
#

you need to install git

wanton bronze
earnest phoenix
#

Umh bruh :/

quartz kindle
earnest phoenix
#

xD

#

2 minute i test to download

wooden lance
#

anyone know how to change bass when using discord.js-lavalink?

earnest phoenix
#

And after use npm i discord.js

#

? or another command

summer torrent
#

npm i discordjs/discord.js

#

for v12

earnest phoenix
#

I have this error

npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/discord/discord.js.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrateur\AppData\Roaming\npm-cache\_logs\2020-03-01T15_15_48_392Z-debug.log```
quartz kindle
#

discordjs/discord.js

#

not discord/discord.js

earnest phoenix
#

oh oki sorry

#

It's normal that freeze ? The download don't move

#

i have this error

#
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/discord/discord.js.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrateur\AppData\Roaming\npm-cache\_logs\2020-03-01T15_17_05_421Z-debug.log

C:\Users\Administrateur\Desktop\Neotux>npm i discordjs/discord.js
npm ERR! Unexpected token } in JSON at position 8336 while parsing near '..."
npm ERR!       }
npm ERR!     }
npm ERR!   }
npm ERR! }
npm ERR! '

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrateur\AppData\Roaming\npm-cache\_logs\2020-03-01T15_17_53_677Z-debug.log```
#

You hosting you bot cmd?

#

T'es fr ?

#

Nani?

#

Sorry i failed the discord

#

Yes in the server pc

summer torrent
#

cmd is not a host

pale vessel
#

one equal symbol?

earnest phoenix
#

what the fuck

#

switch exists

pale vessel
#

nintendo

earnest phoenix
#

im getting yandere dev flashbacks

summer torrent
#

^

earnest phoenix
#

I have this error ```npm ERR! Unexpected token } in JSON at position 8336 while parsing near '..."
npm ERR! }
npm ERR! }
npm ERR! }
npm ERR! }
npm ERR! '

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrateur\AppData\Roaming\npm-cache_logs\2020-03-01T15_22_21_710Z-debug.log```

summer torrent
#

show full

pale vessel
#

n v m

vernal yoke
#

anybody uses contabo ? idk is my third month where my bot lags like hell.cpu usage is low, ram usage low, but when sending a command, it takes 4-5 seconds to respond during the day, but at night is ultra fast.

pale vessel
#

what did you fix

#

(before you got that error)

#

oh

#

the answer is none of them

#

you didn't put else

#

so it returns undefined

vernal yoke
#

@woven sundial switch case for this. else if is not really good. also define as let and use the variable rar =

pale vessel
#

el.rarity is something other than those

vernal yoke
#

hol up

pale vessel
#

maybe capitalization?

spare goblet
#

Is anyone going to mention that var shouldn't be used in this case?

pale vessel
#

oof

vernal yoke
#

i did

#

mention let

#

and is wrongly used in the code above anyway

spare goblet
#

use switch case just like tuty4amxx mentioned

#

let rar;
switch(el.rarity){ // your code says rarety and rarity, which one is it?
case "Quality":
// something
break;
default:
}

earnest phoenix
#

google exists

vernal yoke
#

just tell me what youre trying to achieve

#

and

#

i perhaps can help you

earnest phoenix
#

And for my error ? ```C:\Users\Administrateur\Desktop\Neotux>npm install discordjs/discord.js
npm ERR! Unexpected token } in JSON at position 8336 while parsing near '..."
npm ERR! }
npm ERR! }
npm ERR! }
npm ERR! }
npm ERR! '

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrateur\AppData\Roaming\npm-cache_logs\2020-03-01T15_23_43_551Z-debug.log```

vernal yoke
#

i feel in the mood today

spare goblet
#

@earnest phoenix you have some weird } stuff in your json leading to a syntax err

vernal yoke
#

not here you gonna spam hard

#

pm maybe

#

oky

#

that foreach hurts XD

#

hol up lemme open vscode

spare goblet
pale vessel
#

forgot a bracket?

spare goblet
#

is stripIndents a variable? you can't just have a variable with a string..?

#

you can't just have a variable with a string, you have to do + or something in between it uhm ?

vernal yoke
#

honestly

#

i am focusing on his loop

pale vessel
#

did you refer to the module doc

vernal yoke
#

rest is up to him/her

pale vessel
#

wow

vernal yoke
#

chill a bit?

earnest phoenix
#

Okay after my bot start and when send "n!play music" :

TypeError: Cannot convert "null" to int

C:\Users\Administrateur\Desktop\Neotux\node_modules\opusscript\build\opusscript_native_wasm.js:8
var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(M
abort(TypeError: Cannot convert "null" to int). Build with -s ASSERTIONS=1 for more info.
(Use `node --trace-uncaught ...` to show where the exception was thrown)```
pale vessel
#

something is trying to convert something that doesn't exist to an integer

vernal yoke
#

anyway

#

since you did not respond to pm, i have no clue what the heck is coming from store but your else ifs are ugly. try this perhaps

let storeRarity = "";
    store.forEach(el =>
    {
        switch(el.rarity)
        {
            case "Quality":
                storeRarity = "Epique";
                break;

            case "Fine":
                storeRarity = "Légendaire";
                break;

            case "Rare":
            case "Sturdy":
                storeRarity = "Rare";
                break;

            case "Handmade":
                storeRarity = "Atypique";
                break;

            case "Sturdy":
                storeRarity = "Rare";
                break;
        }

        embed.addField(el.name, stripIndents`**- Rareté:** ${storeRarity} **- Prix:** ${el.vbucks} v-bucks **- Image:** [Clique Ici](${el.image})`, true)
    });```
#

fuck discord indentation btw

#

all good

#

just try it

pale vessel
#

case sturdy is defined twice

vernal yoke
#

rare and sturdy basically he wants "rare"

#

for both.

pale vessel
#

but the bottom

vernal yoke
#

o yea

#

i missed that

#

xD

pale vessel
#

shouldn't that be removed

#

xD

vernal yoke
#

    let storeRarity = "";
    store.forEach(el =>
    {
        switch(el.rarity)
        {
            case "Quality":
                storeRarity = "Epique";
                break;

            case "Fine":
                storeRarity = "Légendaire";
                break;

            case "Rare":
            case "Sturdy":
                storeRarity = "Rare";
                break;

            case "Handmade":
                storeRarity = "Atypique";
                break;
        }

        embed.addField(el.name, stripIndents`**- Rareté:** ${storeRarity} **- Prix:** ${el.vbucks} v-bucks **- Image:** [Clique Ici](${el.image})`, true)
    });
pale vessel
#

add js to the codeblock

vernal yoke
#

fixed ^

pale vessel
#

well yeah

vernal yoke
#

ikr but last one is better

#

@pale vessel i was in rush

#

:p

#

you are welcome

pale vessel
#

still a good code even if you were rushing

spare goblet
#

that terrible if else if else crap will make your code slow

vernal yoke
#

yea

#

you should know

#

and google a bit

#

when is the case for if elses

#

and where is the case for switches

spare goblet
#

^

vernal yoke
#

people hate switches (at work at least they do)

#

but fucking hell is so easier to read and works just fine the last edit of mine

#

@woven sundial screenshot of command working?

#

me needs png's

#

XD

pale vessel
#

sends in an svg screenshot

vernal yoke
#

LULW

pale vessel
#

dunno if that's a thing

vernal yoke
#

svg;s are awesome for animating web apps

#

i love em

pale vessel
#

yeah. i use them for some logo and webfont

spare goblet
#

lots of companies still use em

vernal yoke
spare goblet
vernal yoke
#

also could be a default in switch statement

#

in case your store returns random shizzle

#

let storeRarity = "";
    store.forEach(el =>
    {
        switch(el.rarity)
        {
            case "Quality":
                storeRarity = "Epique";
                break;

            case "Fine":
                storeRarity = "Légendaire";
                break;

            case "Rare":
            case "Sturdy":
                storeRarity = "Rare";
                break;

            case "Handmade":
                storeRarity = "Atypique";
                break;

            default:
                storeRarity = "Unknown";
                break;
        }

        embed.addField(el.name, stripIndents`**- Rareté:** ${storeRarity} **- Prix:** ${el.vbucks} v-bucks **- Image:** [Clique Ici](${el.image})`, true)
    });

#

or you can just

#

define it on top

#
let storeRarity = "Unknown";
#

and not use default

#

but whatever up to you

#

@pale vessel

pale vessel
#

wut

vernal yoke
#

you own a bot? i do own it on contabo but idk man is slowwwwwwwww. like it takes about 4-5 seconds to respond on day time, and night time is fast.

#

i use a ssd vps :\

#

i perhaps have tos witch

pale vessel
#

sure

vernal yoke
#

i pinged contabo vps all good.

pale vessel
#

i used to host it on a vps

vernal yoke
#

api is good, ram usage low

#

and cpu is fine, yet it just doesn't respond

#

i think contabo is a bit bad :\

pale vessel
#

maybe try out another alternative?

vernal yoke
#

i already paid this month. could you recommend something else?

#

bang for buck though.

earnest phoenix
#

When i send n!play music the bot crash and:

TypeError: Cannot convert "null" to int

C:\Users\Administrateur\Desktop\Neotux\node_modules\opusscript\build\opusscript_native_wasm.js:8
var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow){throw toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(M
abort(TypeError: Cannot convert "null" to int). Build with -s ASSERTIONS=1 for more info.
(Use `node --trace-uncaught ...` to show where the exception was thrown)``````
pale vessel
#

the root admin can make a demo vps for you to try

vernal yoke
#

yea but 25 a month

#

o.O

#

for 8gb ram and quad cores

#

@earnest phoenix it does say TypeError: Cannot convert "null" to int google it? not enough code to figure it out

true ravine
#

Anyone know why I'm getting very high ping on my bot?

pale vessel
#

only you should know

earnest phoenix
#

You doesnt help me ? @vernal yoke

true ravine
#

Usage stats look fine on the console so I wondered if it was something more widespread?

pale vessel
#

@earnest phoenix look at your code

earnest phoenix
#

Whichone

#

?

vernal yoke
#

@earnest phoenix u doesnt help u, because i don't see a relevant code to help, plus that console log unformatted hurts my feelings

earnest phoenix
#

Do you want of play ?

#

but this error come with n!play music

spare goblet
#

@true ravine your internet sucks

true ravine
#

Bot isn't running on my computer tho

#

And all other bots are okay

spare goblet
#

your server sucks maybe

true ravine
#

I'm rebooting it so I'll see what that does

spare goblet
#

is it a specific server or is the entire bot just lagging in all servers

vernal yoke
#

My vps sucks as well, @spare goblet just a question, any good vps providers that i might want to take a look at?

true ravine
#

I mean it's only in one I can access and isn't muted in

spare goblet
#

i use vultr, it's fine for me

#

its possible the location idk

#

it's possible that it's cuz of the *

true ravine
#

It's on an AWS server located in ohio

spare goblet
#

Not sure then?

vernal yoke
#

@woven sundial all good?

true ravine
#

Trying to ssh in now

#

Nope still high ping

#

Idk

vernal yoke
pale vessel
#

light theme

quartz kindle
#

a much better way to do it would be to store rarities in an object but oh well

#

¯_(ツ)_/¯

vernal yoke
#

¯_(ツ)_/¯

spare goblet
#

True

vernal yoke
#

honestly in programming nobody is wrong when it comes to ideas. code refractoring is always daily based XD

quartz kindle
#

hold my beer while i refactor my code for the 20th time

vernal yoke
#

^

#

happens to me every 3 days

quartz kindle
#

im in the middle of refactoring something right now lol

vernal yoke
#

lol

#

i always just go to take a massive dunk, and while on the toilet, some wild ideas come in mind of how to improve my code

quartz kindle
#

toilet and shower are the best places to brainstorm

vernal yoke
#

and eating pizza at 4 am on netflix

#

facts

viral vector
#

hey aren't you the dude who made Cookie Monsta?

vernal yoke
#

i am

viral vector
#

nice

vernal yoke
#

is it bad that i am?

#

o.O

viral vector
#

no

#

im just saying

#

because that bot really inspires me

vernal yoke
#

aaaaaaa.noice!

#

146 commands now

#

XD

viral vector
#

xd

#

also

#

i've been wondering

#

almost every popular bot website

#

has the same font and stuff..

vernal yoke
#

yea

#

discord font

#

XD

viral vector
#

do they make it themselves and host it on github or

#

do they make it with a web tool stuff

vernal yoke
#

i actually used a guy's free to use template

#

and added my stuff

viral vector
#

ah

vernal yoke
#

i plan to add dashboard, login on the site and managing

#

in vue

#

but im too lazy

viral vector
#

lol

vernal yoke
#

i just refractored all my bot commands

#

you should refresh the repo 😉

viral vector
#

i make my own websites but im still trying to learn CSS

#

ok

#

i have my own bot kermicord with only like

#

hmm

#

3 commands xd

#

cuz i started yesterday

#

i'm planning to add ban and kick

vernal yoke
#

XD

#

good luck!

viral vector
#

thanks xd

vernal yoke
#

i actually got rid of needle and get-json and used axios for all my commands

#

i updated the hell out of it in last 5 days

viral vector
#

oh

vernal yoke
#

but my vps is a poopoo... need to change it

viral vector
#

lol

#

do u think u can help me with a meme command

#

cuz i've been trying to make one for the last 3 days

#

but i eventually stopped trying to make one

vernal yoke
#

i have about 30+ meme commands lol, take a look at github? XD

viral vector
#

ok

#

xd

vernal yoke
#

honestly i made it open source for a reason XD

viral vector
#

"hitler.js"

#

lol

vernal yoke
#

kekw

viral vector
#

where did you learn to do all of this?

vernal yoke
#

reading docs, not sleeping, learning, studying?

viral vector
#

ok

earnest phoenix
#

Mood

viral vector
#

oof

vernal yoke
#

basically

#

what a friend of mine said in 2008.

#

google is your friend

#

XD

viral vector
#

xD

pale vessel
#

duckduckgo is your friend

earnest phoenix
#

true though

viral vector
#

eh

#

yeah

#

i mean if you don't want your info to be sold to advertising agencies

#

or whatever

vernal yoke
#

@pale vessel pihole, switch, opendns and opera vps

#

is enough

#

XDDDDDDDDDD

viral vector
#

lol

#

imma work on ban and kick now

earnest phoenix
#

i often avoid posting my work on sites that integrate google

#

yuck

#

Opera VPN isn't a VPN ftr

vernal yoke
#

vpn*

pale vessel
#

opera is a nono

earnest phoenix
#

It's a proxy

vernal yoke
#

it doesnt really matter honestly

earnest phoenix
#

It does

vernal yoke
#

pihole takes care of whatever

earnest phoenix
#

XD

#

i avoided putting my bot on top.gg for a while because they use google's adsense and they milk your data for money

viral vector
#

yeah

earnest phoenix
#

🙄

vernal yoke
#

paranoid hackers here

pale vessel
#

it's hard to avoid those these days

viral vector
#

lol

slender thistle
#

Is it really paranoia nowadays

vernal yoke
#

use some regex wildcards for pihole and some nice lists and youre done with spying

earnest phoenix
#

it isn't paranoia - because it's true lol

slender thistle
#

Exactly

vernal yoke
#

i use some extensions too

#

for extra spicy

viral vector
#

Discord actually looks out for anybody that trys to take your bots token

vernal yoke
#

ublock origin, i dont care about cookies and privacy badget with pihole vps

#

go mil

viral vector
#

And then they take that info down from the site

earnest phoenix
#

yeah they collaborated with github

viral vector
#

and they email u or something

earnest phoenix
#

which is really nice

vernal yoke
#

vpns

viral vector
#

yep

vernal yoke
#

why i keep saying vps

#

for christ sdake

viral vector
#

vps

#

vps

#

xd

earnest phoenix
#

yeah same tuty, ublock origin + anti adblock killer script

#

and firefox to kill off most of trackers

pale vessel
#

= profit

vernal yoke
#

i actually made a shell script for adding wildcards, a lot of them in one tap

#

or you can use the teleporter

#

but whatever

earnest phoenix
#

i was looking into getting a pihole

#

just a network level adblock

vernal yoke
#

@earnest phoenix yup

#

it will not block

#

youtube ads and fb ads

#

because they come from same dns

earnest phoenix
#

yeah i saw

vernal yoke
#

but i know a script with about 40k youtube ads

earnest phoenix
#

i watched linus' video on it

vernal yoke
#

blocked daily

#

it is a crontab basically

#

but it sucks

#

i can deal with youtube ads on my youtube vanced laughs

earnest phoenix
#

i saw a new version of it came out

viral vector
#

ok finished a kick command

earnest phoenix
#

but it's apparently

#

much much poor(er?) in features

#

yes

vernal yoke
#

i honestly use opera without vpn, and i use their built in adblocker for youtube, works like a charm

earnest phoenix
#

no?

vernal yoke
#

@earnest phoenix shit :\

earnest phoenix
#

xD

#

oop

vernal yoke
#

time to move to offtopic

#

:-s

viral vector
#

aww yeah kick command works

earnest phoenix
#

y e et

earnest phoenix
#

How would I go about preventing a cascade effect when a role's position is modified?

lyric mountain
#

If you modified it using a library more than likely it'll handle that for you

earnest phoenix
#

I am logging it

#

Funnily enough if you update a single role's position my bot ends up logging every single role position change

#

I really don't want that to happen any further

lyric mountain
#

Well

#

To change one position you have to change other's

earnest phoenix
#

I was thinking of caching the role's server ID and comparing it to execute only once

lyric mountain
earnest phoenix
#

You know some servers have well over 100 channels...

quartz kindle
#

you mean in the roles update event?

earnest phoenix
#

ye

quartz kindle
#

when a role is updated, discord sends you the entire list again. then your library gives it to you together with the old one, if the roles are cached, for you filter them out

#

what you can do is compare the position changes of all roles, and find the one whose change was different

#

its a bit complicated but doable

earnest phoenix
#

How can I get the votes of my bot and then send it to a channel

#

It could work. Thx

quartz kindle
#

wait what

#

Discord.js v12 was officially released

torn nebula
#

yes now

viral vector
#

yeet

#

it's not message.content anymore

#

it's msg.content

#

xd

#

makes programming easier

slender thistle
#

Subjective

#

I use msg in case I need another message object in on_message event

viral vector
#

i mean the older version of discord.js

#

still works

tight plinth
#

Home electricity is down wtf

quartz kindle
#

@viral vector that has nothing to do with discord version? lol

tight plinth
#

HOW

viral vector
#

i meant discord.js

#

:/

#

how what?

#

i mean my discord bot still uses the previous version

tight plinth
#

It's back

slender thistle
#

Luma

viral vector
#

oh lol

slender thistle
quartz kindle
#
client.on("message", HOUAHOUAHE => {
  console.log(HOUAHOUAHE.content)
})```
#

you can literally do that

tight plinth
#

Oh lol

quartz kindle
#

you decide how you name the message object, not discord.js

slender thistle
#
async def on_message(A_RANDOM_MESSAGE_OBJECT_I_GET_FROM_MY_LIBRARY):```
viral vector
#

ok

summer torrent
viral vector
#

yeah we know

#

the previous version still works so dont be so worried

#

tho it is recommended to rewrite the code

quartz kindle
#

we are surprised because v12 has been in development for over 2 years and it was never released

viral vector
#

lol

summer torrent
#

yes

viral vector
#

wait what

#

damn

summer torrent
#

time to v13

quartz kindle
#

this is a historic day

summer torrent
#

thereleasedateforv13 nice emoji

viral vector
#

lol

tight plinth
#

and update

quartz kindle
#

adding ^ will update to 11.6.1

#

so you will be safe

tight plinth
#

bruh

topaz fjord
#

Imagine using d.js

#

JDA gang

summer torrent
#

time to v13

tight plinth
#

time to v13
@summer torrent nice one

sick apex
#

Please

#

Someone can help me

#

?

#

5 minutes ago it works

summer torrent
sick apex
#

Cannot read property setAttributr

#

@summer torrent I know how to take a screenshot thanks 😅

quartz kindle
#

then do it, i cant see shit

earnest phoenix
#

oof

topaz fjord
#

Are you trying to add one

#

Or update one

quartz kindle
#

that means a <video> element was not found

tight plinth
summer torrent
#

time to rewrite embeds

#

oof

quartz kindle
#

i just hardcode them lol

sick apex
#

setAttribute is not definate

#

5 minutes ago it works ????

quartz kindle
#

@sick apex that means your webpage does not have a <video> element

topaz fjord
#

There is no element that had the query selector video

sick apex
#

so what is this ?????

tight plinth
#

so i have to rewrite 90% of my commands? nice! thx v12

sick apex
#

sorry

#

cannot read property 😄

quartz kindle
#

@tight plinth you can just... not update

#

lul

sick apex
#

em ?

tight plinth
#

updating = security issues fixes

#

and more

quartz kindle
#

@sick apex are you creating that tag? or does your html file have it?

#

do you ever delete that tag?

sick apex
#

no

quartz kindle
#

theres no security issues in discord.js

tight plinth
topaz fjord
#

d.js v12 breaks a lot of v11 things

sick apex
#

all js

topaz fjord
#

which is why I chose to refactor when it was still in beta

quartz kindle
#

i've been rewriting my bot with v12 for about 6 months now

#

my bot is still running on v11.3 i think

tight plinth
#

but now that it's officially release nothing will change

summer torrent
tight plinth
#

til newt update

modest maple
#

🐍 python lurks

topaz fjord
#

That's not what I mean

summer torrent
quartz kindle
#

@sick apex show your html

topaz fjord
#

I'm saying most of the shit you did in v11 isn't the same as the stuff in v12

#

typescript

#

ok

quartz kindle
#

i'll stay with v12 thanks

#

specially now that i have my v12 framework finally ready

topaz fjord
#

I'll stay with jda thanks

sick apex
#

oh I found that problem :DDD

#

I get script hygher then video so script runs 1st 😄

#

xD

quartz kindle
#

👍

main badge
#

hey

#

 case 'play':

            function play(connection, message){
                var server = servers[message.guild.id];

                server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter:"audioonly"}));
                
                server.queue.shift();

                server.dispatcher.on("end", function(){
                    if(server.queue[0]){
                        play(connection, message);
                    }else {
                        connection.disconnect();
                    }
                });
            }



            if(!args[1]){
                message.channel.send("in order to play i need you to provide a link");
                return;
            }

            if(!message.member.voiceChannel){
                message.channel.send("you must be in a channel to play the bot!");
                return;
            }

                if(!servers[message.guild.id]) servers[message.guild.id]={
                    queue: []
                }
                var server = servers[message.guild.id];
                
                server.queue.push(args[1]);

                if(!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
                    play(connection, message);
                })
        break;
    }
}); ```
#

my bots not connecting to vc but everything else seems to be working

summer torrent
#

any error?

main badge
#

well

#

when i input a link in dc

#

i get

quartz kindle
#

add a catch to .join()

main badge
#

ok

#

so wait

#

how would i do that

#

wouldnt i have to do the whole function?

quartz kindle
#

message.member.voiceChannel.join().then().catch()

main badge
#

ok

quartz kindle
#

append .catch(console.log) to the end of the .then()

tight plinth
#

for this one

quartz kindle
#

you still have RichEmbed

tight plinth
#

fuck

quartz kindle
#

its MessageEmbed in v12

earnest phoenix
#

Everyone is on v12 ? pepowot

#

no

main badge
earnest phoenix
#

im the single on v11?

main badge
#

did i do it right?

tight plinth
#

yes, they released v12 officially @earnest phoenix

summer torrent
#

v12 is best

earnest phoenix
tight plinth
#

like half an hour ago

earnest phoenix
#

FUCK!

main badge
#

@quartz kindle

earnest phoenix
#

Rewrite tommorow

tight plinth
#

good luck for rewrite lol

earnest phoenix
#

you too!

topaz fjord
#

Holy fuck that code is so smushed together @tight plinth

#

Where are the spaces

tight plinth
#

somewhere

#

but idc it works

earnest phoenix
#

the v12 is awful

#

for me

grizzled raven
#

its awful at first

#

but the more i look, the more i realise that its actually better

tight plinth
#

here are your spaces

grizzled raven
#

i'd rerwite but i need to finish another update first K_vPensiveBread

quartz kindle
#

@main badge i said at the end of the .then()

#

thats where the .then() starts and ends

distant hawk
#

https://hastebin.com/jotecaciju.js this command works fine, but how could i make it so instead of having to name your kickChannel logs, you can set it to whatever you want for that specific server

#

and have it set to any command that uses the logs channel

quartz kindle
#

you need a database to store channel ids

tight plinth
#

and after that there is userinfo too

quartz kindle
#

i mean

#

addField was not removed, you can still use it

#

of course addFields is neater

#

also, you could make use of ternary operators and array.map/array.reduce in many things

#

would make your code even neater

#

for example: .addField("is this server verified", server.verified ? "Yes" : "No")

finite bough
#

why do I get an error for using the latest discord.js version

quartz kindle
#

what error?

finite bough
#
/rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/discord.js/12.0.0/node_modules/discord.js/src/client/Client.js:40
    } catch {
            ^
SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/discord.js/12.0.0/node_modules/discord.js/src/index.js:8:11)
quartz kindle
#

whats your node.js version?

finite bough
#

I thought I forgot some bracket

#

but

#

i check and experimented

#

well

#

^13.8.0

tight plinth
#

1 command left, user info

#

And I have to go eat pizzas

#

FUUUCK

distant hawk
#

so when i do this

#

it gives me this response

topaz fjord
#

one of your commands doesn't have props.help

quartz kindle
#

@finite bough thats very weird, try updating your node.js

distant hawk
#

like my command files?

topaz fjord
#

yeah

finite bough
#

tried

distant hawk
#

none of them do

#

and they didnt do that until now

#

but that line of code has always been there

finite bough
#

it works on discord.js ^11.5.1

#

but not discord.js ^12.0.0

topaz fjord
#

what file is after prefix.js

distant hawk
#

rate.js

#

ah nevermind

#

i got it to work

#

thanks for the help though

topaz fjord
#

what was the issue

distant hawk
#

i just had to save the file

#

so it had the info it needed in it

#

prefix.js

quartz kindle
#

@finite bough you could try asking on the discord.js server

#

lmao those guys over there are being flooded with people asking how to fix their broken stuff in v12

finite bough
#

LMAO

#

ok

#

I downloaded some modules

#

to get more info on the stuff

#

I get

#

module not found discord.js

quartz kindle
#

lol

finite bough
quartz kindle
#

show your package.json

distant hawk
#

ok so ive almost perfected this

#

the prefix command

#

theres just one issue

#

any prefix can be used, whether its set or not. I want to make it so only the set prefix can be used

finite bough
distant hawk
quartz kindle
#

you're on v11.5

#

not v12

finite bough
#

ye

#

so my bot can run

#

coz at v12

#

it dies

distant hawk
quartz kindle
#

it also says you're on node v8

#

not v13

finite bough
#

I dont want meh only friend to die

#

trying out stuff

#

lmao

quartz kindle
#

well i can only help if you show the stuff as they are when the error happens lol

distant hawk
#

me?

quartz kindle
#

no

distant hawk
#

ok

quartz kindle
#

@distant hawk your code is terrible

distant hawk
#

ik

quartz kindle
#

you're loading the file over and over again on ever single message

#

that will destroy your bot

distant hawk
#

hm

quartz kindle
#

and you're never checking if the message contains the prefix

distant hawk
#

thats an issue

finite bough
#

lmao

modest maple
#

most of it is an issue

distant hawk
#

hm

#

maybe just leave it be

quartz kindle
#

and your prefix.js is also loading the file again, and then never saving it

distant hawk
#

i should probably just not do that

quartz kindle
#

ideally you should use a database, but if you prefer using json files, the correct way to use them would be like this

distant hawk
#

never worked with databases

#

how would i set one up

finite bough
#

just use like

#

fs.readjson

#

and derive the prefix

quartz kindle
#
// top of your main file
let prefixes = JSON.parse(fs.readFileSync(...))

..
..
..

client.on("message", message => {
  if(message.content.startsWith(prefixes[message.guild.id])) {
    // run command here
  }
})```
finite bough
#

bot*

quartz kindle
#

and then i your prefix command, you edit the prefixes variable and save the file

finite bough
#

bot.on

quartz kindle
#

you should never read the file multiple times

finite bough
#

^

#

I just use a different json file for each server

#

kinda storage consuming

#

but eh easy to mess around with

tranquil copper
#

do you think its good to use bungeecord as interface for bots?

#

in java

vernal yoke
#

tim is balling today, boys.

earnest phoenix
#

wat

modest maple
#

@finite bough

I just use a different json file for each server

NO

finite bough
#

I dont only save prefix ya know

pine bear
#

is there a glitch plugin for Studio code? and how do you use it?

earnest phoenix
#

yeah thats why it's time to stop, shiemi

tranquil copper
#

i am saving all data in one file.

earnest phoenix
#

stop it

modest maple
#

my people

earnest phoenix
#

get some help

modest maple
#

have you heard

#

of this thing

#

called

#

A DATABASE

pine bear
#

^

finite bough
#

I have 1?

#

like

#

a folder

#

coz

tranquil copper
#

good help this dude

#

god*

finite bough
#

pls help glitch 1st

earnest phoenix
#

you're the one that needs jesus 👀

finite bough
#

it doesnt like editing json files

modest maple
#

👏 Use 👏 a 👏 Data 👏 base 👏

vernal yoke
#

no jesus today GWrjkKappaBan

tranquil copper
finite bough
#

try 👏 using 👏 glitch

tranquil copper
#

2 files for any server my bot is on

earnest phoenix
#

writing to json/any other type of files is not only expensive on memory, but it's also expensive on storage

modest maple
#

pretty sure glitch supports DBs

finite bough
#

yes

#

it does

#

but

#

IT DOESNT UPDATE THEM

modest maple
#

pretty sure one ORM would do everything aswell

earnest phoenix
#

not only that, but writing to files is not concurrent

hoary elm
#

IT DOESNT UPDATE THEM
@finite bough ^^ lies

finite bough
#

a

hoary elm
#

I have a bot on glitch that uses a SQL database

#

Database updates fine

finite bough
#

sql

#

I use json

modest maple
#

then dont

#

use sql

#

dont use json

hoary elm
#

JSON is HORRIBLE FOR DBs

modest maple
#

JSON ISNT A DB

hoary elm
#

It's a bad attempt at a DB

finite bough
#

I am not saving like super big stuff

#

only like prefix and some ids

modest maple
#

thats the point.........................

#

you're reading and writing

#

fucking loads

vernal yoke
#

if you like objects use databases like mongodb or graphsql?

earnest phoenix
#

JavaScript Object Notation

i dont know about yall but i dont see the word database in that

hoary elm
#

Me either lol

finite bough
#

question why r we fighting on DBS again?

earnest phoenix
#

lets just say it's

hoary elm
#

It happens 🤷🏻‍♂️😂

finite bough
#

destiny

#

dun dun dun

earnest phoenix
#

bullying you into using a proper database so you don't encounter data loss and corruption

modest maple
#

yup

hoary elm
#

Mhm

finite bough
#

not working on a public bot rn

#

would shift to SQL or sqlite when I do

modest maple
#

that hurt to read

hoary elm
#

.... Lol

modest maple
#

not like sql is the type of db and sqlite is just a wrapper but yhhhhhhhhhhhhhhhhhhh

finite bough
#

just saying

#

no judgments

earnest phoenix
quartz kindle
#

discussing json vs db again?

tranquil copper
#

is yml saving good?

vernal yoke
#

XD

tranquil copper
#

or should i save data in sql or mongo db?

quartz kindle
#

although i am rewriting it to sqlite as we speak

#

but its holding quite well at 2k servers

tranquil copper
#

yml holding well at 1k servers

quartz kindle
#

my 1.2gb img folder is a bigger problem

tight plinth
#

Djs v12 is nice lmao

true ravine
#

Is there any particular reason why I'm getting such a high latency at the moment?

slate oyster
#

Bad wifi maybe?

true ravine
#

My wifi is fine and my bot isn't hosted on my computer

#

The service I'm using doesn't have any service status issues either

slate oyster
#

oh ok

quartz kindle
#

33k ms lmao

true ravine
#

Ikr

#

I assume it's something to do with discord in one way or another?

quartz kindle
#

idk, its normal for me

true ravine
#

Someone else on here was getting a 30 second ping so idk

earnest phoenix
#

No

true ravine
#

Just no?

#

Aight

earnest phoenix
#

I dont have 30k ms for pinf

#

Ping

true ravine
#

Oh I see

#

I've tried regening my token, rebooting ubuntu, commenting out everything to do with the DBL api and still nothing

#

Tis borken

earnest phoenix
#

Oh okay

hoary elm
#

@true ravine do you have any outdated modules?

true ravine
#

I'm not on djs v12 and other than that idk

hoary elm
#

Yeah that shouldn't be bad that's newest for d.js

true ravine
#

How do you check if modules are outdated?

hoary elm
#

If you're asking if there is like an actual command for it honestly I'm not sure. But usually the bot will read the versions from your package.JSON

#

If you don't have a lot of them installed you could just look at them there and reference them on the NPM Site.

true ravine
#

Oh alright thanks

hoary elm
#

For example I know snekfetch is deprecated now

#

They recommend using node-fetch instead

true ravine
#

I don't use that but I'll have a look for others

#

Found a deprecated ting

#

Thanks for the suggestion 👍

hoary elm
#

Np

true ravine
#

Still getting high latency although its down to 1-3k ms so I guess that's an improvement lol

hoary elm
#

Better then nothing you basically just have to find what else is causing high load on the bot

#

Could be functions that you don't have updated

#

Could be lots of stuff

true ravine
#

Yeah I'll have a look deeper

#

Thank you

hoary elm
#

Np

vernal yoke
#

Im having same latency issues

#

If you use mysql in your bot and call them a lot

#

It causes latency

#

Because mysql servers ramp up the cpu

#

If you use them both in same vps

modest maple
#

i have yet to have that 🤔

#

on any of the db's ive used being Sqlite, Postgresql, mysql etc...

vernal yoke
#

Every time i read for example a query based bot command mysql tanks the cpu

modest maple
#

and like some of them can and are working with somtimes thousands of calls a second

vernal yoke
#

Same on my end

#

Currently tinkering wtf i should do

modest maple
#

i mean i havent rlly got any issues with the systems

vernal yoke
#

If you type a command that calls sql is having latency?

modest maple
#

thinking bout it like we have 100ms latency on a DB that is nearly 50GB and that latency is round trip with everything else

#

like

vernal yoke
#

On my end for example

modest maple
#

you shouldnt be having a large latency

vernal yoke
#

I call !something

#

It checks a table for prefix

#

And i have latency

late hill
#

100ms is already on the large side

#

for a local database

modest maple
#

Thats the entire system

#

thats getting the request

main badge
#

hey so

modest maple
#

processing

#

etc...

#

output

#

100ms

main badge
#

my discord bot shows the green ring like its talking

#

but no music is being played

#

so

modest maple
#

the db call itself is muchhhh lower

true ravine
#

I use mysql but my cpu is sitting around 2% and my network usage is a couple of kb up and down

modest maple
#

our datomic DB is using about 20GB Ram and 20% CPU atm but thats cuz its just given as much as it wants

#

because Java and Clojure is ram munchers

true ravine
#

Pinging discordapp.com from my server results in a sub 15ms ping so the issue clearly isn't there

#

And I can also assume that there is no network issue in general with the server

modest maple
#

you will hit cloudflare

amber fractal
#

the api and pinging the website is not the same

modest maple
#

you cant just ping the site

true ravine
#

Oh right I see

#

But anyway I can assume that there isn't a slow connection to/from my server

modest maple
#

🤷‍♂️

#

or u just have blocking code

true ravine
#

Wdym?

modest maple
#

blocking code will fuck you in the ass with latency

true ravine
#

Yeah I know I meant that I can discount the issue being with my host itself

modest maple
#

ik

#

i was suggesting a diffrent explanation

true ravine
#

There seems to be a longer than normal time between starting my script and the ready event firing

timber bone
#

Guys help wit the set this

#

i change custom status to {client.guilds.size} he no say in the guilds on i delet {} he no say in the guilds on

true ravine
#

There seems to be a longer than normal time between starting my script and the ready event firing
But the only code that isn't a function definition is requiring modules and opening my sql connection

#

i change custom status to {client.guilds.size} he no say in the guilds on i delet {} he no say in the guilds on
Show us what is happening and the code you are using

neat ingot
#

anyone aware of a simple analytics tracker for discord.js ?

#

i've been writing out my own

#

but it'd be easier to just use one

amber fractal
#

analytics for what

neat ingot
#

tracking things ofc

#

commands used

true ravine
#

What things

amber fractal
#

yeah but what things

neat ingot
#

the format of commands

#

how many spawns a server is getting (my bot is rpg)

#

how many users are actively using my bot

#

at what times

#

you know, analytics.

true ravine
#

There's that influx thing

neat ingot
#

who dat?

true ravine
#

influxdb + cronograph

neat ingot
#

i google: influx js?

#

oh

#

hmm

true ravine
#

That does stuff

neat ingot
#

nah see, there are a ton of services that i can basically send my anal data to them to house

#

but ive already got databases and such setup within my project

#

be easier to just use that

#

but if there was a single module that could help

#

i'd be looking into it 🙂

earnest phoenix
true ravine
#

If you want some charts then use charts.js but that assumes you have the data in the right formats

earnest phoenix
#

now its not

neat ingot
#

yea idm about charting the data atm, ill worry about that when i plan to send it to the front end

#

atm im just looking into like, seeing what commands people are using the most

#

and the format of them

#

so i can optimize

true ravine
#

Ask peepoo when he's about

#

He might do that kinda thing

neat ingot
#

np, ty. will look out for him 🙂

true ravine
#

👍

late hill
#

You should consider having the bot login

mystic violet
#
PlayerManager Created.
C:\Users\jnsho\node_modules\discord.js\src\structures\MessageEmbed.js:433
      .flat(2)
       ^

TypeError: fields.flat is not a function
    at Function.normalizeFields (C:\Users\jnsho\node_modules\discord.js\src\structures\MessageEmbed.js:433:8)
    at MessageEmbed.setup (C:\Users\jnsho\node_modules\discord.js\src\structures\MessageEmbed.js:68:50)
    at new MessageEmbed (C:\Users\jnsho\node_modules\discord.js\src\structures\MessageEmbed.js:11:10)
    at embeds.map.e (C:\Users\jnsho\node_modules\discord.js\src\structures\Message.js:101:48)
    at Array.map (<anonymous>)
    at Message._patch (C:\Users\jnsho\node_modules\discord.js\src\structures\Message.js:101:39)
    at new Message (C:\Users\jnsho\node_modules\discord.js\src\structures\Message.js:43:20)
    at MessageManager.add (C:\Users\jnsho\node_modules\discord.js\src\managers\BaseManager.js:49:32)
    at MessageManager.add (C:\Users\jnsho\node_modules\discord.js\src\managers\MessageManager.js:29:18)
    at MessageCreateAction.handle (C:\Users\jnsho\node_modules\discord.js\src\client\actions\MessageCreate.js:13:40)```
#

Im so confused

#

Just updated to newest version of Discord.js

#

Not even creating an embed

earnest phoenix
#

whats the kick command?

mystic violet
#

<member>.kick(reason)

#

for discord.js

#

im pretty sure

#

unless they changed it in v12

earnest phoenix
#

I think it changed

grizzled raven
#

thats what it is

tight plinth
#

they changed it in v12

vague kite
#

More of a TOS question than code but how often are you allowed to change the color of a role and remove/give roles to users?? @ me thx

earnest phoenix
slender thistle
#

What's command

true ravine
#

You need the member object and you're not getting the user in the first place

true ravine
#

Wait why is the statement not in the message event lol

slender thistle
#

imo it's safe to say 1/1s for role assigning/removing is safe

#

unless it's constant

true ravine
#

I think I read somewhere the absolute minimum time for repeated actions is 5 seconds but they don't advise anything less than 120 seconds

#

Big range but I guess they don't want to overload themselves

slender thistle
#

Only vague definition was given tbh

true ravine
#

Yeah ik

vague kite
#

Shivaco I was thinking about every 5 mins??

slender thistle
#

ehh wouldn't recommend

vague kite
#

Okay thx

earnest phoenix
#

here's a simple flowchart:

  are you worried you're
   going to get banned?
Yes <=              No =>
 -> Don't do it      -> Respect ratelimits and do 
                            it if you have to
neat ingot
#

ok im just gonna ask this, cause of that quote there @earnest phoenix. my bot spawns enemies based on recent user activity, but it could happen as much as 5 minutes after they stop talking. thats still user input tho, so that'd be A-ok, right?

#

oh wth i didnt mean to tag you shiva, i puut a dot to stop it takking shivaco as well lmao

#

sorries 😗

#

i mean, my thing will never spawn a mob if no ones talking

#

but if someone says a thing and goes offline, with no one talking after, it will spawn a thing after at most 5 minutes

true ravine
#

DuckHunt does a similar thing and that's been going for ages so I assume it's okay

#

And that keeps going even if no one talks at all

tight plinth
#

plz update dblapi.js

true ravine
#

Is it borken?

slender thistle
#

Probably talking about the new d.js v12 update

true ravine
#

Oh good point

#

Cos they changed the stuff related to guild sizes didn't they

slender thistle
#

Wish I could answer that

true ravine
#

I think Tim mentioned it so it must be true

copper cradle
#

@earnest phoenix don't copy & paste code

grizzled raven
#

theres no need though

#

all you post are numbers

#

unless the api gets data based off of objects you send

mystic violet
#

orip discord.js-lavalink isnt working anymore

#

good V12

true ravine
#

It's the apocalypse nothing works anymore

mystic violet
#

I like it so far tho :))

true ravine
#

Blame corona

tight plinth
#

wait some days for updates

true ravine
#

It only officially released a few hours ago so the best is yet to come

mystic violet
#

I was updating my bot to V12, then I realized lavalink didn't work so I re-downgraded it

true ravine
#

Personally I'd wait at least a week before moving over

#

That's my plan anyway

tight plinth
#

or dont use lavalink

true ravine
#

No not the lavalink!

tight plinth
#

(lavalink works on djs v12, see how @robust trellis works)

true ravine
#

It didn't when I check earlier lmao

quartz kindle
#

i didnt notice discord.js removed the disabledEvents client option

#

that completely broke my library lmao

tight plinth
#

rly?

#

oh f*ck

quartz kindle
#

the workaround for it is quite ugly lul

neat ingot
#

is it possible for my bot to use custom emotes from my bot server in other servers?

quartz kindle
#

yes

hybrid geode
#

How do I have the whole "follow" option in my server, like y'all have here?

neat ingot
#

😮 awesome

copper cradle
#

@hybrid geode you buy a $25 dev license

hybrid geode
#

0h

#

thats uh okay then

hoary elm
#

Lol

neat ingot
#

what follow option?

#

you mean the notifications thing?

#

accouncements* w.e

tight plinth
#

he means this

neat ingot
#

yea announcements thing 😄

tight plinth
#

yea

neat ingot
#

im curious, if you follow multiple, do they all get fed into the same channel in your server, or diff channels?

#

like, its always the announcements channel right?

quartz kindle
#

i think when you click follow, you can chose which channel it goes to

#

so up to you

vernal yoke
#

tim

#

you got a minute

quartz kindle
#

i guess? lol

true ravine
#

Do any of you think that a bot that gives you xp in a discord server based on your Fitbit steps would be good? I know for many people that would involve going outside which they don't like, but it's just an idea

quartz kindle
#

that would require their permission to give your bot access to their data

#

many people will probably not like that

true ravine
#

True

#

I don't get this whole data thing tho? I don't care if people know I didn't move all day or that I searched up a recipe for pasta - does it really matter?

#

Also I don't care if people know that I went to a certain shop

#

Like who cares?

earnest phoenix
#

people don't trust each other ig

topaz fjord
#

people

#

^^

#

some people are very protective of their data

#

everyone should tbh

earnest phoenix
#

plus you'd have to be bothered with GDPR compliance etc etc which is just annoying

true ravine
#

Uuf

lethal stratus
#

any ideas why my bots are failing to start?
Error:
UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN discordapp.com discordapp.com:443

#

im rebooting the PI to see if it fixes it

#

nope

#

still broken