#development

1 messages Β· Page 1794 of 1

earnest phoenix
#

@solar cave

#

the emoji should be written as :emoji:

#

why tf wont discord let me type normally

#
<emoji:1234>
#

there

#

put an extra colon after the first <

solar cave
#

i know python but i cant understand

earnest phoenix
#

@restive furnace still not working

#

i tried this:

restive furnace
#

find root filesystem or simiΓΆar

earnest phoenix
#

?

solar cave
#

lol

#

discord sucks

quaint wasp
#

Hey

solar cave
#

like this?

#

or wrong syntax?

earnest phoenix
#

Yep

#

@restive furnace after some searching through google i found out that i need to set the mount point as /
but now it says there is no efi system partition

restive furnace
#

make one

#

or use the windows one

earnest phoenix
#

Gparted says i cant create more than four partitions so is it safe to use the windows one?

restive furnace
#

yes pretty much

#

it should be enough for 2 OSes

earnest phoenix
#

what stuff do i need to change?

#

i set it as efi then pressed install

#

gave me a warning about wiping sda4 but i dont need it anyways

#

@restive furnace

restive furnace
#

hmm weird

earnest phoenix
#

go back and continue both do nothing

#

😰

restive furnace
#

ngl i haven't dual booted with windows ever

#

so

#

you prob better to aks someone else who has

earnest phoenix
#

what better person than @quartz kindle

#

nothing is working

#

the error message isnt going away

#

but everything else outside of the installer is fine

#

im pressing ctrl alt delete

quartz kindle
earnest phoenix
#

Something else

#

The first option in the image was not there

quartz kindle
#

you need to create 3 partitions

earnest phoenix
quartz kindle
#

from the installer

#

honestly i dont think you need the home partition

earnest phoenix
#

Can i use sda4 for the ext4 / one?

quartz kindle
#

sure, doesnt really matter

#

you have around 20gb free right?

earnest phoenix
#

Yeah

quartz kindle
#

you can try giving 18gb to sda4 as ext4 and / as mount point

#

and 2gb to sda5 as swap

earnest phoenix
quartz kindle
#

no idea

#

modern ubuntu recommends at least 25gb just for installing

earnest phoenix
#

dont have that much

#

This good?

quartz kindle
#

yes

solemn latch
#

πŸ‘€ great screenshots

earnest phoenix
#

wtf happened to the camera lmao

quartz kindle
#

lmao

earnest phoenix
#

this ones good

quartz kindle
#

its easier and faster to delete it first

#

and then create 2 separate partitions

#

than to resize

#

resizing is slow

earnest phoenix
#

already selected continue

#

f

quartz kindle
#

and not needed if you dont have any data

earnest phoenix
#

it finished resizing

#

have 2972 mb of free space

opal plank
quartz kindle
#

hes booting from the ubuntu installer lol

earnest phoenix
#

welp how do i create a new partition

#

the + button and new partition table buttons are disabled

opal plank
quartz kindle
#

you should be able to format the 2.9gb free space into a swap file

opal plank
#

same as windows

#

i must say /s

quartz kindle
# opal plank

ye but are you really gonna enable network and install discord during installation?

#

lmao

earnest phoenix
#

and stoopid firefox keeps crashing

opal plank
quartz kindle
#

lel

quartz kindle
#

lmao

weary pelican
#

Guys I'm looking forward to add a db to my bot, any db recommendations?

weary pelican
#

is mongodb and quickmongo the same?

sly sierra
#

it uses the same features as quick.db but instead of the data on your pc its in mongodb

weary pelican
#

how much storage would you say is needed

#

20gb+?

lusty quest
#

20GB should be more than enough

opal plank
#

right tool for the right job

#

small amount of data? keep it at sqlite or something of the sort
need more malleable data structures? go for mongo or mysql
need something more high end with lots of features? postgres would be my goto
need something absurdly upscale? cassandra or redis
need something that will do thousands of operations per second? keydb

lament rock
#

mongo

opal plank
#

im personally a postgres/keydb man myself

#

im so fancy i wear 2 monocles

earnest phoenix
#

i dont like mongodb atlas

opal plank
#

🧐

lament rock
#

Maria is pretty good, Postgres good though

opal plank
#

postgres absurdly pog

lament rock
#

Just use redis 4head

opal plank
#

keydb > redis

lament rock
#

write your own db

earnest phoenix
opal plank
#

feel the powah

lament rock
#

no way single threaded keydb beats 8 threads on redis

weary pelican
#

any region recommendation for the db?

opal plank
#

but using redis or postgres for something simple would be like trying to break a thin twig with a chainsaw

lament rock
#

have it on the same machine or datacenter as your application

opal plank
#

look, im not a db writter

#

so im trusting what they advertise

#

specially cuz its widely used

lament rock
#

for Discord bots, it is most ideal to have the machine in us east

opal plank
#

they def know a lot more than i do

weary pelican
#

Take in mind I'm from Europe

#

more specific Portugal

lament rock
#

not a problem

weary pelican
lament rock
#

Discord's api servers are located in us east so hosting your bot and database there would be the best option

weary pelican
lusty quest
lament rock
#

Dyno

#

future proofing apps is good

woeful pike
#

why is my docker image 2.2gb

#

python moment

lusty quest
#

lol

lament rock
#

npm install

opal plank
lusty quest
#

wtf did you want to make that needs this much ops?

lament rock
#

Throw the concept of multithreading and memory management at a junior dev

#

first project: make a discord bot that uses a thread pool to handle commands

opal plank
#

lets just leave it at that

#

i think it was the very first few days of js

#

(mine)

lament rock
#

they grow up so fast Smile

quartz kindle
#

lmao

#

redis is faster than keydb on a single thread tho

lusty quest
#

the first few weeks i dont where in any discord server related to programming, i just tried until it worked, or looked throu 10 years old Stackoverflow pages

lament rock
#

isnt while thread blocking

opal plank
woeful pike
#

topgg had ~330 operations a second on mongo before we started moving things off to postgres so maybe you can chill on that 1M ops a second idea

opal plank
#

the most requests i've had was about 112K per minute

#

which is about 2k requests per second, and that was legit routing basically 95%+ of twitch's global traffic of viewers and chats

#

realisitcally you'd need to be at discord's scale to even get close to doing that

lament rock
#

why tho

opal plank
lament rock
#

why did you route 95%+ of twitch's global traffic of viewers and chat

lament rock
#

oh. You were scraping twitch?

opal plank
#

no

#

theres no good lib for twitch

#

so i built one ontop of an existing one

#

and added caching to it

lament rock
#

Oh boy.

opal plank
#

imagine if discord.js was ONLY client.on('message')

#

that level of barebones lib

lament rock
#

Can I get a link to said lib for future ref

opal plank
#

it handles ratelimiting and some neat stuff, like replying, sending commands, etc

#

its built ontop of IRC

opal plank
lament rock
opal plank
#

my lib is not public tho

#

so i cant post it

#

i built ontop of that

lament rock
#

Oh. Okay. I was referring to yours

#

I may or may not have wanted to integrate into twitch

opal plank
#

i ended up caching a SHIT ton of stuff

#

to make use of a better system and reduce on requests

lament rock
#

what did memory usage look like

opal plank
lament rock
#

ah. Right. 300MB no way

opal plank
lament rock
#

That's way less than Discord.js at small scale

opal plank
#

at the time, it was storing a good 3 million+ cached entries there

#

ontop of channel data

#

but yeah, i was testing how well my lib would handle at such a massive scale

#

so i implemented my own sharder/workers + caching ontop to reduce ratelimits

modest maple
opal plank
#

twitch is NOT a platform you want to go for if u want a "popular bot", it breaks at scale super easily

#

you'd need to setup k8 or something

lusty quest
#

K8 is fun, i might build myself a RPI cluster to play around with K8

#

also if i get smarter i could work out some fancy way for scaling detritus easy inside k8

modest maple
#

I wouldnt think its that hard

#

what do you think would be complicated with it?

lusty quest
#

that you make it so that it can scale itself

#

depending on the load

modest maple
#

The biggest issue you'll have is probably the duplicate instances connected to the same shard

#

if you wanted it so it was truly un-interrupted scaling

#

assuming we're looking at the traditional each process has x shards, idk detritus

opal plank
#

i opted out of k8

#

it was easier to just disptach a worker for each shard

modest maple
#

k8s makes scaling bots reasonably simple

#

it basically just requires using statefulsets

#

and thats about it

#

un-interrupted events is harder because unlike webservers you cant just tell the load balancer or network switch to just ignore that pod till it's ready. But i imagine some shared signal state would work

lusty quest
#

you might could make a manager ontop of the bot that handles the state signals

modest maple
#

could

#

although at that point i think it would simpler to go with a message broker setup

#

so you end up with a multithreaded gateway that sits on each machine which unless it's a discord api update wouldnt need to be restarted at all

#

and then you can just freely restart workers without interuptions

flat copper
#
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
      </button>```
This is opening from top to down 
But I want left to right. 

In `ejs`
lusty quest
#

i havent worked into how detritus handles sharding, but from what i saw for now it could make running it inside K8 rather easy

modest maple
#

If its like any other lib

lusty quest
#

its different than d.js

modest maple
#

stateful set and you're done pretty much

#

if it takes the total shard count and an array of shards to identify with then its the same as everything else really

lusty quest
#

@opal plank how different does Detritus handle Sharding than D.js?

opal plank
lusty quest
#

yea thats what i know already

opal plank
#

this is an example for presences(which is what i needed), but just ignore that word

modest maple
#

why do you have 9 lots of connecting to shard 0

opal plank
#

its an example

#

you wouldnt realistically have multiple clients to the same shard

modest maple
#

well in that case if thats not literal its pretty easy

opal plank
#

its sahrd 0 within the cluster

#

but just image its 4,5,6,7 etc...

modest maple
#

def shard_ids_from_cluster(cluster, per):
return list(range(percluster, percluster+per))

#

ye old formula

opal plank
#

u fuck

#

im literally saying this is just the example

#

detritus doesnt connect the same shard to multiple clients

modest maple
#

ik what you mean bonk

opal plank
#

and im not the one who made that either way

modest maple
#

tl;dr take the hostname of the stateful set

#

treat that as the cluster id

#

generate n shards based off that

#

happy scaling

#

you're welcome

lusty quest
#

wasnt detritus also way faster with starting shards than d.js? i think i have read something about it on the detritus discord

modest maple
#

isnt that entirely dependant on discord?

#

your speed is limited via the ratelimit of identifying shards

#

cant / shouldnt just slap them up as fast as possible

opal plank
#

and yes

lament rock
#

Discord.js waits for all GUILD_CREATEs to be emitted from all shards with a 5000ms wait time for unavailable guilds to become available before it emits the ready event from the shard manager

opal plank
#

theres a 5 second delay between shards

#

HOWEVER

#

discord.js does some wacky ass shit in the background apparently

opal plank
modest maple
#

Judging from what papi said likely due to the change discord made to identifies and getting member cache

opal plank
lament rock
#

Discord.js has done this forever though

modest maple
#

Man that looks like a pointless benchmark lol

lament rock
#

It's always been about caching and "type safety"

sudden geyser
#

benchmarks are evil in general

lament rock
opal plank
lusty quest
#

and now i hope i will never reach 1 Million Guilds, having the need to get over 100GB of Free ram is a bit over the top, unless i get a way to monetise it properly

lament rock
#

I'm trying to rewrite LavaLink with node libs and not so difficult so far. Hardest part is probably setting up a thread pool

quartz kindle
#

those are the most useless benchmarks lol

lusty quest
#

ive found a lib for it a while ago, i used to to run tensorflow on mutiple threads

lusty quest
#

probably not the most efficent one for the job tho

opal plank
quartz kindle
#

i will

lusty quest
#

lol he will

quartz kindle
#

eventually

opal plank
#

someday

lament rock
#

Everyone knows Djs the worst at memory management

opal plank
#

everyone knows djs is shit

#

period

#

use detritus

#

problem solved

quartz kindle
#

go to detroit

lament rock
#

write your own proprietary libs

lusty quest
#

well the caching behavior is just stupid

lament rock
#

like AmandaDiscord/ThunderStorm

near stratus
opal plank
#

devs without at least 2-4 years of development into a lang shouldnt make libs/modules
change my mind

lament rock
#

who gets to slave away then

lusty quest
#

you mean the people who use the is-uneven npm package

opal plank
#

not only that

#

fast-discordjs

#

fast-lib

#

fast-strings

#

@quartz kindle had benchmarks showing those fucks claiming their shit is fast, is usually the worst

#

hence why i like detritus

lament rock
#

reimplement Buffer into older node versions using string concatenation

opal plank
#

it calls itself trash

#

being the best

near stratus
lament rock
quartz kindle
#

people actually do that

#

its so stupid

lament rock
#

I have people fork my bot just to try to host on heroku and they can't

opal plank
#

why call yourself best and be the worst/trash
when you can yourself trash and be the best?

lusty quest
#

just require a package heroku doesnt allow to be installed

opal plank
lusty quest
#

even if you dont use it

lament rock
#

Use anything that requires windows-build-tools

near stratus
quartz kindle
#

lmao

opal plank
#

or private ur repo

lament rock
#

Open source for transparency

opal plank
#

npm should have a report button

lament rock
#

it does

near stratus
opal plank
#

shh, dont argue with my flawled logic

lament rock
#

Lemme make a PR to fix it then

quartz kindle
#

xD

opal plank
#

poggers

near stratus
opal plank
#

command handling

#

AND checking for permissions before deleting

#

AND awaiting his promises

#

AND catching his exceptions

#

Wow

#

i guess all the effort went into advertisements

quartz kindle
near stratus
opal plank
#

but guys, look how pretty my thing is

opal plank
#

are they here?

#

hmmmmmmmmmmmmm

restive furnace
#

ping him mmLol

opal plank
#

do ew ping?

near stratus
#

I wanna ping him so badly

opal plank
#

same

quartz kindle
#

i dont wanna offend anyone, but from what ive seen, french devs heavily resemble turkish devs

#

for some reason

#

lmao

opal plank
#

i havent seen many french devs, so i cant comment

quartz kindle
#

they are

#

...special

opal plank
#

so

#

answer me rq

#

what is this

#

oh wew

quartz kindle
#

ye wtf

opal plank
#

they have a website

quartz kindle
#

just noticed that

opal plank
#

or whatever the fuck that is

#

i REALLY wanna ping now

wary swan
#

dew it

earnest phoenix
lament rock
#

what the dog doing

near stratus
near stratus
quartz kindle
#

dude

#

check his videos intro

#

lmfao

near stratus
#

hol on a moment

quartz kindle
#

open his "youtube", login with his username and password

#

go to his oldmodz95 list

opal plank
#

lmao

wary swan
#

wait there is actuall videos

restive furnace
#

what is his "Youtube" actually?

quartz kindle
#

its like an indian photoshop thing

#

lmao

wary swan
#

lmao

opal plank
#

okay buddy, wtf

#

who doesnt clear their mentions

wary swan
#

there is free mandolorian pog

#

cant wait to watch in french

opal plank
#

POG he's modifying the client

#

tos time

wary swan
#

tossed from private youtube hashflushed

quartz kindle
#

he just copy pasted the code that enables discord experiments

near stratus
opal plank
#

modifying the client

#

https://exotique.fr2.quickconnect.to/webapi/entry.cgi/1.mp4?format=raw&api=SYNO.VideoStation2.Streaming&method=stream&version=2&stream_id=%226c10213867da08eb2fcb5c3ecd0ad350_I3Ikxo2s%22&tid=ypPRJ33jEoznID43PeHp6NI4TUAlbyGlKHc3a

wary swan
#

and there is 130 films on his youtube pogey

#

now i like this guy

near stratus
#

Nah I can't take it anymore
@earnest phoenix

quartz kindle
#

lmao

wary swan
#

more like open source pishing client

opal plank
#

jesus chirst

#

was not expecting this much shit

quartz kindle
#

his video about how to create a rest api

opal plank
#

LMAO

quartz kindle
opal plank
#

BRUIH

#

TIM

#

his linked account terminated

quartz kindle
#

lmfao

wary swan
lament rock
#

always love seeing a file start with <?php

opal plank
#

and pretending to have all badges

#

omg

#

are u shitting me

#

Private Server Fortnite - All Skin and Item + Infinit V-Bucks - Free 2020

lament rock
#

NO WAY

opal plank
lament rock
#

token grabber

opal plank
#

@quartz kindle Private Server Fortnite - All Skin and Item + Infinit V-Bucks - Free 2020

quartz kindle
#

lmfao

opal plank
#

bruh, this kid, i swear

small tangle
#

is there a way to edit the original interaction message and change the ephemeral setting?

#

e.g. i only want error messages to be ephemeral

opal plank
#

i havent tested much with ephemeral messages

wary swan
#

me too

small tangle
#

because when i use the hook its sending another message with reply on the orginal message like this

#

but instead i want to edit the original message

opal plank
#

also pog, im 90% sure modding epic games launcher is illegal

opal plank
#

oh i see

#

my bad

small tangle
#

should be like that

#

but only for errors

lament rock
#

You can't edit ephemeral messages

small tangle
#

but it seems i have to decide first

#

and cant change it on execution

#

yeah

#

okay, then im making everyone visible i guess

#

because some command are probaly taking longer than 3 secs and my logic should not be based on hope that it takes less than 3 secs

lament rock
#

You can send a response to the interaction where it shows the bot is thinking

quartz kindle
#

why does it take 3 seconds?

opal plank
small tangle
#

u mean its very unlikely that it takes that time?

quartz kindle
#

3 seconds sounds very slow, aka very inefficiently made

lament rock
#

The timeout for responding to an interaction is like 5000ms

small tangle
lament rock
small tangle
#

maybe im finde, should look that up FeelsSmartMan

lament rock
#

db queries shouldn't take that long

#

if it does, then there's an issue

small tangle
#

yeah thats true

opal plank
#

at most you'd be looking at a 250ms if ur db is somewhere else

#

anything more than that, i'd recommend looking into it

quartz kindle
#

my db queries take 0.13ms

small tangle
#

what is the best way to look the times up, just timestamps before and after calling?

opal plank
quartz kindle
#

measure it yourself with console.time or performance.now

opal plank
#

performance.now is more accurate, no?

small tangle
#

i see thanks peepoHappy im looking at my times

quartz kindle
#

they should be equivalent

#

i believe both are based on high resolution timers

#

ie, process.hrtime in node

opal plank
#

then its fine

small tangle
#

Okay maybe i was a bit pessimistic about my response times LuL

#

It seems fine, if im just replying when it runs into an error instead of acknowledge it immediately and edit it

rapid wharf
#

Why not to use repl???

small tangle
#

Sorry? MonkaHide

near stratus
rapid wharf
#

for hosting of bots

near stratus
rapid wharf
#

oo

solemn latch
#

rep lit .com

small tangle
#

Im just using my raspberry peepoHappy

earnest phoenix
#

The biggest reasons for not hosting bots on repl is FFMpeg doesn't work afaik and the fact that actual node repls are on v12 while deno and bash repls can run node v14 for some fucking reason

rapid wharf
near stratus
quartz kindle
#

replit is still on v12? lmao

solemn latch
rapid wharf
near stratus
opal plank
quartz kindle
#

still

#

replit is better than glitch

opal plank
#

for websites

near stratus
opal plank
near stratus
vivid fulcrum
#

comparing garbage to garbage

opal plank
rapid wharf
opal plank
#

see what i did there?

vivid fulcrum
#

lmfao

opal plank
quartz kindle
#

you can easily host a slash command bot on repl.it

near stratus
small tangle
near stratus
quartz kindle
#

lmao

opal plank
#

cuz i have a VPS

#

a PROPER vps for hosting bots

#

not a thing that was meant for websites

#

and that requires uptime bots

#

or that has limited hours/month

quartz kindle
#

still doesnt answer their question lmao

rapid wharf
opal plank
#

they were asking why not i dont use repl

#

i answered

#

cuz i have a vps

quartz kindle
#

they werent lmao

modest maple
#

no

opal plank
#

oh

#

nvm then

quartz kindle
#

lmao

modest maple
#

they were asking you why they

near stratus
opal plank
#

i can blame on me being drunk

#

scot-free excuse

near stratus
opal plank
#

somehwer in taht range

#

yes

quartz kindle
#

shes 14

opal plank
#

jan 98, do the maffs

quartz kindle
#

:^)

near stratus
near stratus
opal plank
#

i never said i was 20

near stratus
#

nvm

opal plank
#

i said in that range

rapid wharf
quartz kindle
#

in most countries you can drink at 16 lol

opal plank
#

except in brozil

near stratus
quartz kindle
#

still bronzil is 18 not 21

opal plank
#

in brozil parents give u booze at very early age, like 11 or so

quartz kindle
#

or that

#

lmao

rapid wharf
#

btw my question...... πŸ₯²

opal plank
#

i did tell u that

near stratus
opal plank
near stratus
quartz kindle
#

discord bots use websockets to communicate with discord (unless you use slash commands only, which dont need websockets)

near stratus
quartz kindle
#

websockets need your bot to be always connected

sudden geyser
#

HTTP API

quartz kindle
#

and hosts like repl.it shut down your bot for inactivity

#

unless you pay

opal plank
#

wouldnt cloudflare legit boot you after a while for too many connections? websockets get destroyed after 3 minutes of inactivity, no?

rapid wharf
near stratus
quartz kindle
opal plank
#

weebhooks

onyx hare
#

ive gone brain dead:~ how do i make it so if theres no text with the command it'll say "please put input to complete the command"

const Discord = require("discord.js");
const Canvas = require("canvas");

exports.run = async (client,message,args) => {
    const text = args.join(separator = ' ');

    const canvas = Canvas.createCanvas(460,650);
    const ctx = canvas.getContext('2d');

    const background = await Canvas.loadImage('./img/sb.png');
    ctx.drawImage(background, 0, 0, canvas.width, canvas.height);

    ctx.font = '26px sans-serif';
    ctx.fillStyle = '#000';
    ctx.fillText(text, 50, 100);

    const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'sb.png');

    message.channel.send(attachment);
};
sudden geyser
#

separator = ? wut

#

this ain't kotlin

quartz kindle
#

if(!text)

onyx hare
#

this is ok right? if(!text) return message.channel.send("Please Provide Input: EG `c!sb Hi`")

#

k i need to add args init

#

ik-*

quartz kindle
#

πŸ‘

proud plover
#

Finally My Bot Is Approved

solemn latch
#

congrats

small tangle
#

iPog gz

proud plover
small tangle
#

Welcome to the green club

proud plover
earnest phoenix
#

Ah okay

#

Had to scroll through a fuck ton to find that ping erwin

near stratus
earnest phoenix
#

Wait what

#

Since when was that a thing

opal plank
earnest phoenix
#

😩

opal plank
near stratus
opal plank
#

yall trippingh or what

earnest phoenix
#

Really man I am dumb

opal plank
#

theres literally a button

near stratus
opal plank
#

on the corner of ur screen

opal plank
earnest phoenix
#

Yea true

#

I just woke up so I wasn't thinking about inbox

near stratus
earnest phoenix
#

Mobile has it as well

opal plank
#

watch this guys

#

im about to end his guys' career

near stratus
proud plover
opal plank
#

if ONLY mobile had an inbox too

earnest phoenix
#

I dont even know where you find it anymore

near stratus
opal plank
#

sankyu

small tangle
#

What where is the inbox on mobile πŸ‘€

#

Oh i see not on the server itself

small tangle
#

im feeling kinda dumb, but rn my "hosting" is just running my bot .jar imshy what would be a better way for a java bot? it doesnt feel right to me

#

i should add im using a raspberry to host it

zinc wharf
#

Get a cheap VPS

small tangle
#

i mean yeah thats of course an option, but i would like to still use my pie for it, but i couldnt find a nice possibility for java

zinc wharf
#

You can actually run your pi 24/7, but you do need to add few things to it

#

I present to you, raspberry pi watercooling

small tangle
#

its already running 24/7, but im not sure if im doing it the right way

zinc wharf
#

Ah lmao

small tangle
#

or like how you should do it

zinc wharf
#

I run my own server with a hosting panel on it, so I don't know other than PM2

#

And I have no idea if you can use PM2 for java

small tangle
#

hm FeelsSmartMan

#

Time ago I had the chance of creating some pm2 services for NodeJS, but this time I wanted to create a java service and I wonder if that was possible. Well, the answer is yes since pm2 can use a json config file to start the service you want.

#

sounds good

wheat mesa
small tangle
#

im looking more into it, thanks for mentioning it! peepoHappy AlpakaSweet

tired panther
zinc wharf
wheat mesa
#

Always better to be safe than sorry!

small tangle
#

mine is 43Β° so not that bad

#

im having a passive cooling case

wheat mesa
#

Keeping your components cool also extends their lifespan

zinc wharf
#

Better than my macbook at 80 degree c most of the time

#

Sometimes reaching 100 degree c

small tangle
#

100?

zinc wharf
#

Yep. Thats macbooks for you

sudden geyser
#

Yeah it feels like that sometimes

#

I put my macbook on my lap once and it felt burning

wheat mesa
#

100c

#

not good

zinc wharf
#

I'm surprised I still got flesh for legs

wheat mesa
#

Most intel CPUs will perform a safety shutdown at 105c right?

zinc wharf
#

I believe so yes

small tangle
zinc wharf
#

I've installed mac fan control, so when it reaches like 90 degree c, my fans turn to full blast

opal plank
#

kwispy

modest maple
#

Generally my liquid cooled system will hit 90c just about at 100%

#

great in the winter time

wheat mesa
#

Pretty sure the max my water cooling has hit is like 80c while rendering high quality video

opal plank
#

my laptop sometimes start fission reactions if i open 2 discord clients

wheat mesa
#

lmfao

lusty quest
zinc wharf
#

Asus Tweak be showing my graphics card temp, but not my CPU's what

lusty quest
#

my pi runs now for almost 2 years with a passive heatsink

zinc wharf
lusty quest
#

watercooling is only needed if you overclock the pi

opal plank
#

isnt that completely counter intuitive tho?

zinc wharf
#

Who doesn't overclock technology leonardgun

lusty quest
#

there are people who use them instead of a VPS, so they overclock them to get faster clock speeds

wheat mesa
#

If it has a clock speed, people have overclocked it!

opal plank
#

you'd be buying a raspberry for small applications, the fact that you need to overclock it or pay for water cooling means its not the right pick, unless you going for bitcoin miners or something where u care about energy costs

lusty quest
#

would not say only small applications, they can to a lot of stuff

#

but yea usually either for Home Automation, some networking stuff, or just to play around with it

#

also there are people who use them as a desktop Replacement

#

sure not a powerful one, but for browsing the internet all day long its good enough

opal plank
#

fair

zinc wharf
#

I used my raspberry pi for exporting a youtube video before kek3

lusty quest
#

i use one for Monitoring my Internet connection and pihole

zinc wharf
#

I thought about getting pihole ngl

lusty quest
#

they cant block the adblocker if the adblocker is not even in the browser

#

also it gets rid of a ton of Tracker

#

like Microsoft tried today 10k times to send telemetry back home, on atleast 2 devices

zinc wharf
#

Jeeeeee

lusty quest
#

wait not today, this week sry

#

but still

zinc wharf
#

Thats a lot

small tangle
#

but to be fair, its totally fine to just build a .jar from my botfiles and run it, or? ASpeek

lusty quest
#

like rightnow about 45% of the DNS requests in my network get blocked

zinc wharf
#

When multiple random CMD's starts popping up

#

Right so, apparently my CPU temp is 60 degree c

earnest phoenix
#

is this a memory leak the vps has 6gb ram

static trench
#

hey im getting a really wierd error on my IDE

aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')]```
tired panther
#

from where are you doing the request?

static trench
#

so its my connection to wifi?

#

im doing it from my computer on my phones hotspot bc my wifi is down

tired panther
static trench
#

no my wifi is don

#

down

#

so im on my phones hotspot

tired panther
static trench
#

ok

#

im guessing its my wifi

hot sage
#

im working on a server info command, and the owner thing isnt working, I think it is ctx.guild.owner, but it always shows up as "None" (python btw)

modest crane
#

the owner is probably not cached

#

either use owner_id or activate the members intent

onyx hare
#

for this const background = await loadImage(join(__dirname, "..", "img", "RankCardBG_1.png")); would i beable to use a random.math?

sudden geyser
#

Yeah

#

Just concentrate it into the string.

onyx hare
#

id replace "imgname.png" with 'random' right?

sudden geyser
#

Let's say the filename was RankCardBG_1.png but you wanted to select a random card between 1 and 6. You could write it as

let name = `RankCardBG_${Math.floor(Math.random() * 6) + 1}.png`
#

But you could have other meanings of random.

#

For example, the names aren't predictable and you want to select a random file from the directory.

onyx hare
#

for the first part const background = await loadImage(join( id have it be const background = await loadImage(join(RankCards))?

#

with the file directory part ofc

lyric mountain
#

oh nvm

#

lowest value must be 1

pale vessel
#

so Math.ceil(Math.random() * 6)?

lyric mountain
#

that + 1 is still needed

#

oh wait

#

yeah, ceil will do it

onyx hare
#

have i got this right? ```js
let RankCards = RankCardBG_${Math.floor(Math.random() * 10) + 1}.png
const canvas = createCanvas(1000, 333)
const ctx = canvas.getContext("2d");
const background = await loadImage(join(__dirname, "..", "img", RankCards));

hidden nacelle
#

can i make a bot using C#?

pale vessel
#

Of course?

hidden nacelle
#

alright

#

thanks

prime mist
proven ice
#
const buff = await new Canvas(611, 746)
    .addImage(image, 0, 0, 611, 746)
    .setTextFont("48px Arial")
    .setTextAlign("left")
    .addMultilineText(text, 350, 450, 200, 40)
    .toBufferAsync();
  res.type("image/png");```
if anyone knows how to use canvas what is the problem here lol, im getting this error:

TypeError: (intermediate value).addImage is not a function
proven lantern
#

const x = await new Canvas(611, 746)

#

x.addImage()

#

maybe

#

or this

    .addImage(image, 0, 0, 611, 746)
    .setTextFont("48px Arial")
    .setTextAlign("left")
    .addMultilineText(text, 350, 450, 200, 40)
    .toBufferAsync();
  res.type("image/png");
sudden geyser
#

await is probably for .toBufferAsync()

acoustic pivot
#

what do you all use to host discord bots or what do you recommend?

vapid berry
#

i use ponbus, super cheap host and super nice owner

acoustic pivot
#

alright. thanks

sudden geyser
#

node is probably not in the path in the vsc terminal for some reason (but I don't use Windows so I'm not 100% sure).

split hazel
#

have you restarted vsc

mild agate
#

Computer teacher teaching why useless logic is important for exam marks...

wheat mesa
#

I mean the modulus operator is... sometimes useful...

mild agate
#

Try to understand.... Use 🧠

#

why check if last digit is even if the number is divisible by 8?

wheat mesa
#

Maybe you have items that stack up to 8 in a game and you need to figure out how many stacks to put them in!

#

You never know

mild agate
wheat mesa
#

Never really used it outside of school

#

It's more about teaching you about the operator

mild agate
#

Bruh.... I am not talking about operators....

#

I am talking about useless logic

#

Deducted my marks because I just wrote
if(n1%8==0)

split cipher
#

Is there a way of getting the colour code based on the user's avatar? I don't want the bot to get the colour based on the member's role. djs btw

sudden geyser
#

Discord extracts the most dominant color in the user's avatar. I don't think they make the value available in the public API, so you'd need to extract it yourself.

inner fulcrum
cedar wave
#

I am trying to run a bot but get this error (it's made in python btw). Does anyone know how one would fix it?

#

Here's lines 1 through 11 btw for reference

copper cradle
#

split the global declaration in 2 lines

earnest phoenix
#

As it says, wrap it in " instead of '

copper cradle
#

but they're not wrapping it in '

earnest phoenix
copper cradle
#

oh wait

#

why the fuck does it say line 6

earnest phoenix
#

Line 6 in the JSON Β―_(ツ)_/Β―

copper cradle
#

my bad I didn't see the jsonDecodeError part

earnest phoenix
#

Happens

shrewd slate
#

Hmm can anyone make me a giveaway bot

wheat mesa
#

This isn’t the place to ask for someone to make you a bot

#

We can help you make a bot if you have questions about the code you write for it though!

shrewd slate
#

Ok what is code

shrewd slate
wheat mesa
#

Javascript, python, etc etc

#

Oh ok

shrewd slate
#

No I mean like how to code

#

@wheat mesa

wheat mesa
#

Well, pick a language and start learning about it

#

The internet has a ton of great resources for that

#

You’ll need an IDE

#

Or a text editor, but preferably an IDE

#

And before making a discord bot, you should learn your language of choice

shrewd slate
#

@wheat mesa I know a language English and kannada

#

@wheat mesa

#

@wheat mesa @wheat mesa @wheat mesa

#

@wheat mesa @wheat mesa @wheat mesa @wheat mesa

#

@wheat mesa

#

@wheat mesa

#

@wheat mesa

earnest phoenix
#

What

proud plover
earnest phoenix
#

i feel ashamed

#

im the only indian here with brains (bold statement ikr)

earnest phoenix
#

Anyways is this good for installing ubuntu? @quartz kindle

#

I can't create more than four partitions so i converted sda4 to an extended partition

#

Then I created two logical partitions in there

honest inlet
#

$tu

earnest phoenix
#

???

vital void
earnest phoenix
#

How i get fact api??

#

we cant find the error if you send the entire file and dont even tell us what's causing the error

earnest phoenix
#

πŸ˜• ok ty

vital void
#

for psulin and presence

earnest phoenix
#

u messed up your imports probably

vital void
#

hmm i guess so

earnest phoenix
#

im not a python expert so i cant help you

#

OMG i made it through the ubuntu installer!

#

finally after 4 days of utter torture i can finally say fuck you to windows 7 and hug you to linux

restive furnace
#

now time to single boot into linux :)

dusky lagoon
#

i have a emoji react on one of my commands but it keeps giving me this error and the bot isnt in a server i own (node:46964) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions

small tangle
#

start catching exceptions and give the user a message saying its missing xx permission to execute the command :D

#

you shouldnt rely on hoping that everyone sets up your bot perfectly regarding permissions

earnest phoenix
#

Is there a way to replace "image":"image_url" and make it "image":{
url:"image_url"?
}

next gate
#

Does someone know a bot which detects these Guild Voice States ?

next gate
#

Give a role to the people who go live or turn camera on for example

restive furnace
#

VOICE_STATE_UPDATE?

long crow
#

If you asking specific bot, no idea. But if you asking some library might have it, I know djs v13 have it. But it still under 'developement'

next gate
#

I'm asking just for know because I don't know if it's possible to make a bot capable of that, but they are in some libraries and I know a private bot which detects it. So I leave my question here in order to find a developer whose bot has that feature or to give ideas of features for developers!!

earnest phoenix
#

I get confused if this is a programming channel or a bot searching channel

proud plover
#

How Can I Get Total Number Of Votes Of A User ?

quartz kindle
#

GPT supports 128 primary partitions, and is a requirement for running an OS in uefi mode

#

MBR only supports 4 primaries and requires the bios to be set in compatibility mode

#

but should work fine using logical partitions, you just cant have a boot manager in them i believe

near stratus
rose warren
copper cradle
#

deprecated β‰  decommissioned

vagrant gate
#

I am getting a module not found error. what is wrong

slender thistle
#

Did you mean ../db/test.js?

vagrant gate
#

not working

slender thistle
#

Or, rather, ../db/test

vagrant gate
slender thistle
#

Oh wait

modest maple
#

that looks double nested

#

that test.js looks like it's in denemev2

#

so you gotta go back 2 i think, JS moment

slender thistle
#

Yeah

slender thistle
#

../../db/test sounds like it

proud plover
#

ok*

vagrant gate
zinc condor
#

What classifies a slash command. Since there is a limit im guessing not all commands should be slashes but which ones should be

vivid fulcrum
#

....a slash command

#

oh

#

you want to migrate some of your commands to slash ones?

#

if that's the case, you probably shouldn't as slash commands are still garbage

#

but if you really want to, there's no classification per se

#

do what feels best

latent heron
#

it's beginning to take shape

#

although the CSS code I've had to write for this already brings me anxiety

vivid fulcrum
#

what are you using to build the app

latent heron
#

Figma for the mockup

#

writing the CSS and HTML now

vivid fulcrum
#

raw css and html?

#

yikes

#

you might want to look into SPA frameworks

latent heron
#

will pass for now

vivid fulcrum
#

pretty much nobody sane writes apps in raw css/html/js anymore

#

primarily because of complexity i guess

modest maple
#

cuz its slow as fuck and often people cant write maintainable css

latent heron
#

people also write forced css code which fucks up a lot of their margins and shit

#

which is why you should responsibly be looking at what you're putting in hierarchy as well as the class values

opaque seal
#

what do you guys use instead of raw css?

latent heron
#

CSS frameworks

opaque seal
#

like saas?

vivid fulcrum
#

this and jss

latent heron
#

I used to use Bootstrap but I got tired of that

opaque seal
#

does it really make the difference?

latent heron
#

moved to Materialize and got tired of it too

#

it's preference honestly

#

most hop between Sass and JSS now

vivid fulcrum
#

didn't materialize drop maintenance like

latent heron
#

years ago

vivid fulcrum
#

years ago

latent heron
#

yeah

#

i loved where they were going

opaque seal
latent heron
#

until they gave up

vivid fulcrum
#

i remember trying to use it but the css was so broken

latent heron
#

Sass is more flexible

#

CSS has some strict limitations

latent heron
#

was not a good time

#

the painful thing about CSS is unlike Sass you have no @extend

latent heron
opaque seal
pale vessel
#

No problem using pixels

latent heron
#

because i can?

#

lol

pale vessel
#

Why does it matter?

woeful pike
#

nothing wrong with using pixels although in this case I think you're trying to use absolute positions for layouts which is not good

vivid fulcrum
#

you know im about to say it

#
  • flexboxes *
latent heron
#

the only things i use absolute positions on are the boxes that define the structure of the chatroom

#

like the "sections", ie. navigation bar

woeful pike
#

there's no reason for navbar to be absolutely positioned

latent heron
#

everything else is kept relative and scalable

woeful pike
#

unless you need it to be on top of all your other content

earnest phoenix
#

Hi

woeful pike
#

the only thing absolute position really makes sense for is overlaying text on top of a background image and dropdowns that need to be positioned outside of the site layout relative to another element

latent heron
#

ok

woeful pike
#

what does your site look like? maybe there's a better way of doing the css

#

if you're interested ofc

latent heron
#

the mockup design or the current state?

woeful pike
#

the thing you want I guess

latent heron
pale vessel
#

MILLION do be kinda right /s

latent heron
#

it'll be looking better later on

#

i just want to get it from the mockup to an actual design being out

#

so that i can then tweak it further and make better refinements from there

woeful pike
#

if you spend all your time doing mockups you're not gonna be making a website lol

latent heron
#

i'm perfectly aware of that xetera

woeful pike
#

I know I was agreeing with you

latent heron
#

im on fumes

#

mcdonalds gave me the fiery shits already with the coffee

woeful pike
#

hmm I don't really see anything here that should be absolutely positioned

#

it's a good start tho

quartz kindle
#

i like the design

latent heron
#

well for example, my conversations code has an absolute position

#

but if i remove that, it's gonna be inline under my navigation bar

#

but i don't want to determine flexing positions and change the display values per CSS class

modest maple
#

PepeHands this is gonna be a thicc docker image

latent heron
#

I can do display: flex; for now but that means i would later have to change how to arrange items

#

which is a no fun at times

modest maple
#

looking at your layout design

#

that can just be done with a flex box

#

without much agro

woeful pike
#

I mean I'd be looking at something like this

#

the only thing that scrolls is the middle container

latent heron
#

i could let you see where it's currently at

#

yeahh

#

i was wondering about that

#

i currently have the conversations css class now on a flex with 100vh

woeful pike
#

you flex: 1 the chat container to let it take up the most space and give the top bar and chat input bar a fixed height

latent heron
#

i think i have the conversations header/title at a fixed height

#

i'd do the same for the other one

#

because everything i would like to do rather in sections instead of entirely tables for the top headers

woeful pike
#

they don't have to be fixed as long as you don't let it grow

latent heron
#

nah

#

their height will be a constant

woeful pike
#

also do yourself a favor and use modern-normalize

#

so you don't have to deal with this box-sizing nightmare

feral aspen
#

Hi. Sorry, My bad. πŸ˜‚

opal plank
#

@feral aspen typescript would've screeched at you for that

feral aspen
small tangle
#

i was about to type a respond lol

feral aspen
#

My bad..

#

I did job: Number but not job: String in the model.

small tangle
#

sometimes you need a 34.737 look at it, happens everyone Shrug

feral aspen
#

I sometimes send my entire help message and realise it at the very end.

small tangle
#

especially when you're typing your question, you often realize your mistake

slender thistle
#

Rust

    // Print out text for user
    print!("Enter array index: ");

    // Read user input
    stdin().read_line(&mut index).expect("Reading line failed.");

Why does the read_line part execute before print!?

opaque seal
latent heron