#development

1 messages ¡ Page 1965 of 1

earnest phoenix
#

Oh?

#

I didnt know there was such a thing

scenic kelp
#

replaces the escape character

earnest phoenix
#

what does an @ string do?

wheat mesa
#

string literals but literally literal

scenic kelp
#

so you can write windows paths like @"C:\Windows\System32\" for example

earnest phoenix
#

A lot of languages just have helper methods for formatting strings

#

which gets rather annoying

wheat mesa
#

surprised java doesn't have built in string interpolation at this point

scenic kelp
#

fr it's annoying having to memorize what formatters do what

earnest phoenix
#

and some cases it gets werid using formatters

scenic kelp
#

it really pisses me off that java can't do that but they can add other modern shit like switch expressions

#

like bruh???

#

you can't tell me that copying C#'s $ string would break backwards compatibility

#

you can implement it as a compiler hack that just replaces it with a String.format call

#

which is literally what c# does

#

(or at least used to do)

earnest phoenix
#

Having to do

formattedText := "There is " + fmt.Sprintf("%d", someNumberGotten) + "days left of school"
#

is annoying

scenic kelp
#

what lang is that?

quartz kindle
#

laughs in js

earnest phoenix
#

golang

scenic kelp
#

figured

earnest phoenix
#

It was the first lang that came to mind that I know how to make formatted strings

#

But the concept is there of what I was trying to get across

scenic kelp
#

can't you do fmt.Sprintf("There is %d days left of school", someNumberGotten)

earnest phoenix
#

Mmm true it was a bad example

scenic kelp
#

still gets the point across

#

that having to memorize %d is stupid

earnest phoenix
#

But in some cases you have to concat a formatted string

#

which gets rather annoying

scenic kelp
#

it's 2021 can't we do away with the old C methods in favour of compiler stuff

earnest phoenix
#

and yea memorizing the different types for the formatter

earnest phoenix
scenic kelp
#

if i was going to that length i'd just write my own language

earnest phoenix
#

lmfao

#

Do it

#

parm-lang

scenic kelp
#

i've explored the idea before

#

might do it as a passion project when i actually find the motivation to do anything

#

i'm quite interested in the concept of language design as a whole

earnest phoenix
#

If you do i'd be down to fuck with it

#

I surprisingly have a lot of free time most of the time so like

#

I really just work on side projects or watch anime

scenic kelp
#

i know something i'd like to include in a language is some sort of way to mark functions as pure

earnest phoenix
#

wdym by pure?

scenic kelp
#

a lot of compilers do that for optimization but there's no way to signal to a compiler that you want a function to only be pure ever

#

as in it only operates on inputs

earnest phoenix
#

Mmm ic

scenic kelp
#

like a mathematical function, one input equates to one output

sudden geyser
#

Wouldn't it be better for a compiler to detect those itself?

#

Or a linter even

scenic kelp
#

well yeah the compiler would still be detecting it

#

but the idea would be to encourage making functions pure

#

you'd have to explicitly mark impure functions ideally

drifting reef
#

whats regex

scenic kelp
#

regular expressions

sudden geyser
#

sounds like a monad

drifting reef
#

I mean like what is it used to

scenic kelp
#

it's used to write search patterns for text

drifting reef
#

Hmm

earnest phoenix
#

for example you can make one for testing the "strength" of a password making it so it has to include this and that

scenic kelp
#

eg find where a certain sequence of letters is used

earnest phoenix
#

or what parm said

scenic kelp
#

Regular expressions are patterns used to match character combinations in strings.
In JavaScript, regular expressions are also objects. These patterns are used with the exec() and test() methods of RegExp, and with the match(), matchAll(), replace(), replaceAll(), search(), and split() methods of String.
This chapter describes JavaScript regu...

drifting reef
#

I use python

sudden geyser
sharp saddle
#

Someone help me?

earnest phoenix
#

No

#

Don't ask to ask

sharp saddle
#

Well... 📸

#
if(!interaction.guild.me.permissions.has(Permissions.FLAGS.CONNECT)) return interaction.reply({content: "Eu não posso conectar no canal de voz", ephemeral:true});
    if(!interaction.guild.me.permissions.has(Permissions.FLAGS.SPEAK)) return interaction.reply({content: "Eu não posso falar no canal de voz", ephemeral:true});
    ```
#

This

#
throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Target user is not connected to voice.
earnest phoenix
#

They aren't connected to a voice channel

sharp saddle
#

no

sharp saddle
earnest phoenix
#

What?

sharp saddle
#
if(!interaction.member.voice.channel) return interaction.reply({content: "🎧 | Entre em um canal de voz"});```
earnest phoenix
#

Depends on where that is in the order of checking

sharp saddle
#

Oh yeah

#

Wait a sec

#
if(!interaction.guild.me.permissions.has(Permissions.FLAGS.CONNECT)) return interaction.reply({content: "Eu não posso conectar no canal de voz", ephemeral:true});
    if(!interaction.guild.me.permissions.has(Permissions.FLAGS.SPEAK)) return interaction.reply({content: "Eu não posso falar no canal de voz", ephemeral:true});
if(!interaction.member.voice.channel) return interaction.reply({content: "🎧 | Entre em um canal de voz"}); 
earnest phoenix
#

Well if it truly is coming fro myou checking their permissions then ig for some reason it requires them to be in a vc to check for that permission (which I don't see why) so if this is the case try checking if they are in a channel before checking for permissions

sharp saddle
#

Ok

#

@earnest phoenix ```js
if(!interaction.member.voice.channel) return interaction.reply({content: "🎧 | Entre em um canal de voz"});
if(!interaction.guild.me.permissions.has(Permissions.FLAGS.CONNECT)) return interaction.reply({content: "Eu nĂŁo posso conectar no canal de voz", ephemeral:true});
if(!interaction.guild.me.permissions.has(Permissions.FLAGS.SPEAK)) return interaction.reply({content: "Eu nĂŁo posso falar no canal de voz", ephemeral:true});

earnest phoenix
#

try it ig

sharp saddle
#

ok

earnest phoenix
#

I dont see why it would matter tho but maybe discord is just weird

sharp saddle
#

Need some privileged intent for this?

earnest phoenix
#

Mmm

#

I don't think so?

#

Unless it needs the Guild Members intent

sharp saddle
#
throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Target user is not connected to voice.
earnest phoenix
#

Yea I didn't think that would matter

#

Are you sure the erorr is coming from there?

sharp saddle
#

Yes, because this error is from a command

#

Every time when this command is called, this error happens

earnest phoenix
#

Just because its from a command doesn't mean it is comming from you checking permissions

sharp saddle
#

Hummmm no?

#

So where is it coming from?

earnest phoenix
#

Idfk

#

Show code

sharp saddle
#

All code?

#

Shit...

#

Wait a sec

#
const { SlashCommandBuilder } = require("@discordjs/builders");
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");
const { joinVoiceChannel, createAudioPlayer, createAudioResource, getVoiceConnection } = require('@discordjs/voice');
const config = require(".././config");
const { Client, Collection } = require("discord.js");
const client = new Client({ intents: config.bot.intents });
const { Permissions } = require('discord.js');

module.exports = {
  data: new SlashCommandBuilder()
    .setName("play")
    .setDescription("Toca a rĂĄdio ao vivo"),
  run: async (interaction ) => {
    console.log(interaction.guild.me.permissions.has(Permissions.FLAGS.CONNECT)) 
              
    if(!interaction.member.voice.channel) return interaction.reply({content: "🎧 | Entre em um canal de voz"});
     if(!interaction.guild.me.permissions.has(Permissions.FLAGS.CONNECT)) return interaction.reply({content: "Eu nĂŁo posso conectar no canal de voz", ephemeral:true});
    if(!interaction.guild.me.permissions.has(Permissions.FLAGS.SPEAK)) return interaction.reply({content: "Eu nĂŁo posso falar no canal de voz", ephemeral:true});

    const channel = interaction.member.voice.channel;
    const connection = joinVoiceChannel({
	channelId: channel.id,
	guildId: channel.guild.id,
	adapterCreator: channel.guild.voiceAdapterCreator,
	selfMute: false,
  selfDeaf: false,
});
    const player = createAudioPlayer();
    const resource = createAudioResource(process.env.stream_relay);
    connection.subscribe(player)
    player.play(resource);
    interaction.guild.me.voice.setMute(false)
	
    interaction.reply({content: "🎧 | Tocando rádio Lo-Fi Brasil", components: []})
  },
};```
#

Well..

#

I will sleep rm

#

Rn

earnest phoenix
#

Well that error only occurs when you do something to the user when they aren't in the vc

#

the error could come from .setMute?

sharp saddle
#

Hmmm

#

I will see

sharp saddle
#

Oh

#

Wait

#

Yes

#

But...

#

It's showing that it's connected to the channel playing the song, but it's not actually @earnest phoenix

earnest phoenix
#

There you go

#

If it isn't connected to a vc you can't manage properties for it

#

As to how all this actually works anymore no idea. Ever since they made voice its own package I stopped messing with voice stuff

#

Im afraid you'll have to wait for someone else to help with why its not joining

sharp saddle
#

Ok.

vital void
#

try to console log channel of js const channel = interaction.member.voice.channel; and interaction.member and check if they are correctly fetched .
(||I'm not good at djs so ignore if i said something stupid||)

#

or try to fetch the user by some other method
like

const user = interaction.guild.members.cache.get(`${interaction.user.id}`)
//then fetch channel
const channeltobeconnected = user.voice.channel
earnest phoenix
#

That assumes the member is cached

vital void
#
const user = await  interaction.guild.members.fetch(`${interaction.user.id}`)
``` will this work in non cached case? (||i guess it will||)
lyric mountain
#

Why the template string?

#

Id is string already

earnest phoenix
#

ye

vital void
#

ok

boreal iron
#

Also there’s no need to fetch a guild member as the interaction comes with the member obj as long as the command is used in a guild

lyric mountain
#

That's very straight for me

boreal iron
#

English is aligned up a little bit

lyric mountain
#

Show css for it

#

U centered it

earnest phoenix
#

Mmmm could be because of text-align

lyric mountain
#

Non-monospaced fonts can have variable heights

#

English might be 2px lower than the rest

#

So it centers a big higher

#

Try setting it to display: block

#

That way it transforms the text into a single box

boreal iron
lyric mountain
#

Ah yeah

boreal iron
#

As you don’t wanna simulate another div with 100% width

lyric mountain
#

Also u could not center the text

#

And wrap the whole thing inside another div with centering enabled

#

That way the text itself is contained in a normal div

#

Also y u have margin-left for subject?

#

Can u do it tho?

#

No I mean, u already added space on the earlier text

boreal iron
lyric mountain
#

Spam

earnest phoenix
boreal iron
#

🤦‍♂️

earnest phoenix
#

I dont see a reason why it wouldnt work

lyric mountain
#

If anything else, the margin should be the same size as the font, else it looks odd

#

But back to the subject, try span

#

Or inline block

#

Or an outer centering div

#

Yw

boreal iron
#

It’s a weird font

#

The O is aligned well, the L isnt

#

The W of where is also aligned up a pixel

#

The font is just shit

#

If you’re worried about that, sure why not

lyric mountain
#

Use superior monospace fonts

earnest phoenix
#

use manrope

#

its my new favorite font

lyric mountain
#

Almos™️

boreal iron
lyric mountain
#

Align both sides down

#

Also did u use span inside p?

boreal iron
#

I don’t see what’s wrong with it

lyric mountain
#

Maybe, I never remember how to align text vertically

#

1px misaligned

boreal iron
#

I’m too tired

#

Can’t see anything wrong

earnest phoenix
#

Do what haku said and use span

#

ez

boreal iron
#

That’s what FakE said but who cares

earnest phoenix
#
<p>Where you can find notes for <span style="color:red;">Math</span></p>
earnest phoenix
boreal iron
#

I’m me

wheat mesa
#

he is driving

#

probably

boreal iron
#

Not anymore

urban sand
#

Idk, but can you try wait for a few hours or 2 days, then try it again? It looks like its a new domain.... Just try it

quaint rampart
#

anyone know how to use a variable in a string in powershell

pulsar bone
#

can someone help me with buttons and stuff

#

i am trying from discord.ui import Button but it is saying no module called discord.ui

rose relic
#

so install

pulsar bone
# dry imp pycord?

i dont know whats that i just watched a video on internet and he used the above method nothing about pycord

dry imp
#

well you might aswell install pycord cuz discord.py is dead

#

cuz buttons exists in discord.py 2.0 or pycord 2.0 and etc

pulsar bone
#

doesnt replit autoinstall things?

dry imp
#

yep thats why it sucks

#

and its dead and replit doesnt install alpha

pulsar bone
#

so what should i do

dry imp
#

either migrate to pycord(literally dont need to change anything abt your code) or to nextcord(change a little bit on the import)

#

and buttons in pycord is also in alpha but will be stable in 29 january

pulsar bone
dry imp
earnest phoenix
#

hi can i just ask tf is wrong with discord dev portal I can't make an invite link for my bot

dry imp
earnest phoenix
#

wtf is wrong

dry imp
#

code grant enabled?

boreal iron
#

The fact that no bot requires admin permissions is wrong pepowot

earnest phoenix
#

oop

#

ty

#

no no bot needs admin

#

you can just give them all perms besides admin UwU

boreal iron
#

I doubt it needs all permissions

#

Just require the permissions it really needs

dry imp
#

wdym fake my pong commands needs admin

earnest phoenix
#

ye

boreal iron
#

And build in a proper permissions check and error handling or that bot will never be accepted on topgg

boreal iron
earnest phoenix
#

lol I'm not even gonna ask for admin it was jsut to show u it didn't work without needing to config perms for 5 mins

boreal iron
#

lol auto correct

earnest phoenix
boreal iron
#

"should" KEKW

#

Such a useless command with unnecessary informations

earnest phoenix
#

question how can u like add that ppl need to do capthca befor being able to invite the bot

boreal iron
#

Well you can on your own site but as soon as one has passed the captcha, the discord invite URL is public

#

And can in theory be shared and used by anyone directly without your captcha

dry imp
#

why do you need captcha anyway

boreal iron
#

If you plan to have your bot available only for specific users, you should use Discord oauth

#

To restrict access to users you whitelisted only requiring them to login via discord

feral aspen
boreal iron
#

Of this n(ode) p(ackage) m(anager)…
You probably mean what we think of this package oldEyes

feral aspen
#

Yeah, my bad.

boreal iron
#

I will never understand the existence of music bots and how that’s supposed to be useful if you can browse and listen to the music yourself…
But that’s just my opinion

feral aspen
#

Although, is this a good package? Seriously speaking... nvm

boreal iron
#

Well good question for somebody actually using it

#

If there’s someone in here

#

You should probably ask in general

earnest phoenix
dry imp
earnest phoenix
#

ikr

#

I love being anoying

earnest phoenix
#

I used it once long ago

feral aspen
#

That d in used means it's no longer used. 😂 (especially the once)

earnest phoenix
#

no

#

I shoul've said I've used it once long ago

#

idk dyslexia

#

but I'm pretty sure used is the right word

dry imp
#

its the right word

earnest phoenix
#

yay

#

I love it when I'm right

dry imp
#

why do i need this

earnest phoenix
#

idk

#

safety?

boreal iron
dry imp
#

why does my bot with ping commands needs safety

boreal iron
#

Because even with just a ping command you can collect lots of infos?! okeh

#

Selling the data to North Korea

dry imp
#

damn i never realised i have such powers

boreal iron
#

Yeah there’s an easier way to earn cash instead of working for it

dry imp
#

damn imma steal 2 server infos that uses my bot

boreal iron
#

You never know when it starts off

#

It may has 4 tomorrow - 200% of today

#

Imagine that growth

pale mango
#

Is it an issue w python-sdk because I keep getting issues with having to install discord.py even though it was discontinued

dry imp
pale mango
#

I don't, oh wait I figured it out,

#

nevermind- it was being called twice

surreal sage
#

Are there any services that do the following;
Server connects to a socket to the service, the server gives a url (ex: ssh.example.com)
I would ssh into that url
Basicly a redirect but the server connects to the service

opaque helm
#

um hi

lyric mountain
surreal sage
#

I would connect to the service and the service sends the data to the server via a socket or so

lyric mountain
#

That seems unnecessarily complicated, what's the reason for it?

quartz kindle
#

just make an ssh tunnel

earnest phoenix
#

mention?

boreal iron
earnest phoenix
#

anyways, this isn't working what's wrong? It worked before but after a slight change of code (just some comments and that stuff were added for human-readability)
Message:

let msg = `**:silver: Silver chests** - \`${silver}\`\n\
**:golden: Golden chests** - \`${golden}\`\n\
**:nocrate: Gold crates** - \`${crates}\`\n\
**:pcrates: Plentiful Gold crates** - \`${pcrates}\`\n\
**:crate: Overflowing Gold crates** - \`${ocrates}\`\n\
**:epic: Epic chests** - \`${epicchest}\`\n\
**:legend: Legendary chests** - \`${legchest}\``;

I'm separating the string with \ (saw it in stackoverflow and used it because in some commands, I have too long strings.

if (silver <= 0) { 
msg = await msg.replace(`**:silver: Silver chests** - \`${silver}\`\n\ `,"")
} 
  if (golden <= 0) {
msg = await msg.replace(`**:golden: Golden chests** - \`${golden}\`\n\ `, "")
}
  if (crates <= 0) {
msg = await  msg.replace(`**:nocrate: Gold crates** - \`${crates}\`\n\ `, "")
}
  if (pcrates <= 0) {
msg = await  msg.replace(`**:pcrates: Plentiful Gold crates** - \`${pcrates}\`\n\ `, "")
}
  if (ocrates <= 0) {
msg = await  msg.replace(`**:crate: Overflowing Gold crates** - \`${ocrates}\`\n\ `, "")
}
  if (epicchest <= 0) {
msg = await msg.replace(`**:epic: Epic chests** - \`${epicchest}\`\n\ `, "")
}
  if (legchest <= 0) {
msg = await msg.replace(`**:legend: Legendary chests** - \`${legchest}\``, "")
}
  if (silver <= 0 && golden <= 0 && crates <= 0 && epicchest <= 0 && legchest <= 0) {
msg = "No chests... Come back later..."
  }
``` my "function" to recognise the chests and add/remove the ones you have/ don't have. The "No chests..." works but others doesn't work (the ones where I replace)
split hazel
#

im gonna call you the clash royale guy from now on

boreal iron
#

what the

#

Something has gone totally wrong

earnest phoenix
#

tf

split hazel
#

you screwed up your format

#

clash royale guy

#

nice

boreal iron
#

that's no beginner embed fail, that's an advanced embed fail

earnest phoenix
earnest phoenix
split hazel
#

so

#

lets begin

#

what are you trying to do

#

add variables into a message and then send it?

earnest phoenix
#

not exactly

split hazel
#

yeah i noticed

earnest phoenix
#

I'm trying to make a inventory like dank memer

#

because I have many items added and it doesn't look good in a basic format

split hazel
#

can you kind of post a blueprint of what you are expecting

#

like whats supposed to send

earnest phoenix
#

something like this was before

#

it sends all the items/chests without checking if you have it or not

split hazel
#

I see

#

can you try replacing <= 0 with nothing

earnest phoenix
#

ok

split hazel
#

it will then make javascript if statements infer the true/false from the type

#

which should get rid of the null/0s

#

unless they are actual strings

earnest phoenix
#

before js if (silver <= 0) { now ```js
if (silver) {

split hazel
#

yes

earnest phoenix
#

same

split hazel
#

then that is worrying because it means the null/0s are strings

#

now you kind of have to roll with it

#

if (silver === "null" || silver == 0)

#

should do it

#

the last line will work with both string 0s and number 0s

spark flint
#

how long does it take for application commands to be registered globally

quartz kindle
#

1 hour

spark flint
#

ah alr

boreal iron
#

up to 1 hour

winter pasture
#

Global commands are available on all your app's guilds. Global commands are cached for 1 hour. That means that new global commands will fan out slowly across all guilds, and will be guaranteed to be updated in an hour.

wicked pivot
#

remove "Assembly of stats "

#
return interaction.editReply({
                        content: '',
                        embeds: embeds
                    })```not working
orchid sluice
#

Hello! I'm not sure if this is the place for that sorry if it's not.
We are looking to hire an experienced bot developer who could make an anti-raid bot.
The main feature of the bot would be to detect raids to then kick / ban them.

lyric mountain
#

Escapes on literal strings

rustic nova
#

-needdev @orchid sluice

gilded plankBOT
#

@orchid sluice

You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.

boreal iron
#

when the join time between multiple users in a row is the same, to then kick / ban them

sounds like a good idea freerealestate

modest maple
#

stickVibe Ban them all

boreal iron
#

aye

orchid sluice
earnest phoenix
#

Can't have a raid if there are no members to begin with

cinder patio
#

Honestly... it's not a terrible idea for small servers

earnest phoenix
#

Time to make the best anti raid bot ever

earnest phoenix
#

Bans everyone on join

lyric mountain
#

Else negatives will skip that check

orchid sluice
#

yes usually raid bots detect when multiple users join in a small period of time, but the server I work for constantly gets advertisements which brings lot of users at the same time, so it falsely detects it as a raid

earnest phoenix
#

Mmm, you could just ban the people who join and then send x amount of messages in x amount of time. (tho idk how useful this idea is for larger servers)

lyric mountain
earnest phoenix
#

If it is a private bot for that one server tho haku

lyric mountain
#

Ah

earnest phoenix
#

I think he was asking someone to make a bot for his server

#

so I assume it is a private bot

lyric mountain
#

Well, detecting join frequency is the best method

#

Cuz it's that what makes a server crash

orchid sluice
#

yeah, as long as raiders don't know it works this way it should work better tahn all other bots ^^

earnest phoenix
#

I'd say on join if they start sending a massive amount of messages very quickly its obv a raid of some sort

lyric mountain
#

U could have a "accept rules" step before being able to send messages

sudden geyser
#

well there are other kind of raids

#

e.g. friend requests

earnest phoenix
#

Yea

sudden geyser
#

so a join threshold is most effective

boreal iron
#

also compare the latest user messages as they mostly send the exact same msg

lyric mountain
#

Also FR raids

#

Cuz they won't see all members

orchid sluice
lyric mountain
#

Read above

sudden geyser
#

bots can still see all members

lyric mountain
#

Make it so only non-verified users can see that channel

lyric mountain
earnest phoenix
#

I mean people can just not have their friend reqs on who needs friends anyway

sudden geyser
#

yep

earnest phoenix
sudden geyser
#

pretty sure last time I checked

earnest phoenix
#

Well yea that makes sense ngl

orchid sluice
earnest phoenix
#

Bots can be used i nprivate channels that no other members can see and still ban/warn/kick them

lyric mountain
#

Then join threshold is your ONLY option

earnest phoenix
#

only good one at least

orchid sluice
#

yep!

lyric mountain
#

Anything else won't prevent dm spam

earnest phoenix
#

also people should just turn of friend reqs who needs friends

#

:)

sudden geyser
#

begs the question why discord doesn't automatically handle this effectively

earnest phoenix
#

It would probably be too pain in the ass for them

lyric mountain
earnest phoenix
#

or they don't care

boreal iron
sudden geyser
#

imagine a place

earnest phoenix
#

imagine a place where I dont pull my hair out

orchid sluice
sudden geyser
#

plus your bot will be punished for it anyway

#

given rate limits

orchid sluice
#

yep luckily i had 2 different bots, one reached the limit rate but the other one managed to stay up until the end of the raid so that was pretty lucky

lyric mountain
#

I just straight ban users that enter after antiraid triggers

#

If someone was just an unfortunate bystander the moderation team can handle them later

boreal iron
#

rude

sudden geyser
#

if they care enough to message you afterwards of course

lyric mountain
#

Most don't anyway, might be cruel but server comes first

#

It was pretty effective tbh, didn't have issues with false-positives yet

orchid sluice
#

guys do you have any idea what would be the best language to use to make the custom anti radi bot? Or are any good? I don't really know what are the differences between nodejs, python, etc..

lyric mountain
#

Whatever fits ur boat

proven lantern
#

gotta learn one

lyric mountain
#

At small scale, language technical stuff won't matter

proven lantern
#

python and node are good starter languages

orchid sluice
#

Triyng to figure out what i would need from the dev i will hire ^^

boreal iron
#

what language is node wtf

lyric mountain
#

Don't ask for a specific language then

proven lantern
lyric mountain
#

It'll be harder to find and more expensive that way

proven lantern
#

i can be just as obtuse

boreal iron
#

dude node is no language

orchid sluice
#

money not really the problem, just need what would be the best

boreal iron
#

how can you fucking answer that rethoric question

lyric mountain
lyric mountain
#

It REALLY doesn't matter

orchid sluice
#

ok thanks!

split hazel
#

only way i would think you'd want to pick a specific language is if you're going to plan on extending the bot later with your own code

lyric mountain
#

Language comparison only becomes relevant when we talk about big data flux and high concurrency

orchid sluice
#

i see i see

proven lantern
#

dont use fortran

lyric mountain
#

And only if going for multi-server

#

Single server is impossible to make a language struggle

proven lantern
#

avoid languages with goto support

lyric mountain
#

Funny thing, java has goto as reserved keyword, but it does nothing

#

Probably a feature long removed

proven lantern
#

java would do that

earnest phoenix
#

I use scratch in all my bots

boreal iron
#

java KEKW

proven lantern
#

dynamodb has the most reserved word

#

it wins the reserved word battle

lyric mountain
boreal iron
#

shut up

#

not today

proven lantern
lyric mountain
proven lantern
#

and no primitive wrappers

lyric mountain
#

Technically they're all wrapped already

#

So you don't get primitives at all

proven lantern
#

i need to learn c# more. i forgot to do that

warm swan
#
class InteractiveView(discord.ui.View):

    def __init__(self, ctx):
        super().__init__(timeout=10)
        self.expr = ""
        self.calc = simpcalc.Calculate()
        self.ctx = ctx

    async def interaction_check(self, interaction: discord.Interaction):
        if interaction.user != self.ctx.author:
            await interaction.response.send_message("Um, Looks like you are not the calculator author...", ephemeral=True)
            return False
        else:
            return True

    async def on_timeout(self, button: discord.ui.Button, interaction: discord.Interaction):
        button.disabled = True
        await interaction.response.edit_message(view=self)
        await self.ctx.send("Um, Looks like the calculator has expired!")
#

i am having a issue on_timeout

#

the buttons won't get "disabled"

lyric mountain
spark flint
lyric mountain
#

Async is a keyword, but not reserved

#

So u can make huge async chains

#

When waffle showed me that I was like wtf

boreal iron
#

huh what's that new fancy error message

wheat mesa
#

😉

warm swan
#

so does anyone know anything ab buttons here?

cinder patio
#
18 |             {...file.files.map((file, ind) => <FileRender key={ind} file={file} depth={depth + 10} />)}
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Spread children are not supported in React.```

uum this is a first...
#

that statement is just false

proven lantern
#

spread an array into an object?

cinder patio
#

that's jsx syntax

proven lantern
#

can you wrap it in an array?

#

not the jsx

lyric mountain
#

File files map file ind file key ind file file

proven lantern
#

but the inside

cinder patio
#

that'd work but it would also render the brackets and commas

proven lantern
#

not jsx

sudden geyser
cinder patio
#

that 100 percent should work

sudden geyser
#

What'd you be spreading it into anyway

proven lantern
cinder patio
#

then it'd turn the entire array into a string tho

#

that's jsx syntax

proven lantern
#

it would be an array of elements

boreal iron
#

wtf is jsx

proven lantern
#

its the reactjs template

#

well it's used by react

sudden geyser
boreal iron
lyric mountain
sudden geyser
#

oh and if you want to metaprogram might as well throw that out the window

#

back to .createClass

cinder patio
#

I'm 100% sure the spread syntax works too

sudden geyser
cinder patio
#

I've always done it with the spread syntax

sudden geyser
#

I've never seen anyone use spread syntax.

#

I've always seen it without the spreading.

proven lantern
sudden geyser
#

"A collection of elements"

proven lantern
#

that's weird stuff there

cinder patio
#

in jsx {} is used to embed expressions into the html

sudden geyser
#

well maps are just glorified arrays

cinder patio
#

nothing to do with objects

#

Maybe I'm tripping

proven lantern
#

then this is happening right?

cinder patio
#

ooh I think I know what might be going on... I made this typescript plugin which turns JSX expressions into template literals... and I made it so the spread syntax joins the array... and I've been using that plugin for so long I forgot that it's not how it's done in react 😭

sudden geyser
#

bruh

proven lantern
#

madness

sudden geyser
#

I made this typescript plugin which turns JSX expressions into template literals
example pls

cinder patio
sudden geyser
#

oh

#

that's scary

proven lantern
#

transpilers on transpilers on transpilers

lyric mountain
#

Intense transpilation

proven lantern
#

what could go wrong?

lyric mountain
#

You get smelly

proven lantern
#

1 transpiler is enough

cinder patio
#

it's one transpiler though

#

It's a typescript transformer

#

aka typescript uses it and I modify the AST

#

great replacement for those shitty ass template engines if you ask me

proven lantern
#

web browsers?

cinder patio
#

ejs, pug, eta, handlebars

proven lantern
#

the dom is the worst engine

cinder patio
#

I meant to say template engines*

lyric mountain
#

Like spits bootstrap

proven lantern
#

the dom should just be better

sudden geyser
#

"Be better!"
begins improving

#

The DOM has been fixed

proven lantern
#

success!

sudden geyser
#

It's best to think of the DOM like your database—a foreign entity you never want to talk to, using abstractions on top of abstractions to forget its existence.

spark flint
#

how do i get subcommand user object using SlashCommandBuilder (djs)

sudden geyser
#

unless you use an orm, in which you suck :)

spark flint
boreal iron
#

10 years later

split hazel
#

just because you feel old doesnt mean you have to shame others for replying late

boreal iron
#

shut up and develop your drivers

split hazel
#

you know what?

#

No.

#

I will take a break and develop something else

quartz kindle
#

develop my api for me

split hazel
#

tho i was thinking something related to windows

quartz kindle
#

xD

#

i have two things im thinking whether i should do or not

#

because they are quite a hassle

#

one would be a geocoding system based on geonames + sqlite FTS5

lyric mountain
#

Tim

#

Speak human

modest maple
#

basically he want to build a geo system based on sqlite's full text search system

quaint wasp
#

how do you get owner ID?

#

<@${guild.ownerID}> (${guild.ownerID})

#

that doesnt work

#

returns undefined

quartz kindle
#

geonames has a public database of cities all over the world, about 180k cities, take essential data from those, create an sqlite db from that using the fts5 extension to enable full text searching, aka you search for "abc" and it gets you the city with the closest matching name

earnest phoenix
quaint wasp
#

oh- never heared of the announcement. Thanks then 👍

quartz kindle
#

they removed guild.owner

#

and added guild.ownerId

quaint wasp
#

..

#

oh

earnest phoenix
#

Oh right

#

its ownerId

#

not ID

lyric mountain
#

Also the world only has 180k cities?

#

Less than I expected

earnest phoenix
#

🤔

quaint wasp
#

Only? I thought there were like 8k

quartz kindle
earnest phoenix
#

Ah

quartz kindle
#

instead they added guild.fetchOwner()

earnest phoenix
#

Makes sense then

#

That is more helpful

quartz kindle
cinder patio
#

that's a lot of cities

earnest phoenix
#

2.4m

quaint wasp
#

oh

#

wow...

quartz kindle
#

geonames has them ordered by population count

#

cities500.zip : all cities with a population > 500 or seats of adm div down to PPLA4 (ca 185.000), see 'geoname' table for columns
cities1000.zip : all cities with a population > 1000 or seats of adm div down to PPLA3 (ca 130.000), see 'geoname' table for columns
cities5000.zip : all cities with a population > 5000 or PPLA (ca 50.000), see 'geoname' table for columns
cities15000.zip : all cities with a population > 15000 or capitals (ca 25.000), see 'geoname' table for columns

quaint wasp
#

WAYYYY more than I thought

lyric mountain
#

What abt cities with less than 500?

quartz kindle
#

geonames doesnt support that

#

but proper geocoding api's do

cinder patio
#

Aren't those considered villages

quartz kindle
#

like google maps, osm/nominatim, etc

split hazel
#

all those cities but not one fair government

earnest phoenix
#

life aint fair

split hazel
#

reject life accept mark zuckerberg as our leader

earnest phoenix
#

Im good

#

I dont want a lizard as my leader

lyric mountain
#

Mark "The lizard" Zuckerberg
Jeff "Biggus Dickus" Bezos
Elon "Cyberpunk 2077" Musk

proven lantern
#

dont say anything about Bill

boreal iron
#

Bill "Nano chips" Gates

proven lantern
#

nano is when things get cool

#

we need cameras with 1 billion fps now

cinder patio
#

nacho chips

lyric mountain
proven lantern
#

i want to test the synchronized clock theory

boreal iron
#

fucking shit, I'm so bored atm

lyric mountain
#

Then u need a 1864 1.2p 10fps camera

proven lantern
lyric mountain
#

That reminds me of a guy who was getting 100% gpu usage with a 3060

#

He was rendering a triangle

#

Justa simple triangle

#

Except he forgot to cap fps

proven lantern
#

never cap fps

#

pro

#

it's crazy how light and time relate to each other

#

it's magic

#

i need to test it

lyric mountain
#

Time at equator is slightly slower than at poles

proven lantern
#

two clocks synced down to the nano second would be off by 1 nano second after being separated by ~1ft

tawny lava
modest maple
#

it's a text search

lyric mountain
#

But it's a "match closest" search

#

You put a small fragment and it searches based on that

#

Ah wait, not lazy mb

#

Fuzzy

modest maple
#

fuzzy searching != full text search

#

full text searches arent able to do fuzzy searching

#

they sort a set of documents based on how many times a set of words from a query appear in a document and sometimes based off the positions

#

fuzzy searching is a different ball game

raw nest
quartz kindle
#

show your example

#

how your current code looks like

raw nest
#

I don't have a current code but I was wondering how they did it because I already struggled with it some time ago..

quartz kindle
#

so it auto scales based on size, but once it reaches a minimum, it forces a line break

raw nest
#

so min-width = x, width = f.e. 25% and on the parent element flex-wrap

quartz kindle
#

yeah

#

you can even do it without flex

#

just with inline-blocks

raw nest
#

ah okay

earnest phoenix
#

hey guys what do you think is the best linux operating system for mongodb?

raw nest
#

but like if the width is equal to let's say 3 elements the width isn't 25% anymore... how to do it then?

sudden geyser
quartz kindle
earnest phoenix
quartz kindle
#

and you can use % based on viewport for example

#

width: 20vw

#

20% of screen size

raw nest
quartz kindle
#

you can also use calc for more advanced control

raw nest
#

yeah

quartz kindle
#

width: calc(100px + 20%)

raw nest
#

thank you man

split hazel
#

so guys

#

what are my odds of becoming an electrical engineer

#

i can barely make a simple circuit:(

sudden geyser
#

hmm uh 0/1

split hazel
#

just about right

#

they say programmers dont deal with hardware

#

but what if they did

#

would i be the first one

sudden geyser
#

hardware is just boring

#

software is fun

#

why spend your time working with logic gates when you could be rewriting your js app every 6 months with the newest coolest framework

split hazel
#

not for me

#

i find making something from scratch fun

#

from the lowest level to making something high level

sudden geyser
#

whatyamaking

split hazel
#

a fucking operating system

#

tho thats too high level for me

#

i want to go deeper

#

bios firmware

#

@boreal iron

modest maple
#

@split hazel try finish / complete something first

boreal iron
#

something

white anvil
#

have you ever actually written anything very low level before

#

i remember wanting to do it too, but when i started making my first os i really quickly learned that all the nitty gritty isn’t actually that fun lol

#

and realistically writing a bios isn’t any lower level than an operating system because the bios typically only handles the POST and boot process before handing off to the bootloader

#

and that’s on more modern uefi bios

split hazel
split hazel
#

make some 32 bit preparations and then do a long jump

white anvil
#

i mean like

#

i know a lot of people, myself included, that have wanted to go as low level as possible

#

but then it turns out it’s not actually that great lol

#

if you have already experienced it and want to take it further then great

split hazel
#

so far in my os im fascinated by it

#

i want to one day order some pre-built microcontroller, solder components onto it and then control them with some written code

white anvil
#

get an arduino

#

sounds like the kind of thing you are after

split hazel
#

too expensive tbh

#

i really dont want to overspend

#

and an arduino + starter components is pricy

#

its apparently due to the fact you're also funding the project

white anvil
#

an arduino nano is like ÂŁ12

split hazel
#

i found something like this on aliexpress, a chip which has a display attached to it

#

for 10 bucks

#

think its a modified arduino

white anvil
#

ig you can try

split hazel
#

dont know tho

#

would i even be able to set it up

#

i could probably also take a bite and order a lithium battery for it

white anvil
#

raspberry pi module

split hazel
white anvil
#

do you have a pi

split hazel
#

nope

#

i dont have anything right now

#

i really dont like spending money

white anvil
#

idk looks like you need a pi to use that thing

split hazel
#

try to spend as little as possible

white anvil
#

and a pi is a lot more expensive than an arduino and a few components

split hazel
#

yeah

#

oh module

#

i didnt see that

white anvil
#

just pick up an arduino uno and a bundle of components or something

#

it’s basically infinitely hackable

#

i remember having a lot of fun programming for an Ethernet add-in card for the uno

#

it would be nice to try and run a very basic discord bot that way one day

split hazel
#

i was actually looking at something like a raspberry pi pico

#

and a starter kit

#

quite dodgy tho

#

the rfid is pretty awesome

#

might take a gamble with it

#

a lot cheaper on ebay

#

probably because they take a smaller cut

hidden gorge
#

I have to have 4 servers hosting my code at once

#

we have 2 diff things for 1 website

cinder patio
lament rock
#

I had the pleasure of repairing an old server PC donated to the shop I work at and it had 2 xeons in its sockets. Would use that if my boss lets me have it

civic scroll
earnest phoenix
#

@civic scroll typescript jail

#

did you get rules only

civic scroll
#

what

earnest phoenix
#

your roles

civic scroll
#

yeah

#

what

#

i'm actually banned from sending typescript code Trolled

earnest phoenix
earnest phoenix
#

THANK YOU MODERATORS

civic scroll
#

WHAT

#

why you do me like this WAH

earnest phoenix
#

you deserve it

#

@quartz kindle ||haha ping go <br rrrrr="rrrrr" />|| is it possible to use a <link /> element to load a script based on the media attribute?

#

i want to load tablet.js on screen sizes bigger than 786px

cinder patio
#

you can do it via js

earnest phoenix
#

loading an entire script only to not run it

cinder patio
#

no no

earnest phoenix
#

inserting a <script> tag into the body using js?

cinder patio
#

mhm mhm mhm

#
function addTablet() {
   // Check if screen size is bigger than 786px before calling it
  const script = document.createElement("script");
  script.src = "path";
  document.body.appendChild(script);
}
earnest phoenix
#

ok

rigid maple
#

How can I provide API security?
A button in the script section of my website, etc. when pressed i post api
But the api is visible in the right click inspect section
This way, other people can post here (via their own computers)
in this way, they can change the settings on the server that they are not authorized or even a member of.

sudden geyser
#

You'll need to handle authorization on the API server rather than the frontend (the user clicking the button)

#

For example, session cookies are a basic form of authorization.

rigid maple
#

Is there a sample place on how I can do it?

sudden geyser
#

Session cookies come in all forms depending on the server

#

But it would involve sending the user a Set-Cookie header, the browser saving it, and sending it on subsequent requests.

#

So you look up that cookie in your backend storage and know who that user is.

#

At least, that's how I've accomplished user auth. In a "pure API" (REST, machine-to-machine, etc.), session cookies may seem inappropriate, but they do work.

rigid maple
sudden geyser
#

It does work, but the choice of JSON Web Tokens (JWTs) is probably inappropriate.

#

Of course, if you're willing to bundle express, mongodb, and jwts to make it work.

rocky hearth
#

what @discordjs/rest is used for?

sudden geyser
#

Probably to make REST API calls

#

And just that

#

Rather than all the convenience Discord.js provides

rocky hearth
#

do I need it, to make bots with discord.js?

sudden geyser
#

No.

#

If you use Discord.js directly, you won't need it.

#

It's useful if you want to make calls to the API directly, albeit the package points to an archived repository

rocky hearth
#

so i guess, discord.js use it internally

sudden geyser
#

maybe

rocky hearth
#

and @discordjs/builders?

sudden geyser
boreal iron
#

Helper tools and trash nobody needs but lots of people are using oldEyes

sudden geyser
#

For example, an embed when you call .setTitle

#

That's the builder pattern.

#

Or you could use it with slash commands

#

Which seems to be its popular use case.

boreal iron
#

Aye ugly and more to type

sudden geyser
#

Builders usually handle the validation for you as well, so if you want that

#

But I'd personally just use maps

boreal iron
#

hopefully not Bing Maps

sudden geyser
#

bling bling

boreal iron
#

Verify that input after and make sure the client didn’t manipulate it as client sided code can be changed however you want.

split hazel
#

very boring tho

#

if (!username ||!password ||!age || age<100)

boreal iron
#

Looks safe and promising

sudden geyser
#

that is very boring

#

how about a schema library

split hazel
#

I aint touching graphql

#

it's dead

sudden geyser
#

doesn't have to be graphql

modest maple
#

graphql is nice is you a have a massively complicated api

sudden geyser
#

Unless Dataloader isn't having it that day

#

I couldn't figure out how to use it when I wanted to load entities with certain properties (as in options)

#

I've had success exposing a single query endpoint but having a bunch of separate endpoints for transacting/modifying data

boreal iron
#

People in 2022 can’t remember anymore how to do things without using a library

sudden geyser
#

hey now libraries are cool

#

or would you rather see framework on top of framework

boreal iron
#

Yes, yes freerealestate

#

Oh no

#

Tim

quartz kindle
#

hence why i go 0 dep

#

:^)

boreal iron
#

Good boy!

#

Now play rust with me

quartz kindle
#

lel

boreal iron
split hazel
pulsar bone
#
if "trigger" in message.content: 
      if message.author.id == 294882584201003009:     
        confirm = discord.Embed(created embed)
        button = [Button(style=ButtonStyle.red,label=":cute: BroadCast")] 
        await message.channel.send(embed=confirm, components= button)
        res = await client.wait_for("button_click") 
        if res.channel == message.channel:
          if message.guild.name in db.keys():                                 
            link= str(db[message.guild.name])                                     
          else:               
            db[message.guild.name] = str(await message.channel.create_invite(max_age=0))               
            link = str(db[message.guild.name])                                
  
          msglink = "ttps://discord.com/channels/" + str(message.guild.id) +  "/" + str(message.channel.id) + "/" + str(message.id)                       
          GaTimeone = message.embeds[0].description.split("Ends:")          
          GaTime = GaTimeone[1].split("Hosted")    

        
          if message.guild.id in premium:
              GA_msg = discord.Embed(embed created)
        #non premium
          else:
              GA_msg = discord.Embed(embed crated)
          for guild in client.guilds:                                       
                channel = discord.utils.get(guild.text_channels, name='channel-name')              
                if channel:                                                      
                    await asyncio.sleep(0.5)
                    await channel.send(embed=GA_msg)

discord giving interaction failed (maybe because the event is triggered by bot , which makes the interacted user diff from event triggering user )
any solution?

split hazel
#

skill issue

#

no solution to that

pulsar bone
boreal iron
#

Well channel.send is no interaction response

#

So it fails

pulsar bone
#

will that be made with interaction response?

raw nest
#

Does someone know a library to generate pattern avatars like the GitHub avatars??

warm sphinx
#

database for discord music bot?

warm sphinx
#

hosted by heroku

#

can you help me guys?

raw nest
warm sphinx
#

i have a question

split hazel
boreal iron
raw nest
lyric mountain
split hazel
raw nest
lyric mountain
#

Gravatar

#

Iirc

split hazel
#

bruh who uses gravatar nowadays

split hazel
#

pretty sure their api is free which is what you want to hear

raw nest
split hazel
#

i want to make an api like that sounds fun

boreal iron
#

Pfff imagine not paying for API usage

#

Poor people

split hazel
#

alright fake

#

do you have a loan on your car

#

if so i hope your car breaks down and you have to continue paying back the loan

earnest phoenix
boreal iron
#

I’ve got a fucking printer and stupid employees in the supermarket taking my cash

split hazel
#

nice

#

ayo imagine if supermarket employees got like a 2-5% commission on each order

#

i'd be loaded

boreal iron
#

One second somebody is knocking at my door…

lyric mountain
#

It's joe

split hazel
#

who is joe

lyric mountain
#

Joe mama

split hazel
#

lmao

#

youre a real comedian

boreal iron
split hazel
boreal iron
azure lark
#

how could i make a folder on a github repo using their api?

split hazel
#

just a github feature

#

otherwise if you dont want to use the raw api im sure your language has a package for interacting with the github api

pale vessel
#

.gitkeep 😇

tribal crow
#

interaction.client.guilds.cache.get()

#

does that work?

gleaming solar
#

Anyone know how to check for SEND_MESSAGE permissions for the bot

#

I have this (!message.member.guild.me.permissions.has("SEND_MESSAGES")) But does not seem to work

boreal iron
wheat mesa
#

interaction.guild

boreal iron
#

if used in a guild of course

tribal crow
wheat mesa
#

in that case, not all guilds are guaranteed to be cached iirc

#

see if the guild is in cache, if it isn't, then fetch it, if it is, then take it from the cache

boreal iron
#

If you don't pass client as argument to your execute function, then yes interaction.client is what you need

tribal crow
boreal iron
#

You're good to go then

earnest phoenix
#

How can I disable inspect element on my chrome extension?

#

is it a license?

compact pier
#

How i can send image as buffer?

quartz kindle
compact pier
#

thanks

split hazel
#

tim you just got outplayed by a novice

warm sphinx
quartz kindle
#

or a remote database hosted somewhere else

slender thistle
#

Prayers for this one

#

Amen

gleaming solar
#

v13 I thought v12 was over

earnest phoenix
#

Mmm, then I think they no longer support using a string or at least I think it is no longer advised

boreal iron
#

You need to use the flags

earnest phoenix
#

You'd wanna use the permissions flags

compact pier
#

why?

sudden geyser
#

means an http request was canceled

#

the error stacktrace isn't useful so good luck finding where that happened

#

but usually the error isn't your direct fault

warm sphinx
#

how can i add the option servers bot is in

#

like from where i can get the ids?

quartz kindle
# warm sphinx

you can get them from inside your bot, by console.log or print
or you can right click the server and copy id, if you are in the server and have dev mode enabled

#

also, for that option to work, that server needs to be listed in the top.gg server list

round cove
#

God I hate interactions timings so much :^)

cinder patio
#

Why does graphql need a root Query type? Can't I just do:

type User {
    id: ID
    get(id: ID!): User!
}

instead of:


type User {
    id: ID
}

type Query {
    getUser(id: ID!): User!
}
#

nvm I think I found out

#

...weird design choice if you ask me

#

oh wait I get it

split hazel
#

imagine using graphql in 2022

raw nest
#

Is it possible to have 2 applications on the same domain? If they just have diffrent routes?

split hazel
#

if you want them to run on the same port you have to use a reverse proxy

#

because operating systems dont allow two applications to run on the same port

split hazel
#

that will do just not sure how you would configure it

quartz kindle
raw nest
#

yes it would be a subdomain

quartz kindle
#

a single domain with different paths cannot, but you could achieve the same thing by routing it

#

with nginx, just give each subdomain its own server block

earnest phoenix
#

I thought you could run an api and then frontend on the same domain (without using subdomains)

#

How does discord do it if not this way?

quartz kindle
#

routing and proxying

raw nest
#

I think it's possible... it doesn't make sense if it wouldn't

#

yes

earnest phoenix
# quartz kindle routing and proxying

So it is possible to use the same domain without subdomains and just have a path for the api stuff
https://example.com/api/v#/stuff
https://example.com/app

quartz kindle
#

yeah

#

basically the difference between path and subdomain is the level at which the separation is done

#

subdomains can point to different ip addresses by dns

earnest phoenix
#

I've never used nginx before so idk how all of this works

quartz kindle
#

sub1.example.com -> ip address -> nginx server for sub1 -> root proxy -> your app
sub2.example.com -> ip address -> nginx server for sub2 -> root proxy -> your app

example.com -> ip address -> nginx server -> /app proxy -> your app
/api proxy -> your app

earnest phoenix
#

I see

#

So you can point to the same domain just different paths

quartz kindle
#

yes

earnest phoenix
#

One can run the frontend while the other runs the backend

#

So then I have a question you'd need to run the front end backend on different ports right?

quartz kindle
#

yes

#

each proxy is a different port

#

unless your app handles both simultaneously

#

then you can just use a root proxy to handle everything in the same app

earnest phoenix
#

Mm I see

quartz kindle
#

one advantage of using paths is that you dont need ssl certificates for each app

#

for subdomain, each sub needs to have its own ssl cert

boreal iron
#

Or just a wildcard cert

quartz kindle
#

arent wildcards harder to get?

boreal iron
#

They just require a dns challenge

quartz kindle
#

ah

simple stump
#

What does this error mean, and how can I fix it?

/home/container/node_modules/discord.js/src/rest/RequestHandler.js:305
        throw new HTTPError(res.statusText, res.constructor.name, res.status, request);
              ^

Response: Bad Gateway
    at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:305:15)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async GuildMemberRoleManager.remove (/home/container/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:144:7) {
  code: 502,
  method: 'delete',
  path: '/guilds/877034374720274452/members/758374974708383744/roles/888644358671331338',
  requestData: { json: undefined, files: [] }
}
quartz kindle
#

im currently using a single multidomain cert for my subdomains

boreal iron
#

But without an own dns system or an api of that system an automatic generation is like impossible

quartz kindle
#

yeah

quartz kindle
simple stump
#

Ah. So there isn't too much I can do to fix it? I did notice that it's related to deleting a message tho

quartz kindle
#

its removing a role from a member

simple stump
#

ah

boreal iron
#

I also handle it by sending the pre-hook of certbot to my webserver providing the environment vars containing the domain name and verification key for this challenge and the webserver proxies the request to the dns server internally verifying the request and executing it in the dns console

#

Once the system is created and automated I can used it anywhere on any OS

#

Actually not really complicated

quartz kindle
#

sounds annoying to setup

boreal iron
#

Nah I wanted an internal solution without publically open the dns server firewall

#

It just accepts requests from my webserver which acts as proxy

#

And all servers running send the requests to the webserver

#

Depending on the OS the shell/batch scripts being executed as task/cronjob every day

#

Whenever certbot decides an update is required it executes the pre-hook (one file) and the magic happens

#

I somehow feel like I explain it a lot more complicated than it actually is

#

certbot -> pre-hook -> batch/shell script -> powershell/curl request to my webserver -> proxy to the dns server -> answer

#

ez pz

#

Literally built a whole dns API

#

because it’s useful for many things

#

Like IP whitelists, VPN services, static hostname for dynamic IP aka. ddns

#

Etc

green kestrel
#

went to post a realistic but fake token as an example to my channel and i got this

#

never seen this before

sudden geyser
#

been around for a while

green kestrel
#

i guess i never noticed as i dont tend to paste tokens into channel