#development

1 messages · Page 181 of 1

quartz kindle
#

you can fix it easily if you make an array of ids instead for example

north cairn
#

nah i mean if he wants in 2 or more servers

quartz kindle
#

or object

#

same thing really

#

but yeah

#

the only difference a db will make is if you want the bot to continue spamming automatically after the bot restarts

north cairn
north cairn
quartz kindle
#

i mean

#

for example

#

command to start

#

then bot crash

#

when bot starts again, you need command to start again

#

because crash/exit/stop/restart = stop sending messages, so you always need to run the start command again

#

thats what a db can fix, other than that you dont need a db

north cairn
#

oh

#

yeah no issues,will make db only after like a month

quartz kindle
#

👍

north cairn
#

thanks again

#

@quartz kindle hey what if i want to make owner only

#

and keep like 2 owners

#

const ownerId = ["1086518594118111253", "868867303507378216"];
if (msg.content === '!start'&& msg.author.id === ownerId)

#

this aint working

quartz kindle
north cairn
quartz kindle
#

thats how you check if an id exists inside an array

north cairn
#
if (msg.content === '!start'&& ownerId.includes(msg.author.id)) ```
#

this?

quartz kindle
#

yes

north cairn
#

yea works thanks!

main schooner
#

Anyone help me with setting up a RCE killfeed bot for my rust server, or point me in the right direction??

#

@weak rose

lyric mountain
#

no idea what rce killfeed is, and u just pinged a bot

surreal sage
#

i have a dir of react icon components
how can i set it up so that i can publish it to a registry?

#

right now it's just in an index.ts with imports and immediate exports

#

prefer it to be automatic, is that possible?

surreal sage
lyric mountain
#

wdym publish to a registry?

surreal sage
#

well i just set up verdaccio since i have a bunch of icons (i dont want to copy paste their files)
so a private registry is what I want

lyric mountain
#

yes, but what is a "registry"?

#

do you mean a repo?

surreal sage
#

e.g. npmjs registry.

lyric mountain
surreal sage
#

that isn't my point..

#

+private packages are paid

#

and verdaccio is free

lyric mountain
#

not sure about your goal, but if you can do it manually through cmdline, then you can just make a bash script and schedule a cronjob for uploading it to remote

#

I only ever dealt with self-hosted maven repositories (java), idk how it is on npm

surreal sage
#

alright man what the fuck

#

so i have my .tsx'

#

(the file its being used in)

vivid fulcrum
#

you need a loader for svgs, visit the doc link

surreal sage
#

what svgs...

#

they're typescript xml files

#

as actual components

eternal osprey
#
 adder.innerHTML = `<div style = "border-bottom: 1px solid black; " class="m-3 p-3 flex-row container d-flex justify-content-between align-items-center">
        <p class="m-0 p-0 fw-normal text-shadow"><span class = "fw-bolder">${itemName}</span> is toegevoegd aan uw winkelwagen.</p>
        <button style="background-color: rgb(219, 172, 52); color: white;" class="btn" onclick = "back()">Verder winkelen</button>
      </div>`;
      function back() {
        window.location.href = "./assortiment.html";
      }```

i might be ugly and dumb, but this back function doesn't work as i can only assume it's read as text. how can i make it work lmao
hidden gorge
#

can't figure out why im getting this

#

Only happens when this code is uncommented:

const { SlashCommandBuilder } = require('discord.js');
const BlacklistModel = require('../../schemas/blacklists');
const { EmbedBuilder } = require('discord.js');
const moment = require('moment-timezone');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('userinfo')
        .setDescription('[RoSearcher Staff Command]')
        .addUserOption(option =>
            option.setName('user')
                .setRequired(true)
        ),

        async execute(interaction, client) {
            try {
            const user = interaction.options.getUser('user');
            const guild = interaction.guild;

            const isUserBlacklisted = await BlacklistModel.findOne({ UserID: user.id });
            const isBotStaff = checkBotStaff(guild, user);

            const embed = generateUserInfoEmbed(user, isUserBlacklisted, isBotStaff);

            interaction.reply({ embeds: [embed.build()] });
        } catch (error) {
            console.error('Error in userinfo command:', error);
            interaction.reply('An error occurred while processing the command.');
        }
    }
};

function checkBotStaff(guild, user) {
    const guildId = '1185235395970088970';
    const botStaffRoleId = '1200587720062414859';
    
    const hasCustomStaffBadges = user.staffBadges && user.staffBadges.length > 0;

    return guild.id === guildId && user.roles.cache.has(botStaffRoleId) && hasCustomStaffBadges;
}

function generateUserInfoEmbed(user, isUserBlacklisted, isBotStaff) {
    const embed = new EmbedBuilder()
        .setTitle(`User Information for ${user.tag}`)
        .setColor(isUserBlacklisted ? 'RED' : 'GREEN')
        .setThumbnail(user.displayAvatarURL({ dynamic: true }))
        .addFields(
            { name: 'Bot Staff', value: isBotStaff ? 'Yes' : 'No' },
            { name: 'Blacklist Status', value: isUserBlacklisted ? 'Blacklisted' : 'Not Blacklisted' },
            { name: 'Joined Discord', value: user.createdAt.toUTCString(), inline: true },
            { name: 'Joined Server', value: user.joinedAt ? user.joinedAt.toUTCString() : 'Not available', inline: true },
            { name: 'Command Usage Count', value: 'Soon' },
        )
        .setFooter('Requested by ' + user.tag, user.displayAvatarURL({ dynamic: true }))
        .setTimestamp();

    if (user.banner) {
        embed.setImage(user.bannerURL({ format: 'png', size: 4096 }));
    }

   

    return embed;
}
hidden gorge
surreal sage
#

wait

surreal sage
hidden gorge
surreal sage
#

line 28?

hidden gorge
surreal sage
#

what version of d.js are u on

hidden gorge
#

version is 14.14.1

surreal sage
#

how come slashcommandbuilder is not in the docs

hidden gorge
#

?

#

OH WAIT

#

IM STUPID

surreal sage
#

const { SlashCommandBuilder } = require('discord.js'); there is no SlashCommandBuilder

hidden gorge
#

still broken thp

#

@warm surge get in here

warm surge
#

N

#

O

surreal sage
#

their new docs sucks

hidden gorge
#

like when i turn off that command it deploys

surreal sage
#

also fyi embed.setImage, ur doin it wrong

hidden gorge
#

ooh

#

@surreal sage I FIXED IT

#

fixed

wooden ember
#

How would I know How many voice channels my bot is in? this is in d.js.

#

Never mind I read the docs wrong.

hidden gorge
#

every minutes too short right?

nova zephyr
#

quick question the default vote time is 12 hours right? and can it be altered?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

nova zephyr
#

alr thanks

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

crystal wigeon
#

anyone know go lang here?

#

how do i get the cpu usage

#

natively, like i dont want to use libs, just want a light weight way to get cpu usage

low orbit
#

Does anyone know what would be causing the JSON to have an unexpected token or where this unexpected token is?

civic scroll
low orbit
civic scroll
#

ah i see

low orbit
civic scroll
#

you will have to escape the \n itself

#

you can do so via regexp

left lake
#

Anyone having extra top.gg css code?

low orbit
civic scroll
civic scroll
#

for good measure

low orbit
civic scroll
#

lemme look in my old code

#

ah found it

civic scroll
civic scroll
#

oh wait

#

we need to modify this

#

since we only need to escape backslashes

#
input.replace(/[\\]/g, '\\$&');
left lake
#

Anyone having extra top.gg css code?

low orbit
#

I think for now I'll just used the one which worked then worry about this issue again when I start getting errors (sums up all my code)

civic scroll
#

i think we will have to match actual character 😔

sage bobcat
#

One message removed from a suspended account.

warm surge
#

@solemn latch

sage bobcat
#

One message removed from a suspended account.

warm surge
#

hey, ill pay you 10k to leave this server

#

@half laurel do you want 10g?

#

fuckin ban this kid, it didnt work

#

leave tis serverr

#

this

#

if you want that 10ggs

#

and never come back

#

@solemn latch check general first

#

damn it

solemn latch
#

Lol what was it

warm surge
solemn latch
#

Ah

warm surge
#

being honest i thought it would work

wheat mesa
#

ngl the only thing more annoying than cryptobros is people spamming 30 messages for them to leave or pinging 5 different mods for it

wheat mesa
#

They’re bots, they don’t care what you say about them

warm surge
eternal osprey
#

can i know by who a role was created?

polar pewter
#

also naming doesn't exist

eternal osprey
#

naming?

copper cradle
#

TheTheType

sage bobcat
#

One message removed from a suspended account.

polar pewter
#

TheTheTheType

warm surge
#

TheTheTheTheType

eternal osprey
#

okay..

#

what is the type flag for Guild ban add in audit logs?

#

GUILD_BAN_ADD?

polar pewter
#

wait let me take a look

polar pewter
copper cradle
polar pewter
#

it's a big mess of a function

#

it's alot of if statements

wheat mesa
#

oh boy

polar pewter
#

the code is open source

copper cradle
#

what is that from

polar pewter
#

my own bot

#

I submitted it

#

it may get accepted

wheat mesa
#

Which file is this from specifically

deft wolf
copper cradle
#

I want to see that

wheat mesa
#

I guess it’s not so bad

copper cradle
#

yeah I thought it was gonna be really bad but honestly it's fine

deft wolf
#

Ah yes, json database

warm surge
#

use mongodb

deft wolf
#

It's probably too late since the bot was sent to top.gg for review

warm surge
copper cradle
#

I hadn't seen that

warm surge
#

they got time

deft wolf
copper cradle
#

I mean

#

back in my day

#

it used to be months

#

so I wouldn't complain about waiting 1 week

warm surge
copper cradle
#

also, I remember this place being filled with turkish bot devs, where are they now

deft wolf
#

It was a test of endurance. Only the most persistent were able to verify their bot

#

Imagine waiting a month only to have your bot rejected for some trivial reason kappalul

deft wolf
warm surge
copper cradle
#

the most I waited was 2 days btw

#

I don't currently have a bot but yeah

wooden ember
#

bruh trying to fix a bug in my bot, but its been something like 6 months since I touched it last and I have no idea what half of this code does or how it works.

copper cradle
#

nice

wooden ember
#

I fixed the thing that was wrong but now its boken something else

copper cradle
#

what broke

#

I'm bored af, might as well help

wooden ember
#

what it is is an audio player that playes audio to a vc from a physical source on the server. The bot can join many different vc and stream the same audio but when it leaves it needs to set a variable to false

#

so that it can restart the audio source playing again when its called into another vc

#

the issue is that once the bot leaves and sets the variable to false it will not stream audio to discord anymore

#

player.subscribe is not a function

#

is the error

copper cradle
#

whatever player is does not have a subscribe method

#

let me see if I understood what's happening

#

the first time the audio plays well and the code that's erroring is running correctly

wooden ember
#

yes

copper cradle
#

then the second time it stops working

wooden ember
#

yeah but only if the bot has left all chats it was in

copper cradle
#

well you're changing the value of player

#

or the code that calls the subscribe method only gets run after leaving all channels

wooden ember
#

see I thought that too however this is the only thing that changes

copper cradle
#

where are you calling subscribe

wooden ember
#

i see it

copper cradle
#

yes

#

you're setting it to true

wooden ember
#

oh my got

#

I have

copper cradle
#

see this is why I hate dynamically typed languages

wooden ember
#

I have bot.container.player AND bot.container.playing

#

and I typed the wrong one

#

bruuuuuuuh

copper cradle
#

don't worry about that

wooden ember
#

I have the stupid

copper cradle
#

lmao

wooden ember
#

well the bright side is now I don't have to re understand how the play command works

copper cradle
#

may I suggest using another language for the bot?

#

or even just using typescript if you don't wanna move from js

#

that'll help you in situations like these

wooden ember
#

see yes if this was 4 years ago when I started

#

but I don't have endless time to tinker with this stuff like I used to

#

so I just deal with what I have

#

I would have just used C# or something like my mate did since thats actually a usefull language

#

or python

copper cradle
#

imo using a strongly typed language will save you time in the long run

#

python is not strongly typed but you can use type hints for linting and intellisense

wooden ember
#

I hate js Now that I am some what accustomed to it, I don't like the fact everything updates and I dont like the fact that everything is dependant on like 400 dependancies

copper cradle
#

you would've gotten something like this had you used typescript

wooden ember
#

does strungly typed mean that the program will not run unless everything is written correctly? unlike js that will just run and then crash if you made a mistake and didn't catch it like I just did?

copper cradle
#

yeah pretty much

wooden ember
#

yeah makes sence

#

but as I said other than debugging this piece of crap and doing some programming for microcontroller projects thats about all I do.

#

but yeah would have been a better choice

#

oh well

#

also, just if you where curious this is the play command. dont ask me why some of it is repeated because I don't know. It just works.

#

yeah if I remove the bottom one I have to run the command twice for it to join, and then play audio. Doesn't seen to cause any errors other than it tryes to join twice if its already in the channel for some reason, I have no idea why I did that but uuuh it works so eh oh well. Ill just add a coment or something.

pseudo sparrow
#

Who can make v14 .js commands?

harsh nova
wooden ember
#

discord.js 14 or js 14?

pseudo sparrow
#

14

wooden ember
#

ah

#

I think I skipped that version

#

went from v12 to v16

#

cuz updating stuff is a pain

pseudo sparrow
#

Mb discord.js v14

wooden ember
#

bruh

pseudo sparrow
#

I need Ban, kick, warn, timeout, demote, promote, help and mute and unmute

wooden ember
#

bruh thats just an entire bot lol

pseudo sparrow
wooden ember
#

I mean fair

pseudo sparrow
wooden ember
#

but why do you need just those writen in v14?

harsh nova
gilded plankBOT
#

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.

wooden ember
#

you updating from an old version?

pseudo sparrow
#

Wdum

wooden ember
#

?

pseudo sparrow
#

??

wooden ember
#

what does "wdum" mean

pseudo sparrow
#

What do you mean

harsh nova
#

wdym: what do you mean

wooden ember
#

ah

pseudo sparrow
#

Ty

wooden ember
#

no seen it with a u before

warm surge
harsh nova
wooden ember
#

I mean are you updating an existing bot or something? and thats why you want this stuff written ?

pseudo sparrow
#

New bot

wooden ember
#

ah

harsh aspen
#

what is going on

#

who needs me to code a bot for 'em

wooden ember
#

lol

warm surge
#

re

#

not

#

a

#

coder

harsh aspen
#

I'm

#

a

#

Software

#

Engineer

#

not

#

a

#

coder

warm surge
wooden ember
#

if I had the time I'd do it but yeah, not happening rn.

harsh aspen
#

was just a deal

warm surge
spark flint
wooden ember
#

I mean yeah I could just skid code from github and that would work. however, effort.

harsh aspen
#

so ping me if you need help. I will try to do my best!

warm surge
#

dont ping him

harsh aspen
#

k

wooden ember
#

lol

harsh aspen
warm surge
#

plus that wasnt even a fucking deal

harsh aspen
#

because ...

warm surge
#

anyways

spark flint
#

i can code a bot for you

harsh aspen
#

I made that deal

#

because ...

warm surge
#

I had that tapped

harsh nova
#

Keep channel on topic pls 🙏 this can be moved to DMs or not discussed at all

warm surge
#

tabbed

warm surge
warm surge
#

botbun

spark flint
#

and friendships totally

harsh nova
#

I'm developing mental insanity

warm surge
spark flint
#

@harsh aspen yoooo did you code that bot

harsh aspen
spark flint
#

anyways

sage bobcat
#

One message removed from a suspended account.

warm surge
#

anyways

spark flint
#

i still need to try and scale my postgres

harsh aspen
#

sure

spark flint
#

i've tried

#

and it worked for a bit

#

but im at like 250m+ records now

warm surge
#

@sage bobcat wanna see something

spark flint
#

and its quick for querying some things but not others

harsh aspen
#
const { Client, Collection , GatewayIntentBits , Partials, ActivityType , WebhookClient} = require('discord.js');
const dotenv = require('dotenv');
dotenv.config()
process.env.TZ = 'UTC'

// the client
const client = new Client({
    intents:[
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildEmojisAndStickers,
        GatewayIntentBits.GuildIntegrations,
        GatewayIntentBits.DirectMessages,
        GatewayIntentBits.GuildMessages,
    ],
    partials:[
        Partials.User,
        Partials.Channel,
        Partials.GuildMember,
        Partials.Message,
    ]
});

My bot doesn't seem to start and node process just exits immediately

#

anyone knows why

#

help please

spark flint
#

because you haven't logged in

sage bobcat
harsh aspen
#

Uh

sage bobcat
#

One message removed from a suspended account.

spark flint
#

i was right

#

you dont login

sage bobcat
#

One message removed from a suspended account.

spark flint
#

wait

warm surge
#

im bored

spark flint
#

wrong person

#

anyways

#

webster

#

you dont login

harsh aspen
warm surge
#

what

sage bobcat
#

One message removed from a suspended account.

warm surge
spark flint
#

oh thats sharding

#

ok

harsh aspen
#

why are you sharding a 33 servers bot

spark flint
#

disapointing

sage bobcat
#

One message removed from a suspended account.

harsh aspen
#

34

#

cause I added it

spark flint
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

spark flint
#

when i rewrote it

#

so i didn't have to rewrite again after

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

warm surge
spark flint
#

you can force it to be 1 shard to start with

spark flint
#

my bot now

warm surge
#

meh

sage bobcat
warm surge
harsh aspen
#

are you kidding

warm surge
#

I use bit number

harsh aspen
#

that's too bad

warm surge
#

cuz im nerd

harsh aspen
#

it is not cool

warm surge
#

cry about it

harsh aspen
#

ok

sage bobcat
#

One message removed from a suspended account.

warm surge
warm surge
harsh aspen
#

but consider using GatewayBitIntents

spark flint
#

yo webster can you slide me the config.json too 🙏

sage bobcat
#

One message removed from a suspended account.

warm surge
harsh aspen
#
const { Client, Collection , GatewayIntentBits , Partials, ActivityType , WebhookClient} = require('discord.js');
const dotenv = require('dotenv');
dotenv.config()
process.env.TZ = 'UTC'

// the client
const client = new Client({
    intents:[
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildEmojisAndStickers,
        GatewayIntentBits.GuildIntegrations,
        GatewayIntentBits.DirectMessages,
        GatewayIntentBits.GuildMessages,
    ],
    partials:[
        Partials.User,
        Partials.Channel,
        Partials.GuildMember,
        Partials.Message,
    ]
});

// handling errors 
process.on('unhandledRejection', error => {
    console.error('Unhandled promise rejection:', error);
});
process.on('typeError', error => {
    console.error('Unhandled type rejection:', error);
});
process.on('uncaughtException' , error => {
    console.error(`Uncaught Exception: ` , error)
})


client.login("MTE0ODk5NDY3NDE3Ng.G.bLySq8Cx0")```
I tried to login but it says invalid token? why
warm surge
#

BOT TOKEN

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

harsh aspen
#

ooh

#

ok

#

idc

warm surge
#

mine now

harsh aspen
#

hack my bot

warm surge
#

bet

sage bobcat
#

One message removed from a suspended account.

harsh aspen
#

I just used another token and it finally worked

#

yay

#

thanks

warm surge
#

fuck

harsh aspen
warm surge
#

send me it

harsh aspen
#

is it a good reply to "thanks" ?

harsh nova
#

Leaking bot tokens just for fun

warm surge
harsh aspen
#

hopefully I don't break rules

warm surge
harsh nova
#

Stg there's nothing worse than accidentally pushing a token or secret to gh and trying to reverse the commit

harsh nova
sage bobcat
#

One message removed from a suspended account.

harsh nova
#

GOOD DINNER

warm surge
#

should tell us your bot token

harsh nova
#

But this is development boohoo boohoo

warm surge
#

lmao

warm surge
#

dinner

harsh aspen
#

she/he meant to send this to let us code an AI bot to generate an image like she/he sent

#

this is for development purposes

warm surge
#

@harsh aspen bot token?

harsh aspen
warm surge
harsh aspen
#

for development purposes only right?

warm surge
#

ye

harsh aspen
#

why it tells me this

warm surge
harsh aspen
#
const dotenv = require('dotenv');
dotenv.config()
process.env.TZ = 'UTC'

// the client
const client = new Client({
    intents:[
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildEmojisAndStickers,
        GatewayIntentBits.GuildIntegrations,
        GatewayIntentBits.DirectMessages,
        GatewayIntentBits.GuildMessages,
    ],
    partials:[
        Partials.User,
        Partials.Channel,
        Partials.GuildMember,
        Partials.Message,
    ]
});

// handling errors 
process.on('unhandledRejection', error => {
    console.error('Unhandled promise rejection:', error);
});
process.on('typeError', error => {
    console.error('Unhandled type rejection:', error);
});
process.on('uncaughtException' , error => {
    console.error(`Uncaught Exception: ` , error)
})


client.login("MTIwMDk2NTk3NjMxMzg0MzgzNg.Gzftp3.ZEJF1hBpVWYoZQux867GxpMg3QeNung5cc7tQ0")```
#

hope this works onionpray

warm surge
#

@spark flint

spark flint
#

ok

#

nice token

harsh aspen
#

You thought I'd troll you with some weird names?

warm surge
spark flint
#

going to do you a favour and revoke that

#

because people scan for those and nuke servers with them

#

this just makes you reset it on the dashboard 👍

spark flint
#

its revoked now

harsh aspen
#

what

warm surge
#

what

spark flint
#

what

harsh aspen
spark flint
#

because i revoked it

#

lol

warm surge
harsh aspen
#

are u a hacker or something

warm surge
spark flint
#

no

#

its because github revokes them

harsh aspen
#

MAGIC

spark flint
#

this is how literally everyone revokes tokens??

spark flint
#

im pretty sure discord.js and discord.py servers do this as well

warm surge
spark flint
#

i just have my own tool for it

harsh aspen
#

guys

spark flint
#

thats me

#

lol

harsh aspen
#

look what I have found

#

free tokens

spark flint
#

they are all revoked dummy

harsh aspen
#

not you

spark flint
#

ye

#

but its my repo

warm surge
harsh aspen
spark flint
#

no

harsh aspen
#

hmm

#

weird

warm surge
harsh aspen
#

yeah

#

he is an expert

spark flint
#

lol

warm surge
#

nah

spark flint
spark flint
#

and click "Reset Token"

harsh aspen
#

how did you know my bot id

spark flint
#

because tokens contain bot ID

warm surge
#

true

harsh aspen
#

what

spark flint
#

oh no, i have the start of your user token

warm surge
#

your bot token has your bot id

harsh aspen
#

it is just a random set of words

spark flint
#

your user token starts with ODY4NjMwNjYwNTg2MzA3NTg0

spark flint
harsh aspen
spark flint
#

Luca's bot token starts with MjY0ODExNjEzNzA4NzQ2NzUy

warm surge
harsh aspen
#

uhhhhhhhhhhhhhhhh

#

real hacker

spark flint
#

lol

harsh aspen
#

what

#

how can I know it

spark flint
#

868630660586307584 -> ODY4NjMwNjYwNTg2MzA3NTg0

harsh aspen
#

teach me

warm surge
spark flint
#

lol

harsh aspen
#

I will try to generate webster user token

warm surge
#

dont want try it

spark flint
harsh aspen
spark flint
#

it actually doesn't

warm surge
spark flint
#

unless you purposely revoke your own session

harsh aspen
spark flint
#

...why do you do that lol

warm surge
harsh aspen
#

ok ok

#

Webster

spark flint
#

lmfao

harsh aspen
#

let's make another deal

spark flint
#

its not harder

#

your token always starts with NDgxMDY4NTc2MzYzNzczOTcy

warm surge
#

cuz user token can have lot info about your current account

#

ip, your credit card info

#

etccc

spark flint
#

no

#

you can't get IP

harsh aspen
#

what no

harsh aspen
warm surge
spark flint
#

ID

#

not IP

spark flint
#

or malware, where they log your token there

#

but never through the token itself

#

discord only shows IP in datapackages

#

which takes up to a month to get

warm surge
#

yea

#

no

harsh aspen
#

discord should hire you

#

you deserve it

spark flint
#

for what

harsh aspen
#

you know more than them

spark flint
#

i just know a lot of security stuff

harsh aspen
#

ok

#

Security Manager for Discord

spark flint
#

lol

warm surge
#

ive created "scam" bot for testing reasons and it could grab my current ip and my debt card info and my phone number

spark flint
#

and what did the scam bot require you to do in order to scam you

warm surge
#

use qr code like "fake" wicks bots does

spark flint
#

ah

#

pretty sure the QR websocket might return IP

#

either that, or its a fake IP

warm surge
#

it came up with my fake ip cuz i was on vpn at the time

harsh aspen
#

Who cares about Webster IP anyways

warm surge
spark flint
#

lol

harsh aspen
#

Idc so no

warm surge
#

give me sef

#

sec

harsh aspen
#

I can get easily btw

warm surge
#

ill grab it

warm surge
#

i got over 70s ips for many reasons

#

each one of them are fakes

spark flint
#

lol

#

as in VPN ips

#

or just IPs you use

warm surge
#

indeed

spark flint
#

lol

#

i have 34 billion

#

i think its more

harsh aspen
#

I can grab it using grabify

warm surge
spark flint
#

and i can get my IP removed

#

using their IP removal form

warm surge
warm surge
spark flint
#

but not 34 trillion

harsh aspen
#

it will be removed after 4 sec

#

1 sec

spark flint
#

@oak cliff IP logger stare

harsh aspen
#

?

spark flint
#

lemme just wheregoes it

warm surge
#

give me sec

spark flint
#

didn't even set a real redirect

#

how did we even get to this discussion

#

tldr; its literally not possible to get someones IP from their token

oak cliff
harsh aspen
#

we are safe

warm surge
oak cliff
#

not me sitting here a second ago thinking thats not a real url ipgrabber

#

lmao

spark flint
#

just be safe and don't leak your token, if someone revokes it take that as a security sign stare

spark flint
#

a grabify link

spark flint
#

the redirect on the grabify was set to a fake link tho

warm surge
#

im changing few settigns

oak cliff
#

yeah i looked it up on wheregoes

#

and was like ipgrabber lmao

warm surge
warm surge
#

so this would be funny as fuck

spark flint
#

@warm surge i have 309,485,009,821,345,068,724,781,056 possible IP addresses

#

👍

harsh aspen
#

bro

#

discord must hire you

#

fr fr

spark flint
#

owning 309 quintillion IP addresses is hardly job worthy lol

real rose
#

who posted that ip logger

harsh aspen
#

uh

spark flint
#

nooooooooooooooooooooooooooooob

#

idk if thats too many Os

harsh aspen
#

I'm sorry

warm surge
#

@real rose wait

#

dud

harsh aspen
#

no

#

no

#

wait

warm surge
#

i told him to

harsh aspen
#

no

real rose
#

-m @harsh aspen Don't post grabify links | 1h

gilded plankBOT
#

upvote nooooooooooooooooooooooooooooob#0 was successfully muted

real rose
warm surge
#

im just waiting it just applies

real rose
#

what

spark flint
#

if in doubt, -b 407859300527243275 trol

real rose
#

i was going to

#

tbh

spark flint
#

lol

real rose
#

dont joke about that shit

spark flint
#

poor Lgor

warm surge
#

to his

spark flint
#

thats not possible my dude

warm surge
spark flint
#

changing IP on your device only works when you are using local devices

#

as in private IPs

#

not public

warm surge
#

my wifi rounter could change public ip some fucking reason

spark flint
#

its a feature only really useful for system managers needing to maintain a common IP system for devices etc

spark flint
sage bobcat
#

One message removed from a suspended account.

spark flint
#

its like if i set my routers public IP to 1.1.1.1 KEKW

warm surge
#

i could change it to 0.0.0.0

warm surge
#

which as funny as fuck

spark flint
#

if you visited https://debug.rest/ and looked at the cf-connecting-ip or x-forwarded-for headers

#

it would still be your actual public IP

#

which is assigned by your ISP

#

your ISP has to own the IP range and assign you an IP within their limits or you just wont be able to use the internet

#

either that or it fallsback to your actual allocated IP

sage bobcat
#

One message removed from a suspended account.

warm surge
#

@harsh aspen go check

sage bobcat
warm surge
#

my pc runny laggy

#

i know

sage bobcat
#

One message removed from a suspended account.

warm surge
#

pc fixed

sage bobcat
spark flint
#

mike left me on read sad

#

its a scammer

warm surge
#

lmao

spark flint
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

spark flint
#

mike bang is a real discord employee

#

😭

warm surge
#

my pc wasnt connected main server lmao

sage bobcat
#

One message removed from a suspended account.

spark flint
#

theyre just impersonating them

sage bobcat
spark flint
#

not suprised they removed their pfp now

sage bobcat
#

One message removed from a suspended account.

warm surge
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

spark flint
#

lol

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

warm surge
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

warm surge
#

teachers does not get paid very well

#

because collage teackers

sage bobcat
#

One message removed from a suspended account.

surreal sage
#

bad internet kills 😭

sage bobcat
#

One message removed from a suspended account.

surreal sage
#

this is what i mean

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

real rose
#

probably because a high res monitor?

surreal sage
#

900x1440

#

not high res

#

lmaoo

#

but im on like

#

80% discord zoom

real rose
#

yeah i use 80% zoom too KEKW

surreal sage
#

100% is unusable

warm surge
surreal sage
#

| — —
monitor configuration

warm surge
spark flint
#

wait

#

you guys dont use 1000%?

surreal sage
#

what's the difference between the normal npm registry and https://npm.pkg.github.com/

#

well my only question is, does it appear on npmjs.com

spark flint
#

one is github packages which is different afaik

surreal sage
#

cuz diz

spark flint
#

a lot of companies use internal registries

#

which this is basically that

#

RaaS

warm surge
spark flint
#

i do

warm surge
#

hell no

spark flint
#

and a pc too

#

i have both

warm surge
#

they are confusing to use

#

windows are w

#

mac no

#

l

spark flint
#

lol

warm surge
#

first time i used mackbook, i wanted punch that shit so hard

surreal sage
#

michaelsoft binbows

sharp geyser
#

Since when was there a new discord library for js

warm surge
radiant kraken
#

like eris or discordjs-light

sharp geyser
#

this one actually looks similar to djs ngl

radiant kraken
#

honestly i dont get why people kept making more discord libraries for js

deft wolf
#

Probably because of the popularity of the language itself

radiant kraken
#

but people dont need more libraries

deft wolf
#

This is true, but it seems to me that everyone tries to "test themselves" in the hope that their library will attract some attention

radiant kraken
#

it won't, at least not for long imo

#

compared to Discord.js

#

unless Discord.js gets discontinued which is what happened to Discord.py

warm surge
sharp geyser
#

bro required discord.js to work with an entirely different library

#

💀

warm surge
#

its 3 fucking Am

crystal wigeon
#

anyone know golang ?

#

i need some help

warm surge
#

whats up

crystal wigeon
#

okay so Im trying to find the process with high cpu usage. basically from /proc dir.

#

but like if i list all processes in /proc/ there could be 100s

#
    var processes []ProcessInfo

    files, err := ioutil.ReadDir("/proc")
    if err != nil {
        return nil, err
    }

    for _, file := range files {
        if file.IsDir() {
            pid, err := strconv.Atoi(file.Name())
            if err == nil {
                processInfo, err := getProcessInfo(pid)
                if err == nil {
                    processes = append(processes, processInfo)
                }
            }
        }
    }

    return processes, nil
}```
#

i have some code like this.

#

will this for loop cause problems?

#

cause there could be thousands of process running

#

i only want like the process with high cpu usage

#

i have some logic to get cpu usage, when it reaches maybe 80% i want to know what process is running

#

is it possible to get that info

#

im using the script from here to calculate cpu usage

exotic scaffold
#

since eris was unmaintained for quite a while someone took it upon themselves to make a new eris

lament rock
#

libraries that try to be all in one are also pretty bad imo because it can lock people into a specific stack. I did everything I could to stay in the discord.js ecosystem until it just didn't work for me anymore

sharp geyser
#

I would go for making my own library but its just not feasible for me anymore. I know next to nothing about the discord ecosystem anymore so using an already made library for a small project is fine by me

sharp geyser
#

wait wait wait

#

when you index an enum in ts is its value by default a string

#

like Enum[key]

#

why tf do I have to parse int it

#

😭

radiant kraken
sharp geyser
#

it seems by default SomeEnum[someKeyInEnum] returns a string instead of the type that the value is

#

so ```ts
enum SomeEnum {
Key
}

console.log(typeof(SomeEnum['Key'])) // string

whereas it should be a number as enums default to `0,1,2,3` etc
#

unless I am wrong

radiant kraken
#
enum SomeEnum {
  Key = 0,
  A,
  B,
}
``` what about this?
sharp geyser
#

same thing

#

always is a string

#

so I have to use parseInt

radiant kraken
#

probably some js quirk

#

its okay

sharp geyser
#

yea its fine

#

but also why

#

Also wtf

#

Why is typeorm returning undefined for one of the properties

#

huh it does it for any table relation fields

sharp geyser
#

Here is my code for an infractions list, what you guys think?

civic scroll
#

tip: abuse the object destructuring syntax

radiant kraken
#

just turn the entire thing to a one line template string

sage bobcat
radiant kraken
#

yuh uh

harsh nova
sage bobcat
#

One message removed from a suspended account.

civic scroll
sage bobcat
civic scroll
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

surreal sage
#

i think my lua is bugging

#

tf u mean not found.

wheat mesa
#

idk anything about lua but I know for a fact that there is probably 0 possibility that the compiler is bugging

wheat mesa
#

Looping over 1000s of items shouldn’t be a problem unless you’re doing it hundreds of times per second

crystal wigeon
#

once per second is worst case

wheat mesa
#

Once per second is just fine

crystal wigeon
#

isnt there a better way?

#

like how does htop do it?

#

i know they sort

#

but do they really list all?

wheat mesa
#

From what I looked up, I don’t think there’s a standard way to get all processes independent of OS, and on linux it seems the standard way of doing it is reading the proc dir

#

However it does seem a brave few went as far as to say you can write a kernel module to run on the system level for something like this

crystal wigeon
#

can you share link pls?

wheat mesa
#

You really shouldn’t go for a kernel module though

#

That’s a very questionable idea

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

mm

#

for educational purposes lmoa

crystal wigeon
#

some type of accelerator program?

hidden gorge
#
-  if (!this.deferred && !this.replied) throw new DiscordjsError(ErrorCodes.InteractionNotReplied);
                                               ^

-Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred.
-    at StringSelectMenuInteraction.editReply (C:\Users\FRC 7722\Desktop\Projects\Bots\RoSearchBot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:157:48)
-    at InteractionCollector.<anonymous> (C:\Users\FRC 7722\Desktop\Projects\Bots\RoSearchBot\commands\roblox\usersearch.js:237:29)
-    at InteractionCollector.emit (node:events:527:35)
-    at InteractionCollector.handleCollect (C:\Users\FRC 7722\Desktop\Projects\Bots\RoSearchBot\node_modules\discord.js\src\structures\interfaces\Collector.js:133:14)
-    at process.processTicksAndRejections =(node:internal/process/task_queues:95:5) {
-  code: 'InteractionNotReplied'
-}

https://pastebin.com/f5VwLFf1

#

FIXED

surreal sage
#

why cant vsc move a simple folder

#

or delete a folder

lament rock
#

no permissions

#

either that folder has special permissions for some reason or a parent folder up the tree and is recursive down

#

Ive had it where npm has special permissions for node_modules

#

Of course starting vsc in admin just always works

surreal sage
lament rock
#

Hold my beer

#

guys!!1! why is my os filled with chinese spyware now!?? Bill gates is streaming 5G directly to my applications!!1!

quartz kindle
#

thats because you gave the covid vaccine to your pc

lament rock
#

real

surreal sage
#

real

low orbit
#

I'm trying to allow users to test how their own custom messages look within Discord without having to do said action (for event listeners). I'm trying to replicate the current client's GuildMember object just for this instance so that I can emit the event with the fake data from the params I am building. How can I achieve this without globally redefining bot to false? I only need it to be set to false for this specific param.

timid lintel
#

How i can put AutoPoster? I need to my bot give guilds info to top.gg to got servers widget

surreal sage
#

need someone else's input

#

im bundling lua files

#

and i want the ability to set globals

#

but i don't know a good approach

#

maybe a function to set, and a function to get?

unique hawk
craggy pine
sharp geyser
#

@radiant burrow so I noticed back towards late of 2023 you were facing an issue with channel permissions and people not being able to edit the channel despite having the permissions given to them. I am facing the same issue but after reading the forum I couldn't solve it the same way. I am wondering if you have any insight onto this.

#

I am essentially creating a vc for a user then giving them the permission to ManageChannels and ManageRoles, yet they can't edit any channel settings for that channel made for them

civic scroll
#

also you didn't globally define bot to false btw

#

that only sets the property on that GuildMember instance

#

considering the config you passed on Object.defineProperty, i suggest you to just do

member.user.bot = false;
#

and well, you must set it to false every time because you are using your bot's own information to construct mock information

low orbit
#

That's why I used Object.defineProperty

#

Wait no I don't think it is actually

#

I originally used member.user.bot = false but I can't remember why but I changed because of some reason
however, its not supposed to globally redefine bot to false for my client, however when I run the "bot_kicked" test it is still set to false

civic scroll
earnest phoenix
#

And this makes me uncomfortable

radiant burrow
#

to paraphrase, just the view and manage channel isn't enough for a vc. you also need the connect permissions. that's what worked for me, I think

low orbit
# civic scroll you can, use the user data of the very user who runs the command as mock data

I'll try again by using member.user.bot = false so I can actually see why I decided against using it. I was considering to just use the user's data however, for bot kick there's also a moderator which I've got set as the user running the test so when they see "@user10 kicked @user10" and the same avatars, ids etc it will be slightly harder to design the embed, though I suppose I could set the moderator to the client

lyric mountain
#
class FakeUser extends User {
  get bot() => false;
}

class FakeGuildMember extends GuildMember {
  user = new FakeUser();
}
``` or smth
low orbit
lyric mountain
#

still, just extend it

#

whatever u need to use mock data for, simply hardcode in the extended class

#

it'll inherit whatever logic the parent has for the methods u didn't override

low orbit
sharp geyser
#

yet they still cant edit any settings

radiant burrow
#

hmm it could be an issue with like group perms or something?

sharp geyser
#

I am starting to wonder if its a 2FA issue cause I enable it for mods, maybe discord is thinking since they now have that permission for the channel they need 2FA enabled

radiant burrow
#

discord permissions are so confusing and configuring them with a bot is even worse

#

ohh maybe

#

maybe try disabling that or having the person add 2fa

sharp geyser
#

Which is fucking dumb 😭

radiant burrow
#

man that really is

sharp geyser
#

I guess ima just make slash commands to manage settings

radiant burrow
#

that's fair, or even the text modal

#

but those are kinda annoying

sharp geyser
#

yea Sadge

#

modal is actually a better idea tho

flat copper
#

hello, im trying to create a wallet verification website, and im dont have much knowledge about this, is there any guide about integrating siwe with rainbow/toolkit in next js ?

tulip vault
#

I'm new here but just curious if it's okay to ask about Bot recommendations? I've been searching for a bot that is easily customizable for MMO RPG functions for a discord server. Specifically, I'd like a bot that can reward members for completing tasks/quests that you can specify in the bot and people would gain levels that way instead of just talking in discord. Also one that could grant customizable items and coin as well as keep balances. Also allow members to trade with each other.

So basically it does the follow

  • Create customizable tasks/quests and rewards members for completing them with exp/items/in game currency
  • Allows the creation of customizable items such as potions, weapons, armor and what not
  • Allows members to trade items and in game currency with each other
  • keeps track of everything and has a scalable leveling system for experience points.
solemn latch
deft wolf
#

A lot of work to be honest

harsh nova
#

Yeah that'll probably need to be tailor made

tulip ledge
lyric mountain
#

numbers 2 to 4 are pretty easy, tho point 3 is somewhat annoying to deal with on discord

#

number 1 tho is fairly hard if you want the quests to complete automatically

#

you forgot the 5th point, which is goddamn hard to make, which is the game itself

tulip ledge
#

Trading is a pain in my bot almost all bugs are with trading

#

Had to patch like 5 duplication bugs already

lyric mountain
#

most of the pain of making a discord-based trade feature is that you need to lock every other inventory-based command until they finish the trade

lyric mountain
tulip ledge
lyric mountain
#

I use a pessimistic approach

#

basically a trade instance is created, the user can add whatever they have at that moment

#

then when the trade is being finished, I re-check every item again to see if they still have them

#

if a single item is missing, the trade is cancelled

tulip ledge
#

So yeah it’s kind of like a lock

craggy pine
#

Is assigning multiple variables the same number like this

let thing1 = thing2 = thing3 = 1;

Okay code? I'm not always 100% on doing things the proper way, but this code does work fine but I wonder if its just better to write it

let thing1 = 0
let thing2 = 0
let thing3 = 0
lyric mountain
#

the former wont work (or maybe will, because js hardly errors for anything)

#

because "thing2" and "thing3" aren't declared

#

you'd need to do

let thing1, thing2, thing3;
thing1 = thing2 = thing3 = 1;
``` or ```js
let (thing1, thing2, thing3) = [1, 1, 1];
#

tho idk if the syntax of the latter is correct

tulip vault
#

Thank you all for the information'

craggy pine
#

I'll try it.

#

Though it does complain about the bottom one.

#

I'll just do it the standard way.

slim heart
#

i’m being stupid and forgetting the name of the things that go to the top of the page with an x and when u click it it goes away forever, kinda like a banner but there’s a name for them

sage bobcat
#

One message removed from a suspended account.

slim heart
#

not ads

#

like the banners at the top of the website

queen needle
#

cookie consent?

#

Alert?

wheat mesa
#

Notifications? Lol

slim heart
#

no it doesn’t go away on its own

#

it stays there until X’d

green kestrel
#

what do you all do to promote the fact your bot has vote rewards?

slim heart
#

and it’s like 100% width along the top, it’s meant to be there as soon as u load the site

pale vessel
pale vessel
green kestrel
#

I've always just had a command called /vote which tells them, and they find it that way. wondering what better ways there are that aren't too in-yo-face

slim heart
slim heart
pale vessel
slim heart
#

yeah

queen needle
#

That'd be an alert/announcement banner, wouldn't it?

lyric mountain
#

hm, dont think there's a specific name for that

#

snackbar maybe?

#

tho snacks are temporary, not "until user clicks"

slim heart
#

right, and mobile

#

maybe i’m just thinking of something else idk

#

i guess it’ll just be announcement banner yeah