#development

1 messages Β· Page 1591 of 1

pale vessel
#

what if I mute someone for 4 mins

outer perch
#

kek

crimson vapor
#

go to my server

pale vessel
#

i did

outer perch
#

I don't store mutes on DB...

crimson vapor
#

I do kekw

pale vessel
#

uh you have to

#

it won't be persistent otherwise

lyric mountain
#

If you restart the bot it'll never complete a cycle

outer perch
#

doesn't need, it puts a timeout at startup automatically

lyric mountain
#

But the timeout will never complete

#

Not if you restart

outer perch
#

could be 3h left

lyric mountain
#

Ah, I see

outer perch
#

if I restart at 1h left

#

its goes to 1h timeout

lyric mountain
#

Cron would still be more reliable tho

outer perch
#

maybe

pale vessel
#

log your body

#

then(x => x.text()).then(console.log)

#

i think your API returned an invalid JSON

#

oh

#

still yeah

#

hm

#

well

tribal siren
#

hi flaze

pale vessel
#

i guess you got your answer

tribal siren
#

if it doesn't log anything means your code is running perfectly but not the way you want

pale vessel
#

it could be both

#

make sure you used the correct method and auth, etc.

#

try checking the status code

#

so your JSON payload is in the wrong schema

#

oops, there

#

check data

#

can you send it here?

#

this is yours

pale vessel
#

the example might be wrong, try using userId instead

sturdy star
#

what's that

#

mongo?

tribal siren
#

pretty sure

earnest phoenix
umbral zealot
#

The latter.

earnest phoenix
#

Last one?

#

I'm not english mother tongue LUL

umbral zealot
#

The second one, yes.

earnest phoenix
#

Aight, thanks ^^

lyric mountain
earnest phoenix
#

const ownerId = {'id', 'id'}; how can i define 2 people?

#

Unfortunately it does not work like that 😦

slender thistle
#

[] not {}

#

or become a God and create 2 humans

earnest phoenix
#

xd

#
const client = new Discord.Client();

const ownerIds = ['251058655137366017', '366808523692310529'];

client.on("message", async message => {
    if (message.author.bot) return false;

    if (message.mentions.has(ownerIds)) {
        await message.delete();
        message.reply(`Du bist eine Dumme hure`);
    };
});
#

Doesnt work :(( @slender thistle

slender thistle
#

What are you trying to do

earnest phoenix
quartz kindle
#

you cant use .has(array)

slender thistle
quartz kindle
#

^this

kind crescent
#

if(ownerIds.includes(message.mentions.members.first().id))

earnest phoenix
lyric mountain
#

that'll check only the first mention

#

not all mentions

earnest phoenix
pale vessel
#

it will error if there's no mentions too

zenith terrace
kind crescent
#

I'm not gonna spoonfeed

earnest phoenix
pale vessel
#

a bad one

kind crescent
#

No, I gave incomplete

#

That's the base for it

lyric mountain
earnest phoenix
slender thistle
earnest phoenix
#

Das ist kein command habe keine lust das man mich markiert xd @earnest phoenix

earnest phoenix
static trench
#

im trying to add a custom prefix to a json file and the following error shows up: File "main.py", line 17, in prefix id = message.server.id AttributeError: 'Message' object has no attribute 'server'

#

can someone help?

quartz kindle
#

message.server is not a thing

static trench
#

ya

#

what should i put in?

#

bot.server.id?

quartz kindle
static trench
#

ohhhh

quartz kindle
#

wat

#

no...

zenith terrace
static trench
#

sorry i am rly bad at this

quartz kindle
#

server is not a thing

#

they are guilds

static trench
#

yes

quartz kindle
#

not servers

static trench
quartz kindle
#

yes

static trench
#

ok

#

ty time

#

tim

earnest phoenix
#
const client = new Discord.Client();

const ownerId = "251058655137366017";

client.on("message", async message => {
    if (message.author.bot) return false;

    if (message.mentions.has(ownerId)) {
        await message.delete();
        message.reply(`Du bist eine Dumme hure`);
    };
});```
thin turret
#

console.log(console); 😳

earnest phoenix
#

Pls help :((

earnest phoenix
quartz kindle
#

?

lyric mountain
#

?

earnest phoenix
# quartz kindle ?

So I want when you ping me that the message is deleted but not for everyone

quartz kindle
earnest phoenix
#

Like this?:

#
        if(message.author.id === '') return
        await message.delete();
        message.reply(`Du bist eine Dumme hure`);
    }```
quartz kindle
#

depends what you want to do

#

if you want that only a specific person can use it, then message.author.id !== "id here"

earnest phoenix
#

(ROLE ID)

quartz kindle
#

message.member.roles.cache.has(id)

earnest phoenix
#

and several roles?

solemn leaf
#

Array

earnest phoenix
#

Hoe?

#

How *

solemn leaf
#

Learn js

#

@quartz kindle can you help me with formdata

earnest phoenix
#

I'm pretty sure it doesn't take an array

earnest phoenix
opal plank
#

[array_of_ids].includes(member.roles.cache.keys())
@earnest phoenix

#

thats as far as i can take you without spoonfeeding

earnest phoenix
#

Use <Array>#some()

solemn leaf
#

No spoonfeeding

#

Erwin fr

opal plank
#

best i can do after this is just send u the docs

solemn leaf
#

(node:3200) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined
at FormData._getContentType (C:\Users\Owner\Desktop\jscord\node_modules\form-data\lib\form_data.js:249:29)
at FormData._multiPartHeader (C:\Users\Owner\Desktop\jscord\node_modules\form-data\lib\form_data.js:178:26)
at FormData.append (C:\Users\Owner\Desktop\jscord\node_modules\form-data\lib\form_data.js:70:21)
at createFormMessage (C:\Users\Owner\Desktop\jscord\jscord\src\utils\resolve.js:79:10)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.createMessage (C:\Users\Owner\Desktop\jscord\jscord\src\utils\resolve.js:37:22)
at async Client.<anonymous> (C:\Users\Owner\Desktop\jscord\index.js:13:13)

https://sourceb.in/N71FdMydg3 (error emits from line 7 on this paste)

opal plank
#

i already explained to you

#

and use a debugger

solemn leaf
#
async function createFormMessage(options = {}) {
    const form = new FormData();
    form.append("content", options.content);
    form.append("nonce", makeid(12));
    form.append("tts", options.tts.toString());
    form.append("file", await getBuf(options.attachments?.file), options.attachments?.name ?? "file");
    form.append("payload_json", JSON.stringify({ "embed": options.embeds, "message_reference": { message_id: options.reference || null }, }), { contentType: "application/json" });

    return {
        headers: {
            "Content-Type": "multipart/form-data"
        },
        body: form.getHeaders()
    };
}

function looks like this currently

opal plank
#

options is an empty object

solemn leaf
#

No

opal plank
#

it doesnt have attachment property in it unless you send an options opject

solemn leaf
#

Its nott

opal plank
#

use

#

the

solemn leaf
#

I logged it legit

opal plank
#

debugger

solemn leaf
#

I loggeddd itt

opal plank
#

clearly not

#

use

#

the debugger

solemn leaf
#

Okay no

opal plank
#

that'll give you real time values

#

add a breakpoint in that line and watch on the left top side

#

for variable values

earnest phoenix
opal plank
earnest phoenix
#

yes

opal plank
#

define member, i told you, thats as far as i can take you

earnest phoenix
#

You're using optional chaining on the code you sent, but not in the one that's in the source bin link @solemn leaf

solemn leaf
#

I didnt want to make new source

#

For 1 line of code changed

earnest phoenix
#

Source bin β†’ options.attachments.name
New β†’ options.attachments?.name

#

If you're using optional chaining, it's not possible for it to throw that error

solemn leaf
#

Neither work

#

And it throws the error

earnest phoenix
#

Did you even save your code

solemn leaf
#

Yess

#

Im not idiotic

opal plank
#

i told you to use a debugger multiple times

#

you arent using it cuz u stubborn

solemn leaf
#

No

opal plank
#

yes, you are

solemn leaf
#

To hard

opal plank
#

stubborn

#

the same way you're telling them to learn js i could very well tell you to go learn how to debug js

earnest phoenix
#

Hey erwin, aren't you using a C# lib for your rich presence

solemn leaf
#

At least I know js

opal plank
#

not a lib, but yes

#

its more of a.... kind of mess

proven cape
#

If a server has a private channel, my bot is not able to see this channel. Which permissions (invite link) do I have to specify? Thanks πŸ™‚

earnest phoenix
#

VIEW_CHANNEL, CREATE_INSTANT_INVITE for invite link

proven cape
#

I've already passed this permission

opal plank
#

VIEW_CHANNEL wont matter if its a private channel

#

the only way to bypass permissions is ADMINISTRATOR
but you shouldnt do that

#

the owners must add the bot to the channels they want it to be seen by the bot

#

theres nothing you can do there

proven cape
#

ok thx

opal plank
#

np

quartz kindle
#

you can still fetch the channel even if your bot cant see it lul

#

at least you could last time i tested

lyric mountain
#

you can, that's one of the reasons why logging in as a bot is forbidden

heavy marsh
#

in discord.js [v 12.5.1]

I am trying to fetch information from the api package node-internet-radio - On a playing stream link.

On consolelog I get

{
  title: `Miami's #1 Hit Music Station - text="Y-100" song_spot="T" MediaBaseId="0" itunesTrackId="0" amgTrackId="0" amgArtistId="0" TAID="0" TPID="0" cartcutId="0" amgArtworkURL="" length="00:00:00" unsID="0" spotInstanceId="-1"`,
  fetchsource: 'STREAM',
  headers: {
    'content-type': 'audio/aac',
    'icy-metaint': '16000',
    'icy-name': 'Y100'
  }
}

Trying to get the headers.icy-name
I get it as undefined

var StationInfo_SN = StationInfo.headers.icy-name
        console.log(StationInfo_SN);
#
//From The DB
        var Stream = data.guild.stream_link.alpha;
        
//Command
     internetradio.getStationInfo(Stream, function(error, station) {
          var StationInfo = station;
        console.log(station);

        var StationInfo_SN = StationInfo.headers.icy-name
        console.log(StationInfo_SN);
lyric mountain
#

camelCase 😩

#

don't use var btw

#

it causes more issues than solves

opal plank
#

@heavy marsh headers['icy-name']

#

and yes, dont use vars

heavy marsh
#

const?

lyric mountain
#

let

opal plank
#

let and const

heavy marsh
#

ooh ok

opal plank
#

basically

#

put everything to cost

#

and change to let when it errors

#

consts cant be chaged

#

let can

heavy marsh
opal plank
#

np

heavy marsh
#

Also what can I do to get this values

  title: `Miami's #1 Hit Music Station - text="Y-100" song_spot="T" MediaBaseId="0" itunesTrackId="0" amgTrackId="0" amgArtistId="0" TAID="0" TPID="0" cartcutId="0" amgArtworkURL="" length="00:00:00" unsID="0" spotInstanceId="-1"`,

For example

let StationInfo_T = StationInfo.title
        console.log(StationInfo_T);```
Undefined
opal plank
#

that shouldnt be undefined

#

also, heres the reason why i told u to use let/const instead

#

notice how i return a before even declaring it

heavy marsh
#

i get Undefined

opal plank
#

and theres no error

#

console.log(StationInfo)

#

see if you''re passing the right thing

heavy marsh
#

stationInfo =

{
  title: 'Post Malone - text="Circles" song_spot="M" MediaBaseId="2522450" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="30779802" TPID="79727410" cartcutId="3231075001" amgArtworkURL="http://image.iheart.com/bell-ingestion-pipeline-production-umg/full/00602508067150_20190906150338788/19UMGIM78325_T1_cvrart.jpg" length="00:03:41" unsID="-1" spotInstanceId="-1"',
  fetchsource: 'STREAM',
  headers: {
    'content-type': 'audio/aac',
    'icy-metaint': '16000',
    'icy-name': 'Y100'
  }
}
#

StationsInfo.title =

  title: 'Post Malone - text="Circles" song_spot="M" MediaBaseId="2522450" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="30779802" TPID="79727410" cartcutId="3231075001" amgArtworkURL="http://image.iheart.com/bell-ingestion-pipeline-production-umg/full/00602508067150_20190906150338788/19UMGIM78325_T1_cvrart.jpg" length="00:03:41" unsID="-1" spotInstanceId="-1"',
opal plank
#

gotta go to market

lyric mountain
#

imagine sending html params in the title field through api KEKW

heavy marsh
lyric mountain
#

that's an object actually

#

an object inside a string

#

actually, someone fckd pretty hard when building that api

heavy marsh
#

I dont seem to find another one

lyric mountain
#

the actual response would be this:

{
  title: 'Post Malone',
  text: 'Circles',
  song_spot: 'M',
  MediaBaseId: '2522450',
  itunesTrackId: '0',
  amgTrackId: '-1',
  amgArtistId: '0',
  TAID: '30779802',
  TPID: '79727410',
  cartcutId: '3231075001',
  amgArtworkURL: 'http://image.iheart.com/bell-ingestion-pipeline-production-umg/full/00602508067150_20190906150338788/19UMGIM78325_T1_cvrart.jpg',
  length: '00:03:41',
  unsID: '-1',
  spotInstanceId: '-1',
  fetchsource: 'STREAM',
  headers: {
    'content-type': 'audio/aac',
    'icy-metaint': '16000',
    'icy-name': 'Y100'
  }
}
#

at least that's what it would be if those fields weren't inside a string

heavy marsh
#

Yep it would have been easy like that

#

but any way to get the info I need

lyric mountain
#

you could split by -

#

however

#

Post Malone is the author, Circles is the name

quartz kindle
#

the problem is not the api

#

the problem is the protocol

#

these are radio streaming protocols, similar to how car radio works

#

there is only one field that contains information about the song

#

and they put everything inside that one field

lyric mountain
#

that's gross

quartz kindle
#

the title field is supposed to show the title, like it shows on a radio screen

#

here they are adding some additional data possibly for some radio streaming app

heavy marsh
#

Any way to get the data like the text, art and etc..

lyric mountain
#

you need to parse that title field

quartz kindle
#

but i think this library is also screwing it up even further

#

i see they are using split and slice in their code

lyric mountain
#

slice 'n dice

quartz kindle
#

cull the meek

heavy marsh
cinder patio
#

Why are the property names inside the string so messed up you have snake case and camel case

solemn latch
#

snake case?

cinder patio
#

song_spot

#

MediaBaseId

solemn latch
#

oh

earnest phoenix
#

kebab-case 😳

mellow kelp
#

i'm going to use swapcase from now on

#

i have been enlightened

lyric mountain
#

shiv is swapcase

quartz kindle
#

AlMoStRaNdOm best case

cinder patio
#

period

placid iron
#

Snake case easiest to read

quartz kindle
#

and wtf is self:=defined:=case

modest maple
#

go lang

cinder patio
#

camelCaseBestCase

mellow kelp
#

variables yes

quartz kindle
#

iRestMyCase

frank cove
#

PascalCaseBestCase

lyric mountain
#

I swear, if I ever see someone use P_a_r_s_e_d I'll prove humans can fly

mellow kelp
#

kebab-case-for-project-names

cinder patio
#

camelCase - variables
PascalCase - class names / interfaces
kebab-case - project names
ALL_CAPS_SNAKE_CASE - enums / constants

pale vessel
#

i follow all above except for constants

lyric mountain
#

sWAP - shiv

mellow kelp
#

python devs: visible confusion

cinder patio
heavy marsh
cinder patio
#

You can parse the string yourself

mellow kelp
#

should i make enums in typescript with classes and static instances of said class?

#

i mean that's basically how java handles it and it works fine

cinder patio
#

Like, putting an enum as a static property of a class?

solemn leaf
#

never make stuff static

cinder patio
#

I mean sure yeah you can do that

#

But I just prefer to export the enum from the file in which the class is defined

lyric mountain
#

static sometimes is good

cinder patio
#

Also you cannot use const enums if you go with static

#

const enums are so much better than regular enums, too

mellow kelp
#

well that's not exactly a problem at least for me

quartz kindle
#

const enums are good

mellow kelp
#

the thing is that i need enums with properties

lyric mountain
#

wait, are you guys getting more than one type of enum?

cinder patio
#

All of my enums are const now that I think about it

mellow kelp
#

so that's why im using classes

cinder patio
#

You probably shouldn't use enums then

quartz kindle
#

like subproperties?

mellow kelp
#
class Category {
    public static readonly FUN = new Category('fun', 'Fun');
    public static readonly MODERATION = new Category('moderation', 'Moderation');
    public static readonly IMAGE = new Category('image', 'Image generation');
    public static readonly ECONOMY = new Category('economy', 'Economy');
    public static readonly INFO = new Category('info', 'Info');
    public static readonly LEVELS = new Category('levels', 'Leveling');
    public static readonly OWNER = new Category('owner', 'Owner');

    private constructor(
        public readonly name: string,
        public readonly displayName: string
    ) {}
}
lyric mountain
mellow kelp
#

this is more or less how i handle it

lyric mountain
#

they are immutable and static in java

cinder patio
#

While normal enums get turned to some weird structure

mellow kelp
#

guess i'll just keep using classes then

#

kthxbye

lyric mountain
#

which is the reason for enums basically

#

they...well...enumerate

cinder patio
mellow kelp
#

aight

cinder patio
mellow kelp
#

this is one thing i don't really like about typescript

#

but it's a thing i also like about typescript

cinder patio
#

enums?

mellow kelp
#

yeah

lyric mountain
#

enums are love

cinder patio
#

enums are life

quartz kindle
#

im working on a lib that is js, but has a .d.ts for declarations

mellow kelp
#

they're basically like unique IDs

quartz kindle
#

and i have a big ass object in js

#

and an equivalent big ass const enum in .d.ts

#

lol

lyric mountain
#

enums are like bookmarks

mellow kelp
#

the yee yee ass enum

cinder patio
#

why not just write TS tim

quartz kindle
#

because js > ts

#

:^)

mellow kelp
#

civil war incoming

cinder patio
#

I respect your opinion but it's wrong

quartz kindle
#

lmao

#

tbh this lib is not even js

#

its c++

cinder patio
#

what's it about

quartz kindle
#

nasa stuff

lyric mountain
#

c++ is just c but with dlcs

cinder patio
#

cool

solemn latch
#

two dlc's

quartz kindle
#

yes

mellow kelp
#

let's just hope EA doesn't buy c++

cinder patio
#

C++ is epic

quartz kindle
#

ts is just js++

lyric mountain
#

c# is just java++

quartz kindle
#

c# is c++++

#

has 4 + in it

cinder patio
#

does it really though
+ +
+ +

This doesn't really look like a hashtag to me

heavy marsh
quartz kindle
#

it is if you put them more together

lyric mountain
#

cblunt

cinder patio
# heavy marsh How to?

You can try using regex or you can use .split(" ") and then loop through the array and use .split("="). Regex is probably better, though

glacial pagoda
#

I got this error

#

From Here

lyric mountain
#

systemChannel is null

glacial pagoda
#

Oh

cinder patio
#

Some guilds don't have a system channel set

quartz kindle
#

not all guilds have a system channel enabled

glacial pagoda
#

Oh

#

How do i make the bot send at the first channel?

#

in the guild?

cinder patio
#

guild.channels.cache.first() BUT that channel may not be a text one

cinder patio
#

so you should filter before you send

glacial pagoda
#

Oh

#

Ok!

pale vessel
#

don't you need to sort by rawPosition?

quartz kindle
#
guild.channels.cache.find(channel => channel.type === "text" && channel.permissionsFor(guild.me).has("SEND_MESSAGES"))
glacial pagoda
#

Oh

#

So This? guild.channels.cache.find(channel => channel.type === "text" && channel.permissionsFor(guild.me).has("SEND_MESSAGES")).send(hereEmbed);

quartz kindle
#

you still need to check if a channel is found

glacial pagoda
#

Ok

quartz kindle
#

because some guild may invite your bot with no permissions

#

and only add permissions later

glacial pagoda
#

Instead Of Doing This And It Being Long, Is There A Way To Shorten It Out?
if(guild.me.hasPermission([EVERY PERM]))

#

If I Create A Variable It Would Be Long Too

earnest phoenix
glacial pagoda
#

Ok!

daring prawn
solemn latch
#

I would agree with hope for your issue chill, I would use webhooks

daring prawn
glacial pagoda
#

@quartz kindle Can I Take Out && channel.permissionsFor(guild.me).has("SEND_MESSAGES") From The Statement?

daring prawn
glacial pagoda
#

If My Bot Has Administrator

earnest phoenix
#

i have my website .html and i have a domain (didi-web.tk) can anyone help me get it hosted locally?

solemn latch
#

did you look into what we discussed yesterday?

earnest phoenix
earnest phoenix
solemn latch
#

it should have covered it

#

i dont think anyone here will be able to explain it any better

earnest phoenix
#

i heard that there were desktop apps for it...

solemn latch
#

you still have to configure your domain

#

and port forward

#

and host it

#

personally, id also configure cloudflare for it too.

earnest phoenix
#

is there a yt video you recomend?

heavy marsh
lyric mountain
#

actually, you could just eval that string and get the variable value

#

since those are theoretically valid variable assignments

heavy marsh
#

Are you telling me?

lyric mountain
#

well yes, but that'd be kinda overkill

#

still, there's also one thing you could do

heavy marsh
#
Peddle - text="Peddle" song_spot="T" MediaBaseId="0" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="0" TPID="0" cartcutId="9229536001" amgArtworkURL="null" length="00:00:30" unsID="-1" spotInstanceId="94132336"
``` = Console Long
#

First trying to get text

lyric mountain
#

replace all = with : and put commas on each space after "

#

then enclose it within brackets and parse it to json

heavy marsh
lyric mountain
#
let mess = 'text="Peddle" song_spot="T" MediaBaseId="0" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="0" TPID="0" cartcutId="9229536001" amgArtworkURL="null" length="00:00:30" unsID="-1" spotInstanceId="94132336"';

mess = mess.replace('" ', '", ');
//text="Peddle", song_spot="T", MediaBaseId="0", itunesTrackId="0", amgTrackId="-1", amgArtistId="0", TAID="0", TPID="0", cartcutId="9229536001", amgArtworkURL="null", length="00:00:30" unsID="-1", spotInstanceId="94132336"

mess = mess.replace('=', ':');
//text:"Peddle", song_spot:"T", MediaBaseId:"0", itunesTrackId:"0", amgTrackId:"-1", amgArtistId:"0", TAID:"0", TPID:"0", cartcutId:"9229536001", amgArtworkURL:"null", length:"00:00:30" unsID:"-1", spotInstanceId:"94132336"

mess = '{' + mess + '}';
//{text:"Peddle", song_spot:"T", MediaBaseId:"0", itunesTrackId:"0", amgTrackId:"-1", amgArtistId:"0", TAID:"0", TPID:"0", cartcutId:"9229536001", amgArtworkURL:"null", length:"00:00:30" unsID:"-1", spotInstanceId:"94132336"}
#

boom, valid json

#

then just JSON.parse(mess)

heavy marsh
restive furnace
#

just parse it out of it

lyric mountain
#

just remove it

#

you can split by -

#

then get the index 1

heavy marsh
#

let StationInfo_TT = StationInfo_T.split(" - ");

#

like this

lyric mountain
#

yeah

#

then do the stuff I did above

#

in one line obviously

cinder patio
#

But what if the title of the song includes a -

lyric mountain
#

no need to make it a 4 liner

#

actually

#

hm

#

let StationInfo_TT = StationInfo_T.split(" - t")[1] + 't';

restive furnace
#

so much bloat

lyric mountain
#

well, I mean, this is probably the only way without using regex + iterators

restive furnace
heavy marsh
#

What is better regrex or split

lyric mountain
#
const infoText = (StationInfo_T.split(" - t")[1] + 't')
                   .replace('" ', '", ')
                   .replace('=', ':');

const infoJSON = JSON.parse('{' + infoText + '}');
#

regex will take time to compile the pattern, then you'll need to iterate over matches to get your desired value

#

it'll be big code, and probably slower

#

this solution above, albeit a bit gross, will do the work with two lines basically

heavy marsh
#

I see

heavy marsh
#

Also let or const?

lyric mountain
#

const in this case

#

if the stream is found (and follows a single structure), that'll always work

blissful coral
frozen rock
#

hi

#

i need an help

blissful coral
#

Is it not reassigning because its a for each

#

Wait why am I using foreach

#

LMFAO

frozen rock
#

can i paste a code to here?

blissful coral
#

nvm

#

Use pastebin or hastebin or something

lyric mountain
frozen rock
#

idk what is that

lyric mountain
frozen rock
#

yes i clicked and pasted my code

#

then?

lyric mountain
#

click save and send link here

blissful coral
#

Is this incorrect usage of a for loop Thonk

lyric mountain
#

extreme

#

oliypls

frozen rock
#

in this code

blissful coral
#

Wait...

frozen rock
#

it says "unexpected token" in last "}"

#

how can i fix it?

lyric mountain
#

you have a dangling }

frozen rock
#

in where

blissful coral
#

Find where you have a extra }

lyric mountain
#

actually, you have missing }

frozen rock
#

is it extra ?

#

or wrong place?

lyric mountain
#

you have 2 missing }

frozen rock
#

how can i fix this code

lyric mountain
#

also, don't use var

heavy marsh
# lyric mountain const in this case
          let Info = station;
        let Station = Info.title

        const Station_Info = (Station.split(" - t")[1] + 't').replace('" ', '", ').replace('=', ':');
        const infoJSON = JSON.parse('{' + infoText + '}');
lyric mountain
#

yes

heavy marsh
#

doesn work

lyric mountain
#

what error?

frozen rock
#

guys please

#

i need to ix this code

heavy marsh
#

Cannot read property 'title' of undefined

frozen rock
#

help pls help

#

i cant do it

#

its important

lyric mountain
frozen rock
#

for me

lyric mountain
solemn latch
#

pretty sure someone said the problem

frozen rock
lyric mountain
#

dot dot dot

heavy marsh
lyric mountain
solemn latch
lyric mountain
#

put 2 } and a )

frozen rock
#

to where

lyric mountain
solemn latch
#

where it says its missing it

frozen rock
solemn latch
#

of course it does πŸ‘€

frozen rock
#

it says the last line

#

i can show my screen

#

if you want

lyric mountain
solemn latch
#

then last line maybe hmm eyes_shaking

frozen rock
#

no it isnt

#

when i erase the last line

lyric mountain
#

oh my

solemn latch
#

we want you to add stuff

#

not remove

frozen rock
#

itcomes to 2nd line from end

#

r u sure ? @solemn latch

lyric mountain
frozen rock
#

man i understand but where will i put them

#

it doestn show anything

lyric mountain
solemn latch
#

where it says to lmao

#

you just said it says the location of the issue

frozen rock
#

@lyric mountain can i show my screen pls

lyric mountain
frozen rock
#

?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
#

faith halp

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.

lyric mountain
frozen rock
#

still need help :/

sage bobcat
lyric mountain
#

he showed

frozen rock
#

i showed

lyric mountain
#

the issue is this:

frozen rock
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

frozen rock
#

i need to show my screen to any1

lyric mountain
sage bobcat
#

One message removed from a suspended account.

lyric mountain
#

I've got no spoon with me today

sage bobcat
#

One message removed from a suspended account.

frozen rock
#

@sage bobcat idk :(

lyric mountain
#

his code misses 2 } and 1 ) at the last line

sage bobcat
#

One message removed from a suspended account.

frozen rock
#

i have an "unexpected token" in last line

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
#

we're trying to explain that

frozen rock
#

man

lyric mountain
#

look, bear with me:

frozen rock
#

i understood it just when i erased them it still says "un. token"

lyric mountain
#

your code misses 2 } and 1 ) at the last line

#

2 }

frozen rock
#

i did it

lyric mountain
#

1 )

frozen rock
#

i put them

solemn latch
#

Because your deleting things you need

lyric mountain
#

don't erase anything

#

you've got a hole

#

you gotta fill it

#

not dig

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
sage bobcat
#

One message removed from a suspended account.

frozen rock
#

no i dont need thx i solved

sage bobcat
#

One message removed from a suspended account.

frozen rock
#

oh i need that

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
sage bobcat
#

One message removed from a suspended account.

heavy marsh
# lyric mountain
let Station = Info.title
        console.log(Station)```
Gives me
```js
Ritt Momney - text="Put Your Records On" song_spot="M" MediaBaseId="2638380" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="31514303" TPID="111470845" cartcutId="0420697001" amgArtworkURL="http://image.iheart.com/ihr-ingestion-pipeline-production-sbmg/A10301A0004458536N_20200916185637999/63447851.20126.jpg" length="00:02:25" unsID="-1" spotInstanceId="0"
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
#

we've extracted the data that's inside title field, now to get the title you get text from infoJSON

heavy marsh
#
        let Station = Info.title
        console.log(Station)
        const Station_Info = (Station.split(" - t")[1] + 't').replace('" ', '", ').replace('=', ':');
lyric mountain
#

that'll convert the title data to a parseable JSON

heavy marsh
#

this gives me an error

lyric mountain
#

text

#

infoJSON.text

earnest phoenix
#

Hello I have a problem, the login page for the oauth reloads endlessly when I try to log in

dawn yacht
#

How I can make voting reward

lyric mountain
earnest phoenix
#

no from my bot

lyric mountain
#

check if your redirect is set correctly

earnest phoenix
#

kk

lyric mountain
#

hm

#

isn't ur code throwing the user back to the login page?

earnest phoenix
#

ah we need a redirection code

heavy marsh
# lyric mountain this is your title
        const Station_Info = (Station.split(" - t")[1] + 't')
        .replace('" ', '", ')
        .replace('=', ':');
        console.log(Station_Info)

Gives

ext:"My Head & My Heart", song_spot="M" MediaBaseId="2662311" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="32102720" TPID="118060853" cartcutId="3232849001" amgArtworkURL="http://img.iheart.com/sca/imscale?w=195&img=http%3A//assets.iheart.com/default/Default-PlayerAlbumArt.png" length="00:02:56" unsID="-1" spotInstanceId="-1"t```
dawn yacht
lyric mountain
#

ah, btw

heavy marsh
#

Its incorrect right

lyric mountain
#

yes, made a mistake there

#
const Station_Info = ('t' + Station.split(" - t")[1])
        .replaceAll('" ', '", ')
        .replaceAll('=', ':');
        console.log(Station_Info)
heavy marsh
#

.replaceall

lyric mountain
#

that too

heavy marsh
#

but doesnt show what

lyric mountain
#

did u parse it?

#

JSON.parse(Station_Info)

heavy marsh
#

i mean I am not getting the console log

lyric mountain
#

hm

heavy marsh
#
('t' + Station.split(" - t")[1])
``` is this correct
lyric mountain
#

yes

sturdy gazelle
heavy marsh
#

hmmm

lyric mountain
#

oh, I get why

#

hm

#

it'll be hard to parse that

heavy marsh
#

I am stilling checking what is the error

frozen rock
#

guys guys guys

#

is there an error?

#

in this code?

dusky sundial
#

You could check it by running it, no?

frozen rock
#

i tried but it didnt work

heavy marsh
#

What is the error?

frozen rock
#

but in glitch, it doesnt have a red round

lyric mountain
#

@heavy marsh here:

frozen rock
#

in the logs, i saw a error in here wait

lyric mountain
#
const Station_Info = ('t' + Station.split(" - t")[1])
        .replaceAll('" ', '", ')
        .replaceAll('=', ':')
        .replaceAll(/\w+(?=:")/g, '"$&"');

const infoJSON = JSON.parse('{' + Station_Info + '}');
frozen rock
#

it shows a logs error in here

#

this part of the code

#

did you see anything ? any error?

#

?

heavy marsh
#
const Station_Info = ('t' + Station.split(" - t")[1])
        .replaceAll('" ', '", ')
        .replaceAll('=', ':')
        .replaceAll(/\w+(?=:)/g, '"$&"');
``` - Here
frozen rock
#

.replaceAll('" ', '", ') wrong "," ?

lyric mountain
#

try now

frozen rock
#

who

lyric mountain
#

him

heavy marsh
#

?

lyric mountain
#

just ran the code on the console

#

then put the result on jsonlint

#

and it validated successfully

heavy marsh
lyric mountain
#

then the issue ain't there

#

show your current code

heavy marsh
#
          let Info = station;
        let Station = Info.title

        const Station_Info = ('t' + Station.split(" - t")[1])
        .replaceAll('" ', '", ')
        .replaceAll('=', ':')
        .replaceAll(/\w+(?=:")/g, '"$&"');

        const infoJSON = JSON.parse('{' + Station_Info + '}');
        console.log(infoJSON)
lyric mountain
#

just to check, you get no error on the console?

heavy marsh
#

I do

lyric mountain
#

what error?

heavy marsh
#

But its a wearied error

#
TypeError: Cannot read property 'title' of undefined
#

let Station = Info.title = Vaild

lyric mountain
#

you can't get title from infoJSON

#

you need to get text

#

title is a field of Info

#

oh, wait

#

what's the line that error pops up?

heavy marsh
lyric mountain
#

no, there it's Info.title

heavy marsh
#

I changed it to text

#

but still gives me TypeError: Cannot read property 'text' of undefined

lyric mountain
#

Info is undefined then

heavy marsh
#

Info is vaild

lyric mountain
#

do console.log(Info)

heavy marsh
# lyric mountain do `console.log(Info)`
          let Info = station;
console.log(Info)
        let Station = Info.title
console.log(Station)
        let Station_Text = Info.text
console.log(Station_Text)

I get

{
  title: 'Chris Brown / Young Thug - text="Go Crazy" song_spot="M" MediaBaseId="2597601" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="34433815" TPID="101459495" cartcutId="3231705001" amgArtworkURL="http://image.iheart.com/ihr-ingestion-pipeline-production-sbmg/A10301A0004391233W_20200511233023056/62921147.20126.jpg" length="00:02:54" unsID="-1" spotInstanceId="-1"',
  fetchsource: 'STREAM',
  headers: {
    'content-type': 'audio/aac',
    'icy-metaint': '16000',
    'icy-name': 'Y100'
  }
}

Chris Brown / Young Thug - text="Go Crazy" song_spot="M" MediaBaseId="2597601" itunesTrackId="0" amgTrackId="-1" amgArtistId="0" TAID="34433815" TPID="101459495" cartcutId="3231705001" amgArtworkURL="http://image.iheart.com/ihr-ingestion-pipeline-production-sbmg/A10301A0004391233W_20200511233023056/62921147.20126.jpg" length="00:02:54" unsID="-1" spotInstanceId="-1"

undefined
frozen rock
#

GUYSΓΌ

lyric mountain
#

ok ok, bear with me

frozen rock
lyric mountain
#

let Station = Info.title;

#

keep this

frozen rock
lyric mountain
#

do console.log Station_Info and infoJSON

earnest phoenix
#

smh code js```js
const Discord = require('discord.js'); const clinet = new Discord.Clinet(); client.on('ready', async(bot) => {
console.log('ready')
}); clinet.on('message', async(bot, message) => {
let prefix = "owo "
if(message.channel.type === "dm" || message.author.bot || !message.content.startsWith(prefix)) return
});

#

oh no

lyric mountain
#

format that smh

earnest phoenix
#

no

#

thats the point

#

i made it only it in one lime but discord succs and screwed it

lyric mountain
#

why one line?

#
const Discord = require('discord.js');
const clinet = new Discord.Clinet();

client.on('ready', async (bot) => {
    console.log('ready')
});
clinet.on('message', async (bot, message) => {
    let prefix = "owo "
    if (message.channel.type === "dm" || message.author.bot || !message.content.startsWith(prefix)) return
}); 
#

see? a lot better

heavy marsh
# lyric mountain do console.log Station_Info and infoJSON
TypeError: Cannot read property 'title' of undefined
    at /home/container/commands/Radio/nowplaying.js:32:28
    at /home/container/node_modules/node-internet-radio/index.js:45:14
    at processTicksAndRejections (internal/process/task_queues.js:93:5)```
mellow kelp
#
new (require('discord.js').Client)().on('ready', () => console.log('ready')).on('message', message => message.channel.type === 'dm' || message.author.bot || !message.content.startWith('owo'));
lyric mountain
#

try let Station = station.title;

mellow kelp
#

yes

heavy marsh
lyric mountain
#

ik, but for some reason your Info variable is undefined

robust blade
#

how is my donut

             k;double sin()
         ,cos();main(){float A=
       0,B=0,i,j,z[1760];char b[
     1760];printf("\x1b[2J");for(;;
  ){memset(b,32,1760);memset(z,0,7040)
  ;for(j=0;6.28>j;j+=0.07)for(i=0;6.28
 >i;i+=0.02){float c=sin(i),d=cos(j),e=
 sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c*
 h*e+f*g+5),l=cos      (i),m=cos(B),n=s\
in(B),t=c*h*g-f*        e;int x=40+30*D*
(l*h*m-t*n),y=            12+15*D*(l*h*n
+t*m),o=x+80*y,          N=8*((f*e-c*d*g
 )*m-c*d*e-f*g-l        *d*n);if(22>y&&
 y>0&&x>0&&80>x&&D>z[o]){z[o]=D;;;b[o]=
 ".,-~:;=!*#$@"[N>0?N:0];}}/*#****!!-*/
  printf("\x1b[H");for(k=0;1761>k;k++)
   putchar(k%80?b[k]:10);A+=0.04;B+=
     0.02;}}/*****####*******!!=;:~
       ~::==!!!**********!!!==::-
         .,~~;;;========;;;:~-.
             ..,--------,*/
#

so tasty huh

earnest phoenix
#

i love it

#

i would eat it

mellow kelp
#

delicious

robust blade
#

this is called the 'C' donut.

earnest phoenix
#

smh code js ```js
const Discord = require('discord.js'); const clinet = new Discord.Client(); clinet.on('ready', () => console.log("ok")); client.on('message', (bot) => let prefix = "owo"; if(message.author.bot || message.channel.type === "dm" || if(message.content.startsWitch(prefix) return)))

#

clinet

robust blade
#

wait first of all

#

clinet

#

what is clinet

heavy marsh
#

Also Something is wrong here

        const Station_Info = ('t' + Station.split(" - t")[1])
        .replaceAll('" ', '", ')
        .replaceAll('=', ':')
        .replaceAll(/\w+(?=:")/g, '"$&"');
        console.log(Station_Info)
lyric mountain
#

it's not even reaching that part

lyric mountain
#

you're erroring when getting the title from Info

heavy marsh
#

Should it be like this

        const Station_Info = ('t' + Station.split(" - t")[1])
        .replace('" ', '", ')
        .replace('=', ':')
        .replaceAll(/\w+(?=:")/g, '"$&"');
        console.log(Station_Info)
lyric mountain
#

yes

#

I just ran that code

#

and it validated successfully

heavy marsh
#

Shall I send you my whole code

lyric mountain
#

probably

heavy marsh
lyric mountain
#

don't use var

lament rock
#

There is a time and a place to use var. Server sided scripting is not that time or place

lyric mountain
#

I see no error there tho

opal plank
#

didnt i tell you not to use var?

#

πŸ€”

marble juniper
#

var is old

#

use let or const

opal plank
#

vars get hoisted declaration

#

they can cause some very annoying bugs

heavy marsh
#

Changed every var to let

#

still the same

opal plank
#

i didnt say that was ur issue, i say this might be another issue as well

#

you're just cleaning ur code, doesnt mean thats the source of ur problem

lyric mountain
#

for some reason he's getting undefined for Info even tho when console.log(Info) returns the right value

#

I can't see the error

opal plank
#

scopes?

lyric mountain
#

same scope

opal plank
#

just console.log(station)

lyric mountain
heavy marsh
opal plank
#

lowecase

#

hmmm

lyric mountain
#

ignore the last console.log, it was supposed to be Info.title anyway

opal plank
#

wait what

#

of course its gonna return undefined

#

actually nvm

#

actually

lyric mountain
#

yeah, we're stuck there

opal plank
#

theres no text property

lyric mountain
#

we know

opal plank
#

Info.text is the same as station.text

#

which isnt there

#

only title

lyric mountain
opal plank
#

then whats the issue?

lyric mountain
#

Info.title throws "Can't get property title of undefined"

opal plank
#

try station.title

#

instead of Info

lament rock
#

re: you shouldn't use var.

Web dev

quartz kindle
#

var let const

opal plank
#

let const

heavy marsh
#
        const Station_Info = (Station.split(" - t")[1] + 't')
        .replace('" ', '", ')
        .replace('=', ':');
        console.log(Station_Info)
``` = Vaild though
#

but not corretly

opal plank
#

log what i said

lament rock
#

deving for legacy systems would require var since not all js engines support let or const

opal plank
#

be mindful of case sensitive

lament rock
#

as ugly as that is

opal plank
#

js is case sensitive

lyric mountain
#

I've ran that part in chrome's console, and it validates correctly

opal plank
lyric mountain
opal plank
lament rock
#

I've started to migrate to ts, yes.

opal plank
#

if let/const isnt implement, it literally implements it for you

#

same for async

#

if your node target doesnt have async, it literally traspiles an async function to be used

lyric mountain
#

imagine a lang that keeps transpirating everywhere

#

stinky

quartz kindle
#

let data = info.title.split(" - ")[1].split('" ').map(x => { let s = x.split('="'); return {[s[0]]: s[1]} })

opal plank
#

imagine having to rewrite code cuz you need different targets rather than running tsc

lyric mountain
#

wait what?

opal plank
#

yeah

#

here, let me get example

#

watch this

#

just the next 30 seconds

#

he uses async as example, and hes targetting es3

#

it literally implements async for you

#

in es3

crimson vapor
lyric mountain
#

woops

#

dangling reply

#

"how to code in ts"

tab tab tab tab tab tab

lament rock
#

I know ts does all that which is why I've started to switch. Having new features in legacy versions is very nice

#

Also, "statically typed"

opal plank
#

first step: use ts

#

second step: ditch d.js

lament rock
#

reject djs, return to modular interfaces

opal plank
lyric mountain
#

ts always held my interest because strong typing

#

fuck interp langs

lament rock
#

I just made my own libs :)

opal plank
#

detritus is insanely good, trust me

#

and i dont say that from many things

crimson vapor
#

ik

#

are you gonna try out discord-rose when berry is done?

#

or even do basic testing

opal plank
#

unless tim uses it, nah

crimson vapor
#

@quartz kindle

opal plank
#

detritus is proving to be the best discord lib for js/ts i've seen so far

#

doubt rose would get even close to how sophisticated detritus is

crimson vapor
#

can you give an example?

opal plank
#

command handling is one of them

lyric mountain
#

"dear detritus, please make a functional and complete bot"

#

done

heavy marsh
#
[
  { text: '9007428_podcast The Office Deep Dive' },
  { song_spot: 'T' },
  { MediaBaseId: '0' },
  { itunesTrackId: '0' },
  { amgTrackId: '-1' },
  { amgArtistId: '0' },
  { TAID: '0' },
  { TPID: '0' },
  { cartcutId: '9007428002' },
  { amgArtworkURL: 'null' },
  { length: '00:00:30' },
  { unsID: '-1' },
  { spotInstanceId: '94080489"' }
]
const Station_Info = Info.title.split(" - ")[1].split('" ').map(x => { let s = x.split('="'); return {[s[0]]: s[1]} })
        console.log(Station_Info)
``` - :0
lyric mountain
#

weird, but congratz

#

I'm curious as to why my parser didn't work

heavy marsh
#

TIM send it

lyric mountain
#

ik

crimson vapor
heavy marsh
#

Shold I do .parse ?

lyric mountain
#

no

#

all you need to do now is reduce that to a single object

opal plank
lyric mountain
#

instead of an array

crimson vapor
#

is it a full command handler

opal plank
#

do you know what this does?

crimson vapor
#

loads all commands in the dir?

opal plank
#

it reads and subcategorises all ur commands based on folders, and it has deep searching

#

thats ONE thing

#

now heres the next

crimson vapor
#

deep searching?

opal plank
#

this is the command handler they have

#

PER command

#

now, this is options JUST for the commands

crimson vapor
#

ah thats cool

opal plank
#

you get options on the handler too

crimson vapor
#

yeah for discord-rose I need to do that manually

opal plank
#

never again do shit in d.js

#

just start your client with the target commands folder

#

it'll auto import everything for you

#

no more on.message listeners

#

no more adding disgusting readfileSync shit on ur code

#

this does all that internally

crimson vapor
#

what is readFileSync used for huh

opal plank
#

detritus makes d.js look like underdeveloped

#

to read the folder n shit

crimson vapor
#

wait erwin you use vsc on like 75% zoom?

opal plank
#

readFolderSync or some shit like that

#

i do, yes

#

my screen is too big to have it on 100%

crimson vapor
#

do you open 2 files at the same time?

#

oh

#

I only go on lower zoom when I need to see more files

opal plank
#

this is just one of my screens, i usually run it on my 4k tv

crimson vapor
#

oh

#

makes sense

opal plank
#

which is vertical

crimson vapor
#

ah

opal plank
#

but its kind of a pain to keep it stable

#

i dont have a proper hold for it

#

so its tilted on the back of a box i have

#

lul

crimson vapor
#

lmao

icy skiff
#

How can I link the bot's patreon with the bot itself so Patrons get rewards? The only thing I found was to give special roles to patrons but that's not exactly what I'm looking for

solemn latch
#

you can use their api to get patreon supporters discord ID

icy skiff
#

But what if the person supporting doesn't have the discord account linked to patreon

solemn latch
#

then they should link it

icy skiff
#

Fair enough

#

Thx for the help

mental flume
#

Hello. I have following issue: I started my bot verification process, and there's one field asking me for my bot infrastructure. What does that mean? :D

quartz kindle
#

its where your bot is hosted, what kind of software does it run on, etc...

mental flume
#

Thank you!

lament rock
#

When is node gonna start sending a signal interrupt to a process which doesn't handle a promise rejection

#

it's been years

rare trail
#

my bot got approved on top.gg like yesterday, and it already reached 250 guilds, but i can't verify it cuz suspicious growth, how much time i need to wait to verify it?

modest maple
#

normally a few weeks i think

solemn latch
#

its best to ask discord related issues in the dev server

lyric mountain
#

also, why tf you have more than one style tag?

#

style inside style

solemn latch
#

stylish styling

lyric mountain
#

you open it three times and close twice

#

I have several questions

solemn latch
#

probably not a good idea to copy paste examples online

#

especially with css

quartz kindle
#

ex deedeedee

glossy spoke
grizzled raven
#

mans minifying css from the start kekw

obtuse jolt
#

Tim

#

I need big brain here

#

This is more of a how tf do it do it instead of how do I fix

opal plank
#

@quartz kindle

#

check this meme out

#

its on prod rn, cant even bitch about it

lucid prawn
glossy spoke
#

Show the code where the error is

lucid prawn
#

idk when the error is on my code

hidden osprey
#

Turns out Js has a built in stringify function

let number = 3;
number = number+""

for me that's very cursed

glossy spoke
#

You can't do that

hidden osprey
#

u can

glossy spoke
#

You are trying to change a const's value

hidden osprey
#

ah yes bery stoopid

lucid prawn
opal plank
#

lmao its even lower

#

4x less ram than d.js, jesus christ

quartz kindle
obtuse jolt
#

huh what

#

Pings

#

Wait hold on let me read what I said again

opal plank
#

tim didnt read my msg

lucid prawn
quartz kindle
opal plank
#

its going down instead of up lmao

quartz kindle
#

was busy reconfiguring my nginx and my fail2ban

#

nice

opal plank
#

legit though, its insane

#

4gb down to 850mb

quartz kindle
#

ye

#

how's rss vs heap?

opal plank
#

thats rss, let me eval heap

quartz kindle
#

eval heap in djs as well if you still have it running

opal plank
#

i dont have d.js running anymore

#

i just pushed the rewrite to prod

quartz kindle
#

rip

#

you dont have any record of heap in djs?

opal plank
#

not heap, no, i just log rss

quartz kindle
#

because its quite possible that djs's memory usage is just rss bloat

#

and that heap is not that much different

opal plank
#

its still going down

quartz kindle
#

ye

#

gc cleaning up the initial volume from login

opal plank
#

i need to figure out why this aint working tho

obtuse jolt
# quartz kindle wut

Alright so, in short, I have a url shrinker, that has an api and sharex integration, I get asked a lot about custom user url integration, and I tried it today, to no avail, my theorised system is to have users set a domain CNAME as [their account id].mydomain.org which did work as it went straight to a plesk default page, now my only issue it that, I have no idea how the fuck to control these domains as all my efforts just send the domain to a default page, I don’t have ssh access to the origin server and I only have user level access to a plesk panel

opal plank
#

oooh

#

i see why

#

find takes a function

#

why the heck did my compiler not screech about that?

quartz kindle
quaint wasp
#

But my code is this.

#

client.on("guildCreate", guild => {
  guild.member.cache.size()
  console.log(`New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
  
  const newSC = "810687273963225128"
  
  const Discord = require('discord.js')
  const newS = new Discord.MessageEmbed()
    .setColor('#FF0000')
    .setTitle('NEW SERVER JOINED')
    .addField('MEMBERS', guild.memberCount)
    .addField('NAME', guild.name)
    .addField('ID:', guild.id)
    .setFooter('Time joined', client.user.displayAvatarURL())
    .setTimestamp();
    client.channels.cache.get(newSC).send(newS)
});```
opal plank
quaint wasp
#

wow.

opal plank
#

its still going down

quaint wasp
#

is that bad?

opal plank
#

no, thats great

quaint wasp
#

oh

opal plank
#

d.js was using around 4GB of ram for 400k users and 2k servers

#

with detritus, its using 810mb

quartz kindle
opal plank
#

add 100mb if you want

#

thats still a shitton less than d.,js

quartz kindle
#

yes

opal plank
#

all metrics have been ported too

#

had some hiccups on the metrics but not on the bot

obtuse jolt
#

Fuck Tim has failed me

opal plank
#

but finally, its all back on its full gloriousness

honest perch
#

Nice graphs

quartz kindle
honest perch
#

Grafana?

quartz kindle
#

try adding a wildcard subdomain with the same root dir as the main domain

opal plank
opal plank
honest perch
#

I should probably try attempt 32 at setting up grafana at some point

opal plank
#

theres even more metrics below tho

#

it just doesnt fit all in 1 screen

#

gotta scroll down

honest perch
#

Also out of curiosity how are you storing the info the the graphs?

quartz kindle
opal plank