#development

1 messages · Page 1846 of 1

digital ibex
#

file is confusing to send so i haven't got to that yet

rose warren
pale vessel
#

that's all you need to do

rose warren
#

Yeah but that's two requests

outer perch
#

ppl aren't answering in D.JS' server, gonna ask here

#

the bot isn't reacting to bot.on("messageCreate")

rose warren
#

You're going to need to show some code for us to be able to help you

outer perch
#

no problem

#

intents are there

#

and the bot is working before messageCreate events, but if I try to work with anything inside this event handler, nothing comes out, not even a console.log

#

I guess there isn't any code to be shown tbh

#

just the intents xD

#

new Client({ allowedMentions: { parse: ['users', 'roles'], repliedUser: true }, intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS] });

#

I'm starting the event handler like this bot.on('messageCreate', async message => {

#

forget about it, I've been testing and found out what the problem was

#

it actually detects messages

#

fully workin' 😉

cold ruin
#

how can i add the hearbeat animation using css

dense flame
#

I know a library that can do that

cold ruin
dense flame
#

Hm

cold ruin
#

i dont think this would work

dense flame
#

yea

#

it may not

cold ruin
#

i did try this css .titleandvote > a:first-child .votebutton { animation: heartbeat 1.5s infinite; }

#

but doesnt seem to work

vivid fulcrum
#

because the css doesn't know what heartbeat is

cold ruin
cold ruin
#

then i put that code in this?

#

inside .titleandvote > a:first-child .votebutton {}

vivid fulcrum
#

copy paste the keyframes

cold ruin
#

i dont really understand

vivid fulcrum
#

...you don't have to

#

literally just click on copy code

cold ruin
#

ok

#

then?

#

where do i have to put it

#

i copied css .heartbeat { -webkit-animation: heartbeat 1.5s ease-in-out infinite both; animation: heartbeat 1.5s ease-in-out infinite both; }

cold ruin
vivid fulcrum
cold ruin
#

yeah

#

ik

vivid fulcrum
#

you need the keyframes too though

cold ruin
#

thanks

cold ruin
vivid fulcrum
#

...copy the keyframes

cold ruin
#

oh

#

just saw the code for keyframes

brazen gate
#

Why not found

cold ruin
#

how do we kow

#

you havent given any code/info

cold ruin
#

this is my code

opaque seal
#

If I need to save some files for each user should I assign each file an ID and handle everything with IDs or should I instead just use file names directly?

brazen gate
pulsar spade
brazen gate
#

i use the kick command and console show me like the image that i post

opaque seal
#

That's your issue

#

why are you iterating over the guilds

pulsar spade
#

@opaque seal What should do?

opaque seal
#

what do you wanna do?

cold ruin
earnest phoenix
opaque seal
earnest phoenix
# opaque seal any specific reason why?

The reason being performance regressions and concerns, such as a case where you have to look for documents/data of a specific user or whatever and you'd have you look through every single assigned ID to find them and do whatever, but as I said, if you're working with file names this should be really simple and better performance-wise

opaque seal
pulsar spade
#

@opaque seal I mean how can I get client guilds name without looping client.guilds?

earnest phoenix
opaque seal
#

maybe rename them too

#

and delete obv

opaque seal
earnest phoenix
#

If you're willing to give them the option to also rename the files then you're better off working with assigning IDs to the files

opaque seal
#

mh

#

k

earnest phoenix
cold ruin
#

how can i add a heartbeat animation to the invite button

#

i dont know any css

cold ruin
#

i dont know how to do on top,gg

opaque seal
cold ruin
#

i found out the animation code

near stratus
cold ruin
#

but it didnt work

opaque seal
#
<style>
Style here...
</style>
#

In the bot long description

cold ruin
pulsar spade
#

I want bot msg to new members for joining new servers, but my issue is it only showing one server and not multiple servers, like if my bot in example server1 and I am joining on example2 server but bot showing I joined on example1 server and not example2 server. How can I fix it?

cold ruin
#

i tried this

#

but this is nt working

opaque seal
#

you are missing the <style> thing

near stratus
opaque seal
cold ruin
pulsar spade
opaque seal
cold ruin
#

i jsut didnt include it in the bbin

pulsar spade
cold ruin
#

as i have a lot of code

opaque seal
cold ruin
near stratus
pulsar spade
opaque seal
cold ruin
opaque seal
near stratus
cold ruin
#

ctrl +f ?

opaque seal
cold ruin
pulsar spade
#

Not using js

cold ruin
#

how do i find the class for the invite button?

near stratus
opaque seal
#

should be this one

#

that's the vote button

cold ruin
#

may i know how you found this out

cold ruin
opaque seal
#

.entity-header__actions .entity-button--primary:first-child

#

this is the invite

cold ruin
#

oh thanks

opaque seal
#

all here

cold ruin
#

thank you so much!

pulsar spade
# near stratus Hope someone else will help you

Well no one understands question but more clearly is I just want to show new member on dm that he/she joined on that server like "welcome "Member name" you have have joined on "Server Name" in real time.

#

How to find server name?

opaque seal
#
@client.event
async def on_member_join(member):
    await member.send('You joined {}'.format(member.guild.name))
#

Haven't really used python before

#

so syntax could be wrong

pulsar spade
mild agate
#

bruh

pulsar spade
#

bruh?

near stratus
#

bruh !

pulsar spade
#

Lol

pallid jungle
#

What is the problem ?

tulip cradle
#

Growth Inorganic. Why this happens any idea?

dense flame
tulip cradle
#

I think i don't have perms

dense flame
#

Oh yea

#

Join discord devs server

tulip cradle
#

I dint joined

dense flame
tulip cradle
#

Thx

weary root
#

Hii

#

I need help

#

I cant add yt togeather feature in my bot

#

It shows many erors

#

Invalid token exit status and many more

#

Hmm

#

I have code but i cant add

#

Cofe?

#

const {MessageEmbed} = require('discord.js');
const fetch = require('node-fetch')
const {MessageButton} = require('discord-buttons')

module.exports = {
config: {
name: 'youtube-together',
aliases: ['ytt'],
category: 'fun',
description: 'Watch Youtube in a vc with your friends!',
usage: '',
},
run: async (client, message, args) => {
const channel = message.member.voice.channel

if (!channel) return message.channel.send(
new MessageEmbed()
.setTitle("You must be connected to a voice channel to use this command!")
.setColor("RED")
)

fetch(https://discord.com/api/v8/channels/${channel.id}/invites, {
method: "POST",
body: JSON.stringify({
max_age: 86400,
max_uses: 0,
target_application_id: "755600276941176913",
target_type: 2,
temporary: false,
validate: null
}),
headers: {
"Authorization": Bot ${client.token},
"Content-Type": "application/json"
}
}).then(res => res.json()).then(invite => {
if (!invite.code) return message.channel.send(
new MessageEmbed()
.setTitle("I was unable to start a yt together session! pain")
.setColor("RED")
)
const ytt = new MessageButton()
.setStyle("url")
.setLabel('Watch Youtube Together')
.setEmoji("870909668090851399")
.setURL(https://discord.com/invite/${invite.code})

message.channel.send({
buttons: [ytt],
embed: new MessageEmbed()
.setTitle('Watch Youtube Together grin')
.setDescription('Click The Button Below To Watch Youtube Together In A Voice Channelcoffee')
})
})
}
}

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

#

Gmm

#

Hmm

pallid jungle
sage bobcat
#

One message removed from a suspended account.

boreal iron
#

Is there a way to respond to an interaction with one non-ephemeral message and one ephemeral? MegaThonk

pale vessel
#

Yes, follow up messages

#

You can create an ephemeral follow-up message

boreal iron
#

Invalid command for interaction application

#

🤦‍♂️

#

fuck Discord and their new crap

wheat mesa
#

Yeah. I hate testing slash commands because I have to reload my browser client whenever I reload my commands otherwise it’ll give me that error

boreal iron
#

so fucking annoying... can't send any slash command anymore

wheat mesa
#

Reload your discord

boreal iron
#

didn't delete or edit the registered command

#

tried that already clearing the cache, different browser etc.

#

same result

wheat mesa
#

You sure you reloaded it?

pale vessel
#

I've had no problems with slash commands

#

I guess you're just unlucky

boreal iron
#

hmm reinviting the bot worked

boreal iron
pale vessel
#

It's basically another message after your initial message/response

#

You can set it to ephemeral

#

It doesn't edit your initial response though (unless you deferred it).

long crow
#

Have to disable Ecchi for now as slash command bypass channel. lolzer

pale vessel
#

I cache channels so

#

I just check the isAdult property from AniList or Hentai genre from Jikan

dire harbor
#
{
   name: "Boosting since",
   value: `${moment(member.premiumSinceTimestamp).format('Do MMM YYY') || 'Not a booster'}`, inline: true
 }```
the bot should return "not a booster" if the user is not boosting but still it returns Invalid date am i doing something wrong?
long crow
#

will still have ecchi genre for anilist even if got isAdult = false

pale vessel
#
member.premiumSinceTimestamp ? moment(member.premiumSinceTimestamp).format(...) : "Not a booster";```
pale vessel
#

I mean

#

As in it should be OK

long crow
#

well, my bot rejected on first review

pale vessel
#

The covers should be fine and all

long crow
#

because of ecchi

pale vessel
#

Darn

#

Yeah, no, isAdult is just plain NSFW

#

Aka hentai

#

Ecchi doesn't count

long crow
#

then second time, got accepted since I have to hardcode it to exclude ecchi for now

pale vessel
#

I should consider filtering ecchi shows too then

#

But that'd be a lot of good shows

long crow
#

ikr

rocky hearth
#

In vsc how do I attach a debugger in a folder called web present in my root folder

boreal iron
long crow
#

beautiful growth. I'm wondering how those got 100+ per day while I'm like 4 guilds. Lmao

boreal iron
#

Better than a verified bot in 11 server oldEyes

long crow
#

hey, at least it verified

#

haha

boreal iron
#

yeah was forced to leave all guilds before somebody told me reinviting will overwrite the permissions

#

shit happens

tulip marsh
#

help me anyone

long crow
#

update your nodejs

#

to version 16.6

tulip marsh
#

shall i go in shell ?

#

and type what ?

long crow
#

I'm guessing replit?

tulip marsh
#

i am in it only

#

shall i send u invite

#

?

#

can u fix it

#

?

long crow
#

No idea, left replit like 1 year ago, gotta ask in the server

earnest phoenix
#

Hey, Is it possible to get a channel.type in channelDelete event?

#

djs v12

hollow depot
earnest phoenix
#

Anyway thanks lol

tulip ledge
#
Error: Cannot find module '@keyv/mysql'

But @round hamletv/mysql is clearly installed:

"dependencies": {
    "@keyv/mysql": "^1.1.4",
    // More dependencies...
  },
#

ok why does that ping someone

#

that's bullshit

long crow
#

npm ls @keyv/mysql what it say?

tulip ledge
#

You know what

#

I'll just make an express server in my bot and use that to access the data

#

I couldn't be bothered

dire harbor
#

nvm i fixed it

solar cave
tulip ledge
#

?

small tangle
#

i got those goosebumps everytime i see this code LULW

weary root
#

@small tangle i replit user?

small tangle
#

what

weary root
#

U

#

Replit user

small tangle
#

wdym

weary root
#

@small tangle ?

#

Do u use replit

small tangle
#

no

long crow
weary root
#

Anyone uses replit

small tangle
#

im using my rpi

wicked pivot
#

he is having an event, but there is always that

small tangle
#

what does the console say?

wicked pivot
#

me ?

small tangle
#

ye

wicked pivot
#

nothing

earnest phoenix
#

morning

small tangle
#

show your command snippet

#

hello code how you doing AlpacaCute

wicked pivot
#
const {MessageEmbed, MessageActionRow, MessageButton} = require('discord.js')
module.exports = (message) => {
    if(message.channel.id !== "673558424025432085")return
    message.delete()
    let embed = new MessageEmbed()
        .setTitle('Le saviez vous ?')
        .setDescription("De: <@!" + message.author.id + ">\n\n" + message.content)
        .setColor(`#18F5FF`)
        .setFooter(`Oui: 0, Non: 0`)
    
    let row = new MessageActionRow()
    .addComponents(
        new MessageButton()
        .setCustomId('oui')
        .setLabel('Oui')
        .setStyle('PRIMARY'),
        new MessageButton()
        .setCustomId('non')
        .setLabel('Non')
        .setStyle('DANGER')
    )
    return message.channel.send({embeds: [embed], components: [row]});
}```

```js
if (interaction.customId == 'oui') {
            if(!yesOrNot[interaction.message.id]){
                yesOrNot[interaction.message.id] = [interaction.user.id]
            }else if(yesOrNot[interaction.message.id] && yesOrNot[interaction.message.id].includes(interaction.user.id))return
            let regex = /\d+/g;
            let string = interaction.message.embeds[0].footer.text
            let matches = string.match(regex);

            let embed = new MessageEmbed()
            .setTitle('Le saviez vous ?')
            .setDescription(interaction.message.embeds[0].description)
            .setColor(`#18F5FF`)
            .setFooter(`Oui: ${parseInt(matches[0])+1}, Non: ${parseInt(matches[1])}`)
            return bot.channels.cache.get('673558424025432085').messages.fetch(interaction.message.id).then(r => r.edit({embeds: [embed]}))
        } else if (interaction.customId == 'non') {
            if(!yesOrNot[interaction.message.id]){
                yesOrNot[interaction.message.id] = [interaction.user.id]
            }else if(yesOrNot[interaction.message.id] && yesOrNot[interaction.message.id].includes(interaction.user.id))return
            let regex = /\d+/g;
            let string = interaction.message.embeds[0].footer.text
            let matches = string.match(regex);

            let embed = new MessageEmbed()
            .setTitle('Le saviez vous ?')
            .setDescription(interaction.message.embeds[0].description)
            .setColor(`#18F5FF`)
            .setFooter(`Oui: ${parseInt(matches[0])}, Non: ${parseInt(matches[1])+1}`)
            return bot.channels.cache.get('673558424025432085').messages.fetch(interaction.message.id).then(r => r.edit({embeds: [embed]}))
        }```
earnest phoenix
small tangle
#

👀

#

you need to reply to slashcommands to acknowledge them

earnest phoenix
#

here's a polyfill for if statement

[
c => c == true,
c => (c + "")[0] != "0",
c => c.length == 0,
...
].some(test => test(condition) == true);
quartz kindle
#

what the fuck lmao

wicked pivot
#

necessarily it is not possible to make an event just to remove the error?

quartz kindle
#

a polyfill for an ES0 thing that uses an ES5 thing

small tangle
#

you should "remove" the error by implementing it the right way ASpeek

long crow
#

if you going to edit the original message, either use .update or .deferUpdate() on your interaction handler

#

the later in your case

wicked pivot
#
await interaction.reply('Pong!');
await interaction.deleteReply();```
answer and delete the answer?
small tangle
#

you dont need to delete

#

but you have to use reply or deferreply before 3 secs passed

wicked pivot
#

I want to delete it because it is a show which will contain a lot of this kind of thing if the person answers all the "surveys" it will be spam

long crow
#

there is interaction.deleteReply() too you know

tulip cradle
tulip ledge
#

Can anyone help me? net::ERR_CONNECTION_REFUSED I'm trying to connect to my api which is on localhost, code:

// Bot : Server.ts
import express = require("express");
import cors from "cors";
let authKey = "key";

const app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors());

const port = 5500;

app.get('/user/:userId/key/:key', async (req, res) => {
  // Get the data
  res.json(data);
});

app.listen(port, () => {
  console.log(`App listening at http://localhost:${port}`);
});

// Front End (react app) : User.jsx

  const getUser = async (userId) => {
    let userRes = fetch(`http://localhost:5500/user/${userId}/key/<key>`, { 
      method: "POST",
      mode: "cors",
      headers: {
        'Content-Type': 'application/json'
      }
    }).then(res => {
      console.log(res.json())
    });
tulip ledge
#

wow, I feel stupid

near stratus
tulip ledge
#

oh

#

what's the difference? x)

near stratus
#

You did

app.get

and then

method: "POST"
near stratus
wheat mesa
tulip ledge
#

alright ty

#

oh fuck

#

I feel retarded rn

near stratus
timber fractal
#

so have this code that will set someone to inactive but if they are already inactive so a schema is saved to the database it still creates a new one alltought i tried to check if there is already one, can someone help me https://srcb.in/PXYtxE8XPM

wheat mesa
#

Oh god

timber fractal
#

nvm fixed with an await

timber fractal
wheat mesa
#

Not sure if it’s because I’m on mobile but that code is not very readable

timber fractal
#

why not

wheat mesa
#

Very squished together

timber fractal
#

tested it and now it works

timber fractal
wheat mesa
#

If it’s your style, that’s what matters

#

Assuming that you’re the only one working on it that is

#

Imo using a linter like Prettier or eslint could do wonders for you though

#

Or maybe it looks fine on desktop, idk, I’m on mobile rn

timber fractal
#

what does eslint even do actually

pale vessel
#

gives you headaches

timber fractal
#

probaly it'll look kinda the same

timber fractal
#

and i hate headaches

wheat mesa
#

Personally I just use prettier

#

Ctrl+shift+F and boom my code looks nice

#

(For the most part, it’ll still fuck up some things for me)

pale vessel
#

That's tiring

#

Just format on save

timber fractal
#

well im fine with this

sudden geyser
#

which webhook

ripe kayak
#

anyone know how to animate the canvas

#

here's my code

sudden geyser
#

What language are you using

timber fractal
green kestrel
#

that doesnt look like a proper tag for an emoji

#

youre sending undefined where the id should be

#

and random colons are missing

wheat mesa
#

That’s a timestamp

#

Not an emoji

#

He’s trying to send a timestamp

#

Like <t:2774828154:R>

#

Etc

timber fractal
#

so how can i fix it

green kestrel
#

dunno, what does the code look like?

timber fractal
#

how to fix it?

#

@green kestrel did you view the code

sudden geyser
green kestrel
#

response object doesnt have a field called timestamp

timber fractal
green kestrel
#

doesnt look like it

#

in your case for some reason its not defined

#
let response = await inactiveSchema.find({userID: userID});```
can you dump the contents of this value `response` somehow and see whats in it?
timber fractal
green kestrel
#

that from within the bot, underneath that line?

#

is the value of userid youre passing in, what you think it is?

timber fractal
#

console.log(response) in the line above the sending line logs this

primal dove
split hazel
#

it's also faster since it stops at one entry

#

and for the future you'd do response[0]

#

since the response is an array

proper bolt
#

yeah response is an array so you are trying to get .timestamp on the array

#

which is undefined

timber fractal
#

thx

tulip ledge
#

Unhandled Rejection (TypeError): Cannot add property 0, object is not extensible

let columns = [];
// Some fetches to get data
let obj = {
  id: userId,
  username: tag,
  avatar,
  rank,
  createdAt: turnTimestampIntoData(userData.started),
  totalProfiles: totalProfiles
}
columns.push({...obj});
#

Alright I managed to solve it by doing this:

columns = columns.reduce((acc, current) => [acc, current], [obj]);
#

Nvm

#

it did not fix it

cinder patio
#

show more code, there's no way the error's coming from there

timber fractal
cinder patio
#

console log guildId to check if it's the correct guild id

wicked pivot
#

hello, excuse me for bothering you but I have a big problem in the rush I delete important files from my bot on my virtual machine (vps) and my pc and I have no backup I have all deleted with bitcurrency ssh so nothing in the trash help me

wicked pivot
#

nooo plz

#

at least 5 hours of work there

#

my vps and under debian isn't there a place where it could have stored things?

tulip ledge
wicked pivot
#

I have access to the eval command, help me: c

pale vessel
#

You deleted all your bot files?

wicked pivot
#

I deleted important files from the bot

#

I want to restore this or at least have its code so that I can redo each file

pale vessel
#

Require all the files in your eval and toString() them

#

I think it only works for functions though

#

You need to rely on cache at this point

wicked pivot
#

I can not require them since it does not exist any more suddenly how to do?, going through the events / command would be possible?

pale vessel
#

If you required that somewhere then it should have been cached iirc

wicked pivot
#

and how do I display it?

near stratus
#

If your eval command is in a separate file (eg eval.js)

#

then

#

Long story short
You're fucked

wicked pivot
#

:c

pale vessel
#

If you're lucky enough

pale vessel
wicked pivot
#

yes I am sure

pale vessel
#

Try evaling require.cache

#

It'll be a mess

wicked pivot
#

works

#

export the delete folder with all files

pale vessel
#

Do js console.log( Object.fromEntries( Object.entries(require.cache).filter(([K]) => !K.includes("node_modules")) ) );

#

And try requiring one of the paths

tulip ledge
# pale vessel

how do u make an owner slashcommand? Won't other people be able to see it?

pale vessel
#

They can see it unless you only create a guild command

tulip ledge
#

oh

wicked pivot
#

okay ? js .eval console.log( Object.fromEntries( Object.entries(require.cache).filter(([K]) => !K.includes("node_modules") && K.includes("/root/joe/assets/export/stats/addVoice.js")) ) );

pale vessel
#

Try requiring this

#

If it doesn't work then I dunno

#

Copy paste it

wicked pivot
#

.eval .eval console.log(
Object.fromEntries(
Object.entries(require.cache).filter(([K]) => K.includes("/root/joe/assets/export/stats/addVoice.js"))
)
); ??

pale vessel
#

Nop, just simple require("/root/joe/assets/export/stats/addVoice.js")

wicked pivot
#

I don't really understand really sorry

pale vessel
#

A

#

Oh sec

#

.eval Object.entries(require.cache).filter(([K]) => !K.includes("node_modules")).map(([, V]) => V.exports.toString())

azure ore
#

My BOT just promped this, i think it's due the music plugin, i use ytdl and have no idea where i should put the maxListeners() into, if anyone could help

pale vessel
#

It will spam the console

lyric mountain
pale vessel
#

And not all the entries will guaranteed to look like what it would be originally

#

since toString() is only effective for functions

#

You can also use JSON.stringify() for JSON

#

But we'll see if this even works

wicked pivot
#

oh damn, it works

#

thanks God

#

huge thank you you saved me 5 / 6h of work

pale vessel
#

Are all the stuff you worked on functions?

#

If so then yeah you're fine

#

Unless you exported an object

rocky hearth
#

How would you guys react if I tell you that in JS you can break out of a if block?

#

Or I say, any block.

#

Just a pair of braces

lyric mountain
#

@round cove

rocky hearth
#

Js dont hv that

lyric mountain
#

it does have

cinder patio
#

it doesn't?

#

JS has labels but not a goto statement

rocky hearth
#

😳 u accidentally gave the answer.

sterile thicket
#

Does message.guild.bans.create() keeps banning banned users as well? or does it returns an error?

cinder patio
#
if (true) stmt: {
  console.log(1);
  break stmt;
  console.log(2);
}
#

but why would you ever want to do that

rocky hearth
#

Same reason as of loops

cinder patio
#

breaking out of a for loop is very different from doing this

lyric mountain
#

but you're supposed to check before entering the if clause

cinder patio
#

with for loops you are stopping the entire loop, so the next elements will never be reached, this is basically a return except it's not really a return, you're just stopping the execution of the statements after the break

#

and it's also hard to read

rocky hearth
#

I don't know today I got to know about this and found it interesting

cinder patio
#

if you really don't want an extra pair of brackets then use self invoking functions

if (true) (() => {
console.log(1);
return;
console.log(2);
})();
quartz kindle
#

you can use labels to break out of parent blocks, otherwise it only breaks out of the current block by default

#

but at that point you might as well put it inside a function and return instead, since return breaks all blocks

cinder patio
#

labels are useful when you're using em with loops yeah

cinder patio
quartz kindle
#

xD

tired panther
#

Lol, very nested

earnest phoenix
wheat mesa
#

Administrator is 8

#

I believe there’s an enum for it in djs

#

Like Permissions.ADMINISTRATOR

#

Something like that

earnest phoenix
#

not using djs

#

so if the permissions includes an 8 the user has administrator ?

feral aspen
#

Hey, I'd like to ask a question.. so I have this function, well it is for an uptime command, and I've coded it whereas if the hours is 0, then it would now show in the return statement, but I don't think it's working the way I expected it to.. did I do something wrong?

#
const duration = ms => {
    const sec = Math.floor((ms / 1000) % 60).toString();
    const min = Math.floor((ms / (1000 * 60)) % 60).toString();
    const hrs = Math.floor((ms / (1000 * 60 * 60)) % 60).toString();
    const day = Math.floor((ms / (1000 * 60 * 60 * 24)) % 60).toString();

    return `${day.padStart(1, `0`) ? `${day.padStart(1, '0')} days, ` : ""}${hrs.padStart(2, '0') ? `${hrs.padStart(2, '0')} hours, ` : ""}${min.padStart(2, '0') ? `${min.padStart(2, '0')} minutes, ` : ""}${sec.padStart(1, '0') ? `${sec.padStart(1, '0')} seconds` : "0 seconds"}!`;
};

console.log(duration(bot.uptime)); // Final uptime code result.
earnest phoenix
#

member.username not works when i cache a user with his id

earnest phoenix
#

But member.user.username is working

wheat mesa
earnest phoenix
#

But this time if no user specified it has to cache author and this doesnt work

earnest phoenix
quartz kindle
#

you can use num & 8

lyric mountain
#

you can also convert the value to binary and see whether the fourth bit is 1 (1000 = has admin perm)

quartz kindle
#

isnt that terribly inefficient? lul

lyric mountain
#

I mean for human reading

#

like "hey I wanna see if this code includes admin (no code)"

quartz kindle
#

ah xd

earnest phoenix
#

when i log it

quartz kindle
#

yes

earnest phoenix
#

what does it actually do ?? xD

quartz kindle
#

if it returns 0, it means the permission is not enabled

#

if it returns 8 it means it is

earnest phoenix
#

The problem is... I only need to check if they have administrator. But when you have some other permissions the number still has an 8 in it

lyric mountain
#

you're mistaking things

quartz kindle
#

& 8 does a bitwise comparison

lyric mountain
#

it doesn't actually mean 8 as in the number, but 1000

quartz kindle
#

no matter what the number is, it can never have a bitwise 8 if they dont have admin

lyric mountain
#

the fourth bit is the one that represents the admin perm

earnest phoenix
#

Ah

lyric mountain
#

imagine it like a switch

#

0 is false, 1 is true

#

it returns 8 because it's returning 1000, which means 8 in decimal

#

if u wanna check other perms all u need to do is use a different bitmask

earnest phoenix
#

Sounds logical

#

But It returns 8 on servers where i don't have administrator

lyric mountain
#

@round cove

lyric mountain
earnest phoenix
#

Oauth2 guilds scope

quartz kindle
#

is there any number bigger than 2 billion?

lyric mountain
#

the actual flags

earnest phoenix
#

yes

quartz kindle
#

if so you need to use bigint

lyric mountain
#

as you can see, the fourth bit is actually false

quartz kindle
#

normal numbers only support 32 bits for bitwise comparison

#

use this instead

#

BigInt(number) & 8n

earnest phoenix
#

What does the n do ?

quartz kindle
#

its a bigint literal

#

makes js use any large number as a true number

lyric mountain
#

n = bigint

#

shitty js logic

earnest phoenix
#

Sorry if i'm asking stupid questions but i'm trying to understand what I'm pasting :)

#

oh alright

quartz kindle
#

without n, large numbers are rounded automatically in js

earnest phoenix
#

thats the first ss ?

#

Mmhh

#

still having some troubles

earnest phoenix
lyric mountain
#

that example shouldn't return 8

#

it's a small enough value

#

are u sure you're getting permissions and not id?

#

as I've shown, those are the permissions in binary

#

4th bit is 0, so no admin

boreal iron
#

There’s also a nice JS package for working with bigints incl. tons of methods for anything you need without the need to add the literal to any calculation by hand.
(and yes I know bigint in part of nodejs already)

earnest phoenix
#

My dumbass forgot to change the if statement

#

hold up

lyric mountain
lyric mountain
#

wait

earnest phoenix
#

now ejs is being difficult

lyric mountain
#

why are you comparing a bigint to string?

earnest phoenix
#

was trying something out

lyric mountain
#

also why guild.owner === true?

earnest phoenix
#

still the same when its just 8n

lyric mountain
#

just do if (guild.owner || BigInt(guild.permissions) & 8n)

earnest phoenix
#

well that worked

#

lmao

#

thanks

lyric mountain
#

guild.owner is probably returning an id or something

earnest phoenix
#

just false or true

#

so idk why i did it like that

lyric mountain
#

ah, nvm then

#

but anyway, since for JS anything is a boolean you don't need to compare a bitflag with the expected bitflag if you're masking it

#

since with a mask it'll always return either 0 or the bit

earnest phoenix
#

aight

limber mica
#

How do i check if an array is empty?

#

in js

surreal harness
limber mica
#

wait .length

#

yeay

#

yeah*

#

thx

boreal iron
#

!array.length

limber mica
pale vessel
#

it's a number

#

it's fine

boreal iron
#

Yee !array.length will check if your array is empty

How do i check if an array is empty?

#

As well as if(array.length) to check if an array isn’t empty

#

length returns an integer and 0 is false (not boolean false tho)

earnest phoenix
#

Hello yall so im doing a music bot but im getting this error.
TypeError: Cannot read property 'get' of undefined

This is the code that terminal says that faulty code is.
const serverQueue = message.client.queue.get(message.guild.id);

boreal iron
#

well queue should probably be a map or a collection if u're using djs
In your case it’s not defined

limber mica
#

someone gib me bot command ideas

#

im bored

rose warren
#

!selfban

boreal iron
split hazel
waxen snow
#

How do I put a listener for my bot?

#

Can someone help me

#

I need a code

errant flax
waxen snow
#

I hate this connection error...

errant flax
#

code?

fleet radish
#

This is sending only the file attached

#

no embed or anything

#

djs broken or what r_keka

#

btw I have messageattachment abv

low bone
#

can u show us the messageattachment code

lyric mountain
#

Damn at least take me to dinner first

tulip cradle
#
0.name[BASE_TYPE_REQUIRED]: This field is required
    at SequentialHandler.runRequest (/rbd/pnpm-volume/56561ae7-8856-4800-ac30-0bea8f35bfb4/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.js:198:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequentialHandler.queueRequest (/rbd/pnpm-volume/56561ae7-8856-4800-ac30-0bea8f35bfb4/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.js:99:20)
at async /app/index.js:41:5 {
  rawError: {
    code: 50035,
    errors: { '0': [Object] },
    message: 'Invalid Form Body'
  },
  code: 50035,
  status: 400,
  method: 'put',
  url: 'https://discord.com/api/v9/applications/876296804340228100/commands'
}
#
- Routes.applicationCommands('876296804340228146'),
long crow
#

what are you trying to tell with the error message?

wheat mesa
#

Slash commands require a name and description

opal basin
#

Is this where you ask for help with your code?

wheat mesa
#

Yes

opal basin
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Card : MonoBehavior
{
public string title;
public string cycle;
public string pack;
public int number;
public string faction;
public string type;
public string traits;

public Card()
{

}

public Card(string Title, string Cycle, string Pack, int Number, string Faction, string Type, string Traits)
{
    title = Title;
    cycle = Cycle;
    pack = Pack;
    number = Number;
    faction = Faction;
    type = Type;
    traits = Traits;
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]

public class Army:Card
{
public int cost;
public int command;
public int attack;
public int hitPoints;
public string signatureWarlord;

public army()
{

}

public Army(int Cost, int Command, int Attack, int HitPoints, string SignatureWarlord)
{
    cost = Cost;
    command = Command;
    attack = Attack;
    hitPoints = HitPoints;
    signatureWarlord = SignatureWarlord;
}

}

#

Why can't I get the army class to inherit the card class

wheat mesa
#

This is mostly related to discord bot development/web development, so you might not get a response very fast on C# unity questions, though you can still ask them here

#

I’ll take a look at it rq but my C# knowledge is sub par

opal basin
#

oh, is there a channel for c# or a server

wheat mesa
#

You could go to the official C# server, but if you have stuff specifically related to unity they’ll likely redirect you to the unity server

#

Are you getting any errors with this code?

opal basin
#

No, the Card just does not turn green after the army:card

#

so it is not seeing the Card class

wheat mesa
#

You have to include your file with a using declaration iirc

opal basin
#

okay, I'll google it. Thanks for your time. I joined the unity discord.

wheat mesa
#

Good luck!

opal basin
#

I'll need it 🙂

cold ruin
#

how can i give the invite button a border

zenith terrace
#

you can't give buttons borders

fierce quail
#

I need that 24/7 script. Please

pale vessel
#

What's the context

near stratus
feral aspen
#

Hey.

#

In my slash commands, I am not able to view all the slash commands except commands that are in one specific folder, anyone knows what could potentially caused, this?

long crow
#

You not loading all the files in other folder?

feral aspen
#
This is the slash commands handler code.
// Slash Commands
const slashload = dirs => {
    const slashcommands = readdirSync(`./src/slashcommands/${dirs}/`).filter(d => d.endsWith('.js'));
    const commandsArray = [];

    for (let file of slashcommands) {
        const slashpull = require(`../slashcommands/${dirs}/${file}`);
        bot.slashcommands.set(slashpull.config.name, slashpull);
        if (slashpull.config.aliases) slashpull.config.aliases.forEach(a => bot.slashaliases.set(a, slashpull.config.name));

        commandsArray.push(slashpull.config);

        bot.on("ready", () => {
            bot.guilds.cache.get("737011108954505267").commands.set(commandsArray);
        });
    };
};

["social", "utility"].forEach(x => slashload(x));
#

I am, though, did I do something wrong?

#

Oh wait, the ready event fires once, probably, I think it would work.

cold ruin
#

can someone share code for shine aniation

#

css

tulip marsh
#

@long crow

#

help

delicate shore
#

I cant put Ko-fi widget on my website

#
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('pgamerx', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Support Me',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>

my code

#
    at Object.draw (overlay-widget.js:34)
    at (index):7```
cold ruin
#

how can i change the buttons colors

cinder patio
#

defer>

delicate shore
pallid jungle
#
(node:14024) UnhandledPromiseRejectionWarning: TypeError: guild.iconURL is not a function
    at Object.execute (E:\C) Developing\Wolfy-NewHandler\events\guildCreate.js:9:29)
    at Client.<anonymous> (E:\C) Developing\Wolfy-NewHandler\index.js:44:83)

Events/GuildCreate.js

const Discord = require('discord.js')

module.exports = {
    name: 'guildCreate',
    execute(client, guild) {
        const join = new Discord.MessageEmbed()
        .setTitle(`${Client.user.username} added to a new server!`)
        .setColor("GREEN")
        .setThumbnail(guild.iconURL({dynamic: true, format: 'png', size: 512}))
        .setDescription(`Server Name:\n\`\`\`${guild.name}\`\`\` `)
        .setTimestamp()
        const LogChannel = Client.channels.cache.get('875612048602587146')
        LogChannel.send(join)
    }
}
delicate shore
#
Uncaught ReferenceError: kofiWidgetOverlay is not defined
    at premium:7
#

now this error
how to define things in script tag

earnest phoenix
pallid jungle
earnest phoenix
#

?

delicate shore
earnest phoenix
#

No

#

They are passing the wrong value to the execute command

delicate shore
#

okay

#
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('pgamerx', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Support me',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>

Uncaught ReferenceError: kofiWidgetOverlay is not defined

#

anyone know what to do?

feral aspen
delicate shore
#

yes I get that

#

but how should I define it

#

with what value

cinder patio
#

Never used kofi, so I dunno

earnest phoenix
#

How do i check if bot cant send message to user

cinder patio
#

send it and catch the error

feral aspen
#

Is const [cc] = args; same as const cc = args[0];?

errant flax
#

how do i get utc time in javascript?

summer torrent
summer torrent
worthy ivy
#

hey, does anyone have any experience with like

#

pagination in javascript?

#

send help

#

i have like a queue command which i want to make a pagination thingy possible with buttons

#

my "prototype" code right now is this

            let a = 0
            let b = 10            
            const embed = new Discord.MessageEmbed()
            .setTitle(`Current Queue for ${message.guild.name}`)
            .setDescription(`${queue.songs.map( (song, id) => `**${id ? id : 'Playing'}**. ${song.name} - \`${song.formattedDuration}\``,).splice(a, b).join('\n')}`)

            const row = new Discord.MessageActionRow()
            .addComponents(
                new Discord.MessageButton()
                    .setCustomId("previous")
                    .setLabel("◀")
                    .setStyle("PRIMARY"),
                new Discord.MessageButton()
                    .setCustomId("next")
                    .setLabel("▶")
                    .setStyle("PRIMARY")
            )
            const sentEmbed = await message.channel.send({embeds: [embed], components: [row]})

            client.on('interactionCreate', async interaction => {
                if (!interaction.isButton()) return;
                if (interaction.customId === 'next') {
                    a = a + 10
                    b = b + 10
                    console.log(a, b)
                    await interaction.update({ content: 'The next button was clicked!', components: [row], embeds: [embed] });
                }
            })
#

well the thing i did wasnt working but

#

send help qpxoxo

long crow
#

Help not arrived

worthy ivy
#

man

pale vessel
#

don't create a listener inside a command

cold ruin
pale vessel
#

there's no need to use bloated packages

worthy ivy
#

id rather not use external libs

cold ruin
#

ok so you can do something like

#

Button pagination
First add

client.pagination = new Map()```
 
to your client
then create 2 files one called button.js and one called buttons.js
in button.js paste this code https://sourceb.in/10XHip6RHU
in buttons.js paste this code https://sourceb.in/oyER8VEcTU

then this is the function for pagination https://sourceb.in/3k0j0tiFsF
an example of using it 
```js
await paginate(message, client, { messages: [new Discord.MessageEmbed().setDescription("uwu"), new Discord.MessageEmbed().setDescription("owo")] });```

you may have to change file paths and edit some things like the emojis used in the function
vivid fulcrum
#

lol

pale vessel
#

huhh

worthy ivy
pale vessel
#

whyyyy

#

bruh just create a collector and update indexes on button click and update the message

worthy ivy
#

how?

#

my current queue list is this

#
queue.songs.map( (song, id) => `**${id ? id : 'Playing'}**. ${song.name} - \`${song.formattedDuration}\``,).splice(0, 10).join('\n')
#

splices it so only 10 songs at a time can appear

pale vessel
#
const pages = []; // paginate your queue
let index = 0;

const sentMessage = await channel.send(pages[index]); // could be an embed or whatever
const collector = sentMessaage.createMessageComponentCollector(...); // add filters and stuff

collector.on("collect" , async component => {
    switch (component.customId) {
        case "previous":
            if (index - 1 >= 0) index--;
            break;
    
        case "next":
            if (index + 1 < pages.length) index++;
            break;
    }

    // edit your message with next page content
    await sentMessage.edit(pages[index]);
});```
worthy ivy
#

goddamn switch cases never seen them in a while

pale vessel
#

that would be pages

worthy ivy
#

also when declaring pages its actually an empty array?

pale vessel
#

no

earnest phoenix
#

use a function that does that

#

_ => i cannot send a message

feral aspen
earnest phoenix
#

also the return makes no difference

worthy ivy
#

since .catch is already technically return

#

but for errors

earnest phoenix
#

promise callbacks can't stop the parent function

pale vessel
#

use try catch or do const a = await somePromise().catch(balls => null); if (!a) return;

worthy ivy
worthy ivy
#

so ```js
const sentEmbed = await message.channel.send({embeds: [embed], components: [row]})

pale vessel
#

ya

earnest phoenix
#

what about this

const [data, err] = await promise.catch(err => [null, err]);
worthy ivy
#

wait what do i define my embed then?

#

because like i have

            const embed = new Discord.MessageEmbed()
            .setTitle(`Current Queue for ${message.guild.name}`)
            .setDescription(`${queue.songs.map( (song, id) => `**${id ? id : 'Playing'}**. ${song.name} - \`${song.formattedDuration}\``,).splice(0, 10).join('\n')}`)
quartz kindle
earnest phoenix
#

what's embeds

pale vessel
#

or js const res = await promise.catch(err => err); if (res instanceof Error) return bla();

worthy ivy
#

b l a

pale vessel
pale vessel
worthy ivy
#

new TrashEmbedBuilder()

#

wait

#

pages is my queue right?

pale vessel
#

ye

worthy ivy
#

ight one sec

#

@pale vesselight so i have my queue here
guess ill die

#

then index is actually 0 right?

#

declared by let because its the "page" number

trail finch
#

language: discord.js

pale vessel
worthy ivy
#

ok one sec

summer torrent
worthy ivy
# trail finch

by default you are using the commonjs syntax to import/require packages

#

shit.

pseudo forum
worthy ivy
near stratus
pale vessel
#

v14+

near stratus
pale vessel
#

you can there's a hacky way to do it

worthy ivy
#

^

#

but its too bad cringe

#

its so fucking hacky LMAO

near stratus
pale vessel
#

oh, you mean discord.js v13

#

Yeah

worthy ivy
near stratus
worthy ivy
#

@pale vessel well the bot tried sending the whole queue

pale vessel
#

skill issue

worthy ivy
#

anyways

pale vessel
#

go debug

worthy ivy
#

code rn is just ```js
const pages = [queue.songs.map( (song, id) => **${id ? id : 'Playing'}**. ${song.name} - \${song.formattedDuration}`)].join('\n') let index = 0 const embed = new Discord.MessageEmbed() .setTitle(Current Queue for ${message.guild.name}) .setDescription(${pages[index]}`)

        const row = new Discord.MessageActionRow()
        .addComponents(
            new Discord.MessageButton()
                .setCustomId("previous")
                .setLabel("◀")
                .setStyle("PRIMARY"),
            new Discord.MessageButton()
                .setCustomId("next")
                .setLabel("▶")
                .setStyle("PRIMARY")
        )
        console.log(pages)
        const sentEmbed = await message.channel.send({embeds: [embed], components: [row]})
pale vessel
#

that's a string

#

why join the pages

worthy ivy
#

wait shit

#

WAIT

#

LMAO

#

also

#

where do i put the modulo operator

pale vessel
#

you could do that with your songs in the queue

#

note that you must use pages[index].join("\n") or similar

#

Since it's a 2D array

worthy ivy
#

i just have like

#
.setDescription(`${pages[index % 10]}`)
worthy ivy
#

soo

pale vessel
#

works?

worthy ivy
#
 const pages = [queue.songs.map( (song, id) => `**${id ? id : 'Playing'}**. ${song.name} - \`${song.formattedDuration}\``).join('\n')]
#

...its something

#

then i just did .setDescription(`${pages[index % 10]}`)

pale vessel
#

it's gonna go back to page 1 (index 0) on page 11

worthy ivy
#

oh

pale vessel
#

that's how the modulo operator works

cold ruin
#

becuase you asked for it

worthy ivy
#

eek

outer perch
#

no one answered on the official D.JS server, does anyone now what the message constructor is?

#

I want to construct a message before sending

worthy ivy
outer perch
#

the problem is types

#

ah, yeah TS

worthy ivy
#

@pale vessel help? i actually have no idea what im doing

outer perch
#
Type 'MessageEmbed' is not assignable to type 'APIEmbed'.
  Types of property 'type' are incompatible.
    Type 'string' is not assignable to type 'EmbedType'.
worthy ivy
#

grr actually wait

outer perch
#
Type 'MessageActionRow' is not assignable to type 'APIActionRowComponent'.
  Types of property 'components' are incompatible.
    Type 'MessageActionRowComponent[]' is not assignable to type '(APIButtonComponent | APISelectMenuComponent)[]'.
      Type 'MessageActionRowComponent' is not assignable to type 'APIButtonComponent | APISelectMenuComponent'.
        Type 'MessageButton' is not assignable to type 'APIButtonComponent | APISelectMenuComponent'.
          Type 'MessageButton' is not assignable to type 'APIButtonComponentWithURL'.
            Types of property 'style' are incompatible.
              Type '"LINK" | "PRIMARY" | "SECONDARY" | "SUCCESS" | "DANGER"' is not assignable to type 'ButtonStyle.Link'.
                Type '"LINK"' is not assignable to type 'ButtonStyle.Link'.
worthy ivy
#

ill just look at docs for a second

outer perch
#

great

pale vessel
quartz kindle
#

use MessagePayload

outer perch
#

but, what is the target?

quartz kindle
#

the channel where you want to send it

worthy ivy
#

nevermind but

#

aaaa

#

fucking

worthy ivy
#

;w;

outer perch
#

but the channel will only be defined on the other function

#

not on the one I am trying to construct

pale vessel
#

tim help

#

I'm shit at explaining

quartz kindle
#

try overwriting the target prop

outer perch
#

like putting it undefined?

#

I want to construct then use send() to send it

worthy ivy
outer perch
#

send() will be in another function

quartz kindle
#

payload.target = channel

#

before sending

outer perch
#

makes sense but, why?

pale vessel
outer perch
#

message.channel.send already says where it goes

worthy ivy
#

and also how it works because the modulo operator is like

#

the remainder

outer perch
#

would be better to just construct a message without targets xD

worthy ivy
#

so like 12 % 5 outputs 2

pale vessel
#

you don't need to care about the remainder

#

if it's dividable with 5 then it's 0

worthy ivy
#

yeah

#

like

#

10 % 5 is 0

pale vessel
#

use that with array.reduce()

worthy ivy
#

because the remainder is 0

pale vessel
worthy ivy
#

wait

pale vessel
#

well this is the complicated part to explain

#

you could also use loops

#

they're less complicated

worthy ivy
#

i actually have never used array.reduce before

#

one sec im looking at the docs

pale vessel
#

but this is the way I usually use

worthy ivy
#

Perhaps the easiest-to-understand case for reduce() is to return the sum of all the elements in an array.

#

well i can see that in the example

#

well how would you use array.reduce in this case?

pale vessel
#

the accumulated value can be anything

#

it can be an array or an object or even a string

#

but in this case an array

worthy ivy
#

yeah?

pale vessel
#

you need to take advantage of the index that it provides in the parameters

worthy ivy
#

isnt index a number

pale vessel
#

...it is yes (misread)

#

if the index is dividable with for example 10, push a new array inside the array with the current element/song, else push the current element/song inside the last array in the accumulated value (remember, it's a 2D array)

#

after that, return back the accumulated value (since array.push() returns a number and you don't want to overwrite the accumulated value with a number)

pale vessel
#

osiejfoes ir I can't

#

it's hard

#

that's the best I could do

worthy ivy
#

still returns the whole fucking thing

pale vessel
#

well your current array has one fucking element cuz you joined them for some reason

#

[[..].join(...)] wtf is this

worthy ivy
#

i removed the .join

#

ok

pale vessel
#

Remove the [] around it too

worthy ivy
#

oh ok

pale vessel
#

just the usual array.map()

worthy ivy
#

you have the example right

#

Unhandled Rejection at: TypeError: acc[(acc.length - 1)].push is not a function

#
console.log(pages.reduce((acc, cur, idx) => (idx % 10 ? acc[acc.length - 1].push(cur) : acc.push([cur]), [])))
pale vessel
#

return back acc, not array.push()

#

check my example

#

less complicated: js console.log(pages.reduce((acc, cur, idx) => { idx % 10 ? acc[acc.length - 1].push(cur) : acc.push([cur]); return acc; }, []))

quartz kindle
#

can also do acc.push([cur]) && acc

#

:^)

#

can also use the new at() thing

pale vessel
#

how new is that

quartz kindle
#

node 16.6 ithink

pale vessel
#

Hmm ok

#

Guess they haven't updated the page

quartz kindle
pale vessel
#

typed arrays?

worthy ivy
#

ill try one sec

#

WAIT NOW IT SPLIT @pale vessel

#

pls explain what the fuck is happening here

pale vessel
#

try to understand it

worthy ivy
#

whats the empty array at the end?

pale vessel
#

I already tried explaining it

#

the starting value for acc

worthy ivy
#

so thats index ?

pale vessel
#

no

#

index is idx

worthy ivy
#

then how do you flip thru like the "pages"

pale vessel
#

aka the current (cur) element's index

worthy ivy
#

OHH

#

ok one sec

pale vessel
#

make sure to join it pages[index].join("\n")

#

since it's an array

worthy ivy
#

AND NOW I JUST DO index++ IF THE NEXT BUTTON IS PRESSED

#

THEN index-- if the previous button is pressed

#

but i gotta understand

#

what the fuck is happening in that pages.reduce function

#

and then update the embed

#

fuck it im doing this tommorrow when i forget everything

pale vessel
#

it's still early y not now

trail finch
worthy ivy
#

7:26 pm

#

ill wait for another minute

pale vessel
worthy ivy
#

wait

#

what country r u from lmao

pale vessel
#

that's why I said it's still too early

#

I have same tz as you lol

worthy ivy
#

yeah gmt +8

#

bussin

#

but what country r u from qphmm

pale vessel
#

Malaysia

worthy ivy
#

close

#

left or right sde

#

side

pale vessel
#

left

long crow
#

Gmt +8, PH

#

And few more SEA country

#

Really can guess from nick name already

quartz kindle
quaint wasp
#

Hello... I've never used CSS before, and now am trying to do so.. Can someone help me on position?
I want something to be placed in a specific place.. Should look smmth like 3, 4, 5 inside I think.
I feel like its something like this:

position: <something>(1, 3, 6)```
#

ping in replies..

quartz kindle
#

example?

#

thats not how position works

grizzled raven
#

what're the 3 numbers? x y z??

near stratus
quaint wasp
#

oh

quaint wasp
quartz kindle
#

thats not really a good way to do it, but it is a way lol

quaint wasp
#

which one..

#

Akio's?

quartz kindle
#

yes lol

#

can you show what exactly are you trying to do?

grizzled raven
#

i don't understand how that answers the question but eh if it works for you then go ahead

quaint wasp
near stratus
quartz kindle
#

neither did you ask or wait to see the exact thing hes trying to do

#

from the pic above your answer is not really related lel

quartz kindle
# quaint wasp

if you want to take something out of the document flow and control it manually, you can use position:absolute

near stratus
quartz kindle
#

then use top/left/right positions

#

for example

#
position: absolute;
top: 10px;
right: 10px;
quaint wasp
#

o

#

thanks Thumb

long crow
#

Tim, gimme motivation to make a http request for DAPI

quartz kindle
#

using what

#

node's https?

long crow
#

Any

#

If it native too sure, but more work for it

near stratus
long crow
#

I mostly comfortable with axios

quartz kindle
#

its not hard to do with https

#

but axios would be easier yes

near stratus
#

axios.get

quartz kindle
#

its just a normal request, with auth headers and user-agent

long crow
#

What bout the secuirty stuff?

#

I see some used tweetnacl for it

quartz kindle
#

thats for running an interaction server

#

not to make a request

near stratus
#

just use fetch
it's built in browser
easy to use

quartz kindle
#

its not built-in node.js