#development

1 messages Β· Page 586 of 1

minor kelp
#

@loud salmon Still dont work 😦

#

frick

#

my prefix is used

#

TIME TO CHANGE IT

#

@loud salmon i removed cmd_ and it still dont work bero

#

bro*****

loud salmon
#

🀷 cant really help you

#

thats all i know

atomic sleet
#

rewrite or async?

minor kelp
#

?

#

DM me

glacial cliff
#

Hello, there will be way that you help me for the API ? please 😦

#

I do not understand anything

silent cloud
#

hey

#

who is now online

unique nimbus
#

I am but I can't help with java

silent cloud
#

how i need write to create in embed url

#

.setURL('')

#

or how

unique nimbus
#

e = discord.Embed()
e.set_image(url="

silent cloud
#

ty

unique nimbus
#

No Problem

minor kelp
#

how do you restrict a command to a certain user

#

like, the bot creator

unique nimbus
#

@minor kelp what language you on

minor kelp
#

Python

unique nimbus
#

Are you on rewrite?

minor kelp
#

Indeed

unique nimbus
#

bot.is_owner

minor kelp
#

where does it go

unique nimbus
#

Wait

#

@commands.is_owner()

minor kelp
#

just dm

unique nimbus
#

It goes under @commands.command

silent cloud
#

guys

#

somebody can help me

#

how to see bot ping? how to add to code

#

when i write *ping
he say him ping

mossy vine
#

Read the docs

silent cloud
#

here only he send pong

#

i need when he send ping

mossy vine
#

The discord.js docs

#
ember shard
#

import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
import random
from discord import Game

Client = discord.client
client = commands.Bot(command_prefix = 'b-')
Clientdiscord = discord.Client()

@client.event
async def on_ready():
await client.change_presence(game=Game(name=' oniichan '))
print('Bot Created!!!')

@client.event
async def on_message(message): so this is what i have so far, what do i do next?

silent cloud
#

this screenshots form discord.js

#

...

mossy vine
#

The documentation, not the examples s my h

quartz kindle
#

What do you want to do?

ember shard
#

what do i do next

silent cloud
#

and where

#

i cant find

mossy vine
#

S e a r c h

#

R e a d

#

F i n d

#

Its under Client

quartz kindle
#

What does he even want to do?

mossy vine
#

Scroll up

silent cloud
#

client ping?

#

it is?

#

Tim

#

bot to show ping

mossy vine
#

Yes

#

<Client>.ping

silent cloud
#

ty

ember shard
#

import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
import random
from discord import Game

Client = discord.client
client = commands.Bot(command_prefix = 'b-')
Clientdiscord = discord.Client()

@client.event
async def on_ready():
await client.change_presence(game=Game(name=' oniichan '))
print('Bot Created!!!')

@client.event
async def on_message(message): so i got this far, what do i do next?

mossy vine
#

You write code

#

Duh

ember shard
#

can you be more specific

quartz kindle
#

What do you want to do next?

ember shard
#

make it online

quartz kindle
#

Did you run that code?

silent cloud
#

lol

ember shard
#

how do i run it on pycharm

quartz kindle
#

Google how to run it

silent cloud
#

hmm

#

how to add ping to code

#

test message

#

message.channel.send('test'here how to add ping?)

ember shard
#

why does my bot keep leaving the server?

silent cloud
#

lol

#

idk u code in py

#

im on js

ember shard
#

it just left and i put i back in and it left again

#

i might switch to js

silent cloud
#

somebody can help me

#

how to add ping to code I can't

#

message.channel.send('test'here how to add ping?)

silent cloud
#

all sleep?

silent cloud
#

guys

#

help pls

#

i cant fix

jagged birch
#

Maybe learn to code

silent cloud
#

bot.on('message', msg => { if (msg.content.startsWith(prefix + 'ping')){ let embed = new Discord.RichEmbed() .setTitle('') .setDescription('Pong\πŸ“ | Ping'+ Math.round(client.ping)+ ' ms!') .setColor('0x2c69d3') msg.channel.send({embed}) }});

#

ohh this discord

#

when i write

#

*ping

#

bot crash

#

somebody can help plsss

#

???

#

all in school|colleges|work ye?

#

ohhhh

#

can u help with ping

#

how to add in a code

#

.setDescription('Pong'how to add here ping?)

unique nimbus
#

wdym

#

hi

#

idk sorry

#

idk what bot has that feature

silent cloud
#

peter so can help me? u know how? or can find docs, not discord.js or discord development

unique nimbus
#
silent cloud
#

...

#

i saw but not work

unique nimbus
#

wait

silent cloud
#

bot crash

earnest phoenix
#

you are being very vague

#

provide more context you are talking like a caveman

#

id mention you if i was referring to you

silent cloud
#

lol im too know it bad

earnest phoenix
#

k

silent cloud
#

im from russia

#

xD

ruby dust
#

This is getting off topic now

#

Look on the site

earnest phoenix
#

literally go to google and search for a discord poll bot

#

wat

silent cloud
#

@unique nimbus so?

unique nimbus
#

idk sorry @silent cloud

silent cloud
#

ohhh

#

cry

unique nimbus
#

same

earnest phoenix
#

@silent cloud nobody gets what you are talking about, explain your issue with more details

silent cloud
#

i can give code and error

#

logs

ruby dust
#

Nice

earnest phoenix
#

sure, but dont paste them in here, put them in hastebin or something to prevent chat clutter

ruby dust
#

@surreal peak

dusky marsh
#

Wat

silent cloud
#

@earnest phoenix

earnest phoenix
#

read your error

#

you copypasted the example from the docs

silent cloud
#

nope

earnest phoenix
#

adjust it to your code

silent cloud
#

and yea and no

#

xD

#

but how to fix

mossy vine
#

Define client

earnest phoenix
#

the code you copypasted needs a DiscordClient named client, while yours is named bot

#

no

mossy vine
#

No

ruby dust
#

@void mantle you here?

mossy vine
#

Learn how to code then use a discord library

earnest phoenix
#

because you are underestimating what it takes to develop a bot

queen sentinel
#

um

void mantle
#

?

silent cloud
#

i do this

#

I DOOO THISSS

#

not client.ping

#

bot.ping

queen sentinel
#

@earnest phoenix Don't use common prefix commands and commands go in #commands anyway

silent cloud
#

WTF

#

RLY

ruby dust
#

Jonny, that's him

queen sentinel
#

ohdear

dusky marsh
#

No

#

Go to google

queen sentinel
#

gone

dusky marsh
#

Find a tutorial

#

Follow jt

#

My God thank you

earnest phoenix
#

you-- did not just... ask for merc--

i cant

silent cloud
#

rly

#

he got ban because he 10 years opd

#

old

#

interesting

amber fractal
#

Yes, being under 13 is bannable

earnest phoenix
#

discord tos doesnt allow people under 13 to have an account

silent cloud
#

ohh off top

#

ry

#

sry

#

guys

queen sentinel
#

how old are you?

silent cloud
#

me?

queen sentinel
#

yes

silent cloud
#

14

queen sentinel
#

hmm

harsh nova
#

hmmm

silent cloud
#

xD

#

interesting

#

yep?

#

im rly 14 xD

#

need document ?πŸ˜‚

queen sentinel
#

just wondering what was interesting about the 10yr old being banned

harsh nova
#

i might know of a fella in here

coral trellis
#

Can you calm down, reduce the amount of messages you send to get a single message across and be more mature.

silent cloud
#

i ask bcs i dont know if user old under 13 he got ban

coral trellis
#

Okay thank you

silent cloud
#

so can somebody help me

#

if u need show how many users use ur bot it bot.user or bot.users

#

?

#

i think users

harsh nova
#

assuming it’s diacord.js it’s bot.users.size

#

Discord.js*

silent cloud
#

rly?

#

users.size

coral trellis
#

Have you tried reading the docs?

silent cloud
#

i read but i see user or users and ask what is correct

amber fractal
#

bot.user is the user the bot represents

ruby dust
#

Read what they do

amber fractal
#

And that

harsh nova
#

If you read the docs correctly you would’ve known this

silent cloud
#

hey guys can help again xD?

#

how to edit voice channel name

#

bot.setName

#

?

#

bot where he set name

#

i thing that wrong

silent cloud
#

how i can edit voice channel by ID?

#

bot.voiceChannel.setName(bot.users.size)

#

it is i think without ID

harsh nova
#

Read the docs :) @silent cloud

silent cloud
#

was read

#

but nothing

#

// Set a new channel name channel.setName('not_general') .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`)) .catch(console.error);

#

but

#

where id

quartz kindle
#

Id is used to find the channel. In the example the channel is already known, so no need to find it again

silent cloud
#

but how edit this channel

#

only this

#

vocie channel

harsh nova
#

What vi

#

Vc

silent cloud
#

?

harsh nova
#

let channel = client.channels.get(id)

silent cloud
#

ohhh rly

#

and that is all

#

???

harsh nova
#

Yea then use the setName function on the channel

silent cloud
#

if let channel=..

#

then

#

bot.channel.setName

#

?

harsh nova
#

get the channel, .setName() on the channel

silent cloud
#

@harsh nova

#

why bot crash?

#
let channel = client.channels.get(554623627887378454)
if(bot.users.size > 0){
bot.channel.setName('Bot users: '+ bot.users.size)
  }
});```
#

ohhh

#

i know

#

lol

#

no

#

again problemm

#
let channel = bot.channels.get(554623627887378454)
if(bot.users.size > 0){
bot.channel.setName('Bot users: '+ bot.users.size)
  }
});```
primal socket
#

try let channel = bot.channels.find(x => x.id === '554623627887378454')

dusky marsh
#

Every single time you run into one single little error you should try to fix yourself before immediately asking for help, it'll help you and us. And I suggest trying to like, learn some js instead of copying code

silent cloud
#

xD yes it is

#

@primal socket wait i try

primal socket
#

πŸ‘

silent cloud
#

not working

quartz kindle
#

Youre thinking the wrong way, more like youre nit thinking at all

#

You just want people to do it for you

silent cloud
#

so?

dusky marsh
#

Learn

silent cloud
#

i give ask, i sit here 2 hours and cant do it

#

then i give ask

dusky marsh
#

Sigh, they never learn

ashen vector
#

Learning and testing is mandatory, period.

quartz kindle
#

When you define a variable, ie let a = b you cant do something like something.a.... The variable you created has nothing to do with it. In your case, you created channel, so it has nothing to do with bot

#

You cant do bot.channel as that implies channel is a part of bot, but you just created it, so naturaly its not

silent cloud
#

but

#

what i need to do?

quartz kindle
#

If you learn some basic javascript and programming, these things are easy to solve

#

You wont learn anything by blindly trying shit out

ashen vector
#

So just use channel to access the data about your channel (channel.users.size for exemple)
The discord.js doc is good to know were infos are

silent cloud
#

i need not channel size

#

i need bot users size

amber fractal
#

Wait

ashen vector
#

It was an exemple. I presume the bot your are talking about is a Client so search in the Client section of the doc to know what datas and methods you have access to

amber fractal
#

That is easy

#

Getting user size is basically in the docs

quartz kindle
#

He doesnt understand the docs

silent cloud
#

yes but i need

amber fractal
silent cloud
#

i was reading docssss

unique nimbus
#

Do you know javascript?

#

like at all?

amber fractal
#

Click on collection, then click on map, as a collection extends map

silent cloud
#

i know how get users

#

but

#

i need paste that users in a voice channel name

#

in docs i only found .setName

#

thats ALL

unique nimbus
#

Let's see how quick I can find it

quartz kindle
#

Just use the setname

silent cloud
#

i use

#

but wrror

#

error

quartz kindle
#

But instead of text, you put the code that gives you the user size

amber fractal
#

You want the name to be a collection of user objects?

silent cloud
#

u think why i write here

#

i need paste users.size into name voice channep

quartz kindle
#

I just told you how

unique nimbus
#

We can't baby feed people the code

#

You need to learn

amber fractal
#

The number one

#

bot.users.size returns a number

#

You cant set a number as the channel name

silent cloud
#

i can

#

lol

amber fractal
#

Im guessing you were getting ERROR TypeError: (_data.name || channel.name).trim is not a function

#

You misunderstand

amber fractal
#

"2" !== 2

unique nimbus
#

very cool russian

#

or ukranian

silent cloud
#

russia

#

xD

unique nimbus
#

ye

#

very cool

#

@silent cloud I recommend you fully learning javascript

#

and maybe improve your english a little bit more to make it more understandable

dusky marsh
#

Yeah, learning js will help you immensely

#

Instead of always struggling trying to piece stuff together

unique nimbus
#

yes

silent cloud
#

ohhh

#

i watches guide

#

but

#

i think i dont understand

unique nimbus
#

Is there any guides in Russian so you can understand it better

#

Search Javascript Tutorials

#

@silent cloud

silent cloud
#

i was read that guid and watches video with 1hour

#

and now have error

#

TypeError: Cannot read property 'setName' of undefined

unique nimbus
#

idk javascript

#

learn javascript properly

amber fractal
#

When it says you cant do a method on something, it means the thing you are trying to do it on is undefined

#

So the channel wasnt found or doesnt exist

silent cloud
#

and what i need to do

amber fractal
#

get channel then set name

silent cloud
#

i know

#

bcz it try to find text channel

#

not voice

#

yeeee

amber fractal
earnest phoenix
#

we should make a flowchart for "i want make bot but idk code hlp"

silent cloud
#

im again here

#

xD

#

now

#

TypeError: Cannot read property 'get' of undefined

#

code

#

bot.on('ready', () => {
let channel = bot.voiceChannels.get(554623627887378454)
if(1==1){
bot.channel.setName('Bot users: '+ bot.users.size)
}
});

unique nimbus
#

Please for the love of god try and learn Javascript before making a bot

lavish forge
#

if 1 == 1

silent cloud
#

yep xD

spare glen
#

how do you add all your patreons to your website like this^^

lavish forge
#

Manually

spare glen
#

no way

lavish forge
#

Maybe check patreon api

spare glen
#

isnt there a api

#

yeah

dusky marsh
#

Yeah there is an API for patreon

spare glen
#

but how do i add users to my page with that api

#

i don't understand shit of the documentation

#

can someone help me with that please

chrome olive
#

why? hmm

lavish forge
#

Why are you asking us

spring ember
#

@chrome olive probably a 400 request

pallid zinc
#

Need help with java

spring ember
#

@pallid zinc JUST ASK

loud salmon
#

be nice :<

#

we can kindly notify them

#

instead of just yelling at them

spare glen
#

can anybody who knows patreon API, help me please

pallid zinc
#

Where I can deploy my bot 24/7

mossy vine
#

on a server

pallid zinc
#

Lol

mossy vine
#

what

#

you asked a question, i answered

pallid zinc
#

I now

silent cloud
#

god

#

i have free host

#

xD

pallid zinc
#

Ya

silent cloud
#

i think u know it

pallid zinc
#

Which

trail hearth
#

You could get a 2euro vps

pallid zinc
#

Nooooo

trail hearth
#

and that would work

#

instead of puting on shitty websites

silent cloud
#

||heroku||

unique nimbus
pallid zinc
#

2euro vps

#

?

trail hearth
#

yeah, a python bot doesn;t need that many resources

pallid zinc
#

My is java

trail hearth
#

still

#

I don't think u need more then 512 mb ram

#

and a dual core processor with 2~ ghz

silent cloud
#

hmmm

amber fractal
#

Ye python needs cpu

pallid zinc
#

Hmmm

#

I am buying new pc

#

So working on my secondary pc

#

With 2gb ram no graphic

trail hearth
pallid zinc
#

@trail hearth can you give 2euro link

trail hearth
#

i don't have a link now

#

but u can search on google

#

cheap vps

#

and u can find some

#

for 2 euros

pallid zinc
#

Ok

amber fractal
#

They are pinned here

#

Some good ones

earnest phoenix
#

scaleway offers 2€ vps

pallid zinc
#

@amber fractal thanks

#

What about Google cloud

spare glen
#

@trail hearth that 2$ vps. Does it support discord.js

#

like can it handle my javascript, D.js bot

#

its quite big

trail hearth
#

it can be big , size doesn't matter

#

it depends on the tasks that he does

spare glen
#

wdym

trail hearth
#

if he has a lot of background tasks which run the whole time

spare glen
#

on my pc?

trail hearth
#

no

#

if the bot itself has background tasks which run frequently

#

a lot of them

spare glen
#

wdym background tasks in my bot

trail hearth
#

but a 2-3 euro vps should be enough

pallid zinc
#

Google cloud is good or bad

spare glen
#

whats the site

#

rn i use glitch

trail hearth
#

?tag host

loud tinsel
#

I recommend Heroku πŸ˜ƒ It's free.

amber fractal
#

No

spare glen
#

no

trail hearth
#

heroku is bullshit

spare glen
#

ik

trail hearth
#

🀦

spare glen
#

even glitch is better

pallid zinc
#

@loud tinsel heroku is shit

spare glen
#

u get so much ping

loud tinsel
#

Why?

pallid zinc
#

Glitch is better than heroku

spare glen
#

@trail hearth the website name

loud tinsel
#

I verifed my account via credit card.

pallid zinc
#

I need to code more to host on heroku

trail hearth
#

- Heroku's environment is heavily containerized, making it significantly underpowered for a standard use case.

- Heroku's environment is volatile. In order to handle the insane amount of users trying to use it for their own applications, Heroku will dispose your environment every time your application dies unless you pay.

- Heroku has minimal system dependency control. If any of your Python requirements need C bindings (such as PyNaCl binding to libsodium, or lxml binding to libxml), they are unlikely to function properly, if at all, in a native environment. As such, you often need to resort to adding third-party buildpacks to facilitate otherwise normal CPython extension functionality. (This is the reason why voice doesn't work natively on heroku.)

- Heroku only offers a limited amount of time on their free programme for your applications. If you exceed this limit, which you probably will, they'll shut down your application until your free credit resets.``` @loud tinsel
dusky marsh
#

Just pay for a cheap vps heroku and glitch are both shite

trail hearth
#

Note: This is a list of hosting, not a backing/support for them. You will need to make your own decision.

  • OVH: https://www.ovh.com/us/vps/
    Starting at $3.35/month (USD), 2GB RAM and 10GB storage, high reliability.
  • Digital Ocean: https://m.do.co/
    Starting at $5/month (USD), 1GB RAM and 25GB storage, high reliability.
  • Linode: https://www.linode.com/
    Starting at $5/month (USD), 1GB RAM and 20GB storage.
  • Vultr: https://www.vultr.com/
    Starting at $2.5/month (USD), 512MB RAM and 20GB storage, plan only available on certain regions.
  • Amazon(AWS) Lightsail: https://amazonlightsail.com/
    Starting at $5/month (USD) (first month free), 512MB RAM and 20GB storage, high reliability.
  • Time4VPS: https://www.time4vps.eu/
    Starting at €2.99/month (billed every 4 months for €11.96/quarter), 512MB RAM and 20GB storage, free backups.
  • VIRMACH: http://virmach.com/
    Starting at $1/month (USD), 192MB RAM and 10GB storage, free DDoS protection, 1 CPU core.
  • VPSDime.com https://vpsdime.com/
    Starting at $7/month (USD), 4 CPU Cores, 6GB RAM, 30GB SSD Storage, 2TB Traffic and 10 Gbps Uplink
  • Servercheap https://servercheap.net/
    Starting at $4.50/month (USD), 2 CPU Cores, 2GB RAM, 30GB SSD Storage, Unmetered Bandiwdth
  • Scaleway https://www.scaleway.com/
    Starting at €2.99/month (Euro), 2 CPU Cores, 2GB RAM, 50GB SSD Storage
#

there you go, it's in the pinned messages

loud tinsel
#

Every month, Heroku give me 1000 hours

trail hearth
#

if it works for you

#

then just stay on it

spare glen
#

which one is the good one

trail hearth
#

that doesn't mean it's good

spare glen
#

with 2$

trail hearth
#

but if it's good enough for you then it's ok i guess

pallid zinc
#

I need to code alot for heroku

loud tinsel
#

Ok πŸ˜ƒ

trail hearth
#

scaleway for example

spare glen
#

@trail hearth which one is the good 2$ vps

loud tinsel
#

@pallid zinc a lot?

trail hearth
#

i can't say that I had a vps at them

#

I am hosting my bot on a dedicated server

#

so yeah

dusky marsh
#

OVH is good I've used them before

trail hearth
#

yeah they are good

pallid zinc
#

Heroku never deploy my not

trail hearth
#

I used to have a dedicated server at them

pallid zinc
#

@loud tinsel yup

dusky marsh
#

They all are reputable the ones in pinned

pallid zinc
#

Glitch better

trail hearth
#

there isn't a "better" company

#

for a 2 euro vps

dusky marsh
#

Glitch is still shit

#

Just don't be cheap lmao

trail hearth
#

you can't expect a overkill performance for a 2 euro vps

#

it will be good enough to run your script

#

and that's it

dusky marsh
#

Yup

inner jewel
#

what if my bot needs 2gb of ram

loud tinsel
#

There aren't other alternative for free.

dusky marsh
#

Just pay

#

It ain't that expensive

loud tinsel
#

I know

#

However

pallid zinc
#

@inner jewel bot need just 1gb

trail hearth
#

then yasmin we have a problem πŸ˜‚

loud tinsel
pallid zinc
#

Glitch

trail hearth
#

go on the website and post it and wait for the verification

pallid zinc
#

Heroku

arctic mountain
#

Then do it and wait

trail hearth
#

might take some times as everything is verified by humans

#

and not an algorithm

arctic mountain
#

Btw what about my bot

loud tinsel
#

Can I edit bot's website another time?

dusky marsh
#

Yup

trail hearth
#

yes you can edit it

#

how many times you want πŸ˜ƒ

#

what you mean kaep?

loud tinsel
#

ok thx

arctic mountain
#

I wanted to know when my bot will be tested to keep it online

trail hearth
#

you just have to wait

#

there isn't a estimate time when your bot or someone elses bot will be verified

#

patience and that's it

#

everything is verified by a person so that takes time, there are a lot of requests πŸ˜ƒ

#

and you should keep your bot 24/7

arctic mountain
#

Unfortunately I can't run my bot 24/7

trail hearth
#

then why do you want it to pe public on discordbots then πŸ€”

arctic mountain
#

It currently even runs on my phone...

dusky marsh
#

Oh god

earnest phoenix
#

hello

arctic mountain
#

Yup I'm dumb

dusky marsh
#

Yeah good luck developing that shit bud

arctic mountain
#

But it's open source as public domain

dusky marsh
#

If you have to host on your phone, this is the one time I'd suggest to use a free vps like heroku or glitch

trail hearth
#

In my opinion developers should post their bot on discordbots

#

only if they want it to pe public running 24/7

#

but that's my opinion πŸ˜ƒ

dusky marsh
#

Ye, no point in advertising your bot if it don't work

arctic mountain
#

And I'd have to pay for vps

dusky marsh
#

No

#

Heroku and glitch are free

arctic mountain
#

Well...

dusky marsh
#

Hosting on your phone is just an awful idea

lavish forge
#

Only recommend glitch

dusky marsh
#

Especially if you want to actually keep it up

lavish forge
#

Heroku is made for websites and shit like that

dusky marsh
#

Yet it still keeps a bot up

lavish forge
#

Barely

dusky marsh
#

No point in limiting people

#

Better than hosting on a phone

lavish forge
#

Depends on the phone

dusky marsh
#

Mmmmmnah

lavish forge
#

Yeah

arctic mountain
dusky marsh
#

I ain't talking processing power, I'm talking reliability

lavish forge
#

Can guarantee that a note 9 would be better than heroku, if it's on a decent lte network

arctic mountain
#

Data persistence

loud tinsel
#

I agree with canarado.

dusky marsh
#

So spending money on a phone and paying out the ass for reliable internet is better than a free option, especially since people are usually desperate for affordable options

#

Sounds dumb to me but ok

arctic mountain
#

My phone would be better too with 24/7 wifi

lavish forge
#

Who said you had to pay for it

#

A lot of people keep their older phones when they upgrade

dusky marsh
#

Where the hell am I getting a note 9

lavish forge
#

That was an example.

arctic mountain
#

Get note 7 to explode XD

dusky marsh
#

And again I ain't talking power

lavish forge
#

I ran an s5 with a bot for a bit and it worked fairly well.

loud tinsel
#

Ahaha πŸ˜ƒ

arctic mountain
#

My BQ Aquaris x pro works very well too

lavish forge
#

Only issue I had was my charger port was crap.

loud tinsel
#

I think you're joking

lavish forge
#

You can think what you want.

#

Bots aren't that intensive.

earnest phoenix
#

hi a person would have an idea for the code in Node.js of the command !say

loud tinsel
#

The server comes even cheaper.

lavish forge
#

What

#

Gaming 01 have you used google

arctic mountain
silent cloud
#

yo it again me

#

xD

#

somebody can tell how to get voice channel id

#

by code

arctic mountain
#

you'd need to tell which api you're using lol

earnest phoenix
#

yes, I do not find a code that matches @lavish forge

dusky marsh
#

You can't just make an umbrella statement of bots aren't that intensive

arctic mountain
#

Depends on language

dusky marsh
#

Not even that

arctic mountain
#

Python isn't very intensive

dusky marsh
#

Some bots just do way more shit than others

#

And require some power, but that wasn't even the point lol

arctic mountain
#

Yeah but my bot only responds to commands and does nothing else

silent cloud
#

@dusky marsh i know what do you say, but can say how to get voice channel id by code?

dusky marsh
#

If that's all it does and you want it up 24/7 glitch is a good option and no one else can say otherwise :P

arctic mountain
#

didn't ever hear about glitch

dusky marsh
#

Yknow I didn't think about that

#

Hold on

#

Ah yeah it doesn't support py, I should've guessed, well then

silent cloud
#

...

dusky marsh
#

We ain't your maids

#

Look it up

arctic mountain
#

My bot will go offline now... like me 😒

dusky marsh
#

If you don't wanna use heroku which will work in the short run, I can suggest chipping out a few bucks for ovh :P

arctic mountain
#

what's ovh

dusky marsh
#

Just a cheap host, but one more thing before I gotta go, I found something www.pythonanywhere.com maybe check it out

#

Saw it on a forum maybe it can host your bot

silent cloud
#

@dusky marsh

#

i know what do you say, but can say how to get voice channel id by code?

quartz kindle
#

google and amazon are free for 12 months

#

you can start with them

mossy vine
#

@silent cloud read the goddamn docs, not the examples

silent cloud
#

i cant

#

i sit all this day

#

and it write erro

#

r

dusky marsh
#

Quit pinging me, I said before what you should do

mossy vine
#

read the docs, everything is there

silent cloud
#

i dont seen see only what i found

#
GET/channels/{channel.id}
Get a channel by ID. Returns a channel object.```
#

and

#
The ID of the category parent of this channel
Type: ?Snowflake```
quartz kindle
#

thats the rest api, not the discord.js api

#

whats your code now?

silent cloud
#

ohhhh

#

sec

#

bot.on('ready', () => {
let channel = bot.channels.get('554623627887378454')
if(1==1){
bot.channel.edit({ name: 'Bot users: '+ bot.users.size})
}
});

amber fractal
#

what's the 1 = 1

silent cloud
#

for you

#

bot.on('ready', () => {
let channel = bot.channels.get('554623627887378454')
if(bot.users.size = > 0){
bot.channel.edit({ name: 'Bot users: '+ bot.users.size})
}
});

quartz kindle
#

the channel part is correct, the rest is a big wtf

late hill
#

Maybe you should actually use

#

The channel var

amber fractal
#

=>?

#

What

silent cloud
#

if bot users

#

then 0

late hill
#

=

silent cloud
#

oh wait

late hill
#

??

silent cloud
#

ye xD

amber fractal
#

It's >= for greaterthan or equal to

quartz kindle
#

just use >

amber fractal
#

^

quartz kindle
#

if you do >= then it will still work with 0, which you dont want, apparently

silent cloud
#

bot.on('ready', () => {
let channel = bot.channels.get('554623627887378454')
if(bot.users.size > 0){
bot.channel.edit({ name: 'Bot users: '+ bot.users.size})
}
});

amber fractal
#

what's with the bot.channel part

quartz kindle
#

yes, now the rest is wrong too, i told you before

amber fractal
#

you define it as channel Thonk

quartz kindle
#

you cant use bot.channel

silent cloud
#

channel.edit?

quartz kindle
#

yes

silent cloud
#

bot.on('ready', () => {
let channel = bot.channels.get('554623627887378454')
if(bot.users.size > 0){
channel.edit({ name: 'Bot users: '+ bot.users.size})
}
});

#

let i try start this hell machine

#

xD

#

nope

#

ohhh missing )

spare glen
#

how do i align those 2 colors, so they match

amber fractal
#

If it's one on top of the other why have it there?

spare glen
#

cause its gonna be a hover thing

#

its suppose to be like that

#

like the black one is the background which comes out when u hover

amber fractal
#

You can change color on hover

spare glen
#

and the white one is the default

#

no but like this happends

#

look

#

the white and black in the other 2 are not aligned

#

how do i align them, look at the code

amber fractal
#

I don't do a lot of web development, I offered what I thought would work

spare glen
#

k :/

quartz kindle
#

whats not aligned?

loud tinsel
#

What's the best programming language for discord bots?

#

I'm using python

#

It has some problems.

unique nimbus
#

what problems do you have?

arctic mountain
#

I use it too

quartz kindle
#

there is no best, all languages are good

unique nimbus
#

Most people here use python or javascript

#

each has its advantages and disadvantages

loud tinsel
#

Yes

arctic mountain
#

which doesn't mean they're the best

unique nimbus
#

nothing can be the best

quartz kindle
#

more complex languages such as c#, java, go, etc... can be more performant, but harder to work with, while languages like python and javascript are very easy to use, but might have worse performance

arctic mountain
#

no java or c# are not more performant

#

If you use the right interpreter

quartz kindle
#

they "can be" more performant

#

if you know what you're doing

arctic mountain
#

then you'd use C or C++ lol

quartz kindle
#

its included in the "etc"

#

ie: "more complex languages"

arctic mountain
#

Not really more complex

quartz kindle
#

compared to javascript they are

arctic mountain
#

no

#

javascript has very weird behavior for many operations

quartz kindle
#

thats not what im talking about

late hill
#

Yes but you don't have to write tons of code

#

Javatm

quartz kindle
#

javascript is a simple to use, very high level language, you dont need to worry about memory management for example, the engine does it for you

arctic mountain
#

you need to keep that weird behavior in mind while writing code

#

Just like Java or C# lol they have gc too

quartz kindle
#

C/java are lower level languages, you need to do many things yourself

arctic mountain
#

But less memory usage

#

Look at MultiMC and official MC launcher

quartz kindle
#

even if they have many similar features, they're still much lower level than javascript, which makes them more complex

arctic mountain
#

one is written in C++ and one in JS/HTML/CSS/etc.

#

C++ has much less memory usage

quartz kindle
#

what exactly are you arguing about? thats exactly what i said

#

lower level languages = can be more performant, but are more complex and harder to use

arctic mountain
#

js is harder to use than c++

quartz kindle
#

no it isnt lol

late hill
#

Disagree

arctic mountain
#

look at classes and inheritance

late hill
#

Tim do u know java

quartz kindle
#

js was made to be used by braindead people

#

lmao

late hill
#

Need help

#

Timmm

quartz kindle
#

just say what you need lol

arctic mountain
#

python is super gud

late hill
#

okay

#

so

spare glen
#

Javascript is best, no doubt

arctic mountain
#

it has features js doesn't have

#

multiple inheritance

late hill
#

Just logic

#

Should I have a Command interface

#

Or a Command class

#

And have each command being a subclass

arctic mountain
#

which api/language

late hill
#

Java

arctic mountain
#

which api

late hill
#

jda

#

Does that even matter for the question I asked

arctic mountain
#

I think it does

#

for example in JS there is no multiple inheritance, not even interfaces

late hill
#

Yes

#

Different language

#

Depends on language

earnest phoenix
#

command interface @late hill

#

iz better

late hill
#

Alright

earnest phoenix
#

and each command should be a class

late hill
#

And do you have a specific reason for that

earnest phoenix
#

πŸ€”

#

fast and organised?

spare glen
late hill
#

I mean my first thoughts were to use an interface

#

But then I saw examples of people using a class and subclasses

#

so

#

Idk man

#

I question

earnest phoenix
#

first off all, it's a better way to organise ur code

spare glen
#

does anyone here know how to use patreon API

earnest phoenix
#

nope @spare glen

spare glen
#

:/

loud tinsel
spare glen
#

i dont understand any of the api docs

arctic mountain
#

ok my bot will be offline again

naive gull
#

hey

#

nvm

earnest phoenix
#

hello please help me for the command "say" in the language Node.js

#

please contact me in mp

dusky marsh
#

Fam

#

Take your args

#

Join em

#

And send em back

#

2hard4me

amber fractal
#

Literally just send message content

#

you dont need to join anything

strange compass
#

how can i make my bot prefix work for all "mod ", "Mod", "MOD " and whatever

#

😐

amber fractal
#

convert the message content to lower case and save the prefix in all lower case

#

Actually

#

there may be a better way

#

just how I do it

short portal
#

how do i see how many characters are in a var in js?

amber fractal
#

idk why #development is Google search bar for a lot of people

earnest phoenix
#

because "you do it for me i dont feel like it"β„’

formal agate
#

ok this is driving me nuts why do i get the error UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'bot' of undefined at module.exports (D:\Programs\HuskyBot Dev\events\message.js:18:25) when its clearly defined??

module.exports = async (message) => {
    if (!message.author.bot) return;``` (cut out end of code for char length sake)
amber fractal
#

I just have a question, why are you returning if it isnt a bot tho

formal agate
#

idk i just changed it to see if it worked

#

im guessing and checking at this point

earnest phoenix
#

the author is undefined

#

probably not in cache or something?

formal agate
#

btw for reference message is being defined

#

um idk

#

it is in a other file

#

but idk

#

I've done this before and it worked

earnest phoenix
#

are you sure message is actually a Message object

formal agate
#

yes

#

its the only object being passed though

earnest phoenix
#

have you tested that

formal agate
#

yes

#

wait no

earnest phoenix
#

well then you can't be sure

sly venture
#

hello

earnest phoenix
#

use any other prop e.g content on the message

#

if that's undefined then the object isnt a Message

formal agate
#

ok um its trying to define something else

#

so you where right

#

not message

#

and idfk why

vague chasm
#

Hello, I wanted to ask how to use a package in a HTML's <script> because it says require is not a function and node.js is not installed on the ftp my website is.

amber fractal
#

HTML != node

vague chasm
#

ik I want to use <script> in it

amber fractal
#

It uses js

#

not node

vague chasm
#

then what do I do

#

to run node code

bright spear
#

You don't

amber fractal
#

You either host your webserver with node, or you do some weird shit, both of which I've had trouble with in the past

bright spear
#

You can't run node code in <script>

vague chasm
#

What should I do? I need to run node code

#

On a button press event

amber fractal
#

You cant.

vague chasm
#

Then it means I need to host website using a .js file??

#

To use node code

#

(http.createServer or express)

bright spear
#

Why do you even need node

#

Just use normal JavaScript

vague chasm
#

I need to .require() a package

bright spear
#

What package

#

Just use script src

vague chasm
#

discord.js

amber fractal
#

what

vague chasm
#

To send webhook

bright spear
#

Just use fetch

#

Don't use discord.js

amber fractal
#

Why do you need discord.js to do that

vague chasm
#

Can you give me an example as I didn't use fetch ever?

bright spear
vague chasm
#

Thanks

bright spear
#

Yw

vague chasm
#

So I need to post to webhook link?

bright spear
#

Yes

#

However

#

People can use the webhook link to spam and mention @ everyone

#

So you need to be careful

vague chasm
#

Ok.. I am using password thingy too

amber fractal
#

If it's in your html they can see it

bright spear
#

^

silent cloud
#

guys

#

somebody can write again how to add anim emojis to code

bright spear
#

Use \:emoji: in discord and get the actual emoji string

silent cloud
#

ty

bright spear
vague chasm
#

Um where should I store and import my password from, then

silent cloud
#

but

#

if i cant use that

bright spear
#

?

#

Oh

#

Just use the bot

silent cloud
#

im not nitro but i need to get anim emojis

bright spear
#

Or devtools

amber fractal
#

when you import anything with html, they can see it

bright spear
#

@silent cloud what lib

silent cloud
#

js

bright spear
#

Lib

silent cloud
#

oh

#

sry

amber fractal
#

you can just get and toString() in d.js

silent cloud
#

what lib?

amber fractal
bright spear
#

In d.js you can use message.guild.emojis

silent cloud
#

oh

vague chasm
#
fetch(url, {
    method: 'post',
    headers: {
      "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
    },
    body: 'foo=bar&lorem=ipsum'
  })
  .then(json)
  .then(function (data) {
    console.log('Request succeeded with JSON response', data);
  })
  .catch(function (error) {
    console.log('Request failed', error);
  });``` I am not familiar of sending webhooks without WebhookClient object 🀷🏼
amber fractal
#

A webhook is json

vague chasm
#

So what do I do to send it

amber fractal
#

post json to the webhook

vague chasm
#

headers: { "send": "like this?" },

amber fractal
#

no

#

the post data doesnt go in headers

vague chasm
#

body?

#

Thats why I need an example

amber fractal
silent cloud
#

in title can be anim emoji?

vague chasm
#

I know how to post but...

silent cloud
#

can work in title

vague chasm
#

Idk how the data is to be sent

#

I need the webhook example for that

amber fractal
#

Please also use google, it's there for a reason

vague chasm
#

Ughh

#

ik that

#

Where does that json go

#

body or header... :/

amber fractal
#

in the post request

#

Literally

#

I wont just tell you

vague chasm
#

oh so no body or header, just the json webhook data in place of them

junior summit
#

how do i make it so it shows users and not

#

servers

#

like in the game status

#

like for the game status for servers

#

${client.guilds.size}

vague chasm
#

wdym

#

what do you want to do???

#

client.users.size??

junior summit
#

wait so i just do that

#

i though it would be more complex but lol thanks

vague chasm
#

lol np

silent cloud
#

guys

#

how to add anim emojis in a code, bot have in a server where have them

earnest phoenix
#

do you want to use them like send in a message or create ones in code

unique nimbus
#

\Emoji

#

then you copy paste what it is

#

into command

#

<aBeter551192371979616277> is one of the examples

silent cloud
#

not work+ i cant write \emoji bcz im not intro

#

and see that

#

:thinking:

#

not work

#

i write \ and emoji

unique nimbus
#

If it comes straight from discord you can just put :thinking.:

silent cloud
#

wtf see?

#

:doggowave:

earnest phoenix
#

because that emoji is not here

#

oh it is nvm

#

escaping doesn't work properly on mobile

#

you'll have to use desktop

silent cloud
#

sec

#

i use puffin

earnest phoenix
#

for animated emojis (if you're not nitro), you can programatically fetch them

silent cloud
#

ohhh ye

#

work

#

cry

#

u have nitro?

earnest phoenix
#

i dont

#

https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=emojis

this offers you a collection of emojis, you can filter out ones which are not animated and map the rest to <a:name:id>

silent cloud
#

rt

#

ty

#

i found is by css code

#

id

naive gull
#

A very stupid question but.. can a bot add a bot to a server?

quartz kindle
#

nope

naive gull
#

Ah

#

Would be amazing xD

unique nimbus
#

the captcha stopped bots doing it

naive gull
#

Ah ye

earnest phoenix
#

and the endpoint is unavailable to bots

hushed berry
#

It was captcha'd after someone invited like 50k bots to their server

amber fractal
#

People like that ruin it for everyone

earnest phoenix
#

i mean they were testing?

inner jewel
#

no

#

it was after someone added dabbot to 30k guilds overnight

amber fractal
#

Wait wtf

#

you can only be in 100 guilds though, could his bot invite itself Thonk

earnest phoenix
#

why

#

why the frick

#

would you

inner jewel
#

automated account creation

#

ez

hushed berry
#

@inner jewel Thonk actually?

#

huh i guess i misremember

#

or did the thing i remember also happen

smoky mica
#

hey guys

amber fractal
#

hey

smoky mica
#

how can I define api latency?

amber fractal
#

got a question?

#

Oh

#

lib?

smoky mica
#

discord.js

#

is it like my bot sending a req to a server?

amber fractal
#

idk why you think it

#

is complicated

#

if that's what you're looking for

smoky mica
#

not really xd

amber fractal
#

Then idk what you want

smoky mica
#

its ok tho πŸ‘

earnest phoenix
#

Api lantency

#

Ping command? @smoky mica

#

just bot.pings

smoky mica
#

i've a ping command but I just needed the proper definition of it

earnest phoenix
#

The latency if you want @smoky mica

#

Its the latency

#

Of your bot to the server

smoky mica
#

Response time yeah?

earnest phoenix
#

Yes

smoky mica
#

Aight