#development

1 messages ยท Page 1170 of 1

vivid wadi
#

i mean ik javascript but i dont know how to download it

opal plank
#

how about we dont use tutorials which are likely outdated and use the proper documentation?

vivid wadi
#

i have node.js downloaded but idk how to use it

earnest phoenix
opal plank
earnest phoenix
#

@vivid wadi Kick ban commands episode 5

opal plank
#

wdym download javascript?

earnest phoenix
#

._.

small zenith
#

Not that

opal plank
#

downloading javascript

earnest phoenix
#

LoL

small zenith
#

I want to get server id and name from its invite link ( dis cord.gg/XD )

opal plank
#

if you mean NODE which is what runs your code, then thats simple with npm

earnest phoenix
vivid wadi
#

for some reason i cant install discord.js

opal plank
#

why not?

#

npm i discord.js (wait a sec, lemme double check)

small zenith
#

Its not what im looking for but thanks

opal plank
#

yes, npm i discord.js

earnest phoenix
#

that is what you are looking for

#

lmao

opal plank
#

@vivid wadi npm i discord.js

earnest phoenix
#

@small zenith u cant

vale garden
#

hi im back

#

i already did the 0 thing

#

i leaves it at 0 at all times

opal plank
#

you should really do step debugging btw

small zenith
#

Santa wumpus does @earnest phoenix
It asks to send link and when sent it edits msg to server name

vivid wadi
earnest phoenix
#

@vivid wadi u need node.js v12++

opal plank
#

thats it

earnest phoenix
#

@vivid wadi ye

opal plank
#

its installed

vivid wadi
#

i have node.js

earnest phoenix
#

u done

vivid wadi
#

oh

opal plank
#

@vivid wadi and now you have discord js too

#

now go code, shoo

cinder patio
#

you had it before

vivid wadi
opal plank
#

@vale garden try step debugging on VSC, might give you a clue of whats going on the code

#

mate, you CODE your file

#

you dont open it

earnest phoenix
#

wtf

opal plank
#

its not an .exe

#

you said you knew JS

earnest phoenix
#

@vale garden int d = 0; if its not 0 by default, you cant get the value from it if its never assigned by anything

vivid wadi
#

when?

earnest phoenix
#

DUDE he know 0 from js

#

Watch Yt

earnest phoenix
#

@small zenith what api wrapper are you using

vivid wadi
#

i know

#

i said i know it

small zenith
#

discord.js

earnest phoenix
#

._.

vivid wadi
#

but not download it

vale garden
#

@vale garden int d = 0; if its not 0 by default, you cant get the value from it if its never assigned by anything
@earnest phoenix ok but assigning 0 leaves it at 0 so that isnt the fullthing right

earnest phoenix
#

omfg

#

i am done

opal plank
#

mate, js is not downloadable

vivid wadi
#

oh

earnest phoenix
#

u know nothing about nodejs

#

and js

opal plank
#

you already got node

#

now code your bot

vivid wadi
#

u know nothing about nodejs
@earnest phoenix check

earnest phoenix
#

@opal plank he open the Disocrd.js source dile

#

file

#

@vale garden if the value of d is 0 you can unbox it, if its null, you cant

opal plank
#

yes indeed @earnest phoenix

vale garden
#

okk

earnest phoenix
#

Maybe @vivid wadi need to watch some yt tutorial first

vivid wadi
#

its a file for me

opal plank
#

mate, read the links i sent you

#

SPECIALLY the screenshot

#

this

earnest phoenix
#

oh god no

#

Dont search for Discord.js

#

just make a file

#

and type npm install disocrd.ks

#

js

earnest phoenix
#

and then u make a new file from that folder

#

and then open the file u have created

opal plank
#

since he isntalled discord.js i assume he init'd the project already

earnest phoenix
#

const disocrd.js = require("fisocrd.js")

timid terrace
#

980714

earnest phoenix
#

that is

#

u done

thick gull
#

you sure they have node downloaded

timid terrace
#

I need evao commansa

#

Who have

#

E al

#

Eval

thick gull
#

eval(content)?

opal plank
earnest phoenix
#

@timid terrace we are spoonfeeding

vapid oak
#

help

earnest phoenix
#

go yt

#

and search

timid terrace
#

Eval

opal plank
#

DONT go youtube

timid terrace
#

Ok

opal plank
#

use docs

vapid oak
#

helpppppp

opal plank
#

youtube likely has outdated and poorly explained shit

vapid oak
#

i wanna advertise my server

thick gull
#

help with what

#

ok

vivid wadi
vapid oak
#

and they say i dont have a server

#

JNONDGJOEG

opal plank
#

@vivid wadi you need to LEARN JavaScript before making a bot

thick gull
#

i don't know what's happening

opal plank
#

dont copy code

vivid wadi
#

i didnt

opal plank
#

just a warning

vivid wadi
#

it auto came there

opal plank
#

im aware

thick gull
#

one guys trying to learn djs without knowing difference between js and java

opal plank
#

just letting you know before hand

thick gull
#

one person's asking about server advertising

#

what's happening

opal plank
#

the usual hourly message in #development , thats whats happening

#

should've gotten used to it by this point

#

theres no shame in coming here to ask for directions on where to learn

#

as long as you willing to put effort into it, of course

vapid oak
#

helppppppppppppp

#

๐Ÿ˜ญ

opal plank
#

@vapid oak what?

vapid oak
#

i cant advertise my server in the web thingy

#

they say i dint have a server

#

dont

opal plank
vivid wadi
#

the bio

opal plank
#

not the place for this

#

@vapid oak anyway, what exactly is the issue? what web thingy? top.gg?

vapid oak
#

yep

#

what

opal plank
earnest phoenix
#

@small zenith discordjs is shit ngl

vapid oak
#

whats wrong with my bio

#

uhhhhhhhhhhhhhhhhh

opal plank
#

this is for development

small zenith
#

Ok

vapid oak
#

oh

earnest phoenix
#

@small zenith but just do client.fetchInvite

small zenith
#

will that give me server details?

earnest phoenix
#

it will return you full invite object

small zenith
#

Ok

earnest phoenix
#

like this

weary ridge
green kestrel
#

c.fetchall() doesnt have any entries

#

it returned an empty array ๐Ÿ˜„

#

you assume theres always at least one entry by doing [0][0]

weary ridge
#

oh

earnest phoenix
#

it returned null

opal plank
#

1800 lines zoomeyes

#

does py not have a handler?

#

shivaco, people might be committing sins here

earnest phoenix
#

im pretty sure c.execute doesnt return a value

#

@weary ridge you might use c.get if you want it to return a row

#

and c.all if you want it to return all rows

delicate shore
#

๐Ÿ”ซ

timid terrace
#

How ro make a 7/24 uptime discord bot ?

delicate shore
opal plank
#

VPS or self host

#

ยฏ_(ใƒ„)_/ยฏ

delicate shore
#

7/24

timid terrace
#

Self host?

delicate shore
#

on your own PC

opal plank
#

yeah, you can run bots on your computer

delicate shore
#

;;---;;

opal plank
#

as long as you have it running 24/7, the bot will run 24/7

timid terrace
#

Uptime bot?

opal plank
#

you can use a cellphone or some other tech

#

wdym uptime bot?

delicate shore
#

Uptime bot?
@timid terrace wat

alpine zephyr
#

anyone know how to make a bot have a play music command with discord bot maker
?

opal plank
timid terrace
#

I have uptime bor

delicate shore
#

anyone know how to make a bot have a play music command with discord bot maker
?
@alpine zephyr don't use it

#

do real coding

alpine zephyr
#

y?

green kestrel
#

personally i'd start by not using DBM

delicate shore
opal plank
#

self hosting doesnt need uptimer, and the fact that you need an uptimer means you shoukldnt be using it

alpine zephyr
#

im dumb tho

green kestrel
#

you can only do things in DBM that its creators have made functions for

alpine zephyr
#

i cant code

#

a single line in js

opal plank
#

usually uptimers are done to avoid getting the code to idle, likely glitch

delicate shore
#

learn

green kestrel
#

youre not dumb, you can learn! its a standard feature of the human OS ๐Ÿ˜„

alpine zephyr
#

lmao

#

alr

timid terrace
#

What name make a discord web

delicate shore
#

i was first one to react with star

opal plank
#

inspirational quotes in #development , thats a rare thing to see

alpine zephyr
#

ima need to get .js for visual studio

timid terrace
#

What website name

thick gull
#

ima need to get .js for visual studio
what

opal plank
#

you mean a linter?

alpine zephyr
#

isnt

delicate shore
#

wait i can also star messages?

opal plank
#

you dont get .js for vsc

timid terrace
#

Im turkish

alpine zephyr
#

?

#

\Whaa

delicate shore
#

no

#

;-;

thick gull
#

wait i can also star messages?
@delicate shore as long as its not your own

timid terrace
#

I have bad english

opal plank
#

VSC is a code editor

delicate shore
#

oook

thick gull
#

and if your not blocked

#

by the author

delicate shore
#

ook

timid terrace
#

You mean glitch ?

opal plank
#

you shouldnt use glitch

#

they remove bots, its not a site for hosting bots

#

Dont star me AngeryBoye

earnest phoenix
winter basalt
#

@delicate shore can you not star random messages

opal plank
#

NO

thick gull
#

heroku isn't meant for bots

#

either

opal plank
#

not heroku NOR glitch

earnest phoenix
#

who cares

timid terrace
#

Heroku dont use quick.db

opal plank
#

they do

delicate shore
#

@delicate shore can you not star random messages
@winter basalt ok

opal plank
#

they remove your bots

timid terrace
#

Reis

earnest phoenix
#

my c# bot runs on heroku np

opal plank
#

glitch AND heroku aggressively remove bots from their website, yout he one on the wrong for using a website meant for webservers and websites hosting for a unintended prupose that breaks their TOS @earnest phoenix

timid terrace
#

Sen ne onerirsin

delicate shore
#

Dont star me :AngeryBoye:
@opal plank is it a bad thing?

opal plank
#

well if i say some dumb shit feel free to star, just dont spam it

thick gull
#

you get sent to tonkkus lair to be tortured when you're starred, so yes it is bad

timid terrace
#

Pada yokki

#

Sen neyle aktif edigorsun

opal plank
#

english here

timid terrace
#

I search new website

#

How to nake 7 24

opal plank
#

you want to put bot on your computer?

timid terrace
#

Pwait i copy website url

opal plank
#

for run 7 / 24?

timid terrace
#

I use tepeljone

opal plank
#

for free you can host bot on your pc

timid terrace
#

Telephone

#

.s

opal plank
#

you can use telephone to host bot too

#

telephone needs to be online 24 h 7 days

timid terrace
#

No

#

.d

opal plank
#

or you can pay $3 for VPS

timid terrace
#

. Use glitch

#

And uptime bot

opal plank
#

DONT use glitch

delicate shore
#

use galazy gat

earnest phoenix
#

@opal plank hosting a discord bot on heroku doesnt break their TOS lmao

opal plank
#

other sites for free no pay

delicate shore
#

galaxy gate

timid terrace
#

1000 hours finish for new aaccount uptime

opal plank
#

@earnest phoenix there are multiple instances of reports of glitch and heroku agressively removing bots from their platforms

delicate shore
#

3dollars is like 21 tl
@earnest phoenix IT IS LIKE 210 RUPPPESS

#

oh sorry for caps

earnest phoenix
#

@opal plank That has nothing to do with hosting discord bots on their server in general

timid terrace
delicate shore
timid terrace
opal plank
timid terrace
#

What

opal plank
#

free host

#

who doesnt have a credit card nowadays?

#

apart from minors, clearly

#

or dan bot hosting

#

there are plenty of free VPS out there to host your discord bot

#

glitch and heroku shouldnt be on that list

#

up to you to risk it

#

they arent meant for bots

earnest phoenix
#

What makes me so mad is when people are spreading false rumors and when questioned, he cant even back himself up with proof

midnight blaze
#

you can not use glitch anymore for hosting

#

unless you buy a premium account

midnight blaze
#

I dont see how people dont know, that you can not ping your bots anymore on free glitch..thus you can not host your bot 24/7 on a free gltich account.

#

If you buy a glitch account, then why not buy a normal vps instead?

opal plank
#

this is also an example of heroku's limitations

#

Let's get 2 things out of the way first. First, Heroku can't handle Music Bots - don't even try, it won't be worth it. Second, you cannot save data on a Heroku instance meaning you can't use sqlite, json data, enmap, or any other "save file on disk" concept. You'd need pgsql or a separate database instance.

earnest phoenix
#

false, false and false

midnight blaze
#

I have used heroku, when I started with bots, to learn how to use them^^ but as soon as you want a more serious bot, there is literally no free option.

opal plank
#

even the guides tell you

earnest phoenix
#

im literally using heroku rn

#

with postgres

#

works with sqlite too

opal plank
#

did you read the whole thing?

#

You'd need pgsql or a separate database instance.

earnest phoenix
#

yea

midnight blaze
#

so how is that false false false

#

when it says exactly what you just said

#

@opal plank sry, but that guide can not be uptodate, you can not host 24/7 on glitch anymore for free, they changed some stuff lately

earnest phoenix
#

let me shit on you and write a bot right now that literally proves you wrong

opal plank
#

hey dude, you do you

#

i dont give 2 f's about what you do or dont

#

just keep on topic here

#

no drama

earnest phoenix
#

THEN why are you spreading false rumors

opal plank
#

i've given you sources yet you still claim stuff

earnest phoenix
#

are you dumb

opal plank
#

take your drama elsewhere

earnest phoenix
#

you created this situation

opal plank
#

i explained that you shouldnt use glitch nor heroku for hosting bots, period

#

there a better alternatives

#

which are also free

#

and properly suited for discord bots

earnest phoenix
#

reeeeee

#

Show me in the TOS where it says that discord bots are not allowed

#

no u can use it

#

but it is bad

#

that is

#

They banned me

#

^^

#

For bots

#

wut

#

@earnest phoenix wdym

opal plank
earnest phoenix
#

They suspended my account

#

Heroku

#

why

midnight blaze
#

he never said it is against the ToS rules wut

opal plank
#

there are quite a few cases of that happening

earnest phoenix
#

why

#

and why

#

glitch AND heroku aggressively remove bots from their website, yout he one on the wrong for using a website meant for webservers and websites hosting for a unintended prupose that breaks their TOS @earnest phoenix
@opal plank

earnest phoenix
#

RIght there

#

oh

#

i see

#

Because I just MADE an app called " discord bot" smth and i didn't even upload mah files

#

i use heroki only for lavalink only

#

Maybe they have bots to detect discord bots

#

lol

#

BTFS is so much better than a VPS

#

u should use heroku only for Lavalink

#

it is good

midnight blaze
#

@earnest phoenix he was talking about pinging your own bot

earnest phoenix
#

Anyone knows what BTFS is

#

lol

#

nope0

#

lol

#

B ittorrent
F iile
S ys
T em

#

@earnest phoenix ye

#

u need to wait

#

3week+

#

to get vertified

#

ye

#

before was 1week+

midnight blaze
#

I have waited 4 weeks ๐Ÿค”

earnest phoenix
#

but now 3weeks

#

@midnight blaze Damm

#

i waited 4 days

#

hehehehe

#

:)

#

What i need to do to get "BOT DEVELOPER" role?

#

verify my bot?

#

get vertifed

midnight blaze
#

read the faq

earnest phoenix
#

ye

#

k

#

nah

midnight blaze
#

it will cost you money

earnest phoenix
#

just wasting money

#

for vps

#

but it gives u exp

#

V irtual
P rivate
S erver

#

u will get banned soon

midnight blaze
#

great, is your bot 24/7 online?

#

then Nguyen is correct

earnest phoenix
#

ye

#

for vps
@earnest phoenix just use herokupepeOK

#

free host :)

#

@earnest phoenix and u will get banned soon

#

oops

#

://

#

idk

#

@earnest phoenix yes

#

yes Heroku

#

why?

sullen harness
#

Banned on glitch, not here.

earnest phoenix
#

:/

#

cuz that breakes rules

midnight blaze
#

if you use a flask server or express server to keep your bot alive with pinging

#

you will be banned

earnest phoenix
#

u better move to vps

#

It's time for my rasberry to do its job ":))

#

they are all free

#

for vps

#

i use my rasberry

midnight blaze
#

Lol, they aint free, you have to add your credit card and the more specs you use, the more expensive it gets

earnest phoenix
#

yep

sullen harness
#

Also, you don't get "banned" afiak. Only your project on Glitch gets suspended.

earnest phoenix
#

but u need to vertify ur self with creadit card

#

its ok to self hosting the bot? on a server?

#

ye

#

like rasberry

#

k

#

ye

#

eait what

#

oh ye

#

@earnest phoenix nc

opal plank
#

either a pc or rasberry work

midnight blaze
#

react on your own comments, poggersxd

opal plank
#

pi 4 might be a very reliable option

earnest phoenix
#

i have 4

midnight blaze
#

rasberry is good

earnest phoenix
#

3*

opal plank
#

i havent played with raspberry yet

#

though i did run my beta bot on a Wii

midnight blaze
#

if you have like an old tablet you dont use

#

you could also use this to host your bot

earnest phoenix
#

its ok digital ocean?

#

its paid

midnight blaze
#

yes, very ok

opal plank
#

most vps should work

fluid basin
#

digital ocean is decent

#

though theres cheaper ones in pins

earnest phoenix
#

yeah

#

for me its chip :)

midnight blaze
#

@earnest phoenix you asked every person on Indonesia or where do you get your sources from?

earnest phoenix
#

cheap*

#

xD

sick cloud
#

edit your messages instead of sending a new one to correct yourself

#

also youtube isn't a valid source

opal plank
#

ah yes, the most trusthworthy source

#

youtube

midnight blaze
#

show source that says what you says. It doesnt make sense to me^^ why should people from Indonesia be ignored by glitch.com?

earnest phoenix
#

LUL. on Wii?

opal plank
#

yes

#

using linux

earnest phoenix
#

Haha kinda wanna see that

delicate lance
#

Hey

opal plank
#

i think i might still have it

delicate lance
#

Who can I get the link of the server ?

opal plank
#

gimme 2 m lemme see if i can find it

earnest phoenix
#

Speaking of which, what did the Wii even use as an OS?

delicate lance
#

This server

#

@earnest phoenix hey how can I get the link of this server ?

earnest phoenix
midnight blaze
#

@earnest phoenix you dont get it tho, they changed this lately. The ignored people in the past, but not anymore. It is new.

delicate lance
#

Can u tell me ?

midnight blaze
#

@delicate lance you are new on discord?

opal plank
#

@earnest phoenix cant find it, though i bet i know where i left it

delicate lance
#

@midnight blaze no

trail oyster
#

hi

#

can you help me

earnest phoenix
#

@delicate lance do you know c#?

#

Ah yes, my childhood

trail oyster
#

I want user use prefix command and my bot gives to role the user

#
{ 
    if (msg.content.toLowerCase() === prefix + 'reg')
    {
      const role = msg.guild.roles.cache.find(role => role.name === "ROLE");
      const member = msg.mentions.members.first();
      member.roles.add(role)
    }
});```
#

its not working

earnest phoenix
#

member.edit

delicate lance
#

@strange acorn my bot @serene idol

trail oyster
#

member.edit what?

earnest phoenix
#

replace member.roles.add(role) with member.edit()

trail oyster
#

ok im trying

serene idol
#

@delicate lance gd

trail oyster
#

didn't work

earnest phoenix
#

.edit takes a GuildMemberEditData parameter

#

just make a new object and box the roles you want to add

trail oyster
#
    nick?: string;
    roles?: Collection<Snowflake, Role> | RoleResolvable[];
    mute?: boolean;
    deaf?: boolean;
    channel?: ChannelResolvable | null;
  }```
earnest phoenix
#

yes

trail oyster
#

@earnest phoenix thank you

earnest phoenix
slender wagon
#

show the code

#

copy n paste if u can

earnest phoenix
#

client.on('message', msg => {
if (msg.content === '.ping') {
try {
const m = await MessageChannel.channel.send("Pinging...");
const embed = new Discord.MessageEmbed()
.setColour ("RANDOM")
.addField("โŒ› Latency", ${m.createdTimestamp - message.createdTimestamp} ms**)
.addField("๐Ÿ’“ API", **${Math.floor(client.ws.ping)}ms**)
return m.edit(๐Ÿ“ Pong!, embed);
} catch (error) {
return message.channel.send(Something went wrong!: ${error.message})
}
}
});

#

@slender wagon

slender wagon
#

you don't have a command handler?

earnest phoenix
#

wdym?

#

@slender wagon

#

How can i know if a file already exits with fs?

slender wagon
#

client.on("message", async msg => {

earnest phoenix
#

@earnest phoenix there is so much wrong with that....

slender wagon
#

try this @earnest phoenix and let me know

earnest phoenix
#

What is wrong?

#

What is MessageChannel

#

Where should I add it?

#

I saw it from a tutorial

#

@earnest phoenix I suggest you start by learning nodejs and then discord js โค๏ธ

#

I am doing this

#

You clearly dont know nodejs

forest drift
#
} else if (message.content === `${prefix}prefix`) {
    message.channel.send('Prefix :: *`'+`${prefix}`+'`* To Change The Prefix, Type :: *`'+`${prefix}`+'changeprefix`*'); 
} else if (message.content === `${prefix}changeprefix`) {
    message.channel.send('Type The New Prefix');
    if(message.content){
        prefix == message.content;
        message.channel.send('Prefix Changed, New Prefix :: *`'+`${prefix}`+'`*');
    }
}

Im semi new to the language, how would i test it someone has sent a new massage?

earnest phoenix
#

Anyone?

#

@forest drift Have a look at message collectors

forest drift
#

is there a way to code a discord bot with json or is discord.js the best option?

slender wagon
#

lol, you've got different options not only js

#

and json is used to store data for js

#

it is not a language

earnest phoenix
#

@slender wagon

#

@earnest phoenix has please take my advice

slender wagon
#

^

forest drift
#

i was told that using javascript gives you the most options, is there a easier language to understand or to relate to js? or should I just keep pushing at js using tutorials?

earnest phoenix
#

But I am doing this by tutorials! I only want to make this command

#

@earnest phoenix dont watch discordjs videos

#

Watch nodejs

#

@forest drift perhaps python would be easier, have a look

forest drift
#

sure

slender wagon
#

i would suggest sticking in with what you started

earnest phoenix
slender wagon
#

you will start understaning

earnest phoenix
#

I am watching from this

#

Thats discord.js

ionic warren
#

hello, does anyone know how to add a delay to your commands? for example, if i type !play, it could respond a set time after instead of instant?

earnest phoenix
#

Um, it says node.js

#

It says that

#

But its discordjs

forest drift
#

also, just wanna appologise if i offend someone in the future, im extremely stubborn and normaly learn by making mistakes. also im not the best with wording

ionic warren
#

i relate

forest drift
ionic warren
#

i just wish i knew how to add a sleeptimer

#

all i want is to add a 3 second delay

forest drift
#

are there any good discord bot hosts that are free? or could i host a bot using a website?

ionic warren
#

something that seems so easy yet so complicated ๐Ÿ˜ญ

#

i have no idea

#

i run all my bots off a spare pc anyway

slender wagon
#

free hosting is not recommended but you can use glitch or heroku

fervent bloom
#

are there any good discord bot hosts that are free? or could i host a bot using a website?
@forest drift

Heroku

forest drift
#

all i want is to add a 3 second delay
@ionic warren so by that imma guess website javascript doesnt work for the bots?

earnest phoenix
#

@earnest phoenix you can't just tell me what to do so I can finish the ping command?

#

nope

forest drift
#

free hosting is not recommended but you can use glitch or heroku
@slender wagon i have a premium account on glitch?

earnest phoenix
#

you wont gain from spoonfeeding

ionic warren
#

im not sure @forest drift im new to this

earnest phoenix
#

why?

fervent bloom
#

but if you are doing an economy command then you should store the data in mongoDB rather than just making a json file and using fs to write it, coz heroku makes your application go to sleep if it's not in use, and then loss of data

ionic warren
#

@fervent bloom is heroku free?

forest drift
#

you wont gain from spoonfeeding
@earnest phoenix sometimes you can learn from bisecting others designs? thats how i learnt how to do basic coding... then went for lessons and turned out to be way more efficient

fervent bloom
#

yes heroku is free

ionic warren
#

ty

fervent bloom
#

but

#

it gives you 22 days only to host your application

forest drift
#

but if you are doing an economy command then you should store the data in mongoDB rather than just making a json file and using fs to write it, coz heroku makes your application go to sleep if it's not in use, and then loss of data
@fervent bloom i used to have that same problem with glitch so i just setup a bot to constantly refresh the site

fervent bloom
#

well

#

I don't use glitch tho

forest drift
#

ive been using one of those hosts on my phone where u have to watch a video for 90min of online, but since im now using the terminal on my computer idk what imma do now

delicate lance
#

Ping?

forest drift
#

I don't use glitch tho
@fervent bloom i just used glitch cause it was simple, free and could control my other sites

fervent bloom
#

VSC is free too, but don't worry everything is good, until you know how to code properly

ionic warren
#

anybody know how to make the bot @ you/the person who puts the command

fervent bloom
#

hello, does anyone know how to add a delay to your commands? for example, if i type !play, it could respond a set time after instead of instant?
@ionic warren Kindly explain in detail, coz am confused lol

#

anybody know how to make the bot @ you/the person who puts the command
@ionic warren message.reply('Your message')

forest drift
#

is glitch ever rly safe?

fervent bloom
#

dk

slender thistle
#

Yes, if you don't use it for Discord bots

umbral pollen
#

Do anyone know how to host glitch Bot for 24/7

slender thistle
#

P.S. you'd be violating Glitch's guidelines if you did

fervent bloom
#

wait glitch has closed that service i think

forest drift
#

they have a system now where u can select a certain cite to run 24/7 but u can only have 1 unless u have the premium thingy

fervent bloom
#

like hosting your bot free 24/7 on glitch

honest perch
#

@earnest phoenix atleast private the project

forest drift
#

or i think its like an entire month minus 5 hours

ionic warren
#

@fervent bloom i mean as in, if i put my command (in my case, !play) instead of the bot instantly replying, can i add a timer that will make the bot wait before replying?

forest drift
#

u could try lagg out the bot so it goes slower before replying ;-;

slender thistle
#

Which programming language? @ionic warren

fervent bloom
#

typing <YourBot> is typing.... ( You mean this? )

ionic warren
#

yes

fervent bloom
#

ah

#

js?

ionic warren
#

yup

earnest phoenix
#

@fervent bloom member.toString()

ionic warren
#

also im still a little confused on the. @ user part. because i want my bot do something like this @granite pagoda <bots message>

wanton anvil
#

what do guilds guilds.join connections scopes do??

earnest phoenix
#

@ionic warren just do member.toString()

ionic warren
#

ohh just that?

earnest phoenix
#

will return the users mention instead of the guildmember object

slender thistle
#

guilds gives access to view user's guilds (servers)
guilds.join allows you to join a guild on the user's behalf
connections gives access to user's connections (Reddit, Spotify, GitHub, etc.)

fervent bloom
#
message.channel.startTyping();
for (i = 0; i < (<HowMuchTimeDelay> + 1); i++) {
    message.channel.send("Your message");
}
message.channel.stopTyping();```

I remember this, you can try @ionic warren
wanton anvil
#

thanks @slender thistle

slender thistle
#

???????????????????????

#

That's sending a message in a for-loop

fervent bloom
#

ok nvm am dumb ;-; let me find it out again in my rusty brain

slender thistle
#

in JS to wait X seconds, you'd use setTimeout

ionic warren
#

dw if you're dumb then my brain is non existent

earnest phoenix
#

you guys should start using the documentation more

slender thistle
#

Documentation might be confusing at times

earnest phoenix
#

its actually not

slender thistle
#

to you

earnest phoenix
#

if you know how the api works, you know what to look for

slender thistle
#

You're expecting too much from beginners

earnest phoenix
#

i dont

fervent bloom
#
channel.startTyping();
setTimeout(()=>{
    channel.send(string).then((message)=>{
        channel.stopTyping();
    });
}, 5000)```
try this @ionic warren
#

and yes documentation is confusing

#

beginners can't just go and read the documentation and just code

earnest phoenix
#

i just expect them to atleast know the basics of their lang before even asking for help, cause most of the times its not even a issue regarding the api

fervent bloom
#

that will make them understand nothing

earnest phoenix
#

reading really doesnt hurt

storm igloo
#

-ban

fervent bloom
#

everyone asks questions and what's wrong with asking questions? Ye i get it that there are some people who'd like to be spoonfed, but for some good beginners out there, documentation is not really the thing

lament meteor
#

๐Ÿ‘ if u spoonfed them once, they will then expect always to be spoonfed

fervent bloom
#

that's true

earnest phoenix
#

@slender thistle I write a ping command! I save, it says logged in as The Universe my bot's username but when I am trying to run this command it is not working

fervent bloom
#

show the ping command

earnest phoenix
#

The code?

slender thistle
#

mhm

fervent bloom
#

yes only the ping command code

earnest phoenix
#

Also, do you know how to screenshot on windows 7 so I don't have to take photo from my phone?

fervent bloom
#

you can just copy and paste it here

slender thistle
#

There's ShareX and Windows' built-in tools

earnest phoenix
#

ok

slender thistle
#

that works too

earnest phoenix
#

client.on("message", async msg => {
if (msg.content === '.ping') {
try {
const m = await MessageChannel.channel.send("Pinging...");
const embed = new Discord.MessageEmbed()
.setColour ("RANDOM")
.addField("โŒ› Latency", ${m.createdTimestamp - message.createdTimestamp} ms**)
.addField("๐Ÿ’“ API", **${Math.floor(client.ws.ping)}ms**)
return m.edit(๐Ÿ“ Pong!, embed);
} catch (error) {
return message.channel.send(Something went wrong!: ${error.message})
}
}
});

slender thistle
#

msg.content === '.ping' what does this tell you?

earnest phoenix
#

I saw it from a tutorial

slender thistle
#

How are you running the command?

digital ibex
#

uh

#

MessageChannel.channel.send ?

fervent bloom
#

not a command handler i see hmm

earnest phoenix
#

node .

fervent bloom
#
client.on("message", async msg => {
    if (msg.content === '.ping') {
      try {
          const m = await msg.channel.send("Pinging...");
        const embed =  new Discord.MessageEmbed()
        .setcolor ("RANDOM")
        .addField(":hourglass: Latency", `**${m.createdTimestamp - message.createdTimestamp} ms**`)
        .addField(":heartbeat: API", `**${Math.floor(client.ws.ping)}ms**`)
        return m.edit('๐Ÿ“ Pong!', embed);
      } catch (error) {
        return msg.channel.send(`Something went wrong!: ${error.msg}`)
      }
    }
  });```
slender thistle
#

p.s. don't spoonfeed

fervent bloom
#

SHIT

earnest phoenix
#
client.on("message", async msg => {
    if (msg.content === '.ping') {
      try {
          const m = await msg.channel.send("Pinging...");
        const embed =  new Discord.MessageEmbed()
        .setColour ("RANDOM")
        .addField(":hourglass: Latency", ${m.createdTimestamp - message.createdTimestamp} ms**)
        .addField(":heartbeat: API", **${Math.floor(client.ws.ping)}ms**)
        return m.edit('๐Ÿ“ Pong!', embed);
      } catch (error) {
        return msg.channel.send(Something went wrong!: ${error.message})
      }
    }
  });```

@fervent bloom it is not working

digital ibex
#

there are still so many things wrong with that

earnest phoenix
#

Could you tell me the wrong things?

#

Could someone write the code and send it to me? Pls

digital ibex
#

no ones gonna do that

slender thistle
#

Rule 7b

#

Wrap every text with ` (backticks) properly

fervent bloom
#

oh yes

#

in the catch block your message has no backticks

#

lol

slender thistle
#

not in the try branch either

digital ibex
#

the second field value, there too

slender thistle
#

And I should point at the fact that you were the one who sent the code above

digital ibex
#

and 3rd

fervent bloom
#

i really didn't see that tbh

#

sorry

digital ibex
#

change colour to color

#

add backticks on all the field values

#

and where ur handling the error

slender thistle
#

Does d.js not allow both British and American English?

digital ibex
#

i think its only american

fervent bloom
#

only the American

slender thistle
#

kek

fervent bloom
digital ibex
#

yeah, only american

fervent bloom
#

yeep

slender thistle
#

really

fervent bloom
#

0_0

#

that's

#

ads

#

bruh

#

banned

#

lol

delicate shore
#

I made a ticket system

#

but i wanna make sure it allows role selected by

#

the admin of server

earnest phoenix
#

use a database

delicate shore
#

quick.db will work?

earnest phoenix
#

try it.

delicate shore
#

How

#

@earnest phoenix can i find a role by name and overwrite perm for it

#

like in my help command i will say make a role called staff

#

and give it to mods

earnest phoenix
#

you could so something like

digital ibex
#

of course u can

delicate shore
#

oh wow

earnest phoenix
#
const role = <guild>.cache.find(role => role.name === 'name');
// add role
delicate shore
#

ok

#

one thing

earnest phoenix
#

?

delicate shore
#
        reaction.message.guild.channels.create(`ticket-${user.username}`, {
            permissionOverwrites: [
                {
                    id: user.id,
                    allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
                },
                {
                    id: reaction.message.guild.roles.everyone,
                    deny: ["VIEW_CHANNEL"]
                }                {
                    id: reaction.message.guild.roles.role,
                    allow: ["SEND_MESSAGES", "VIEW_CHANNEL"]
                }
            ],
            type: 'text'
        }```
#

so it will. be like this

#

right ?

earnest phoenix
#

try it.

digital ibex
#

guild.roles.role tf ?

delicate shore
#

guild.roles.role tf ?
@digital ibex i will define role

digital ibex
#

what

delicate shore
#

hmm

digital ibex
#

u do know

delicate shore
#

like i did roles.everyone

digital ibex
#

it doesnt work like that

delicate shore
#

i will do roles.rolename

digital ibex
#

im so sure it doesnt work like that

delicate shore
#

Hmm

#

let me try

earnest phoenix
#

check the docs

delicate shore
#

i am using something else

digital ibex
#

as i thought, it doesnt

delicate shore
#

i am using like this

#

if this is working

#
                {
                    id: reaction.message.guild.roles.everyone,
                    deny: ["VIEW_CHANNEL"]
                }```
#

then js { id: reaction.message.guild.roles.rolename, allow: ["VIEW_CHANNEL"] }

#

should also work

#

@digital ibex then is there any other way to do so

quartz kindle
#

roles.rolename makes no sense

#

guild.roles is a RoleManager object, which contains the role cache

#

the everyone property is simply a shortcut, its not an actual role

#

the actual roles are stored in the role cache: guild.roles.cache

forest drift
#

how would i make a basic random number generator?

faint prism
#

In computer science typically we accept the use of psudorandom mmLol

delicate shore
#

Hey sorry

#

it was my stupid sister

faint prism
#

how would i make a basic random number generator?
@forest drift Language?

delicate shore
#

she did that

forest drift
#

@forest drift Language?
@faint prism js

faint prism
#

I do something similar to get the admin for a channel

                        foreach (var role in user.Roles)
                        {
                            if (role.Permissions.Administrator)
                            {
                                //Do a thing
                            }
                        }
forest drift
#

thanks

carmine summit
#

How can I read Java API?

#

no. its not a website

ebon kelp
pale vessel
#

java api what

carmine summit
#

/**
 * This is now included inside {@link GameCountsReply}
 */
@Deprecated
public class PlayerCountReply extends AbstractReply {
    private int playerCount;

    public int getPlayerCount() {
        return playerCount;
    }

    @Override
    public String toString() {
        return "PlayerCountReply{" +
                "playerCount=" + playerCount +
                "} " + super.toString();
    }
}
ebon kelp
#

Hypixel?

#

Lol

carmine summit
#

yeah

#

lol

ebon kelp
#

Well this is a class

carmine summit
#

plz help

delicate shore
#

It worked @quartz kindle @faint prism Thank you โค๏ธ

carmine summit
#

pls help?

inland pulsar
#

what

#

package net.hypixel.api.reply; ?

steady anchor
#

do you theoretically have to have a cooldown of 10 seconds for each command?

honest perch
#

No

carmine summit
#

idk

#

i havent touched java

#

nor studied it

inland pulsar
#

what do you need help with

ebon kelp
#

To call a Java function you create a class object, then call the function

PlayerCountReply playerCountReply = new PlayerCountReply();
System.out.println(playerCountReply.getPlayerCount());
carmine summit
#

ill try that one out

#

thx

inland pulsar
ebon kelp
#

idk what the hell he wants

inland pulsar
#

:o we get early dev badge EZ

ebon kelp
#

what?

inland pulsar
opal plank
#

havent gotten an answer from glitch yet

ebon kelp
#

:o we get early dev badge :EZ:
@inland pulsar That's so unnecessary

#

And not fair

inland pulsar
#

I know

opal plank
#

@earnest phoenix

ebon kelp
#

Cuz if you create custom bots for servers you don't get the badge

carmine summit
#

To call a Java function you create a class object, then call the function

PlayerCountReply playerCountReply = new PlayerCountReply();
System.out.println(playerCountReply.getPlayerCount());

@ebon kelp how do i console.log this?

ebon kelp
#

dbnhgkilcsdisghuidh

inland pulsar
#

what

#

it litarilly gets console logged

ebon kelp
#

System.out.println() is console.log for java

carmine summit
#

so who do i put this inside my discord bot that is javascript?

inland pulsar
#

5Head yes

#

I'm joking btw

carmine summit
#

:5Head: yes
@inland pulsar yes

inland pulsar
#

where tf did you find this code

storm igloo
#

yes

carmine summit
#

where tf did you find this code
@inland pulsar github

inland pulsar
#

is this a java wrapper for an api of hypixel ?

carmine summit
#

yeah

inland pulsar
#

why can't you just do api requests yourself

carmine summit
#

idk

inland pulsar
#

theres no need for a module or dependency

carmine summit
#

some of hypuxel's API is in website

#

but some is java

#

which i dont know a single thing about

inland pulsar
#

an api is not language dependent

opal plank
#

was about to say that

inland pulsar
#

or shouldn't be

toxic jolt
#
    const req = await superagent.post("https://www.example.com/api")
    .set("Cookie", cookies)
    .type("text/plain")
    .send(payload);
``` i how to delete in this cookies?
carmine summit
#

uh

toxic jolt
#

please help

opal plank
#

usually api's use json

carmine summit
#

HELP?

opal plank
#

anything that can do that should be fine

#

@carmine summit do you know any programming language?

carmine summit
#

usually api's use json
@opal plank yeah thats why im way out of my comfort zone

inland pulsar
#

bruh

#

js litarilly maps json to objects

carmine summit
#

Javascript and some of python

opal plank
#

you can use both just fine

#

to touch an api

carmine summit
#

I know how to touch an API

opal plank
#

in js you have stuff such as axios, curl, request and other methods to do calls

inland pulsar
#

if you wanna use an api then learn to make web requests

carmine summit
#

but i dont know how to touch a java API

opal plank
#

shouldnt matter

inland pulsar
#

it's not a java api

#

they made a wrapper in java

toxic jolt
#

oh okay good bye :/

inland pulsar
#

for the api

toxic jolt
#

thx for help

inland pulsar
#

np

carmine summit
#

i am still confused with this Java API thingy

inland pulsar
#

i how to delete in this cookies? if you think we know what you want with this question then goodbye

carmine summit
#

How do I read java API?

opal plank
#

its really poorly documented though

inland pulsar
#

@carmine summit do you know what an api is

opal plank
#

its so user unfriendly doing stuff that way

inland pulsar
#

where are the api docs

#

this is still the wrapper

midnight blaze
#

@inland pulsar oof, good question^^ let see if that user can answer that

opal plank
#

yeah thats the thing

#

i dont see an api

#

the docs at least

#

clearly this wrapper connects to it

#

but i dont see any mention on which domain or endpoints to use

#

just that it requires an api key, which is listed how to get

vivid wadi
#

Guys.

inland pulsar
vivid wadi
#

Does anyone know any hosting websites?

inland pulsar
#

do you want support with your hosting ?

vivid wadi
opal plank
#

well theres your host

inland pulsar
#

oxide.host has good support when I was there

opal plank
#

now for the enpoints, im not sure

vivid wadi
#

okay.

opal plank
#

@carmine summit

#

you should likely be reading this stuff

carmine summit
#

i need to transfer it to javascript as a string

opal plank
inland pulsar
#

these docs are actually super hard

opal plank
#

you should remake this shit in js tbh

#

use axios or curl

inland pulsar
#
  • you need an api key
opal plank
#

api key is simple to grab

#

just two braincells to do this

#

one to click the link and the second to type the command lol

vivid wadi
inland pulsar
#

imagine needing an mc account to use an api

#

you click at the top what you want

carmine summit
#

i dont know how to read

vivid wadi
#

oh

honest perch
#

doesnt oxide use ovh

vivid wadi
#

do you know any discord bots hosting?

inland pulsar
#

ue

#

yes @honest perch

#

but their support is quite outstanding

vivid wadi
#

ik

inland pulsar
#

they litarilly helped me setup a mail server on a vps when they have their own mail plans

#

xd

wanton anvil
#
       More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed```
vivid wadi
#

wait i saw it

#

XD

wanton anvil
#

help me

vivid wadi
#

RIP IM BROKE AND CANT AFFORD ANY OFF THESE

opal plank
#

i dont know how to read

carmine summit
#

im still confused

opal plank
#

grab key

#

i sent you the domain

#

now make requests

#

in js

vivid wadi
#

Guys, what app did you create for your bot?
@earnest phoenix discord developers

inland pulsar
vivid wadi
#

go there

opal plank
#

what

vivid wadi
#

lol

inland pulsar
#

how are these people communicating I'm confused

opal plank
#

im unsure too

sullen harness
#

App?

opal plank
#

english is a very hard language aparently

wanton anvil
#

please help me

opal plank
#

so what exactly did u mean?

inland pulsar
#

the thing that's most weird to me is that people come to top.gg to ask the weirdest questions

carmine summit
#

now make requests
@opal plank how can i make request. i already have the api key

opal plank
#

i told you

inland pulsar
#

axios

#

fetch

#

or other stuff

sullen harness
#

I use VSC if that's what you're asking.

carmine summit
#

I know how to use axios

vivid wadi
#

u coding what

vivid wadi
#

i mean half coding

inland pulsar
#

who asked pepeLaugh

carmine summit
#

i have used axios for coding the apis that is in JSON format. but in Java not yet

opal plank
#

dude

#

ignore the java

#

pretend it doesnt exist

#

just think of it as API

vivid wadi
opal plank
#

you send shit, it returns shit, no java involved

carmine summit
#

eh?

opal plank
#

you know what an api is right?

#

not u

#

cw

carmine summit
#

yeah i know

vivid wadi
#

ima be making commands in there

opal plank
#

you know what GET POST are?

carmine summit
#

i have already made APIs

inland pulsar
#

wait

opal plank
#

then why is it that you keep hitting the same key on the fact that its a java api?

#

it listen to requests, does stuff internally, and emits a response

#

theres no js/java involved

#

it doesnt matter which language the api is running at, you just gotta send a payload that it accepts

carmine summit
#
package net.hypixel.api.reply.skyblock;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import net.hypixel.api.reply.AbstractReply;

public class SkyBlockAuctionsReply extends AbstractReply {
    private int page;
    private int totalPages;
    private int totalAuctions;
    private long lastUpdated;
    private JsonElement auctions;

    public int getPage() {
        return page;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public int getTotalAuctions() {
        return totalAuctions;
    }

    public long getLastUpdated() {
        return lastUpdated;
    }

    public JsonArray getAuctions() {
        if (auctions == null || auctions.isJsonNull()) {
            return null;
        } else {
            return auctions.getAsJsonArray();
        }
    }

    public boolean hasNextPage() {
        return page < totalPages - 1;
    }

    public boolean hasPrevPage() {
        return page > 0;
    }

    @Override
    public String toString() {
        return "SkyBlockAuctionsReply{" +
                "page=" + page +
                ", totalPages=" + totalPages +
                ", totalAuctions=" + totalAuctions +
                ", lastUpdated=" + lastUpdated +
                ", auctions=" + auctions +
                "} " + super.toString();
    }
}```
#

i got presented by this

opal plank
#

fam

inland pulsar
opal plank
#

what did i tell you?

#

IGNORE java

midnight blaze
#

yes, this is Java, I can confirm7

inland pulsar
carmine summit
#

then how do i get API?

opal plank
#

just look at the template of the payload and do it in your native language

#

you dont GET the api

midnight blaze
#

xd

opal plank
#

they HAVE an api

#

which you use

midnight blaze
#

he said he have made an api before

carmine summit
#

just look at the template of the payload and do it in your native language
@opal plank where?

opal plank
#

downlaod api.exe

midnight blaze
#

xDDD

carmine summit
#

which you use
@opal plank joke api

midnight blaze
#

yes, download the api.exe

carmine summit
#

urban dictionary

opal plank
#

im fairly certain you dont know what an api is fam

#

more less making one

midnight blaze
#

can you explain what an api is? @carmine summit

fluid basin
#

@opal plank how to lose braincells 2020

inland pulsar
opal plank
#

@fluid basin i swear my iq going negative from idling here

carmine summit
#

just look at the template of the payload and do it in your native language
@opal plank where do i get this information?

midnight blaze
#

sniffing loudly

inland pulsar
#

@carmine summit

twilit rapids
opal plank
#

thats the thing, i dont see any docs either(though i did a 30 second google search), use the template from that wrapper

inland pulsar
#

ye timo

frigid rivet
#

@kind sedge "zizi" is penis in french

carmine summit
#
        console.log("command run = joke")
        let getJoke = async () => {
            let response = await axios.get('https://official-joke-api.appspot.com/random_joke');
            let joke = response.data;
            return joke;
        };
        let jokeValue = await getJoke();
        console.log(jokeValue);
        message.channel.send(`${jokeValue.setup} \n \n \|\|${jokeValue.punchline}\|\|`)
    }```
inland pulsar
#

js devs

carmine summit
#

API

inland pulsar
opal plank
#

or properly find the documentaion from the forum

mental edge
#

how do i know whoever votes on my server/

#

??

fluid basin
#

oh no here goes again

#

its all about the ๐Ÿ‡ฆ ๐Ÿ‡ต ๐Ÿ‡ฎ

opal plank
#

use the api @mental edge

mental edge
#

okay.

opal plank
#

assuming you already know a programming language

#

head over to #topgg-api and check topic or pins, they surely have the api website pinned

midnight blaze
#
else if (command === "joke") {
        start joke_api.exe
    }
calm pebble
#

Hi

opal plank
#

i swear, sometimes i wish i got banned from this channel. Either way, going to grab some food, need to recharge for the next helping session

fluid basin
#

lol

carmine summit
#
else if (command === "joke") {
        start joke_api.exe
    }

@midnight blaze BRUH

opal plank
#

this is api

#

properly documented shit

fluid basin
#

properly documented shit
@opal plank the irony

opal plank
#

even i had a stroke reading the hypixel stuff you sent me

#

though you gotta either find their docs or dig that warpper code to see the format their api use

#

so you can use it

wanton anvil
#

where can I host a bot for free except heroku and glitch

midnight blaze
#

here we go again

slender thistle
wanton anvil
#

thanks how can i use

fluid basin
#

@opal plank its fairly simple tbh, the document path is the api path

opal plank
#

yeah, then what?