#development

1 messages · Page 1561 of 1

lament rock
#

You could check to see if Guild.systemChannelID is a string and send to that channel.
if not, you could use find

#

yeah

tribal siren
rocky hearth
#

yeah just replace, get with find

cinder patio
#

You shouldn't be doing this anyway. Like Papi suggested, check for a system channel, and if there isn't one just don't send anything

tired panther
#

How can I export client in function without passing them in the function?

cinder patio
#

Why not pass client?

#

It's the most correct way to do it

tired panther
cinder patio
#

I don't know what your code structure is

tired panther
#

js

cinder patio
#

That's the programming language...

tired panther
#

ik, I want to pass the token to my functions, with rest.login("token"), but then I want to access the token, without passing it on every function

cinder patio
#

Well you should put all those functions in a class

#

and store the token in the class

#

then you won't need to pass it to the functions

tired panther
#

but I am working on many files lol

cinder patio
#

ok? so

tired panther
#

so how do I access the token on every file?

cinder patio
#

I don't think you get what I'm saying

#
class HttpClient {
   constructor(token) {
      this.token = token;
} 

loginFunction() {
   login(this.token);
}
}

That's what I'm talking about. You can now access token in all functions that are inside the HttpClient class. If you don't know how to work with classes then maybe you shouldn't be making your own library

tired panther
cinder patio
#

Maybe you should ask yourself why it's in another file? Do you have a different file for every function?

#

That's not a great idea

cinder patio
#

not a good idea

tired panther
#

so I make functions in the main file, which goes to other functions in the file

tired panther
cinder patio
#

you're not extending any classes so no

past urchin
#

how would i make a ,vote command that when someone votes they get currency

earnest phoenix
#

pray to discord gods

tired panther
#

lol

grizzled raven
#

oh?

earnest phoenix
#

What

#

it's a joke because they provided no context and expect a concrete answer

brazen garden
#

i made my bot in develipere app

#

developers app

#

i code my self and everything

#

why there are telling me i do not have a bot

kind thicket
earnest phoenix
#

PH my GAWD

fickle garden
earnest phoenix
#

heeey

royal laurel
#

so i made a new bot since i didnt have any idea for commands for my other one so i scrapped that one and now making a bot all about finding helpful information on a little game called rust(is pre epic) and i started like 15 mins ago and and im making my first command r:droprate ak which should tell me the droprate from certain boxes and shiz for the assault rifle ( ak ) and it was working before until i used args[0] for the little ak part at the end, its supposed to be a multi use command so i can do like r:droprate mp5a4 to find the drop rate for a mp5 without making a whole new file but i think i did something wrong with the args and im not sure what i did, the other problem is im not getting any output / errors from my console

earnest phoenix
#

you leaked your token

royal laurel
#

omg

#

NOT AGAIN

#

welp its regened

earnest phoenix
royal laurel
#

which

earnest phoenix
#

the command name comparison

royal laurel
#

your showing me three at once

#

im using module.exports in seperate files so i need them

earnest phoenix
#

... i told you the command name comparison

#

no you don't

royal laurel
#

thats how i found out how to do it

#

is there a better way?

earnest phoenix
#

so you copypasted it from somewhere

#

got you

royal laurel
#

bruh

earnest phoenix
#

that if check is redundant if you're getting the command with the same name

#

just get(command) instead??

royal laurel
#

the check is there so when the command r:droprate is typed then it will execute the code in droprate.js

earnest phoenix
#

yes but

#

you're not thinking about what im saying

#

your command variable already has the same value as the command name

#

that if check is redundant

#

just pass the command variable directly into the get method

royal laurel
#

so remove the if check and keep the client.commands.get line

earnest phoenix
#

if you keep the same string

#

every command is going to execute the same command

royal laurel
#

client.commands.get(command).execute(message, args); so this

hasty mulch
#

Any tips for creating an economy bot in Python? What I should know, what I should expect?

royal laurel
#

ok

earnest phoenix
#

now get can return undefined

#

so you should use optional chaining

#

get(...)?.execute

royal laurel
#
TypeError: Cannot read property 'execute' of undefined
    at Client.<anonymous> (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\rusty.js:28:33)
    at Client.emit (node:events:379:20)
    at MessageCreateAction.handle (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\ws\lib\event-target.js:132:16)
    at WebSocket.emit (node:events:379:20)
    at Receiver.receiverOnMessage (C:\Users\fred\Desktop\Bots\Discord Bots\Rusty\node_modules\ws\lib\websocket.js:825:20)
#

so now im getting an actual error

earnest phoenix
#

you didn't do what i told you to do

royal laurel
#

no i didnt get to see ur message as i was already testing for errors

earnest phoenix
#

ah

lament rock
#

I wouldn't recommend optional chaining since v14 isn't recommended node ver

earnest phoenix
#

what

#

v14 is LTS

lament rock
#

last I checked v14 was still under new

earnest phoenix
#

it isnt

#

v15 is

#

v14 has been LTS for the past year

lament rock
#

Oh. Why did I not hear v15 came out

#

I am living under a rock

royal laurel
#

ok so i dont know what optional chaining is could you please explain / give me an area to learn what it is

earnest phoenix
lament rock
#

Something to note is that optional chaining shouldn't be an end all solution since logical errors can stack to be a huge issue

royal laurel
#

now theres no errors

#

but my embed isnt showinhg

earnest phoenix
#

...no?

#

i was taking a shit so i was on my phone

pale vessel
#

how can you not understand such a simple statement

earnest phoenix
#

hey

#

i need help getting a print message whenever someone votes for my bot

#

webhooks are basically reverse APIs

tribal siren
#

message.guild.members.cache.get(args[0]) stopped working all of a sudden

earnest phoenix
#

@earnest phoenix

earnest phoenix
#

how do i make one for my host?

#

🤷‍♂️

tribal siren
#

also hey cry

earnest phoenix
#

i'm not even sure you can open a http server there

#

hmmm is there an alternate way?

#

renting a vps is the most sensible solution

#

for example something like this:

def has_voted(user_id: int):
    headers = {
        'User-Agent': agent,
        'Content-Type': 'application/json',
        'Authorization': gg_token
    }
    params = {'userId': user_id}
    response = requests.get('https://top.gg/api/bots/{}/check'.format(786482293261729833), params=params, headers=headers)
    if response.json()['voted'] > 0:
        return True
    return False
#

well, it isn't a webhook

#

it isnt, but is there any logic i can follow? like to get the information without a webhook

#

you can't

#

not in realtime

earnest phoenix
#

bool(response.json()['voted']) bigbrain

lament rock
#

Norizon big brain & cute

earnest phoenix
#

like i mentioned before, webhooks are reverse APIs

earnest phoenix
#

top.gg makes a HTTP request to your ip and that's how you know a vote happened

#

I have smolbrane

#

Hello, whats a good way to detect duplicate text/words in a message? I'm using js

#

hm

#

i'm guessing you want to do something like

#

hello world -> hello hello world world

#

something like that

#

right?

#

For example if they repeated a word hello like 5 times the bot does something. Its for automod.

#

well, there's a ton of ways a user can circumvent it

#

Hmm

tribal siren
#

@earnest phoenix why aren't you a notable member

earnest phoenix
#

The member is probably not cached.

#

but the gist of the idea should be;
per message checking -> split message content by space, you'll get an array of words. then you need to check if an element repeats n consecutive times in a row (i'd do this with a basic for loop)

and then there's checking for multiple messages where you listen for messages and see if there's any that have the same content and that were sent previously

#

but like i said

tribal siren
earnest phoenix
#

this is heavily bypassable and not the worth the effort in my opinion

earnest phoenix
tribal siren
#

oh

#

understandable

earnest phoenix
#

requirement for being a notable member is to act like you're a disney princess

tribal siren
earnest phoenix
#

it's working from what i can tell?

tribal siren
#

no

#

i did it like

#

message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.member

#

it shows the message.member part

earnest phoenix
#

ah

#

well

#

you should fetch the member instead of getting

#

get is entirely reliant on cache

tribal siren
#

is it that easy

earnest phoenix
#

fetch first looks up the cache, if not found, makes a request to discord

tribal siren
#

message.guild.members.fetch(args[0])?

earnest phoenix
#

keep in mind fetch is a promise, you need to async/await or promise .then() pattern

tribal siren
#

or

#

message.guild.members.cache.fetch(args[0])

earnest phoenix
#

the former

tribal siren
#

aight

earnest phoenix
#

w h a t

pale vessel
#

.then(async voted =>

earnest phoenix
#

why are you using then when the run function is already async

pale vessel
#

just use await tho

misty sigil
#

await message.reply?

#

you don't need to await that by the looks of it?

ocean harness
#

hi

fair axle
earnest phoenix
#

bin the full stacktrace

tired panther
#
const site = require('../config.js')
const axios = require('axios');
module.exports = {
async function send(channelid, message) {
    if (!channelid) return { error: "A Channel Id was not provided", status: "fail" }
    if(!message) return { error: "A Message was not provided", status: "fail" }
    message = JSON.stringify(message);
    const url = `${site.discordapi}/channels/${channelid}/messages`
    const response = await axios.post(url, message, { headers: site.botHeader })
        .then(async response => {
            if (response.status === 200) {
                return { status: 200 }
            } else {
                return { error: "Not added", status: "fail" }
            }
        }).catch(err => {
            throw Error({ error: err.message, status: "fail" });
        })
    return response;
}
}

Error: [object Object]
at C:\Users\shahn\3D Objects\Botcode\rest api bot\djs-restapi\Methods\Message.js:19:19
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Object.send (C:\Users\shahn\3D Objects\Botcode\rest api bot\djs-restapi\Methods\Message.js:11:22)

its giving me this error a Object lol adontfeelsoblob

fair axle
tired panther
earnest phoenix
#

paste everything there

fair axle
#

okey

earnest phoenix
#

what npm version are you using

#

Is this the correct code for user total servers?

message.member.guilds.cache.size.toLocaleString

earnest phoenix
earnest phoenix
#

watch the video, it'll help

delicate zephyr
#

@formal maple most frameworks get the guild count by counting the amount of guild_creates on identify

#

since when completing the identify process on the discord websocket you get a guild create event for every guild the bot is in

formal maple
#

oh ok

#

that makes sense

fair axle
earnest phoenix
fair axle
#

okey thanks

eternal osprey
#

hey why is this ```js
const emb = new Discord.MessageEmbed()
.setColor('#0099ff')
.addField(${message.author.username} + killed+ ${target.username}+ with an unindentified weapon!, That must suck, doesn't it?)
.addField(${target.username}, Imagine getting killed.... you fucking dumbass. Go back to the gym and get some gains you fucking loser.)
.setImage('https://media.giphy.com/media/3orieP83jvphEiTgeQ/giphy.gif')

#

i actually want to display the username only

#

like the tests#...

earnest phoenix
#

that's not the same embed you have in your code (at least in the snippet you shared)

#

@fair axle lol it’s because its message.author.tag

zenith terrace
#

doesnt matter

#

username works fine as well

zenith terrace
earnest phoenix
#

how to find out how many items are in an array

#

nvm

pale vessel
#

array.countItems();

earnest phoenix
#

dumb question i got the answer

#

still thanks

pale vessel
#

np

quartz kindle
earnest phoenix
#

Lol

tribal siren
#

if(newMember.roles.cache.some("805646765180452888"))

#

this went wrong

#

fn is not a function

#

what's wrong here?

#

it used to work sometime

#

@quartz kindle is that you on the pfp?

quartz kindle
tribal siren
#

noice

tribal siren
quartz kindle
earnest phoenix
#

it literally shows how to use it

#

that

quartz kindle
#

.some(element => do something with element)

tribal siren
#

so

quartz kindle
#

you have .some(element)

tribal siren
pale vessel
quartz kindle
#

if you want to check if one of the roles has that id, yes

tribal siren
#

alright thank you very much

quartz kindle
#

but if you're gonna check the id, better use .has()

pale vessel
#

has() would be easier the-

#

Tim fast af

quartz kindle
#

lmao

cosmic forum
#

Anyone know what this part of a url is called?

quartz kindle
#

query params

pale vessel
#

Query parameters?

#

AA

cosmic forum
#

Ok, thx

quartz kindle
#

lmao

pale vessel
quartz kindle
#

?

pale vessel
#

uh oh

cosmic forum
pale vessel
#

NOO

earnest phoenix
#

unfortunately flaz you're at the mercy of the discord client being shit

quartz kindle
#

lmfao

pale vessel
#

fuck me

earnest phoenix
#

per usual

tribal siren
fair axle
#

by the way it gives me this error when I try to install sqlite3

pale vessel
#

Install build-tools?

fair axle
#

I think I've already installed

#

isn't it?

npm install --global windows-build-tools
quartz kindle
#

show the rest of the error, there should be more information up

fair axle
#

It is the whole error

quartz kindle
#

player1 is not defined

pale vessel
#

Use members.fetch() instead

#

why are you using await on cache.get() Thonk

#

Or if you're just going to use the ID, just pass it directly to the PermissionOverwrite data

#

You don't need a member/user object for that

ocean harness
#

.......................

#

sh

cinder patio
#

I'm still debating whether I should write my own parser for a programming language or use a parser generator like antlr4

solemn leaf
#

What does this mean

#

Converting circular structure to JSON

#

Im trying to store a voiceChannel on quick.db

cinder patio
#

You cannot convert an object that references itself in a json string

solemn leaf
#

Okay so what should I do then

cinder patio
#

Don't stringify complex object, only include ids

#

if possible

solemn leaf
#

I didnt stringify it

cinder patio
#

You're definitely calling JSON.stringify to be getting that error

earnest phoenix
#

How to make any command redirectable to a specific channel in different server

#

😞

solemn leaf
#

@cinder patio well I got past that point but voiceChannel.voice.setSelfDeaf isnt working

cinder patio
#

Show how you're storing the voiceChannel in the database

#

you shouldn't be storing the entire voice channel, only it's id. When you need the object, you get it via the id you stored

solemn leaf
#

const { channel } = message.member.voice;

cinder patio
#

no, how you store it

solemn leaf
#
            queueConst.connection = await channel ;
            db.set(`queue_${id}`, queueConst)
cinder patio
#

Like I said, only store the channel's id to the database, and when you need the object, fetch it:

db.set(`queue_${id}`, queueConst.id) // Assuming queueConst is a channel
const channelId = await db.get(...);
const fetchedChannel = guild.channels.cache.get(channelId);
// You can now use fetchedChannel
solemn leaf
#

Okay

#

How should I get the guild bcs im sending the info to my util

#

should I do client.guilds.cache

cinder patio
#

If you only have the guild's id then yes

solemn leaf
#

can i do

#

client.guilds.cache.get("id").channels.cache.get("id")

cinder patio
#

sure

solemn leaf
#

and to get my client I do discord.cleint()

#

no new

cinder patio
#

No

#

The code must be ran somewhere where you have access to the client instance

earnest phoenix
#

If I want any user to set welcome message to specific channel what I need to code

#

I'm confused with it

#

😓

solemn leaf
quartz kindle
#

channels dont have voice states

#

members do

solemn leaf
#

ah ok

cinder patio
#

we won't spoonfeed you

solemn leaf
#

I got it

earnest phoenix
#

I knew the response will be :

cinder patio
earnest phoenix
#

Lol 😂

delicate zephyr
earnest phoenix
#

Ok I'll try doing myself

quartz kindle
#

i didnt even understand what you want to do

earnest phoenix
quartz kindle
#

ye

gilded olive
#

He wants those custom welcome things

#

like
[p]welcome setchannel #somechannel

earnest phoenix
#

I'm not able to understand 😓

gilded olive
#

which language are you using

earnest phoenix
#

I googled it too

solemn leaf
earnest phoenix
gilded olive
#

oh

#

great

solemn leaf
#
const voiceChannel = client.guilds.cache.get(id).channels.cache.get(queue.connection)
gilded olive
#

do you have a database?

earnest phoenix
#

Ya

gilded olive
#

which one are you using?

earnest phoenix
#

Json

gilded olive
#

BRUH

earnest phoenix
#

Yes ?

gilded olive
#

JSON is not a database.

earnest phoenix
#

Oh sorry 😂

cinder patio
earnest phoenix
#

Sorry sorry

#

Tell which database should I use

solemn leaf
#
{
  connection: '804945992214511625',
  songs: [ 'https://youtube.com/watch?v=YQHsXMglC9A' ]
}

@cinder patio

earnest phoenix
gilded olive
#

I would always recommend postgresql and using asyncpg

gilded olive
#

oh yea

#

whitelist lib discord links SoWeary

#

anyways if you use asyncpg there are tons of gists in .gg/dpy

cinder patio
gilded olive
#

explaining how to use it for whatever you want

solemn leaf
#

@cinder patio yeah

#

google

solemn leaf
#

I forgot to connect to the voice

earnest phoenix
#

How to setup like whenever someone votes he/she gets the server voter role for few hours only
And gets it again if he/she votes again

#

@gilded olive bro is mangodb ok ?

#

Mangodb is not a database ?

gilded olive
#

mongodb is a nosql db

solemn leaf
#

Does anyone have a suggestion for ytdl

#

I cant get it to download the audio

earnest phoenix
solemn leaf
#

How do I disconnect my bot from a voice channel

mellow kelp
#

voiceChannel.leave() for discord.js

solemn leaf
#

@mellow kelp didnt disconnect or error

mellow kelp
#

no idea

#

make sure it's actually being executed or something

solemn leaf
#

Okay fixed

solemn leaf
mellow kelp
#

nope

solemn leaf
#

do you know if ytdl works?

mellow kelp
#

i mean, you haven't provided code or anything else

mellow kelp
#

haven't used it lately

solemn leaf
#
const ytdl = require("youtube-dl")
connection.play(ytdl(queue.songs[0], ['-x', '--audio-format', 'mp3'])).on("finish", function () {})
mellow kelp
#

im almost sure you should be using ytdl-core

solemn leaf
#

I tried it

#

didnt even play anything

mellow kelp
#

um ok

solemn leaf
#

yeah

#

the bot lights up

#

but it isnt playing anything

#

file

#

Tahts how I transfer js to lua

#

?

#

just do a loop in python checking for changes in data.txt

#

have C write to data.txt

earnest phoenix
#

okay that's a horrible way of doing it please use named pipes

#

and they were probably asking for translation

solemn leaf
#

compile?

quartz kindle
urban surge
#

I got an error when I switched to the new version of discord.js. What is the problem here?

umbral zealot
#

The problem is you can't go from v11 to v12 wihtout a lot of code changes

cinder patio
#

You aren't showing the full error, but it's probably because bot.guilds (and similar properties) no longer extend the Collection class

#

You have to do bot.guilds.cache in order to access the collection

umbral zealot
#

Discord.js v12 introduces the most breaking of all breaking changes: Caches
Almost every single collection you could directly access methods from have now been moved to their respective "cache" sub-property, so if you want to do things like get() and find() and filter() collections, you now have the joy of adding .cache to everything - almost everything. For example:

message.guild.members.cache.get(userId);
guild.roles.cache.find(r => r.name === "Super Awesome Role");
client.users.cache.get("210246661446959104");

I say almost all, because some things here and there have remained collections, and they're scattered all over so you can't just globally replace everything. Here's a page describing all the v12 changes: https://discordjs.guide/additional-info/changes-in-v12.html
Good hunting, and remember kids, everything is hidden in the cache (it's a french pun!)
caches djscache v12

modest maple
#

Cython makes it pretty easy

tired panther
delicate zephyr
modest maple
#

👀 Thats... a pretty shit idea most of the time

solemn leaf
#

@cinder patio How can I send my connection bcs I need my connection in other places so I can do a pause and resume

#

well save my collection

hard spindle
#

to another question, how did my bot send a private message to people who enter their server?

earnest phoenix
#

either you made it do that or you leaked your token somewhere

delicate zephyr
#

i think they meant how do they

hard spindle
#

what I'm saying is that when someone enters my bot to a server I want me to send a message to the private one, how does he do it?

solemn leaf
#

So you are logging when someone joins a server

hard spindle
#

as I understood you well no?

umbral zealot
#

What programming language and bot library are you writing your bot in?

solemn leaf
#

Evie

umbral zealot
#

Aki

solemn leaf
#

How should I save the connection to a voice channel js

fluid basin
#

evielang™️™️

umbral zealot
#

I've no idea

fluid basin
#

why you do need it though

solemn leaf
#

So I can use the stream to pause and resume the audio

fluid basin
#

you can re-fetch the users in the voice channel when your bot restarts/resumes

#

ah

#

in that case you only need to know which channel (id) your bot is in, what song/queue is active for that channel, and then continue it

solemn leaf
#

I have all that

fluid basin
#

yeah?

solemn leaf
#

but to pause I need the stream

hard spindle
#

I created my bot from a cell phone a Google play application but I do not know how to make that when someone puts my bot on their server I send a message to the private

fluid basin
solemn leaf
#

stop the audio

#

and be able to start from where it was at

opal plank
#

okay, so im bored and will likely get copyright striked

delicate zephyr
fluid basin
solemn leaf
#

?

opal plank
delicate zephyr
#

ono

opal plank
#

like, this has to be peak stupid stuff anyone can do on discord

gilded olive
delicate zephyr
#

what are you about to do

#

lmfao

opal plank
#

How illegal is to use gifs and setup a Tv bot for discord streaming TV channels/Twitch streams using real time gif converstion and editing the messages tuned to it using gifs chunked?

tired panther
#

@opal plank you developed the libary too, #topgg-api message Do you know if I should have to pass the whole count?

gilded olive
#

bots cant stream tho

opal plank
#

the idea is to use gifs as chunk data

solemn leaf
quartz kindle
#

it will probably be clunky and slow af

opal plank
#

convert real time Stream into gifs, and then simply edit messages on that "Tv channel" as new content comes

quartz kindle
#

try it

gilded olive
#

LOL

#

good luck

quartz kindle
#

name it "50s TV"

opal plank
#

@tired panther yess, ALL server counts

gilded olive
#

Boot leg streaming for bots pogchamp

tired panther
opal plank
#

this has to be within the top 5 stupidest ideas for Discord bots

quartz kindle
#

do it

delicate zephyr
#

Just do it

#

it'll be funny

quartz kindle
#

the stupider the better

#

if you dont, i will

opal plank
#

let me start piping some random ass server stream rq

tired panther
#

ok ablobshrug

#

lol

opal plank
#

converting it real time will be a pain

#

also CDN issues

#

will likely need a good local storage

#

cant rely on imgur or anything due to ratelimit and daily quotas

quartz kindle
#

you dont need storage

#

unless you want to save it for re-watching

opal plank
#

can i send gif directly as buffer?

quartz kindle
#

you cant edit buffers so you need urls

#

unless you want to keep sending new messages

opal plank
#

hmmm fair

#

thats the thing, that'd be constantly uploading new data or editing it

#

imgur has fairly large rates, but at this point its bound to hit almost within minutes

quartz kindle
#

every 10 seconds of stream
convert stream to gif
create endpoint in express or whatever
edit message to new url

opal plank
#

oh, you right, i could use my own thing

#

hmmmmm

#

imma need a shitty domain tho

#

to mask my ip

quartz kindle
opal plank
#

i'll take anything thats free

willow mirage
#

why not use 50s.tv

tired panther
#

lol

opal plank
#

i dont have money for eating, much less for domains

willow mirage
#

:v

quartz kindle
#

get a shitty free domain

willow mirage
#

my website is all free

opal plank
willow mirage
#

github pages

quartz kindle
#

like .tk or one of those .co.something

willow mirage
quartz kindle
#

or that

willow mirage
#

lmaoo

opal plank
#

any free domain thing yall know of?

quartz kindle
#

but like

#

how will that even hide your ip

opal plank
#

they're all gonna be shit, but oh well, might have something decent

quartz kindle
#

you can dnslookup the domain

#

and get the ip

willow mirage
#

wdym?

opal plank
#

can i not use a free domain on cloudflare?

#

oh

#

i see the issue

willow mirage
#

it will return the cloudflare IP ?

opal plank
#

hmmm

quartz kindle
#

you can use cloudflare yeah i guess

opal plank
#

hmmmmm

#

the more i think about this the more annoying it sounds

quartz kindle
#

lmao

willow mirage
#

or just make ur server unddosable

quartz kindle
#

just do a test run with your own ip

opal plank
#

domain, local storage, api, probably ruby or rust to gen the gifs, its a lot of annoyance

willow mirage
#

like buying a 128 core and 64 RAM server

#

=))

quartz kindle
#

he has a 128gb ram server

opal plank
willow mirage
#

:0

#

nvm then

#

ur just too rich

opal plank
#

"too rich"

#

you heard that one tim?

quartz kindle
#

ye

willow mirage
#

24 cores :0

quartz kindle
#

u rich

willow mirage
#

well u can't hear

quartz kindle
#

:^)

willow mirage
#

u can only read it =))

delicate zephyr
#

I have about 3 dedis in total

opal plank
#

im broke as hell my dud

delicate zephyr
#

132GB of ram total

opal plank
#

i think theres a second one for this too, but i think its 16gb

willow mirage
#

I don't even know how many cores or ram my server has

#

cuz im using Github pages ;))

opal plank
#

wasnt there another?

willow mirage
#

wait ur linux?

opal plank
#

hold up

#

nah, im windows, but the servers are running linux

#

imagine using windows in prod

quartz kindle
#

winserver2020 :^)

opal plank
#

Windows in prod wouldnt last 4 days up due to the shitty windows updates

#

before you say it

willow mirage
#

Window server is shit

opal plank
#

even after you disable updates, they still pass through

willow mirage
#

and even microsoft knows it

opal plank
#

its retarded

#

forced updates are retarded

willow mirage
#

Im wondering does those 24/7 music on Youtube are streamed on a MS server?

boreal iron
#

even after you disable updates, they still pass through

nope, if so you didn't edit the right group policy settings

willow mirage
#

:0

#

lmaoo

delicate zephyr
opal plank
#

im holding on

quartz kindle
#

its not "hold on"

#

its "hold my beer"

delicate zephyr
#

lmfao

tired panther
boreal iron
#

ew Tim is blueish... looks ugly

quartz kindle
#

lmao

opal plank
#

im lowkey amazed that my processes arent the ones abusing the dedi

quartz kindle
#

it matches my pfp tho

tired panther
quartz kindle
#

a god dev

willow mirage
#

not he is not good

#

he is god

boreal iron
#

probably pay to win I guess

quartz kindle
#

lmao

tired panther
delicate zephyr
tired panther
#

lol

quartz kindle
#

xD

willow mirage
#

wtf

#

lmao 64gb, 32gb, 16gb

#

u have 3 server or they are splited?

delicate zephyr
#

right is the dedi I share with marco and tonkku, middle is my home server and left is pyrocdn.com's hosting solution

tired panther
opal plank
#

smol cores

delicate zephyr
opal plank
#

it pissess me off that im not ontop

#

elk is ontop

#

actually

#

no, some random ass minecraft server

#

how dare minecraft use more ram than my bot?

willow mirage
#

:0

#

lmaoo

quartz kindle
#

:^)

opal plank
#

511Mb

#

smol boi

willow mirage
#

I was wondering "tf this guy knows java and he use vps for a java app"

quartz kindle
#

thats swap

opal plank
#

imagine not gurgling ram like its gasoline

#

oh, 981

tired panther
#

my internet is blobdead

opal plank
#

smol boi

quartz kindle
#

u flex ur gigs

#

i flex my mbs

#

:^)

delicate zephyr
#

oh wait

willow mirage
#

lmao

opal plank
#

imagine writing optimized code

delicate zephyr
#

I forgot to include my main pc

opal plank
#

shame on u tim

delicate zephyr
tired panther
willow mirage
#

I wanna buy a Internet booster that boost my mbs to 200gb/s

tired panther
opal plank
#

200gb/s ?

#

WHAT?

#

you mean 200mpbs?

willow mirage
#

they are existing?

opal plank
#

200gb/s?

#

fuck no

willow mirage
#

no?

opal plank
#

200 GB?

willow mirage
#

ah wait

#

20gb

opal plank
#

200 GIGABYTES per second?

willow mirage
#

lmao just a 0

#

why so mad

opal plank
#

cuz its still in storage

#

not in speed

#

mbps != mb/s

#

mb/s infers to disk write/read speed

#

which is usually a lot higher than internet speed

willow mirage
#

mb/s = mbps = megabyte per second

quartz kindle
#

actually no

boreal iron
#

bit and byte ...

quartz kindle
#

MB/s = megaBYTES
mbps = megaBITS

willow mirage
#

:0

#

oh

#

ok then

#

I didn't knew it

opal plank
#
Mbps : Megabit per second (Mbit/s or Mb/s)
MB/s : Megabyte per second
1 byte = 8 bits
1 bit  = (1/8) bytes
1 bit  = 0.125 bytes
1 megabyte = 10002 bytes
1 megabit  = 10002 bits
1 megabit  = 0.125 megabytes
1 megabit/second = 0.125 megabytes/second
1 Mbps = 0.125 MB/s```
#

handy cheat sheet

quartz kindle
#

mbps is used for measuring internet speeds because its about how many signals can the line transmit per seconds, hence bits
MB/s is used in storage because most systems use bytes as a unit of storage, ie each character in a string takes 1 byte (if encoded in utf8)

opal plank
#

you'd need 750,000 MBPS to match a 90gb/s speed

#

thats 750 gigabit internet

#

discord media proxy fucking up again

#

amazing

#

oh, NOW it sent

quartz kindle
#

downloads are measured in MB/s because its about how much data you're storing

boreal iron
#

stop harass discord just bc ur surfing with 64 kbit/s

tired panther
#

lol

opal plank
#

64kbit/s?

#

reallllyyyyyy now

quartz kindle
#

56k modem

opal plank
#

@boreal iron

quartz kindle
#

lmao

boreal iron
#

Fake news

#

i'news

quartz kindle
#

fek news

opal plank
#

you're fake news

tired panther
#

but no dedi ablobmeltsoblove

boreal iron
#

huh abusing my name hurts notlikenoot

opal plank
#

the dedi is gigabit too

#

let me confirm rq

tired panther
opal plank
quartz kindle
#

he steals it

opal plank
#

i pay this much ^^

#

yeah, gigabit port

#

both my local pc and the dedi have gigabit internet

tired panther
quartz kindle
#

no unlimited bandwidth smh

opal plank
#

though the dedi has a shit ton of available IP's for me to rotate

tired panther
opal plank
#

no, im serious

quartz kindle
#

it says only 5 usable IPs tho

opal plank
#

i event sent the screenshot of it above

boreal iron
#

no unlimited bandwidth smh

well never saw somebody offering this for dedicated servers

delicate zephyr
#

I can get 500/500 for like an extra £3 (3.81$)~

marble juniper
# opal plank

simmilar to what I have but I have 1tb instead of 2tb and more cpu speed

marble juniper
#

lol

opal plank
#

i think theres actually 19 ips i can rotate with

sinful magnet
#

hey...wazzup...can someone help me? I have problem-Im from Czech Republick and I want to have my bot help command in czech...everything is fine but I cant figure out how to make the Type .help command for more info on a command.
You can also type .help category for more info on a category.
transtale..any idea?(Python)

opal plank
#

stealing from a friend

tired panther
opal plank
#

she uses it for herself, but she doesnt put any heavy load on it, so she suggested i try to even DENT It, which i managed to do, with my 100% optimised code

#

using the twitch doss project

tired panther
boreal iron
delicate zephyr
#

It doesnt considering we uh

#

yes

#

I wont go into what we do

#

but we use a fuck ton

tired panther
delicate zephyr
tired panther
opal plank
#

500 down

#

500 up

delicate zephyr
#

for £63 a month

opal plank
#

mine is 1 gigabit up, 100 down

#

opposite

#

my bad

#

1 gigabit down, 100 up

tired panther
opal plank
#

i think in canada we had 10 gbps, but i cant recall exactly

#

though we all shared the cost, it was 6 people in the house

#

i think i was paying $80 for it

#

fucking http

#

getting 403 errors

boreal iron
#

ridiculous... how much money u have to pay in some 1st world countries

opal plank
#

in brasil i pay around $104, and converting it to usd its...

#

20 bucks for gigabit

willow mirage
#

Wut

#

where

#

u bought it

opal plank
#

though my ISP plan has a ton of discounts stacked ontop

#

yeah, its brasil

boreal iron
#

compared to that I'm paying ~ $70 for 500/50 which is ridiculous

opal plank
#

HUEHUE land

#

i've been on both sides of the coin

#

1st world overpriced, 3rd world dirt cheap

marble juniper
#

all wars that humanity has had were all based

opal plank
marble juniper
#

based

#

lol

#

u using chalk

opal plank
#

im not

#

ffs

#

its the third time i said it

marble juniper
#

I forgot I was in development oof

tired panther
#

lol

opal plank
#

okay

#

for real

#

503 erros

#

the heck is that for

delicate zephyr
sinful magnet
#

hey...wazzup...can someone help me? I have problem-Im from Czech Republick and I want to have my bot help command in czech...everything is fine but I cant figure out how to make the Type .help command for more info on a command. You can also type .help category for more info on a category. transtale..any idea?

delicate zephyr
#

http.cat is based

opal plank
#

it makes no sense though

#

its local

#

how the fuck do i get a 503

delicate zephyr
#

Are you proxypassing it?

opal plank
#

good question, no fucking clue

#

likely not

delicate zephyr
#

If you are that 503 is coming from nginx/apache

#

if not

#

I have no fucking squibbley squobble

opal plank
#

i need mah cache

delicate zephyr
#

oh yea

#

pi.hole is awesome

opal plank
#

now its 500's

delicate zephyr
#

Internal Server Error

opal plank
delicate zephyr
#

When you realised

opal plank
#

oof

delicate zephyr
quartz kindle
#

i mean which ISP

opal plank
delicate zephyr
quartz kindle
#

i was paying that much for fucking 5mbps

#

in OI

tired panther
opal plank
#

yikes, OI is shit

tired panther
#

How much times can you change the bot status in a minute? for a test bot lol

quartz kindle
#

they are not available where i lived

opal plank
#

TIM is nice for mobile data, CLARO is besst but a bit overpriced, but has quality, NET is by far the best when it comes to home internet

#

also

#

what

#

the

#

fuck

#

i thought we already been trhough this

quartz kindle
#

lmao

slender thistle
quartz kindle
#

lmao

opal plank
#

TIM is an actual mobile data provider

quartz kindle
#

my brazilian phone number is from TIM

slender thistle
opal plank
#

Tim using TIM

tired panther
quartz kindle
#

xD

opal plank
#

usually the combos are 10% of the down

#

so, if you get 1000 down, you get 100 up. 20 down? 2 up

boreal iron
#

Europe Internet is very expensive

still depends on the country but yes, it is

quartz kindle
#

aka asynchronous connections, ADSL style

tired panther
quartz kindle
#

here in portugal im paying 27 eur for 100/100MB

lyric mountain
#

just finished writing an abusive amount of javadocs

quartz kindle
#

best internet i've ever had in my life

opal plank
#

thats what i had in canada

#

it was either 5 gbps or 10gbps

quartz kindle
tired panther
opal plank
#

dont worry kuuhaku, tim is doing all the work

#

i just sit here and watch him do everything

tired panther
opal plank
quartz kindle
#

tru

boreal iron
#

here in portugal

traveling to portugal now, meeting u just to fuck u up

quartz kindle
opal plank
#

he told me to do it like 5 days ago, and i've yet to write anything, cuz he dont let me

delicate zephyr
opal plank
#

#exposed

delicate zephyr
#

wow amazon want my data

boreal iron
#

damn, mission aborting - looks like the targets enjoys it

tired panther
quartz kindle
quartz kindle
#

although there are many things that require insider knowledge

quartz kindle
#

so you can focus on the typings and let me write the doc

opal plank
#

hilp me fix this thing rq so i can get on that right away

cinder patio
#

Do you use the JSON stringify function or does another lib do it

opal plank
#

oh shit

#

i think i fucked up

#

@quartz kindle

#

didnt you tell em NOT to use npm 7?

tired panther
opal plank
#

maybe thats me

#

but thats in the error

cinder patio
#

well trace back the error and see where exactly it happens

opal plank
#

those 2 are the only ones that have JSON.stringify

#

throughout the whole code

cinder patio
#

now look for getArtifactsSets calls.

opal plank
#

its in the startup

#

cuz i pass cacheAll

#

its gonna call all of them

tired panther
opal plank
#

i already made a rest api

cinder patio
#

mmm, can you show with what args you're calling it?

opal plank
#

this is for Genshin impact

quartz kindle
opal plank
quartz kindle
#

havent tried replicating in the latest versions

cinder patio
#

The error cannot be coming from there then, there's no circular references in that object Thonk

opal plank
#

thats what im confused about, but this is the only thing i can think of

#

let me remove that line rq

foggy robin
#

is there any way to have 2 owner ids in the config

#

Cause I have a co owner

opal plank
#

hmmm

#

fuck hell, im still getting 503's and 500's

#

though i've yet to come by with the circular error

modest maple
#

that is such a bad diagram shame of that tooling

delicate zephyr
#

this is working everywhere else lol

delicate zephyr
modest maple
#

MMM true

#

also this postgres?

delicate zephyr
#

Yea

modest maple
#

oh

#

you dont have a update constraint

#

UPDATE will apply the action to every row matching the constraint

delicate zephyr
#

but this shit worked

modest maple
#

👀

delicate zephyr
#

this making me question my own existance

#

lmfao

modest maple
#

yeah... SQL can do that to you

opal plank
#

this is where the request errors are coming from

#

not sure about the circular one though

#

havent had that one happen again while debugging

#

though somehow thats returning undefined

#

which makes no sense whatsoever

cinder patio
#

weird

modest maple
delicate zephyr
tired panther
delicate zephyr
#

wait

#

I think I figured it out

#

one sec

modest maple
#

id is defo UNIQUE correct?

delicate zephyr
#

yea

opal plank
delicate zephyr
#

wait

#

the fuck

tired panther
modest maple
#

I think its cuz you look like you got a really fucky layout

opal plank
#

you're confusing fingers with thumbs Meister

modest maple
#

unless your diagram is just really really bad and not showing foreign key columns

delicate zephyr
opal plank
#

Discord uses REST API, it doesnt mean REST API is discord, much less discord.js which is a library

#

not every finger is a thumb

tired panther
opal plank
#

every thumb is a finger

modest maple
#

can be PK or UNIQUE, i think either should work

tired panther
#

Ik I speak very complicated

modest maple
#

but also

delicate zephyr
#

pog

opal plank
#

that made no sense

modest maple
#

when it looks like each row in economy is only tied to one user

delicate zephyr
#

Makes it easier for me

#

Holy on

tired panther
delicate zephyr
#

i'll be to dms

modest maple
#

yeah but thats like.... A really bad thing todo with SQL

#

JOINs are expensive operations

quartz kindle
#

how stupid would it be to create a dedicated table for each user?

delicate zephyr
#

and I only use them where I have to

tired panther
#

I hate tables lol

quartz kindle
#

tables are nice tho

opal plank
#

like, REALLY REALLY stupid

tired panther
#

Where can I find a example of slash commands in js?

opal plank
#

d.js doesnt have support for slash commands iirc

#

you can send manual requests, but thats about it i think

cinder patio
#

d.js will support slash commands in v13

#

can't wait... I'm currently rewriting my bot with slash commands

quartz kindle
earnest phoenix
tired panther
earnest phoenix
#

In v13

The release date for discord.js v13 is "When it's ready"

quartz kindle
#

v12 took 2 years

#

:^)

earnest phoenix
#

Why in the world is it saying unexpected input in line 39, 38

#

You're literally doing Promise.prototype.catch() on an embed

#

You didn't close the .then() before doing so

hard anchor
#

hi, someone knows how to send messages to the DM but for all the members of the server

cinder patio
#

You shouldn't do that

#

it's API abuse

delicate zephyr
tired panther
delicate zephyr
#

when discord.js does probably

cinder patio
solemn latch
#

Like filesystem folder database

#

New meme database package for nodejs?

mellow kelp
#

now this looks like a job for me

solemn latch
#

Pog do it

mellow kelp
#

bet

#

booting up vscode

past oar
#

does anyone know any cool bots\

earnest phoenix
#

Does anyone know what's the keyword enum even used for in JavaScript? When used it just says Unexpected reserved word

mellow kelp
#

pretty sure javascript doesn't have enums

#

does vscode highlight the enum keyword KEKW?

earnest phoenix
#

It's an actual keyword

mellow kelp
#

weird