#development

1 messages ยท Page 766 of 1

restive furnace
#

to get 31 days

lofty vine
#

don't use uptimerobot

#

instead use statuscake

#

its reliable

restive furnace
#

you van just use http.pingitself

lofty vine
#

no

golden condor
#

Yeah well I need to use 2 bots so it's only 15 days each @restive furnace

lofty vine
#

it will go down after 12 hours

restive furnace
#

no?

golden condor
#

@lofty vine how do I use statuscake?

restive furnace
#

@golden condor

golden condor
#

I am interested

lofty vine
#

@restive furnace create a account there!

restive furnace
#

21 days for EACH bot

lofty vine
#

simple

restive furnace
#

i talked to cx

earnest phoenix
#

hOw I cAn cReAtE mY bOt ?

lofty vine
#

lel

restive furnace
earnest phoenix
#

i know

#

BUT

lofty vine
#

documentation!

#

latest

golden condor
#

@lofty vine how do I setup statuscake

lofty vine
#

u know how to setup uptimerobo?

golden condor
#

Yes

lofty vine
#

its similar to it

earnest phoenix
#

reeeeeeeeeee

restive furnace
golden condor
#

@earnest phoenix I been through the same

#

I prefer node

restive furnace
#

its better for starters

golden condor
#

It's much easier to work with tbh

#

I was a starter when I first used it

earnest phoenix
#

i use visual code for long

lofty vine
#

js must be a better way i guess

restive furnace
#

node is easier to work with, but d.py is for starters

lofty vine
#

yea

scarlet maple
#

all language libraries have the same features right?

restive furnace
#

no

scarlet maple
#

So some have more?

restive furnace
#

no

scarlet maple
#

bruh

restive furnace
#

all coding languages has mostly same fearyres, but they can differ to each one, and yeah. and if you mean discord api interacting libraries they (almost) all cover the api 99.999999%

scarlet maple
#

yrah i meant discord library

lofty vine
restive furnace
#

Discord.py, JDA and Discord.JS (Master) covers the api fully

lofty vine
#

ye

scarlet maple
#

good thing I use discord.py , its much easier than js

lofty vine
#

py?

#

yea go ahead

scarlet maple
#

python lib

restive furnace
#

depends on coder, its not really easier, just a coder dedicison

lofty vine
#

use pip to install it

restive furnace
#

i use c# and c++ mostly

scarlet maple
#

for discord bots?

restive furnace
#

c# for discord bots

scarlet maple
#

damn nice, I'll learn it in future for game dev

restive furnace
#

Thats why i know em

#

(cause im using unity xd)

scarlet maple
#

xd nice

#

I'd be learning all languages but school REEEEE

restive furnace
#

Not worth.

#

just pick your main language(s)

scarlet maple
#

Tbh I want to learn all , every language has its own strengths

restive furnace
#

but you can try em if you want

scarlet maple
#

i mean not "ALL" lol

prime cliff
#

c# for discord bots is very nice mm not biased at all with 5 c# bots

scarlet maple
#

I want to learn C++ so bad but then people say not to learn it , learn newer languages. bruh

mossy vine
#

have fun learning esolangs

restive furnace
#

C++ is good for serverside

#

and discord bots are like server so its k

mossy vine
#

C++ is just good overall

#

but developing with it takes a long time

scarlet maple
#

Learn dogescript

restive furnace
#

(even tho theyre clients)

scarlet maple
#

I wouldnt mind learning java in advance too altho people say its shit , I want to make minecraft mods lol

restive furnace
#

C langs are still 1st in developement even tho they are little outdated (c/c++ not c#) and then java, py and js

mossy vine
#

wdym first

scarlet maple
#

js is like the most hot language

#

like most people use c ?

mossy vine
#

no

#

js and py are the most used langs

scarlet maple
#

I know 5 programmers personally , they all use C++ lol

#

py is good for data but for rest of the things , ehhh

prime cliff
#

not c# my dude .net core is on a roll they even have website stuff for c# and you can run shit on linux now so ๐Ÿ˜”

scarlet maple
#

js is hot as far as i know

mossy vine
#

.net core is hot

scarlet maple
mossy vine
#

but programming with js and py is FAST

#

like REALLY FAST

#

and easy

scarlet maple
#

if you mean developing wise , yeah fast

prime cliff
#

So is c# if you have bigbrain

mossy vine
#

performance? meh

scarlet maple
#

but python apps spped is so sloow

mossy vine
#

python is slow as shit

scarlet maple
#

ikr

#

what about java ? How's it

prime cliff
#

oof java

scarlet maple
#

ikr programmers on youtube seem to roast it

prime cliff
#

Probably not the best choice for discord bots in general

scarlet maple
#

yeah obviously but ive seen someone advertise "Discord bot made with Java"

modest maple
#

Idk why you want the speed diffrence

scarlet maple
#

hopefully they used javascript and were too dumb to notice the difference

#

its important in apps

modest maple
#

Like the speed of python Vs c# etc... Is just almost insignificant

#

For bots

scarlet maple
#

yeah not much diff.

modest maple
#

Like indistinguishable

scarlet maple
#

Talking about programming in general

modest maple
#

I mean python is still quick like for most stuff you won't notice

scarlet maple
#

I wanted to ask people here if they use json or dbs

#

how much faster are databases?

#

cause I'd want to port over but I'll need to learn

#
  • extra hosting
modest maple
#

Well there is legit no comparison

scarlet maple
#

damn

modest maple
#

Because jsons arnt supposed to be dbs

scarlet maple
#

i thought json was too slower

#

oh

modest maple
#

Jsons can corrupt easily and are for static data

scarlet maple
#

I mean for storing stuff primarily

modest maple
#

Depends on data

#

If it's static or dynamic

scarlet maple
#

wdym by dynamic?

modest maple
#

Wether that data will ever change

prime cliff
#

They only corrupt if you don't use it properly like trying to write to the same file at the same time like different shards

modest maple
#

Static basically just means the data doesn't change often if ever

scarlet maple
#

yeah for discord bots its too dynamic

modest maple
#

Discord bots storage is dynamic usually yes

#

Unless like a config file

scarlet maple
#

i don't think json corrupts a lot in python as long as I use "with open()"

#

instead of opening and closing

modest maple
#

Just don't use Jsons as Dbs

#

And with open open and closed files

scarlet maple
#

I already did and so far working pretty good

#

so level system and economy on db?

modest maple
#

Yh

#

Like SQL lite works well for python

golden condor
#

Can I have some help making a mute command

modest maple
#

In-built aswell

prime cliff
#

Check role perms
get mute role
create mute role if not found
give user role

Simple Cxllm

scarlet maple
#

Which language @golden condor

golden condor
#

Discord.jw

scarlet maple
#

well as Buildberb said , same idea

golden condor
#

@prime cliff I am not sure how to make role with certain perms

scarlet maple
#

user muting is very easy thanks to discord

golden condor
#

Using code

prime cliff
#

Check your lib docs for channel overwrite permissions

golden condor
#

Ok

#

Discord.js?

prime cliff
#

Then just apply the mute role with deny send messages and deny add reactions to each channel

restive furnace
#

every lang can be ran on linux

#

fun facto

golden condor
#

guildCreateRole?

honest karma
#

My brain just isn't working...I just want to change a value of a row in my database but I want to require the id first before I change it like `;name [id] :(

modest maple
#

Well most DBs require a key to change anyway

#

You need something to tell the dB which row to change

scarlet maple
#

I'm thinking of starting work on database, any recommendations?

golden condor
#

Yeah same @scarlet maple

honest karma
#

That's what I'm trying to do

modest maple
#

SQL lite is good for python and starting with dbs

golden condor
#

I tried mongodb but it didn't go so well

#

I use js

scarlet maple
#

Is mysql good enough ?

modest maple
#

Any rlly

#

SQL is good for beginners

#

And is in-built already with python

golden condor
#

Any for js?

modest maple
#

Sql

#

SQL lite is for js awell

#

Like most SQL programs r

#

If you don't like mongo

scarlet maple
#

Mysql is in my school syllabus so I'd rather work on that

modest maple
#

It's not too much different for lite so yh

#

Just sometimes a lil more picky

scarlet maple
#

Are there any good sources for learning ?

modest maple
#

The docs

#

And some basic yt tutorials

scarlet maple
#

I can't find anything on mysql

modest maple
#

But the SQL docs are pretty good for Python

scarlet maple
#

so I just need to learn SQL right , because most dbs use sql

#

and I hope all dbs are similar

modest maple
#

Well no

scarlet maple
#

crap

modest maple
#

Because the different types have different syntaxes

#

The dB code itself is the same with sql

#

But the actual code for python etc is different

scarlet maple
#

so you menan like conntector?

#

yeah

modest maple
#

Once you learn one it is easier

#

Thi

flat pelican
#

learn html

modest maple
#

But each module is different

scarlet maple
#

i can use connectors with async fucntions right?

#

I have 3 year experience in web designing lol

#

3 years gone to semi waste

honest karma
#

๐Ÿคก Don't wanna interrupt the convo so terribly sorry if I do```js
//require id first before changing value? should I await the message after requiring the id or do it as one command altogehter.
if(u_id === row.id){
//run code?

                con.query(updateQuery);
            }else{

                console.log(e);
            }
flat pelican
#

you're a monster

honest karma
#

I am

flat pelican
#

what's this

#

when I said indentation, it wasn't at this point

#

lmao

modest maple
#

@scarlet maple most DBs are non async in python

scarlet maple
#

crap

honest karma
#

?

modest maple
#

Unless it's specifically stated it uses asyncio

#

E.g

honest karma
#

like Indentation for what?

modest maple
#

Asyncsqlite

#

Aka

scarlet maple
#

yeah hopefully mysql supports async

modest maple
#

You don't need to await your connections etc..

#

And no

#

Mysql doesnt

scarlet maple
#

rip

modest maple
#

But it's async just in the way it's coded

#

It just doesn't need to be in a async function with await

earnest phoenix
modest maple
#

That's the idea of most Dbs

#

Jsons are sync only

#

While DBs are async

earnest phoenix
#

oh

scarlet maple
#

good to know

#

thanks

#

I'll also take a look at postgresql

restive furnace
#

binarys are the best

modest maple
#

Ngl think you're jumping in this is the wrong way

#

Start with mysql or SQL lite first

#

Otherwise it'll overwhelm you rather quickly

restive furnace
#

SQ lite

#

SQLite

#

SQL ite

modest maple
#

Yeah... Idc

restive furnace
#

but yeah theres only 1 "L" most of guys dont notice it xdddd

modest maple
#

Ik it's one l

#

But autocorrect says no

#

So aura_shrug

topaz fjord
#

whatever you do, do not start with quick.db

scarlet maple
#

ironically ur a turtle

#

not quick eh

topaz fjord
#

quick.db is literal shit

scarlet maple
#

good to know lol

fallen lion
#

how can i ask if the id from the user that run the command, is register in the sqllite database?

#

in java

modest maple
#

Get user id

#

Send query to dB with userId as key

#

See if it returns anything

fallen lion
#

okey

glacial mango
#

How do I get all arguments in an array? Js

knotty steeple
#

just get the array?

glacial mango
#

Yes?

#

How do I do that

uneven wyvern
#

how to filter users and bots?

knotty steeple
#

what u define the array as

sudden geyser
#

@uneven wyvern what language and library

restive furnace
#

collection.filter() on js

#

lul

uneven wyvern
#

Js

#

@restive furnace ik but what method

sudden geyser
#

that is the method

restive furnace
#

filter(mem => mem.bot === true).size

#

is bots size

uneven wyvern
#

Ok

restive furnace
#

and your can do !== true for users

uneven wyvern
#

K ty

late hill
#

you should be able to omit === true

#

same for !== true

#

but then just put the inversion up front

restive furnace
#

or you can do filter(mem => mem.bot) and then filter(mem => !mem.bot)

#

ez

late hill
#

that's what I said

#

yes

#

ok

earnest phoenix
#

ok

wheat jolt
#

:(

#

Does anyone know what does this mean?

mossy vine
#

read the error

wheat jolt
#

I red it

unique nimbus
#

read it again

#

what is the error

wheat jolt
#

Missing } in template expression

#

I don't see any } template

#

or you tell me what I do wrong

unique nimbus
#

now it is saying it is missing something

wheat jolt
#

or don't send messages

unique nimbus
#

what is it missing

wheat jolt
#

} ffs

golden condor
#

Hey, I have a question

wheat jolt
#

just tell me what is wrong

golden condor
#

I made a ticket bot for my server but I am not sure whether to put it with a moderation bot, or make it support

sudden geyser
#

if you mean like a category in your bot, I'd say moderation but it's up to you. they both mix

golden condor
#

No

#

Like should I made them seperate bots?

wheat jolt
#

@unique nimbus Thanks, your puzzle helped me a lot

unique nimbus
#

yes

late hill
#

If you want us to spot a missing }

#

At least post the code

#

so we don't have to squeeze our eyes reading the screenshot

golden condor
#

I made a ticket bot for my server but I am not sure whether to put it with another bot, or make it seperate

abstract turtle
#

I run a server with a lot of voice users, is it possible to have a bot analyze incoming voice data and detect if its overly loud? this would really help my mod team.. i have experience in making bots but I've never used voice.

earnest phoenix
#

you would have to read every user's voice stream, have to convert the stream to PCM format and then read that to check for spikes in the current dB value

abstract turtle
#

yikes

#

sounds complicated, is it easier than it sounds?

earnest phoenix
#

tldr very hard, if not impossible, if you have no experience with voice, opus and lowlevel byte manipulation

abstract turtle
#

yeah alright

#

thanks!

modest maple
#

someone tried before

#

but didnt get far

#

as after viewing the audio from normal convo and ear rape the diffrence was so hard to tell

#

that it wasnt gonna happen anywhere close to accuratley

earnest phoenix
knotty steeple
#

wrong channel bro

grim aspen
#

hello

#

ok what the fuck

round sky
#

Anyone here decent at canvas? (node canvas)

summer torrent
#
.addField("Heroes", response.heroes ? response.heroes.map(a => `${a.name} - ${a.level}/${a.maxLevel}`).join("\n") : "No heroes")```
this is my code. I get this error:
```js
RangeError: RichEmbed field values may not be empty.```
anyone help me?
sudden geyser
#

Where's the closing )

summer torrent
#

oh wait

#

fixed

earnest phoenix
#

it seems that serverQueue.connection.playStream is not a function. Why? The code works some weeks ago

#

learn to debug

round sky
#

@earnest phoenix the module could have been updated and that function may now be deprecated

earnest phoenix
#

I have to find the new one but the docs says that this function works so...

golden condor
#

Yay

earnest phoenix
#

i mean, very low ping = good vpn

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

outer niche
#

What is the best way to create a music play command in python

viral rivet
#

My bot needs to be able to change nicknames. I gave it full rights in my text channel. Still says permission denied

#

Made a new user with no rights, but even then

#

if lvl_end > 1:
await ctx.author.edit(nick="[*]{}".format(username))

#

This is my code

#

it works when targetting the bot itself

empty owl
#

Im guessing this is python

viral rivet
#

o sorry, yes indeed

viral rivet
#

Fixed it by playing with the roles

#

Is there a way to get this done on a normal server?

#

or does discord does this automatically?

outer niche
#

@client.command(pass_context=True) async def play(ctx, url): server = ctx.message.server await client.say ('Music now playing...') voice_client = client.voice_client_in(server) player = await voice_client.create_ytdl_player(url, ytdl_options={'default_search': 'auto'} after=lambda: check_queue(server.id)) players[server.id] = player player.start()will this work

vital lark
outer niche
#

Kk

small prairie
#

Any Way to get id of everyone who reacted on a certain message(Already Reacted)?

#

d.js

mossy vine
#

(<Message>.reactions)

small prairie
#

Uh Actually Before the Bot started

#

Yup i did that

#

but can i only find after the bot started

copper cradle
#

cache

#

the

#

message

small prairie
#

how?

copper cradle
#

readthedocs

#

f e t c h the message

small prairie
#

Uh I am doing that

#
 message.channel.fetchMessage("Some Id").then(m => {
let r = m.reactions.find(r => r.name === "๐Ÿ‘");
        r.users.map(u=>console.log(u.id))
})
grizzled raven
#

sooooooo..?

#

whats wrong then

small prairie
#

I still cant get users reacted before bot became active

#

No Way?

lament meteor
#

use a database, when the bot goes down/ever since the last check you save the users then when it starts u compare the user list

small prairie
#

uh i can use it now but if i need it rght now then?

#

No way then?

grizzled raven
#

check if its an actual emoji

#

because

grizzled raven
#

โญ and โญ๏ธ arent the same for example

small prairie
#

โญ๏ธ

#

I used

#

\:thumbsup:

#

\๐Ÿ‘

grizzled raven
small prairie
#

To get it

grizzled raven
#

if it doesnt show, then use reaction.fetchUsers()

small prairie
#

I think this would work why didnt no one tell this before ;_;

#

@grizzled raven Thanks Man it worked

empty owl
summer torrent
earnest phoenix
#

you have to exchange the code oauth redirect gives you for an access token

empty owl
#

oh

empty owl
#

thanks

empty owl
#

@earnest phoenix how would u send the

#

client secret

#

without the

#

poeple seeing it

earnest phoenix
#

oh god

empty owl
#

what

earnest phoenix
#

all calls to discords api are supposed to be in the backend

empty owl
#

oh

#

then how would i execute it

earnest phoenix
#

frontend users may never see what is actually going on

empty owl
#

with a function

earnest phoenix
#

make an api and expose an endpoint in your api that the front user can hit

empty owl
#

What

earnest phoenix
#

then the backend can do oauth shit

empty owl
#

aoh

earnest phoenix
#

Will i get pinged or notified when my bot is approved/declined

#

you'll get pinged in #logs iirc

sudden geyser
#

and luca will dm you

earnest phoenix
#

Ok

pearl canopy
#

hey since i dont know how to code can some one send me there glitch coding thing

earnest phoenix
#

no

pearl canopy
#

ok thanks, any one else?

proper inlet
#

How can I find a channel by part of name (I need to find all guild channels with names includes "chat", but name can be "main-chat"). Discord.js

earnest phoenix
#

fuzzy search? just filter the channels which names include your string

restive furnace
#

ch name includes "chat"

keen salmon
uneven wyvern
#

@proper inlet
message.guild.channels.filter(c => c.name.includes("main"))

proper inlet
#

Thx

uneven wyvern
#

pls don't send the spoonfeeder emoji ;-;

slender thistle
#

was about to

coral trellis
uneven wyvern
#

ty xD

#

is spoon-feeding bannable? @coral trellis

coral trellis
#

If you keep doing it after being warned yes

uneven wyvern
#

is that a warning?

slender thistle
#

C# people, is there any functionality difference between, say public int x; and public int x {get; set;}?

coral trellis
#

No it's not a warning

glad charm
#

@slender thistle AFAIK no there's no difference.

tight glen
#

who can learn java?

uneven wyvern
#

Ok

glad charm
#

Kinda given to you by default

uneven wyvern
#

@tight glen Google exists

tight glen
#

I create some java plugin :u

slender thistle
#

So it's pretty much the same but the latter being more "explicit"?

glad charm
#

Yeah

#

Incase you wanted to set your own.

slender thistle
#

Understandable

#

ty

uneven wyvern
#

How to get the Join Position of a User in js?

timid jetty
#

hey i have a my bot

slender thistle
#

Have an array of Member objects, sort by their join time, find the user in array and its index

timid jetty
#

How do I add to the site

uneven wyvern
#

@slender thistle How do I use Sort and what's the Function of it?

slender thistle
#

Just give me a second to open Google

glacial mango
#

How do I solve this error?

Expected directory: node-v64-linux-x64-musl
Found: [node-v64-win32-x64-unknown]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/home/container/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-musl/grpc_node.node'
#

I get that when I try to use my firebase

unique nimbus
#

Have you tried npm rebuild?

tidal kindle
#

Anyone have a code for mute in python

#

I mean

#

Discord.js

sinful lotus
#

why dont you code it yourself

#

it should be fairly easy

tidal kindle
#

js

sinful lotus
#

then why do you want a code in discord.js

tidal kindle
#

for a friend

sinful lotus
#

then probably tell your friend, asking for the whole code won't get him earlier, asking help to be pointed to the right direction would be better.

tidal kindle
#

Well he tried

sinful lotus
#

doesnt you can ask for the code if you failed

tidal kindle
#

Just gimme if u have

#

And thanks if u donโ€™t

sinful lotus
#

ofc I have, but I wont spoonfeed the code I took the effort to do to some people who just leech it without knowing how it works even

tidal kindle
#

Okay bye

#

But I think to understand u need to see

sinful lotus
#

in some ways thats true, but most of the people here in discord dont do that anyways

tidal kindle
#

Ok

#

How u know that

#

Maybe they want to learn

mossy vine
#

tell him to find open source bots with that feature on github

tidal kindle
#

Then why did I ask here use ur brains people

mossy vine
#

use ur brains people

knotty steeple
#

here's the person asking for code telling us to use our brains

#

use your brain to make the command omegalul

grizzled raven
slender thistle
#

Quoting my message from a few hours ago, "Straight up saying "I don't want to put effort into learning so give me ready code""

pallid zinc
#

How to make progress bar in canvas discord.js

restive furnace
#

Mute command can be made in 1 line, its that easy...

mossy vine
#

everything can be one line in js

restive furnace
#

not best mute command, but working one ^

blissful scaffold
#

Does he want a mute command in js or English?
I know how to do it in English

copper cradle
#

@glacial mango you got that error because you were trying to use a binary file that was made for windows not for linux, run npm rebuild to fix that

safe nacelle
#

hey

#

bot prefix works fine but prefix doesn't respond when typed in big letters

quartz kindle
#

you have to normalize case

#

code is case sensitive

#

just convert everything to lowercase before comparing for example

safe nacelle
#

@quartz kindle you can give the exact code

quartz kindle
#

what language?

safe nacelle
#

js

blissful scaffold
#

usually it's something like text.toLowerCase or something similar

safe nacelle
#

tolowercase() ===

quartz kindle
#

<string>.toLowerCase()

blissful scaffold
#

or equalsIgnoreCase works also in some languages

#

dont know if it exists in JS

safe nacelle
#

tnx

flat pelican
#

toLoveCase()

blissful scaffold
#

That always returns true, because toLoveCase() loves everything equal

cerulean salmon
#

i want output like the marked style

#

Embed.addField(โ–ถ๏ธ ,f);

blissful scaffold
#

a field can't have the title and description on the same line

cerulean salmon
#

k thanks for the info

blissful scaffold
#

you can try Embed.setDescription

cerulean salmon
#

only one setDescription per embad message ?

frozen cedar
modest maple
#

yes

blissful scaffold
#

yes, only 1 setDescription, but you can add multiple lines of text with \n

cerulean salmon
#

but the lines number is dynamic

blissful scaffold
#

you can generate the text right before displaying it

cerulean salmon
#

K

blissful scaffold
#

at the moment you dynamically add fields, you can dynamically create the text to put in the description

restive furnace
#

@blissful scaffold actually field can have.

#

embed.addField("title", "value", inline);

#

on js

#

and java

blissful scaffold
#

that does not put the title and value on the same line

restive furnace
#

oh k

#

i knowed it, but i thought you was talking about you cant put like thay

blissful scaffold
#

if you set inline to true it puts multiple fields next to eachother,
with inline set to false every field is below the previous one

#

nah, sehrik tried to put the title and value on 1 line

summer torrent
#

you can use stripIndents in description for lines @cerulean salmon

earnest phoenix
#

im bot developer

#

I want to add to the top.gg I made a bot

cerulean salmon
#

@summer torrent still i need to generate a string

#

@blissful scaffold thanks for the idea

#

it worked

earnest phoenix
#

Anyone give me some information?

blissful scaffold
#

The sky is blue
What information do you need?

earnest phoenix
#

I want to know that which bot can dm all member in server using 1 command?

#

Please

blissful scaffold
#

Those bots are breaking the Discord rules and are not accepted on this bot list

earnest phoenix
#

Ok. Which bot is perfect for moderation without MEE6 & Dyno

blissful scaffold
#

This is the wrong channel for these questions, #general is where you want to be ^^

earnest phoenix
#

Ok

earnest phoenix
#

@fluid sapphire

#

Place your code here

fluid sapphire
#

bot.on('message', async message => {

const args = message.content.split('4 ').slice(1)

if(message.author.id != bot.user.id) return;

if(message.content.startsWith(`${prefix}playing`)) {

  message.delete();

  bot.user.setActivity(args.join('3 '));

} else if(message.content.startsWith(`${prefix}watching`)) {

  message.delete();

  bot.user.setActivity(args.join('2 '), { type: 'WATCHING'});

} else if(message.content.startsWith(`${prefix}listening`)) {

  message.delete();

  bot.user.setActivity(args.join('1 '), { type: 'LISTENING'});

}

});

earnest phoenix
#

Ok you arenโ€™t supposed to use else if, else and if

#

When you set your status

#

Also donโ€™t delete the message

#

Because itโ€™s not a command a user can type

fluid sapphire
#

yeah I want to do it so, when I write #playing mygame then the status is playing mygame

#

and i dont know how i have to set the Bot status with an other way

#

ok

finite tendon
#

@fluid sapphire which lang

fluid sapphire
#

@earnest phoenix how can I do it in a better way?

earnest phoenix
#

Yeah

#

DMs Iโ€™ll send it to you

fluid sapphire
#

yeah can u do again?

#

thanks

earnest phoenix
#

Np

valid frigate
#

is it better to assign a huge list of variables or initialize them, aka is there better performance on one vs the other? for example

const int one{1};
const int two{2};
...

vs

int one;
int two;
...
one = 1;
two = 2;
...
#

just looking for performance here

fluid basin
#

hmm depends on what language

valid frigate
#

c++

golden condor
sudden geyser
#

it probably won't matter, but using the variable before it's been assigned is a no no

#

Cxllm is it always negative or just sometimes, share code.

golden condor
#

I think it was a glitch

#

It was just funny to see

restive furnace
#

one line command handler ```cates.forEach(c => fs.readdir("commands/" + c, (e, ff) => ff.forEach(f => client.commands.set(f, require(./commands/${c}/${f})))))

mossy vine
#

k

restive furnace
#

yes i want few lines as possible

sudden geyser
#

isn't flawless but close

restive furnace
#

trying to do like on java, command class, and every command extends it with own propeties

#

seems harder on js

night thicket
#

hey

#

free commands

#

send

blissful scaffold
night thicket
#

really

earnest phoenix
#

would you like a drink with that

night thicket
#

direct message

#

announcement

#

guild only

#

not send all guild

modest maple
#

that is API abuse so no

night thicket
#

emoji text

earnest phoenix
#

can you stop speaking caveman and actually use comprehensible english

modest maple
#

i sense a mutem comming

blissful scaffold
#

ah yes, caveman flags now?

night thicket
#

no mute ๐Ÿ˜„

uneven wyvern
#

@weak parrot

@night thicket asks for spoonfeed

night thicket
modest maple
#

stop

weak parrot
#

๐Ÿค”

uneven wyvern
#

mute

#

or ban him

weak parrot
#

How about I decide that rather than you do

night thicket
#

timo

#

my add bot

#

web site

uneven wyvern
#

gosh dude

weak parrot
#

@night thicket We do not spoonfeed commands here ("free commands") and sending messages to all guilds is API abuse so I'd suggest not even looking into it

night thicket
#

noo

weak parrot
#

You have to add your bot yourself

night thicket
#

me low speak

slender thistle
#

What is your native language

night thicket
#

i don't understand you i don't have english

blissful scaffold
#

i think he is turkish

night thicket
#

ye

slender thistle
#

@flat pelican qt if you're free, mind lending this fellow a hand?

night thicket
#

Help me discord bot add website

#

me add

#

waiting

outer niche
#

It takes around a week for you to be approved

night thicket
#

message website

#

Bot awaiting approval - Please be patient, us humans take time to verify bots!

outer niche
#

It takes around a week for you to be approved

flat pelican
night thicket
#

really

weak parrot
#

Like that message says it takes time. Please read #502193464054644737 for bot approval related questions. It currently takes between 1 to 2 weeks before your bot gets checked

night thicket
#

oh ok wait

flat pelican
night thicket
#

thx bro

#

you king

#

@flat pelican

#

@outer niche

#

hey

earnest phoenix
#

Why did you speak hรจre?

uneven wyvern
night thicket
#

ok

outer niche
#
    await ctx.command.invoke(ctx)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 721, in invoke
    await self.prepare(ctx)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 685, in prepare
    await self._parse_arguments(ctx)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 599, in _parse_arguments
    transformed = await self.transform(ctx, param)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 445, in transform
    raise MissingRequiredArgument(param)
discord.ext.commands.errors.MissingRequiredArgument: member is a required argument that is missing.``` ```@bot.command(pass_context=True)
async def play(ctx, url):
    server = ctx.message.guild
    await bot.say ('Music now playing...')
    voice_client = bot.voice_client_in(guild)
    player = await voice_client.create_ytdl_player(url, after=lambda: 
    check_queue(guild.id))
    players[server.id] = player
    player.start()``` what do i need to do
uneven wyvern
#

read the error

pearl canopy
#

I have spent about a week try a lot of tutorials but not a single tutorial gives me a straight answer

uneven wyvern
#

MissingRequiredArgument: member is a required argument that is missing.

#

@outer niche

outer niche
#

i did i do not know how to fix it

modest maple
#

Read the error smh

#

python makes it so easy to read

#

member is a required argument that is missing.

#

you are not passing it something that it needs

outer niche
#

but how do i fix it

modest maple
#

pass it the thing it needs

#

basic python ๐Ÿ‘

outer niche
#

whar how

modest maple
#

do you not know how functions work

slender thistle
#

are you sure that's the command it errors out on

#

You're not specifying a member when executing a command

modest maple
#

reading errors is rather important

outer niche
#
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 863, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 728, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 88, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'say'```
modest maple
#

'Bot' object has no attribute 'say'

outer niche
#

well i can not reesd

modest maple
#

'Bot' object has no attribute 'say' and your functions r fucked

outer niche
#

uuuuuuuuuu

sudden geyser
#

have you tried reading

modest maple
#

bot.say ('Music now playing...') its not a procedure that you've just slapped perenties on its a function

#

aka

#

NO SPACES

outer niche
#

fug

modest maple
#

๐Ÿ‘ Read the docs and Learn basic python ๐Ÿ‘

outer niche
#

Cant reed the docs

modest maple
outer niche
#

I have a disability

earnest phoenix
#

having a disability does not prevent you from reading the docs, if anything, it makes it harder but not impossible. stop using disabilities (that you may be possibly faking) as an excuse for not doing something intentionally. thanks.

outer niche
#

I have a reading disability cannot read literally

earnest phoenix
#

you just read my message

outer niche
#

I am not my program is

mossy vine
#

..your program cant read?

outer niche
#

The program reads the stuff out loud to me

earnest phoenix
#

you started responding as soon as you saw my message, TTS would have no time to say it out loud by the time you started responding

modest maple
#

you can do that same to docs

outer niche
#

Except I cannot because the program does not work with internet-based programs such as Google

earnest phoenix
#

discord is an internet based program

#

google is a website

fleet chasm
#

culan, what do you need help with?

earnest phoenix
#

what you're using right now is a website too, it embeds chrome

outer niche
#

Well I literally gave you an example such as Google it will not work that's where opens not Discord

modest maple
#

there are hundreds of TTS Plugins for browsers

mossy vine
#

wait

#

isnt discord technically internet-based

#

cuz its literally electron

earnest phoenix
#

yes, look up

modest maple
#

yes we have covered this

mossy vine
#

ah yes, discord wasnt scrolled down again

outer niche
#

Oh my God freaking read the message it does not work on such things as Google in the regular internet

fleet chasm
#

this is an xy problem by this point
shouldnt they be figuring out that say is not part of bot

earnest phoenix
#

they got caught up in their own lies

#

for being lazy

#

also, if you have a reading impairment, your guardians would make sure that you would be able to use TTS on everything, including websites

#

so for the sake of not offending somebody, stop lying

blissful scaffold
#

there are tons of text to speech apps for blind people, everything can be turned into speech

modest maple
#

firefox and chrome both have them built in i believe but also loads of plugins

outer niche
#

Unless you're going to come over here and download it on my computer it's not happening

#

And from what I have seen neither of them have them

modest maple
#

5 seconds

#

it took

mossy vine
#

this is hilarious

earnest phoenix
#

how the hell are you writing code in the first place if you can't "literally" read

fleet chasm
outer niche
#

All right I'd literally don't care this is not helping me at all

fleet chasm
#

if you want the link on how to send messages

modest maple
earnest phoenix
#

this conversation's been nothing but people helping you with your problems for the past 10 minutes, you're being mad that you're not given what you want instantly

blissful scaffold
modest maple
#

everything has some support for tts

outer niche
#

All right I am going back to building in my stuff now

modest maple
#

cya!

empty owl
#

hey guys

#
  let addOnA = [
    "rblxintergrate",
    "npm",
    "dovps",
    "sc",
    "ecc",
    "none"
    
  ]
  
  let addOnsA = addOns.split(" ")
  addOnsA.forEach(a => {
    
    if (!addOnA.includes(a)) {
      return message.channel.send("Not valid add-on ID.")
    } else {
      return true;
      
      
    }
  })```
#

it returns the message

#

but keeps on going on

#

with the rest of the code

earnest phoenix
#

you can't break a forEach function except throwing an error inside of it

empty owl
#

so how would i do that then

#

i mean

earnest phoenix
#

re-read my message

empty owl
#

eeks dee

#

is there another way to check if each "addOn" is a proper addon

earnest phoenix
#

.

#

i have no idea what your goal is but i'm assuming you want to exit the loop once you find a match?

empty owl
#

kinda

earnest phoenix
#

i think you can use some

#

returning true will continue the loop

#

returning false will stop it

empty owl
#

oh

#

tahks

earnest phoenix
#

wait

#

it's the other way around

blissful scaffold
#

I don't know if it's the same in JS, but in a lot of languages you can break a loop with break

earnest phoenix
#

this is a function forEach

#

break doesn't exist

empty owl
#

some is a function right

blissful scaffold
#

oh yeah

earnest phoenix
#

yup moose

#

return true to stop the loop, return false to continue

empty owl
#

ok

#

thanks

#

Do i ahve to put an if statement

#

or do i jsut do it like a .filter

earnest phoenix
#

do what you want inside of it

#

you just need to return a bool to tell it what to do next

empty owl
#

like the

#

ok

#

thanks

outer niche
#
async def play(self, ctx, *, song : str):
        state = self.get_voice_state(ctx.message.server)
        opts = {
            'default_search': 'auto',
            'quiet': True,
        }

        if state.voice is None:
            success = await ctx.invoke(self.summon)
            await self.bot.say("Loading the song please be patient..")
            if not success:
                return

        try:
            player = await state.voice.create_ytdl_player(song, ytdl_options=opts, after=state.toggle_next)
        except Exception as e:
            fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
            await self.bot.send_message(ctx.message.channel, fmt.format(type(e).__name__, e))
        else:
            player.volume = 0.6
            entry = VoiceEntry(ctx.message, player)
            await self.bot.say('Enqueued ' + str(entry))
            await state.songs.put(entry)
``` will this work
earnest phoenix
modest maple
#

short answer no because python dont work like that

outer niche
#

oof

modest maple
#

you're legit cutting off the IF statement blocks

uneven wyvern
#

How to get all guild features?

I've tried message.guild.features.map(f => f).join(", ") but does not work somehow

lusty quest
#

im not sure but does it not should be client.guilds.features?

earnest phoenix
#

uh

#

think about that for a second

outer niche
#

is voice_client now VoiceClient

modest maple
#

read the docs

outer niche
#

i am going with yes

modest maple
outer niche
modest maple
#

that answers your question then

outer niche
#

so yes

modest maple
#

no

blissful scaffold
#

looks like VoiceClient is the class and voice_client is the way to call it

outer niche
#

oooooo

modest maple
#

VoiceClient is the object

#

that gets returned when calling voice client

blissful scaffold
#

same same, its python so its weird ๐Ÿ˜›

modest maple
#

python's oop principles are so easy to understand

#

like

outer niche
#

so this is fine voice_client = client.guild.voice_client

modest maple
#

try it and see

outer niche
#

I have a feeling the next line on this command is wrong but I do not know

modest maple
#

try it and see

earnest phoenix
outer niche
#

It is so close

modest maple
#

i mean it either works or it doesnt

#

xD

blissful scaffold
#

I often start to doubt myself when my code runs without any errors
The error log that shows exactly where I screwed up is calming to me and it gives me work ๐Ÿ˜„

outer niche
#

ok so i know this is part rite how can i fix it client.guild.voice_client

modest maple
#

well by reading the docs it will tell you wether its a class or a function

#

and that will tell you how to fix the line

#

hint

#

returns

outer niche
#

It is just saying client is not defined

modest maple
#

well have you even got the client object in your code

blissful scaffold
#

then it's time to define client

modest maple
#

or are you just expecting it to pull it out of thin air

outer niche
#

Although that would be cool no

modest maple
#

Just define client globally across all files dabward

outer niche
#

How

blissful scaffold
#

making everything global makes it a lot easier dab

outer niche
#

how can i do that

modest maple
#

too advanced for u rn, but you still gotta get the client object

#

so where ever your code is

#

you need to pass / get the client object

outer niche
#

i am cunfused

#
async def play(ctx, url):
    server = ctx.message.guild
    await ctx.send('Music now playing...')
    voice_client = client.guild.voice_client
    player = await voice_client.create_ytdl_player(url, after=lambda: 
    check_queue(guild.id))
    players[server.id] = player
    player.start()
modest maple
#

yes

#

you havent passed client

#

or got client from ctx

#

so what do u expect python todo

outer niche
#

how can i pass client

modest maple
#

by learning the basics

blissful scaffold
#

i dont know python, but I think you can get client from ctx like in most other APIs

modest maple
#

yh you can

outer niche
#

I am cunfused

#

Is it just ()

modest maple
#

what

#

you can just get the client object from ctx

blissful scaffold
#

I might say too much if I think it might be ctx.client or I could be wrong

modest maple
#

like i would say you need to learn how functions and classes work in python

blissful scaffold
#

I will stop feeding ^^

modest maple
#

cuz u seem to be quite new to the concepts

#

tbf i dont even think you need the client object

#

well actually you dont

#

because thats not how client and guild works

outer niche
#

Are you serious is it literally just ctx.client

modest maple
#

try it and see

#

i mean you dont even need client.guild

#

because client does not have guild objects

#

because reasons

outer niche
#

voice_client = ctx.client.voice_client so this

modest maple
#

read the docs

#

what object has the attribute

#

hint hint

blissful scaffold
outer niche
#

ctx.client.guild.voice_client so this

modest maple
#

NO

#

thats not how client works

#

read

#

the

#

docs

blissful scaffold
#

the client does not know what guild you are talking about

outer niche
#

i have it open

modest maple
#

notice how voice_client is under the guild object

#

not client

#

thats a very key thing

blissful scaffold
#

now if you would talk about the message then it might be a different story

outer niche
#

so i need to tack out client

modest maple
#

try it and see

blissful scaffold
#

I just checked your code and on line 3 you got server = ... that is a very useful thing you got there

outer niche
#

so

modest maple
#

use it

outer niche
#

I'm still confused

modest maple
blissful scaffold
#

Culan, you got this line: server = ctx.message.guild
What can you do with that?

modest maple
#

might help you if you read up on python a bit more

#

than jumping into oop with what aPpears to be no knowledge of classes or functions

outer niche
#

I don't see how that wine has anything to do with the line I'm on

modest maple
#

BECAUSE ITS OOP
YOU CAN REUSE THAT OBJECT

#

thats how classes work

outer niche
#

Oh wait am I really that stupid

modest maple
#

this is basic basic basic basic python

fleet chasm
#

๐Ÿ˜“ _

blissful scaffold
#

handsinhead I give up

fleet chasm
#

if you need to know something about phython

outer niche
#

So instead of voice_client it should be server

fleet chasm
#

learn it or go to the docs

modest maple
#

NO

#

jesus dude

fleet chasm
#

because xy problems are bad

modest maple
#

please take the time

#

to stop

#

and learn python

#

then come back to this project

blissful scaffold
#

Culan, you really should do some tutorials and read the basic documentation

earnest phoenix
#

help vampire .

#

wrong spider

modest maple
#

spider left

fleet chasm
#

yeah

earnest phoenix
#

oh?

modest maple
#

yh

#

he reisgned

earnest phoenix
#

that's a rip

outer niche
#

Then I don't know what you're trying to get at with ctx.message.guild because I does not look like it has anything to do with the line I'm on

modest maple
#

LEARN THE BASICS

fleet chasm
modest maple
blissful scaffold
#

I liked spider ๐Ÿ˜ฆ

fleet chasm
#

but please

modest maple
#

learn that

#

stop with d.py for now

#

learn the basics of python

#

like functions and classes

#

then come back

outer niche
#

I know basic python I have made an entire game with python

modest maple
#

you havent

outer niche
#

Yeah I have

modest maple
#

you clearly have no idea how functions and classes work

fleet chasm
#

if you have read the docs then

#

then ask

modest maple
#

we can get that off the whole thing of you not understanding how client does not have a guild attribute

#

and that guild is its own object

twilit rapids
#

What's going on in here 02think

modest maple
#

and that you can assign objects to vars

fleet chasm
#

xy problems @twilit rapids

modest maple
#

and use them again and again

#

this can all be solved

#

by READING THE DOCS AFTER LEARNING THE BASICS

earnest phoenix
#

this is beyond an xyproblem

fleet chasm
#

xyz problem

earnest phoenix
#

help vampirism at its finest

modest maple
#

this is failing to learn python

outer niche
#

so this ctx.guild.voice_client

earnest phoenix
#

try it and see

outer niche
#

yes

#

i do not have that error

#

i have a new one for a new line

topaz fjord
#

very descriptive

outer niche
#

i hate music bots to mack

topaz fjord
#

they're pretty easy

earnest phoenix
#

i mean... they are... if you know what you're doing

#

...which they don't

topaz fjord
#

it's a lot of trial and error

#

and a lot of reading the docs

outer niche
#

i see

#

'NoneType' object has no attribute 'create_ytdl_player' i can not fined aney thing on yhis

blissful scaffold
whole fjord
#

culan, I just saw your messages and it seems like you should re-learn python or something

fleet chasm
#

thats what we are trying to say

#

xy+ problems are here

outer niche
#

i am gesing ytdl player suz not exzest

#

I know it does not exist anymore but I cannot find it in the documentation what to replace it with

earnest phoenix
#

Bdscript ?

surreal sage
#

What is the discord.js property if the user account is new

sudden geyser
#

there is none, but you can probably guess based on the creation date.

blissful scaffold
#

You can listen to user join events to get informed when someone joins a server

#

and to check if the account is new you have to check the creation date

outer niche
#

player = await voice_client.create_ytdl_player(url, after=lambda: 'NoneType' object has no attribute 'create_ytdl_player'

empty owl
#
  let addOnA = [
    "rblxintergrate",
    "npm",
    "dovps",
    "sc",
    "ecc",
    "none"
    
  ]
  
  let addOnArgA = addOns.split(" ")
  addOnArgA.some(a => {
    
    if(!addOnA.includes(a)){
      message.channel.send("Not a valid add-on ID.")
      return true;
    } else return false;
    
  })``` am i doing something wrong
slender thistle
#

When do I start saying that your voice_client is None

outer niche
#

what

slender thistle
#

What do you not understand in my message

#

You are using create_ytdl_player on a None type

outer niche
#

ok so

slender thistle
#

"so" what

blissful scaffold
#

it means there is no voice_client

slender thistle
#

It means whatever that is stored under voice_client variable returned None

outer niche
#

ooooo

#

how can i fix it

blissful scaffold
#

Is your bot connected to a voice channel?

outer niche
#

yee

#

yes

slender thistle
#

How are you declaring voice_client

outer niche
#

i think

slender thistle
#

The question is "how are you doing X", not "are you doing X"

topaz fjord
#

>how are you declaring
>I think

outer niche
#
async def play(ctx, url):
    server = ctx.message.guild
    await ctx.send('Music now playing...')
    voice_client = ctx.guild.voice_client
    player = await voice_client.create_ytdl_player(url, after=lambda: 
    check_queue(guild.id))
    players[server.id] = player
    player.start()
copper cradle
#

yeah what

modest maple
#

function

solemn fern
#

<-----enjoying the show of the ever broken while loop

topaz fjord
#

nice

blissful scaffold
#

Today I am learning more Python than I have ever before and Im not even ready any documentation

outer niche
#

I still do not get how that is wrong

slender thistle
#

Your bot is not connected to voice channel in the guild you're running the command in

blissful scaffold
#

Culan, we know that voice_client is a None object

#

there won't be a voice_client if the bot is not connected to a voice channel like shivaco said

#

so make sure that you actually SEE the bot inside the voice channel when you use that command

outer niche
#

It is connected to the channels

blissful scaffold
#

channelS? it can only connect to 1 voice channel

jaunty stump
#

https://hastebin.com/azohojoxef.js
Something here is making the embed get sent to a discord channel multiple times/loop and I don't know what is causing it.

If I could get some help when you guys can, that would be nice. (Google isn't helping me)

outer niche
blissful scaffold
#

Echo is your bot? it looks like it is sending sound now with the green circle around it

outer niche
#

Yee

#

Like I don't know how else to put it than it is connected when I am running the command

quartz kindle
#

@jaunty stump your code is a giant mess

#

you're doing something weird that makes no sense : await message.guild.roles.filter()(role => {

blissful scaffold
#

@jaunty stump you loop over every role and if the role IS NOT the same as your highest role then it sends the message.
That is more than once if there are multiple roles

quartz kindle
#

filter is not a promise, you dont need to await it, and it doesnt return a function, not sure how your code is not even causing errors

earnest phoenix
#

@quartz kindle do you have the code of mute and tempmute?

quartz kindle
#

? what code

earnest phoenix
#

of mute and tempmute for my bot

quartz kindle
#

there is no "code"

outer niche
#

@blissful scaffold I do not get it because it is connected

quartz kindle
#

you have to code it yourself

earnest phoenix
#

Mmmmm i say code of glitch

quartz kindle
#

programming is not a bunch of codes that you can copy and paste

#

it depends on many factors

blissful scaffold
#

@outer niche I never read the python documentation, so I know just as much about python as you do

earnest phoenix
#

ammmm but i can edit the code for my method

empty owl
#

bruh

quartz kindle
#

you need a mute role, then you add that role and remove it

empty owl
#

WHy

earnest phoenix
#

Mmmmm

sudden geyser
#

why do you not have a condition for your loop? nevermind

empty owl
#

i have this

#

if (!addOnA.includes(addOnsA[i])) return message.channel.send("Not a valid add-on ID.")

#

does that count

earnest phoenix
#

i created a bot oficial , but the code of mute i cant make this , but i dificult for me

empty owl
#
 let addOnA = [
    "rblxintergrate",
    "npm",
    "dovps",
    "sc",
    "ecc",
    "none"
    
  ]
  
  let addOnsA = addOns.split(" ")
  for (let i = 0;;i++) {
    
    if (!addOnA.includes(addOnsA[i])) return message.channel.send("Not a valid add-on ID.")
    
  }