#development

1 messages · Page 1771 of 1

earnest phoenix
#

yea

dusky lagoon
#

thanks hahaha

#

ok sooo i get this error (node:47208) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body content: Must be 4000 or fewer in length.

#

so i just need to add a map limit i guess

cinder patio
#

yup

#

Or you can split the string and send it in multiple embeds but that's kinda clunky

crimson vapor
#

if its an array and every element is a similar length you could just do arr.length = n

cinder patio
#

I'd do content.players.slice(0, theAmountOfNamesYouWant).map(...)

#

I don't think you really want to show hundreds of names in a single messages

#

or you could make a pagination menu using buttons

dusky lagoon
#

i think if i put everyname underneath eachother with \n it could cramp it better

#

how would that be possible

earnest phoenix
#

@rough obsidian hm anyone have some better idea to get the YouTube Tracks for an Spotify Track/Playlist then getting the Tracks with the Spotify Libary and searching on YouTube for each track in the list?

#

or should i "just" build an api for that?

dusky lagoon
#

ok so i finally fixed and it shows the names now BUT it puts them all together how can i make every name a individual

#
const Discord = require("discord.js");
const got = require("got");

module.exports = {
  name: "queuepeek",
  aliases: [],
  description: "random anime meme",
  run (message, args) {
    const embed = new Discord.MessageEmbed();
    got("https://rebane2001.com/queuepeek/data.json").then((response) => {
      let content = JSON.parse(response.body);
      let pos = content.queuepos
      let est = content.queueest
      let player = content.players.slice(0,5).map(players => players.name)

      embed.addField("position in queue:", `${pos}`, true)
           .addField("Estimated time:", `${est}`, true)
           .addField("Players:", `[${player}](https://namemc.com/profile/${player})`, )
      


      message.channel.send(embed);
    });
  },
};```
earnest phoenix
#

You can add a new line?

#

join with a new line

dusky lagoon
#

as in \n orrr

earnest phoenix
#
let player = content.players.slice(0,5).map(players => players.name).join('\n')
#

Actually will that fuck it up my brain can't process rn

latent heron
#

TIAS

digital saffron
#

Is it okay to have permissions="8192" so -> manage messages in the invite?
In #502193464054644737 it says it will be tested with permissions="0", but then my core functionality would be impacted, am I just worrying for nothing or will this impact my chances of approvement?

#

or is there another way to request permission during operation without giving full permission to the bot? >.> Since then all management bots would also need to work with perms 0? o.O

dusky lagoon
earnest phoenix
#

mmmm

#

figured it would fuck it up

#

Maybe loop over it instead of maping

#

slice then loop

#

unless there is a better way

cinder patio
#

you can do it with mapping

#
map(player => `[${player.name}](${player.linkOrWhatever})`)
earnest phoenix
#

Oh true

#

duh

#

My brain is running at 1%

west agate
#

Does anyone know why I keep getting this error when I do node . or node index.js. (I left this project and came back after a while)

cinder patio
#

you need to add the node.js executable to your PATH

#

It's usually added by default when you install node.js

west agate
#

so i should reinstall it?

cinder patio
#

You could do that, you can also find where the executable is and manually add the path to it to your PATH

earnest phoenix
#

Can't you relaunch the installer and repair stuff

#

e.g add to path

cinder patio
#

maybe

cinder patio
#

google is your friend

#

"How to add node.js to PATH"

#

Or "How to add something to the PATH"

earnest phoenix
#
  1. Grab the dir node is installed in (Typically your program files under nodejs)
  2. Go to your settings and find Edit environmental variables
  3. Edit your system/user path and add that dir path to nodejs you got in step one to it.
  4. Save and restart terminal
#

Ez

west agate
#

do i restart my pc after?

earnest phoenix
#

You don't have to

#

Just restart the terminal

tardy hornet
#

i made a global leaderboard command, and it always tells me or that tag is undefined or that the max is 2048 in length

#
case 'lb':
          let moneylb = db.all().filter(data => data.ID.startsWith(`money`)).sort((a, b) => b.data - a.data)
          moneylb.length = 10
          var gLB = ""
          for(var i in moneylb) { 
            gLB += `${moneylb.indexOf(moneylb[i])+1}) ${bot.users.cache.get(moneylb[i].ID.slice(6)).tag} : $${moneylb[i].data.toLocaleString()}\n`
          }
          
          const globallb = new Discord.MessageEmbed()
          .setTitle('__Global Leaderboard__')
          .setColor(bsc)
          .setDescription(gLB)
          message.channel.send(globallb)
break;
earnest phoenix
#

Yes

#

embeds have a max limit of characters that can be sent in em

#

You are hitting that limit

weary crypt
#

Try pagination, this way you can scroll through this leaderboard

west agate
#

screw it didn't work, ill work on it tmr

rapid wharf
#
@client.command()
async def test(ctx):
    ip = 'PoopIP'
    port = 30120
    fivem = FiveM(ip=ip, port=port)
    players = await fivem.get_players()
    playerinfo = []
    for player in players:
        playerinfo.append(player)

    ok = Paginator(query=playerinfo, page=1, per_page=10)
    em = discord.Embed()
    em.add_field(name='Players', value=ok)
    await ctx.send(embed=em)
``` i wanted to use paginator to show all the players info in the server in diff pages, but cant figure it out how to???
humble rock
#

could someone expert in mongoose in javascript help me? How do I insert multiple Strings into a single property?

slender thistle
rapid wharf
#

in embed

slender thistle
#

Oh

#

sec

rapid wharf
#

so how to fix it??

slender thistle
#

I forgot how to use it myself

rapid wharf
slender thistle
#

Give me a second

opal plank
slender thistle
#

Ok this is interesting

#

Apparently it doesn't behave well with range class

slender thistle
#

... yeah

#
>>> pag = P(list(range(100)), per_page=5, page=1)
>>> for item in pag:
...     print(item)
...
0
1
2
3
4
humble rock
slender thistle
#

@rapid wharf You probably want to either convert it to list or join it with some separator

slender thistle
#

Which one? KEKW

#

You can technically pass list(ok) as the field value but imo that would look ugly

rapid wharf
#

i actually need this
(sending ss)

dusky lagoon
#

Ok so im trying to get multiple rows of names next to eachother so that it fits better but how could i add that

rapid wharf
#

ok forget ss, like
Page one:

  1. <player_name> <player_id>
  2. <player_name> <player_id>
    ........
    page two:
  3. <player_name> <player_id>
  4. <player_name> <player_id>
    .......
    page three:
    .....
slender thistle
#

Ahhhh

vivid fulcrum
#

\u200b as the title

#

your list as the value

slender thistle
#

Ok no, actually...

rapid wharf
#

ohh

slender thistle
#

range(1, ok.total_pages + 1) specifically

earnest phoenix
#

look at shiv helping

#

pat pat

slender thistle
#

Each element from that range is gonna be a page number. What you can do, ironically, is do ok.page = item, and then work with the ok object itself

#
>>> list(pag)
[0, 1, 2, 3, 4]
>>> pag.page = 2
>>> list(pag)
[5, 6, 7, 8, 9]
#

😛

rapid wharf
#

ohhhh

earnest phoenix
#

shiv I have a challenge for you

slender thistle
#

Oh? What kind?

rapid wharf
#

i got someting someting

earnest phoenix
#

Sort a list of numbers from highest to lowest with python

slender thistle
#

Without list.sort()? 😛

earnest phoenix
#

Yes

slender thistle
#

Let me restart my IDLE

earnest phoenix
#

Okie

dusky lagoon
earnest phoenix
#

You can't in a description

vivid fulcrum
#

fields can hold 1024

#

each

earnest phoenix
#

You can't even inline like that in descriptions I don't think

dusky lagoon
#

so it wouldnt be possible to lets say every 50 names a new line??

earnest phoenix
#

Well yea

vivid fulcrum
#

but why not inline fields

#

fuck off

cinder patio
#

@tame kestrel ^ scam

#

wtf is an autotronic flip knife anyways

tame kestrel
#

@earnest phoenix No advertising here

earnest phoenix
#

Switch blade ig

vivid fulcrum
#

a really butchered google translation

earnest phoenix
#

looking at the site name it seems like a cracked game weebsite

#

More like scam

#

and ip logger

dusky lagoon
vivid fulcrum
#

so?????

#

the same way you put it in description, you put it in fields

#

lol

#

man this is what happens when you copypaste too much

#

cant resolve a simple logical problem

tame kestrel
#

@earnest phoenix ty

earnest phoenix
dusky lagoon
earnest phoenix
#

if you look up

tame kestrel
#

I should have cleaned it all up

earnest phoenix
#

Ah okay good

vivid fulcrum
#

man it's a simple thing to understand lol

#

i don't know what's not clicking

dusky lagoon
#

@earnest phoenix and @cinder patio are legit the ones who helped the most soooo its really your explaining

vivid fulcrum
#

instead of not using the description, you instead use inline fields

dusky lagoon
#

this is the error i get with fields (node:33864) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body embed.fields[0].value: Must be 1024 or fewer in length.

vivid fulcrum
#

this not only does your desired result but also increases the limit to 5k chars total

#

yeah

dusky lagoon
#

Yeah with description its not a problem

vivid fulcrum
earnest phoenix
#

You might wanna just loop if ou are going to put it in fields

#

Else use descriptions with the way you're doing it now

cinder patio
#

You need two inline fields

#

split the names array in two

earnest phoenix
#

Cant you just loop over the array and make the field inline

#

so all of them are inline

cinder patio
#

That would make it so there is a different field per name

earnest phoenix
#

Isnt that what they want

cinder patio
#

afaik they want 2 columns with names

#

that's how I understand it

vivid fulcrum
#

it's a very simple algorithm where you loop through the players and keep adding to a string up until the string can't fit no more than 1024 chars

#

once you hit that point

#

add the field

cinder patio
#

wait they said rows, nvm

vivid fulcrum
#

reset your string, repeat

slender thistle
# earnest phoenix Sort a list of numbers from highest to lowest with python
>>> from random import shuffle
>>> l = list(range(50))
>>> shuffle(l)
>>> def sort():
...     for i in range(len(l)):
...         for j in range(i + 1, len(l)):
...             if l[i] < l[j]:
...                 elem = l[i]
...                 l[i] = l[j]
...                 l[j] = elem
>>> shuffle(l)
>>> l
[46, 31, 43, 5, 49, 44, 25, 15, 30, 36, 10, 40, 9, 17, 42, 41, 34, 22, 28, 4, 19, 11, 18, 26, 33, 48, 45, 14, 39, 7, 20, 12, 21, 0, 2, 3, 23, 37, 6, 37, 13, 47, 16, 27, 24, 1, 29, 8, 35, 32]
>>> sort()
>>> l
[49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 37, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
earnest phoenix
#

Good job

#

đŸȘ

cinder patio
earnest phoenix
#

nor do i really understand it

cinder patio
#

Also I'm still not entirely sure what you want to do Hyporelix

vivid fulcrum
#

because you have a stupid name

latent heron
#

Ah

#

you're one of the people involved with discord-components, aren't you?

earnest phoenix
#

xD haha lool xD

dusky lagoon
earnest phoenix
#

sry

vivid fulcrum
#

you can use 5 inline fields max

#

or rather 5 and a half

#

the total embed char limit is 6k

#

oh also you can add padding to the values to make the embed appear wider and with more spacing

#

but again

#

that costs you the char limit

earnest phoenix
earnest phoenix
slender thistle
#

wth is fuzzy match

rapid wharf
#

How to run a loop in the value of embed (d.py) ??

earnest phoenix
vivid fulcrum
#

tldr computer trying to understand a drunk person

earnest phoenix
#

basically just tries to find the closest word to a set of words iirc

rapid wharf
earnest phoenix
#

at least that is what I was told in another server

slender thistle
#

Ahh

earnest phoenix
#

Idk why you pinging me

slender thistle
#

I never heard of it to this day

earnest phoenix
#

Yea

#

Its what a lot of websites do to find the closest match

#

when searching

vivid fulcrum
#

pretty much almost any thing that implements searching does fuzzy search

dusky lagoon
earnest phoenix
#

yep

slender thistle
#

Ahhhh, that makes sense

earnest phoenix
#

Its useful

slender thistle
earnest phoenix
#

Yea

slender thistle
#

Should note it for some day

rapid wharf
#

How to run a loop in the value of embed

earnest phoenix
#

I was going to do it for a bot I was making but im too tired to remember which bot

#

:^)

earnest phoenix
slender thistle
earnest phoenix
#

You run the loop and set the value

rapid wharf
slender thistle
#

val = ""
for _ in ...:
...
embed.add_field(name="...", value=val)

rapid wharf
slender thistle
#

Nah like

#

I remember that part

#

What are you trying to do with the data, again?

#

Oh, pages

rapid wharf
#

yes

earnest phoenix
#

Long embed

slender thistle
#

Wew

rapid wharf
#

yes, that bot send as many embeds to fit all the players, and i wanted to do the same in pages

slender thistle
#

I'd suggest fitting around 15-30 players in one page

rapid wharf
#

ya

slender thistle
#

Your query is a list, correct?

rapid wharf
#

but busy thinking who to do that

rapid wharf
slender thistle
#

Is it a list of strings?

#

or some other objects?

rapid wharf
#
@client.command()
async def test(ctx):
    ip = ''
    port = 30120
    fivem = FiveM(ip=ip, port=port)
    players = await fivem.get_players()
    server = await fivem.get_server_info()
    playername = []
    for player in players:
        playername.append(player)

    ok = Paginator(query=playername, page=1, per_page=10)
    em = discord.Embed()
    await ctx.send(embed=em)
``` This is the code
slender thistle
#

why not use fivem.get_players() directly?

rapid wharf
rapid wharf
slender thistle
#

[player.name for player in fivem.get_players()] ftw

earnest phoenix
#

you can grab what you want from it like that

slender thistle
#

Then you can just do something like '\n'.join(ok)

earnest phoenix
#

I am confused by how python works my smol brain no comprehend

remote cedar
#

Hey guys i cant install better-sqlite3

rapid wharf
remote cedar
#

Can someone help?

slender thistle
remote cedar
#

'_'

slender thistle
#

Example: [f'#{player.id} - {player.name}' for player in await fivem.get_players()]

willow mirage
#
import { Flex, Heading, Text } from '@chakra-ui/layout';
import React from 'react';

export function Header(){
    return(
        <>
            <Flex justifyContent="center" alignItems="center" h="500px">
                <Heading fontSize={{base: "3rem", lg: "4rem"}}>
                    ChĂșng tĂŽi lĂ  Noobs
                </Heading>
                <Text>
                    NhĂ  vĂŽ địch nĂ o cĆ©ng từng thua
                </Text>
            </Flex>
        </>
    )
}

export default Header

anyone has any idea make the flex to block?

#

try to create a DMchannel with the user

#

and then check if the channel exist, if not then return;

raven parcel
opal plank
remote cedar
raven parcel
scarlet lynx
#

Hi, I was wondering where I could find the rules for Discord bots

quartz kindle
scarlet lynx
#

thanks!!

snow urchin
brave tendon
#

am I dumb or what the hell comes in the one blank field

wheat mesa
#

int

#

It’s the type of val

brave tendon
#

oh god

#

wtf

#

oh god oh god how and why im dumb

fresh verge
#

How can I make it so it detects if my message contains an exact word that is in an array, like if it contains work, it goes through, but if it is worked then it doesn’t go through?

#

Javascript btw.

zenith terrace
#

message.content.includes

soft glade
#

so my friend has a rp bot all the commands are the same, she copied and paste ever command just changed a bit so the outputs are different but its only this one command that is not working there all the same commands but its only thing one that doesnt work

@client.command()
async def kiss(ctx, member: discord.Member):
  embed=discord.Embed(title=f"Oh Hmmm thank you", color=discord.Color.purple())
  embed.set_image(url=random.choice(kiss))
  await ctx.send(embed=embed)

this is the error shes getting

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 902, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 864, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: object of type 'Command' has no len()
boreal iron
shadow frigate
#

What developer commands are good to have on a public bot?

#

Such as eval, reload, restart etc

quartz kindle
#

eval is pretty much all you need

shadow frigate
#

Anything else?

#

Just some nifty stuff

quartz kindle
#

i do everything with eval

shadow frigate
#

Lmao fair enough

sudden geyser
#

real champs write their own evaluation compilers 😠

crimson vapor
#

Tim's bot is just a glorified eval command

fresh verge
lament rock
#

Invoking a command at scale is not ideal

boreal iron
#

And again break both loops if a match was found

#

I mean using find() as one liner is shorter but the same the result

#

Just one more word about that...
If you actually try to do a bad word list filter then splitting the content by whitespaces isn’t a good solution

filter: ass / content: ass bitch
ass match true

filter: ass / content: ass-bitch
ass match false

#

For that case I would replace ANY non-alphanumeric char in the content by a _ for example and split your content after by _

Then loop through your bad word list as mentioned above and inside through your splitted content array

#

That will guarantee any possible match

#

And you could go even further and replace 8 with B, 4 with A etc.

8itch or 4ss wouldn’t trigger the list as well

compact kraken
sudden geyser
#

It's best to add only what you need.

#

don't add stuff just to add it

compact kraken
#

I am using pickle module, so I cant read the data to check the commands are working or not..

sudden geyser
#

I'm more talking about commands in general

#

A lot of bots just create a bunch of irrelevant commands that aren't important to their bot because it adds more features and ship it out

slim heart
#

whats that one cool prebuilt djs command handler that a bunch of people use

long crow
#

^ I used the official discordjs guide struct, easy to understand for beginner and no need to include some other dependancy bloating the project

sudden geyser
#

There's no widely used framework I'm aware of. Most people just stick with the library and write their own handlers.

#

I had the most success with Klasa but that's crumbled to pieces.

clear marlin
#

Klasa is deprecated though,

dusky hill
#

Hello hello

sudden geyser
clear marlin
#

oo

opal plank
#

js, its commando, but its shit

slim heart
#

cap

#

terrible

opal plank
#

commando is garbage though, but you likely referring to that

#

im still in the call btw

slim heart
#

no i was talking about klasa or akairo

opal plank
#

i assumed u were on about Commando

#

that used to be the big thing for djs's command handling

slim heart
#

nah

earnest phoenix
# slim heart nah

how to get the developer badge, how many servers do you need? sry ping

forest needle
#

Isn't it discontinued?

lyric mountain
#

it is

#

not discontinued technically, made legacy

lyric mountain
#

my replay encoding api worked!

rapid wharf
#

how to add sequence number in front for player name and id
I want:
1. Aakash - 69
2. Piyush - 68
I have:
Aakash - 69
Piyush - 68
MY code til now:

 fivem = FiveM(ip=ip, port=port)
    players = await fivem.get_players()
    ohh = [f'`. {player.name} - {player.id}`' for player in players]
    await ctx.send('\n'.join(ohh))
earnest phoenix
#

[... for idx, item in enumerate(items, start=1)], idx will be the thing you're looking for

earnest phoenix
#

You're missing the point. You already got the list comprehension, just make use of enumerate

rapid wharf
#

how to fix

pale vessel
#

Look at the code norizon sent and compare it with yours

rapid wharf
earnest phoenix
#

Did you copy-paste someone's code? I assumed you got an understanding of how list comprehension works

#

Here's another example, ```py

items = ["item1", "item2"]
'\n'.join(f"{idx}. {item}" for idx, item in enumerate(items, start=1))
'1. item1\n2. item2'

rapid wharf
#

I got it, thank you Norizon topggThumbsUp

rocky hearth
#

what does the git+ mean in the url here, in package.json file?

willow mirage
#

anyone know how I can center this shit?

#
<Flex p={2} display={{base: "none", sm: "flex"}} backgroundColor="blue.800" justifyContent="space-between" alignItems="center">
    <Box>
        {userData ? <UserData props={userData}/> : <Heading ml={4} color="black">Noobs</Heading>}
    </Box>
    <Box>
        <Button colorScheme="grey">
            Home
        </Button>
        <Button colorScheme="grey">
            Lịch sử
        </Button>
        <Button colorScheme="grey">
            ChĂșng tĂŽi
        </Button>
    </Box>
    <Box mr="3rem">
        {userData ? 
            <Button variant="outline" colorScheme="red" onClick={LogOut}> 
                ThoĂĄt 
            </Button> : 
            <Link href="http://localhost:3001/api/auth/discord" _hover={null}>
                <Button variant="outline" colorScheme="green">
                    Đăng nháș­p
                </Button>
            </Link>
        }
    </Box>
</Flex>
lavish bramble
#
const {MessageEmbed} = require("discord.js")
module.exports = {
  name: "nowplaying",
  aliases: ["np", "song"],
  description: "show which song is playing",
 async execute(client, message, args){
if(!message.member.voice.channel) return message.channel.send("**You must be in voice channel to use this command**")
        const queue = client.distube.getQueue(message)
        if (!queue) return message.channel.send(`**There is nothing playing!**`)
        
        const m = new MessageEmbed()
        .setTitle("Now Playing !")
        .setDescription(`Now Playing: ${queue.songs[0].name}\n\nNext: ${queue.songs[1].name ? "none" : "none"}`)
        .setColor("RANDOM")
        .setFooter(message.author.username, message.author.displayAvatarURL())
        .setTimestamp()
        message.channel.send(m)
        console.log(queue)
        }
}```
I wanna to do like if there 2 song then its name otherwise none
Error: name is not defined
#

queue.songs[1].name is undefined

lusty quest
#

use optional chaining, if you are running node 14+

lavish bramble
#

I'm using repl

lusty quest
#

also what name is undefined?

lavish bramble
#

Song name

lusty quest
#

you know what you do right? bcs even if the song name is valid it will write none

#

value ? true : false this is how it works

lavish bramble
#

Hmm I'm first time doing like this

lusty quest
#

you could try the following:
${queue.songs[1]?.name ? queue.songs[1].name : "none"}

lavish bramble
#

Ok

lusty quest
#

if it errors out bcs of the ? in the value than you dont have node 14

lavish bramble
#

Why there are 2 ?

#

I have an error unexpected token '.'

rocky hearth
lusty quest
#

like i said only works in V14+

willow mirage
lusty quest
lavish bramble
#

Ok

#

Working thnx

willow mirage
#

@rocky hearth not work

#

.-.

rocky hearth
#

not the center Box, I said

willow mirage
#

the left and the right one

rocky hearth
#

show code

willow mirage
rocky hearth
#

try self center the middle box, and right 0 to right box

stiff lynx
#

Idk what happened, but everytime i use a command it works 2 times

earnest phoenix
#

How da heck does sass work

#

đŸ˜©

willow mirage
rocky hearth
#

yes

willow mirage
rocky hearth
#

yes. Also add relative to Flex

willow mirage
umbral lake
#

when I console user.flags
I have this: UserFlags { bitfield: 256 }
but what is it?

willow mirage
#

to convert it to a readable format

umbral lake
#

thx and

#

@willow mirage how to detect if user has nitro?

#

and boost?

willow mirage
#

wait lemme google it

willow mirage
#

you can see if the member boosted the server

#

but not if they own a nitro

umbral lake
#

oh

rocky hearth
willow mirage
#

wait wdym

rocky hearth
#

oh sory wrong reply, Im asking Chadoxi

lusty quest
stiff lynx
#

because now stopped

lusty quest
#

possible

dusky lagoon
#

When using embed pages i keep getting the error (node:51044) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions

#
var pages = [
        Information,
        queueplayers,

    ];
    var author = message.author;

    message.channel.send(pages[0]).then( async message => {
        await message.react('◀');
        await message.react('▶');

        var collector = message.createReactionCollector(
            
            // only collect left and right arrow reactions from the message author
            (reaction, user) => ['◀', '▶'].includes(reaction.emoji.name) && user.id === author.id,
            // time out after a minute
            { time: 600000 }
        )
        let currentIndex = 0
        collector.on('collect', reaction => {
            reaction.users.remove(author.id)
            reaction.emoji.name === '◀' ? currentIndex -= 1 : currentIndex += 1;
            if (currentIndex < 0) {
                currentIndex += 1;
            }
            if (currentIndex + 1 > pages.length) {
                currentIndex -= 1;
            }

          
            // edit message with new embed
            message.edit(pages[currentIndex]);
            ```
willow mirage
#

it is says

#

MISSING PERMISSIONS

dusky lagoon
#

its not a server permission problem

#

already checked

willow mirage
#

...

#

check if the bot has permission to react emojis

#

or just simple give the bot ADMINISTRATOR

#

@rocky hearth stackoverflow is tha best bro

#

we forgot the right and left attribute

#

we have to make it to 0

#

lmaoo

rocky hearth
#

left 0 is not necessary I think, for left box

willow mirage
#

ah yeah

willow mirage
#

either it will appers in center

#

cause you have to justifContnet to center

rocky hearth
#

ooh, yeah. 👍

willow mirage
#

not space-between

stiff lynx
#

Can I put the customized status of my discord account with my bot?

vivid fulcrum
#

no

lusty quest
summer torrent
umbral lake
#

Hey

#

I have a question

#

a bot can read a pastebin url?

#

and take a random line?

near stratus
umbral lake
#

thx

near stratus
#

BTW were anyone else having problem logging in with Discord's api yesterday ?

pale vessel
#

Yes

#

Lots of bots were down

earnest phoenix
#

Indeed

#

Couldn't code yesterday

#

:c

near stratus
#

I thought it was just me so I regenerated my token 5 times last night

earnest phoenix
#

How would I collect a response using a collector?

Like, if they type a response like so:

x/bug
---
Q: What bug have you found?
A: *says ab the bug*

How would I collect the Answer to then put it in a final embed?

near stratus
#

try using .awaitMessages

earnest phoenix
#

Yeah djs, I just want it to show like after they answer the question, it per say, logs the question in the final embed.

near stratus
#

Like

const filter = m => m.content.startsWith('a:');
message.channel.send("What bug have you found?").then(() => {
	message.channel.awaitMessages(filter, { max: 1, time: 10000, errors: ['time'] })
		.then(collected => {
			message.channel.send(`${collected.first().author} thanks for reporting the bug`)
        }).catch(collected => {
			message.channel.send('I can't wait any longer, bye');
        });
});
#

not spoonfeeding btw

#

this is from the docs

#

(almost)

#

@earnest phoenix

kind thicket
#

heya, I am trying to remove an Object from an Array with Mongoose but havent been able to do so

My current code:

await tickets.updateOne({ Guild: message.guild.id }, {
            $pull: {
                Info: [{
                    Message: args[0]
                }]
            }
        });```

What the data looks like:
```json
Guild: "848841943021518848"
Info: 
  0:
    Category: "848841943021518849"
    Channel: "848841943021518851"
    Role: "849339697431576627"
    Message: "850307111170474026"```
earnest phoenix
#

hm, well, what I wanted was multiple questions @near stratus , such as the bot asks questions and the user answers them, then at the end the bot will say: Any other information if no, the bot will send a embed with the Questions and Answers.

lusty quest
#

info.$.message:

kind thicket
#

ah, thanks, dont know how i didn't see that

earnest phoenix
#

im deciding a layout for my website
is this good?
(and no it doesnt have to be mobile friendly)

/----------------------------------\
|              navbar              |
\----------------------------------/
/---\ /----------------------------\
|   | |           main             |
| m | |           shit             |
| e | \----------------------------/
| n | /----------------------------\
| u | |           other            |
|   | |           shit             |
\---/ \----------------------------/
/----------------------------------\
|              footer              |
\----------------------------------/
gilded ice
earnest phoenix
#

a visual slash command generator

#

For a tag bot other then author, description and title what else would I need to store? đŸ€”

pure lion
#

on a database?

earnest phoenix
#

What is confusing

pure lion
#

that should be fine

earnest phoenix
#

With a collector....

cinder patio
#

The end event gives you a collection with all the collected messages

earnest phoenix
#

as well as the collected event

#

gives you the currently collected messages

hexed vortex
earnest phoenix
#

st!

vivid fulcrum
#

well, it isn't

gilded ice
#

Just define app ezpz

hexed vortex
hexed vortex
vivid fulcrum
#

you didn't define app anywhere in your code

#

it doesn't exist

hexed vortex
vivid fulcrum
#

đŸ€·

#

your code

#

however

#

if you're asking me whether you should use const or let

#

use const because it doesn't need to change its value or type

cinder patio
#

also, in general, what are you doing

#

you haven't used app at all

#

only for starting the server

hexed vortex
#

So what IS My problem with the code?

#

now it says,

quartz kindle
#

you said you were switching servers?

#

from where to where?

hexed vortex
quartz kindle
#

and thats exactly the same code you had before ?

hexed vortex
quartz kindle
#

it seems like you removed some things tho

#

or did you add the app part?

#

did you copy the app code from somewhere?

hexed vortex
#

yes there is app

#

but now its saying core.require is not a function

#

ITS NOT EVEN IN MY CODE

quartz kindle
#

if you made it all, then you should know how the app part works, but its missing things in your code

#

thats why im asking, where did you get this app code from, or where did you learn it from

#

so i can show you whats missing

earnest phoenix
#

can someone send a code for a ticket panel?

#

mine isn't working

sudden geyser
#

Try to fix it

earnest phoenix
#

I don't know how

quartz kindle
#

we can try helping you fix it, but we wont give you code

hexed vortex
#

here is my code

#

i just need to know why this is happening

#

i had no errors on vsc

quartz kindle
#

your app part is still very wrong

hexed vortex
quartz kindle
#

hence i'll keep asking, where did you learn how to do the app part

earnest phoenix
#

What is wrong with the app?

hexed vortex
earnest phoenix
#

looks fine to me

quartz kindle
#

you defined it very wrong, exactly how a person who has no idea what hes doing would do

#

thats why im asking

earnest phoenix
#

Tim how is it defined wrong

#

app is a micro framework for a webserver

quartz kindle
#

the app variable is being used as an http router, similarly to how express.js apps do. there is no app package

#

it has to come from express or similar

earnest phoenix
quartz kindle
#

which is nowhere to be found

earnest phoenix
#

There is tho

#

:^)

vivid fulcrum
#

very modern

earnest phoenix
#

Indeed

digital ibex
#

lmao

earnest phoenix
#

I don't recommend using it

quartz kindle
#

and still using it wrong

earnest phoenix
#

but it exists

quartz kindle
#

hence he has no idea what hes doing

earnest phoenix
#

use express

#

instead

#

like tim suggested

blazing portal
#

yeah, use express and have a look at their guides

quartz kindle
#

he probably did copy the code from an express tutorial or something, but removed the dependency part

earnest phoenix
#

Sounds about right tbh

quartz kindle
#

and is refusing to tell us where he got the code from so we can explain whats missing

earnest phoenix
#

I mean at this point he just needs to sit down and read a javascript book or tutorial

#

:^)

vivid fulcrum
#

quality code

#

yandere dev, is that you?

earnest phoenix
#

Shhh

#

Don't be rude :^)

#

Comparing even his skill level to yandere dev is an insult

hexed vortex
vivid fulcrum
#

they're more than likely a kid

#

younger than 13

#

🚓

hexed vortex
earnest phoenix
#

Its the code you sent tho

hexed vortex
vivid fulcrum
#

oh boy

quartz kindle
#

so it is using express

#

you have no express in your code

#

notice how your code does not have this part at all

blazing portal
#

boy oh boy, how does a video like this have >50k clicks... I should become a youtuber 😄

quartz kindle
#

you removed that part

earnest phoenix
#

If you want the most efficient way to keep your bot online then buy a vps and use pm2

vivid fulcrum
#

with free hosting obviously

blazing portal
#

yeah VPS way too expensive 😛

earnest phoenix
#

No its not

vivid fulcrum
#

it was sarcasm

earnest phoenix
#

Okay I really can't tell

#

My brain is processing at 1%

blazing portal
#

fair enough 😄 yes it was sarcasm indeed^^

vivid fulcrum
#

also

#

pm2 is bloat

earnest phoenix
#

you could use forever

vivid fulcrum
#

just use screen/tmux with a cron job

earnest phoenix
#

but pm2 is better

hexed vortex
earnest phoenix
#

Using a screen can get complicated if you don't know how it works

hexed vortex
#

brb

sick agate
#

İf you use node thats easier

quartz kindle
#

we cant help you at all if you give us the wrong code lol

earnest phoenix
#

which is why pm2 is preferred

vivid fulcrum
#

performance vs ease of use

#

gotta pay one to get the other

earnest phoenix
#

pm2 isn't even that bad...

#

Idk what you mean by bloated

#

it doesn't effect anything really

#

all it does is run your project

#

lmfao

vivid fulcrum
#

it runs on node

blazing portal
#

I never heard pm2 was bloated either... But I'm happy to learn, do you have some kind of source for that? 🙂

sick agate
#

Yes it does

lusty quest
#

you have to install the logrotate module for pm2 or you wonder why you run out of disk space after a week

vivid fulcrum
#

which obviously costs wayyyyyy more resources than a simple cpp app

earnest phoenix
#

What

#

You legit just run the main file with it

#

it doesn't effect much of anything.

#

And the resources it takes is very few

lusty quest
#

node got a fairly large overhead

earnest phoenix
#

I haven't had any issue with resources

lusty quest
#

like 30mb ram alone for node itself

vivid fulcrum
#

what superbrain is talking about

earnest phoenix
#

I don't even go over like 100mb using my project at a time

hexed vortex
#

there brb

quartz kindle
#

yeah but its 30mb for the entire pm2 process, not 30mb per app running

earnest phoenix
#

^

lusty quest
#

still 30mb you cant use for something else

earnest phoenix
#

What are you going to use 30mb on

blazing portal
#

Idk, i guess that's up to preference, I'm happy to "pay" 30mb of ram for easier process management, but if you don't that's fair too

lusty quest
#

caching stuff

quartz kindle
#

if you're working on an 100mb ram server then yeah dont use pm2

earnest phoenix
#

why buy a 100mb server to begin with

#

:^)

quartz kindle
#

there are plenty of "discord bot hosting" out there that give you 100mb

earnest phoenix
#

Seems pointless

lusty quest
#

the biggest issue is partially js itself, any compiled language can outperform it easly

earnest phoenix
#

Well no shit

#

JS was mainly made for the browser

blazing portal
#

we should all go back to machine code 😄

lusty quest
#

but the downsite is that most compiled languages are a bit harder to get the hang on than js or py

earnest phoenix
#

JS was originally made for the browser

quartz kindle
#

these days its not even js anymore, its v8 that does everything

earnest phoenix
#

Until Nodejs came along and brought in a bunch of new stuff on it

quartz kindle
#

so people should really be comparing v8 to other langs

hexed vortex
#

ok

quartz kindle
#

v8 vs py

hexed vortex
#

im back

earnest phoenix
#

I prefer TS over normal JS anyway

lusty quest
#

TS is a nightmare

earnest phoenix
#

it is just by far better

quartz kindle
#

ts is indeed a nightmare

#

lmao

earnest phoenix
#

It is

#

But it is also hella nice

hexed vortex
blazing portal
#

TBone, your new code is different, but the issues Tim described are still exactly the same

vivid fulcrum
#

i'll always use js//node for UI related stuff (desktop apps, frontend websites, etc)

#

but other than that

#

it falls flat in performance

earnest phoenix
#

Type safety, decorators, generics, error catching for most situations before run time and a lot of other stuff

lusty quest
#

js is really good frontend, but if you want performance get a backend that is not js or py

quartz kindle
#

node 16 is almost as fast as java

earnest phoenix
#

Imagine using java over kotlin

#

:^)

quartz kindle
#

theres little reason these days to complain about js performance anymore

earnest phoenix
#

I don't like how java syntax is

blazing portal
#

yeah node has improved alot and still does

earnest phoenix
#

It is clunky

lusty quest
#

if js would be able to easy multithread stuff it would be really good

#

sure there are worker threads but this is some weird middle way

earnest phoenix
#

can java even easily multithread shit

#

JS's performance is almost equivalent to C++, it has improved a lot

vivid fulcrum
#

doubt it

earnest phoenix
#

If java could multithread shit easily

hexed vortex
earnest phoenix
#

mc wouldn't be so shit on fps

#

:^)

quartz kindle
#

even after i showed you what was wrong

#

...

blazing portal
#

I wouldn't say its performance its almost equivalent to c++, but it's definetly catching up

earnest phoenix
#

Idk man

lusty quest
hexed vortex
crimson vapor
#

its not really that close to c++

quartz kindle
quartz kindle
slender thistle
#

Poor Tim

earnest phoenix
hexed vortex
earnest phoenix
quartz kindle
hexed vortex
#

ok

quartz kindle
#

can you not see clearly that the video is using EXPRESS

#

and not APP

earnest phoenix
#

app is the definition of express()

quartz kindle
#

the app variable is part of EXPRESS

#

the video tells you to install EXPRESS

earnest phoenix
#

not some 10 year old module

#

:^)

hexed vortex
#

well someone told me that im not using express anywhere in the code so it was pointless

vivid fulcrum
#

*not copied btw

#

totally not

earnest phoenix
#

They stated they copied that part

quartz kindle
earnest phoenix
#

The rest is apparently theirs

quartz kindle
#

if you remove express, then remove app as well

crimson vapor
#

gotta define app ¯_(ツ)_/¯

earnest phoenix
#

What is the point of using express to keep your bot alive

quartz kindle
#

and core.require is not something you install

crimson vapor
#

uptime robot

earnest phoenix
#

don't you have to run the express app forever as well?

slender thistle
#

repl with uptimerobot

earnest phoenix
#

I see

#

ew

vivid fulcrum
#

(which is against their tos)

blazing portal
#

if(undefined) define()

earnest phoenix
#

isn't doing that against repl tos

slender thistle
#

it's not

earnest phoenix
#

I swore it was

quartz kindle
#

glitch forbid it, replit didnt

vivid fulcrum
earnest phoenix
#

ah

slender thistle
#

Repl.it actually sort of encourage it and are clear about it

earnest phoenix
#

shiv you should make a language off of py

slender thistle
quartz kindle
slender thistle
#

Oh God forbid I implement a language in Python

earnest phoenix
#

:^)

slender thistle
#

Interpreted language in an interpreted language

earnest phoenix
#

Make it called shivy

#

kekw

slender thistle
#

shipy

earnest phoenix
#

oooo shipy

slender thistle
#

ezpz

earnest phoenix
#

Do it no balls

hexed vortex
#

omfg im gonna punch that person, the bot just came online because of express, the person who told me i dont need express im gonna KILL!

blazing portal
#

I'm pretty sure you were told that not using express was the problem...

earnest phoenix
vivid fulcrum
#

why are you blaming other people for your incompetence lol

crimson vapor
#

well you don't really need it

#

you just want it

earnest phoenix
#

if they want 24/7 uptime they do

lusty quest
#

heard of it a while ago, but didnt really looked into it

earnest phoenix
#

Its cool

#

If you like java i'd look into it

#

and I mean you gotta really like java

#

:^)

#

It is a MC server that introduces multi threading but theres a catch

slender thistle
earnest phoenix
#

You gotta program everything yourself

earnest phoenix
vivid fulcrum
#

mc is so tricky because the entirety of the code is trash built on top of more trash

earnest phoenix
#

No

vivid fulcrum
#

it wasn't made with multithreading in mind

earnest phoenix
#

They don't use any code from MC

#

Its their own API

vivid fulcrum
#

oh

#

interesting

earnest phoenix
#

They pretty much said fuck mc but ima make a server for it

vivid fulcrum
#

still though

earnest phoenix
#

but thing is you gotta program all the functionality yourself

#

They give you an inventory system and thats it iirc

vivid fulcrum
#

you still have to send packets sequentially though ig

earnest phoenix
#

Yea

stiff lynx
#

wich feature can be added with a premium version?

earnest phoenix
#

But its sick

#

I was thinking of taking a stab at it

vivid fulcrum
#

don't make a premium version of your bot

stiff lynx
#

because I have no idea

stiff lynx
vivid fulcrum
#

your own funding

earnest phoenix
#

Only make premium when you get enough members and the cost of your vps is getting too high

vivid fulcrum
#

this

#

nobody will buy premium on your bot because your bot isn't popular and it isn't anything new or special

earnest phoenix
#

Never prematurely introduce premium

lusty quest
#

or use some fair monetisation model, locking stuff behind paywalls will kill your bot

earnest phoenix
#

same with vote locking

#

Don't votelock its bad

vivid fulcrum
#

if you really want donations, promote your kofi

stiff lynx
#

I'm just asking 😩

vivid fulcrum
#

or somthing in that context

earnest phoenix
#

but don't force it ^^

#

We know

#

we are giving you advice

stiff lynx
earnest phoenix
#

Prematurely introducing premium shit will kill your bot off and make it unpopular

vivid fulcrum
earnest phoenix
#

kofi is a way to accept donations for creators.

#

and apparently no fees

#

I might sign up for it

stiff lynx
#

and how I can take the money from it?

#

paypal?

earnest phoenix
#

It gets put into your paypal iirc

stiff lynx
#

oh, not bad

#

bcs paypal began trash

#

u have to pay fees for everything

vivid fulcrum
#

i mean

#

there's only really a conversion fee and a provision fee

#

and the provision fee has a limit

stiff lynx
#

no one will pay for my bot lol

#

neither donations

vivid fulcrum
#

đŸ€·â€â™‚ïž

stiff lynx
#

the people that I know will never pay anything for a discord bot

vivid fulcrum
#

get a cheap VPS and earn money other ways

stiff lynx
#

add ads 👀

vivid fulcrum
#

do commission work, freelance etc.

#

most countries allow you to also start working from 15/16

stiff lynx
vivid fulcrum
#

i don't understand what you mean by that

stiff lynx
vivid fulcrum
#

you can also find contracts for temp jobs

#

i had a contract with a software company in my town as a temp job

#

20hr a week

stiff lynx
stiff lynx
vivid fulcrum
#

croatia

#

i'm assuming you mean platform

stiff lynx
#

I live in Italy

vivid fulcrum
#

but yes, the gist of it is the same

stiff lynx
#

here u have to do the university for not getting exploited

#

and I hate this

#

because I love coding, but idk why I'm obliged to do something

#

like exams in how a computer is made, yes, is very interesting, but it's a trash cours

#

bcs in coding they teach you how to do sums

austere talon
#

what are those buttons? :o

crimson vapor
#

they added buttons to interactions

austere talon
#

is there any documentation to it already?

umbral zealot
#

depends on the library you're using

austere talon
near stratus
near stratus
#

b r u h

earnest phoenix
#

Not that specific code lmao.

#

But the general concept of what you were explaining.

austere talon
cinder patio
#

mhm

stiff lynx
#

DiscordAPIError: 405: Method Not AllowedWhat is this?

slender thistle
#

The request method you sent is not supported by the server

feral aspen
#

I've seen people do somethnig like bot.ok.sheesh.whatever.. idk, some function they created, is that possible?

#

Do I do something like ```js
bot.hi = () => { console.log("Oof") };

earnest phoenix
#

that does create a function yes

boreal iron
#

Make sure to not overwrite existing ones by choosing an already existign property name.

feral aspen
#

I add those functions to my index.js, right?

boreal iron
#

You can add them anywhere as long as you pass the client/bot var, too

#

Creating a new client in any other file for example will of course not store the property
It's the same like creating a whole new var.

rocky hearth
#

I had just created a npm account and trying to publish a package with yarn.
which is giving me this error

#

do I hv to wait, 1day, before publishing?

balmy turret
#

not seen it before, just randomly started

opal plank
balmy turret
#

ahh right oke

opal plank
#

that was the last implemented permission flag that i recall

balmy turret
#

I updated it, still getting same y_tho

hexed vortex
#

this channel = dead

balmy turret
#

fixed it anyways

#

ty for help @opal plank

mental raven
#

Can I use Slash commands in a non verified bot?

pale vessel
#

yes

#

why not?

mental raven
#

Because I can't make mine work

hexed vortex
#

Hello, so i have a synax error (i think thats how u say it) with logging in to the bot. The error says its an unexpected end of input and this is what i put

client.login(process.env.token)

i made a secret because im using repl.it and the value was my bot token the name was token. i was making a purge/clear command.

slender thistle
#

posting the error wou;d be really appreciated

earnest phoenix
#

cmon shiv you can fix it without the error

#

;)

#

you smart remember

slender thistle
#

I read minds

#

I'm eating icecream so my power is twice as powerful

earnest phoenix
slender thistle
#

tru

rocky hearth
#

to update a readme for a package on npm, do I hv to publish a new version?

#

or can i jusst update the readme file?

rocky hearth
#

hmm, y though. That's not good imo

sudden geyser
#

That's how commits work

#

The same goes for versioning

#

Once you commit, consider it sealed and immutable

#

So if you want to release a new version, just bump the minor or patch version

#

If you could, it would compromise the integrity of a commit. Even something as harmless as a plain text file

marble crescent
#

I want make logs

hot sage
#

why is this showing as a syntax error?

#

oh wait

#

nvm

#

how can i make it so that only people with specific permissions can run a command?

#

python btw

earnest phoenix
#

detect if the user has the permissions and only run the command if they have it

earnest phoenix
#

i dont know python

hot sage
#

o

#

ok

weary crypt
hot sage
#

ok

weary crypt
#

Also use google/read the docs.

hot sage
#

ok

weary crypt
#

I dont know python, but all wrappers seem to follow the same layout.

hot sage
#

true

sterile lantern
#

how do you set the icon of the website (the little globe) i forgot how 2 do that

vivid fulcrum
#

serve a favicon.png

sterile lantern
#

ic

vivid fulcrum
#

read a bit down

#

there's a sample for a favicon

hot sage
#

i found the thing i needed

slender thistle
hot sage
#

i tried to run this code

#

and i got these errors

slender thistle
#

No spaces and wtf are those indents

#

commands.has_permissions not commands. has_permissions

hot sage
#

o

#

ok

slender thistle
#

If you want None, set the default value to None

#

Literally just that, None

hot sage
#

ok

slender thistle
#

member typehint is discord.Member not discord.member

#

Dedent your keep_alive function

hot sage
#

ok

#

everything else worked but i got this error

slender thistle
#

os.getenv("TOKEN") returned None

hot sage
#

i forgot to add the token smh

slender thistle
#

Kekw

hot sage
#

now it is working ty

#

i have done that to many times, and i have just started recently

sick agate
#

ok

split hazel
#

i'm not too big on typescript so is there a way to import a typescript definition file in jsdoc?

hot sage
#

Ik I'm an idiot topggVeld

woeful pike
#

switch to typescript and save yourself the headache

#

import('library') should work in jsdoc tho

earnest phoenix
#

^

rocky hearth
#

for djs, in what cases, message.member would be null?

slender thistle
#

DMs

sage bobcat
#

One message removed from a suspended account.

lavish bramble
slender thistle
#

member intent not enabled (iirc)

rocky hearth
#

hmm, ok thanks

sage bobcat
#

One message removed from a suspended account.

rocky hearth
#

@lavish bramble

slender thistle
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lavish bramble
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

summer torrent
#

oh nvm thats prince's question

reef dragon
#

how to use owo?

sterile lantern
#

how do i make these allign (the headers)

near stratus
near stratus
#

use text-align I guess

sterile lantern
#

so basically the S and C are in the same position

#

aka center

#

well tbh idk if its considered center

#

nvm probably is

near stratus
#

nvm

rocky hearth
#

for reactioncollector, when dispose event is fired?

near stratus
sterile lantern
#
<div class="container">
            <div class="section-heading">```
#

i want

#

the words to move over there

#

so like the C and S are in the same place

#

also what are the cause of these lines? i dont see anything that cause them

near stratus
#

If that doesn't work no need to ping me. I wish someone else will help. (I'm going to sleep now good night)

sterile lantern
#

alr

sterile lantern
#

I Fixed the socialmedia and contact thing i just needed <div class="row">

#

but how do i remove those annoying lines??

#

nd why do i have so many of them

#

đŸ˜©

dusky lagoon
#

whats the diiferents between a api and a fetch data .json file

#

like are they the same thing?? because they do have the same perpose (some of them tho)

lyric mountain
#

fetching data from a json is just a simple local file access

#

for example, I have a reaction api, I can call it anytime I want to get a random reaction gif

#

while this could be possible using a json file, I would be constrained by where I am accessing from

dusky lagoon
lyric mountain
#

a json file is just a normal text file

#

it can't do anything on itself besides being there

sterile lantern
dusky lagoon
lyric mountain
#

?

#

that's an api not a json file

dusky lagoon
#

ohw

#

well it says .json thats why i was confused

lyric mountain
#

that's because it returns json as a file instead of a request body

#

but in both cases it ain't a json that updates itself, it's a content returned by the server itself

#

the value gets changed everytime you hit refresh

#

to keep it simple:

  • if it's data returned by a remote server = it's an API endpoint
  • if it's an static file somewhere in your own machine = it's a JSON file
#

former can be dynamic, latter can't

rocky hearth
#

in what cases client.user would be null?

#

imo, it shouldn't be, coz the client should always be in the cache

earnest phoenix
#

If it isn't ready

#

If bot isn't ready

sterile lantern
#

whenever i use the <p> element, i get a little line under this. any ideas why? im thinking its probs from the css

earnest phoenix
#

client.user will ofc be null

rocky hearth
#

hmm k

hot sage
#

how can i make this work

latent heron
#

i have a good feeling you don't know how to write discord.py

earnest phoenix
#

what’s python anyway

hot sage
#

I'm new to coding, but I want it to send an embed, saying User banned after it bans them

earnest phoenix
#

You didn’t even close off the thing

hot sage