#development

1 messages · Page 1661 of 1

river panther
#

mhm?

#

how

#

explain ples

lusty quest
#

use require("file") if they export a function call the function

river panther
#

but they all are different bots

lusty quest
#

why?

#

so you want to start all the bots at once?

river panther
#

because there are 20 F1 drivers

river panther
lusty quest
#

yea but why?

river panther
#

for standings

lusty quest
#

if you use PM2 you can start each "bot" as it own instance and update them independently, also you can restart all at once.
or look into startscripts from node they can also start mutiple files at once

river panther
#

oh okok

#

thank

lusty quest
#

but for production i would recommend pm2 since you can keep track of each instance and get logs from each bot

restive furnace
#

just that they run in the same process

lusty quest
#

yea i know, but idk how much stuff he does inside the bots and locking them into one process could bog them down

old cliff
#

can my clusters be on different machines and still communicate using it?

#

yes on a different ip

#

can anyone send me link to kurasata documentation

old cliff
#

can I use that to set up clusters on different machines?

lusty quest
#

iirc its for sharding on the same machine, but you could write yourself a small service to use websockets or some other connection to manage the instances on different machines

old cliff
#

ok thanks

crystal wigeon
#

um while installign kibana, im getting a disk full error. like i have 50gb disk space dahek?

lusty quest
#

check your disk usage

#

maybe something decided to write a 20GB log file

crystal wigeon
#

lmao relax that doesnt happen

#

anyway i checked the disk, and i have 3 partitions and how do i see what partition the current dir is sitting on?

#

i tried to increase a partition and it says cannot grow part

lusty quest
#

did you have for some reason an 15GB swap partition?

lusty quest
crystal wigeon
earnest phoenix
#

How do I find the total number of salon named "lol"

silent cloud
#

Yo guys

#

When im trying to fetch lol server info i have this error

#

But when im going to this url

#

All god

#

Good

#

Code

lusty quest
#

i love frontend work, idk what currently fucks up but i cant login to my own website. gg

frail tide
#

Can someone help me 😬
Hello so i saw this youtube video but i can't find the error here is the code

let SteamRepAPI = require('steamrep');

module.exports.run = async (bot, message, args) => {

  SteamRepAPI.timeout = 5000;
 
// All methods are "static"
SteamRepAPI.isScammer("76561197960435530", function(error, result) {
  if(error) {
    console.log(error);
  } else {
    if(result) {
      console.log("This user is tagged as 'SCAMMER' at SteamRep.");
    } else {
      console.log("This user is NOT tagged as 'SCAMMER' at SteamRep.");
    }
  }
});
 
SteamRepAPI.getProfile("76561197960435530", function(error, result) {
  if(error === null) {
    console.log(result);
  }
});
    
    SteamRepAPI.getProfile(userID, function(error, result) {
      if(error === null) {

        let data = result.steamrep

        let custurl = data.customurl
        let vac = data.vacban
        let name = data.displayname
        let avatar = data.avatar
        let trdban = data.tradeban
        let srurl = data.steamrepurl
        let id64 = data.steamID64
        let id32 = data.steamID32
        let rept = data.reputation```
#
        .setColor("#00ff00")
        .setTitle(`${name}`)
        .setAuthor(`Steam Rep info about ${name}`)
        .setURL(srurl)
        .setThumbnail(avatar)
        .addField("Nickname", name, true)
        .addField("Custom URL", custurl, true)
        .addField("Vacban", vac, true)
        .addField("Tradeban", trdban, true)
        .addField("SteamID64", id64, true)
        .addField("SteamID32", id32, true)
        .addField("Profile on Steam", `:steam:[Steam](http://steamcommunity.com/profiles/${id64})`, true)
        .addField("Profile on SteamRep",  `:SR:[Steam Rep](${srurl})`, true)
        .setFooter("Command used !steamrep")

        message.channel.send(embed);

        message.delete()

      };
    });``` And the error
#
        let custurl = data.customurl
                           ^

TypeError: Cannot read property 'customurl' of undefined```
#

Hope someone can help me 😬

vivid fulcrum
#

did you read the error

frail tide
#

Yeah but i don't know how to define it :/

#

Im not that good at coding 😦

vivid fulcrum
#

🤷‍♂️ don't copypaste code

dusky sundial
frail tide
acoustic citrus
#

sigh does anyone know what is sent in the donatebot webhook?

#

im not very smart when it comes to webhooks im not gonna lie

#

i got the post but i dont know where the info from it is and it says req.body isnt defined or anything

#

i logged the entire thing but couldnt find any of the info in the console

vivid fulcrum
#

can you show your code and the log output

quiet topaz
earnest phoenix
#

uh

unique panther
#

How do i make a voting tracker in python?

crystal wigeon
#

quick question

#

what do i put in the kibana server.host in the kibana.yml?

#

the ip i wanna remotely connect from?

#

because i tired to put my ip and it doesnt work

#

i dont wanna use 0.0.0.0

#

the kibana service itself doesnt start.

river panther
true ravine
#

Does anyone know how to get momentjs to use monday as the first day of the week instead of sunday?

acoustic citrus
vivid fulcrum
#

what are you on about

toxic jolt
#

he hacking my vds

#

omg

vivid fulcrum
#

ok

toxic jolt
#

i can't connect

#

WHAT?

acoustic citrus
#
  //console.dir(req)
  //console.log(`a`)
  //console.dir(req.headers)
  console.dir(req)
  if(req.headers.authorization == TOKEN) {
    //if(req.body.raw_buyer_id != '') {

    //}

    return res.status(200).end()
  } else {
    return res.status(401).end()
  }```
https://pastebin.com/N974Lksw
#

oop i forgot to edit out that ip

sick fable
#

i tried to code a message logger and i wanted it to send the specific message in a specific channel in the guild in which it is deleted.

#

here is the code:-

dusky sundial
sick fable
toxic jolt
#

my bot is dont login pls help

sick fable
#

& it doesnt sends the messages in the channel also

toxic jolt
sick fable
toxic jolt
sick fable
toxic jolt
#

Are you going to help

acoustic citrus
#

noone can help if we cant actually tell what the error is

#

all i see is the deprecation warning

marble juniper
#
GitHub

This is a Minecraft Base Client. Contribute to OxideWaveLength/Minecraft-Hack-BaseClient development by creating an account on GitHub.

GitHub

This is a Minecraft Base Client. Contribute to OxideWaveLength/Minecraft-Hack-BaseClient development by creating an account on GitHub.

#

anyone know how I could transpile this

#

into javascript

#

lol

#

I need to calculate explosion damage using js

#

and I have to translate some of the java code into js code somehow

#

ik 99% of people in here wont answer me

#

cuz ik its pretty complicated

#

lol

pale vessel
#

bruh that is NOT called transpile

marble juniper
#

idk

#

I just have to make it work in js

#

all I need is a way to calculate explosion exposure

lusty quest
marble juniper
#

I Will use the "keep asking untill you get an answer" strategy

#

lol

quartz kindle
#

why tho

#

you want to send it to js, do the calculation in js, then send it back to java?

#

or you just want to convert this function to js to use it in a js-only app?

earnest phoenix
#

They're trying to pass a quiz or a challenge or something like that

marble juniper
#

js only app

vivid fulcrum
#

xyproblem

#

what do you actually want to do

quartz kindle
#

i dont think there is any transcoding you can do

marble juniper
#

well

#

the code has randomized variable names

#

and I don't understand java at all

#

lol

snow urchin
#

And how can I make it be right under the name like the other one, they all use the same style

river panther
#

this is my command handler

#

this is my message event handler

solemn leaf
#

cool?

river panther
#

this is my index

solemn leaf
#

okay?

river panther
#

now can you tell what am i cocking yp

solemn leaf
#

now im not helping you

river panther
#

oh

#

:(

#

ples

crystal wigeon
# lusty quest try 127.0.0.1 as ip

alos, logstash and filebeat are same? beacuse the tutorial im watching the guy installs logstash and then installs filebeat and configues filebeat to watch loggings

quartz kindle
#

lmao

crystal wigeon
#

also setting a password? like bruh i set a password and it didnt even pick it up lol

river panther
river panther
#

re write it again?

quartz kindle
#

a command handler doesnt need to be like that

#

it can be much simpler

#

same with event handling

river panther
#

oh

quartz kindle
#

and you're doing a lot of unnecessary stuff

river panther
#

like?

#

permissions?

#

welp, ig i can remove the if (bot.user.haspermission) thingy

quartz kindle
#

like this message.channel.messages.fetch();

river panther
#

oh

#

the handler i have right now just gives me one error
missing assess

#

how do i remove that error?

#

i mean, its ok if the bot doesn't have permission, just don't spam my terminal

pale vessel
#

handle errors

river panther
#

mhm? how do that

#

with

bot.on('error', )

?

tulip ledge
#

.catch

#

@river panther

river panther
#

oh, ok ok, catch(console.error)

#

right?

earnest phoenix
#

see this is an example event handler

fs.readdir("./events/", (err, events) => {
    if (err) return console.log(new Error(err));
    const jsfiles = events.filter(x => x.split(".").pop() === "js");
    console.log(`[EVENTS] Loaded ${jsfiles.length} events.`);
    jsfiles.forEach((f, i) => {
        const event = require(`./events/${f}`);
        client.on(`${f.replace(".js", "")}`, event.bind(null, client));
    });
});
gentle patio
#

what to do if the bot offline in my server?

quartz kindle
#

which bot

marble juniper
#

I think this is better

#

lol

vale garden
#

hi

#

i have a question

#

does the guilds.join scope no longer work for bots or something

#

i had an oauth bot which used to join members to servers

#

and i was making another one, which didnt work

#

so i fired up my previous one to try finding out the error

#

and for some reason it no longer worked

#
#oauth.py
class Oauth:

  @staticmethod
  def user_join(token, access_token, userr, guild):
   try:

    url = Oauth.discord_api_url + f"/guilds/{guild}/members/{userr}"
    
    headers = {
      "Authorization": "Bot {}" .format(token)
    }
    
    user_object = requests.put(url = url, headers = headers, json = {"access_token": access_token})

   except Exception as e:
     print(e)
//db.json

{"_default": {"1": {"id": "394320584089010179", "name": "Multiii", "discriminator": "7676", "date": "2021-03-03", "access_token": token_here}, "2": {"id": "446670262440820746", "name": "\ud835\udd44\ud835\udd52\ud835\udd63\ud835\udd65\ud835\udd5a\ud835\udd52\ud835\udd5d\ud835\udd44\ud835\udd56\ud835\udd65\ud835\udd56\ud835\udd60\ud835\udd63\ud835\udfe0\ud835\udfda\u30b7", "discriminator": "1234", "date": "2021-03-03", "access_token": token_here}}}
#bot.py

from tinydb import TinyDB, Query

db = TinyDB('./db.json')

@bot.command(aliases = ["j", "i", "inv", "invite"], brief = "Used to Make Authorized Users join any Server the Bot is in")
async def join(ctx, amt: int = None, id = None):
  if not amt or not id:
    await ctx.send("Command Usage: `?join <no_of_users> <server_id>`")
  
  else:
    if amt > len(db):
      await ctx.send(f"There are only {len(db)} users who have been authorized.")
      return

    else:
      for data in db:
        print(data)
        Oauth.user_join(token, data['access_token'], data['id'], id)

    await ctx.send(f"{amt} users were invited to {bot.get_guild(int(id)).name}")
#

this is my code btw

blissful coral
#

@vale garden Do you have the guild members intent

peak bough
#

Hello, anyone knows how to get mee6 lvl or xp data so that i can use it on my custom bot ?

#

@blissful coral can you refer me to the api

blissful coral
#

Search on npm mee6levelsapi

peak bough
#

ok

vale garden
blissful coral
#

iirc for guild member add yes

vale garden
#

`py

#
intents = discord.Intents.all()

bot = commands.Bot(command_prefix = "?", case_insensitive = True, intents = intents)
#

this should work right?

blissful coral
#

You have to enable it on the discord dashboard

vale garden
#

ye i did that

blissful coral
#

hm

#

idk then

pale vessel
#

that should work then

vale garden
#

it isnt working tho

crystal wigeon
#

yo wtf this ELK stack

#

i spent the whole day just to find that it logs only health or something wth?

#

also these "dashboard" seem to be for webservers

#

i wanted to see peeps typing commands not these wth pepeWat

dusky lagoon
#

what is boolean

crystal wigeon
#

true or false

earnest phoenix
#

I pick false

#

what's boolean then

eager berry
#

@crisp vault

#

K he left

quartz kindle
#

by default it only logs generic stuff

crystal wigeon
lusty quest
crystal wigeon
#

i did try grafana

#

but that didn work as i dont wnna be storing everything in DB

hushed wraith
#

I am using DJS:

Once I create a dispatcher to play a song I immediately do dispatcher.once('finish', () => { but after many skips the bot seems to lag, although I have if (!dispatcher.destroyed) { dispatcher.destroy();} inside the once event.

does anyone know what may be going wrong ?

zenith terrace
#

inspect element

dusk scarab
#

ikr lmao

lament stump
#

Cannot destructure property 'guild' of 'message' as it is undefined.

peak bough
#

@blissful coral they have banned it, it resulted in error

#

any other way to get mee6 xp 😭

lament stump
#

talk

peak bough
lament stump
#

oh lol

peak bough
#

ya

quartz kindle
lament stump
#

it's not

#

that is the problem

#

the message comes from whenever someone reacts to something

#

the bot does react and I get this

quartz kindle
#

where do you call handleReaction?

lament stump
#

whenever a reaction is added / removed

quartz kindle
#

client.on("messageReactionAdd", handleReaction) ?

timid verge
#

owos

tired panther
lament stump
#

same for the remove

peak bough
earnest phoenix
#

Would anyone like to test out my bot

tired panther
peak bough
#

thats the thing 2500 members

quartz kindle
lament stump
#

like the entire reaction handler?

earnest phoenix
#

Would anyone like to test my bot out

quartz kindle
#

the constructor of the Event class

tired panther
lament stump
#

me dumb

quartz kindle
#

what is cdcommands

#

is it an npm module?

peak bough
#

i did this

lament stump
#

yes

#

it is npm module

tired panther
#

@peak bough its just 475 bytes

peak bough
#

how to get the complete lb

tired panther
peak bough
#

custom bot

#

i would only need the xp tbh

tired panther
# peak bough yes

you have to process the Data, which are in the lb, this could take some time

quartz kindle
#

they do .bind(null, client)

#

meaning client is the first argument

lament stump
#

okay

quartz kindle
#

so you have to do (client, reaction, user) =>

lament stump
#

Okay, works now

#

Only last thing is that users don't get the roles

#

But I think i can manage that

tired panther
#

make you own custom package lol

celest bone
#

In discord.js-commando is it possible to add your own throttling message or not? Thanks!

quartz kindle
#

throttling message?

tired panther
quartz kindle
tired panther
celest bone
celest bone
tired panther
#

so we are talking about cooldowns?

celest bone
#

Its the default message, thats why im asking if i can change it

#

Yeah

quartz kindle
#

i'd need to see their code

celest bone
#

ohh ok, i thought you meant my code

#

thats my bad, thanks!

tired panther
#

you have to change their libary

#

Commando is trash @celest bone use normal discord.js

quartz kindle
#

thats the beauty of js, you can hack everything

tired panther
tired panther
quartz kindle
#
Command.prototype.onBlock = function(message, reason, data) {
        switch(reason) {
            case 'guildOnly':
                return message.reply(`The \`${this.name}\` command must be used in a server channel.`);
            case 'nsfw':
                return message.reply(`The \`${this.name}\` command can only be used in NSFW channels.`);
            case 'permission': {
                if(data.response) return message.reply(data.response);
                return message.reply(`You do not have permission to use the \`${this.name}\` command.`);
            }
            case 'clientPermissions': {
                if(data.missing.length === 1) {
                    return message.reply(
                        `I need the "${permissions[data.missing[0]]}" permission for the \`${this.name}\` command to work.`
                    );
                }
                return message.reply(oneLine`
                    I need the following permissions for the \`${this.name}\` command to work:
                    ${data.missing.map(perm => permissions[perm]).join(', ')}
                `);
            }
            case 'throttling': {
                return message.reply(
                    `You may not use the \`${this.name}\` command again for another ${data.remaining.toFixed(1)} seconds.`
                );
            }
            default:
                return null;
        }
    }
#

then you can edit that in your code

celest bone
marble juniper
#

ever heard of

marble juniper
#

discord.js-light-commando

#

lol

quartz kindle
#

xD

marble juniper
#

I made it by changing some lines of codes for compability reasons and changing it from using discord.js to discord.js-light

#

uses less ram than the original commando and more cache control

#

not saying you have to use it but I bet you would like it

#

lol

tired panther
marble juniper
#

discord is a stable platform™️

celest bone
#

it went from 2000ms+ responses to 200ms

#

And its helpful because these times mean alot as it gets routed through a proxy later on.

#

So the faster the initial response is, the faster the proxy part is, does that make sense? Or am i just waffling

tired panther
unreal estuary
#

it said when handling web requests or fetching specific things

#

idk lol

celest bone
tired panther
celest bone
#

(plus im lazy and don't like cleaning up my code, my GitHub is an amazing example of that)

unreal estuary
#

discord.js-commando looks more complicated

#

you can just make a command handler yourself it isnt that hard

celest bone
celest bone
#

consistant*

#

This was my result using normal discord.js

#

As you can see, I chose the better option.

unreal estuary
#

i dont have any problems with normal discord.js if commando is more suitable for your needs you should use it

#

peepoShrug i dont rlly know how to use it anyways docs doesnt say how to add commands

celest bone
unreal estuary
#

like this looks very complicated for no reason

celest bone
#

yeah, it is

unreal estuary
#

and the actual command is only 2 lines

celest bone
#

once you know it though it isnt too bad, its just a lil' annoyin

unreal estuary
#

do you use it for all your discord bots?

celest bone
unreal estuary
#

ah

celest bone
earnest phoenix
#

hi i have a reload command but for some reason only SOME commands reload

#

the rest the bot does not send anything

#

only some commands the bot says: command reloaded

#

discord.js^

#

this is my code^

celest bone
earnest phoenix
#

true

#

lemme check

#

i was thinking about that before haha

#

i also have another quest

#

i have a balance command

#

when u mention the dude it shows there balance

#

but when u put there id it still shows there balance but the title is diffrent

#

lemme send a example

feral aspen
#
if(pick == "Lose") {
    userData.money += parseInt(robAmount);
    authorData.money -= parseInt(robAmount);
    authorData.rob = Date.now();
    authorData.lastRobbed = user.id;

    const embedLose = new MessageEmbed()
    .setColor(red)
    .setDescription(`You lost, lol.`)

    await message.channel.send(embedLose);
}

Should I be using await before each writing?

earnest phoenix
#

like it shows mee6's balance but it says that its my balance and gives MY avatar

earnest phoenix
feral aspen
earnest phoenix
#

no

feral aspen
#

Great.

#

👍

inner token
#

This post is only returning me a {} empty, what am I doing incorrectly?

#

this is the other side of post

boreal iron
#

you need another .then()

#

you may should watch the docs

lament rock
celest bone
boreal iron
#
...
    .then(res => res.json()) // expecting a json response
    .then(json => console.log(json));
#

oh wip wup wap... nvm I see

lament rock
#

on top of an already high level api wrapper

celest bone
lament rock
#

But your results are flawed

feral aspen
#

What does this mean in filezilla.

boreal iron
#

sponsored-setup.exe lmao

#

did u download filezilla from the source?

lyric mountain
#

Totally not sketchy

feral aspen
#

What.

#

I tried.

#

It doesn't let me.

#

Any other things like filezilla?

boreal iron
#

you wanna simply use ftp?

#

if so use your Windows file explorer

inner token
boreal iron
#

enter ftp://remote-address

#

Windows will ask you for user and password

lyric mountain
#

Yeah, people forget you can add ftp paths to windows explorer

feral aspen
lyric mountain
#

Maybe it's not configured correctly

boreal iron
#

I mean server name or address could not be resolved should be obvious

#

make sure the server the ftp server is running on accepts incoming connections on port 21

#

and of course if the server address is correct

feral aspen
#

Idk why this as well

quartz kindle
near stratus
boreal iron
#

Make sure filezilla is downloaded by it's original source

quartz kindle
feral aspen
#

I am not though

boreal iron
#

I'm not sure why Windows defender should notice a threat

feral aspen
#

here.

#

Right?

quartz kindle
#

never use sponsored installers

#

they are full of shitware and ads

boreal iron
#

aye

feral aspen
#

I will.

#

One moment.

quartz kindle
#

and if you do, always read the installer carefully and uncheck/disable any additional software they may offer

feral aspen
#

IT WORKED.

#

🎉

quartz kindle
#

for example

#

if you ever see something like this, always disable that

feral aspen
#

Yup.

#

Oh thank god.

#

It worked.

#

Thank you! 😊

lament stump
#

does anyone know how to make a global boolean, so it is "true" or "false" everywhere in the project in JS?

vivid fulcrum
#

just... export it?

lament stump
#

wha

vivid fulcrum
#

what what

lament stump
#

what do you mean "just export it"

vivid fulcrum
#

...export it

lament stump
#

i still don't understand

quartz kindle
#

well you can always use global

#

global.myvar = true

#

its still limited to the current process tho, wont transfer to workers or child processes

lament stump
#

idk what workers or child processes are

#

i will try

#

wait

#

where do i put this

quartz kindle
#

anywhere

#

but you have to always use global

#

global is an object

#

treat it as such

tired panther
quartz kindle
#

lul

#

happy infection :^)

tired panther
#

Altough I never install programms, I just have some default apps like word, vscode

#

.....

lament stump
#

still does not work

tired panther
lament stump
#

the global thing

tired panther
lament stump
#

lemme make 2 sourcebins

quartz kindle
#

so the function runs before you set the variable

lament stump
#

ohhhhh

#

so like

quartz kindle
#

why do you need it to be global there tho? why not just use the adding variable?

lament stump
#

before the "const handleReaction"

lament stump
quartz kindle
#

why not?

lament stump
#

idk

#

it just won't

quartz kindle
#

const handleReaction = (reaction, user, adding) => {
console.log(adding)
const { message } = reaction
const { guild } = message

#

add that console.log there

#

see what it logs

lament stump
#

when the bot reacts: true
when I react: nothing, just blank spaces

quartz kindle
#

then you have something weird going on

lament stump
#

idk either

quartz kindle
#

add a console log to the event

tired panther
#

make you own system or lemme create it
what are the functions you need?

quartz kindle
#

module.exports = new Event("messageReactionAdd", async (client, reaction, user) => {
console.log(reaction.name, user.username)
handleReaction(reaction, user, true)

#

add that console.log there

lament stump
#

bruh now i restart

#

and "true" and "false" appeared

#

instead of the blank spaces

#

it returns "undefined magma"

#

and then "true" cuz of the other console log

#

but roles are not added

quartz kindle
#

so the adding variable works right?

#

so no need for the global thingy

lament stump
#

yeah

#

but the role is not added

#

even tho i told it to do so

quartz kindle
#

remove the global

#

and just put adding

lament stump
#

did that

#

still does not give the roles

quartz kindle
#

put console.logs on every line

#

analyze your variables

#

you have a lot of conditions that need to pass before you reach the role adding part

#

one of those conditions could be failing

#

console.log the relevant variables

lyric mountain
#

laughs in debugger

earnest phoenix
#

@oak cliff google it mmLol

fickle magnet
#
public class Main
{
    public static void main(String[] command_line_args)
    {
        String msg = "!help";

        command("!help",msg,()-> {
            System.out.println("hello");
        });
    }
    public static void command(String comm,String msg , Runnable func)  {
        if(comm.equals(msg))
        {
            func.run();
        }

    }
}

this might be how I am going to do commands

earnest phoenix
#

are you using jda?

fickle magnet
#

javacord

earnest phoenix
#

oh ok

fickle magnet
#

just a concept I going to put into practice

near stratus
#

What is the maximum upload size for bots ??

#

Like if I wanna upload a .txt file

fossil grove
#

why there is pog here and idk what is meant by pog

slender wagon
#

what is `` called

#

and what is '' called

fossil grove
#

what is meant by pog

fossil grove
rustic nova
#

baby_hyper unnecessary

#

Very unnecessary

fossil grove
#

what is pog

#

iam new

rustic nova
#

Pogchamp

fossil grove
#

explain

#

what is meant by it

abstract cloud
#

play of the game

fossil grove
#

iam javascript

tired panther
snow urchin
#

yes

tired panther
#

lol, though it xD

snow urchin
earnest phoenix
earnest phoenix
snow urchin
quartz kindle
#

you're trying to override the message.delete() function?

#

why not just catch the error?

#

lmao

#

what are you trying to accomplish exactly?

tired panther
snow urchin
fossil grove
#

JAVA SCRIPT IS THE BEST

snow urchin
#

😄

quartz kindle
quartz kindle
#

why not ```js
msg.delete().catch(() => {
client.error(cant delete ${msg.id})
})

astral forge
#

anyone know python?

#

I'm trying to make a bot for my friend for his upcoming birthday for his server

#

Please PING me if you know python and can help

quartz kindle
tired panther
astral forge
#

do you know how to make a embed help menu with arrow reactions where you can turn the page?

slender wagon
unreal estuary
#

can someone help

unreal estuary
#

where are these quotes coming from

astral forge
unreal estuary
#

and its showing this at the top of the site

#

but no quotes in my code

vivid fulcrum
#

yum living for this

modest maple
astral forge
#

?

vivid fulcrum
#

it's obviously not a userbot that interacts with a pokemon bot

modest maple
#

good times

vivid fulcrum
#

there's obviously no ugly ass code for parsing text from the embed description

unreal estuary
#

peepoShrug well if they say there isnt then it must be true

#

lol

marble juniper
#

pokemon bots make me wanna cry||#4971||

#

lol

unreal estuary
#

(:

vivid fulcrum
#

i tried getting my old account back but i can't request a new password or anything from support, not even to unlink my 2fa device so i'm fucked

#

the only thing i can do through email is request account termination

#

so i did it

unreal estuary
#

sad :c

marble juniper
#

oof

#

must have made you cry cry

vivid fulcrum
#

well now i'm smart so i use authy for 2fa now

#

and i backed up my codes

fossil grove
#

Help:c

#

@tired panther

unreal estuary
#

whats wrong :c

fossil grove
#

my bot doesn't want to get verified :c

nimble kiln
#

@fossil grove Wrong discord to ask about verification questions

nimble kiln
#

No

#

You go to that discord

fossil grove
#

I did

#

i go to the Discord server for bots and say said that this problem is weird cuz stripe said verification submitted

nimble kiln
#

Then why do you keep asking in here

fossil grove
#

and they said they can't help me

unreal estuary
#

not much we can do :c

fossil grove
unreal estuary
#

any reply

nimble kiln
#

top.gg has nothing to do with discord bot verification

fossil grove
nimble kiln
#

Are you not able to understand english?

fossil grove
#

yes

#

Iam from egypt

#

Iam bad in english

nimble kiln
#

I see

fossil grove
#

Lmao

nimble kiln
#

Open discord support ticket

#

and wait

astral forge
#

Im kinda stupid so how would u run a different file from the file your running like for events

#

In python

unreal estuary
fossil grove
#

discord said that only passport card works in egypt
@nimble kiln

fossil grove
#

When my dad wake up

unreal estuary
#

lol so smart

fossil grove
stark abyss
#

I think you can get help here as well

fossil grove
#

I got help

astral forge
#

How would i run a different python file from the file im running for like events

stark abyss
#

ah okay

astral forge
#

Please help

unreal estuary
#

idk python :c

#

all i know is print("") from y9 ict lol

tired panther
astral forge
#

Meister please help

#

You know python right?

tired panther
unreal estuary
#

should i learn python

tired panther
#

learn js pog

astral forge
#

Im kinda stupid so how would u run a different file from the file your running like for events

unreal estuary
#

ik js

astral forge
#

Thats all i need

unreal estuary
#

is python worth learning tho

astral forge
#

Ye

unreal estuary
#

ok

fossil grove
#

Guys

unreal estuary
#

my ict teacher dissuaded me

fossil grove
#

I need to ask question

unreal estuary
#

like he did with everything we learnt

midnight blaze
#

Can someone tell me why this doesnt work?

nowhite = message.content.split("http://" || "https://")

Https will be ignored?? while http wont.

tired panther
boreal iron
#

split(/http:\/\/|https:\/\//gi)

boreal iron
#

use the regex I mentioned above

midnight blaze
#

hmm, thanks, my regex sucks, what does gi mean again?

boreal iron
#

global and insensitive

midnight blaze
#

thanks

boreal iron
#

np

#

a good tool to learn and play around

midnight blaze
#

I always tried to learn regex, but only know some basic stuff, thanks will look into that

worn elbow
#

How do I fix this

rustic nova
boreal iron
#

you might send the corrosponding code, we don't own magical glass balls

earnest phoenix
#

im soon at 75 servers KarmaEyes #roadtocertification

worn elbow
#

Same issue

boreal iron
#

you might send the corrosponding code, we don't own magical glass balls

#

same answer

tired panther
#

;p;

boreal iron
#

yeah we got it... calm

opal plank
boreal iron
#

i recall a friend told me its faster
KEKW

#

anything is faster than regex

opal plank
#

indeed, wont matter too much but still worthwhile

boreal iron
#

yeah... I didn't mention the easy way. lmao

vivid fulcrum
#

in .net5 there's like a 10us difference between using IndexOf and basic regex for a basic lookup, IndexOf being faster

#

so it like

#

varies i guess

modest maple
#

Yeah

#

And ceetain regex engines being faster and more powerful than others

#

If you have multiple things you want to find though regex is likely faster in the scale size depending on engine

#

Certain things will allow the regex to use certain algo's to reduce the time complexity

boreal iron
#

anyway toLowerString() is easier and faster for his case... but I like to do things more complicated

vivid fulcrum
#

lets do it even more complicated

boreal iron
#

oh oh

#

it starts

vivid fulcrum
#

take the codepoint of every character in the string then offset them so you get lowercase codepoints mmLol

#

i wonder how expensive that would be to actually do

#

that's basically what toLowerString does internally i guess

boreal iron
#

and compare the match after with a regex if both conditions are the same smirk

round cove
#

You can DM me.

boreal iron
#

the challange to make things as slowly as possible

modest maple
#

Thats pretty easy with regex

vivid fulcrum
#

run the code on a microcontroller hooked to a 1MHz clock mmLol

boreal iron
#

lmao

modest maple
#

Unless you're something like the rust regex engine just get a infinite look back ez

boreal iron
#

god... dude I'm unbelivable bored

#

sitting here watching proxmox letting install my vms

nimble kiln
#

happy proxmox noises

sour flame
#

I finnaly finished my economy bot well with commands

quartz kindle
#

why do i always find the weirdest shit to do

#

lmao

round cove
#

why

nimble kiln
#

looks fun

zenith terrace
#

so many bits

#

what does double << do, never seen it used

exotic galleon
#

how do i add shard to my discord bot

quartz kindle
#

if you have the binary 00001

#

and you do << 3

#

you will get 01000

#

moves the number 3 binary digits to the left

opal plank
#

speaking of bitwise

#

im already at a factor of 23 digits on my fields

#

and they prob gonna increase

zenith terrace
quartz kindle
#

if you get to 32, you have to switch to bigint

unreal estuary
#

im trying to learn python any tutorials for beginners

quartz kindle
#

reserve a digit for a master switch and bam, you have double the possibilities

#

but then you need 2 numbers

#

lmao

#

i didnt think this through

#

still, 2 numbers is gonna be faster than 1 bigint

opal plank
#

i AM using bigint already

quartz kindle
#

then you're fine

opal plank
#

since its internally used, i shouldnt bitch about it

#

but it gets exponentially bigger

#

cuz im multiplying by 2 every time

quartz kindle
#

yes thats normal

#

it feels like its a lot

#

but its not

#

its just a single extra bit every time

opal plank
#

indeed

#

but its probably going to be increasing very soon

quartz kindle
#

imagine a 512bit bigint

opal plank
#

imma get there not too far into the future

quartz kindle
#

its not even that big

opal plank
#

its not even that big
-Tim, 2021, while staring at a huge ass number

nimble kiln
quartz kindle
#

this is a big number

opal plank
#

and all that is stored in memory

#

and all previous 5119 others

quartz kindle
#

its just 5kbit

#

less than 800 bytes

opal plank
#

ikik, like i said i shouldnt be bitching about it, its used internally

muted vortex
#

anyone here familiar with instagram integration? I can't find any bots that handle instagram, and I would code my own (I already have a bot for RSS feeds and I've done some twitter stuff) but I don't know enough about instagram

#

I know what instagram is, (images & videos) but I don't know enough about the under the hood stuff

#

a lot of the options I have looked at only link your own instagram account, not other people's instagrams

solemn wyvern
#

Same

opal plank
#

lmao

opal plank
#

i suggested an instagram bot a couple months ago

#

i dont think theres any that do that

#

you'd need to code own yourself

#

here specifically

#

i could probably set one up, but i dont have time to do that rn

solemn wyvern
#

Ah alr

unreal estuary
#

ive given up on learning python

muted vortex
opal plank
muted vortex
sage bobcat
#

One message removed from a suspended account.

opal plank
#

i did my own library for a youtube bot

#

cuz theres not a single one out there

#

if i were you, i would do the same

#

of course, mine is private

#

but it'd be best to make it yourself in all honesty

#

i would be interested in doing it tbh, an instagram bot for discord

#

though i would proof it, asking the people who are attempted to follow permission before having the bot post their stuff

#

!follow @ user

#

then on instagram, fetch that user and dm them asking if they want to be integrated onto discord

muted vortex
#

I'd be using to follow public instagrams, (fan pages, etc. not individuals' private instagrams)

opal plank
#

i would personally allow privates too

#

a lot of people enjoy it

#

but ask for confirmation beforehand

#

use a db with all followed/requested users

#

put a status on them

#

allowed | requested | denied

#

could likely have a global feed and private scope

#

so you can have feeds on discord only on specific users

#

could make it quite interesting tbh

#

like i said, i'd love to help, but i've got a lot of coding to do already

#

postgres , redis, typescript, axios and detritus

#

i'd pick that bunch for everything

#

make the wrapper/lib for instagram using axios and postgres

#

and use redis and detritus to handle the sending messages to discord and the caching

#

personally, that'd be what i'd use

quartz kindle
dusky lagoon
#

How can i make it in a embed message that the title is connected with a link but isnt blue

opal plank
rose warren
#

If I have a bot running in only 1 server where it edits a message every 30s for 7 days I should be ok when it comes to rate limiting right?

zenith terrace
#

30 seconds should be fine

rose warren
#

Ok. I originally had it at 10s but I can get away with 30 and it seemed the safer option

opal plank
#

THOUGH, just a fair warning

opal plank
# rose warren Ok. I originally had it at 10s but I can get away with 30 and it seemed the safe...

Discord has a very loose interpretation of API abuse; as quoted by them:

@​​Danny automating the API in that way /is/ abuse. Automatically doing "X" every N is generally not a good idea. Where X could be posting a message, changing someone s nickname, renaming a role, changing a channel topic, etc... 

Generally bots should only react to user actions... 

Although, for very large N we generally don t care. But for small N, we do care. Think rainbow bots, etc....

"N" is not really defined, as rate limits are not a good thing to try to get very close to. You re going to have to mostly use common sense here, compare how close you are the rate limit, how often you do this, etc.
https://cdn.discordapp.com/attachments/272764566411149314/604449094680707072/unknown.png

boreal iron
#

generation process begins... pandasad

nimble kiln
boreal iron
#

moving a database to a new machine... more regenerating it than moving

nimble kiln
#

ugh what

quartz kindle
#

damn thats a huge db

nimble kiln
#

800GB database

boreal iron
#

Rows 4,000,000,000

quartz kindle
#

what kind of content does it have?

boreal iron
#

id and hashes of the ids

quartz kindle
#

about what

#

files? employees? videos on youtube?

boreal iron
#

you are very curious KEKW

quartz kindle
#

xD

boreal iron
#

all steam ids

#

it's a lookup table

quartz kindle
#

4 billion steam ids?

#

interesting

boreal iron
#

yeah

quartz kindle
#

do you work for steam?

#

lmao

boreal iron
#

~ 2,7 B accounts are exisiting atm

#

nope

quartz kindle
#

interesting how almost 2 thirds of it is indexes and not actual data

#

databases are really not made to be space efficient

#

just as fast as possible

boreal iron
#

yeah there's no better way unfortunally

#

aye

#

need to index both hash columns which made it huge

#

just make it damn fast responsive

#

game server protocols are providing user ids which are hashes of steam id (for data protection or whatever)

#

if you know how the hash is built you can easy generate a list of all existing steam ids and lookup the hash to get the actual steam id

quartz kindle
#

so you're basically brute forcing hashes lul

boreal iron
#

going further and comparing this with rcon protocol data you will get all kind of data... ip adresses, activities, etc. to them for geo location lookups and merics

quartz kindle
#

damn

boreal iron
#

yeah which makes me be able to provide services like activites and bascially a whole history of users seen on steam

#

unless the data is provided or share with me which increases my data collection

#

and made it more accurate

quartz kindle
#

so you're making some sort of steam search engine?

#

google steam

boreal iron
#

the more game service providers wanna know my user history data and provide their data to me, the more data I have and even more accurate it gets

#

ew not really

#

a lot of big gaming communities wanna know which players are playing on their servers

#

the history, possible bans, cheats, geo location, all ever used IP addresses etc.

#

just to decide to let people in or block them

quartz kindle
#

isnt that a lot of privacy violation?

boreal iron
#

huh what privacy? never heard that word in my life

quartz kindle
#

lmao

boreal iron
#

it's actually not

#

at the moment you connect to a game server for example you accept the ToS of the game and Steam and the game service provider (the hoster)

#

which means your telemetry data (ip address) will be logged etc.

#

anywhere you send your packets to, you know

#

now imagine a game service provider wanna block certain countries or blocked accounts etc.

quartz kindle
#

ah so you're providing this system for the service providers

boreal iron
#

nope for big gaming communities

#

they're providing their data to me

quartz kindle
#

ah

boreal iron
#

in return they've unlimited access to my API

#

looking up the hashes to get the actual steam id (the real identity of the player)

#

and any ever collected telemetry data with it

#

I've also built backend tech to scan certain anti-cheat platforms for responses about the target steam id

#

watching, investigating and reverse-engineering how apps and games did those requests and boom rebuilt it with php and now js

quartz kindle
#

awesome stuff

boreal iron
#

hmm all this started while managing and developing backend, apps & tools for gaming communities

#

some good profit at least KEKW

#

only issue is the size of the data

#

and I'm currently moving all the stuff to new servers

#

hardware has changed a lot in the last year and my intel servers are overpriced and outdated

earnest phoenix
#

is it possible to make like a beg command in python or smt like it

vivid fulcrum
#

anything is possible

#

if you're dedicated enough

#

welcome to programming

earnest phoenix
#

damn

sour flame
#

why is embed undefined?

#

it was defined before

earnest phoenix
#

python

#

am I right

sour flame
#

what about it?

earnest phoenix
#

I'm not sure but embed maybe should be Embed

#

I'm not a genius

sour flame
#

no no last time I was using = but that time I used .

earnest phoenix
#

em.embed?

sour flame
#

no embed=em

earnest phoenix
#

k

#

try Embed

sour flame
#

I tried embed=em

earnest phoenix
#

ok

#

wait your using python right

sour flame
#

yes

earnest phoenix
#

check dms

#

can anyone help me with ngrok?

#

i keep on getting 404 page not found

#

this is the code (just testing something that works so dont judge the code)

#

i get this

#

its a barebones system i dont see why it doesn work

#

no what?

earnest phoenix
#

new update on this i recieve the informaiton

azure jewel
#

Can someone help me to add images/videos to my bot page?

earnest phoenix
#

Fixed my issue

bright heron
#

Guys help me

misty sigil
#

sorry

#

my magic 8ball broke.

swift cloak
#

if i were to make a snipe command, what would be the collection?
Collection<string, object>

#

?

lament rock
carmine summit
#

how do I convert ["a", "b", "c"] to "["a", "b", "c"]"

#

should I just toString() it then add the parenthesis at the first and end?

sudden geyser
#

I believe so.

boreal iron
sudden geyser
#

^ Better answer

carmine summit
boreal iron
#

huh?

earnest phoenix
#

can someone help me test if my bot works?

sudden geyser
#

A common default

carmine summit
#

also, when I use JSON.stringify, my app runs out of memory

sudden geyser
#

So whatever you used it on was very large which caused a very expensive operation

carmine summit
#

oh

#

how do I fix it?

#

should I filter it?

#

to remove the unecessary

lyric mountain
#

If you've started having issues converting a json to string you should consider using a database

dire obsidian
#

So I read that you can make exe out of js, but i wanted to know if it's recomendable

lyric mountain
#

That's by using electron

#

Define "recomendable"

dire obsidian
dire obsidian
carmine summit
#

I have an object, and it has a lot of data. I want to delete the unecessary data, and keep the important data. What is the best way to do it?

#

I have the names of the important items

#

the others can go

lyric mountain
#

Look, that's smelling like json db

dire obsidian
#

json best db jk

lyric mountain
#

If you're using json for read/write data you seriously need to rethink your data storage

lyric mountain
#

Like, javascript really excels on web stuff

#

But being monothread means it'll be seriously capped on desktop stuff

dire obsidian
#

So, should i learn a desktop language for desktop apps

#

Ye

lyric mountain
#

It's still possible to make a fully functional desktop app in js, but optimization is a must

dire obsidian
#

Is js slow?

lyric mountain
#

It's not that it's slow

carmine summit
#

im so confused

lyric mountain
#

It's the thread issue

#

Doing heavy calculations on render thread makes the UI slow

#

And js works on a single thread

dire obsidian
#

That means, fuck js for desktop go learn some​ c++

#

K gotta take that in consideration

lyric mountain
#

C++, c#, java, delphi, etc etc

#

There're probably a myriad of other desktop langs out there

#

I can only name those

dire obsidian
#

Any good lang if im already familiarized with js?

lyric mountain
#

You'd be looking for a dynamically typed lang with OOP capability

#

Idk about any that's as abstract as js

#

Well, I mean

#

There's lua but I've never seen it anywhere outside of its very specific niche

dire obsidian
#

I think im going to go for python

#

Ik their syntaxes are way different

lyric mountain
#

Python also has thread issues

dire obsidian
#

O fck

lyric mountain
#

But it's a different issue than js

dire obsidian
#

Then a c based programming language?

lyric mountain
#

You see, threads in python are either:

A - Synchronized
B - Totally isolated processes

#

Sync threads are useless

#

And isolated processes can't be called threads at all

dire obsidian
#

._ .

#

God i think im just going to learn c#

lyric mountain
#

That'd be a better option

dire obsidian
#

Does wine run that type of apps?

lyric mountain
#

Iirc c# runs on linux

dire obsidian
#

Hmmm k

#

Time to make a calculator

lyric mountain
#

Web langs, embedded langs and desktop langs. Each to their purpose

dire obsidian
#

Hmmm ok

old cliff
#

Binary diff

lyric mountain
#

Before learning programming I thought programs were made with batch

dusky sundial
#

Before I learned programming I thought all programs were mathematically programmed pixel by pixel

old cliff
#

Wtf

dusky sundial
#

Like, I imagined that game devs just programmed every specific pixel to change

#

for some reason

#

tbf I was like 11

old cliff
#

I thought that they were made using binary

#

I was 8

#

I learnt html at 9

#

Or 10

dusky sundial
#

Oh yeah, and I thought .dll files were manually written as well. Since I opened them with a text editor and was like "woah this looks weird"