#development

1 messages · Page 60 of 1

raw nest
#

Thanks for the response. I also found bcrypt after and I'm gonna use that. How many rounds are pretty secure? I mean if you have like 30 rounds one hash takes days xD (GitHub README)
What's a good amount of both?

sharp geyser
#

Actually I could just wrap the ore.Amount.Value in parans and - 5 it so it does that calculation first

#

or not it just remains 5 😔

#

Am I just that bad at math

woeful pike
raw nest
#

Okay thanks a lot!

wheat mesa
#

Lua 🤢

sharp geyser
#

Fuck off

wheat mesa
#

hey guess what

#

Ily 😘

sharp geyser
#

Ilyt

earnest phoenix
#

Since when is bcrypt better than scrypt? Always heard and read it was exactly the opposite. Bcrypt shouldn't really be used for future systems but go for argon2id and scrypt as alternative if argon2id is not available.

#

Yes scrypt is more 'recent' and less 'tested' which gives it a downside

#

scrypt is a memory hard algorithm that makes a bruteforcer pay a lot for both cpu and memory

#

Personally wouldn't qualify bcrypt as being more secure than scrypt, unless I've missed something which can be quite possible KEKW

#

Plus bcrypt has a limit of 72 bytes that scrypt, I believe, doesn't have YIKES

earnest phoenix
#

The limit of 72 bytes can be shown easily:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA (72 chars) => $2a$12$qunATwVFGO3eM6vNZgoIsemyLKTNzqqGgTFlaEnQiaF6V1P03KCry
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA (100 chars) => $2a$12$btgY9Xom0xY74Lrv1.3bKe0TCAKp2UXsBVGLEluLE8gD.w.ceeXiW

Now checking the hash generated by the 100 characters string with the 72 characters string, you will see a perfect match.

#

So keep in mind that only the 72 first bytes will be taken in consideration, and not the string in its entirety

raw nest
earnest phoenix
#

Awesome kryptonHype Sorry if that was too much I just love to write KEKW

raw nest
#

No it's perfect. I also found the thing with only 72 bites but thanks for the quick demonstration :D

slender wagon
#

best payment methods for webapps so far?

raw nest
#

At least we don't argue 20mins again xD

earnest phoenix
raw nest
#

cool little thingy FoxLove2

#

from a private server?

earnest phoenix
#

Yeah, custom emotes for me so on my personal server kryptonSipping

raw nest
#

did you design them yourself?

earnest phoenix
#

Commissioned someone, I can't draw ||Kind of goes off topic KEKW ||

raw nest
#

aight^^

slender wagon
raw nest
#

what you mean payment method?

slender wagon
#

your project provides premium features which would be the payment method you would implement

raw nest
#

stripe

slender wagon
#

not available 🗿

#

i don't wanna move into crypto since most don't know shit about using it

raw nest
#

stripe isn't crypto ThinkO_O

slender wagon
#

i am aware

#

just saying since most of the popular payment methods aren't available for me

#

then i could use crypto

slender wagon
earnest phoenix
woeful pike
earnest phoenix
#

Yeah true

solemn latch
raw nest
earnest phoenix
#

Nice

neon leaf
#

ok so I have this SQL Code,
select * from stats where type='msg' and guildid=$1 order by value DESC
how can I find a specific userid with that, aka to get his position?

rustic nova
#

elaborate "position"

#

ohh the position of the query response

neon leaf
#

yes

rustic nova
#

eh just iterate through it with indexes, index+1

#

that should be good enough

#

unless you directly want their position as in for example "You're currently position x"

neon leaf
#

yeah, basically that

rustic nova
#

don't think thats possible with sql itself, you might need to query the users you've already done, then index them yourself with a for loop

#

so for example something like

ranking = empty 2 dimensional array (index, stats_data)
for i in length of sql_response
ranking.append(i+1, stats_data)
#

you can do it the other way around too to be able to get that user easily

#

if thats understandable

rigid vortex
#

Do you know bot permissions on Bot-test guild?

neon leaf
#

thanks! will do that, btw you can do i++ instead of i+1

rustic nova
rustic nova
# rigid vortex Do you know bot permissions on Bot-test guild?
steady verge
#

um hello. is this the right spot to talk about learning how to build bots and related tech?

#

cool. i just came across top.gg so there is still a lot i need to read, but I also have written a simple bot like a year ago. It just played ping pong with u. But I am looking for more information on how to build more complex stuff and perhaps more information on what are the benefits to developing this type of software?

solemn latch
#

"build more complex stuff"
like?

#

What you need to learn, and the tools you use will depend on what you want to do.

steady verge
#

before i landed on top.gg i was playing around with a bot called 'karuta' and also have been needing to investigate more cloud hosted DB solutions and possibly making a bot that utilizes an API with CRUD operations... but i am still kinda learning this stuff. Been primarily working in Node.js and HTML but looking to start expanding the stack...

#

im not exactly sure what i want to make in terms of bots, but it has my curiosity rn and seems like it could bridge into app dev nicely.

#

ideally for now i suppose creating a test bot with a DB would be a good start...?

digital swan
#

yeah why not try starting with a ticket bot or something

solemn latch
#

You've kind of already hit the nail on the head.

If your goal is to make something like karuta you'll want to learn individual concepts.

Try making a bot with a very basic economy system, or the suggestion max gave.

then if you want to learn how an API works with bots you can try making a dashboard which users could access their economy info, or tickets.

steady verge
#

ticket bot sounds interesting and yeah that also sounds good.

#

whatever helps me to learn the fundamentals of linkage between the services.

#

def like building UI

#

def interested in creating economies...

#

also like making games

solemn latch
#

Just be a bit weary of economy bots. Discord has taken some stances against them recently.

steady verge
#

it could just be a user based system as well.. i think?

solemn latch
steady verge
#

good article only half done tho, just want to say, i don't want to do gambling...

deft rock
solemn latch
#

Dank memer isnt the only large bot not allowed on app discovery

steady verge
#

ok finished reading it

#

so is a user bot or farm basically kinda like a zombie army ?

solemn latch
#

They are user accounts made to farm a bot economy.

#

IE, if you get coins every level up a user might selfbot 1000 accounts and have them all chat just to get coins.

deft rock
#

unbelivaboat isnt one right?

steady verge
#

this is part of why CAPTCHA protocols exist?

solemn latch
#

Well, the bots cant use captcha unless they make you visit their site.

Which dank memer doesn't have to do if they don't want to.

steady verge
# deft rock what do you mean

its the name of a virus that would take a part of the PC and dedicate it elsewhere on the internet. like a bot net. but it had all kinds of applications. i am only vaguely aware of it.

deft rock
#

ah

solemn latch
#

That's probably not what most users used.

steady verge
#

oh no it was just me trying to understand the nature of what the article mentioned

#

bots can be used for good or evil, essentially...

solemn latch
#

I dont think that was the main point of the article though.
The main point is, dank memer and other bots cant be listed for gambling like commands

steady verge
#

no it was a lesser point. i got the main point.

#

discord pushed a policy that blacklisted a bunch of bots for having gambling fns

#

im still interested in building another one.

#

any particular reference material or links for beginner bot / mid level coder?

solemn latch
#

Nodejs?

steady verge
#

that's what i have been using as a host for my project yes.

#

but that project is a straight up game. see bio.

solemn latch
steady verge
#

is that like the main lib used for serious bots?

solemn latch
#

serious(the largest) bots make their own lib most of the time.

deft rock
#

^

steady verge
#

by creating their own API or host?

earnest phoenix
#

Large bots do use discord.js, and also sometimes Eris (although not really maintained much anymore), they also sometimes fork the existing libraries and make tweaks to them

#

But you're better off using the baseline libraries, discord.js will do and it supports most of the things you'll ever need

steady verge
#

cool

#

thanks a bunch

astral path
solemn latch
#

Yeah

#

I dont encourage that at all

steady verge
#

dependency issues mebbe?

#

i know that was my motivation for writing my own game engine... among others...

earnest phoenix
#

They do it because of insane amount of things and load they have to handle due to the insane amount of guilds the bot is in, but nowadays that's not needed

steady verge
#

also quick question: what is the voting about? what does that effect?

earnest phoenix
steady verge
#

i notice most of the bots seem to have this fn

#

/vote

#

are the bots being ranked or something?

earnest phoenix
#

They just provide links to bot lists that bot is listed on, so you can vote it for it to be placed higher in those bot lists

steady verge
#

ah so its basically an indexing fn

earnest phoenix
#

More votes = higher visibility in bot lists = more users

steady verge
#

sort of like SEO

astral path
#

kinda yeah, except it's direct user interaction that leads to the bot getting promoted, rather than the bots contents.

steady verge
#

interesting

#

🚬

solemn latch
#

SEO is a factor when listing on botlists though

steady verge
#

SEO always a factor these days...

#

i swear it has bled into my naming conventions

#

this looks like a really good starting point tho

#

thanks again

#

ok 1 more question and this one is gonna sound dumb...sigh~

#

do you guys know which discord server is the official discord developer server?

sharp geyser
#

SEO is a factor of whether or not you want your site to be one of the top searches on google :^)

solemn latch
#

I think a lot of people forget when writing a bot description on a bot list you want to optimize for SEO wherever possible.
Not just for the botlist, but for other search engines.

If you have a smaller bot, and not the greatest SEO for your website(or no website at all) writing good content and not using an Iframe might be the best way to boost your growth with not very much work and for free.

#

Bot/server pages which optimize for SEO seem to grow faster

steady verge
#

anything that has a readable name field should be addressed with care. :3

#

another question: What are the guilds in relation to bots?

solemn latch
#

servers

steady verge
#

ahh-

whole knot
#

As "Activity" is a Nitro feature, will bots be able to also start them without the server having a specific level? 🤔

#

As bots apparently have some advantages when it comes to user-Nitro features

#

Do not know if there was an announcement on that or similar

boreal iron
#

What are you speaking about?

#

A per server activity instead of a global presence?

lyric mountain
#

The reason they can use emotes from other servers is merely an exception because it'd be dumb to limit that

#

Aside from that, bots have no other nitro features

whole knot
#

Sad...

rustic nova
#

hey

#

say that again

deft rock
#

you can delete them not edit them

rustic nova
#

you can edit them

deft rock
#

prove it XD

solemn latch
# rustic nova <#637358847543214080>

You're referring to

Bunnies make noises, but they are very quiet. Content rabbits purrrrr by gently grinding their teeth together, and excited rabbits oink

Right?

#

Its the most important part.

deft rock
#

lol

rustic nova
#

this includes ephemeral messages

deft rock
#

gotta TL;DR

sharp geyser
#

ez

solemn latch
#

Its one sentence 👀

sharp geyser
#

Hey woo, give me 5$ and I can turn it into 500 dollhairs for ya ;)

solemn latch
#

500 whats

#

lets gooo

#

worth

sharp geyser
#

facts

boreal iron
# rustic nova hey

Well tbh that’s not really important or necessary at all
Editing them, follow ups and now deletions can always fail since the message could already be dismissed, means has an invalid token

rustic nova
#

That is true

sharp geyser
#

its also true that people are lazy

#

9 times out of 10 they will leave it there

rustic nova
#

let's hope libraries would keep track of that lol

sharp geyser
#

probably not aurel

boreal iron
#

And even if I can delete ephemeral messages now, I can also not do that and rely on that they disappear automatically anyways

sharp geyser
#

They'd probably just throw an invalid token error if you try they wont likely do much other than that

boreal iron
#

Ephemeral messages can be seen by the recipient only anyways, so the data you provide to the user, is either personal or just out of context which doesn’t belong in the chat to reduce spam

#

Which makes deleting em really pointless

sharp geyser
#

honestly tho ephemeral messages was by far the best idea discord came up with

boreal iron
#

Yes

#

At least a good idea tho

sharp geyser
#

I think its up there with the best

#

The best idea by far is making a bot api tho

#

all those pesky user accounts

#

I imagine it was hell when they didn't have a public bot api

rustic nova
#

deleting and/or editing is probably more useful on short notice things rather than something like autodelete after 30 seconds

real lynx
#

I want him to delete the data after two minutes, but he doesn't delete it, what's the problem?

const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const schema = new Schema({ UserID: String,
expireAt: { type: Date, default: Date.now, index: { expires: "2m" } } });

module.exports = mongoose.model("nsfwvote", schema);```
#

my goal is normally to save it after the person has voted and delete the data after 12 hours

earnest phoenix
#

2m isn't a valid time for mongoose

#

use time seconds instead

#

put 120 instead of 2m

real lynx
earnest phoenix
#

no

real lynx
#

i'll try when I get up tomorrow

real lynx
# earnest phoenix no

would it be okay if I recorded it this way

const votess = require("./models/nsfwvote");
await votess.create({UserID: req.vote.user});```
#

for example, I tried for 2 minutes at first, he deleted the data, but it stays here, then I tried for 12 hours, he deleted it again in 2 minutes, what can I do

lyric mountain
rustic nova
#

I need it but actually don't

earnest phoenix
sharp geyser
#

it bothers me that the text isn't centered

boreal iron
#

Well yeah if you aren’t familiar with the containers and tables and their alignment it can be quite challenging

#

Except cosmetics and animations nobody actually need, CSS isn’t difficult tbh unless you understand the mentioned

#

In other words Lay-out principals

hasty mulch
#
if signal == '80':
  if track == '80':
    if penalty == 'false':
      if overspeed == 'false':
        file = discord.File("/home/pi/Documents/Room_Sealer/media/adu/80/80-80.png", filename="80-80.png")
        embed.set_image(url='attachment://80-80.png')
     else:
        file = discord.File("//home/pi/Documents/Room_Sealer/media/adu/80/80-80o.png", filename="80-80o.png")
        embed.set_image(url='attachment://80-80o.png')
   else:
     file = discord.File("//home/pi/Documents/Room_Sealer/media/adu/80/80-80op.png", filename="80-80op.png")
     embed.set_image(url='attachment://80-80op.png')

Could I f-string the file paths and skip having the first two if statements?

rustic nova
#

yes you can

#

would format it like:
doesnt match what you need, but something like this

file = f"/home/pi/Documents/Room_Sealer/media/adu/80/{signal}-{track}{'o' if overspeed else ''}{'p' if penalty else ''}.png"
#

as a overkill way per-se

hasty mulch
real lynx
earnest phoenix
real lynx
earnest phoenix
fossil bronze
#

Thank you for the approval (:

#

My first slash cmd bot

digital swan
earnest phoenix
digital swan
#

the point of interval is to run the code multiple times

lyric mountain
earnest phoenix
#

🤷

#

just my opinion though so don't be that mad lol

lament rock
quartz kindle
#

i mean, a recursive timeout is pretty much the same thing as an interval

#

it just has a few extra calls

earnest phoenix
#

yep, just like this.

function setIntervalRecursive(callback, delay, ...args) {
  callback(...args);
  return setTimeout(setIntervalRecursive, delay, callback, delay, ...args);
}
const interval = setIntervalRecursive(() => {
  console.log('Hello World');
}, 1000);

setTimeout(() => {
  clearTimeout(interval);
}, 5000);

it is better to use timeout since it is more accurate

quartz kindle
#

why is it more accurate?

#

none of them have any timing guarantees

lyric mountain
#

it's like saying dihydrogen monoxide is less healthy than water

lament rock
earnest phoenix
lyric mountain
#

setInterval isn't defined by the clock

#

you're confusing setInterval with cron

earnest phoenix
#

it is

#

the built in setInterval() function makes a call to the clock's setInterval function, which then sets an interval

lyric mountain
#

setInterval/setTimeout both use a millisecond timeout, which is based on the timestamp of the calling time

#

basically if (now >= startTime + delay) doStuff()

earnest phoenix
#

setInterval is still defined by the clock

quartz kindle
#

wdym makes a call to the "clock's setInterval function"? what clock?

earnest phoenix
#

lol

lyric mountain
#

"defined by the clock" makes no sense at all

quartz kindle
#

what clock lol

lyric mountain
#

1ms is 1ms regardless of whatever clock u use

earnest phoenix
#

it's defined when the clock is ticking

quartz kindle
#

they are both run during the event loop's timer phase

earnest phoenix
lyric mountain
quartz kindle
earnest phoenix
quartz kindle
#

both setInterval and setTimeout are scheduled to run during the timers phase

#

both are affected by the event loop lag

#

so none of them offer any timing guarantees

#

if the event loop lags by 5ms, both wil be delayed by 5ms

#

whenever the event loop reaches the timers phase, both of them check if the current time has exceeded the scheduled time, and if it did, it runs the timeout body

earnest phoenix
#

👏

#

yes correct

quartz kindle
#

so there is no difference in accuracy between them lol

earnest phoenix
#

yeah I'm wrong, both are an approximation

quartz kindle
#

👍

#

also, js has unicorns in it

#

magic confirmed

neon leaf
#

lets say I want to make a pagination for a baltop command, I currently have limit 10 on my query, how can I make it skip the first 10 results and give me 10 again for the second page? (sql)

quartz kindle
#

LIMIT 10 OFFSET 10

neon leaf
#

thanks

hidden gorge
#
if file == "north" or "North":
   Chapter_1.North.north()
   elif file == "west" or "West":
    print("")```
#

but elif works in my other files

digital swan
hidden gorge
#

fixe

#

fixed*

raw nest
#
  last_password_reset BigInt
  last_login          BigInt
  created_at          BigInt
  updated_at          BigInt

If I have a user table with these columns. Is it good to store these times with a unix timestamp (milliseconds in js so BigInt)? I'm not sure if it's better safe them as DateTime or something

boreal iron
#

depends on you, datetime is a constant, means when inserting it, it wont be affected by the timezone

#

timestamp however will be affected by the system timezone or time_zone setting of your database config

#

(when inserting it)

rustic nova
#

probably better to store it in a timestamp directly instead

boreal iron
#

except a few examples of providing meta data only, I would also use datetime

rustic nova
#

as long as its only for internal use, unless you're telling that user when they last changed the password

#

actually, you can calculate the current time for a user based on their browser and the timestamp with a baseline can you?

raw nest
#

So DateTime is just UTC? And timestmap changes each time_zone?

boreal iron
#

no datetime is not UTC

#

datetime is a constant

#

For example: 25th of Sep 2022 - 19:00 is the same date and time across all timezones

raw nest
#

ah okay

#

I'm always confused about that..

boreal iron
#

There's literally no disadvantage of generally using datetime

#

Technically spoken, it's the better option and long term solution

#

Since 2038... and our 64 bit issue

raw nest
#

So I could use DateTime and when there are two users from different timezones ?

boreal iron
#

The constant is the same for any user in any timezone, as I explained above

raw nest
#

yes now let's say there a log that says when a user loged in. When I use DateTime it says the same time for both but it actually was different points in time for them

boreal iron
#

If you wanna calculate a cooldown or xx since xx you have to respect the user's timezone

raw nest
#

yes but then DateTime doesn't work?

boreal iron
#

When querying your database you can get the datetime value and convert it to your local timezone (in your example the user's timezone)

raw nest
#

Ahh okay I can convert on select

boreal iron
#

Any language I know has inbuilt functions to parse strings to a timestamp

#

If just the raw date matters, for example when showing Your ban will expire at 25th of Sep 2022 - 19:00 then no conversation is needed at all

#

As once again:

#

[...] is the same date and time across all timezones

raw nest
#

okay ty

boreal iron
#

You can also add a timestamp as value of your datetime col

#

... SET last_password_reset = FROM_UNIXTIME(<timestamp>) WHERE ...

#

As well as requesting the datetime value in your query as timestamp

#

SELECT UNIX_TIMESTAMP(last_password_reset) AS last_password_reset FROM ...

#

But this will then again use your system timezone or configured timezone as relative timezone

#

So bringing the timestamp into the required date time timezone is required for both field types

#

But like I said datetime has the major advantage over timestamp that it is a constant

#

(and will be calculatable on 32bit systems after 2038) freerealestate

earnest phoenix
#

Imagine having 32 bits systems in 2038 in the first place KEKW

neon leaf
#

Ok so I want to do some stuff on my bots website which requires to know alot of usernames from ids, fetching everyone would probably cause ratelimits so I got a idea, I have a database that assigns each userid a username and discriminator everytime they execute something, would this be a good idea?

quartz kindle
#

sure

#

every time they execute something, check if there was any change

#

and if there is any change, update your db

neon leaf
#

btw, whats this error? I get that like every 5 min when I try to restart my bot

quartz kindle
#

an error from a promise or an async function that was not caught

neon leaf
#

yeah, it also happens on a bot with only discordjs installed

quartz kindle
#

unfortunately those kinds of errors are very hard to solve because the information to find them is lost

#

only djs installed but with your code right?

#

check if you have any promise or async function without a try catch or a .catch

neon leaf
quartz kindle
#

what template?

neon leaf
quartz kindle
#

then post an issue about it there

neon leaf
boreal iron
#

guess you don't even need other files

#

one-file-bot-template-solution

lament rock
#

multi files is actually the move

compact urchin
#

Hello

quartz kindle
#

am i reading

neon leaf
#

yes

compact urchin
#

How do I apply for staff team

quartz kindle
#

you have both mongoose and pg, you have both a client and a sharding manager in the same file

#

plus you're caching all members

compact urchin
#

What

quartz kindle
#

in the sharding manager

neon leaf
#

yes, cuz dashboard, and im not completely away from mongo yet

quartz kindle
#

how many guilds is your bot in?

boreal iron
neon leaf
#

11

quartz kindle
#

why are you using the sharding manager

neon leaf
#

I dont know but I have no reason not to because its set to auto

quartz kindle
#

you know you're essentially loading 2 bots

neon leaf
#

yes

quartz kindle
#

or rather, loading your bot twice

#

for no reason

lament rock
#

I have the overhead to do it. Might as well

quartz kindle
#

lmao

neon leaf
#

I mean I got an amd ryzen 7 5800x @ 3.8ghz with 10gb ram so why not

quartz kindle
#

are you self hosting?

neon leaf
#

yes

#

kinda

quartz kindle
#

how are you gonna play games when your bot is using 5gb ram

neon leaf
#

I have a server for it

#

not gonna have my pc on 24/7

quartz kindle
#

does your server have 10gb ram too?

neon leaf
#

yes

quartz kindle
#

lel ok

neon leaf
#

I love my screenrecorder /s

#

anyway, that db thing is like 4x faster

eternal osprey
#

hey guys

#

how do i split a string by a certain character?

#

Imagine i have a sequence of word1_word2_word3 etc et

#

how would i cut it at _, in c++ btw!

lyric mountain
#

can you use std lib?

eternal osprey
#

uhh

#

#include <iostream>
#include <fstream>
#include <cassert>
#include <cstring>

#

string

lyric mountain
#

only that?

eternal osprey
#

yeah

#

cstring is the only thing

lyric mountain
#

well, then you'll need to google it a bit

eternal osprey
#

i will need to split a space btw

#

sorry made a mistake earlier on

deft rock
#
const { Events } = require('discord.js');
const { guildId, RoleID } = require('../config.json');

module.exports = {
    name: Events.GuildMemberAdd,
    async execute(member) {
        console.log(`New member joined: ${member.user.tag}`);
        if (client.guilds.cache.get(guildId)) {
            return member.roles.add(member.guild.roles.cache.get(RoleID));
        }
    }
};

When a user joins it doesnt get the role any ideas? (RoleID is in the config.json file)

boreal iron
#

You’re not awaiting the promise, doing any permission check, if your client is able to add roles to the member and you’re not checking if the guild (part of the guild member object) matches your guild ID of your config file

ember zephyr
#

does anyone know why eris is getting so many downloads lately?

wheat mesa
ember zephyr
#

from 5k/8k to 43mln

deft rock
wheat mesa
#

Not what I was trying to say

deft rock
#

oh?

boreal iron
ember zephyr
wheat mesa
#

I’m saying that the config.json file’s contents will be cached upon the first time it is loaded, and therefore it won’t change until you restart the bot or clear the cache

boreal iron
#

As we don’t know that yet it’s just an assumption

wheat mesa
#

It’s fine if that file doesn’t change though

boreal iron
#

Anyways let’s resolve the issues first I mentioned

lament rock
#

its so bloated and unbearable

earnest phoenix
#

Someone can add my bot in his server ? DM ME

deft rock
#

?

errant creek
# ember zephyr
  1. "djs bad now 🤮"
  2. npm bots
  3. some broken ci system or something
errant creek
#

top gg is sending me multiple requests

lyric mountain
errant creek
#

lol

#

yeah i forgot to

#

oops

wind cipher
#

Hey

fervent moss
#

Why is it so i have a command which will find and cache emoji from client but when i add emoji and try to use that command it just doesn't work the bot needs a re-start and then starts working why so?

rustic nova
#

because the client doesn't know that emoji exists

#

you'll need to cache it again

#

though I suggest you to statically list all emojis you use on your bot rather than dynamically loading them from your support server for example

radiant kraken
#

it's just a Python script

#

here's the file contents btw

earnest phoenix
#

the error says it all

radiant kraken
#

i know, but i'm not executing it, i'm just reading the file contents

#

also i've never seen Windows flag a Python file as malware before

rustic nova
#

I had that before

#

that's because you got some example code that is often used in python based keyloggers lmao

#

it's so funny that defender picked that up

radiant kraken
#

that's crazy

rustic nova
#

you won't be able to do anything with it until you either whitelist it or rewrite it

radiant kraken
#

obfuscate it then

#

ezpz

little harbor
#

Hi, I'm currently running my bot using Heroku and I'm currently looking for a alternative free server to replace Heroku. Anyone has their recommendation for free online hosting servers/VPS?

solemn latch
#

You wont find very many servers/VPS's for free.
Especially ones that are reliable.

Oracle has an ARM VPS that's free, but I've seen multiple reports of people having their VPS shutoff randomly and not be allowed to start it again.

Google cloud has a free VPS, https://cloud.google.com/free/docs/free-cloud-features#compute.

#

I would recommend the google free VPS over the oracle, if you ask me it will be a bit more reliable of a platform.

neon leaf
#

Lets say I have an array with 96 objects, how can I set it to example 25 (the last values should be deleted, not first) in js?

solemn latch
#

slice might be what you want.

neon leaf
#

thanks!

spark flint
#

I've had mine running for a few months with no issue

wheat mesa
#

AWS can slap you with a hefty overage bill if you accidentally go over your limits without realizing it

#

I use Oracle because they can’t hit me with an overage, if I go over my limits it just stops my service until the next cycle

#

(For free)

green kestrel
#

get an rpi and plug it in somewhere in your home

#

it'll be more stable than any free vps

#

don't install a gui btw, those things have barely any ram or CPU to start with, you don't want to waste it on xorg

cursive musk
#
const weather = require("weather-js");

const discord = require("discord.js");

//TIME TO END STREAM

module.exports = {
  name: "weather",
  description: "Get the current weather of a specific location.",
  category: "fun",
  usage: "weather <>",
  cooldown: 5,

  run: (client, message, args) => {
    if (!args.length) {
      return message.channel.send(
        "Please give the weather location"
      );
    }

    weather.find(
      { search: args.join(" "), degreeType: "C" },
      function (err, result) {
        try {
          let embed = new discord.MessageEmbed()

            .setTitle(`Weather - ${result[0].location.name}`)

            .setColor("#ff2050")

            .setDescription("Temperature units can may be differ some time")

            .addField(
              "Temperature",
              `${result[0].current.temperature} Celcius`,
              true
            )

            .addField("Sky Text", result[0].current.skytext, true)

            .addField("Humidity", result[0].current.humidity, true)

            .addField("Wind Speed", result[0].current.windspeed, true) //What about image

            .addField(
              "Observation Time",
              result[0].current.observationtime,
              true
            )

            .addField("Wind Display", result[0].current.winddisplay, true)

            .setThumbnail(result[0].current.imageUrl);

          message.channel.send(embed);
        } catch (err) {
          return message.channel.send(
            "Unable To Get the data of Given location"
          );
        }
      }
    );
  },
};
#

Attempted a simple weather command

#

TypeError: Command weather doesn't export a class. lol

pale vessel
#

are you using some sort of a command handler?

#

check sample commands that it provided and see how they're defined

solemn latch
#

I'm guessing pogy's command handler

pale vessel
#

I legit cannot take you seriously with that profile picture

solemn latch
#

👀 I forgot to change it back.

pale vessel
#

keep it that way, thank you

rustic nova
#

flaze weeb confirmed

#

as always

solemn latch
#

Anyway, with pogy's command handler you need to extend Command.

#

Pogy doesn't use the common djs v13 style of command handler.

real lynx
#

Why am I getting this error? reflects after disconnection

connect section

const { connect, connection: dbs } = require('mongoose');

connect("the secret part", { useNewUrlParser: true, useUnifiedTopology: true, });
dbs.on('connected', async () => console.log(`Successfully connected to the database!`));
dbs.on('disconnected', () => console.log('Disconnected from the database!'));
dbs.on('error', (error) => console.log(`Unable to connect to the database!\nError: ${error}`));
dbs.on('reconnected', async () => console.log(`Reconnected to the database!`));```
boreal iron
#

The hostname can not be resolved

#

Either try the IP you can get by resolving the hostname yourself or check your nameserver settings of your server

boreal pewter
#

Yo, I had a Verified bot, and I took it offline about a year ago.
I see now you need message intents (So imma re-write to use the slash commands) and also discord.py is discontinued

TLDR it for me, to develop a python bot, what is the go-to library these days?

earnest phoenix
boreal iron
#

until this pleb will discontinue it again

boreal pewter
#

oh tnx 🙂

stiff sparrow
#

I'm guessing that this isn't possible, but by any chance has someone using discord.js found a way to get the ping time from the user's Discord app to the bot? I know about client.ws.ping, but I'm pretty sure that's ping time from the bot to Discord's servers.

#

Unless the WebSocket is actually going directly between the user and the bot?

#

I don't know much about how Discord works internally.

rustic nova
#

its not possible, as there's never a connection between the user and the app directly

#

its always through discord

#

aka its websocket

pale vessel
#

weebsocket

#

you weeb

lyric mountain
#

for obvious reasons, this has a little flaw in it

vestal finch
#

i want to run a Websocket script on python and get discord bot to receive such message and send it to a channel

#

is it possible ?

wheat mesa
#

thank you for being specific

#

lol

rustic nova
#

probably messages

#

yk messages and send it into a channel smh so apparent mmLol

lyric mountain
#

like telling ur bot to send X on channel Y

lyric mountain
#

yes, it's possible

#

not only is it possible, but I also have something like that on my bot

vestal finch
#

well i cant seem to get it to work

lyric mountain
#

skill issue

#

(ok, why?)

vestal finch
#

liq.ws.run_forever() - webSocket ..
dis.run(TOKEN) - discord

if the websocket start , the discord bot doesnt 😄

lyric mountain
#

what websocket lib are u using?

vestal finch
#

import websocket

lyric mountain
#

...

#

is it the built-in websocket?

#

if so, use ws lib

vestal finch
vestal finch
#

i just cant get the webSocket run with discord

#

as both of them run forver

#

so if one starts , it doesnt let the other run

lyric mountain
#

did u do npm i ws?

wheat mesa
#

he's using python

lyric mountain
#

ah, nvm

vestal finch
#

python

lyric mountain
#

well, python is monothread, but it's odd to have a sync ws lib

wheat mesa
#

js is also monothread

#

idk how python handles websockets, but I'm assuming you should just be fine to use your library's built-in webhooks, no?

#

Since 99% of discord libs also support webhooks

lyric mountain
#

ye, but that's why I said it's odd to have a sync ws lib

lyric mountain
wheat mesa
#

ah

#

I forgor

lyric mountain
#

💀

vestal finch
#

😶

wheat mesa
#

also those cheese breads turned out amazing

#

(sorry off topic)

#

I can't help anymore on this cus it's python, gl

lyric mountain
#

pão de queijo, not cheese bread angeryBOYE

wheat mesa
#

yes 🙄

#

I was worried it was going to suck because it wasn't sticking together in the mixer but then I put in an egg and it instantly started to bind into a dough lmao

lyric mountain
#

lmao

wheat mesa
#

very sticky to handle though, I must say it's difficult to shape them into balls

lyric mountain
#

I wonder how tf they even discovered that mashing bread with cheese together would result in something good

#

and not some humongous mass of cheese slime

wheat mesa
#

lol

quartz kindle
rustic nova
#

how the fuck is development suddenly about bread and cheese

quartz kindle
#

take some plant, reduce it to dust, add water, make a bland mass of something, add bacteria and cook

lament rock
#

A runtime I'm trying to work with doesn't support any K,V pair types and I'm trying to make my own and it also doesn't support static fields or constructor initializers for user defined types

#

I can probably get around not supporting constructor initializers

earnest phoenix
boreal iron
#

Ok we’re posting random shit?!

#

Lemme participate

#

if that ain’t satisfying then idk

#

If only the Thread network would be a bit more reliable

sudden geyser
#

shit movie

deft rock
#
console.log('Don\'t not shit on the movie. That\'s what toilets are for')
lyric mountain
#

imagine using \ to escape quotes

deft rock
#

😛

#

won't work otherwise lol

pseudo cloak
#

hi

deft rock
#

bye

lament rock
#

alternatively, use different string initializers

lyric mountain
deft rock
#

I mean yeah I guess I could use those too

lyric mountain
#
console.log(`"But what if I need both?" you might ask, well, it doesn't matter because js has 3`)
#

then comes groovy, with 6 string literals

deft rock
#

wym 6?

lyric mountain
#
def a = "This is a string"
def b = 'This is a string'
def c = /This is a string/
def d = $/This is a string/$
def e = """This is a string"""
def f = '''This is a string'''
lament rock
#

thanks I hate it

deft rock
#

those are all fr strings I can use!?!?

lament rock
#

in groovy

deft rock
#

Thanks I fucking hate it

lyric mountain
#

you? no, but I can mmLol

#

I fckin love groovy

deft rock
lyric mountain
#

the language

deft rock
#

interesting, ive never heard of it tbh

lyric mountain
#
5.times { println "Hello world!" }
deft rock
#

whats better. JS or groovy

lyric mountain
#

I'd say groovy because u get threads

lament rock
#

I need to learn HLSL specifically for compute shaders so I can get around stupid BS of a bloated runtime wasting cpu cycles when I can just compute it all on the gpu

lyric mountain
#

I imagine groing from js to groovy isn't hard at all, since it feels a lot like js

lament rock
#

like what kind of runtime that runs 30x slower than c# native doesn't have K,V

lyric mountain
deft rock
#

gotta document on groovy?

lyric mountain
deft rock
#

just wanna look into it so idk what it is lol

lyric mountain
#

there's also the "groovy goodness" wiki that shows the fun stuff u can do in it

lament rock
lyric mountain
#

well, java has groovy, a superset that removes strictness from java

deft rock
#

i hate ts with a passion but yes it does have it

#

so basiclly what im gathering groovy is basiclly ts but for java

#

aka a subthingy

lyric mountain
#

kinda

#

all java projects are compatible with groovy 1:1

lament rock
#

it's actually super sad tho because everyone who talks about optimization in the runtime I'm trying to use is basically saying that I should use it as sparingly as possible and instead opt for using animators (Unity3D)

lyric mountain
#

it's a very fun language, I was surprised when I discovered it

#

and the fact I can use it for runtime scripting fit like a glove for my use-case

deft rock
#

Ok, so I use js would it be hard and/or complex to change to java?

lyric mountain
#

to java, specifically, I'd say medium difficulty

#

since you'll need to use a fuckton lot of specificity compared to js

#

if u hate ts, u wont like java at all

#

but tbh, I like java and hate ts too

lament rock
lyric mountain
#

u could make dlls so u can have pre-baked stuff

lament rock
#

No dll loading in the game. Anti cheat

lyric mountain
#

a

lament rock
#

also wouldn't work anyways because they're components you add onto game objects

#

idk if you know a thing about Unity, but they're just fancy MonoBehaviours

lyric mountain
#

I started using c# not too long ago, and barely if ever touched unity

lament rock
#

I'd recommend touching it more. Maybe getting engrossed into platforms like VRChat. Would give you an excuse to learn and develop more

#

I'm still kinda learning, but I know enough to make what I want to make regardless of performance

lyric mountain
#

it's in my todo list, I'd love to make a standalone game out of my tcg

#

sadly, even if I did I'd not be able to make it public because...anime stuff

lament rock
#

?

lyric mountain
#

my tcg uses cards based on anime characters

#

so I cannot legally make a game outside of discord

#

thus I have virtually no reason to touch unity, for now at least

#

but I will, one day

lament rock
#

whats a tcg

lyric mountain
#

trading card game, think of something like yugioh or heartstone

lament rock
#

oh ok, just needed the acronym

#

Could make your own characters influenced by specific characters

lyric mountain
#

I suck at drawing

lament rock
#

if art is a problem, could end up being low quality like your average deck of cards

#

the king and ace and stuff aren't too terribly detailed

#

or use symbols which represent

lyric mountain
#

not enough will nor time for that, since I still need to make new cards regularly for my bot

#

if I'd make a unity game, it'd use the same cards from the bot

lament rock
#

your community got you slaving away I guess

lyric mountain
#

lmao you bet it

#

luckily I managed to get some volunteers to gather images and rarities for each anime, so I mostly do the QA and programming

lament rock
#

still quite a bit of work I'd imagine. I'd hate to sit there and fill in JSON

lyric mountain
#

oh no json at all, the cards info are stored in the database

#

images are stored in the vps (and in a repo)

#

my api fetches the image for the bot, and my game engine does the rest

#

intellij allows me to have code highlighting/intellisense inside database editor, so it's almost the same as coding normally

lament rock
#

I'm already looking for people to take over my bot's organization and online presence because while it isn't a ton of work, it's really advanced and really annoying work because I'm now in the realm of needing a metric butt ton of native libraries to decode a lot of audio formats to PCM and then figure out how to do audio processing on pcm so I can skip ffmpeg

lyric mountain
#

oh, music stuff

lament rock
#

yes its so bad

#

please save me

lyric mountain
#

I can imagine it, especially when you have to deal mostly with very low level stuff

#

the only time I ever used ffmpeg was to make a replay system, and it was awful

lament rock
#

Tim and I looked at a breakdown of opus packets and we couldn't understand it at all

#

ffmpeg is god awful but it's so good at what it does

lyric mountain
#

indeed

lament rock
#

too bad there's nothing really for js

#

even the libmp3lame native addons don’t support NAPI

#

I'll have to start learning cpp to write my own addons

radiant kraken
#

good luck

#

i pity for your sanity

lament rock
earnest phoenix
#

E

radiant kraken
boreal iron
green kestrel
#

@lament rock what's your bot?

#

what kind of audio work does it do

slender wagon
boreal iron
#

I’m more concerned about “don’t not …”

stiff dust
rigid maple
#

Create a bool to check if it is sended
Set boolean true after 1 message and don't send message if boolean is true

#

Do false again after 1 minute

#

or set a specific time to send it at that time for example
00(hours):00(minutes):01(seconds)

lament rock
green kestrel
#

these are actually really simple if you use a compiled c compatible language

#

what language is it right now?

radiant kraken
#

TypeScript iirc

green kestrel
#

c++, rust or even C will make a much nicer language and all you'll need is libmpg123 and libopus

#

or you can directly link libavcodec

neon leaf
#

not related to development but does anyone know how to get linux kernel 6 on debian?

green kestrel
#

by running sid ig

neon leaf
#

can sid be considered "stable"?

green kestrel
#

hell no

neon leaf
#

oh yeah, just tried to install it on a test vm and it wont boot anymore

fossil bronze
#

recursive timeout? While(true) loop with await sleep() is best!!

green kestrel
#

my servers graph has a shark fin lol

#

daaaa dum, daaaaa dum, da dum da dum da dum 🎵

rotund patio
green kestrel
#

app directory induced shark fin

#

I'm tempted to do a top.gg auction ad at the same time and to for epic vertical line stonks

sharp geyser
#

lol

lament rock
#

Still need to learn cpp anyways

sharp geyser
#

I also will end up learning C/C++ in college

#

funnn

lament rock
#

I have some books I can read

green kestrel
#

best way to learn C++ is by experience, by doing

#

C++ books are ...drier than ghandi's flip flops

#

and youtubers have no clue wtf theyre talking about. the minute they type using namespace std you should nope the f out of there

lyric mountain
green kestrel
#

no

#

they think they are born masters of C++

#

but a lot of C++ youtube is lik someone trying to teach you js by saying 'we just use jquery for everything in 2022'

lyric mountain
#

no really, pretty much all big software had some indian participating in it, either directly or indirectly

green kestrel
#

yes, but those arent teaching on youtube, for the most part

#

those that know their stuff are charging for the privilege, or too busy to teach

#

theres someone on my discord whos obsessed with someone called cherno

#

we are continually getting them to unlearn the bs he's been tought

lyric mountain
#

ic

green kestrel
#

generally, if anyone tries to teach you C++ as an "Object oriented language", they are wrong

#

its a multi paradigm language with object oriented as one of the many ways of solving things with C++

#

the minute you try to solve a problem by making everything classes/objects, youre probably doing it wrong, when there are things like lambdas, templates, procedural programming, functional, as well

#

would be like someone giving you a toolbox of 200 tools, and you using the hammer to solve every problem to build a house

#

"what are you using to smooth that cement?" "back end of the hammer handle" kekeke

knotty quartz
#

How do you make a slowmode

rustic nova
knotty quartz
rustic nova
#

oh you mean implementing a cooldown on commands?

#

cant help with that

sharp geyser
#

Make a Set (new Set()), on command execution see if their user id is in the set, if not continue command execution then add them and make a setTimeout that removes them after x time, if they are alert them and stop execution

#
const cooldown = new Set()

if(cooldown.has(someUserId)) Alert User & Return void

Do some shit and then cooldown.add(someUserId) then setTimeout cooldown.delete(someUserId)
sharp geyser
#

🤓

knotty quartz
sharp geyser
#

I hope you dont try and copy that exactly its pseudo code

#

Also keep in mind this isn't persistent across shutdowns of the bot. If someone uses a command and are put on cooldown and the bot shuts down. They wont be on cooldown anymore when it comes online

knotty quartz
wheat mesa
#

Misty coming in clutch with the correct data structures

#

But what’s the time complexity of said data structure @sharp geyser 🤓

sharp geyser
#

Though a Set is probably relatively fast

#

only a nerd like you knows this answer

cinder patio
#

Isn't a Set just a Map but with no values

#

so the same as map

sharp geyser
#

I'd assume it'd be O(n)

wheat mesa
#

Set is based on a binary tree

sharp geyser
#

same as map

wheat mesa
#

(Most of the time, HashSets exist)

#

So for most operations it’s O log n

sharp geyser
#

Just give us the answer

wheat mesa
#

But if it’s a hashset it’s basically a map with no duplicate values

sharp geyser
#

I am just now learning about log in precal

#

so

#

I dont know what that means

wheat mesa
#

I think in js Set is a TreeSet

#

So should be O(log(n))

wheat mesa
sharp geyser
#

Gotcha

#

Also waffle why dont we ever vc anymore been so long 😔

#

miss that cute voice of urs

#

😘

wheat mesa
#

2nd best time complexity out of the most popular ones which are
O(1)
O(n)
O(log(n))
O(n log(n))
O(n^2)

#

😘

lyric mountain
#

a hashset is O(1) no?

wheat mesa
#

Yes

sharp geyser
#

What is the most impossible time complexity to achieve

wheat mesa
#

Anything hash based is on average O(1)

#

But at worst O(n)

sharp geyser
#

cmon waffle answer

wheat mesa
#

Uh

#

None of them?

sharp geyser
#

Cap

wheat mesa
#

There’s ways to get better time complexities, there are just pros and cons to consider

sharp geyser
#

There has to be a theoretical perfect time complexity

wheat mesa
#

O(1) means 1 operation

#

That’s in theory the “best”

#

But it also depends on what you’re trying to do

#

Some things are not possible to do in O(1)

#

Like for example, the minimum average time complexity for searching an unsorted 1d array is O(n)

#

If you know the array is sorted, it becomes O(log(n)) iirc

#

Because then you can do a binary search

earnest phoenix
wheat mesa
#

Ah

#

Why?

#

Is it because it’s not like Java where you can enforce the type system to guarantee ordering via an interface like Comparable

earnest phoenix
#

Hashsets are optimized for high-performance operations on unique data which Sets in JavaScript specialize in

wheat mesa
#

Ah

#

I suppose the RAM isn’t a problem because you’d be using another language if you wanted packed memory efficiency

earnest phoenix
#

Yeah

lyric mountain
#

ordered...hashset?

earnest phoenix
#

Yes?

cinder patio
#

so a javascript map with undefined as value essentially

wheat mesa
#

How do you order hashes though…

cinder patio
#

order of insertion

earnest phoenix
#

^

wheat mesa
#

ah

earnest phoenix
slender wagon
#

how do i catch an error on a .on function

#

pg.on(...).catch is not a function

wheat mesa
#

you can't because it's not a promise

slender wagon
#

promise me

#
pg.connect().catch(err => console.log(err));

figured that out so i added it here

lyric mountain
#

.catch(console.log)

timber tapir
#

Hey!
I'm currently remaking my bot page and I'm absolutely not a web developer, and I need to insert an image instead of the description is there a way to do it?

#

I've already tried img src thing but it only shows alt and not the image

rustic nova
#

post what you've tried

#

html is supported on the description

timber tapir
#

<img src="modified">

#

I think the website just doesn't load the image

rustic nova
#

not a valid link, that's an album link

timber tapir
#

oh

#

my bad

rustic nova
#

right click the image on Imgur, then copy image url

timber tapir
#

right

#

it works now, I'm dumb thanks anyway!

wheat mesa
#

I need some help with console.table(), is there a not-confusing way to get a table with specified column names

#

Actually, can I change the (index) column's name?

#

nvm, got it working

wheat mesa
#

average "do physics class by hand with lots of data" fan vs average "do it with javascript my beloved" enjoyer

lament rock
#

My brain is melting

Output:

Test
UnityEngine.Debug:Log (object)

System.Object[]
UnityEngine.Debug:Log (object)

Code:

public override void Start()
{
    base.Start();
    SendCustomNetworkEventWithData(-1, nameof(Test), new object[3] { 5, 2, 1 });
}

public void Test()
{
    Debug.Log("Test");
    return;
    int num = (int)packet[0];
    Debug.Log(num);
}

public void SendCustomNetworkEventWithData(int target, string function, object[] data)
{
    if (!Networking.IsOwner(gameObject)) return;
    if (data.Length > maxParamSize) return;
    if (waitingForSerialization)
    {
        int index = NextUsablePacketIndexStart();
        if (index == -1) return;
        sendQueue[index] = target;
        sendQueue[index + 1] = function;
        for (int ind = 0; ind < data.Length; ind++)
        {
            sendQueue[index + ind + 2] = data[ind];
        }
    } else Dispatch(target, function, data);
}

private int NextUsablePacketIndexStart()
{
    for (int index = 0; index < maxQueueSize; index++)
    {
        if (sendQueue[index * (2 + maxParamSize + 1)] == null) return index;
    }
    Debug.Log("[NetworkableUdon] => sendQueue is apparently full. Human error detected? Please back off.");
    return -1;
}

private void Dispatch(int target, string function, object[] data)
{
    if (function.Length == 0)
    {
        Debug.Log("[NetworkableUdon] => Attempted to send a function with no name. Are you okay?");
        return;
    }
    recipient = target;
    method = function;
    Debug.Log(data);
    packet = data;
    RequestSerialization();
    waitingForSerialization = true;
}
#

oh wait I know what the issue is

#

I have a setter callback for method that runs the code, so the code runs before the packet is set

#

Yup. That works like a charm

sharp geyser
#

Unity?

#

Imagine

fossil bronze
#

hallo

fossil bronze
wheat mesa
#

thanks for expanding on why you shouldn’t use it!

fossil bronze
#

lmao sorry

#

It's just complex. And you have to delete it from the set or it'll get stuck if something goes wrong
That can be done with a short async function of course

#

But just storing a timestamp in an object with users ID as key is simpler and no need to remove the cooldown again

wheat mesa
#

Not sure how that’s very complex… but okay

fossil bronze
#
let cooldownObj = {} 
let cooldown = 60 * 1000  

if (cooldownObj[userID]) {
    if (Date.now() < cooldownObj[userID]) return "You're on cooldown" // cooldown
    else cooldownObj[userID] = Date.now() + cooldown
} else cooldownObj[userID] = ( Date.now() + cooldown )
// do stuff
#

Basically this is my favorite

#

It's also pretty plug and play wit hthe database when you add that

fervent moss
#

I'm trying to update message with button while in select menu interaction which can be used x times when the message got updated for first time it was noramlly working but second time it says you can't have two buttons with same I'd cuz it's taking the button from first message into second one plus adding same button so how do i tackle this?
Like i mean i would have to rmeove byttn how do i?

lament rock
#

Not deleting something once you're done with it is kinda dumb

#

keeping the data there provides no benefit

#

NodeJS.Timers are free

lament rock
#

alternatively, if you don't supply a components property in your message update payload, then nothing is deleted/edited

#

TIL, properties that are undefined are not serialized in JSON payloads

fervent moss
#

NVM i solved it in my way

cinder patio
#

js

earnest phoenix
#

Who wannztrade

fossil bronze
lyric mountain
#

it is if most are stored in an array

#

there are ttl map libs out there, you should use it instead

quiet tide
#

Hello

rose warren
#

And so it continues... 👀 At the start of October, 6 out of 10 commands people used on my bot were slash commands. Currently, the projection for the end of October is a 66% adoption rate.

rustic nova
#

speaking of which: does anyone have any statistics between invites from app directory and invites outside app directory (direct, botlists etc)

#

would be interested too see

deft rock
#

Maybe they shouldnt "gambal"

rustic nova
#

true

deft rock
#

Its so stupid in my opinion

#

not that gambling that bots getting declined

#

I can see slots but why a coinflip?

digital swan
#

gambling bots getting removed from discord or just the app directory?

lyric mountain
#

just app

deft rock
#

App directory

#

Because God for bid we teach 13 year Olds to gamble and its the end of the world

fossil bronze
# deft rock App directory

Oh...?`Where do they draw the line for gambling?
Like slots and betflip would obviously be gambling. But what about commands that just give randomized rewards? Like it can give a common or rare item...

#

Like almost all currency bots have some kind of gamble-ish feature

lyric mountain
#

when it resembles actual gambling

#

random rewards isn't gambling at all, just rng-based system

fossil bronze
#

Fair enough, what about "lootbox mechanics" then where you open something and get a couple random things

lyric mountain
#

lootbox is kinda...a gray zone

#

that's why nowadays many games resort to that

#

it's the closer u can get to gambling but still not call it gambling

digital swan
#

i thought lootboxes wouldve been thrown into the randomized reward type of thing

rustic nova
#

nah thats not considered gambling

#

something like blackjack and gamble on dankmemer is for example

rose warren
#

Gimme a sec

rustic nova
#

pog pog

rose warren
#

I'll give you stats from last few days

#

Prepare to laugh

lyric mountain
rose warren
lyric mountain
#

it's really in the line between both worlds

rose warren
#

It's honestly hard to track how effective the app directory is because of the fact you can't use separate invite URLs. The visibility my bot gets from being in ~50k servers and being used by their members, who like it and add it to theirs in-turn after trying it out using the button on the profile, is mixed in with conversions from the app directory. darkShrug

spark flint
#
        .addAttachmentOption(option => option.setName('proof').setDescription('Attach a proof').setRequired(true)),
         ^

TypeError: (intermediate value).setName(...).setDescription(...).addStringOption(...).addStringOption(...).addAttachmentOption is not a function```
#
data: new SlashCommandBuilder()
        .setName('report')
        .setDescription('Report a user!')
        .addStringOption(option => option.setName('username').setDescription('Enter a username').setRequired(true))
        .addStringOption(option => option.setName('reason').setDescription('Enter a reason').setRequired(true))
        .addAttachmentOption(option => option.setName('evidence').setDescription('Attach evidence').setRequired(true)),
#

using Discord.js 14.6.0

#

Its not letting me use addAttachmentOption hmmGe

rustic nova
#

is SlashCommandBuilder even on djs 14.6

#

can only find ApplicationCommandManager on the docs

spark flint
rustic nova
#

then thats probably outdated

spark flint
#

agh ok

#

i'll try that now

rustic nova
charred nest
lyric mountain
#

they categorize themselves? lmao

charred nest
#

yeah

#

automatically

lyric mountain
#

that's literal shit

charred nest
#

you can’t change it either

#

it labeled mine as moderation meanwhile my bot has NO moderation whatsoever

rose warren
#

Nice 👌 i didn't realise that darkAYA

lyric mountain
#

I bet they don't even attempt to identify what a bot is really about

#

they just see the names and that's it

charred nest
rose warren
#

Ooh buzzwords!

charred nest
#

ikr

lyric mountain
# charred nest

"so how does it detect bot's category?"
"it's machine learning"
"based on what data?"
"kubernetes"
"you know you can't simply say techy words and hope us to fall for it right?"
"master repository"

#

yes, it's based in that comic strip

rose warren
#

Well the app directory has been living up to the expectations I had from day one when they announced they were going to be doing it... It's pointless darkAYA

#

I'd rather add my commands that have bad words in them back and just remove it from the directory altogether tbh

lyric mountain
#

I expected nothing, yet they managed to deliver less

charred nest
#

the directory is so ,,, i don’t even know how to describe it

#

the crap they’re doing w currency bots ??

#

ion get it

rose warren
charred nest
#

and somehow bot who shall not be named still filtered through onto their directory uwot_confused

rose warren
#

Is that why Tatsu isn't on it?

charred nest
#

yeah

rose warren
#

What's the issue with currency bots?

lyric mountain
#

gambling

charred nest
#

can’t have any gambling commands

#

like slots, coin flip, etc

rose warren
#

Ah yeah I knew that

#

I didn't know Tatsu had that

charred nest
#

it’s like

#

anything with any sort of “fail and chance” i think

rose warren
#

Yeah where you bet currency beforehand

lyric mountain
#

I knew it'd end up like that, I knew it'd be dumpster fire the moment they announced an "official" bot list

charred nest
#

this is how they auto categorize

#

nothing in any of my details says Moderation

rose warren
quartz kindle
#

mine was categorized as "social"

#

not wrong tbh

lyric mountain
#

lmao

charred nest
#

mines social but is under “moderation”

#

it can’t do ANYTHING to moderate. if someone adds it to moderate they’re screwed LOL

lyric mountain
#

mine would probably fall into moderation

#

it's a trading card game bot

boreal iron
#

Probably gaming I guess

quartz kindle
#

also for some reason the first day i added it it showed 15k guilds

#

when i had 9k

#

but then a few days later it fixed itself

charred nest
#

mine says 13k but last i checked it was 11l

quartz kindle
#

now it shows 9.9k

rose warren
#

Yeah some of the counts were off

charred nest
#

11k*

boreal iron
#

6k unavailable:P

charred nest
#

i’ll have to double check my bot stats tbh

rose warren
#

Mine seem accurate but we'll see later in the week I guess darkAYA

lyric mountain
#

inflate the number of viewers to make some channels look popular

quartz kindle
#

lel

lyric mountain
#

iirc twitch tried to do that too but people noticed

rose warren
#

You can get banned from Top.gg for posting incorrect server count mmLol

quartz kindle
#

i'll have to trust their numbers anyway as i dont monitor my guild count anymore

charred nest
#

wtf counts as addictive

lyric mountain
#

at the end of the day, topgg will end up being the official botlist as always

charred nest
#

^

quartz kindle
#

:^)

charred nest
#

i rely on topgg for discovery and voting

rose warren
#

Aren't all gaming bots addictive even if there's no gambling involved? I have servers who run hunger games day and night and are at over 25k rounds. That sounds pretty addictive to me...

charred nest
#

thats what i mean

quartz kindle
#

they say your ad had 500+ clicks, you check analytics and its like 100 page views

lyric mountain
#

lmao

rose warren
charred nest
#

frfr

#

that brazil meme but instead its TOPGG NUMERO UNOOOOO

quartz kindle
#

never cared about voting lel i dont even know how many votes i have

#

probably like < 10

charred nest
#

im implementing vote rewards (finally)

rose warren
#

Voting has brought me so many servers. Probably like 90% of them tbh

#

Because of the seo boost on Top.gg

quartz kindle
#

voting rewards is like the dumbest thing ever from a UX perspectivr

charred nest
#

the new bots listing shot my bot to 250 and verification needed in the first 6 hours c':

quartz kindle
#

and people still fall for it

rose warren
#

People will do anything for coins

charred nest
#

dem virtual coins

quartz kindle
charred nest
#

ppl will fistfight you for them deadass

rose warren
#

My coins can't even be used or traded. I don't even have a shop kekw

charred nest
#

esp if its a currency bot

rose warren
#

People just collect them

charred nest
#

ppl go mad for them

#

or spend mad money

quartz kindle
#

in terms of growth, this year was the worst year for my bot

rose warren
#

I don't let people buy coins... Yet darkAYA when I do my economy features I'll probably sell coin packs if people want them

quartz kindle
#

like a whole year went by

#

and im still at 9k

charred nest
#

i havent paid attention to growth lately tbh

#

uni eating my time and energy

rose warren
quartz kindle
#

burnout eating mine

#

i cant even concentrate on coding anymore

rose warren
#

I haven't touched my code since February

quartz kindle
#

its like i get adhd when i try to code

charred nest
#

ive been thinkign of applying for bot reviewer since i resigned but

#

shrug

#

i love what im coding rn tbh

#

i couldnt touch it for months but im making a swag feature

rose warren
#

I miss taking the time tbh

#

It felt so good when I did my rewrite

charred nest
#

i wanted to cry when i was doing my rewrite