#development

1 messages · Page 644 of 1

humble gyro
#

not development

sage bobcat
#

One message removed from a suspended account.

opaque eagle
#

TypeORM is fantastic ✨

cedar nova
#

halo

#

please change name Reey bro

humble gyro
#

agreed @opaque eagle but i dont like the complications with a typescript project

#

:(

cedar nova
#

please @humble gyro change my name Reey

opaque eagle
#

Lol he's not a mod

humble gyro
#

Lol I'm not a mod

cedar nova
#

ohh kirain

opaque eagle
#

And no, pls dont ping the mod role, ping a specific mod

cedar nova
#

okay

opaque eagle
#

Ping someone who's busy so that u can annoy them

cedar nova
#

im from indonesia halo

opaque eagle
#

hello

cedar nova
#

@opaque eagle where you country

opaque eagle
#

I'm from the U.S., New York specifically

cedar nova
#

you from?

#

ohhh okay

#

new york the best

opaque eagle
#

Idk depends... the winters are rough

#

I'd love to someday move to a smaller city tho

#

Like Philly or Boston

cedar nova
#

ohhh

#

indonesia delicious bro there are only 2 hot and rainy weather

opaque eagle
#

The pizza places and high rent get boring after a while

#

Hi @modest remnant

cedar nova
#

and also wifi here is cheap wkwkwkw for example rich wifi my republic here 100Mbps only $ 15

opaque eagle
#

omg that's a steal

cedar nova
#

no

#

real bro

opaque eagle
#

"that's a steal" means that's a good deal

cedar nova
#

ohhh yes broo

opaque eagle
#

We should prob move somewhere else

cedar nova
prime cliff
#

My microsoft account keeps getting login attempts from indonesia for some reason too bad they don't know my pass bloblul

sage bobcat
#

One message removed from a suspended account.

tight zealot
#

I’m having trouble making not

#

Bot

#

Bot

slender thistle
#

yeet ask2ask

covert turtleBOT
#

By asking if you can ask a question, you have already asked a question so simply just ask the actual question. State exactly what the problem is so someone can help you as soon as possible.

cunning oxide
#

CJelly, what do you need

frail ocean
#

Also;

#

]]moreinfo

covert turtleBOT
#

Please provide as much information as possible to get the most efficient assistance as soon as possible; state the library, language, the specific part of the code in question, and what you are trying to do and/or what you think may be causing the error.

onyx totem
#

/memes

earnest phoenix
mossy vine
#

buy a vps

#

and host it on there

stray garnet
#

Use Glitch.me and Uptime Robot @earnest phoenix

mossy vine
#

no

#

dont

#

dont use glitch

unique nimbus
#

Glitch is not recommended

mossy vine
#

please dont

grim aspen
#

don't use glitch

spare goblet
#

don't use glitch unless you want a glitch

stray garnet
#

@mossy vine its working fine for me

spare goblet
#

glitch works if your bot is tiny and you don't mind downtimes blobsmilehappyeyes

mossy vine
#

just because its working well for you doesnt mean everyone should use it

grim aspen
#

don't panic

stray garnet
#

@spare goblet hmm true

spare goblet
#

do prepare that your uptime will not be 99.999% (perhaps like 95% if you watch your bot SUPER closely)

grim aspen
#

if you don't have money for a vps, you can at least run it on a old computer you barely use

unique nimbus
#

yes

spare goblet
#

the free options are either p impossible to use or has lots of problems due to the free nature of it

mossy vine
#

@earnest phoenix Discord Presence extension

spare goblet
#

yeah you can, just use an extension or just use discord's default one

#

extension one gives you more info in-depth tho

#

just google it and you'll find it blobsmilehappyeyes

#

no

#

on vsc extensions lol

#

just google "vsc extension discord presence"

#

you can also find it in vsc tho

#

in extensions tab

amber widget
#

What is the thing isWeekend ?

spare goblet
#

Not sure what youre referring to ^

#

There are multiple extensions but yeah that should work

late hill
#

@amber widget during weekends, votes count double.
You can use the isWeekend property to know if it's active or not (So you could give additional rewards to those who vote while it's active)

amber widget
#

@late hill Many thanks, Weekends is every Saturday and Sunday from a week ? I know what is weekend but just want to know if there is the same for dbl ^^.

late hill
#

Don't know what dbl sees as weekend

#

I don't make use of it

coarse vapor
#

Could you please keep the bots previously submitted and add an option to resubmit via the website?

#

Kinda saves time and headache

#

Woops

spare goblet
#

@coarse vapor this channel's for asking questions and chatting about development and not for suggesting or sending files, so 👀

coarse vapor
#

Wrong server xd

cunning oxide
#

Yikes

coarse vapor
#

I thought I was in my bots server, and iOS doesn't allow you to see what channel your sending the file to very easily

#

Lel

late hill
#

How do embed character limits work with masked links? Would the entire link count or only the length of the displayed text?

mossy vine
#

the entire thing counts

late hill
#

rip

mossy vine
#

you are sending the markup/markdown content, discord checks if it fits all limits, and client renders it as link

late hill
#

right

ionic compass
#

discord API rate limits for messages are 5/5 right?

earnest phoenix
#

there's no "set in stone" ratelimit

#

they're dynamic

#

if you spam the endpoint too much they will change for you

ionic compass
#

thanks

slender thistle
#

(That's what I keep forgetting, ty fam)

ionic compass
#

hopefully this will be a safer engine, it had no protection before... nyikes

bleak vortex
west spoke
#

Settings

bleak vortex
#

right

#

where do I find settings

#

i cant find it

#

nvm

#

forget what i said

earnest phoenix
#

@ionic compass if that's discord.net, it handles ratelimits for you, you don't have to do much

#

preemptive ratelimits exist only in the library, it just tells you that you got ratelimited and that it will put your requests on hold

ionic compass
#

thats true, but there was also a uh... pretty bad exploit in the script engine allowing for infinite looping of two or more commands bergaCringe

earnest phoenix
#

Je t'aime moi aussi ! @ionic compass

#

Je t'aime moi aussi ! @earnest phoenix

#

Je t'aime moi aussi ! @earnest phoenix

#

Je t'aime moi aussi ! @earnest phoenix

#

Je t'aime moi aussi ! @earnest phoenix

ionic compass
#

questionmark

earnest phoenix
#

Je t'aime moi aussi ! @earnest phoenix

#

Je t'aime moi aussi ! @ionic compass

#

selfbot

slender thistle
#

@earnest phoenix Please don't spam

earnest phoenix
#

it's a selfbot

slender thistle
#

Oh whatever

earnest phoenix
#

they had no typing indicator when they were sending messages

#

discord send my message please

#

hello discord

#

.

slender thistle
#

Mhm, I can see it now dogeKek thank you

earnest phoenix
#

do maps save permanent or temporary data

mossy vine
#

js by default doesnt write, so its temporary in a way like every other variable is

earnest phoenix
#

so if i use map or array [] for server datas

#

is it "wtf" ?

mossy vine
#

if you dont need to load it on a bot restart, its good

slender thistle
#

yeet dotpost

covert turtleBOT
#

Please do not post random punctuation marks or letters to clear your messages and/or to get attention. This is considered spam as you are not contributing anything to the conversation. Should you need to get the attention of the chat, simply start by saying hello. Should you need to clear your messages, right click on the channel then click "Mark As Read"; this can be done from mobile by holding down on the channel. Further offences will result in the appropriate consequence.

amber fractal
#

You'll want to use a db if you want persistent data

mossy vine
#

^

earnest phoenix
#

i cant lol

#

thats the problem

#

my bot is ded cuz i cant store any data

amber fractal
#

Then you wont have persistent data

earnest phoenix
#

heroku

amber fractal
#

Heroku cant even write json files

mossy vine
#

iirc you can use mongodb atlas to get around that

earnest phoenix
#

thats problem

#

idk mongodb

mossy vine
#

they basically host a mongod instance for you

earnest phoenix
#

does heroku allow that ?

mossy vine
#

of course, since you arent editing any files locally, but sending requests to the mongo server

earnest phoenix
#

hmm

#

ill see

#

ty

mossy vine
#

its free until you hit a certain limit afaik

#

but you could use clever data structures to use it to its fullest

#

or until you can get a vps

quartz kindle
#

Doesnt heroku have its own postgre integration?

#

Afaik its also free until certain limits

west spoke
#

um

#

that's exactly what copying is

mossy vine
#

this is more of a general programming question, but i basically wanna shuffle the elements of an array. how many swaps should i do for n amount of elements?

earnest phoenix
#

lol

west spoke
#

@mossy vine get the array and use a random number generator tied to the array?

mossy vine
#

i know how to shuffle an array, just dont know how many swaps i should do for n amount of elements

#

n^2 is likely overkill and n*2 is likely not enough

west spoke
#

hm

bold dock
#

@earnest phoenix which command list?

split hazel
#

Oh

bold dock
#

the help command?

mossy vine
#

ok well time to shamelessly repost my question

#

this is more of a general programming question, but i basically wanna shuffle the elements of an array. how many swaps should i do for n amount of elements?

#

for n amount of elements thats a shit idea. what if n is over 100

split hazel
#

Google can answer your first question and for the second you could just slice the shuffled array by .slice(0, 100)

west spoke
#

What about infinite

#

what about no

#

fk

mossy vine
#

im thinking of doing either n*3 or n*4 but idk if that would provide results that are good enough

slender thistle
#

Off topic content spotted

mossy vine
#

oh thanks discord

slender thistle
split hazel
west spoke
#

Ye sorry shiv

#

anyways off to make a ai

mossy vine
#

hmmm ill try with n*4

stray garnet
#

how to do a random answer Command?

west spoke
#

google

#

json

stray garnet
#

Hmm true

west spoke
#

random choices

#

Random numbers tied to the json

#

Many different ways

trail dagger
#

@stray garnet If you need like random message to a command look here

Import random
msg = ['randommessage1', 'randommessage2']
await ctx.send(randomchoice(msg))
sage bobcat
#

One message removed from a suspended account.

trail dagger
#

can you cant?

stray garnet
#

Lol

trail dagger
#

if i remember right thats how to do it

#

the easy way tho

stray garnet
#

@trail dagger hmm i Made it Harder

const Discord = require("discord.js")

module.exports.run = async (bot, message, args) => {

let replies = ["sample text 1", "sample text 2", "sample text 3"];

let result = Math.floor((Math.random() * replies.length));

let question = args.slice(1).join(" ");

message.channel.send(replies[result]);

}

module.exports.help = {

name: ""
aliases: []

}

trail dagger
#

ah shit discord.js

stray garnet
#

Yes exactly

trail dagger
#

i just saw "how to do a random answer Command?"

split hazel
#

@stray garnet Please use code blocks next time

stray garnet
#

@split hazel sry

split hazel
#

```code block```

high tinsel
#

I hope there's someone good at JS now, this is not not related, I hope it doesn't matter, I need any help I can get notlikenoot

#
      url: requestURL,
      headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
      json: true,
      dataType: 'json',
      body: { "name": document.getElementById("playlist-name").value, "description": "Recommended tracks based on genre(s): " + genres + ". Playlist generated using Spup."}
    };
#

this results in document not defined error, instead of the thing in the text field every time...

quartz kindle
#

Where are you running this?

#

document is a browser thing, is only exists in browsers, not in node.js

#

If you're running it in a browser, make sure you're not running it too early

high tinsel
#

thanks, I already found out that it only exists in a browser, that was the thing...

robust acorn
#

It takes a bit to update. Did it not update yet?

#

Are you applying for your bot to be listed on DBL?

#

try editing your bot and resubmitting it

mossy vine
#

@earnest phoenix refresh the page with ctrl + shift + r

earnest phoenix
#

Is there also a way to get all users instead of online user count with Discord.js?

knotty steeple
#

you can use memberCount on a guild object

earnest phoenix
#

Tsiica thats fetched members

#

Hmm ah

#

yeah use reduce() with mapping member size for each guild

#

Yeah i use now: client.users.size

#

that will give you cached users

#

Aha

#

Never understood MemberCount 😅

#

for a better result map the guild members size, and use reduce()

#

thats the complete amount you would need

#

Aha, is there a example where i can look? 😃

#

Aha!

#

For further questions if you have, ping me please. Probably wont see if you type :D

#

Haha yeah it's really busy in here 😛

#

But don't really understand the memberCount part.

#

aight so do you know how to use collections?

#

Sort off 😅, don't work much with that part.

#

ah, then you should. Heres some tips that I can give, you should map the every guild by client.guilds.map() and turn all guild member size in an array

#

Ah yeah well i understand that part 😛

#

The only issue is the memberCount(), there is nothing on Internet about it...

#

Or i just searching wrong 😅

#

no need to look web :D every guild has a member amount so you should use size among their members

#

Ah

#

seems confusing but it isnt

#

Yeah XD

#

I'm sorry 😛

tulip wave
#

confusing to explain xD

earnest phoenix
#

:^)

#

Hahaha yeah

#

But everything is a learning process 😉

tulip wave
#

yep

#

its what makes it fun

earnest phoenix
#

Yeah

#

Learning MVC is a nice thing 😉

#

Makes Programming so easier, and so cleaner

#

see that Tsiica

#

Alright thanks! 😃

#

thats how map works generally

#

Yeah i see, but i don't know how to get the data of the MemberCount or to call it 😛

#

Never used that function of Discord.js, and there is not really much info about it.

#

Well look member is belonged with guilds, so you need to map every guild first. Every guild is mapped, and you need to get the member count for all. That might be confusing because explanation is hard

#

Yeah true. 😛

#

do you have an eval command?

#

No 😅 those are really dangerous xD

#

¯_(ツ)_/¯

#

Have made one xD

#

Strictly only on owner ID.

onyx totem
#

°-°

red atlas
#

Hey someone has a meme api?

marsh star
#

@fossil oxide can you add a LOOP button ?

unique nimbus
#

wdym loop button

smoky mica
#

if i want to send a message to a specific channel and it's not found, how can i create a channel with some permissions? I need some advice.

robust acorn
#

please do not ping a website administrator

#

which library?

smoky mica
#

oh, discord.js

robust acorn
#

do you know how to create a channel?

smoky mica
#

I'm not entirely sure

#

It is .createChannel

robust acorn
#

I am not really proficient in discord.js, but you can use try and catch.

#

try to send a message

mossy vine
#

depends on how you find the channel

smoky mica
#

The docs confuse me so much at times, idk why.

mossy vine
#

if you are using an async method to find it, then try catch wont work

robust acorn
#

upon error, make the catch create the channel

mossy vine
#

i mean, the docs are clear and even provide examples

smoky mica
#

yeah haha i sometimes don't clearly look at them

marsh star
#

<@&304313580025544704> do you know if there will be any loop button on the bot? 😦

west raptor
#

why

marsh star
#

on Hydra bot

quartz kindle
#

You can check if channel exists with channels.get for example

smoky mica
#

Ahhh it worked! Thankyou.

loud salmon
#

@marsh star we arent the support server for hydra bot

smoky mica
#

Cyber, I forgot to mention the type of channel and some erros ._.

flat pelican
#

Why people needs to mention 15 mods for that...

pale marsh
#

]]atmods @marsh star and read the rules

covert turtleBOT
#

Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.

Here are some examples of emergencies:

  • Raids / Multiple members mass spamming.
  • Severe disruption of Discord's ToS (NSFW content, etc)
  • Anything that requires more than 2 moderators to handle.

Mentioning an entire moderator role without a justifiable reason is a punishable offence.

robust acorn
#

why are moderators, website administrators, etc even pingable

pale marsh
#

For the above reason

flat pelican
robust acorn
#

yeah, with an unjustifiable reason is punishable

quartz kindle
#

When will discord implement role ping permissions...

mossy vine
#

likely never

quartz kindle
#

Would prob be too much spaghetti to implement

ruby condor
#

is it against the API to tell your bot to create an invite to a specific server from a list of servers it is in?

robust acorn
#

If possible, please do not add that feature to your bot without permission from the owners of the servers

earnest phoenix
#
Would prob be too much spaghetti to implement```

imo it woudln't, it's just one more bit permission, check for it in the backend, if the person doesn't have perms to mention roles act as if the role is unmentionable
#

it's just that the devs are more interested in making features that will bring them money

#

(guess DBL devs and discord devs have something in common 🙃 )

late hill
#

or just allow anyone with admin to tag any role

red atlas
#

^ yea

earnest phoenix
#

Hello, is anyone willing to help me make a bot?

robust acorn
#

what library do you want to use?

mossy vine
#

@earnest phoenix highly doubt. do you know any programming languages?

earnest phoenix
#

Visual Basic, some Java, and Python.

robust acorn
#

pick one and develop it

earnest phoenix
#

I have the code, but my friend was bad at teaching how to make that code into a bot...

mossy vine
#

and some guides on it

robust acorn
#

did you already make a discord bot?

#

do you know your token?

mossy vine
#

the documentation is the best resource for learning

earnest phoenix
#

He did, then ditched on us so we're trying to scrabble together what he made.

#

I made the python code for a game, then gave that file to him just to implement into a bot, but he ditched.

robust acorn
earnest phoenix
#

Mind if I read some of the guides you have here and get back to you? Need to go for a bit.

#

And I'm excited to learn this stuff! Just on a bit of an unofficial deadline too XD

#

Be back soon.

robust acorn
#

cool! if you need help, feel free to ask questions!

quartz kindle
#

The spaghetti would be with which role has permiasion to mention which role. Or add a "can mention roles" along with the mention everyone

earnest phoenix
#

ah

#

true, they'd have to change how the entire permission system works

river dawn
#

I used to manually post my stats but that seemed to stop working so now I'm trying to use the python api

robust acorn
#

does it return an error?

#

if it did not return an error and did not update the server count on dbl, then the script never ran

river dawn
#

Yea it doesn't even seem to be printing anything

#

when i do it on my test bot it fails though

#

because i'm not using a real token

#

it fails and sends the failed message

#

I'll do some more testing

robust acorn
#

@river dawn you cannot run the script on a test bot

#

you would receive a 403 forbidden error

river dawn
#

I've also been trying on my actual one

robust acorn
#

and nothing prints

mossy vine
#

try a token reset?

robust acorn
#

if it fails to authorize, you would receive a 403 error

#

if not, all your token and bot are correct

river dawn
#

I'll try resetting the token

#

Yea i'm not even getting an error when I run it on my actual bot

robust acorn
#

try leaving it running for 3 minutes

river dawn
#

Ok

robust acorn
#

lets see if it is timed out

river dawn
#

Oh maybe its working rn

#

Its processing chunks for members

robust acorn
#

since some bots refuse to return auth error for 3 min or so

#

and what file is this running on

river dawn
#

What do u mean

robust acorn
#

is it running on your main file?

river dawn
#

No

robust acorn
#

or a separate file from your bot

river dawn
#

It's a cog

robust acorn
#

try printing stuff until you know what part does not load

river dawn
#

Ok

untold matrix
#

I've got a quick question

#
"attacks": {
        "75028720": {
            "timestamp_started": 1561654008,
            "timestamp_ended": 1561654019,
            "attacker_id": 2329265,
            "attacker_name": "The_Enigma",
            "attacker_faction": 22295,
            "attacker_factionname": "INFINITE DIMENSION",
            "defender_id": 1964175,
            "defender_name": "fijimarie",
            "defender_faction": 0,
            "defender_factionname": null,
            "result": "Attacked",
            "stealthed": 0,
            "respect_gain": "2.31",
            "chain": 1,
            "modifiers": {
                "fairFight": 3,
                "war": 1,
                "retaliation": 1,
                "groupAttack": 1,
                "overseas": 1,
                "chainBonus": 1
            }
        },
        "75028819": {
            "timestamp_started": 1561654178,
            "timestamp_ended": 1561654187,
            "attacker_id": 745480,
            "attacker_name": "WombRaider",
            "attacker_faction": 22691,
            "attacker_factionname": "Misfits Domain",
            "defender_id": 2270049,
            "defender_name": "CountShankalots",
            "defender_faction": 22295,
            "defender_factionname": "INFINITE DIMENSION",
            "result": "Mugged",
            "stealthed": 0,
            "respect_gain": "1.18058",
            "chain": 1,
            "modifiers": {
                "fairFight": "1.59",
                "war": 1,
                "retaliation": 1,
                "groupAttack": 1,
                "overseas": 1,
                "chainBonus": 1
            }
        },
#

How do I get the latest number from this list

#

Specifically 75028720

mossy vine
#

get the keys of the object, and sort them

#

i swear i remember answering that before

untold matrix
#

I think I did ask

#

But I went away but Im not sure

robust acorn
#

what do you mean

#

@untold matrix

#

you want to get the largest number in a json file?

untold matrix
#

No to get the latest number

#

I think I understand Cyber's explaination

#

Im getting the keys from the objects right now and working on the code

mossy vine
#

latest = largest in your case, no?

robust acorn
#

oh I see what you mean

untold matrix
#

No

robust acorn
#

data from the largest number?

#

file['attacks'][var]

#

its json

untold matrix
#

Latest

river dawn
#

I'm getting unauthorized

untold matrix
#

Im using axios to get the data from the JSON

robust acorn
#

so your trying to retrieve data from the latest number?

mossy vine
#

@river dawn regen token

river dawn
#

I regened before I tested this time

robust acorn
#

you got a 403 error?

quartz kindle
#

in that list, 7502881 should be the latest, not 75028720

river dawn
#

401

#

raise Unauthorized(resp, data) dbl.errors.Unauthorized: Unauthorized (status code: 401)

earnest phoenix
#

wrong token

#

be sure it matches the one on the site exactly

robust acorn
#

Your sure that it's not bot token

#

And dbl token?

river dawn
#

It's the dbl token

#

Maybe I'm not copying the whole thing?

#

it's hard to tell

robust acorn
river dawn
#

Yea thats where I got it from

robust acorn
#

yes the token is somewhat long so just triple click

prime jetty
#

is it against TOS to use livebot on your own bot?

robust acorn
#

explain more please

#

livebot?

prime jetty
#

like,

river dawn
#

The token goes off the page so I just highlight the whole thing by doulbe clicking

prime jetty
robust acorn
#

triple click

prime jetty
#

that

#

it lets you log into your bot

river dawn
#

Yea its the same

prime jetty
#

with the token

river dawn
#

I just inspected the page

prime jetty
#

is it allowed?

robust acorn
#

oh texting through your bot

prime jetty
#

or against tos?

robust acorn
#

you are not allowed to sign in to your bot

mossy vine
#

iirc that is against tos

robust acorn
#

yes it is against the tos

prime jetty
#

okay

#

thanks

mossy vine
#

bruh

prime jetty
#

"BUT BOTS STILL SHOULD BE OKAY"

mossy vine
#

it say its against tos

#

you asked if its against tos

prime jetty
#

i ment,

#

logging into your bot

robust acorn
#

you cannot sign in to your bot and read messages in channels and text

mossy vine
#

i dont think discord is cracking down on these, so just use it at your own risk

robust acorn
#

and self bots are definitely not allowed

prime jetty
#

k

#

well

#

im not getting my acct banned

late hill
#

If it lets you see everything in peoples servers

#

It's probably not ok

prime jetty
#

not with nitro and that stuff

river dawn
#

I got it working now! Thanks guys.

robust acorn
#

yay!

smoky mica
earnest phoenix
#

what does the stacktrace say

robust acorn
#

define "not working"

smoky mica
#

nothing. it doesn't say anything/

#

not working as in it doesn't send the embed to the suggestions channel.

pale marsh
#

Shouldn't you await?

robust acorn
#

thats probably because of the return statement

smoky mica
#

I was wondering.. give me a sec

earnest phoenix
#

also, if the user doesn't have an avatar, the avatarURL prop will be null/undefined

smoky mica
#

uh yeah i was gonna change that later, just tryna fix this

#

ahh it doesn't work even with the await

earnest phoenix
#

have you tried to console.log the error itself and not the stack

smoky mica
#

yes

#

no error btw 🤷

orchid echo
#

Hey friends, the svg Widget for the Bot I just created is not showing up.

Does it take time to populate or something like that?

ember atlas
#
   if (message.content.split(" ")[1] !== null && typeof message.content.split(" ")[1] !== "undefined") await client.fetchUser(message.content.split(" ")[1]).then(user => { if
(user.toString() !== null) isUser = true; else isUser = false; }).catch(e => console.log(e));
                                                                                                        ^^^^^

SyntaxError: await is only valid in async function
``` What do I do about this error?
#

ping with answer pls

earnest phoenix
#

only valid in a async function

ember atlas
#

so how do i fix it

earnest phoenix
#

Put the code in a async function

#

console.log('Test')

} ```
#

Or const SimpleLog = async () => { console.log('Test') };

restive light
#

guys i need help about reading the last line of a txt file from node and an if command for it

for example if text file's last line contains hello then...

steel drum
#

hey, I am trying to collection all the guilds between all the various shards on my bot. I tried Bot.shard.fetchClientValues('guilds'); but that returns this [{}], any advice on what I should do?

earnest phoenix
#

After your need to call the function

#

@steel drum its returning a collection i think

inner jewel
#

you won't be able to

#

since it needs to serialize the data, you'll get errors due to cyclic references

steel drum
#

!eval Bot.shard.fetchClientValues('guilds').array(); returns an error saying array isnt a property

#

so im ggoing to to assume that its just an array

#

also b c when i tried typeof it returns object object

earnest phoenix
#

Why do you want that?

inner jewel
#

if you try to send client.guilds/client/guilds/a guild/any variation of this, you'll get this reference cycle

#

Client -> guilds -> Guild -> client
î |
\-----------------------------/

#

which can't be serialized

steel drum
#

what would you suggest doing then ?

steel heath
#

You sure you can fetch it with fetchClientValues? You can only fetch like guilds.size or stuff afaik

earnest phoenix
#
        console.log(s)
});```
steel drum
#

I want to send an announcement in every server my bot is in

amber fractal
#

TOS

steel heath
#

Use broadcastEval to eval something with it

inner jewel
#

you'll get ratelimited to hell doing that

steel heath
#

And yeah tos

steel drum
#

hmm

earnest phoenix
#

You can

#

5min interval

steel drum
#

how many guilds would I be able to send a message to before getitng rate limited?

amber fractal
#

Ratelimits are flexible

steel heath
#

5min interval for a sharded bot (at least 2500 guilds) means hell of a uptime

amber fractal
#

There are no real defined, explicit ratelimits

steel drum
#

understandably

amber fractal
#

Why do you want to send an announcement

earnest phoenix
#

^

steel drum
#

for bot feature updates

restive light
#

guys anyone can help me?

amber fractal
#

That can usually be done through a support channel

earnest phoenix
#

Add a command, and promote the command in the help command @steel drum

amber fractal
#

@restive light dont ask to ask

steel drum
#

not everyone wants to join a support channel

earnest phoenix
#

like <prefix>update

steel drum
#

i already use update for pulling github stuff but i see the intention

#

ty

steel heath
#

use your website for announcements or make people can set a updates channel via command

#

is the best way imo

robust acorn
#

you should make server owners consent to it in a way

steel drum
#

of course

restive light
#

I need reading a txt file's last line and sending it to a channel in every 1 seconds without repeating the same message , spamming and without sending blank messages

My project: sending a game's logs to a dc channel

robust acorn
#

you can try asking the server owners to make a channel called {your-bot-name announcements}

earnest phoenix
#

Google ?

robust acorn
#

and have your bot scan all channels and send only in those channels

amber fractal
#

Using discord as logs is very bad

restive light
#

no my plan is not that

amber fractal
#

And got roblox webhooks banned for it mmulu

steel drum
#

@restive light I think something involving webhooks would be better

restive light
#

getting game's chats in every second

#

when thats done, ill do sending message to a game from dc

#

dc to game game to dc

amber fractal
#

Yes, that's what got roblox banned

restive light
#

well thats not roblox

#

Jazz Jackrabbit 2

amber fractal
#

Im just saying same implication

restive light
#

well that game is for programmers

#

people creates their own programs for that game

#

actually i wanted to creating an IRC bot but reading from txt and sending it is easier way i guess

#

and i wish discord doesnt have any forbidden something for game chatting IRC#bots

#

(if created irc is using for hacking, they are right)

ember atlas
#
const discord = require('discord.js'); 
const moment = require("moment");
const { version } = require('../../package.json')
const config = require('../config.json');
require("moment-duration-format");

exports.run = async (client, message) => {
  const config = require("../../assets/settings.json");
  const duration = moment.duration(client.uptime).format(" D [days], H [hrs], m [mins], s [secs]");
  message.channel.send(`= GENERAL =
• Kasper  :: ${config.version}
• Uptime     :: ${duration}
= USERS =
• Users      :: ${client.users.size}
• Servers    :: ${client.guilds.size}
• Channels   :: ${client.channels.size.toLocaleString()});
};

https://i.imgur.com/xtyOOdE.png
What did i do wrong?

earnest phoenix
#

When you discover a new error

smoky mica
#
message.channel.send(`= GENERAL =```
earnest phoenix
#

Its not that @smoky mica

smoky mica
#

He forgot to end it

earnest phoenix
#

He forgot to close the event

#

Yes

smoky mica
#

Yeah event my brain's fuked

#

Ahhh it's like 3:40 am i can't work on the bot later so im like not going to sleep lmao

earnest phoenix
#

Sleep

smoky mica
#

In like 30 mins i'll lmao

restive light
#

' setInterval(function(){
client.on('message', (receivedMessage) => {
if (receivedMessage.author == client.user) { // Prevent bot from responding to its own messages
return
}

})

    const readLastLines = require('read-last-lines');

readLastLines.read('d:\deneme.txt', 1)
.then((lines) => client.users.get("ID").send(lines)); //console.log(lines));

},1000) //logs hi every second '

#

doesnt works as i want

smoky mica
#

...

restive light
#

writes last line of txt file to console but doesnt write to dc

smoky mica
#

type it like this so it's better to read, that looks awful to read

earnest phoenix
#

17 pixels in your screenshot

restive light
#

@smoky mica I told that before i remember, my keyboard doesnt has these marks

earnest phoenix
#

Copy

smoky mica
#

copy xd

earnest phoenix
#

alt+096

smoky mica
#

oof

earnest phoenix
#

I doesn't have these mark too

#

I'm using alt+096

restive light
#

ok

#

anyone wont help?

earnest phoenix
#

Why you have put a event in a interval?

#

You're trying to nuke discord?

restive light
#

lmao

earnest phoenix
#

Re-send the code pls

restive light
#

just trying to do send the last line of a txt file to dc

earnest phoenix
#

With code block

amber fractal
#

Bro wait wtf you dont have backticks on your keyboard? Tf you get it from

earnest phoenix
#

alt+096 steven

restive light
#
client.on('message', (receivedMessage) => {
    if (receivedMessage.author == client.user) { // Prevent bot from responding to its own messages
        return
    }

 
    })

        const readLastLines = require('read-last-lines');
readLastLines.read('d:\deneme.txt', 1)
    .then((lines) =>   client.users.get("ID").send(lines));                 //console.log(lines));

 



},1000) //logs hi every second ```
earnest phoenix
#

Why client.on('message?

amber fractal
#

But most keyboards have it, even mobile does. Anyways

#

Uh why loop an interval

restive light
#

interval scans and sends a new line to dc

earnest phoenix
#

Yes i have backticks on my keyboard but idk how i can put backtick i'm noob lol

amber fractal
#

But putting an event listener in an interval

#

Is bad

earnest phoenix
#

^

restive light
#

idk i dont understand much about js

amber fractal
#

Like insurmountable not good

restive light
#

i just using js for bot and trying to learn js

earnest phoenix
#

client.user not defined

grim aspen
restive light
#

can anyone create a sample what i want? and please tell step by step or with // what line does

amber fractal
#

Spoonfeeding here is illegal

restive light
#

i want to learn while creating my bot too

#

why its illegal lol

#

i just want to creating and learning at same tmie

earnest phoenix
#

cause spoonfeeding doesnt help learning

restive light
#

time*

indigo sun
#

discordjs

#

is my fav

pale marsh
#

Create the sample yourself. Try and make mistakes. Make a lot of them. Then work on fixing them one by one

#

That's how you learn

indigo sun
#

@restive light you could go to the server for your bots api wrapper thing (eg discordjs) and ask questions there

#

they have extra large size spoons

earnest phoenix
#

@restive light why do you want that?

grim aspen
#

please click and read

#

much more simple than us spoonfeeding

amber fractal
#

I personally learn from trial and error. And a lot of it

grim aspen
#

i've read the docs

#

that's how i learned

indigo sun
#

well if you still wish to be spoonfed join their disc

#

they have huge spoons

restive light
#

@earnest phoenix i can understand easily when someone makes sample and tells me how to do / solve it

#

for example like maths

#

i use this way for learning

indigo sun
#

why do you want to log hi every second

earnest phoenix
#

??

#

yes why

#

No utility

grim aspen
#

it sounds like a plan to keep the bot online

indigo sun
#

lol

#

use uptimerobot

grim aspen
#

why not use a vps

restive light
#

i put log hi for testing

indigo sun
#

oh

earnest phoenix
#

How to nuke discord:
Put a event listener in a interval

#

@restive light testing what?

restive light
#

interval

earnest phoenix
#

lol

restive light
#

interval logs hi every second but doesnt sends messages to dc in every second

grim aspen
#

i'm loosing braincells

earnest phoenix
#

console.log('hi')

}, 1500)```
#

read docs before asking for help

restive light
#

my problem is about "console.log('hi')

earnest phoenix
#

problem solved

restive light
#

for saying "Go and learn docs"

#

?

earnest phoenix
#

For helping people with a minimum knowledge

grim aspen
#

hey kens nickname test bunny

restive light
#

i already wanted a minimum knowledge

grim aspen
#

let's say i come in here for help for every single piece of code that i never learned

earnest phoenix
#

hi

#

Okay, if you want to say hi every second take that


console.log('hi')

}, 1000)```
grim aspen
#

wouldn't that be annoying?

earnest phoenix
#

No utility but ok

#

@earnest phoenix hello

#

Do you need help?

restive light
#

i guess you dont understand what i ask meh

#

i have issue about sending messages to dc every seconds

earnest phoenix
#

interval logs hi every second but doesnt sends messages to dc in every second

#

@restive light you can't send a message every 1 second without a ratelimit

#

He can if its in console.log

#

yh

restive light
#

doesnt sends messages to dc in every second?

earnest phoenix
#

What is dc?

#

You can't if it's being ratelimited

#

Discord channel

#

you can with 6s second interval

#

But 1 second is not allowed

#

Api abuse

#

i mean yh, you'd get banned for abusing it

restive light
#

actually something like scans txt file in every 1 secs and sends txt's last line when a new one added to it

earnest phoenix
#

Its good

restive light
#

i want that

#

FINALLY MAN

earnest phoenix
#

🤦 this went from discord channel to txt file

#

Send the txt file to the channel

#

Problem solved

restive light
#

🤦🏻

#

this txt file is live chat between dc and game

earnest phoenix
#

Why using discord?

#

that's stupid

restive light
#

another program (written in vb6) saves games logs to txt and dc bot reads and sends it to dc

#

and same as dc to game too

#

dc game <> game dc

earnest phoenix
#

can u describe it?

#

like how should it work, etc.

restive light
#

okay

earnest phoenix
#

cuz i didn't understand at all

#

Use fs @restive light

#
 fs.readFile(poem.txt, 'utf8', function (err,data) { 

if (err) { 
return console.log(err);
 } 

console.log(data.last()); });```
#

I have put last but i think last doesn't exist in djs

restive light
#

a program written in vb6 enters the game and saves logs to a txt file. Discord bot reads text file's last line in every 1 seconds and sends new line to discord

discord bot saves chats from discord to txt and vb6 program reads and sends chats to game

#

idk if you understand

earnest phoenix
#

Dude

#

Use fs

#
 fs.readFile(poem.txt, 'utf8', function (err,data) { 

if (err) { 
return console.log(err);
 } 
setInterval(function() {
bot.channels.get('id').send(data.last()); 
}, 1500);

});
#

yh imma leave it to ken, my brain's fried from lua stuff

restive light
#

"poem" is not defined

#

af

earnest phoenix
#

are you joking

#

remplace poem.txt by the name of your text file

restive light
#

i thought creating an irc between dc and game with winsocks is the hardest way

#

looks likes js is the hardest and annoying way

earnest phoenix
#

js is very easy meowoh

restive light
#

nah

#

C++ and C# is very easier than js

#

fast and stable

earnest phoenix
#
// ready event
module.exports = async client => {

  client.user.setActivity(`BRUHHH TRAIN`, {type: "WATCHING"});
};```
indigo sun
#

ratelimit

#

set presence

earnest phoenix
#

how about no

young hill
#

Nothing better than realizing you need to set up sharding after your bot is submitted

earnest phoenix
#

Can someone help me find the guide for making a bot with python? Looking but hard to find it

grim aspen
#

@earnest phoenix

earnest phoenix
#

Ty!!!

nocturne hazel
#

Anybody know why the font isn't being used on the text?
It's still using the default sans serif
here is my code:

   Canvas.registerFont('Rockout.otf', { family: 'Rockout'})
    
    const canvas = Canvas.createCanvas(700, 250);
    
    const ctx = canvas.getContext('2d');
    
    const background = await Canvas.loadImage('./background.jpg');
    
    ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
    
    ctx.strokeStyle = '#000000';
    
    ctx.strokeRect(0, 0, canvas.width, canvas.height)
    
    ctx.font = '28px "Rockout"';
    
    ctx.fillStyle - '#000000';
    
    ctx.fillText('Welcome to the server,', canvas.width / 2.5, canvas.height / 3.5)

No error in console as well

earnest phoenix
#

You need to register the font

#

Oh already do

#

You need to link the folder, where is the font

nocturne hazel
#

In the same folder as the index.js file

earnest phoenix
#

What?

#

Just ./font.ttf

nocturne hazel
#

Can canvas register .otf?

#

I did that and still the same output

earnest phoenix
#

Uh idk if canvas can register otf font

tight zealot
#

What this mean

earnest phoenix
#

npm i discord.js

#

@tight zealot

tight zealot
#

What

earnest phoenix
#

Put npm i discord.js

#

In the terminal

#

And click enter

#

@tight zealot

tight zealot
#

Okay

#

It worked tysm

earnest phoenix
#

Np ablobsurpriseblush

cunning oxide
#

Does anyone know if the way that permissions work in DJS changed? I'm trying to implement a check for if the user has a certain permission, however, it's not working. ```js

if (!message.author.hasPermission('MANAGE_CHANNELS')) {
return message.channel.sendEmbed(PermsEmbed).then(m => m.delete(5000));
}

#

One min, getting the error message.

twilit rapids
#

Users don't have permissions, members do.

#

So use message.member instead.

cunning oxide
#

so message.member?

#

ah copy

#

knew i was just being stupid

twilit rapids
#

Lol

earnest phoenix
#

Hello

cunning oxide
#

Hey, @earnest phoenix, how can we help

earnest phoenix
#

Hello! How do you reset a debian vps?

cursive dagger
#

Check your hosters control panel

earnest phoenix
#

I do not have access, it is a friend on vacation who has the access @cursive dagger

cursive dagger
#

Then you got to wait

earnest phoenix
#

omg

tulip wave
#

That's why yoi get your own vps

#

You*

#

So much easier than using another person's vps

earnest phoenix
#

Make crash the vps

#

@white brook

#

You want the id of a channel?

#

Or make the bot join a channel with a id?

cunning oxide
#

learn discord.js

#

^code

white brook
#

Yeah

earnest phoenix
#

What yeah?

white brook
#

make the bot join a channel with a id

earnest phoenix
#

make the bot join a channel with a id discord.js

#

Search that on google

white brook
#

I. Need the code

cunning oxide
#

@earnest phoenix let me google that for you woulda been cooler

tulip wave
#

Snipe no one will give you the code here

white brook
#

Where

cunning oxide
#

Nobody should give you code here. As I said, it’s against the rules.

tulip wave
#

^

cunning oxide
#

Please stop asking for code.

earnest phoenix
#

Its a basic js code

unique nimbus
#

Learning is good

cunning oxide
#

Learning is great.

earnest phoenix
#

?

cunning oxide
#

@earnest phoenix deleting it for a reason

#

Don’t worry, trying to promote learning.

drowsy sentinel
#

Hey guys, I know ya'll wanna be helpful but this channel is flooding quickly. So keep it constructive and helpful.

cunning oxide
#

@white brook try googling, there are a ton of examples. If you’re struggling with one specific error or part of the code, then we can help.

tulip wave
#

@white brook start by reading the discord.js docs then search what you want on Google it's out there somewhere

earnest phoenix
sinful lotus
#

at least keep your pings to minimum heh

earnest phoenix
#

pong

white brook
#

Thank you @earnest phoenix

earnest phoenix
#

Np

earnest phoenix
#

it's saying .forEach is not defined IDK why

const { Client, Collection } = require("discord.js");
const { token } = require("./bot-config.json");
const bot = new Client()

["commands", "aliases"].forEach(x => bot[x] = new Collection());
["message", "command", "event"].forEach(x => require(`./handlers/${x}`)(bot));

bot.login(token);
drowsy sentinel
#

Any other details like ERROR Code,?

#

Also, I wouldn't advise following many Github repositories.

earnest phoenix
#

I did this from a tutorial

#

lemme get the full error

#
/home/pi/BasicallyBS/body.js:5
["commands", "aliases"].forEach(x => bot[x] = new Collection());
                        ^

TypeError: Cannot read property 'forEach' of undefined
    at Object.<anonymous> (/home/pi/BasicallyBS/body.js:5:25)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
    at internal/main/run_main_module.js:21:11
#

copied the file format and the writing to a T so idk why it's poping up

drowsy sentinel
#

Yeah... I wouldn't exactly advise following these tutorials as I have seen him explicitly abuse the API without knowledge of it.

earnest phoenix
#

so I should just stick to my command handler?

drowsy sentinel
#

Null out the aliases line and see if the one below works.

#

I think its just whatever is being passed within the parameters.

earnest phoenix
#

same error

#

something about forEach

#

You're trying to forEach an array

#

yes...

#

For what?

drowsy sentinel
#

That's not the problem lemaaa.

earnest phoenix
#

So I can use the event handeler done in menudocs... although i don't fully know his file setup

#

Look here scripted

#

Its a basic command handler taken from docs

drowsy sentinel
#

All it does calls a async loop for event and command files.

earnest phoenix
#

ok.... i'll try it

copper crystal
#

What could be the reason for a Discord bot automatically regenerating its token?

earnest phoenix
#

Banned?

#

Its happening when your application is banned

copper crystal
#

Surely an email would be sent and the owner of the bot would be banned as well.

earnest phoenix
#

What

copper crystal
#

If the bot gets banned, surely they will send an email and ban the bot owner as well.

earnest phoenix
#

Not for a application ban

#

Ok, i got mine fixed

#

Just contact discord at support@discordapp.com if you need help about that

#

You're not the first with this issue

copper crystal
#

Thanks

late plank
#

hey folks, what's a good language for discord code blocks to get nice text highlighting

#

basically looking to exploit this for showing information

#
[+] info 1
[+] info 2
...
#

figured you guy would know

earnest phoenix
#

css?

#
[+] info 1
[+] info 2
#

It look like this in css

warm oak
#

i want to make a comand that responds affer a few seconds is there a way to do that im useing c#

earnest phoenix
#

@stray garnet random answers use random class

#

@warm oak Task.Delay

warm oak
#

thanks

earnest phoenix
#

await Task.Delay(3000);
Reply

#

@warm oak use await

warm oak
#

thanks

stray garnet
#

@earnest phoenix Thx but i already got it :)

earnest phoenix
#

@stray garnet array text file random?

stray garnet
#

Nope

earnest phoenix
#

What @stray garnet

quartz hill
#

How do I know the number of users on all servers where the bot is located?(nodejs)

stray garnet
#

hmm Just get a Serverlist Command that is only for you

earnest phoenix
#

sum all of your guild's memberCount property

stark beacon
#

so once I have the nodejs stuff at the top with client key and such,

Is this all I need to get the server count and member count to show up correctly on the Discord Bots website?

client.on('ready', () => {
    setInterval(() => {
        dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
    }, 1800000);
});
mossy vine
#

bascially, yeah

stark beacon
#

mk, thanks!

mossy vine
#

but keep in mind how setInterval works

stark beacon
#

yea, so it'll take time for the first post

mossy vine
#

yeah thats what i was about to say

stark beacon
#

I guess I could run it once now, to set it, then put it back in the interval

mossy vine
#

or you could post it in the ready event, and then the setInterval

stark beacon
#

ahh true true

#

dbl.webhook is undefined for me it says

#

rather it cannot read the property of on, of undefined, which is dbl.webhook

wheat jolt
#

Can someone tell me how I can do a language command?

#

Node.js

earnest phoenix
#

what does that even mean

tulip wave
#

Translation? Maybe

stark beacon
#
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});

dbl.webhook.on('vote', vote => {
    console.log(`User with ID ${vote.user} just voted!`);
});
#

which is this

#

the cannot read property on error, for line 150 in my code

#

Although I guess I don't really need that, as it looks like server count is coming through now

amber fractal
#

Thats for voting

#

And that would also be more appropriate in #topgg-api

mint cradle
#

PYTHON, DISCORD.PY V1.2.2
I have a question, how to check if a bot, for example my bot, has the permissions for sending (embed_links)
I searched, but .has_permissions won't work

slender thistle
#

How did you use has_permissions?

mint cradle
#

I tried

#

Bot object

#

And

#

Channel object

slender thistle
#

Are you using commands extension?

mint cradle
#

But that's the problem, I have no idea what object it takes

#

Eeerm

#

No.

slender thistle
#

rip

mint cradle
#
#On a message (command)
@gopbot.event
async def on_message(message):
    print(message.channel.has_permissions(create_instant_invite))
#

I have no idea how to use the command extention, and I want some stuff to be unprefixed too.

mint cradle
#

Okay thanks

#

I can try this

plucky sun
#

Can u help me?
I would like to delete a channel that I search by name, but delete the channel by its id. I tested this,

 let channel = message.guild.channels.find(c => c.name == args[1] && c.type == "voice");
  let channelid = channel.id;
    message.channel.send(":white_check_mark: Le channel ``" + args[1] + "`` a bien été créée !" + channel).then(msg => {msg.delete(8000).then(c => {channelid.delete()})});

but the console says to me:

(node:5296) UnhandledPromiseRejectionWarning: TypeError: channel.id.delete is not a function
somber verge
#

idk d.js but there should be some kind of client.delete_channel() function, go look it up

earnest phoenix
#

you're trying to delete an id

#

please use common sense

west spoke
earnest phoenix
#

@plucky sun message.guild.channels.get(channelid).delete()

#

or you can call delete() on the already fetched instance

#

saving memory with cry™

#

 message.channel.send("✅ Le channel ``" + args[1] + "`` a bien été créée !" + channel).then(msg => {msg.delete(8000)} ```
#

You can do that @plucky sun

#

idk if .delete() work on a .find()

#

i dont think bc its returning a collection so you need to map it

plucky sun
#

ok i try

earnest phoenix
#

it returns a channel thonk

#

If it doesn't work replace .delete() by .map(e => e.delete());

#

A collection of channel

#

channels is a collection of channels, find returns a channel instance, as per docs Searches for a single item where its specified property's value is identical to the given value 🤔

#

yes but its not returning only one channel

robust acorn
#

use get_channel(id)

earnest phoenix
#

its js not py dank uwu

#

Lemaaa, im almost certain it does return only one channel; Searches for a single item ...

smoky spire
#

Find returns 1 channel

#

Filter for multiple

robust acorn
#

try using getChannelByID

earnest phoenix
#

^

#

ah yeah i'm dumb

#

reading from the code above, they don't have access to the id

#

which is why they're using find in the first place

#

@plucky sun replace find by filter

plucky sun
#

doesn't work i search another solutions ty

modern sable
somber verge
#

not making a menu like that?

modern sable
#

true

finite crow
#

How to make trivia answer bot plZ tell me

earnest phoenix
#

with magic

grim aspen
#

google is your best friend for that question

spare goblet
#

@finite crow do you minimally know how to make a bot?

#

if not then

covert turtleBOT
earnest phoenix
#

Learn discordjs

finite crow
#

@spare goblet I don't know plZ tell me

spare goblet
#

@finite crow if you do'nt know how to make a bot, please check the following link

covert turtleBOT
spare goblet
#

thanks blobsmilehappyeyes

robust acorn
#

pick a library

near igloo
#

halero?

#

will any 1 help me?

earnest phoenix
#

Dont ask to ask

#

Just ask your question

bleak vortex
earnest phoenix
#

Nothing

bleak vortex
#

exactly

#

there's nothing wrong

earnest phoenix
#

Ok??

bleak vortex
#

my code has issues

#

lmao

earnest phoenix
#

Show more code

#

what does the error say...?

#

Like mentionedUser

#

If its "username" its not defined

bleak vortex
earnest phoenix
#

Its working now?

bleak vortex
#

but i added more fields

#

no

#

that is another embed

earnest phoenix
#

what is the error

bleak vortex
earnest phoenix
#

wtf is that

#

I discover new error

bleak vortex
#

what

inner jewel
#

you forgot a (

bleak vortex
earnest phoenix
#

Ah yup

inner jewel
#

you have .addField`...

bleak vortex
#

oo

#

its so red i couldnt even see it lol

#

thanks mate

indigo sun
earnest phoenix
#

<embed>.setThumbnail(url or attachment)

robust acorn
#

.setthumbnail

indigo sun
#

ah I was using setimage

robust acorn
#

It probably puts the image on the bottom

earnest phoenix
#

Set image is for display a big image at the bottom

robust acorn
#

Yup

#

Set Thumbnail is for the smaller image at the right

somber verge
#

how do you do that in py tho

robust acorn
#

embed.set_thumbnail(url={the url})

somber verge
#

ok thanks

ember atlas
#

Anyone got a good tutorial for setting up mongodb?

stray garnet
#

@ember atlas its easy

#

if you dont check it.... damn

robust acorn
#

@ember atlas I can help with mongodb

#

Did you create a database already on their site?

earnest phoenix
#

Alguien me podria ayudar, necesito poner mi bot aqui pero no he podido y se los agreadeceria un monton
Somebody could help me, I need to put my bot here but I have not been able to and it would be a lot

high lava
#

Keep in mind, you have to know what code you need help with

ember atlas
robust acorn
#

so you already established connections?

#

check the collections tab and check if you already have an existing database

ember atlas
#

@robust acorn It looks like I do.

robust acorn
#

also what library are you using?

ember atlas
#

djs

robust acorn
#

do you have a database in the collection?

#

and you were able to connect to it?

ember atlas
#

it says I have 6

#

but i didnt create any of them

robust acorn
#

does someone else know your log in info or your database url?

ember atlas
#

they are sample ones

#

no

#

its like sample_weatherdata

robust acorn
#

there should not be sample ones but okay

#

so what do you need help with?

high lava
#

When you establish a connection in your code, did you put /your-database-name after the url?

ember atlas
#

havent done that yet

#

thats what i am here for

#

i also dont have a database and need to make one

high lava
#

Im guessing DJS?

robust acorn
#

you said you had sample databases

#

try to make a database within the collection

#

there should only be one url to connect to an account

#

which gains access to do stuff with api

high lava
#

This is all you need for DJS to interact with you database

ember atlas
#

Whats the collection name?

high lava
#

afaik, you don't actually need to do that after mongoDB is setup

robust acorn
#

once you open a collection, it should have the name in the format of database-name.collection-name

high lava
#

Just set it up like it said in the NPM page with /desired-database-name after your host ip