#development

1 messages · Page 101 of 1

lyric mountain
#

You shouldn't await in a map

wheat mesa
#

Me when “don’t use an async function in a .map”

quartz kindle
#

wtf is this

hushed robin
#

tim said i can tho

wheat mesa
#

He really didn’t

hushed robin
#

☹️

wheat mesa
#

It’s not

lyric mountain
#

He said u can await in a loop

#

.map ain't a loop

#

It's a mapper

quartz kindle
#

i mean

hushed robin
#

😐

quartz kindle
#

honestly its not bad

#

its just missing an await

hushed robin
#

where

quartz kindle
#

on tje Promise.all result

wheat mesa
#

But he’s still using an async function in a .map

#

😭

quartz kindle
#

it doesnt matter much

#

its mapping tjem into an array of promises to feed into promise.all

wheat mesa
#

Also why is setExperienceCache async

hushed robin
hushed robin
wheat mesa
#

That sounds like a synchronous map operation

#

Ah ok

hushed robin
#

so i need to await it

quartz kindle
hushed robin
quartz kindle
#

no

wheat mesa
#

💀

hushed robin
#

bruh

quartz kindle
#

topList = await Promise.all

hushed robin
#

you said after the result

#

well

#

um

#

it slightly works

quartz kindle
#

if you do await topList.join() yoi are awaiting the .join, not the topList

hushed robin
#

actually

#

it does work

quartz kindle
#

await applies to the last thing in the chain

hushed robin
#

it's just an issue with the data that i can fix myself

#

ty guys

#

w

quartz kindle
#

if you want a oneliner using await, you need to put () around the thing you want to await

#

(await topList).join()

#

bjt you dont need to await twice, so if you already awaited Promise.all() no need to await topList again

hushed robin
#

what is this file better sqlite makes

neon leaf
#

why does this return Value even if fallback isnt provided? It should give Value | undefined in that case

earnest phoenix
#

How to do an ip whitelist for tog gg webhook

rustic nova
#

it depends on what you're using for your webhook, if your webhook is behind cloudflare, just use cloudflare for it

#

check cloudflares docs

earnest phoenix
#

That's not valid at all, what are you talking about?

radiant kraken
#

implicit copy perhaps?

earnest phoenix
#

I'm talking about your cleanup arrow function

#

void = ... is invalid

radiant kraken
#

it's TypeScript

#

read it again

earnest phoenix
#

Oh, I didn't notice the colon after cleanup and completely misread the first part

#

The function is copied, so changing/deleting it doesn't affect the handler

radiant kraken
#

hm

quartz kindle
rustic nova
#

then look up on how IP-Whitelisting works on your webserver, depending on what you're using

#

apache2, nginx

#

if you're using a library that does whitelisting, look up the docs if it supports something like that

#

though using cloudflare is your easiest way to do it

neon leaf
boreal iron
#

Imagine registering an account over there, figure the shit out and pass through your connections

#

The easiest way on any OS is to DROP incoming connections not using the topgg source IP

deft wolf
final tangle
#

how can i get the bot developer role, my bot is on top.gg

wheat mesa
#

ask a mod in #support, it should've been given to you automatically but sometimes it doesn't go through

final tangle
#

alright

neon leaf
#

does anyone know why it isnt inferring the zod Body correctly? it shows as AnyZodObject even though its supposed to infer the provided type

lyric mountain
#

Holy that's verbose

quartz kindle
neon leaf
#

this was my final solution which worked

wheat mesa
#

Sanest obscure typescript library user

quartz kindle
#

you can create a typeguard function by returning boolean and using the is keyword

ashen prairie
#

hey guys is there any bots that allow you to follow channels that aren't announcement channels?

lyric mountain
#

That's kinda specific, so I don't think so

#

Especially for how easy it'd be to crash such bot

#

But shouldn't be hard to make that feature yourself, just don't follow very active channels

ashen prairie
#

well but the thing is id have to use my account since the bot isnt in that server

#

i dont think thats allowed

spark flint
#

yeah thats self botting

hushed robin
#

yes

spark flint
#

not allowed

hushed robin
#

why you wanna follow it

#

just look at channel

lyric mountain
#

It'll make no difference for them if it's indeed a notifications channel

ashen prairie
#

they usually say no

lyric mountain
#

Open a new discord tab then

#

You can't mirror the channel if it has enough movement

#

Even with bots it'd crash in a few minutes

#

Not even discord news channel would work since they have hourly ratelimit too

uneven tartan
#

@lyric mountain

#

cmere

#

or @spark flint

spark flint
#

hi

lyric mountain
#

Shoot it

uneven tartan
#

okay

#

i need to

#

check if anyones nickname

#

contains the word brenda

#

BUT

#

it can either contain or not contain spaces

#

eg brendaIsCool or brenda is cool

spark flint
#

wdym like spaces between letters?

#

oh ok

lyric mountain
#

string.toLowerCase().contains("brenda")

uneven tartan
#

will that work

spark flint
#

lmfao yeah that

uneven tartan
#

no shot

lyric mountain
#

Lul

spark flint
#

or if regex

#
/(\s|^)brenda(\s|$)/i```
#

iirc

#

idk if i've done that wrong

uneven tartan
#

HMMMMM

lyric mountain
#

Can also replace all spaces with nothing

uneven tartan
#

it seems

#

to me that

#

member.nickname.toLowerCase().contains is not a function

spark flint
#

.includes

lyric mountain
#

Try includes then

spark flint
#

i made that mistake the other day

lyric mountain
#

Idk why js uses includes instead of contains like any other language

spark flint
#

its .includes not .contains but idk where i got .contains from

#

lol

lyric mountain
#

Also nickname might be null

#

Use effectiveName or whatever it is in djs

#

If there's none then use the null coalescing operator

hushed robin
#

displayName

wheat mesa
#

I’m so used to Java

neon leaf
#

why am I getting this even though im only using 146905 / 524288 file descriptors?
trying to start a vite dev server

wooden ember
#

is message.content.toLowerCase().includes("words" || "other words" || "another couple words") the way you are supposed to to that or would putting the words in a separate array be better?

#

the intention is just making a small auto response thing so when some one says for example, some version of "goodnight everyone " the bot will respond to it

wheat mesa
#

.includes is meant for a single string, what that is doing is supplying it a boolean

#

It might run due to implicit casts, but it definitely won’t produce the output you want

wooden ember
#

I've not tryed to run it cuz it didnt look like it was gonna work

wheat mesa
#

Yeah it won’t

#

You’ll likely need to loop through an array to do what you want here

#

array.some(s => message.content.includes(s)); is probably what you’re looking for in your condition

wooden ember
#

mmmm see the code that I was inspired by was some how worse

#

thought I could make it more compact

wheat mesa
#

yeah that works too but the array.some method is going to be a lot more compact

#

it does the same thing though

wooden ember
#

nice

#

in a perfect world I would make it so that the auto responces would be in their own command files but that would require more code than just slipping it into the message even file

wheat mesa
#

guildCreate

#

guildDelete

#

👍

surreal sage
#

top 10 most readable code

warm surge
surreal sage
#

gettin there

#

tryna get a "coded" version of my banner

#

ggs

lament rock
#

Seeing code in languages other than english is so cursed to me wtf

surreal sage
#

i'm not even japanese

#

im fuckin 9k kilometers away lol

#

zero banzai in my blood

hushed robin
#

is it possible to get the name of an autocomplete option

lyric mountain
#

You technically already have it

#

Given you're the one declaring the autocomplete

hushed robin
#

well i do

#

but i'd have do a database query to get it ☹️

solemn latch
#

👀

hushed robin
solemn latch
#

I have no idea, storing it in a variable? 🤷

Its hard to know exactly without knowing the design goals, and what you have.

hushed robin
#

i wanna know if its possible to get it from the api i don't wanna store it anywhere

#

i know the API returns the value, but does it return the name too?

solemn latch
#

Like on an autocompleteinteraction?

hushed robin
#

no

#

slash command

lyric mountain
#

How are u even getting the field value without its name?

lyric mountain
#

To get the field value, you need to know its ID right?

hushed robin
#

there ain't no id

lyric mountain
#

How are u even getting its value then?

hushed robin
#

wym

lyric mountain
#

Afaik slashes don't work with positional arguments

#

They work with named arguments

hushed robin
#

interaction.options.getInteger('id'); this is how i get the value

#

but i want the name

lyric mountain
#

There, the id

hushed robin
#

well that's not an id

#

the name of the option is id

lyric mountain
#

That's literally an id

#

Ids don't need to be numbers

#

They just need to be unique

hushed robin
#

yes it's literally "id"

#

but that doesn't help with my question

lyric mountain
#

It does actually, if you have the id you can retrieve more info about it through the slashes endpoint

hushed robin
#

the id of what

lyric mountain
#

The id named "id"

hushed robin
#

...

lyric mountain
#

Retrieve that slash using the endpoint, then grab the param named "id"

hushed robin
#

id isn't a slash commands id

lyric mountain
#

I know

#

Tho using the api will be much less efficient than simply saving info about the commands somewhere

hushed robin
#

...

#

i think your misunderstanding

#

what i wanna do

lyric mountain
#

You want the display name of that param right?

hushed robin
#

no

lyric mountain
#

Explain then

hushed robin
#

well i have

#

but i will again

#

when a user is running my command there is a option named id, which is an autocomplete option
when they type, i send choices with a "name" and "value" to discord based on what they're typing
when they send the command, i can get the value of their choice with interaction.options.getInteger('id'), however, i was wondering if it's possible to get the name.

lyric mountain
#

I still don't get what you want

hushed robin
#

...

lyric mountain
#

You say you can get the value with that code, but u also want the param name right?

hushed robin
#

what are you not understanding

lyric mountain
#

Param being the autocomplete

hushed robin
#

i want to get the name of the choice they're picking

lyric mountain
#

Isn't that what discord already returns?

hushed robin
#

no

#

it returns the value

#

but i'm wondering if it returns the name too

#

so i can use it

lyric mountain
#

Did u try printing the interaction to console?

hushed robin
#

no

lyric mountain
#

Then do it

hushed robin
#

why

lyric mountain
#

If the value exists, it'll appear there

#

Else it's not available

hushed robin
#

well

#

that sounds like too much extra work when it's a yes or no question

lyric mountain
#

I can't say yes or no because I don't fuckin use d.js

hushed robin
#

ok

#

someone else can

lyric mountain
#

Can't u even try something yourself for once?

hushed robin
#

i try a lot of things

lyric mountain
#

Do you need to rely on someone else trying it to give you a pre-chewed answer?

hushed robin
#

yes

lyric mountain
#

Literally print the thing to console, it's literally one fucking line

hushed robin
#

fine

#

☹️

lyric mountain
#

Good

#

And whenever you want to know if some property exist, do that

hushed robin
#

ok i did it

#

and it doesn't ☹️

lyric mountain
#

What did it show?

hushed robin
#

only the value

#

😢

lyric mountain
#

Well, then that's it

hushed robin
#

i want the name tho

#

why discord so dumb are they so lazy that they can't just send both

lyric mountain
#

Because 99.9% of the time the display name is useless

cloud relic
#

facts

lyric mountain
#

Since u already know the names beforehand

hushed robin
#

ok another question

#

how long is too long for canvas to generate an image

lyric mountain
#

Depends on what you're generating

hushed robin
#

ok

#

i'll send screenshot

lyric mountain
#

As tim said, most of the time will be spent doing I/O operations

#

Which is why you should cache resources if you want speed

hushed robin
#

this takes like 150ms to generate

lyric mountain
#

I bet 140ms is just retrieving that thumbnail

hushed robin
#

possibly

#

let me see

#

thumbnail is like 60ms

#

however

#

i also load the chart as an image

cloud relic
#

how long did it take yalls bot to get approved?

hushed robin
#

right now it takes ~2 weeks

wheat mesa
#

Current wait time is 1-2 weeks with 2 weeks being more of the average

hushed robin
#

top is thumbnail
middle is chart
bottom is total

#

why does the chart take so long to generate

wheat mesa
#

You tell us, what data are you fetching to generate these charts

hushed robin
#

well the time to fetch the data is not including in this

#

thats just generating the chart itself

wheat mesa
#

Show what you’re doing

hushed robin
#

the chart?

wheat mesa
#

Yes, show where you start the timer to where you stop it

hushed robin
#

loading the chart doesn't take much time at all

#

like 1ms

wheat mesa
#

Doesn’t help very much since I don’t know what those functions do

hushed robin
#

well

#

you said the timers

#

lol

wheat mesa
#

Well yeah but I was expecting some actual code, not just like two function calls

hushed robin
wheat mesa
#

Just as an experiment, try removing the registerFont call and just use the default font

#

Since that’s (most likely) an IO operation, that could be the slowest thing to call

hushed robin
#

sure

#

didn't do anything

#

it's basically the same time

wheat mesa
#

🤷‍♂️ not sure then

#

Might just be a slow library

hushed robin
#

hm

wheat mesa
#

Haven’t ever used it though

hushed robin
wheat mesa
#

I don’t know, I haven’t used canvas libs or chart libs at all

#

Keep in mind that “slow library” comment was just speculation

#

Someone more experienced with these libs might know what you’re doing wrong

hushed robin
#

hm ok

#

is there really no way to make the icon load faster except caching

#

cus in reality there won't be many times someone requests the same thing twice

wheat mesa
#

If you’re requesting it from an API there’s not much else you can do

#

Caching is used everywhere for everything because it’s way faster than constantly requesting things from an API

hushed robin
#

well i don't constantly request things from the API

#

the image url itself is cached

wheat mesa
#

So then how are you “getting” the image data

hushed robin
#

every hour my bot fetches data from the api and stores it in my db, while i'm at it i cache the data

earnest phoenix
#

read the docs

#

which library

cloud relic
#

I’m mostly a python, c# developer but how is discordjs different from nextcord py (obviously the code, etc)

earnest phoenix
# cloud relic I’m mostly a python, c# developer but how is discordjs different from nextcord p...

discord.js is completely different compared to Nextcord.py (Nextcord.py is a fork of discord.py, which you honestly shouldn't use as discord.py is maintained again), and you're comparing Python to JavaScript which is also vastly different, discord.js has an official guide website that walks you through the simple steps and tells you how to make a Discord bot with it along with some useful stuff: https://discordjs.guide/

#

But of course, you should learn JavaScript before jumping into making Discord bots with discord.js as the discord.js guide already mentions at the start

cloud relic
#

I know some from my front end days

#

But thanks!

earnest phoenix
#

See images, links, etc. Google is your friend

rose warren
#

ChatGPT for coding is actually pog

wheat mesa
#

lvl_calc + 1 - 1 lol

rose warren
#

Yeah it did something weird but it got the answer for me

#

If it works... darkShrug

#

Good enough for me

wheat mesa
#

Yeah it’s almost like a more advanced rubber duck

#

Twice the value for explaining your problem to it lol

rose warren
#

I'm so bad at math I knew I had to square it but I didn't know how

#

So ChatGPT saved me

#

lol

#

This is so pog

wheat mesa
#

I should ask it questions about how to do some of the calc concepts I don’t understand lol

#

Probably pretty well documented throughout the 300-400 years it’s been around

rose warren
#

I had seen people talking about asking it to do coding on Twitter but today I was stuck and instead of googling I thought it's try it

#

I'm genuinely impressed

#

But I'm also afraid beginners wouldn't take the time to understand what's happening in the answers

#

It's like an instant stackoverflow answer

#

Much spoonfeeding

hushed robin
#

common chat gpt w

#

i be using it for everything 😎

rose warren
#

I'd love a chatgpt version of copilot

hushed robin
#

true copilot is useless most of the time

#

very rarely it actually does something right

spark flint
#

i tried that query

#

it gave me very incorrect responses

#

i was trying to calculate mee6 levels since i scraped 200k+ levels from mee6 for combat warriors

solemn latch
spark flint
#

lol

#

yeah i gave up

solemn latch
#

bing ai is a bit better at math, but also gets things wrong sometimes.

I have given it some really complex scenarios(multiple paragraph explanation of what I wanted) and gotten correct answers which was really cool.

spark flint
#

i might have to try bing ai

solemn latch
#

I'm finding it really useful for errors, it does a good job understanding context and finding a stack overflow answer.

#

(and linking to it is so nice)

hushed robin
#

<guild>.memberCount

rose warren
#

members ≠ people who use your bot

hushed robin
#

oh

#

total

rose warren
#

yeah

hushed robin
#

client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
this is what I use

rose warren
#

Like my bot has 7,624,921 "members" but 34,000 MAUs

#

Yeah

wheat mesa
hushed robin
#

my bot has 750k members but only like 70 people have actually touched it

rose warren
#

It's like 1 active user per 2 guilds which on average is good considering most guilds are probably old dead abandoned ones people don't use anymore

#

I believe it's from 75 onwards?

hushed robin
#

if you have the Guilds intent they'll be cached

spark flint
#

76

#

at guild 76 you'll get a DM from discord

rose warren
#

yeah ok bun

spark flint
#

lol

rose warren
#

same thing

hushed robin
#

discord is slow

spark flint
#

smhh

hushed robin
#

i submitted verification 12 days ago ☹️

solemn latch
#

It means nothing really

hushed robin
#

just a ☑️

#

and no guild cap

spark flint
#

and means discord has your real name SickBro

earnest phoenix
#

Technically it doesn't

spark flint
#

yeah nothing bad

earnest phoenix
#

Stripe has it

#

Not Discord

hushed robin
#

er

spark flint
#

which means discord still has access to it

hushed robin
#

whats discord going to do to me

earnest phoenix
#

They don't actually

spark flint
earnest phoenix
#

They were pretty clear about it, so did Stripe

hushed robin
#

what

#

kinda useful

rose warren
#

Discord has got very good at catching phishing links before they even get to the servers now

hushed robin
#

phishing links usually change a lot and discord has builtin automod now

rose warren
#

We used to use ZeroTwo for that but it didn't detected anything for months since Discord released better spam protection

solemn latch
#

👀 have we even had a phishing link here in awhile?

hushed robin
#

luca is a zombie

#

half dead

sharp geyser
rose warren
#

If that's all it does then yes. Discord already handles 99.99% of these now.

#

Moderation bots are becoming pretty useless

sharp geyser
#

Imagine discord not stealing a popular bots idea and making it useless and implementing it themselves

solemn latch
rose warren
#

Well it's actually a good thing. I'm glad they did.

solemn latch
#

Moderation should be handled discord side

rose warren
#

Yes

#

Agreed

solemn latch
#

bots which do moderation tasks are a risk

sharp geyser
#

Indeed, I am also glad

rose warren
#

Moderation bots only needed to exist because Discord was doing such a bad job with phishing and raids

sharp geyser
#

Isnt their auto mod still kinda buggy?

rose warren
#

Now that Discord are improving on that, the moderation bots are becoming pretty pointless

#

I haven't experienced any issues with automod here

#

It even accepts regex now

civic scroll
#

REGEX

solemn latch
#

and theres the new ai automod, which for a server like ours might not be super useful but a lot of servers that will be perfect.

civic scroll
solemn latch
#

👀 theres a ton to do today tbh

rose warren
#

I mean, large, traditionally moderation-oriented bots like MEE6 are moving towards monetising communities and offering AI and other tools now because they know moderation is a dead path to stay on.

sharp geyser
#

thats because of how saturated the bot market is now

#

All those multi purpose bots that got made to be a carbon copy of another

rose warren
#

Game bots

#

AI

#

Image generation etc

sharp geyser
#

Those are all already done mac

rose warren
#

Please god not another card game bot

sharp geyser
#

Lmfao

#

time to make a TCG just for mac

rose warren
sharp geyser
#

Always have the option to use already trained models

#

I was originally planning on using AI for auto mod in one of my mod bots back in the day

#

but got too lazy

rose warren
#

card game but all the cards are top.gg staff and past employees

#

pls

sharp geyser
#

alright

solemn latch
#

I'm playing around with some stat tracking stuff.

For example, an Iframe users could put on all their favorite botlists/serverlists and track viewcounts across platforms to see which ones are the most beneficial to their bot/server.

sharp geyser
#

Mac's card is worth 1 macaroni noodle

rose warren
#

no please dont kekw

sharp geyser
#

Matter of fact

#

ima do it

#

just not this year cause I have better things to do

rose warren
solemn latch
#

👀 yeah, I would think so.

rose warren
#

I track through the invite link

sharp geyser
#

thats cause top.gg is a fucking monopoly on this industry

rose warren
#

So actual conversions

#

YOS

#

MONOPOLY

sharp geyser
#

Hey mac is top.gg registered in america?

rose warren
#

PRINT ME PAPER MONEEEEEHHHH

rose warren
sharp geyser
#

Im talking about the company

rose warren
#

It's a Dutch company

sharp geyser
#

I assume you guys got an LLC or smth

solemn latch
sharp geyser
#

Oh you are so lucky it wasn't registered in America, we hate monopolies /s

rose warren
#

I don't know how the US stuff is handled but I believe we're just a trading name for Ferox / Medal over in the States

sharp geyser
#

We americans always lose at monopoly

rose warren
#

no

#

Isn't monopoly like the pinnacle of capitalism?

sharp geyser
#

yes

solemn latch
sharp geyser
#

We do?

solemn latch
#

our only laws are for anti consumer practices, which cover most monopolies.

rose warren
#

I would say the EU hates monopolies more than the US

solemn latch
#

but nothing specifically about monopolies

rose warren
#

Anyway we're very off topic for development here darkAYA

sharp geyser
#

We are developing our ideas mac

solemn latch
#

lmao

rose warren
#

Yes more brain cells are being developed here than in #general that's for sure

wheat mesa
#

Thought we had antitrust legislation

sharp geyser
#
#include <iostream>

int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

What do you guys think of my super advanced program?

wheat mesa
#

Ew std::endl instead of \n

#

Not blazingly fast

sharp geyser
#

😔

rose warren
#

pwned by chatgpt

sharp geyser
#

yea well

#

chatgpt is not human

#

it can't feel my emotions

solemn latch
sharp geyser
#

God I dont even wanna code in c++ rn

#

I just wanna read chinese/korean manga

solemn latch
#

its the weekend, be lazy

sharp geyser
wheat mesa
#

I spent my entire week being lazy because it was my spring break 😉

sharp geyser
#

I need to get a girlfriend

rose warren
sharp geyser
#

Make life more fun

wheat mesa
sharp geyser
wheat mesa
lament rock
wheat mesa
#

Yeah but I’m assuming this is an ideal environment where he’s not deploying his hello world application to multiple platforms lol

lyric mountain
#

endl flushes the buffer, so it'll heavily degrade performance if done too much

civic scroll
hushed robin
#

why's this happening

#

oh wait i'm dumb

#

nvm 😳

#

forgot to add breaks

#

and now i have another question. so i have lots of data and when viewing it on the charts it looks cluttered and hard to read, so i want to remove some of the points. would it be better to do it with sql when getting the data or removing them from the array after i get the data.

#

i tried to do it with sql but i can't find something that works with sqlite ☹️

lyric mountain
#

you won't find something that specific ready to be used

#

use your brain and write a query that merges every 2 rows into one

hushed robin
lyric mountain
#

you want to reduce the amount of data

#

you either limit the amount of rows or merge the rows into a single row

hushed robin
#

er

#

sounds like too much work, just ended up doing the second option

#

my bot is pretty much done now pog

slender wagon
#

import { FontLoader } from 'three/addons/loaders/FontLoader.js';
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';

how do i import such addons on nextjs

maiden gazelle
#

Hello, does someone know how i can make it that when the message is added to the database on line 188, it will send the doneEmbed on line 190

wheat mesa
#

man this is some crazy formatting

sharp geyser
#

just send it after you set?

maiden gazelle
#

yes

#

wait lemme explain

#

someone will choose a channel first

#

then the bot will say "enter a welcome message now"

#

then after someone entered the message the bot will say Done

slender wagon
#

so i am going to insert my discord status on one of my pages, what's the best way to approach that?

lyric mountain
#

your status or the bot status?

slender wagon
#

user status

#

this doesn't have to do with bots

lyric mountain
#

well, the only way would be querying discord

#

if ur ok with some imprecision, you can cache the status for like, 30 mins

#

that way you'd not need to fetch from discord all the time

slender wagon
#

uh so it's a website right how would that work would discord be fetched everytime a user visits the site

wheat mesa
#

Depends on how you’re sending the information. If your app sends that request every time that page gets a GET request, then yeah that would be a problem. If your app only sends a request every 30 minutes and then sends a cached version to incoming GET requests to that page then you’re fine

solemn latch
#

It wouldn't really need to be cached if you used a bot which only had this one purpose.
you could enable presence intent and it should always be cached correctly so you dont need to ever fetch your own status.

#

just get it from cache

lyric mountain
#

that'd only work for users that share a server with the bot

solemn latch
#

isnt it only their own account? 👀

#

also, dont you need to share a server to get status information?

lyric mountain
#

u can get through oauth2

#

I think

#

idk what they're planning tho, I imagine it's some kind of dashboard

hushed robin
#

judging by their status they're making a portfolio and want their status on it

hushed robin
#

guys i have two questions about canvas when hosting on ubuntu

  1. how can i make the emojis work
  2. how can i make the text not squished in
    (first image is windows, second is ubuntu)
lyric mountain
#

1 - emojis must be supported by whatever font you're using
2 - "squished"?

craggy pine
#

Only thing I can see that may be considered "Squish" is the text next to the thumbnail

hushed robin
#

all of the text is squished in a little

#

it’s very noticeable

#

and it’s the same font as you can see

#

but how do I make emojis work on Ubuntu

lyric mountain
#

use a font that support emojis

hushed robin
#

?

craggy pine
#

unicode fonts

hushed robin
#

it has emojis

#

look at the first image

#

it works on windows but not on Ubuntu

solemn latch
#

👀 does canvas use the default system font?

#

They may look very similar but ubuntus might be slightly less wide and not have emoji support?

hushed robin
#

that’s my own font

#

it’s the same one on windows and Ubuntu

lyric mountain
hushed robin
#

uh

#

forgot the name

lyric mountain
#

perhaps it's using a fallback font in the first case for the emojis, where in the second case that emoji doesnt exist or isnt mapped

hushed robin
#

what?

lyric mountain
#

emojis are mapped by the font, not OS

hushed robin
#

then why are emojis not working on Ubuntu

hushed robin
#

the emoji in the second image doesn’t exist?

lyric mountain
#

basically

#

the font doesnt support nor the fallback

hushed robin
#

idk if you can see or not but they’re the same things just ones ran on Ubuntu

#

they’re the same emojis

lyric mountain
hushed robin
#

so why isn’t it using a fallback font on Ubuntu

lyric mountain
#

because the fallback font might not support that specific emoji

#

iirc the fallback for windows is times new roman

#

which is extremely rich regarding emojis

#

idk which is ubuntu's

hushed robin
#

so I need to install times new Roman on Ubuntu?

lyric mountain
#

no

hushed robin
#

why

lyric mountain
#

times is proprietary to windows

hushed robin
#

bruh

lyric mountain
#

just find a font with better emoji support

#

like open sans

hushed robin
#

does open sans look ugly

lyric mountain
#

you're ugly

hushed robin
#

ok

#

what about the squished in text tho

lyric mountain
#

I see nothing squished

hushed robin
#

it is

#

by a few pixels

#

and it looks weird

lyric mountain
#

mind to circle it?

hushed robin
#

circle what

#

It’s all the text

#

it’s especially noticeable on the title

lyric mountain
#

circle what ur seeing squished

hushed robin
#

the text…..

lyric mountain
#

CIRCLE IT

hushed robin
#

lyric mountain
#

I'm not seeing anything off

hushed robin
#

well it is

#

If you put the two images on top of each other and turn down the visibility on one you can see it better

hushed robin
#

but it’s not just the title it’s all the text

lyric mountain
#

I think what ur calling "squished" is that the emoji isn't taking the same size

#

I really can't see a difference

hushed robin
#

#

there definitely is a difference

#

idk how your not seeing it

lyric mountain
#

Then circle it

#

Show what ur seeing different

hushed robin
#

well I’m not sure how your not seeing it because it’s all the text, but I’ll send a screenshot in a bit

#

not at my pc right now

lyric mountain
#

Perhaps you're just paranoid

hushed robin
#

how am I paranoid when the other guy saw it too?

#

and I put them on top of each other the Ubuntu one is definitely squished

lyric mountain
#

Which I already said, is because the emojis are different

hushed robin
#

Lmao

#

I’ll send a screenshot when I’m on my pc

#

💀

#

don’t know what type of screen your on that your not able to see it especially on the title where it’s really noticeable

final tangle
#

i literally don’t see any difference

hushed robin
#

🤦

#

imma send a screenshot soon

delicate zephyr
#

and setting up fonts on canvas is a royal pain in the ass

#

can take some jiggery pokery sometimes

delicate zephyr
hushed robin
#

no it’s not

#

trust me it is not

delicate zephyr
#

if you want eomoji font support / different emoji styling you should be installing emoji fonts like Tweoji

delicate zephyr
hushed robin
#

they’re different sizes

#

I literally put them on top of each other the windows one has a slightly higher height

delicate zephyr
#

font size, letter spacing, line height is entirely dependant on the font

hushed robin
#

they’re the same font

delicate zephyr
#

not to mention character styles

#

might be the same font

#

but are they the same font version

#

because that exists too

hushed robin
#

they’re exactly the same font

#

transferred the font file directly from my pc to the server

delicate zephyr
#

You mean

#

you transferred the font from a Linux system to Windows?

hushed robin
#

no

delicate zephyr
#

The other way around

hushed robin
#

yes

delicate zephyr
#

it doesnt really matter

#

windows manipulates fonts really weirdly

#

because it does all that accessibility crap

#

you shouldnt really be trying to compare how it looks on windows to linux... and realistically you should setup a dev environment for testing like that

hushed robin
#

so your saying windows is stretching the font?

delicate zephyr
#

yes

hushed robin
#

bruh

delicate zephyr
#

👏

hushed robin
#

how do I make it not stretch the font

lyric mountain
#

Given how fonts don't work in pixels but points might also be rounding issue no?

delicate zephyr
#

but windows also just does really fucky things with fonts

lyric mountain
#

Not that they should be comparing windows and linux anyway, since it'll not run on windows

#

...or will it?

hushed robin
#

yeah but I want it to look like how it does on windows

#

looks weird on Linux

lyric mountain
#

Just setup a dev env on ubuntu and either code remotely or use git

delicate zephyr
#

^^

lyric mountain
#

That way u can fine tune in the target system

hushed robin
#

does that make it look like how it does on windows?

lyric mountain
#

No

#

But you'll be able to tune it on-site

hushed robin
#

I don’t see a point in doing it then

lyric mountain
#

Why do you need it to look exactly like in windows?

#

What benefit is in it?

hushed robin
#

looks weird on ubuntu

lyric mountain
#

It literally look the same

hushed robin
#

no it doesn’t

lyric mountain
#

Nobody would notice even if it was 1cm wider

hushed robin
#

yes

#

someone did above

lyric mountain
#

They didn't

hushed robin
#

they did

lyric mountain
#

They said THE SPACE BETWEEN THE TITLE AND THE THUMBNAIL IS SLIGHTLY BIGGER

#

That's not saying "the font is different"

craggy pine
#

^

#

literally that's the only difference I seen

hushed robin
#

well it doesn’t look good

#

it looks worse

craggy pine
#

it looks fine.

hushed robin
#

no it doesn’t

lyric mountain
#

Maybe you're just tired and seeing things

wheat mesa
#

Sanest battleless interaction

hushed robin
#

how am I seeing things

lyric mountain
#

Among 4 people you're the only one seeing the difference

hushed robin
#

you saw the difference

craggy pine
#

sec ill make this easier for u

hushed robin
#

Luke saw the difference

#

there is a difference and it looks uglier

lyric mountain
#

Which I already said 4 times it's because of the different emoji

#

Emojis aren't monospaced

hushed robin
#

the text itself is a slightly different height

craggy pine
lyric mountain
#

I literally can't notice it

hushed robin
#

I can see the difference and it’s unseeable now

lyric mountain
#

That's called paranoia

hushed robin
#

☹️

wheat mesa
#

There is no difference

hushed robin
#

there is a difference

lyric mountain
#

Circle it

craggy pine
#

fix the fire emoji problem and they'll be identical

hushed robin
#

I’m not on my computer

wheat mesa
#

The 0 looks like 1 pixel more squished

hushed robin
#

all the text is more squished in

delicate zephyr
#

you're seeing things

wheat mesa
#

It’s not

hushed robin
#

im not

craggy pine
#

I see what hes talking about now, but its not THAT big of an issue.

wheat mesa
#

You’re paranoid

craggy pine
#

hold on ill make another gif.l

delicate zephyr
#

which isnt helping

wheat mesa
#

It’s like 1 pixel less in height

lyric mountain
#

The average user will just pass by without even noticing the color of tge chart

delicate zephyr
#

also, just so you know.... it wont matter what you're doing when most peoples pcs handle fonts differently anyway

#

lmao

craggy pine
#

Hes talking about the height changes

#

which is dumb

lyric mountain
#

Nobody will do forensics analysis on the image to find the difference

hushed robin
#

I’m rendering the images they’ll all be the same font

wheat mesa
#

There is a tiny difference between it, nobody is going to know

hushed robin
#

it’s a bot

lyric mountain
hushed robin
#

wow

#

🎉

lyric mountain
#

But that's undetectable unless you put in a fast gif like miyu did

hushed robin
#

I detected it tho

lyric mountain
#

99.999999% of the users won't

wheat mesa
#

Also it doesn’t even look bad?

hushed robin
#

it looks much worse imo

#

☹️

lyric mountain
#

Don't think so, the only way it'd look bad is if it was pixel-aligned with the "corrected" font

hushed robin
#

will every font be like that

#

slightly squished in on ubuntu

lyric mountain
#

What if it's the other way around?

#

Ubuntu is correct and windows is stretched

hushed robin
#

that’s what Luke said

lyric mountain
#

You spend so much effort in such a petty thing instead of important things, like learning how to optimize your chart or stuff

hushed robin
#

there’s no way to optimize my chart

#

Waffle already checked it out I’m literally just doing the bare bones with the library

#

lol

#

and this isn’t a petty thing it’s a design flaw 😢

lyric mountain
#

Also the user will never notice the difference, know why?

#

They don't have the other side to compare against

#

They'll only ever see the ubuntu version

hushed robin
#

😕

#

very sad moment that this issue is not fixable

#

but I thank you guys for the help and eventually seeing the height difference after some convincing

lyric mountain
#

Now don't be such a douchebag

#

I only saw the difference because miyu made a very fast gif

#

The difference is literally unnoticeable if you're just looking at the images

hushed robin
#

yes but instead of believing me because I’m definitely making up that they’re different heights you call me paranoid 👍👌

lyric mountain
#

You literally didn't give a single proof that there was a difference

#

And yes, you're paranoid

hushed robin
#

im not paranoid

lyric mountain
#

You are

craggy pine
#

very

hushed robin
#

no im not

lyric mountain
#

You're as paranoid as someone who say water and dihydrogen monoxide taste different

hushed robin
#

no you guys just can’t see

#

it was very noticeable

lyric mountain
#

If everyone is "wrong" perhaps you need to reconsider whether you're right

hushed robin
#

you were literally wrong tho

lyric mountain
#

The common denominator here is you

hushed robin
#

☠️

lyric mountain
#

I said I can't see a difference

hushed robin
#

yes you were

lyric mountain
#

I couldn't and still can't see the difference in the original images

#

The only way to see something is if you zoom in and make a gif with it

hushed robin
#

hm

#

that’s possibly true

lyric mountain
#

Not possibly, it IS true, nobody saw a difference without miyu doing it

hushed robin
#

but what was I wrong in exaxtly?

lyric mountain
#

You were wrong saying it's a very clear difference

hushed robin
#

because it is to me

#

do you think I just randomly decided to compare the size difference of them?

lyric mountain
#

Yes

hushed robin
#

I didn’t

lyric mountain
#

The user won't be able to compare

#

But anyway, I won't argue since that'll just inflate your childish ego

hushed robin
#

I don’t have an ego you just think you’re always right

#

if anything you have the ego

#

🤠

craggy pine
#

lol

#

thats funny bec kuu doesn't.

hushed robin
#

he does

#

how am I wrong in this situation when you guys are saying there’s no difference when there was?

#

👍perfect sense

craggy pine
#

Okay. Theres a big difference between "There isn't a difference" and "I can't see a difference" we wernt stickly saying you were wrong with the difference, hell I even pointed out in the beingging about the spacing between the text and image. The thing we are saying is that is not as big of a deal that you made it and now you're being childish.

lyric mountain
#

So miyu, how's the bot going?

craggy pine
#

haven't worked on it much as of late. its still running, but I've considered shutting it down due to motivation and saving money on vps costs.

lyric mountain
#

Working on any other hobby?

craggy pine
#

Going through c++ courses atm. Trying to expand into more advanced languages

lyric mountain
#

Courageous

#

Cpp honestly ain't that bad if you avoid winapi and setup a good error logger asap

craggy pine
#

Well, idk what I really plan on using it for. Maybe build apps? Exploring game hacking stuff? Idk, but it interested me for some reason.

hushed robin
lyric mountain
#

Figure it out

hushed robin
#

wrong once again ☹️

lyric mountain
#

Figure 👏 it 👏 out

#

When you become less egotistical perhaps I'll spend effort trying to help you again

hushed robin
lyric mountain
#

Then find something that works

hushed robin
#

i'll find a solution regardless

lyric mountain
#

Yes yes, spit on the plate you just ate

#

You'll go very far that way

hushed robin
#

🤣

#

i'll go very far

#

fixed it w

wheat mesa
#

Don’t bite the hand that feeds you

delicate zephyr
#

ignorant and egotistical developers tend to not go very far

hushed robin
wheat mesa
#

because then that hand won't feed you anymore

hushed robin
#

nice

#

there's always another hand

wheat mesa
#

until you run out of food that you like eating

delicate zephyr
#

Yea but people won't make the same mistake twice

#

it's as simple as don't be a dick lol

hushed robin
#

billions of guilds

#

running out would be hard ngl

delicate zephyr
#

people try to help you and if they get it throw back in their face you're sure as hell gonna get a reputation that'll mean people will just ridicule you instead

hushed robin
#

😢very saddening

wheat mesa
#

"aw man I guess I'll be a dick to people just because there's other people 😢"

delicate zephyr
#

shrug also I just checked out your website @hushed robin

delicate zephyr
#

I like being flashbanged every time I go to a link of yours that redirects

#

lmao

#

please fix

hushed robin
#

no

#

too difficult

#

not worth the time

delicate zephyr
#

"too difficult" when you literally don't need to have that there bruh

#

it's like one of the simplest things to do

#

lmao

#

but aight

hushed robin
#

would there be any benefit to doing that?

#

probably not

delicate zephyr
#

user experience would be better

#

considering you were going ape shit about a 1 pixel difference before

wheat mesa
#

is there any benefit to being a dick to devs helping you? no, but you still do that :p

hushed robin
delicate zephyr
#

from a dark background to a while background

#

why not just go directly to the link without the redirecting screen

hushed robin
#

cus

#

idk how to do that

#

if i did i would

#

🫡

delicate zephyr
#

You're joking right?

hushed robin
#

no

#

i am a beginner dev

delicate zephyr
hushed robin
#

whats wowing

plain talon
#

the fact that its very simple to go

html,body{
  background: black;
}

on your redirecting page to avoid it

delicate zephyr
#

its so easy to just 302 to a link with 0 white page

civic scroll
#

what

#

i see css

#

oh

#

flashbang

radiant kraken
# civic scroll flashbang
html, body {
  margin: 0px;
  background-color: #ff0000;
}
``` ![sdTroll](https://cdn.discordapp.com/emojis/887041360413212692.webp?size=128 "sdTroll")
#

@earnest phoenix @quartz kindle should enum values be PascalCase or UPPERCASED_SNAKE_CASE? ```ts
enum First {
SomethingThat,
IsVeryInteresting
}

enum Second {
SOMETHING_THAT,
IS_VERY_INTERESTING
}

earnest phoenix
#

PascalCase, just like macros

radiant kraken
civic scroll
lyric mountain
#

I use screaming snake too cuz you can instantly notice which values are contants/enums

radiant kraken
#

so should i use the first or second

lyric mountain
#

personal preference, I just find the second more obvious

spark flint
#

the typedream link advertises typedream lol

old cliff
#

anyone knows any lightweight summarization model?

slender wagon
slender wagon
civic scroll
#

pascal case is more like constructor names

#

so it's not that fitting

earnest phoenix
#

it's still a common convention for TypeScript enums to use PascalCase for their values. But, if you prefer a different convention, you can use it as long as you're consistent throughout your codebase

civic scroll
#

enums in ts are constants

#

usually global constants

#

so it's worth setting it as screaming snake case

earnest phoenix
#

the values of an enum are fixed and cannot be modified at runtime

wheat mesa
#

Enum name scheme is basically just preference between pascalcase and screaming snake

#

It doesn’t matter all that much

earnest phoenix
#

so, for me, using PascalCase for enum values is a convention that makes the enum values stand out and be easily recognizable as constant 🤷

civic scroll
#

pascal - class / interface names
camel - variables, functions, methods and mutable fields
screaming snakes - constants (global constants, enums, static class fields)

civic scroll
earnest phoenix
#

understandable

#

lmt using it

#

might change my opinion

civic scroll
#
if (env.type === EnvironmentType.LACKS_CRITICAL)
    new WarnConstructor(...args, _class.ENVIRONMENT_ARGS).dispatchSend()

is more recognisible than

if (env.type === EnvironmentType.LacksCritical) 
    new WarnConstructor(...args, _class.EnvironmentArgs).dispatchSend()

imo

lyric mountain
#

especially when highlighting is poor

#

like discord

earnest phoenix
civic scroll
#

constructs are not global constants

#

being able to differenciate between types of fields is important imo

earnest phoenix
#

like ts

civic scroll
#

i used to write in enviroments that lacks syntax highlighting

civic scroll
#

more like an intrinsic constant

#

so screaming case for me

#

but say in rust

earnest phoenix
civic scroll
#

rust enums can be constructed with values defined in enums

#

in that case, it's used with pascal case

wheat mesa
#

Rust enums are different though because they act more like genuine structures than ts enums

earnest phoenix
delicate zephyr
#

Surprised they dont just use github pages

#

lmao

spark flint
#

lol

lyric mountain
#

NICE, at last

#

took me more time than I expected

civic scroll
wheat mesa
lyric mountain
slender wagon
#

I've heard there is certain servers you can join and then you can use their api to get your status anyone can provide me with an url?

delicate zephyr
slender wagon
#

because serverless

delicate zephyr
#

You can literally use a cloudflare worker iirc

#

dont even need a gateway bot iirc

slender wagon
#

hmm

delicate zephyr
slender wagon
#

this is what i was looking for

#

ty

earnest phoenix
# civic scroll so screaming case for me

Note that even though it's personal preference, pretty much every big project uses either camelCase for enum values (such as kBitMask or constexprValue) but some use SCREAMING_SNAKE_CASE for legacy codebases

#

It appears that PascalCase is unusual for enum values, as well as the SCREAMING_SNAKE_CASE

wheat mesa
#

wtf people use camelCase for enums???

#

that's cursed

earnest phoenix
#

It has been used very thoroughly throughout big codebases, especially Google's projects

delicate zephyr
wooden ember
#

anyone know of i can use one one audio stream and send it to multiple discord VCs?

#

cuz the only thing i can think of atm is to stream the audio like those internet radio stations streaming mp3 and then just make a standard bridge from that to discord for each vc

#

but i really don't want to do that

#

I can recreate multiple sources but that would require a whole bunch of indexing and databace shenanigans

#

don't want to get into that just for a dumb audio command

#

any ideas?

#

and once again I have scaired off everyone from the development chat im this server with a question that is so niche that no one knows how to answer it

solemn latch
#

I would think its possible to do easily but buggy.

If discord lags on one stream I'd imagine something like this would cause weird artifacts on all streams?

wheat mesa
#

You would have to have multiple streams going to discord, no?

#

Since I don't believe there's a way to only send one stream to multiple connections

#

Could be wrong though

solemn latch
slim heart
wooden ember
#

so you just run a commands and you just get connected to the same source as everyone else/ send a coppy of the stream to each vc

#

if that makes sence

solemn latch
#

afaik, streams are linear. one stream can only be piped to one thing.
from what I understand they can be duplicated, but that's not really what you're asking for.

That stream could be duplicated on discords side to many voice chats, but that would require discord adding support for it.

lyric mountain
#

nice, managed to work with bezier

civic scroll
lyric mountain
#

that's cuz bezier

#

java's default circle shape isn't really a perfect circle

#

actually, it is, just compared with the default impl

wooden ember
#

but then I would have to track each one so they get killed when the bot is kicked

#

and thats back to square one cuz I can just make multiple instances of the source comming in from the sound card

frigid robin
#

I see many people posted about topgg's DBLClient's get_user_vote function just hanging not doing anything. I get the same issue. I found no solution. Any idea? Maybe it won't work with AutoShardedBot object?

dblpy = topgg.DBLClient(bot, topgg_token)
vote = await dblpy.get_user_vote(message.author.id)
civic scroll
#

one way is to debug and see how it goes

frigid robin
#

Well it just runs in this loop until there's an aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected exception

civic scroll
frigid robin
#

Anyone else got any idea? T_T

earnest phoenix
lyric mountain
#

@wheat mesa need some help with opengl blending, it's acting weird when the backgrond is white vs when it's black