#development

1 messages ยท Page 1127 of 1

digital ibex
#
({
credenziali: loginanswer
)}```
pure lion
#

Uh indeed

#

Aren't queries meant to be asynchronous?

ancient nova
#

hello

#

does anyone know how to host a website with custom domain for free?

digital ibex
#

yeah but thats a syntax error

pure lion
#

You own a custom domain?

strange trout
#

Is it just a static site

ancient nova
#

no

solemn latch
#

youd have to get a free domain from freenom or something

#

then find a free host, like glitch

pure lion
#

eUgH

ancient nova
#

okay

worn zephyr
#

Or repl

digital ibex
#

heroku ^^

solemn latch
#

github pages

digital ibex
#

not glitch cuz glitch aint no host ๐Ÿ˜ฉ

solemn latch
#

๐Ÿค”

strange trout
#

Or GitHub Pages if it's just a static page

solemn latch
#

glitch is a web host.
its terrible for bots, its not great for sites, but it does work.

#

github pages is probably the best out of the suggestions given

pure lion
#

Is free?

solemn latch
#

yeah

strange trout
#

Yes

#

Works great

opaque eagle
#

There are a lot of static site hosts out there

#

gh pages, gitlab pages, netlify, surge, now.sh, etc

lusty lintel
#

is the config correct @digital ibex ?

opaque eagle
#

There isn't a defined schema for your config file

#

You can put it in however you want, just make sure you're importing it in properly wherever necessary

ancient nova
#

the freenom is paid

#

there's no free domains

opaque eagle
#

freenom has free domains

#

they're all crappy TLDs tho

ancient nova
#

how do I find one then

opaque eagle
#

.tk, .cf, .ga, .ml, and .gq

ancient nova
#

I want any domain just so it'll work

opaque eagle
#

your SEO might be terrible, if that matters

ancient nova
#

I'm not really experienced with browsers so I don't really know how to properly search for a domain

#

when I'm trying to search for .ga nothing pops up and when I put just ga other like .com pop up only

solemn latch
#

you searched for the domain name ga

#

not the tld

jolly wave
#

i wanna make a snipe command but it just wont work

solemn latch
#

for example searching ga
gives you ga.com

jolly wave
#

e

solemn latch
#

any bots with snipe commands will never be in any server of mine

jolly wave
#

why

solemn latch
#

๐Ÿคทโ€โ™‚๏ธ

ancient nova
#

I got it

#

thanms

strange trout
#

Same

jolly wave
#

anyway can you help me Woo

solemn latch
#

if i was going to make a snipe command, id map it

jolly wave
#

wdym

earnest phoenix
#

:0 the usb windows boot is so long

strange trout
#

You could start by showing us what you have tried so far

earnest phoenix
#

it is like 2h

lusty lintel
#

my brian got hurt it when I look my code

jolly wave
#

in the snipe command file

earnest phoenix
#

LoL

jolly wave
#

i tried this

#

`module.exports = {
name: "snipe",
description: "get deleted messages",
execute (client, message, args) {
const msg = client.snipes.get(message.channel.id)
if(!msg) return message.channel.send("There are no deleted messages in this channel!")
const embed = new Discord.MessageEmbed()
.setAuthor(msg.author)
.setDescription(msg.content)
if(msg.image)embed.setImage(msg.image)

  message.channel.send(embed)
  
}

}`

earnest phoenix
#

@lusty lintel that happend when u read ur code that u wrote 2month ago

solemn latch
#

please use
```js
```

earnest phoenix
#

yes

#
module.exports = {
    name: "snipe",
    description: "get deleted messages",
    execute  (client, message, args) {    
      const msg = client.snipes.get(message.channel.id)
      if(!msg) return message.channel.send("There are no deleted messages in this channel!")
      const embed = new Discord.MessageEmbed()
      .setAuthor(msg.author)
      .setDescription(msg.content)
      if(msg.image)embed.setImage(msg.image)
      
      message.channel.send(embed)
      
    }
  }
#

u are wellcome

jolly wave
#

ah ok

solemn latch
#

how are you setting client.snipes

jolly wave
#

iwait

earnest phoenix
#

await ?

jolly wave
#

i wrote this in the main file

#

i can't use the ``````

#

idk why

solemn latch
#

then hastebin

jolly wave
#

ok

strange trout
#

Where did you define client.snipes

jolly wave
#

in this?

solemn latch
#

you defined snipes

jolly wave
#

oof anyways

#

yt tutorial never work

earnest phoenix
#

hmmmmm

solemn latch
#

yt tutorials suck

earnest phoenix
#

nope

#

it is good

jolly wave
#

that's why i ask here xd

solemn latch
#

yt for learning concepts, docs for developing

strange trout
#

Well if you know JavaScript then it's an easy fix

#

Very easy fix actually

#

One line of code

jolly wave
#

what is the fix xd

#

A

earnest phoenix
#

Map()

module.exports = async(bot, message) => {
    bot.snipes.set(message.channel.id, {
        content: message.content, 
        author: message.author,
        image: message.attachments.first() ? message.attachments.first().proxyURL : null
    });
};

Snipe.js

const msg = bot.snipes.get(message.channel.id);
            if (!msg) {
                let embed = new MessageEmbed()
                    .setColor(color.red_dark)
                    .setTitle(":x: Error !")
                    .setDescription("There is no rencent deleted message")
                return message.channel.send(embed);
            };
            let embed = new MessageEmbed()
                .setTitle("Sniped a message")
                .addField("**Author:**", msg.author.username)
                .addField("**Deleted message**", `\`\`\`\n${beautify(msg.content, {
                    format: "js",
                })} \n\`\`\``);
            if (msg.image) embed.setImage(msg.image)
    
            message.channel.send(embed);
solemn latch
#

unrelated, but i dont think messageDelete provides a channel

earnest phoenix
#

try this

jolly wave
#

ooooo

solemn latch
#

spoon feeding

jolly wave
#

ah

earnest phoenix
#

Reeeeeeeeeee

solemn latch
#

rip breaking rules

earnest phoenix
#

wut i just help him

opaque eagle
#

About my question from earlier... imma just use redis

earnest phoenix
#

give him a example

jolly wave
#

e

earnest phoenix
#

@solemn latch

solemn latch
#

you gave copy paste code

jolly wave
#

yes an example

#

actually

solemn latch
#

which is spoonfeeding

jolly wave
#

i didn't copy pasted rly

solemn latch
#

10000% spoonfeeding

strange trout
#

Don't see how that's going to work anyway

earnest phoenix
#

nope he just learn from my code

#

@jolly wave right ?

jolly wave
#

maybe

earnest phoenix
#

._.

solemn latch
#

lets not pretend spoonfeeding is a good thing

jolly wave
#

im reading and trying to understand the code

earnest phoenix
#

ok

#

so u need to read and understand the code before u copy paste

#

:))

strange trout
#

If you're going to spoon feed, the very least you could do is give working code

jolly wave
#

lol

#

it don't work?

earnest phoenix
#

If you're going to spoon feed, the very least you could do is give working code
@strange trout ahm wtf it wroks

#

i am using it

#

: /

strange trout
#

That doesn't fix his issue

earnest phoenix
#

@jolly wave any problem ?

#

like error in console

jolly wave
#

idk i am trying to understand

lusty lintel
#

man whathe fuck

jolly wave
#

?

earnest phoenix
#

man whathe fuck
@lusty lintel huh ?

#

@jolly wave so what happned with the code ?

lusty lintel
#

ddue my I have no brian now

jolly wave
#

i still don't know

lusty lintel
#

I just want to sleep

earnest phoenix
#

._.

jolly wave
#

...

earnest phoenix
#

@solemn latch u there ?

pure saddle
#

mongodb is better than quick.db?

strange trout
#

Yes

earnest phoenix
#

@solemn latch u there ?

solemn latch
#

please stop spam tagging me

earnest phoenix
#

can we dm

solemn latch
#

i am helping someone in another server

#

no

earnest phoenix
#

cuz i cant dm u

solemn latch
#

thats for a reason

earnest phoenix
#

:))

strange trout
#

@jolly wave where did you define client.snipes

earnest phoenix
#

:0

#

maybe he didnt like execute the code

#

the snipes ๐Ÿค”

#

erm

#

why so much code for just sniping a message..

jolly wave
#

e

earnest phoenix
#

@earnest phoenix wdym ?

#

i just make it more beatiful

jolly wave
#

now on my code i need a }somewhere

earnest phoenix
#

`deleted_messages = {}

@client.event
async def on_message_delete(message):
deleted_messages[message.channel] = message

@client.command()
async def snipe(ctx):
last_message = deleted_messages.get(ctx.channel
embed = discord.Embed(title= f'{last_message.author}', description= f'{last_message.content}', color=0x808080)

await ctx.send(embed=embed)`

credit me :)

jolly wave
#

on index.js

strange trout
#

Why make a snipe command in the first place

lusty lintel
#

@delicate shore killed me

solemn latch
#

python

earnest phoenix
#

py

solemn latch
#

this is js

lusty lintel
#

bc of him now I dotn understand anything now

earnest phoenix
#

kk

#

use that for py i guess

#

@earnest phoenix we are not PY

jolly wave
#

a

earnest phoenix
#

i know yeah

strange trout
#

I mean the logic is there

earnest phoenix
#

huh ?

strange trout
#

The code he shared can easily be rewritten in JS

jolly wave
#

On index.js now it give me ',' expected

#

oof

solemn latch
#

it would be a bit longer, since the way the embed builder works, and brackets and whatnot

ancient nova
#

hey I got a domain from freenom and I have this code, what am I supposed to do with it

strange trout
#

Yes but the logic is there lol

#

That's what I'm referring to

solemn latch
#

yeah, just saying, ze was saying why is it so long

golden condor
#

What

jolly wave
#

what do ',' expected mean bruhhh

solemn latch
#

and just by nature, the js code will be a bit longer

lusty lintel
#

dude guys guys I need fkcing help srlsy

golden condor
#

Add a comma ffs

solemn latch
#

explain your problem

strange trout
#

Hi

ancient nova
#

hey I got a domain from freenom and I have this code, what am I supposed to do with it
@ancient nova

lusty lintel
#

so how to setup the config file and ex things

jolly wave
#

e

solemn latch
#

dont copy paste code plox

golden condor
#

@jolly wave Add ๐Ÿ‘ a ๐Ÿ‘ comma

jolly wave
#

e

lusty lintel
#

I copy and paste teh code always and now I;m idiotn @solemn latch I dont understanding anything

golden condor
#

Then

#

... don't copy and paste the code

#

Simple

solemn latch
#

then delete your code, and learn it and write it yourself

lusty lintel
#

idk man I forgot all the code

#

bruh

golden condor
#

Redo it

#

Don't copy and paste

lusty lintel
#

hmmmmmmmmmmm

golden condor
#

You don't learn by doing that.

#

Just because YouTube tutorials give a GitHub repo doesn't mean you should copy from there.

jolly wave
#

Callum ok but where

#

xd

golden condor
#

Wherever the error comes from.

lusty lintel
#

yeah btu i though I lear it though I'm dev

#

๐Ÿ˜ฆ

#

:/

strange trout
#

What

solemn latch
#

most errors tell you exactly where the problem was found @jolly wave

golden condor
#

I didn't understand anything about that sentence

jolly wave
#

e

lusty lintel
#

I'm dev btu no sadly

#

:/

golden condor
#

what

#

I have no idea what you are saying.

lusty lintel
#

just shut up I need to think codes now fuk

strange trout
#

What even is this conversation lol

lusty lintel
#

what is config file

golden condor
#

Oh, I should shut up. I'm sorry that I actually learn instead of copy and pasting. I'm sorry for trying to help you. I won't ever do that again, I'm awfully, terribly sorry.

solemn latch
#

a file your program can look at to get settings

#

tokens

#

whatever it needs

lusty lintel
#

is this ever correct

golden condor
#

Smfh

#

We won't help you copy and paste.

jolly wave
#

yes this files is correct

#

xd

golden condor
#

Your on your own if you try copy paste.

solemn latch
jolly wave
#

i have the same config file

solemn latch
#

^ json validator

lusty lintel
jolly wave
#

Woo

#

any js validator?

#

xd

golden condor
#

By learning do you mean copying as you said earlier

strange trout
#

I wonder if people are coding bots because they're actually passionate about it or just to get a badge

solemn latch
#

js linter yeah

lusty lintel
#

No I learn my lessson

golden condor
#

I wonder if people are coding bots because they're actually passionate about it or just to get a badge
@strange trout most do it for the badge tbh

jolly wave
#

i don't

lusty lintel
#

Not me

golden condor
#

I started bot development before the badge so...

lusty lintel
#

I do for ppl

jolly wave
#

at base

jolly wave
#

i was creating my bot so i wasn't alone on my discord server

lusty lintel
#

I make bto and sell for 1000dollars @golden condor

golden condor
#

es-lint is a notable js lint

#

Lmao

restive furnace
lusty lintel
#

hmmmmm

jolly wave
#

so idc of the badge

earnest phoenix
#
// guildCreate event
for (let i = 0; i < guild.channels.cache.size; i++){
  console.log(guild.channels.cache[i])
}

-> undefined every time

lusty lintel
#

I liek to make bot bc I'm alone i need friend

golden condor
#

that won't sork

#

You should do this

jolly wave
#

e

lusty lintel
#

yo

earnest phoenix
#

the channels are key'd by their id

golden condor
#
// guildCreate event
for (var channel of guild.channels.cache){

    console.log(channel)
}
lusty lintel
#

I do this what is command with arguement? anyoen explain

earnest phoenix
#

what

solemn latch
#

couldnt you just log the channels

golden condor
#

@earnest phoenix

earnest phoenix
#

the channels are key'd by their id
its a collectionn innit

golden condor
#

oop

#
// guildCreate event
for (var channel of guild.channels.cache){

    console.log(channel)
}

@earnest phoenix

earnest phoenix
#

ty ty

#

@solemn latch dm

#

I do this what is command with arguement? anyoen explain
@lusty lintel a command argument is... an argument

golden condor
#

You were going about it wrong

solemn latch
#

my dms are closed

lusty lintel
#

what

golden condor
#

It's not an array

earnest phoenix
#

then dm me

solemn latch
#

and will remain closed

golden condor
#

It's a collection

earnest phoenix
#

ok nvm

#

when you need to do an operation like sqr or sqrt, you need an argument to do the operation on

#

when you want to do division, you need two arguments

golden condor
#

I should close my dms from here so people don't DM me for help because it pisses me off

strange trout
#

Why so persistent in DMing

lusty lintel
#

hmmmmmmmmm ok?

golden condor
#

It happens too often

solemn latch
#

i dont mind a dm, i mind dming for things that are not my job

lusty lintel
#

so i do this const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();?

#

?

earnest phoenix
solemn latch
#

this is the only server i have dm's blocked.
i also disabled friend requests just because this server

lusty lintel
#

and do if(command?

#

so i do this const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();?
@lusty lintel
and do if(command?
@lusty lintel

earnest phoenix
lusty lintel
#

wdym I try it it said wrror

#

error

strange trout
#

Then try to fix it

lusty lintel
#

the problem is in command section

#

tf hwo do I kknwo hwo to fix

strange trout
#

What

earnest phoenix
#
// guildCreate event
for (const c of guild.channels.cache){
  console.log(c.type)
}

-> undefined

lusty lintel
#

lol

digital ibex
#

remove the .cache

lusty lintel
#

i dont remeber codes it hard too rermber ngl

digital ibex
#

and add c.cache.type

golden condor
#

No that wouldn't work

earnest phoenix
#

what

digital ibex
#

o?

earnest phoenix
#

that shouldnt make a difference

#

it should

#

but it wouldn't do what you want to do

golden condor
#

Because that would be an object

earnest phoenix
#

^

#

how can i do what i want to do

golden condor
#

You can use a map?

earnest phoenix
#

are you using regular djs

#

or djs light

#

yes

#

normal

solemn latch
#

are we sure channels are cached?

earnest phoenix
#

yes

golden condor
#

guild.channels.cache.map(channel => {
})

earnest phoenix
#

i want to do it in a loop

lusty lintel
#

wha tis map

earnest phoenix
#

send a msg in the first textchannel

#

then break

#

the channels should be cached as soon as the guild object is deserialized

lusty lintel
#

what is map

earnest phoenix
#

since they're sent with the guild

earnest phoenix
#

@earnest phoenix try the ready event

#

and then loop over the guilds / get the guild you want

lusty lintel
#

wait so

earnest phoenix
#

ready event?

#

yes

lusty lintel
#

so are code have words?

earnest phoenix
#

but i want to send a msg whenever the bot joins a guild

#

not when it comes online

#

oh

jolly wave
#

@earnest phoenix your command don't work

earnest phoenix
#

๐Ÿคฃ

solemn latch
#

you where told it doesnt work

strange trout
#
for (const { type } of guild.channels.cache.array()){
  // Stuff
}
solemn latch
#

like as soon as it was posted

jolly wave
#

AH

earnest phoenix
#

@jolly wave wdym

jolly wave
#

nothing in console

#

nothing in chat

#

the void xd

earnest phoenix
#

ok @strange trout lemme try

strange trout
earnest phoenix
#

oh

#

the cache property is

lusty lintel
#

so first I dont copy paste and second need to learn online and second need to learn perfix config and second need to lear commmand with arguemtn

#

tf so many works

earnest phoenix
#

Collection<Snowflake, whatevertheothertypeis>

#

you're looping over a keyvalue pair

strange trout
#

Mhm

#

But the array method should give you the results you want

jolly wave
#

so i don't wanna ask for a solution to make a snipe command xd

lusty lintel
#

what is array

earnest phoenix
#
g.channels.cache.forEach((c) => {

    console.log(c.type)```
#

this works but i want to loop it

#

not foreach

#

lemme try alexis

fierce arch
#

Hey keds how to i use uptime robot on my vps to monitor downtime of bots? ping me pls?

earnest phoenix
#

foreach is looping

lusty lintel
#

@fierce arch @fierce arch

earnest phoenix
#

@lusty lintel are u serios

#

forEach is slow though and the for keyword outperforms it

lusty lintel
#

what @earnest phoenix

fierce arch
#

@lusty lintel Wtf who asked for that

earnest phoenix
#

u dont what is arrat

strange trout
earnest phoenix
#

array

lusty lintel
#

yeah

jolly wave
#

@earnest phoenix so what do i do with the not working command

lusty lintel
#

what is array

earnest phoenix
#

you have google

jolly wave
#

omg my eyes

earnest phoenix
#

go search it

lusty lintel
#

WHAT IS ARRAY

earnest phoenix
#

Show ur event handlers

jolly wave
#

wdym

lusty lintel
#

I dont have event

#

what is event hadler!

earnest phoenix
lusty lintel
#

what is event hadler!
@lusty lintel

sonic lodge
#

if you don't know what an array is you really should leave, study js, and come back when you think you're ready

jolly wave
#

@earnest phoenix you mean command handler?

lusty lintel
#

wot

earnest phoenix
lusty lintel
#

oke imma leave

earnest phoenix
#

@jolly wave ye

jolly wave
#

ah

earnest phoenix
#

ty that works

jolly wave
#

so i need to show you my command handler?

earnest phoenix
#

and i understand why so ty

lusty lintel
#

what is array

strange trout
#

Awesome

lusty lintel
#

array is a keyboard?

earnest phoenix
#

refer to the link above

#

clear explanation ๐Ÿ‘

lusty lintel
#

I onyl do this npm init nothing else

sonic lodge
#

@fleet hornet you can use setTimeout() to run a callback function after a set amount of time (in milliseconds)

strange trout
#

If you don't mind it getting reset with restarts

#

Otherwise use a database

lusty lintel
#

array keyboard?

#

db?

earnest phoenix
#

have fun

lusty lintel
#

what is db

earnest phoenix
#

you have google

#

go search it

lusty lintel
#

yeah i ggole it and it tellss keyboard

strange trout
#

No way he's over the age of 10

sonic lodge
#

so are you here to troll or something

earnest phoenix
#

i believe they're genuinely underage and dumb

lusty lintel
faint prism
#

Now do a 4D

earnest phoenix
#

that's not a keyboard are you on crack

lusty lintel
#

tf you mean?!

strange trout
#

Yeah no way

#

That confirms it

solemn latch
#

intresting keyboard

faint prism
#

It can go past 3, lol (not talking about keyboards)

earnest phoenix
#

don't you cover arrays in like first months of taking CS

lusty lintel
#

I donwload discord,js 2days ago

faint prism
#

They cover "lists" now

lusty lintel
#

db is mongolia?

strange trout
#

How long have you been using JavaScript/Node.JS @lusty lintel

lusty lintel
#

db=dopebean?

sonic lodge
#

i guess you are trolling

opaque eagle
#

db=database

lusty lintel
#

How long have you been using JavaScript/Node.JS @lusty lintel
@strange trout 2day

lusty quest
#

yea a Database is a country

earnest phoenix
#

they're trolling

opaque eagle
#

^

earnest phoenix
#

@sinful belfry

sinful belfry
#

who

earnest phoenix
#

read up a few messages

opaque eagle
#

Next message is gonna be "i downloaded this bot from discord.dev how 2 make it work"

lusty lintel
#

wait what

#

why me

#

what did i do wrong?!

jolly wave
#

lol

sinful belfry
#

@lusty lintel this really isn't the place to troll

faint prism
#

I thought he was trolling a while ago tbh..

teh

lusty lintel
#

I didnt even trol tf

sinful belfry
golden condor
#

What's is happening

jolly wave
#

idk

lusty lintel
#

I rlly dont knwo what is array

jolly wave
#

i just went to get a drink

lusty lintel
#

I hearing first time in my life

jolly wave
#

i am gonna too because idk what is array too

golden condor
#

I think this is a 10 year old who can't spell and also has never seen a single piece of code other than what is on a hacker's screen in a movie

lusty lintel
#

yes I ggolgle it and it said it slike keyabord or sqaure somehting

earnest phoenix
#

I think this is a 10 year old who can't spell and also has never seen a single piece of code other than what is on a hacker's screen in a movie
@golden condor hacking into the mainframe

jolly wave
#

lol

sonic lodge
#

you gotta type "javascript", a space, and then "array"

golden condor
#

Lmao

earnest phoenix
#

!c.permissionsFor(bot.user).has(['SEND_MESSAGES'])

lusty lintel
#

No I already made bot

jolly wave
#

e

sinful belfry
#

@lusty lintel it obviously isn't. search up what it means in terms of programming and if you are unsure, then come and ask here

earnest phoenix
#

It always skips this line of code.

jolly wave
#

Made a*

#

xd

#

dylan

lusty lintel
#

it said sqaure and said 1 and 3

strange trout
#

wym he sold a bot for $1000

lusty lintel
#

in the pic

jolly wave
#

actually idk what's an array too xd

#

time to google

earnest phoenix
#

๐Ÿ˜ณ

jolly wave
#

e

strange trout
jolly wave
#

what is this

earnest phoenix
#

@earnest phoenix the permissions permissionsFor returns can be null, it means there's no overwrite on the channel

lusty lintel
#

array is comand in code?

strange trout
#

Not quite

earnest phoenix
#

ohhh

jolly wave
#

starboard is actually

#

lol

#

just checked

earnest phoenix
#

how can you check it on @ everyone cry

lusty lintel
#

I though java is for minecrfat and discord,js is for bot

#

what teh fuck

sonic lodge
#

egar how old are you

jolly wave
#

E

#

Maybe

lusty lintel
#

why I told myagsh9q

strange trout
#

There we go

lusty lintel
#

Ok

jolly wave
#

what is ur age egar

lusty lintel
#

but I need to sleep Its 3:30 am rn

jolly wave
#

...

sonic lodge
#

answer the question

strange trout
#

Egar you're 9?

jolly wave
#

why the fuck you code a bot so late

lusty lintel
#

so bye

#

GN

strange trout
#

๐Ÿ‘‹

jolly wave
#

๐Ÿ‘‹

#

e

lusty lintel
#

LOL kekcursed

solemn latch
#

why do you say e all the time, doesnt contribute at all to the conversation

jolly wave
#

if i wanna say e i say e

lusty lintel
#

e

earnest phoenix
#

e

lusty lintel
#

nvm i chnaged my mind

#

no sleep

jolly wave
#

e

sinful belfry
#

these messages don't belong to this channel either

jolly wave
#

oof

lusty lintel
#

now

sinful belfry
#

don't continue it

jolly wave
#

anyway

lusty lintel
#

hwo do i make command with arguement I mean code

earnest phoenix
#

split the message content by space

solemn latch
#

split the content into the command and args

earnest phoenix
#

pop the first element

#

and you're left with arguments

lusty lintel
#

arg ,arg2?

jolly wave
#

time to go

lusty lintel
#

arg

if(command === say

pale vessel
lusty lintel
#

ok sslry bye I need to sleep

#

I'm so tired

#

where is general chnanel

solemn latch
lusty lintel
#

#gene

#

oh

#

Dude learn discord etiquette before hopping into making bots
@fleet hornet wdym I already made 5bots

#

Idk 2

jolly wave
#

same

lusty lintel
#

tf so much

solemn latch
#

good bots have as many as they require

jolly wave
#

Mine have 11

lusty lintel
#

my bets opne is 20

#

I think

jolly wave
#

...

lusty lintel
#

ok bye gn

jolly wave
#

i got 11

lusty lintel
#

moedrtaion and gen

jolly wave
#

my eyes

lusty lintel
#

I give gen nitro and give them free nitro

strange trout
#

This is off topic

jolly wave
#

dylan i lost some brain cell

#

reading

lusty lintel
#

what i restock gen and give them free nitro

sonic lodge
#

are you done

lusty lintel
#

i mean unckhed

#

not yet

#

nvm

#

bye

#

gn

jolly wave
#

didn't you said u was gonna sleep 5 time

#

oh

earnest phoenix
#

nitro generators do not exist

#

lmfao

lusty lintel
#

It do

earnest phoenix
#

anything you get is not what it is advertised as

jolly wave
#

true

lusty lintel
#

I'm wathcing this chnannel bye gn

solemn latch
jolly wave
#

loll

lusty lintel
#

bvreh

viral iris
#
\`\`\`\`test\`\`\`\`\

how to make this in embed with js key

jolly wave
#

Egar

#

When the hell are u gonna sleep

lusty lintel
#

NOW SSLRY GN BEY GESYS

earnest phoenix
#

you're annoying

solemn latch
#

oo lmk how it goes, i have been meaning to make a remind me command

sonic lodge
#

put it in the embed description

jolly wave
#

help my eyes

#

im gonna go in another server

#

ping me for nothing

viral iris
#
\`\`\`\`test\`\`\`\`\

how to make this in embed with js key
@viral iris can any1 help ?

sonic lodge
#

put it in the embed description

golden condor
#

Yeah

sonic lodge
#

you can add
```js
code
``` like you would a normal message

golden condor
#

Just use backslashes and js and \n

earnest phoenix
#

good evening all,

anyone know about this shard error only just started happening

Shard 0's Client took too long to become ready.

golden condor
#

it took to long to become ready

#

Therefore you may have been rate limited in terms of gateway connections

#

Can you do ```js
client.on("debug", console.log)

#

Or.bot

#

Or whatever you use as your client variable

solemn latch
#

client is the superior name

#

;p

earnest phoenix
#

@golden condor anywhere right

golden condor
#

Yes

earnest phoenix
#

0|projectb | Recommended Shards: 2 0|projectb | [WS => Manager] Session Limit Information 0|projectb | Total: 1000 0|projectb | Remaining: 955 0|projectb | [WS => Manager] Spawning shards: 0 0|projectb | [WS => Shard 0] [CONNECT] 0|projectb | Gateway : wss://gateway.discord.gg/ 0|projectb | Version : 6 0|projectb | Encoding : json 0|projectb | Compression: none 0|projectb | [WS => Shard 0] Setting a HELLO timeout for 20s. 0|projectb | [WS => Shard 0] [CONNECTED] wss://gateway.discord.gg/?v=6&encoding=json in 226ms 0|projectb | [WS => Shard 0] Clearing the HELLO timeout. 0|projectb | [WS => Shard 0] Setting a heartbeat interval for 41250ms. 0|projectb | [WS => Shard 0] [IDENTIFY] Shard 0/1

#

@golden condor sorry for ping again lol

solemn latch
#

omg, i just found tim randomly in a github issue

golden condor
#

No you should be all good

solemn latch
#

looking up the shard took too long issue

viral iris
#

put it in the embed description
@sonic lodge it's on field

earnest phoenix
#

it still just times out

viral iris
#

and it's

sonic lodge
#

works in field too

viral iris
#
`${json.data}`
#

works in field too
@sonic lodge how

earnest phoenix
#

``0|projectb | [WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
0|projectb | [WS => Shard 0] Heartbeat acknowledged, latency of 5972ms.
0|projectb | [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
0|projectb | [WS => Shard 0] [HeartbeatTimer] Didn't process heartbeat ack yet but we are still connected. Sending one now.
0|projectb | [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.

0|projectbump | [WS => Shard 0] [HeartbeatTimer] Didn't process heartbeat ack yet but we are still connected. Sending one now.
0|projectbump | [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.

``

golden condor
#

Seems like discord isn't sending a heartbeat back

earnest phoenix
#

thats what i mean its so weird

#

shall i run it on 2 shards?

#

my bots in 1.8k

sonic lodge
#

@viral iris example

embed.addField('Title', `\`\`\`js\n${code}\`\`\``)
viral iris
#

thx

golden condor
#

@earnest phoenix you should try two shards yes

#

It is recommended to have 1 shard per 1000 but 1 per 2500 is the max

solemn latch
#

i think the recommended really depends on the bot

golden condor
#

1 shard per 1000 is the recommended amount by discord

earnest phoenix
#

so what do you think i should do

#

i tried 2 earlier and no luck

ancient nova
#

I am making a website for my discord bot, can anyone tell me how can i dynamically by javascript change the website's icon (favicon)

#

@solemn latch also thanks I got the domain and I'm coding the website in glitch now

earnest phoenix
#

``0|projectb | Recommended Shards: 2
0|projectb | [WS => Manager] Session Limit Information
0|projectb | Total: 1000
0|projectb | Remaining: 953
0|projectb | [WS => Manager] Spawning shards: 0
0|projectb | [WS => Shard 0] [CONNECT]
0|projectb | Gateway : wss://gateway.discord.gg/
0|projectb | Version : 6
0|projectb | Encoding : json
0|projectb | Compression: none
0|projectb | [WS => Shard 0] Setting a HELLO timeout for 20s.
0|projectb | [WS => Shard 0] [CONNECTED] wss://gateway.discord.gg/?v=6&encoding=json in 221ms
0|projectb | [WS => Shard 0] Clearing the HELLO timeout.
0|projectb | [WS => Shard 0] Setting a heartbeat interval for 41250ms.
0|projectb | [WS => Shard 0] [IDENTIFY] Shard 0/2

0|projectbump | [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
0|projectbump | [WS => Shard 0] Heartbeat acknowledged, latency of 125ms.
`` @golden condor

golden condor
#

Should be all good now

earnest phoenix
#

bot is taking so long to respond

#

but earlier it worked fine all day

#

i know my host limits bandwidth once reached

#

1041643MB / 1024000MB

ancient nova
#

I got this code: ```js
document.head || (document.head = document.getElementsByTagName('head')[0]);

function changeFavicon(src) {
var link = document.createElement('link'),
oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon';
link.rel = 'shortcut icon';
link.href = src;
if (oldLink) {
document.head.removeChild(oldLink);
}
document.head.appendChild(link);
}

changeFavicon();

#

will this work?

solemn latch
#

cough cough, galaxygate unlimited bandwidth

quartz kindle
#

cough cough, intents, cough

solemn latch
#

true, proper fix

golden condor
#

Some providers have unlimited bandwith, if you use up all your bandwith then it's a good idea to get a provider that gives unlimited bandwith

solemn latch
#

oh yeah, forgot they are mostly out of stock

earnest phoenix
#

cough cough out of stock

#

i need a new host then

golden condor
#

They aren't the only provider

#

Many provide unlimited

earnest phoenix
#

do you believe this is why its acting this way

golden condor
#

Perhaps

digital ibex
#

what would happen if u have low frequency?

solemn latch
#

the normal ones are fine

digital ibex
#

i dont really understand computer stuff

earnest phoenix
#

my vps costs 25 euros so i need a good provider to match it

solemn latch
#

the high frequency servers are just a lot faster

earnest phoenix
#

im pretty sure what happened above is that you got ratelimited

ember oak
#

Hey, so I tried to do research on how to do math algorithm by user id, but didn't find anything. I want to make like -gay -dick commands, but the number won't change. Please help!

quartz kindle
#

they use ryzens

#

in their high frequency ones

earnest phoenix
#

what have you searched, justas

#

because queries like "how to make an algorithm on a discord user's id" won't work

#

you need to narrow down your search

solemn latch
#

you could get the last three digits of their id

sullen harness
#

my vps costs 25 euros so i need a good provider to match it
@earnest phoenix What kind of specs do you get for that?

golden condor
#

@ember oak you need to put the variable inside the run function of the command not outside of it

earnest phoenix
#

what vps provider do you recommend

digital ibex
#

so if u had a low frequency server it'd be slow?

solemn latch
#

no

earnest phoenix
#

slower

quartz kindle
#

@ember oak you can literally use modulo on an id lol

golden condor
#

@earnest phoenix try contabo, digital ocean and other professional ones

digital ibex
#

oh

solemn latch
#

not slow, just slower than the high frequency

sullen harness
#

I use Contabo

earnest phoenix
#

8 GB Memory
4 CPU Cores
60 GB SSD Disk @sullen harness

#

the higher the frequency, the faster the changes

solemn latch
#

regular, most stuff
high frequency for things that need it

golden condor
#

@earnest phoenix try contabo, digital ocean and other professional ones

earnest phoenix
#

cpus running at a higher frequency can do operations faster

#

because their cycle is much faster

#

their website is like so 2011 lol

sullen harness
#

Yup

golden condor
#

Yeah but they are fairly good

sullen harness
#

But hey, don't judge a book by it's cover.

golden condor
#

Their website could be improved

#

But they are still fairly good

solemn latch
#

the only downside ive really had with them, is they have had stock issues every few months

earnest phoenix
#

24gb ram tho damn

golden condor
#

I've been fine with them when I used them you should try it

earnest phoenix
#

i spoke to my host owner of the company and he said they dont offer unlimited due to prevent ddos

solemn latch
golden condor
#

Contabo has DDoS protection and a lot of bandwidth

earnest phoenix
#

but i was like boi youd expect unlim for that price lol

sullen harness
#

However I think for the price you're paying you could get a lot better.

earnest phoenix
#

i always hit my band limit with them

mossy yoke
#

@signal carbon hello

earnest phoenix
#

they reset it 3 weeks ago and ive already hit it

golden condor
#

Unlimited bandwith

digital ibex
#

lmfao

earnest phoenix
#

yeah thats what i need lol

digital ibex
#

well rip in the chat for u

golden condor
#

On contabo

#

Contabo has unlimited

sullen harness
#

I mean read the ToS when getting "Unlimited" bandwidth.

earnest phoenix
#

its jsut setting it all up again rip

golden condor
#

How much are you paying?

#

Currently

earnest phoenix
#

25 euros

golden condor
#

Contabo 26.99 euro plan

#

Look at it

viral iris
#

var shp = json.data.shopHistory[0];
TypeError: Cannot read property '0' of null

 var shp = json.data.shopHistory[0];
                  if (shp === null) {
                      shp = "None";
#

what's wrong >?

golden condor
#

It's null

viral iris
#

ik

sullen harness
#

The 26.99eur plan is VDS no VPS

golden condor
#

No

sullen harness
#

So you get actual cores

#

nvm PEP_pepegaHyperDrugged

viral iris
#

It's null
@golden condor should i add [0] ?

golden condor
viral iris
#

in this var shp = json.data.shopHistory[0];

golden condor
#

It's null there is nothing you can do about it

sullen harness
#

Was on the wrong page, mb

golden condor
#

Aok

viral iris
#

It's null there is nothing you can do about it
@golden condor no i can

#

null == None

golden condor
#

no

viral iris
#

lol

solemn latch
golden condor
#

you can see if it exists and if it doesn't return

solemn latch
#

214TB of bandwidth a month

earnest phoenix
#

now my bots working wtf man

#

why did it take 30 mins to load properly lol

solemn latch
#

feelsbadman

earnest phoenix
#

would you think to get a new vps anyway

#

what vps does mee6 and stuff use

solemn latch
#

they use dedicated machines iirc

earnest phoenix
#

they probably have their own

solemn latch
#

probably a handful of them across several hosts

earnest phoenix
#

i tried skysilk before

#

but i woke up with 105gb of inbound lol

quartz kindle
#

intents

#

pls

solemn latch
#

^

quartz kindle
#

my vps was using 400gb/mo

#

now it uses 10-20g/mo with intents

earnest phoenix
#

yeah

#

my band is over 1tb lol

solemn latch
#

there was one in particular right?

viral iris
#

huh

#

i fixed the None error but got this

snow urchin
#

Why is this not working?

jagged hornet
#

hello i neeed help how can i put a gif emoji to my bot messages?

nimble escarp
#

Anyone who could help me with which permission I should use for a mute command?
The mute command assigns a "Muted" role to prevent ppl from sending messages.

#

dunno if MANAGE_ROLES is suitable

slender thistle
#

MANAGE_MESSAGES and MANAGE_ROLES probably?

nimble escarp
#

hmm, didnt think of adding MANAGE_MESSAGES as well

#

only using that for purge

#

Well, imma do that, thanks pepeHeart

digital ibex
#

@snow urchin what is not working?

nimble escarp
#

Also, I have a bigger question but dunno how to put it into words properly so bare with me.

Do you need to handle cases like when the sender (Moderator) tries to use a moderation command on someone with higher permissions (e.g. Admin/Owner)?

My question is if you gotta do anything special to prevent the execution or if it'll be prevented by itself with Discord.js (and if it throws an error possibly)

snow urchin
#

@digital ibex it never sends the request

#

to the url

#

when I test

amber fractal
#

It's based on highest role position

nimble escarp
#

So I don't need to do anything special to prevent the execution? The bot has the highest permissions of all users (since the bot is somewhat of an overlord).

amber fractal
#

You should not allow users below someone to ban them regardless

#

That'd be a bit of a security flaw

#

You should check the position of the executors highest role and that of the person they are executing it on

nimble escarp
#

alright, so I have to check it myself, thanks

#

didn't know if there were any measures that automatically handled it (maybe on the side of the Discord API) and if I could've just handled an error

amber fractal
#

Discord doesnt know who the executor is except the bot

nimble escarp
#

alright, thanks pepeHeart

nimble escarp
#

Also wanted to ask for an opinion on my command handler if that's allowed pepeshrug
First time actually making a "proper" command handler.
https://hastebin.com/sutolajuta.js

EDIT: wanna know if there's anything terribly bad that should be changed asap

slender wagon
#

with what can i connect my patreon with my bot db? and which db do u guys suggest

nimble escarp
peak shard
#

how do I do links in embed

slender wagon
#

damn patreon has its own full api

#

@earnest phoenix not here pls

earnest phoenix
#

Sorry

slender wagon
#

don't advertise anywhere in this server

peak shard
#

how do I do links in embed

jagged hornet
#

hello i neeed help how can i put a gif emoji to my bot messages?

spare minnow
#

<๐Ÿ…ฐ๏ธemoji name:emojiid>

jagged hornet
#

i do it with a gif also?

sudden geyser
#

<a:name:id>. pretty much the same way you'd do a static emoji except with a a in front

jagged hornet
#

i dont understand

#

im idiotic

peak shard
#

hello I need help with links in embeds

sudden geyser
#

Let's use blobcatban for example.

To get the emoji string form, you add a \ before it. So, that would become !blobcatban

To send it, you'd send it in the desired channel in that form. For example, message.channel.send("Yeah! ![blobcatban](https://cdn.discordapp.com/emojis/622740495612903424.webp?size=128 "blobcatban")")

nimble escarp
#

@peak shard embeds support markdown

#

it would show "google" but would be clickable (would become a link)

jagged hornet
#

i will see if it works

#

/tickYes

#

i see

#

but how i get the numbers?

sudden geyser
#

back slash

nimble escarp
#

It needs to be a backslash (escape character)

jagged hornet
#

/tickYes

#

have it

nimble escarp
#

\

jagged hornet
#

315009125694177281

#

thats it?

sudden geyser
#

you need the whole form

jagged hornet
#

ye

#

i have it

#

just to know 315009125694177281
this is it?

sudden geyser
#

that's probably the emoji id

nimble escarp
#

Yeah, that's the emoji id.

jagged hornet
#

/tickYes

#

/.tickYes

#

/<:...tickYes:....315009125694177281>

#

thats it?

nimble escarp
#

yup

jagged hornet
#

thx!

nimble escarp
#

well wait

sudden geyser
#

come on, it's just putting a backslash in front of an emoji

jagged hornet
#

/tickYes

snow urchin
#

When someone upvotes my bot, it does not send the data to my webhook. When I go to the webhook test, click save then test, it works then. But does not work when someone actually upvotes.

jagged hornet
nimble escarp
#

For animated emojis you just need to send <a:emoji_name:emoji_id>
You get the ID with the backslash.

jagged hornet
#

kk thx

snow urchin
#

like these @jagged hornet

jagged hornet
#

ty

snow urchin
jagged hornet
#

it says :tickYes.: when the bot sends it

nimble escarp
#

what exactly are you sending?

jagged hornet
#

embed message...

nimble escarp
#

well, I meant what exactly, like code that you're using to send it (+ to create the embed)

snow urchin
#

The bot must share the server the emote is in

jagged hornet
#

ohh

#

thx

#

still not works

quartz kindle
#

the bot must be in the server where the emoji comes from, and must have EXTERNAL_EMOJIS permission

jagged hornet
#

let me see

#

sill no

#

/ tickYes

quartz kindle
#

you bot is not here

#

the emoji is from this server

pale vessel
#

that's a forward slash

strange trout
finite nimbus
#

how to get data from firebase and store it in the value?

earnest phoenix
#

So I'm new to making npm packages and i made my first package but how can i make the package to be a class when required?

quartz kindle
#

export the class?

earnest phoenix
#

How tho i don't get that part

#

I got confused

quartz kindle
#

module.exports = class

earnest phoenix
#

That's it?

quartz kindle
#

yes

earnest phoenix
#

Oh thanks tim

drifting wedge
#

my bot... it sends the message twice in my bot
its so annoying
its not anything about instance too

#

im not sure whats wrong

earnest phoenix
#

@quartz kindle So tim i did this

module.exports = Functions;```
But what it returns is just
```js
{}```
quartz kindle
#

what is Functions?

earnest phoenix
#
class Functions {
//Things here
}```
quartz kindle
#

and you're requiring the module?

earnest phoenix
#

I require the package and it returns {}

#

Imagine not using ts for packages

strange trout
#

Do you want it to be an instance of Functions when required?

earnest phoenix
#

Yes

#

Then module.exports.Functions = functions

strange trout
#

Wouldn't it be

module.exports = new Functions();

So when you require it, it'll be an instance

earnest phoenix
#

I did that, still returns {} @strange trout

#

Or that ๐Ÿ˜‚

#

Did u try my way, Voltrex?

#

Lemme try

#

Also how are u requiring it

quartz kindle
#

it makes no sense to return {}

#

unless you're requiring the wrong thing

earnest phoenix
#

@earnest phoenix Yours does the same

#

Thats why i asked how heโ€™s requiring

wintry elk
earnest phoenix
#

This is how i require it

require("string-toolkit");```
#

In eval

#

Try returning the require

#

Do wot

quartz kindle
#

did you restart the process?

earnest phoenix
#

What process?

quartz kindle
#

or are you requiring it from a live process?

earnest phoenix
#

Heโ€™s using eval, Tim

wintry elk
#

i am bot developer using python

quartz kindle
#

thats why im asking

earnest phoenix
#

Yea eval, i used exec to install it and required it

#

@wintry elk good for you

wintry elk
#

if any one want help mention me

quartz kindle
#

then thats the problem

#

you're hitting the require cache

earnest phoenix
#

So what to do

#

Clear the cache before requiring

#

Tf, how

wintry elk
#

@earnest phoenix arab?

quartz kindle
#

delete require.cache[require.resolve("your module")]

earnest phoenix
#

delete require.cache[require.resolve('module')]

#

K lemme test

#

And then require again

#

Oh i now know, the thing i did was correct, just had to clear cache

ancient nova
#

I finally finished that website

earnest phoenix
#

What website

strange trout
#

That website

ancient nova
#

for my discord bot

earnest phoenix
#

Good job

ancient nova
#

I'm pretty proud of it

#

took me a while

earnest phoenix
#

Im proud of you

strange trout
#

Nice, is it live?

ancient nova
#

yeah

strange trout
#

Link?

ancient nova
#

dm

finite nimbus
eternal flame
#

i need help with an api here

#

let me get the images rq

#

first image (code, and im sure you can figure out why this issue is happening just from it)

#

second part

nimble escarp
#
const targetPos = target.roles.highest.position;
const authorPos = message.member.roles.highest.position;
if (targetPos >= authorPos) return "you cant ban this dude";

Guess this is enough for the target role position detection then?

eternal flame
#

now i know why its happening

#

but

#

i do not know how to fix it

#

without

#

going against what someone told me

quartz kindle
#

@eternal flame you're defining stats inside the ready event

#

therefore it doesnt exist in the global scope

eternal flame
#

snails told me to do that

#

and when i do take it tout

#

out*

quartz kindle
#

and you're defining servers outside of the ready event, so it will always be 0

eternal flame
#

wait

#

holy shit ur right

#

i feel like an idiot now

dusty onyx
#

is it possible at all to await a function as an item in a dict ๐Ÿฅบ

jolly wave
#

how i should make a color changing thing in discord js

eternal flame
#

people have prob told me this and i just wasnt paying attention

quartz kindle
#

if you want the variable to be accessible in the global scope, you need to declare it outside, even if empty

toxic bane
#

someone have good meme API?

quartz kindle
#
let stats;
bot.on("ready",() => {
  stats = {...}
})
eternal flame
#

i love you now but not in a gay way

toxic bane
#

someone have good meme API?
@toxic bane

dusty onyx
#
            return {
                'a': await if_a(),
                'mb': await if_b(),
                'm': await if_cd(),
                's': await if_d()
            }.get(x, 9)

this is mmy code for the py switch workaround thingy

jolly wave
#

how i should make a color changing thing in js e

quartz kindle
#

what color changing thing

jolly wave
#

idk something color changing

toxic bane
#

someone have good meme API?
@toxic bane

quartz kindle
#

if you mean roles that always change colors, thats not allowed

jolly wave
#

i don't mean this

nimble escarp
#

@toxic bane api for what?

jolly wave
#

but a thing that we can make color changing

#

in discord.js

quartz kindle
#

but what color changing

#

where is the color

jolly wave
#

oof idk like in an embed line

#

or idk

#

you know the left line

eternal flame
#

tim

#

when i do what you say

#

and i go to the local host where the stats are

toxic bane
#

@toxic bane api for what?
@nimble escarp memes

eternal flame
#

its just

#

a blank page

quartz kindle
#

you mean the embed color? you can set it to random

jolly wave
#

but not color changing?

#

xd

quartz kindle
#

if you mean like animated, no

eternal flame
#

color changing would have to be constant edits

nimble escarp
jolly wave
#

ah

#

how i could change the embed color

quartz kindle
#

@eternal flame it will be a blank page if the bot is not ready yet

#

also, you probably need to stringify the object

eternal flame
#

is it right or

quartz kindle
#

remove the var

nimble escarp
#

remove the "var" keyword

jolly wave
#

so tim how i should change the embed color

#

e

quartz kindle
#

.setColor()?

jolly wave
#

maybe

#

let me test