#development

1 messages · Page 1055 of 1

opal plank
#

how would 2 be?

stark abyss
#

./folder/folder/file

opal plank
#

no

#

./

#

that example was showing you structure

stark abyss
#

oh

opal plank
#

im really trying not to spoonfeed, but this is rather simple

stark abyss
opal plank
#

-.-

#

./ brings you ONE above, how would be 2?

stark abyss
#

../

opal plank
#

almost there, but not quite

stark abyss
#

.//

#

..//

opal plank
#

not yet

stark abyss
opal plank
#

bruh

#

./../config.json

stark abyss
#

oh

#

i don't think i understand this correctly

opal plank
#

i checked the first one to make sure it wasnt bs, but dude, its the first search you can find

stark abyss
#

bro i didn't even know what it was called

#

now i do so i can look for information

#

i was searching js path which didn't help me much

opal plank
#

read this

#

you arent looking at the docs

#

its exactly what thats called, path

stark abyss
#

oh

#

okay thank you

opal plank
#

np

stark abyss
#

thank you i figured it out thanks to you YuukiCheers

opal plank
queen folio
#

:)

old lotus
#

Confused which database to use :/ I'm using quick.db, and my bot has grown and the player base is increasing, so is database. I'm going to switch to some better database since quick.db is not working so good, and is not even good for larger applications. Which db would you recommend? djthink

lyric mountain
#

Sqlite if you want portability/constant transactions/db-based cache system

#

Postgres if you want deep relationship between entities/heavy amount of simultaneous transactions

#

Mongodb for non-relational (?) storage system

old lotus
#

I have a single database containing different players having further uservars (currently an object, including team, storage, inventory, etc.)

#

And there would be some commands user can use like for giving Pokémon an item, taking from it, depositing it to storage, and more

lyric mountain
#

If it's something you're gonna be accessing all the time (like on every message), stick to sqlite

#

It's a lot faster for short transactions

old lotus
#

oh okay

#

sqlite seems to fit in this

lyric mountain
#

Just note that it doesn't allow multi-write operations

old lotus
#

what does it mean?

lyric mountain
#

Like, only one transaction can be happening at any given time

#

So don't use multi-threadded write

old lotus
#

since its fast it shouldn't matter much?

lyric mountain
#

Yep

#

It's just a note because it can get in the way if you try to open the same db file in two processes

#

It allows N read ops tho

#

So N processes can be reading it at the same time, but only 1 can be writing to it

old lotus
#

Does it get affected by sharding? (I'm not sure if shards are multiple processes)

lyric mountain
#

So, looks like sqlite3 implemented a way to get around that limitation

cunning gorge
#

Hey im getting python in my vsc folder it promoted me to download pylint
It gave me this warning tho it installed fine:

WARNING: The scripts epylint, pylint, pyreverse and symilar are installed in '/Users/Library/Python/3.8/bin' which is not on PATH.

Is this bad since its not in path?

When I installed python it never gave me and option to add to path, i downloaded it for mac.

Please ping me if you have an answer

lyric mountain
#

If it ain't on path then it'll not be recognized by any process

cunning gorge
#

so it needs to be in path?

lyric mountain
#

Yes

cunning gorge
#

How do I add it? Since my installer itself never gave me an yadvanced options

#

to click add to path

lyric mountain
#

For mac idk, but there should be somewhere called Environment Variables or something like that

#

In Ubuntu it's "/etc/environment"

cunning gorge
#

yea, I saw a tutorials where the windows installer showed that

#

Oh ok

lost talon
#

hello peeps,, i just joined mainly bc i thought this would be a smart place to ask

so i'm a beginner who wanted a personal bot for a server just bc and i found a botkit starter thingy in glitch and decided to start from there
after reading the hears.js section and the comments in there i'm still kinda lost really
i'm not quite sure how to add commands (like how the bot should respond after hearing certain things)
please ping if you can help! i'm not asking for help to everything, just mainly how to do the controller.hears part and the let responses = part

lyric mountain
#

@lost talon ok, hold on

#

Given the let keyword, I guess you're using javascript as your bot's lang

#

What library does that controller.hears belongs to?

#

Like, what library is that botkit using?

#

Btw, and I can't stress this enough, making bots is REALLY hard if you don't have prior knowledge with the lang you'll be using or have some general programming experience

lost talon
#

i should probably learn some stuff before making a bot hhh
clearly i'm not ready for a bot

lyric mountain
#

Js ain't that hard to learn, but expect about 1-2 months of daily exercise if you don't have any ps background

#

That in the best scenario

lost talon
#

okay! thanks for the help anyway i'm just an idiot atm

lyric mountain
#

Nah, you're just starting the wonderful (and stressful) path of programming

#

There ain't idiots in this path

#

Except people who steal code without permission, those are idiots

lost talon
#

one day i'll be able to do it pfft

#

i'm not a stealer so it's good

lyric mountain
#

Wish you good luck

#

W3schools has some great tutorials and courses

lost talon
#

i'll check it out, thanks!

clever vector
#

Hello bro

#

How do i make an mod mail or Dm for Help

delicate shore
#

o

#

no idea

#

finnaly

#

😢 tears of joy

earnest phoenix
#

I will hire someone to code a discord bot in python, with a web panel, I need a developer partner.

#

Pay included.

hazy sparrow
#

can we ping roles in the title of a field in embeds?

opal plank
#

also onspot isnt a thing

hazy sparrow
#

-_-

opal plank
#

well, there are more grammar typos, but just letting you know

lusty quest
#

you can mention them bit not ping them

hazy sparrow
#

how to mention?

lusty quest
#

ohh wait not in titles

opal plank
#

same way you do there, but in description

#

just **

hazy sparrow
#

ah ok

delicate shore
#

guys

#

i acheieved somethins

hazy sparrow
#

what?

delicate shore
#

Happiness

opal plank
#

need help?

delicate shore
#

yes

opal plank
#

with?

delicate shore
#

my bot edits

#

the weebhook

#

but not make another one

opal plank
#

dont think you can edit webhooks

delicate shore
#

it does

opal plank
#

pretty sure you cant

earnest phoenix
delicate shore
opal plank
#

not editing it

delicate shore
#

@earnest phoenix token

#

oh wrong pic

#

one min

#

erwin

earnest phoenix
#

no token working

opal plank
#

thats editing the content, not the webhook

delicate shore
#

no

opal plank
#

after its being sent, you cant edit it

delicate shore
#

i am not saying test

#

i am saying name

#

and etc

opal plank
#

JSON yeah

#

change the payload

earnest phoenix
#

what

opal plank
#

though you cant edit the webhook

earnest phoenix
#

which token

opal plank
#

@earnest phoenix post code

delicate shore
#

oh

#

wait

#

nvm

#

lol

earnest phoenix
delicate shore
#

what labgauge

opal plank
#

what am i looking at?

earnest phoenix
#

turkish

opal plank
#

regardless

#

whats is that related to your error?

earnest phoenix
#

i am used this command i get error now its working

opal plank
#

dude, code

#

we cant help you if you dont provide the code

#

your JSON is malformed

#

post it here

delicate shore
#

^^^

#

not here

#

hastebin

opal plank
#

depends on how big it is

#

we arent gonna bitch about a 5 line snippet

earnest phoenix
#

Package json?

opal plank
#

idk, whatever you were trying to parse that error'ed

delicate shore
#

bruh

#

index.js

#

or main.js

earnest phoenix
#

Wait wait

delicate shore
#

ok

#

bruh

#

copy pasto

#

send the code

#

not the error

#
const shit = your.head
const send = your code```
opal plank
#

welp, good luck with that one

delicate shore
#

this kind of code

#

@quartz kindle thanks

earnest phoenix
#

Wait i am uploading code to hastübin

delicate shore
#

ok

#

wym by uploading

#

you gotta copy pasta

#

paste*

earnest phoenix
#

İts a little big uwu

delicate shore
#

ok

frozen prawn
#

how do you get data from a firebase doc?

lusty quest
#

did you read the docs?

cunning gorge
#

Hey can someone who has a mac and codes discord bots in python help me? I can't figure out this error

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I installed python 3.8 from the website, but it always throws this error.
Please ping me if you have a solution thanks!

earnest phoenix
#

does it provide mac on the website

cunning gorge
#

Yes

#

I did that

warm marsh
#

What did you try doing for this error to occur?

cunning gorge
#

Two things:

#

In the python folder I opened this after looking at a tutorial, but showed that error

#

The error also showed up when trying to download discord.py with

python3 -m pip install -U discord.py
warm marsh
#

Are you running this command as a normal user?

#

If you've not already try pretending sudo

cunning gorge
#

Wdym by that sorry, I don't know bash that well

warm marsh
#

Prepending *

cunning gorge
#

Oh well there is a admin account

#

on my computer

#

Sorry, wdym my prepending sudo?

#

And how should I do that

warm marsh
#

sudo python3 ...

cunning gorge
#

oh ok

#

and what does that do exactly?

topaz fjord
#

run with elevated permissions

warm marsh
#

^

topaz fjord
#

essentially Run as administrator on windows

cunning gorge
#

ah okay

#

So run both of those commands but with sudo in front of it right?

warm marsh
#

Yeah

topaz fjord
#

yes

cunning gorge
#

Cool

topaz fjord
#

it'll ask you for your user password

cunning gorge
#

gotcha

topaz fjord
#

when you type it won't show because security™️

cunning gorge
#

ah ok

#

And u need to run the certificate command right?

#

this file or can i ignore it

#

since some tutorials i saw didnt do that

#

others did

warm marsh
#

Idk maybe mac requires certs

cunning gorge
#

ah okay

buoyant karma
#

$nomention $title[Warn] $color[#00FCBB] $footer[Warned by $username] $description[$allowMention was warned for $message] $onlyAdmin[you don't have enough permissions]

#

I use that for warn

copper cradle
#

dude

#

you're using an android app called dbd right

sick cloud
copper cradle
#

no

bleak ledge
#

@pale peak i can do research on the error and see if i can come up with a solution

#

bye the way have you got your bot online before

opal plank
bleak ledge
#

ah

#

lol

opal plank
#

no glitch

#

glitch bad

bleak ledge
#

how are you hosting your bot?

#

Clow044么ˢᵗᵉᵖ

restive pebble
#

dont edit libraries

#

if u dont know what are u doing

#

and are u hosting on glitch?

#

and are u hosting on glitch?
@restive pebble

uncut path
#

Hy

bleak ledge
#

what

dusk sphinx
#

Glitch is banned ping idk why

uncut path
#

Hello

dusk sphinx
#

No ping is bad idea

restive pebble
#

u edited library now enjoy

bleak ledge
#

Hello

whats up

restive pebble
#

do npm unistall

#

and again install

dusk sphinx
#

Alot of copy paste

#

I don't see my bot preveil

earnest phoenix
#
(node:10740) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at Object.exports.run (C:\Users\arkan\OneDrive\Desktop\app\komutlar\korona.js:19:29)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:10740) 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: 3)```
#

can someone help?

restive pebble
#

its not an array then

#

infact its not defined

earnest phoenix
#

what

restive pebble
#

send code

earnest phoenix
#

error in there

restive pebble
#

k

#

snekfetch is gay

#

use something else

earnest phoenix
#

what

restive pebble
#

and it means u are providing invalid country

#

so there is no data

earnest phoenix
#

oof

#

how can i fix it

restive pebble
#

this api is better

sick cloud
#

could anyone suggest me a decent json schema verifier

#

joi is good but its bugging me and i want something a bit simpler

golden condor
#

Wdym

sick cloud
#

uhh a json schema verifier
as in defining a schema and then verifying data against it

earnest phoenix
#

how to use that ._.

sick cloud
earnest phoenix
#

@restive pebble

restive pebble
#

api

#

use packages then if u dont how to use api

earnest phoenix
#

download button?

fringe axle
#

Ping (@) me if you know!

marble juniper
#

show code or else we can't help much @fringe axle

#

error is not always enough

earnest phoenix
#

LOL

fringe axle
#

Okay, but I don't know what code is wrong @marble juniper

earnest phoenix
#

@restive pebble fixed error with adding '' xd

marble juniper
#

doesn't the stacktrace show you which line the error is at

fringe axle
#

Yea

restive pebble
#

k

fringe axle
marble juniper
#

btw the last error is you don't have FFMPEG

restive pebble
#

heyo

#

ytdl core?

fringe axle
#

btw the last error is you don't have FFMPEG
@marble juniper I installed it 5 times

marble juniper
#

k

restive pebble
#

the url is bad

#

are u using .getInfo?

#

@fringe axle u need to install ffmpeg-static

#

not ffmpeg

restive lily
#

how do you make an e command, where you like can do that and code in a server and it will execute it... if that makes sense?

restive pebble
#

no it dosent

#

clarify

restive furnace
#

it does, he means eval commands

#

also don't make it public, limit it only to you

#

cause guys just can do (prefix)e client.token to get your token

#

and other things

earnest phoenix
#

Discord push to talk glitch

wheat hornet
#

i am confused how to make a translate command for discord.js so anyone help me or provide some docs with good info

pure lion
#

Uh

#

Use the package?

cunning gorge
#
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I am getting this error when running the Install Certificates command file, does anyone know how to fix this? please ping if you do.

I am on a mac btw

earnest phoenix
clever vector
#

Hello Bro

#

How to make custom prefix or

#

afk command

earnest phoenix
#

How to make custom prefix
._.

clever vector
#

??????????//

earnest phoenix
pure lion
earnest phoenix
#

@earnest phoenix try index.js (lowercase)

#

sure i will try... but i already have

pure lion
#

@earnest phoenix use forward slashes

earnest phoenix
#

tf?

#

cant change status

pure lion
#

We don't know why we can't change stasus and activities

#

Use the constructor

sick cloud
#

you're not even making a client

#

read djs docs or djs guide

earnest phoenix
#

you talking to me?

#

@earnest phoenix use forward slashes
@pure lion how

fringe axle
#

@fringe axle u need to install ffmpeg-static
@restive pebble oh, okay thanks

spare mirage
#

rip

#

pc died again

#

bot gone

#

again

#

:3

earnest phoenix
#

Stil im.not aproved

#

By topg

#

ok..?

feral aspen
#

Hey guys

#

Question

#

Now I am going to host my bot using Heroku, does anyone what they mean with dyno?

#

Like the free one is 550 - 1000 dyno per hour per month

#

What does that mean>

opal plank
#

you shouldnt host on heroku

feral aspen
#

Then?

opal plank
earnest phoenix
#

lol

restive pebble
#

550 means basic time

#

1000 hours will only be awarded of u verify ur credit card

#

No debit card

feral aspen
#

Hm

#

Where do you guys host your bots?

#

What hosting service do you recommend?

earnest phoenix
#

I do heroku unfortunatly :/

#

It works fine so yh lol.

feral aspen
#

What is the best hosting service?

restive pebble
#

DO

feral aspen
#

Do what?

restive pebble
#

Digital ocean

feral aspen
#

Do you host your bot there?

uncut path
#

Hy

#

What is the server about

#

Y is it tht u hv rôles but not me

feral aspen
#

?

uncut path
#

Do we hv lvls in this server

#

Lik u r a bot developer

feral aspen
#

Yes.

#

I am a bot developer.

restive pebble
marble juniper
#

this dood came into the wrong place I assume

twin pendant
#

i use the vultr $5/month vps and i run 3 discord bots & a few socket.io things on it easily

feral aspen
#

?? Wdym @marble juniper

wheat hornet
restive furnace
#

why you use regex for that?

earnest phoenix
#

any alternative to quick.db?

restive furnace
#

@earnest phoenix yes. mongodb. keyv. sequelize. (most of i say are orms).

earnest phoenix
#

mongoose vs. mongodb

#

are they the same

restive furnace
#

yes

#

mongoose is basically just an orm

#

in js

earnest phoenix
#

lemme try mongodb

fringe axle
earnest phoenix
#

gtg run npm i mongodb

pure lion
#

@fringe axle read the pins on the plexidev server

dire abyss
#

gtg run npm i mongodb
@earnest phoenix use mongoose as the npm package to connect to mongo I use it myself and it’s great

sick cloud
#

@dire abyss mongodb on itself is fine

#

i found mongoose too complex

dire abyss
#

Really?

#

I found mongoose a dream for me

sick cloud
#

i found it a mess

#

ended up wrapping mongodb around my own functions

#

db.collection('users').find({ uuid: ... }) pretty fun

earnest phoenix
#

guys i cant install packages in VSC

sick cloud
#

run vsc as admin

dire abyss
#

schema#findOne({uuid: ...})

sick cloud
#

or use a proper console as admin

dire abyss
#

Is easier

sick cloud
#

i found the use of database reliant schemas too annoying

dire abyss
#

Just put them all in a folder

sick cloud
#

personal opinion though

dire abyss
#

It’s out of the way

#

True

#

I love mongoose ngl

sick cloud
#

that's not what i mean

#

but ok

dire abyss
#

ahyes

earnest phoenix
#

anyone making a coin system w/ mongodb because mines just not working

sick cloud
#

define the error(s), show code, etc

earnest phoenix
#

i have lol

#

i defined

#

but no errors when someone runs

#

but the command doesnt run only for mw

#

me

#

ill give the code 1 sec

opal plank
#

step debugging

earnest phoenix
#

?

opal plank
#

attach a debugger on your code @earnest phoenix

earnest phoenix
#

tf?

opal plank
#

you use VSC i assume?

earnest phoenix
#

uh yes

#

well just moved

opal plank
#

then attach a debugger on the command you running

#

this button here isnt there just for visuals

clever vector
#

Bro

earnest phoenix
#

uhh

#

ok?

opal plank
clever vector
#

How do i make my embed color

#

ramdom

earnest phoenix
#

;-;

opal plank
#

that'll help you see whats going wrong on your code

clever vector
#

like always change

opal plank
#

cuz you go each line with it

earnest phoenix
#

.setColor('RANDOM')

clever vector
#

not "RAMDOM" ?

earnest phoenix
#

;-;

clever vector
#

@earnest phoenix

pure lion
#

how do i delete all the channels with the name ticket

earnest phoenix
#

not "RAMDOM" ?
@clever vector can you spell

opal plank
#

for(channels in guild) filter => delete @pure lion

pure lion
#

thanks

remote yacht
#

which database is best for big bots

pure lion
#

made a massive oopsie

remote yacht
#

saving lots of data

opal plank
#

postgres is my go-to

#

¯_(ツ)_/¯

lusty quest
#

there is not one best

opal plank
#

depends on what you doing

lusty quest
#

MongoDB has easy Scaling with Shards, Mysql / Postgres have more forward querys

sick cloud
#

a lot of big companies use mariadb

#

i use mongodb on my bot and it's "big"

clever vector
#

@earnest phoenix Thanks bro

earnest phoenix
#

np

clever vector
#

that why my bot always like only black color

lusty quest
#

Discord Started with mongodb but then switched to Cassandra

clever vector
#

Now it rainbow

earnest phoenix
#

🙂

sick cloud
#

yeah cassandra, maria and postgres are the big ones that companies use

#

mongodb is good for medium-small scale

#

as i said i use it on my fairly big bot and have never had an issue

lusty quest
#

it could do large scale the issue is that the sharding is not extremly stable

clever vector
#
module.exports.run = async (bot, message, args) => {
    const m = await message.channel.send("Pinging...");
    m.edit(`🏓Pong... : ${m.createdTimestamp - message.createdTimestamp}ms.`);
}
#

Bro how do i set embed

#

if my ping is like that

lusty quest
#

create a embed?

sick cloud
#

read the docs

clever vector
#

Yes

#

@lusty quest

lusty quest
#

then create a embed?

sick cloud
earnest phoenix
#

you can store as a variable

clever vector
#

I want to create an embed

remote yacht
#

so which one should i use

sick cloud
#

send({ embed: { ... } })

clever vector
#

Hmm

remote yacht
#

database

sick cloud
#

@remote yacht how big is your bot

remote yacht
#

lmao

#

um

earnest phoenix
#

how do you not know how to make an embed thats the most easiest thing

sick cloud
#

unless it's 100,000+ servers i'd just use mongo

lusty quest
#

MongoDB is a little bit annoying in the beginning. Mysql is probably the easyest to setup in my opinion and Postgres is pretty stable but can be a pain in the ass to configure

remote yacht
#

its a pokemon bot

sick cloud
#

one day i'll have to move from mongo 😔

remote yacht
#

so users catch frequently

pure lion
#

aa!eval let commandFiles = msg.guild.channels.cache.filter(channel => channel.name.includes('ticket'));
for (let channel of commandFiles) {
channel.delete()
}
HELP ITS NOT WORKING AND IM IN A REAL BAD SITUATION

sick cloud
#

user caching != related to db

remote yacht
#

100 catches per min is the avg maybe?

fringe axle
#

I installed it 7 times

remote yacht
#

npm i ffmpeg

pure lion
#

HELP

sick cloud
#

is it in your system's .bin

pure lion
#

I WANT TO DELETE AAAAAAAAAAAA

lusty quest
#

how like everyone comes here at the same time with an issue

sick cloud
#

@pure lion stop using caps and read the docs

remote yacht
#

includes

#

is

#

not appplicable at ur situation

fringe axle
#

npm i ffmpeg
@remote yacht that is working but same error

pure lion
#

im in a might die situation i dont have time to read docs

remote yacht
#

all ur channel ends with -ticket

cinder patio
#

why Dice?

remote yacht
#

and does not include just ticket

sick cloud
#

.endsWith('-ticket')

#

you're welcome

remote yacht
#

^

pure lion
#

ok ty

sick cloud
#

learn javascript before making a bot

remote yacht
#

ye

sick cloud
#

strings are pretty basic

fringe axle
#

@remote yacht same error

#

;_;

earnest phoenix
#

'' and "" also `` are strings

remote yacht
#

its a pokemon bot
so users catch frequently
100 catches per min is the avg maybe

#

@sick cloud

sick cloud
#

@fringe axle try installing ffmpeg-binaries or install ffmpeg to your os' .bin

lusty quest
#

Most Databases handle this easy @remote yacht

fringe axle
#

Okay

sick cloud
#

@remote yacht user caching != db use
don't ignore me then mention me

remote yacht
#

oh u meant that to me

sick cloud
#

user caching is handled in memory by your lib ie. djs

#

a database is for holding user data like prefixes etc etc

remote yacht
#

but if i restart bot

#

then all of it will be gone

sick cloud
#

yes

#

its like that by design

#

it's called a cache

remote yacht
#

so that would be a waste

#

im making a pokemon bot

sick cloud
#

it's deleted anyways

remote yacht
#

i need to save user data

sick cloud
#

even if you dont reboot

#

save your user data to a database

remote yacht
#

thats

#

why

#

i

#

require

#

a

#

database

sick cloud
#

do you get what you're saying

remote yacht
#

i have a pokemon bot

#

users will catch the and train them

earnest phoenix
#

you already said

remote yacht
#

so

fringe axle
remote yacht
#

if there are many users

#

catching

fringe axle
#

You mean me?

remote yacht
#

i have to save their catched pokemon's data

#

somewhere

#

so i need a db

sick cloud
#

user caching is where the user profile is requested from the discord api, and contains things like their id, etc.
user data is your custom data, such as pokemon in your db

use mongodb unless you're magically the owner of a bot with 100,000+ servers
caching is stupid for that stuff, just fetch from the database every single time and you'll be fine @remote yacht

remote yacht
#

which is reliable for big data

sick cloud
#

i'm not talking on it more and some other guy can point you in the wrong direction

remote yacht
#

use mongodb
that's the answer i wanted

#

thanks for your precious time

earnest phoenix
#

i still cant install packages on VSC like i do npm install quick.db --save for example it installs it but then i keep getting the same error that its not install ect.

sick cloud
#

read the error and show us or use a console

#

are you even in the dir

clever vector
#

@earnest phoenix can i ask a question

fringe axle
clever vector
#

i want to make custom command

sick cloud
#

@clever vector dont ask to ask

fringe axle
#

He's connecting now but there is no sound

#

sure?

earnest phoenix
#

wrong person

sick cloud
#

@fringe axle read the error

fringe axle
#

OkayD:

earnest phoenix
#

@earnest phoenix can i ask a question
@clever vector sure

sick cloud
#

URL is undefined

fringe axle
#

But it it

sick cloud
#

the URL you're sending to .play or whatever is UNDEFINED

clever vector
#

@earnest phoenix I want to make Custom Command

fringe axle
#

NO

clever vector
#

but

fringe axle
#

Its not

#

;_;

clever vector
#

idk how

earnest phoenix
#

@earnest phoenix I want to make Custom Command
@clever vector ok?

fringe axle
#

Should I send the code?

sick cloud
#

ffs yes

#

it's undefined, node.js isn't broken, your code is

fringe axle
#
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("You need to porvide a link!");
            return;
        }

        if(!message.member.voiceChannel){
            message.channel.send("You must be in a Voice Channel to play music!");
            return;
        }

        if(!servers[message.guild.id]) servers[message.guild.id] = {
            queue: []
        }

        var server = servers[message.guild.id];

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




    break;
sick cloud
#

ok so before .playStream put console.log(server)

#

then send the results

fringe axle
#

Okay

sick cloud
#

it's a slow process called elimination

fringe axle
sand dock
#

Hi, how many days the bot can take to be verified on top.gg ?

fringe axle
#

@sick cloud

lusty quest
#

@sand dock 3-4 Weeks

sand dock
#

oh okey

#

thanks

lusty quest
#

+-3-7 days

sick cloud
#

there's your problem right there @fringe axle
queue is empty
so queue[0] is undefined because there's no first elem of the array

clever vector
#

Hello again how do i make my embed like gif

#

rainbow

fringe axle
#

And what I have to do? @sick cloud

earnest phoenix
#

you cannot, @clever vector

#

discord allows a single color per embed

sick cloud
#

can someone explain to this guy how elimination works

earnest phoenix
#

they're a help vampire

#

won't do much

fringe axle
#

D:

sick cloud
#

i can't wrap my head around how painful this channel is

fringe axle
#

D:

sick cloud
#

learn how to code

fringe axle
#

Im new, okay? I don't know much about coding but I learn it atm

cunning gorge
#
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I am getting this error when running the Install Certificates command file in the Python 3.8 folder, does anyone know how to fix this? please ping if you do.

I am on a mac btw

fringe axle
#

Just explain it to me please

sick cloud
#

if you don't know how to code why are you making a music bot

#

why are you even making a discord bot

earnest phoenix
#

you need to be able to logically make a conclusion what to do next, brain exercises, you being new has nothing to do with the fact that you're not able to do logical thought processing

fringe axle
#

I don't know much

sick cloud
#

click that

clever vector
#

@earnest phoenix i saw someone made embed color like a gif it rainbow

fringe axle
#

I only want do know what I have to change

earnest phoenix
#
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2020.6.20.dist-info'
Consider using the `--user` option or check the permissions.

I am getting this error when running the Install Certificates command file in the Python 3.8 folder, does anyone know how to fix this? please ping if you do.

I am on a mac btw
@cunning gorge
i have almost to no experience with py, however this error seems to be a permission error, run your command with sudo

#

this will elevate the command

cunning gorge
#

ah ok thx

earnest phoenix
#

can discord add proper message quoting pls

#

when they said they were adding quoting i was hoping it was going to be an actual reference to the message like slack has

lusty quest
#

someone here who cache mongoose with redis?

fringe axle
#

No one? Okay ;-;

sick cloud
#

i've considered making a bot that tries to quote a msg if you send the message id or the message url
but it's probably useless lol

earnest phoenix
#

probably

#

would be so much more useful if proper quoting was baked in the client & api

quartz kindle
#

@fringe axle your server.queue is empty, because you never added anything to it

#

you have a link supplied via args[1], add that link to the queue

fringe axle
#

But how?

quartz kindle
#

queue is an array

#

arrays have a push method

fringe axle
#

Yes

quartz kindle
#

array.push(something)

fringe axle
#

Okay?

quartz kindle
#

that will add something to the array

fringe axle
#

And where I have to add it? (Like I said: Im new in coding)

quartz kindle
fringe axle
#

Uhgg

#

Now im confused

sick cloud
#

you won't get anywhere tim

#

they don't know js

quartz kindle
#

server.queue is an array

fringe axle
#

Yea

cunning gorge
#

@earnest phoenix so this is the command I run

cd /Applications/Python\ 3.8/
./Install\ Certificates.command

Does adding sudo do the trick so

sudo cd /Applications/Python\ 3.8/
./Install\ Certificates.command
quartz kindle
#

server.queue.push(some url here)

fringe axle
#

Okay

#

Oh

cunning gorge
#

also it runs anohter command

earnest phoenix
#

you're running sudo on cd

cunning gorge
#

-- pip install --upgrade certfi

fringe axle
#

server.queue.push(some url here)
@quartz kindle and in which line and whih url? ;_;

earnest phoenix
#

you can already cd into the dir, you don't need sudo on cd

cunning gorge
#

oh ok

earnest phoenix
#

you need the sudo on the latter command ig

cunning gorge
#

it auto prompts that tho

earnest phoenix
#

run them one by one

pure lion
#

itsnotworking

cunning gorge
#

When i run the first one it runs the second one

earnest phoenix
#

i know

#

that's why i said run them one by one

#

first cd

#

then sudo ./...

cunning gorge
#

oh

#

so like

cd /Applications/Python\ 3.8/

then

sudo ./Install\ Certificates.command

?

earnest phoenix
#

should be

cunning gorge
#

are the backslashes correct?

earnest phoenix
#

try it and see

#

i dont know

cunning gorge
#

okie thxx

earnest phoenix
#

play around with it

#

but yeah that's the right direction

cunning gorge
#

gotcha thc

pure lion
#

aa!eval const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket'));
for (const chn of channels) {
chn.delete()
}

#

its returning undefined

astral yoke
#

hi im having this issue (node:12900) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined at new MessageEmbed (C:\Users\scltxn\Downloads\dogbot\node_modules\discord.js\src\structures\MessageEmbed.js:13:60)

earnest phoenix
#

have you tried reading the error

pure lion
#

cry please help

#

i made an oopsie

#

const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket'));
for (const chn of channels) {
chn.delete()
}

#

its not deleting and i accidentally may have made 100 channels or so

astral yoke
#

if its in the message embed i dont know what todo cry

earnest phoenix
astral yoke
#

@earnest phoenix read it you have to download python correctly

earnest phoenix
#

im using js

#

not python

astral yoke
#

ik

#

but packages require python

#

some are built off of python

earnest phoenix
#

oof

#

soo uhh

astral yoke
#

and requires it

earnest phoenix
#

what do i do?

#

read your damn error

astral yoke
earnest phoenix
#

it clearly says what to do

#

it clearly says what to do
@earnest phoenix smh

#

i caught it in a gif, there's literally instructions

#

i sincerely doubt you cannot do the same

#

im not good at understanding things properly ok

#

no, you just do not want to do things yourself

#

because that is effort

pure lion
#

how do i cache all the channels in a guild

#

pleraeess

earnest phoenix
#

they should be automatically cached when you receive the READY dispatch

pure lion
#

i dont want to die

#

ok

earnest phoenix
#

tldr if there are any missing you can either fetch them with REST or just restart the bot

pure lion
#

it did nothing

earnest phoenix
pure lion
#
const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket')).forEach(e => e.delete())
marble juniper
#

Any buddy have glitch.com premium membership weirdsip weirdsip
@earnest phoenix no and never would buy

earnest phoenix
#

Install

pure lion
#

@earnest phoenix didnt work aaaa please help

earnest phoenix
#

what do i do?

#

literally install python

#

stop being a help vampire

#

@pure lion are you sure channels are missing

pure lion
#

i logged the cache and it was just the message channel

#

no other channels

earnest phoenix
lusty quest
#

you probably need to enable channel caching then

pure lion
#

*dying*

#

h ow

lusty quest
#

wait nvm this was d.js-light

astral yoke
#

can i ask why this is doing this in message embed code (node:3516) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined at new MessageEmbed

pure lion
#

im using djs light

earnest phoenix
#
const channels = msg.guild.channels.cache.filter(chn => chn.name.endsWith('-ticket')).forEach(e => e.delete())

@pure lion -ticket bloblul

lusty quest
#

then enable channel caching @pure lion

pure lion
#

how

lusty quest
#

read the docs

earnest phoenix
#

ffgfgfgfgfgfgff

#

read the dovs

marble juniper
#

just fetch the channel bruh

earnest phoenix
#

ccsdcs

lusty quest
#

@astral yoke looks like your client is not defined

pure lion
#

i dont have time to read the dopcasdvcd

earnest phoenix
#

[jk

marble juniper
#

fetch the channel

#

smh

lusty quest
#

he want to delete 100 channels

pure lion
#

i need the ID and i cant get it

earnest phoenix
#

they don't know the id at runtime

#

i dont have time to read the dopcasdvcd
@pure lion so leave it

lusty quest
#

so fetching them is stupid

earnest phoenix
marble juniper
#

k

astral yoke
#

@lusty quest but how would i define it? its in discord.js node module its self

lusty quest
#

@astral yoke your code?

astral yoke
#

oh wait i see why

#

nvm

#

got it

lusty quest
#

@pure lion enable client option enableChannels

#

👍

fringe axle
#

@quartz kindle no error but he is connecting to the Voice Channel and leaves instantly

pure lion
#

like

astral yoke
#

whyd you ping tim

fringe axle
#

Because he helped me before

pure lion
#

new client({enableChannels:true})

#

@lusty quest

#

?

#

AAAAAAAAA THANK FUCK IT WORKED

earnest phoenix
#

w8-2903df0-24-

lusty quest
earnest phoenix
#

still get errro

lusty quest
#

@fringe axle sure there is no error?

earnest phoenix
#

error

lusty quest
#

@earnest phoenix node? if yes did you added python to the path?

earnest phoenix
#

who needs mongodb when you fixed quick.db without scrolling through stackoverflow 😎

quartz kindle
#

did you install windows build tools?

#

@earnest phoenix

#

npm install -g windows-build-tools

fringe axle
#

@fringe axle sure there is no error?
@lusty quest no error

#

But I did a log

lusty quest
#

@earnest phoenix i still prefer mongodb. just added a redis server for caching the results

fringe axle
#

He thinks its 0 i think and thats why he's disconnecting

#

But how can I fix it? ;_;

lusty quest
#

i cant fix it without knowing the code

fringe axle
#

Wait

#

Coming

#
case 'play':

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

            console.log(server)

            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("You need to porvide a link!");
            return;
        }

        if(!message.member.voiceChannel){
            message.channel.send("You must be in a Voice Channel to play music!");
            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;
earnest phoenix
#

@fringe axle are you using that one youtube tutorial?

#

ok yes this is that youtube tutorial

#

just to inform

#

that is outdated

#

and doesnt work

fringe axle
#

No

#

Still no

earnest phoenix
#

in discord.js 12

fringe axle
#

I don't use 12

earnest phoenix
#

its the exact ssame code as the gvideo tutorial by code lyon

#

how can y ou say you arent copying

fringe axle
#

I didn't say that I don't copy it

#

@lusty quest and? Do you know the problem?

quartz kindle
#

v11 will stop working soon btw

lusty quest
#

need to read the code first

quartz kindle
#

you have to change to v12 anyway

fringe axle
#

v11 will stop working soon btw
@quartz kindle UHm

#

But when?

lusty quest
#

also yes better update to V12 before its to late

#

7.10

quartz kindle
#

october

fringe axle
#

Okay

#

Time enough

#

I used v12

#

But many things aren't working there

quartz kindle
#

they are

#

but if you use v11 code in v12 it wont work

lusty quest
#

there is just a agressive caching behavior

quartz kindle
#

v12 is different

lusty quest
#

and some smaller changes to how some stuff works

fringe axle
#

okay

#

But whats wrong with the music code now? ;_;

lusty quest
#

but the discord.js guide got a good explanation in what changed

fringe axle
#

Anyone?

earnest phoenix
#

@fringe axle you are getting a undefined function error?

fringe axle
#

No

#

Still not

earnest phoenix
#

what error are you gettinhg

fringe axle
#

console.log(server) helped

earnest phoenix
#

did you install windows build tools?
@quartz kindle no

lusty quest
#

@earnest phoenix then it will still fail

earnest phoenix
#

ok i will download

#

or install

quartz kindle
#

do what i said

earnest phoenix
#

k

quartz kindle
#

npm install -g windows-build-tools

fringe axle
#

;_;

earnest phoenix
#

ok

lusty quest
#

@fringe axle remove your shift function it will remove the first item in your array

fringe axle
#

Okay

quartz kindle
#

thats not the issue tho, the code is correct from what i can see

fringe axle
#

UHM

lusty quest
#

array.shift() removes the first item in the array, i guess this could be a issue

fringe axle
#

HELP

#

MY CONSOLE

#

EHM

#

MY CONSOLE

#

Is spammed

quartz kindle
#

the removal is intentional there, since he already used queue[0] in the playStream

lusty quest
#

ohh right makes sense

quartz kindle
#

now hes in an infinite loop

#

because queue[0] is never removed

lusty quest
#

now i get why its there

quartz kindle
#

the problem is the end event being fired imediatelly

lusty quest
#

maybe the song is invalid or something like this

fringe axle
#

Means?

lusty quest
#

try a different url?

fringe axle
#

uh

#

Okay

earnest phoenix
#

@fringe axle if you make the code work then dm me ..

lusty quest
#

how to steal code 101

clever vector
#

how to make like have time at the buttom of the embed box

fringe axle
#

Still the same problm

restive pebble
#

setTimestamp

fringe axle
#

@quartz kindle

quartz kindle
#

try adding this

fringe axle
#

Okay?

quartz kindle
#

server.dispatcher.on("error",console.log)

fringe axle
#

Where?

clever vector
#

.setTimestamp?

restive pebble
#

Ur in v11?

clever vector
#

Nope

fringe axle
#

Where I have to add it?

restive pebble
#

Not u

fringe axle
#

Yes

quartz kindle
#

right before the .on("end"), add the .on("error")

fringe axle
#

Okay

clever vector
#

@twilit rapids

fringe axle
#

uhm

restive pebble
#

.setTimestamp?
@clever vector yes

clever vector
#

@quartz kindle

fringe axle
#

huh

quartz kindle
#

and put back the .shift() if you removed it

clever vector
#

my setTimestamp and?

#

how do i make setTimestamp

fringe axle
#

and put back the .shift() if you removed it
@quartz kindle I already putted it back

lusty quest
#

it automatic creates a timestamp. but you can supply one

fringe axle
#

Same problem Tim

quartz kindle
#

any logs?

fringe axle
#
server.dispatcher.on("error",console.log)
            server.dispatcher.on("end", function(){
#

No

restive pebble
quartz kindle
#

try .on("debug") instead of error

fringe axle
#

ok

#

Same problem

restive pebble
#

.on(end , reason=>console.log(reason))

fringe axle
#

Instant disconnect

quartz kindle
#

any logs?

fringe axle
#

No

restive pebble
#

Epic

quartz kindle
#

then try what boeing said

fringe axle
#

Im back in a few minutes

#

Okay?

restive pebble
#

Rip

fringe axle
quartz kindle
#

what is that

opal plank
#

spam

fringe axle
#

But hes connecting

#

what is that
@quartz kindle My console

quartz kindle
#

but from what

restive pebble
#

Reason

fringe axle
#

xD

quartz kindle
#

"end" not end

fringe axle
#

Oh

restive pebble
#

End is defined

opal plank
#

end it

fringe axle
#

Still instant disconnect

#

;-;

opal plank
#

also why 2 event responses?

#

merge them

restive pebble
#

If it's stopped on song end it is undefined

quartz kindle
#

idk, something is wrong with the stream or with ytdl

fringe axle
#

oof

restive pebble
#

So it's problem with stream

fringe axle
#

:O

quartz kindle
#

whats your ytdl version?

fringe axle
#

I did npm i ytdl-core:0

restive pebble
#

why are u playing connection

fringe axle
#

uhm

#

Because

#

¯_(ツ)_/¯

restive pebble
#

What is connection

quartz kindle
#

its a recursive function

restive pebble
#

Oh it's a ffunction

#

Nvm

quartz kindle
#

he joins the channel then sends the connection to the function

#

but its all copied code anyway

restive pebble
#

.play(ytdl(some random url))

fringe axle
#

uh

#

Why?

earnest phoenix
#

he doesnt now what he is doing he is copying it from a youtube video

restive pebble
#

K

pure lion
#

connection.play('./peepeepoopoo.flac')

earnest phoenix
#

i did the same but at most parts i know what im doing and my code wass still wrong

opal plank
#

doesnt youtube have a point system for daily quota too?

restive pebble
#

nvm

opal plank
#

not sure why people use those libs since they'll get limited rather quickly

earnest phoenix
#

@fringe axle music feature in a bbot isnt that important most people have music bots.

#

and i recommend you to properly learn

#

instead of copying

restive pebble
#

Log the url

lusty quest
#

the yt api is a nightmare this is why its easyer to use a lib

restive pebble
#

Well if it was bad link ytdl would throw error

opal plank
#

not what i meant super, its more about, why use youtube rather than something else

#

their limitations on queue is quite strict

fringe axle
#

@fringe axle music feature in a bbot isnt that important most people have music bots.
@earnest phoenix but I wanted to make musci D:

restive pebble
#

What host u hosting

#

Local?

opal plank
#

a spotify wrapper seems more resonable than youtube

fringe axle
#

huh? yes.

#

Local

restive pebble
#

Ok

earnest phoenix
#

@fringe axle you wanted to create a music bot/

fringe axle
#

Yes

earnest phoenix
#

just for yourself?

fringe axle
#

It's only a test to learn it ;_;

restive pebble
#

read the docs

earnest phoenix
#

or did yoiu wanted to puiblish i t as a bot

quartz kindle
#

try this

earnest phoenix
#

i have the docs for musci bot

quartz kindle
#
let stream = ytdl(url here, {filter:"audioonly"})
stream.on("info",console.log)
stream.on("progress",console.log)
connection.playStream(stream)
fringe axle
#

Yours with mine?