#development

1 messages Β· Page 1683 of 1

earnest phoenix
#

lol

marble juniper
#

lol

earnest phoenix
#

lol

marble juniper
#

you can't beat me saying lol

umbral zealot
#

guys c'mon.

marble juniper
#

I have the most lol's in the entire server

#

lol

frigid mountain
#
const Discord = require('discord.js')

module.exports = {
    name: 'userinfo',
    run: async (message, args) => { 
    const user = message.mentions.members.first()
    const embed = new Discord.MessageEmbed()
    
    .setTitle("User-info command")
    .setDescription("Information ")
    .setAuthor(`${user.username} $user.displayAvatarURL({dynamic: true})`)
    .setColor("#FF005B")
    .addField("Username:", user.user.username, true)
    .addField("Discriminator:", user.user.discriminator, true)
    .addField("Status:", user.user.presence.status, true)
    .addField("Roles:", user.roles.cache.map(role => role.toString()).join(" ,"), true)
    .addField("Account Created On:", user.user.createdAt.toLocaleDateString("en-us"), true)
    .addField("Joined On:", user.joinedAt.toLocaleDateString("en-us"), true)
    .setTimestamp()
    .setFooter("user info")
    
        message.channel.send(embed)
    }
}

In the .setAuthor section it was suppose to show the users avatar in the top left corner of the embed

earnest phoenix
#

im deploying to vercel so cant use custom serverer

umbral zealot
#
.setAuthor(`${user.username} $user.displayAvatarURL({dynamic: true})`)

That's not how you set the second argument in a method

earnest phoenix
umbral zealot
#

I'd also point out that your user isn't a user, it's a member

#

and members have neither a username or displayAvatarURL

frigid mountain
#

Oh

#

I see

earnest phoenix
#

and your template string is wrong too

marble juniper
#

Like I said before

umbral zealot
#

that too

earnest phoenix
#

... why are you using a template string anyways

marble juniper
#

member objects hava Information related to the server

earnest phoenix
#

you could pass the value straight to the function

marble juniper
#

user objects have data related to thier account and not the server

#

please get that into ur head

earnest phoenix
#

@frigid mountain oh btw ChargeYourPhone

frigid mountain
#

K

toxic sedge
#

Is there a way to make it so there can be multiple owners of the bot? (like in dc dev portal)

earnest phoenix
toxic sedge
#

ok

earnest phoenix
#

and add everyone you want to the team

#

they'll be able to see your bot token and do shit

placid meadow
#

you use environment variables for tokens

#

for safety

earnest phoenix
#

but if you're talking about which people get to use stuff like myawesomeprefixtotallynotexclamationmark!eval in your bot then you do that in your bot code

earnest phoenix
placid meadow
#

is it?

earnest phoenix
#

yep

umbral zealot
#

yes

placid meadow
#

we got pressed to use variables

#

like this

earnest phoenix
#

haha im qwik

placid meadow
#
        Console.Title = "Social Bot"
        Call New Client().Run(Environment.GetEnvironmentVariable("BTOKEN")).GetAwaiter().GetResult()
    End Sub```
umbral zealot
#

Your'e confusing code with discord dev portal features

#

we're not talking about code

placid meadow
#

oh my bad

earnest phoenix
placid meadow
#

i really thought so

earnest phoenix
#

imma go watch yt

umbral zealot
#

we're talkinga bout the fact that in a team on the dev portal, everyone on the team can see the bot's information including the token, as well as the "client secret", like, everything. just like admins.

earnest phoenix
#

btw i have my birthday on 5 april

sudden geyser
#

happy early birthday

placid meadow
#

happy bday already then

toxic sedge
#

I was asking bc I accidentally made the bot owner my alt

placid meadow
#

my dbay was last week πŸ˜›

#

but i dont think my age will by anywhere near yours ... πŸ˜›

#

i could be your dad, pretty much i rekon

cinder patio
#

makes sense

#

your main lang is vb

placid meadow
#

haha sup feud πŸ˜‰

#

no hello? :< aww

cinder patio
#

hi

placid meadow
#

πŸ‘

#

busy day

#

trying to fix a chart code, compensation for long nicknames in there, i cant do anything about it i believe

cinder patio
#

sounds annoying

placid meadow
#

@cinder patio if you look at this particular chart u can see it

#

some names are clipped, some are that long the gen just skips it

#

if i compensate for name length, then a chart can behave unwanted

#

so i think i leave at that

cinder patio
#

Names are also kinda hard to read

placid meadow
#

u rekon i need to increase dimension ?

#

no biggie we can do that

cinder patio
#

yeah maybe use a different font too

placid meadow
#

yeah im bound to what the unix fonts offers, i tired messing with it, dotnet on linux platforms

cinder patio
#

and increase the font size

placid meadow
#

tried*

#

also, when a discord client has his own window small then the client itself crops the image

#

so thats something i cant change

terse finch
#

using discord.py is there a way to get a list of members whose message count is 0?

#

i could, but is there a way like if i was a real person i could just search each member and see their messages in all channels. if i dont see any then i could write that user down.
Is there anyway to perform a similar action with discord.py?

placid meadow
#

@cinder patio how about this format (dont mind the debugging fields)

cinder patio
#

looks almost the same to me

sour flame
#

``js

placid meadow
#

the fields are increased, fonts havnt been changed

sour flame
#
    main_server = client.get_guild(826853914803568700)
    coder_role = main_server.get_role(826853914803568709)
``` This isn't working why is that
umbral zealot
#

is that JS or python

sour flame
#

python

slender thistle
#

God knows why

umbral zealot
#

πŸ‘Œ

slender thistle
#

So

#

Is there any error you're getting?

umbral zealot
#

I don't know about python but JS can't handle such large numbers so IDs have to be strings.

slender thistle
#

and he dipped

placid meadow
#

@umbral zealot they dont have Uint64 ??

sour flame
#

.... no error but debug mode is off

slender thistle
#

Brooooooo

#

That's Flask debug mode

#

:D

#

are you okayy

umbral zealot
slender thistle
#

bigint?

umbral zealot
#

it's new in nodejs but only in like version 15

unreal estuary
umbral zealot
#

and not core, you have to call them

#

either way it's simpler as a string.

placid meadow
#

hmm

slender thistle
pale vessel
#

bigint seems simple too

unreal estuary
#

wha

placid meadow
#

bigint = int64

sour flame
#

in my dreams I am

slender thistle
quartz kindle
#

bigint is not int64

#

not in js at least

#

and its been a thing since node 10

earnest phoenix
#

i have do this : database.query(`INSERT INTO guilds (guild_id) VALUES ('${message.guild.id}')`) return message.channel.send("ok, id rentrΓ©.");

but the error is: No database selected

#

why?

#

and the guilds database exists!

umbral zealot
#

I'm guessing because you didn't select a database

#

how are you defining the database variable

#

And what database and db module are you using

earnest phoenix
#

i use mysql2 package

And i exports database to :


let database = mysql.createConnection({
  host: login.host,
  user: login.user,
  password: login.password
});
console.log("Successfully connected to MYSQL!")```
umbral zealot
#

I don't see you selecting a database.

earnest phoenix
#

yes because i would to create multiples databases

umbral zealot
#

Ok but you need to select one, clearly.

#

Are you sure you don't just want to create multiple tables in a single database?

earnest phoenix
#

everytime?

umbral zealot
#

Because that's usually what people do

earnest phoenix
#

uh no

#

wait

umbral zealot
#

I have never seen an implementation of mysql where someone used more than one database.

#

people use multiple tables, not databases.

#

So you need to add that database: 'something' line in the connection

earnest phoenix
#

In fact my bot it will have several systems, and for each system, I want to store it in a different database than that of the other systems

umbral zealot
#

Use different tables, not different databases

earnest phoenix
#

Ok

summer yoke
#

ok i have 2 bugs πŸ™‚

summer yoke
#

OK CAN SOMEONE HELP

earnest phoenix
#

With what

umbral zealot
#

We can't help unless you actually ask a question

summer yoke
#

I WANT TO REPORT BUGS

umbral zealot
#

Ok what sort of bug do you want to repoirt

#

also there's no need to scream. we can hear you fine.

sour flame
#
    #reset cooldown for person with coder role
    server_id = 826853914803568700
    bot_id = 826853914803568709
    main_server = client.get_guild(server_id)
    coder_role = main_server.get_role(bot_id)
    if ctx.author in coder_role.members():
        bag.reset_cooldown(ctx)
    print(coder_role)
    print(main_server)
``` Help meh with this
zenith terrace
#

I didnt know we can hear text

summer yoke
#

every time i delete the bot website
the website still there

umbral zealot
#

yeah ok so what were you told to do about that, specifically?

umbral zealot
#

You were literally on the page to report that

#

you need to create a github account, then go to Issues, then create a new issue

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

scenic kelp
#

how doesn't it work @sage bobcat

placid meadow
#

what is he trying to do ??

solemn quartz
#

Guys where can i find a documentation about coding webhooks?

placid meadow
#

u tried google ?

solemn quartz
#

._.

summer yoke
#

is there anyone knows how to delete the other owner from my bot

solemn quartz
#

actually not lol

placid meadow
#

@summer yoke u wot mate ??

zenith terrace
#

you currently cant

summer yoke
sage bobcat
placid meadow
#

if you would tell us what your trying to do, i might be able to help ya lad

#

dunnow who it was ...

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

pale vessel
#

where

earnest phoenix
#

Where

pale vessel
#

lol

placid meadow
#

im confused af

#

whos asking help now ?

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

yes

#

well ...i know dotnet

pale vessel
placid meadow
#

so...still yes

#

go dm with me lad

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

thatds easy

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

placid meadow
#

ever heard of String.format() feature ?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

placid meadow
#

you can nicely put variables inline, without the +'s

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

personally i dont like the sight of + concats

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

go dm with me

#

ill teach lad ^^

quartz kindle
#

do you use glasses?

#

if you need glasses you cant use c#

slender thistle
#

Faith

placid meadow
#

why would be rude ?

slender thistle
#

something + X

quartz kindle
#

only people who see sharp can use c#

#

duh

slender thistle
#

orrrrrrr

#

KEWWWW

earnest phoenix
#

That's literally what I said

#

Can faith not see that I'm confused

placid meadow
#

thats true, Voltrex did show that

#

but he doesnt see it

pale vessel
#

String interpolation gang

placid meadow
#

-.-

quartz kindle
#

string interpol gonna arrest you

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

placid meadow
#

i always use string.format() , looks nicier

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

I have a problem
Repl murdered my nextjs process because it used too much memory

Halp

placid meadow
#

oh dear

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

a murder X_X

quartz kindle
placid meadow
#

it does

#

the + is considered a concat if either side is string

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

Why not use it then

pale vessel
#

Faith you need glasses

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

You didn't use it

quartz kindle
#

you didnt use it in your code

placid meadow
#

if both sides are numbers, then it becomes an operator

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

@_@

earnest phoenix
#

.-.

#

KEKW bruh

placid meadow
#

??

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

ancient gulch
#

Hello, so, im trying to do a backup system on Discord, with NodeJS, and my problem is, when i save the collection with all roles, when i modify a role on the server it also change the collection, that's weird. There is my code.


// My index

const { Collection, Client } = require('discord.js');
const client = new Client();

client.backup = new Collection();




// My command to set the collection

client.backup.set(message.guild.id, Array.from(message.guild.roles.cache.values()));




// My command to get the collection

const backup = client.backup.get(message.guild.id)

console.log(backup)

Okay so everything work fine, my command return the collection, but.. When i modify a role and i'm making again the command "to get" the collection and not to "set" it update the collection, and i don't know why.

Everytime i make

client.backup.get(message.guild.id)

The collection update if i have modified something on the server, and i don't want that.

placid meadow
#

@earnest phoenix i once wrote an extension that almost burned a hole in my cpu πŸ˜›

#
    <Extension>
    Public Function Permutate(Of T)(Source As IEnumerable(Of T), Length As Integer) As IEnumerable(Of T())
        Dim Result As New List(Of T())
        If (Length = 0) Then
            Result.Add(New T(-1) {})
        Else
            Dim index As Integer = 1
            For Each item As T In Source
                Result.AddRange(Source.Skip(index).Permutate(Length - 1).Select(Function(value() As T) (New T() {item}).Concat(value).ToArray()))
                index += 1
            Next
        End If
        Return Result
    End Function
earnest phoenix
#

Congratulations, you almost became YanDev

quartz kindle
placid meadow
#

lol

#

whos yandev? πŸ˜›

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Yandere Dev

placid meadow
#

O_o

earnest phoenix
#

Worst programmer in existence

placid meadow
#

tss...

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

voltrex so rude -.-

quartz kindle
#

because there is nothing that actually outputs the code there

#

is there?

earnest phoenix
#

Nah, you're not bad

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Was just saying for jokes

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

@placid meadow what language is that

placid meadow
#

i know ^^

slender thistle
#

tsk tsk tsk Fiath

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

fiath

placid meadow
sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

fuckinf

slender thistle
#

FIath

pale vessel
#

Fath

sage bobcat
#

One message removed from a suspended account.

slender thistle
#

FItha

#

fucj

earnest phoenix
#

Faith needs glasses

#

cough

#

To C#

quartz kindle
#

she cant see sharp

earnest phoenix
ancient gulch
#

Everything should work fine, i don't know why it's not working

earnest phoenix
#

show thy command code

placid meadow
#

any c# devs (average) in here? πŸ˜„

#

or vb ofc

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
sage bobcat
#

One message removed from a suspended account.

pale vessel
#

F# mmlul

sage bobcat
#

One message removed from a suspended account.

placid meadow
#

ur fucking?

#

well damn son

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Who's fucking

pale vessel
#

who FLOOSH

quartz kindle
#

you ar fucking you ar fucking

#

no you fucking fucking you

placid meadow
#

lol

sage bobcat
#

One message removed from a suspended account.

ancient gulch
#

If i use Object.freeze(array) it should fix the problem?

earnest phoenix
#

mmLol Freezing an array?

placid meadow
#

u can implement a loop for this

quartz kindle
#

there is no deep cloning in js

#

the only way to deep clone an object is to serialize it

#

or to transverse it and copy every primitive

earnest phoenix
#

Object.hippityhoppityyourstuffisnowmyproperty(object);

#

Can't you just

JSON.parse(JSON.stringify(object))```
quartz kindle
#

yes

ancient gulch
#

okay ty for helping

quartz kindle
#

but that will break the structure of collections most likely

pale vessel
#

not for classes

placid meadow
#

@ancient gulch srry wrong reply

#

my bad

earnest phoenix
#

hmm

quartz kindle
#

the best way is to transverse it and copy the properties

placid meadow
#

@quartz kindle can js use the google's version of serialization ?

quartz kindle
#

which one?

placid meadow
#

its fast and small

quartz kindle
#

protocol buffer?

placid meadow
#

proto-buf

#

yeah

quartz kindle
#

there are many js implementations

earnest phoenix
#

Most popular one is the v8

placid meadow
#

i use it for my own, 200~users 175kb ...

#

thats gud

quartz kindle
#

but it needs schemas right?

scenic kelp
placid meadow
#

you need lay down attributes on the fields yeah

scenic kelp
#

$"Something {x}"

quartz kindle
#

yeah so it only works if you know the structure of the object beforehand

placid meadow
#

vb.net doesnt have that i believe? i might be wrong

scenic kelp
#

yeah no it doesn't

#

that's a c# feature

earnest phoenix
scenic kelp
#

visual basic .net

earnest phoenix
quartz kindle
placid meadow
#

there is one features c# doesnt have Like operator, its basically a poor man's regex pattern operator

quartz kindle
#

damn it

earnest phoenix
scenic kelp
#

vb.net has a lot of downsides in my opinion lmfao

earnest phoenix
#

VB stinks

placid meadow
#

well its my choice

scenic kelp
#

Or and And are full evaluation and OrElse and AndAlso are the short circuit ones

placid meadow
#

πŸ˜„

earnest phoenix
#

tim.veeb

#

wtf

scenic kelp
#

oh lmao the Like operator isn't supported in .NET core anyways

#

looks interesting though

placid meadow
#

its funny that you give vb a hard time, but c# and vb end up in the same compiled manner, so in the end. it does the same deal

#

after all a language is a personal choice

scenic kelp
#

yeah ik

#

i'm not shitting on it

#

i'm just saying i'm not really a huge fan at all

placid meadow
#

thats alright πŸ˜‰

#

ive been coding for at least 10 years in my spare time

#

i know my way around

scenic kelp
#

at the end of the day the best tool for the job is whatever works best for you

placid meadow
#

i coded from neural network recognition apps to games

#

so i didnt feel limited one bit

earnest phoenix
pale vessel
#

Who cares

placid meadow
#

nice attitude πŸ˜‰

pale vessel
#

Even cry is a better developer than you and he's a white name lol

placid meadow
#

why are u rude flaz?

scenic kelp
pale vessel
#

Hmm?

#

Talking to code

placid meadow
#

i see

pale vessel
#

i wonder if he knows vb though

placid meadow
#

who does?

pale vessel
#

cry

#

He knows cs really well

placid meadow
#

i believe strongly if know one language, its not hard to adapt another one

scenic kelp
#

to some extent CS translates directly to VB from my experience

earnest phoenix
#

snippet from my jsx:

import {
  // every single component in the world
} from "@chakra-ui/react";

export default function HomePage() {
  // a whole lot of nested Boxes
  // and by lot i mean a LOT
}
scenic kelp
#

I had to use VB for my comp sci class in school this year

scenic kelp
#

if you know CS you'll pick up the basics super quick considering they both run on the same runtime

pale vessel
#

what about f#?

#

I've heard about it

scenic kelp
#

okay maybe that run on the same runtime thing isn't valid

placid meadow
#

ive heard a lot about Rust, being ultra fast

scenic kelp
#

they're both similar paradigms and run on the same runtime

#

F# is functional-first

#

i kinda wanna learn F# but i don't really have any uses for it

solemn quartz
#

guys how do i find a certain guild that the bot is in?

#

dont mind my grammar

earnest phoenix
#

What lib are you using

solemn quartz
#

discord.js

earnest phoenix
#

i need to fix my bot

#

theres an error

#

in trying to put keep alive in it

#

but theres an error while starting the bot up

umbral zealot
#

What errors?

earnest phoenix
#

hold on

earnest phoenix
#
client.guilds
.cache.get(id) // get the guild from cache
.fetch(id) // if it aint in cache
#

did this

#

this is the error

earnest phoenix
#

yes

earnest phoenix
earnest phoenix
solemn quartz
#

i can help you

earnest phoenix
solemn quartz
#

i did it only some days ago

earnest phoenix
#

jk

#

this is the error keepalive

#

that shit is useless

#

use a vps

#

keepalive error string value

#

or uptimerobot

#

can i have a link

#

for the keep alive bot

#

enter your repl url

#

ok

#

theyll ping the repl every 5 minutes

solemn quartz
earnest phoenix
#

or buy hacker plan and get forever on

pale vessel
#

is the code thing still valid

#

the redeem techwithtim thing

#

free hacker plan

sage bobcat
#

One message removed from a suspended account.

grim sinew
#

Is there any Discord bot libraries available for C++?

zenith terrace
grim sinew
#

Nice

#

I might try to use one later

placid meadow
#

holy shit..repl.it has qbasic support?

#

thats almost as old as i am

#

πŸ˜‚

grim sinew
#

What is qbasic?

placid meadow
#

exactly

grim sinew
#

lol

placid meadow
#

QBasic is an integrated development environment (IDE) and interpreter for a variety of dialects of BASIC which are based on QuickBASIC. Code entered into the IDE is compiled to an intermediate representation (IR), and this IR is immediately interpreted on demand within the IDE.Like QuickBASIC, but unlike earlier versions of Microsoft BASIC, QBas...

solemn quartz
#

replacing guildID and channelID with the actual IDs

placid meadow
#

@grim sinew First appeared 1991; 30 years ago

grim sinew
#

LOL

placid meadow
#

im from '83 myself

#

lol

#

i started out with dos, windows 3.11

#

good times

earnest phoenix
#

Ms-dos?

placid meadow
#

no dos

earnest phoenix
#

Wtf that's old

near stratus
placid meadow
#

dos was a separate app

#

or command line CLI

zenith terrace
quartz kindle
#

didnt windows start as an app for dos?

#

or rather ms-dos

placid meadow
#

yes

#

sort of, u had isolated versions

#

dos had a long history already

quartz kindle
#

ye

placid meadow
#

dos was the background, then windows 1.0 2. 3.11

quartz kindle
#

they bought it from some dude i believe

placid meadow
#

was a wild time for IT i tell ya, no security , patches, it free4all i tell ya

#

was+

#

i was there when the first trojan horse came out, men ... it was chaos

quartz kindle
#

awesome xD

near stratus
#

Umm weird timing but
What firewall should I use for my VPS ?

placid meadow
#

is it linux ?

near stratus
#

yea

#

Ubuntu server

placid meadow
#

iptables is core (traffic flow control)

#

then u can apply an interface ontop of it, ufw

#

i personally like working with iptables

#

i can help you out if u want

#

ive been doing this for years

near stratus
#

oh I thought about Shorewall. I'll check docs of iptables now.

#

thanks

placid meadow
#

well iptables is the kernel module for the tcp/ip

near stratus
#

ooh

placid meadow
#

its like naked router, with no 'chains' that instruct what to do with packets

#

shorewall/ufw are merely a user-friendly way to control it

near stratus
#

yea

placid meadow
#

this is how i configured mine (simple)

south bay
#

hello my bot have too much ping how can i do it lower?

quartz kindle
#

get a better host

near stratus
placid meadow
#

@near stratus not so long ago someone send down a SYN attack, that was brutal, 1~2gb/hour traffic

near stratus
#

AWS has around 30 ping and 95-170 ws
you can host there
If you're bon VPS get from a better company

south bay
#

oh ok tysm!

near stratus
#

but still enough to put 4-8 gig VPS to sleep

placid meadow
#

you get a private ipv4

#

and 12 months plan that protects me on demand

near stratus
#

DDoS is always a pain

placid meadow
#

i know -.- altho this was not ddos, but SYN

near stratus
placid meadow
#

almost 100 euro's lil less

#

lemme find the bill

pale vessel
#

isn't SYN still a form of DoS?

near stratus
placid meadow
#

yeah but there is a difference tho

#

ddos does not use middle-men for attacks

#

syn has a receiving party and the RST packets get to the victim

#

i recorded the attack

#

they analyzed the pcap data

#

some of those sources was OHV Sas

#

i hate them

quartz kindle
#

thats some cool visuals

near stratus
placid meadow
#

etherape visualizes your network traffic

quartz kindle
#

perhaps i could use some pointers for vps protection, currently only using fail2ban

#

should i use anything else?

placid meadow
#

fail2ban works, but also has alot of maintance

#

flase positives

#

false*

quartz kindle
#

i had an issue with ssh flodding that sent me offline for 5 min

placid meadow
#

one rule of thumb with ssh deamons, never use 22

quartz kindle
#

after that i put ssh in strict mode or whatever

placid meadow
#

too obvious

#

use a higher port, like 14000

#

or higher

#

coz most scanners/probes dont even bother with large scans

quartz kindle
#

i didnt want to change ports because i was afraid of accidentally locking myself out

#

btw the attack i suffered was a port scanner

placid meadow
#

oh ssh aint hard, also when u change, ur existing ssh link wont perish

quartz kindle
#

not on port 22

#

and even wierder, it came from within the vps network

placid meadow
#

not the same can be said on iptables tho, an mistake on this can be ...very annoying

quartz kindle
#

been there done that

#

never messing with iptables again if i can help it

#

lmao

placid meadow
#

rly ? so obviously local clients where scanning other clients on the same machine ?

quartz kindle
#

possibly

#

i informed the hosting staff

#

they said they would look into it

placid meadow
#

yeah, thats not good

quartz kindle
#

but never returned me

placid meadow
#

seems to me they know about it

#

but dont wanna deal with it

quartz kindle
#

possibly lul

placid meadow
#

a good vps is key , dont go cheap on them if you value your work

#

ive had many devs have their source stolen on cheap vps (test) servers

#

just like that, such a nasty thing to do

#

one even got blackmailed, they threatened him to dox

#

bah

#

thats why i host my own server

#

anyway

#

you want help

#

ask away

dusky lagoon
#

UwU

quartz kindle
#

jesus

dusky lagoon
quartz kindle
#

i went cheap on my vps but i havent had any issues like that

dusky lagoon
#

No because it doesnt matter

placid meadow
#

@dusky lagoon well this is from actual experience, so u tell me πŸ˜‰

crystal wigeon
#

how do i get all members have a particular role?

#

message.guild.roles.cache.get(roleId)?

placid meadow
#

experience < or something that should be .... where do you draw the line

crystal wigeon
#

this returned an empty array for some reason, but there are members with that role

dusky lagoon
placid meadow
#

wow ...hostile audience ..

dusky lagoon
#

like its wrong to inform people about having a cheap vps is bad

#

because it legit doesnt matter

placid meadow
#

why would i act smart, i merely share my experience ?

dusky lagoon
#

just dont inform people with bad information

placid meadow
#

im almost 40, you really think i would bothered by "doing smart" ?

dusky lagoon
#

thats all im saying

placid meadow
#

i dont understand the hostility ...

near stratus
crystal wigeon
#

ah

#

the intent on the console?

dusky lagoon
placid meadow
#

why are you so angry lad? did i do something wrong?

quartz pier
#

Does anyone have a vote reward code that I can borrow

dusky lagoon
#

what do you mean??

placid meadow
#

well seems to me you have a disagree with me, and thats alright. but no need to treat me rude

quartz pier
#

Like code for a bot that when you vote for it you get a bot reward

dusky lagoon
placid meadow
#

hmm

crystal wigeon
#

on the dev console

#

and create an express server

#

to listen to the route

quartz pier
#

Ok thanks

crystal wigeon
#

there's an sdk

#

you need to use

near stratus
placid meadow
#

@quartz kindle if u still need help with your ubuntu, dm me anytime

quartz kindle
#

thanks :)

slender thistle
#

To an extent

#

Sometimes

placid meadow
#

hmm thats shame, its toxic

slender thistle
#

Shrug, you can always teach us kids XGWkekwlaugh

placid meadow
#

i dont consider you kids unless you want to be πŸ˜›

slender thistle
#

Aww

placid meadow
#

i consider you young developers, with ambition

near stratus
# quartz pier Does anyone have a vote reward code that I can borrow
const express = require('express')
const Topgg = require('@top-gg/sdk')
const bodyParser = require('body-parser');

const app = express();
const db = new Database()

var jsonParser = bodyParser.json();
const webhook = new Topgg.Webhook(TOPGG_AUTH_TOKEN);

app.get('/', (req, res) => {
    res.send("OKAY");
})
app.all('/dblwebhook', webhook.middleware(), (req, res) => {
        console.log(`${req.vote.user} has voted`);
    });
});
app.listen(3000);

You can use this to fetch vote
Then give rewards

placid meadow
#

i want to stimulate that as much as possible

balmy root
#

i can sleep once i get dm telling my bot was approved till then i will stay awake no matter wat

slender thistle
#

That's the nicest thing I've heard in my entire day

near stratus
#

^Β°^

balmy root
#

first time 8 days ago

#

first time it was deliced due to offline

umbral zealot
#

Spoiler alert: it wasn't.

near stratus
near stratus
umbral zealot
#

first decline:

balmy root
#

oh to bad

near stratus
#

lol spam

balmy root
#

i say it was offline

umbral zealot
#

I say you're wrong.

#

Even if it was offline that's not the reason it was denied

near stratus
balmy root
#

i havnt yet

drifting wedge
#
    @Cog.listener()
    async def on_guild_remove(self, guild):
        guild_data = self.gcollection.find_one({"_id":guild.id})
        for i in guild_data:
            i["in_guild"] = False
            i["delete_timer"] = time() + 259200

            self.gcollection.insert_one(i)```

```    i["in_guild"] = False
TypeError: 'str' object does not support item assignment``` any ideas? pymongo / py
balmy root
#

python = idl

toxic sedge
#

i hate python

#

NodeJS is more like it

balmy root
umbral zealot
#

Yo nobody cares, let people help, aight? Don't need the random chatter here.

balmy root
thin echo
#

there is the python server

drifting wedge
#

okay and

#

there is also the nobody asked server so why dont you go talk there?

balmy root
balmy root
near stratus
toxic sedge
#

no, I just think that node.js is more efficient.

near stratus
balmy root
balmy root
toxic sedge
placid meadow
#

python is also interpreted right?

toxic sedge
#

C + + is god

balmy root
toxic sedge
#

node.js should almost never be slower than python

balmy root
near stratus
#

Rust, C and C++ is fast but takes your whole brain to code
You can code python or js with 2 neurons

old cliff
#

Also dont start a language war here

toxic sedge
#

lol

placid meadow
#

what juguar said πŸ˜›

#

@near stratus what about Brainfuck (actual language)

#

hehe

balmy root
near stratus
#

Javascript is written in C++
Python is in C
there isn't much difference

balmy root
old cliff
#

No

balmy root
#

yes

toxic sedge
placid meadow
#

wow ...

near stratus
umbral zealot
#

One person: "please help with python"

  • 10 different people "omg node" "omg python" "omg python > node" "omg node > python"
    Why can't people just stop chattering MarioFP
balmy root
#

bc u can run java in javascript if u are big brain

placid meadow
#

@near stratus it certainly is one of a kind

near stratus
#

@balmy root N O

old cliff
balmy root
umbral zealot
#

omg branfuck > node

slender thistle
old cliff
#

If you add a suffix to a thing it always doesn't remain the same

balmy root
placid meadow
#

that code is eq to "Hello, World!" πŸ˜‰

slender thistle
#

See where my drunk ass is getting at?

solemn quartz
#

I need help, (this is a private bot)
i'm trying to delete the user's message if it sends a link,
to send a message saying that links are not allowed,
to delete this message after a certain amount of time and
send an embed in a certain channel.

this is my code:

if (message.content.toLowerCase().startsWith("https://")) {
const server = client.guilds.cache.get(ID)
const modLogsChannel = server.channels.cache.find((channel) => channel.id == "ID")
  const noLinkMsg = await message.channel.send('Links are not allowed in this server!')
  const noLinkModLog = new Discord.MessageEmbed()
  .setTitle('Automod Log: links')
  .setDescription(message.author.username + message.author.discriminator + "sent a link in <#" + message.channel.id + ">")
  modLogsChannel.send(noLinkModLog)
setTimeout(async () => {await noLinkMsg.delete(), 3000})
}

Obviously editing "ID" with the real id

This is the error:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channels' of undefined

placid meadow
#

BGSuper, why not use regex to match urls ?

solemn quartz
#

wdym?

solemn quartz
placid meadow
#

regex can fish out several types of urls , http /https/ftp etc

near stratus
solemn quartz
placid meadow
#

oh sure hold on

solemn quartz
placid meadow
#

BG, and btw if you do go with regex i got a perfect pattern for urls'

#

((http|ftp|wss|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)

near stratus
placid meadow
#

no its not πŸ˜›

balmy root
#

things online
How to do hello world in javascript

function myFunction() {
  var str = 'Hello'
  var str = `${str} World!`
  console.log(`${str}`)
}
myFunction()

Me

var _0x12a7=['577670bUKFod','4801JLkJGl','201RCaCME','2HZjcOx','505098uZTUCM','1113058SemumX','2236FtPMHG','2738861PnqTQW','1107416aCUGdZ','264GwbPND'];var _0x3fff=function(_0x163542,_0xcbbdc2){_0x163542=_0x163542-0xc8;var _0x12a708=_0x12a7[_0x163542];return _0x12a708;};(function(_0x29c7c7,_0x29ebc5){var _0x51de63=_0x3fff;while(!![]){try{var _0x5b4227=parseInt(_0x51de63(0xc8))*parseInt(_0x51de63(0xca))+-parseInt(_0x51de63(0xc9))*-parseInt(_0x51de63(0xcc))+-parseInt(_0x51de63(0xd1))+parseInt(_0x51de63(0xcf))*parseInt(_0x51de63(0xcb))+parseInt(_0x51de63(0xcd))+parseInt(_0x51de63(0xce))+-parseInt(_0x51de63(0xd0));if(_0x5b4227===_0x29ebc5)break;else _0x29c7c7['push'](_0x29c7c7['shift']());}catch(_0x41be27){_0x29c7c7['push'](_0x29c7c7['shift']());}}}(_0x12a7,0x9d417));function hi(){console['log']('Hello\x20World!');}hi();
slender thistle
#

In the beginning

#

After a bit of playing around with it you just get used to it

placid meadow
#

oh thats dutch

#

hold on

#

my bad

earnest phoenix
#

if(database.query(`SELECT captcha FROM '${message.guild.id}' WHERE status = 'on'`)) return message.channel.send(emojis.no + " **Your server is already setup!**");

I have a syntax error but where

balmy root
#

ooof

placid meadow
#

let me see Vinx

umbral zealot
#
`SELECT captcha FROM '${message.guild.id}' WHERE status = 'on'`

That... doesn't look right. you're not really using the guild ID as a table name are you???

balmy root
#
try {
//code remove bot.error
} catch(err)
console.error(err)
}
solemn quartz
#

the error is the same
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channels' of undefined

placid meadow
#

@umbral zealot does the status field also need quote's ?

umbral zealot
#

yes

placid meadow
#

alright

umbral zealot
#

well the value does

placid meadow
#

oh...

umbral zealot
#

not the field name

umbral zealot
#

omg stop posting that

#

nobody cares

toxic sedge
umbral zealot
#

@balmy root dude why don't you just go watch netflix holy shit.

placid meadow
# solemn quartz thanks

use this pattern to match any url (properly formed) ((http|ftp|wss|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)

placid meadow
#

i use it too

near stratus
umbral zealot
#

yeah so please go be bored somewhere else MarioFP

balmy root
near stratus
balmy root
#

no

toxic sedge
#

yes

placid meadow
#

or stay quiet? πŸ˜›

near stratus
balmy root
#

:/

onyx karma
#

cringe

umbral zealot
#

yeah that's wrong

#

it should be something like captcha for the table name, and code for the column, maybe?

#

feels like you're just doing databases wrong

balmy root
#

i say online till me bot gets looked at i need to

umbral zealot
#

starting with using mysql

earnest phoenix
#

ok

balmy root
#

also

earnest phoenix
#

thx

balmy root
#

me needs help

onyx karma
#

You don't need to.

#

You don't need help

balmy root
#

my bot needs 2fa discord.js

#

done been there

near stratus
umbral zealot
#

it means you need 2fa

#

if you have 2fa your bot "inherits" it.

balmy root
#

:/

near stratus
balmy root
#

uh how do i get 2fa without a phone

solemn quartz
umbral zealot
#

you can use google auth

solemn quartz
#

still doesnt work

near stratus
balmy root
#

where

#

when

earnest phoenix
#

SELECT guild_id FROM captcha WHERE status = 'on'
@umbral zealot ?

umbral zealot
#

could be

#

but it depends on how your table is actually built

#

you ca'nt just, like, mash away at the keyboard randomly here

#

your DB needs to be actually setup

#

you need to create the table with the proper fields.

balmy root
#

i cant install

umbral zealot
#

man you really need to stop trying to do all this shit without a computer.

#

And no a chromebook isn't a "computer"

balmy root
#

ik

umbral zealot
#

you need your own devices and stop using the school's. this is ridiculous

balmy root
#

i been doing this for 3 years leave me alone unless u want to buy me a pc

umbral zealot
earnest phoenix
umbral zealot
#

I... can't even begin to start with answering that

earnest phoenix
#

ok

umbral zealot
#

feels like you just need to go through a tutorial on databases at this point.

earnest phoenix
#

yes

#

thx u for ur help

placid meadow
#

one should make a bot that archives useful tutorials and one could do !tutorial <subject> and it spits out a dozen or so links that a user can follow up

placid meadow
#

that would great help with the support team πŸ˜›

umbral zealot
#

yeah I have a bot exactly like htat

#

but we can't have it here

placid meadow
#

rly?

umbral zealot
#

so... πŸ–•

placid meadow
#

shame

balmy root
#
var fs = require('fs')
    var cmds = fs.readFileSync('data/list.json', 'utf8')
    var cmds = JSON.parse(cmds);
    
    var i, len, text, embed;
  

    
    for (i = 0, len = cmds.length, text = "\`\`\`ini\n[Help Commands]\n\`\`\`\n"; i < len; i++) {
       var des = client.commands.get(cmds[i]).description
       var uge = client.commands.get(cmds[i]).usage
       text += `**${cmds[i]}**: \`${des}\` ${uge} \n`
    }

    /*var embed = new Discord.MessageEmbed()
        .setColor('#0099ff')
          .addField(text, 'e')*/
    client.users.cache.get(`${msg.author.id}`).send(text)
    msg.channel.send('Check ur dm\'s')
     } catch (err) {
      console.error(err)
     }
placid meadow
#

it would be a perfect for her

#

+e

solemn quartz
#

@placid meadow so.. that documentation is pretty big isn't it? i think i will read it in 2-3 days.

placid meadow
#

haha, true BG

#

if u never played with regex, its a bit steep learning curve

placid meadow
#

?

balmy root
#
module.exports = {
  name: "help",
  description: "Help page about the commands",
  usage: 'v.help',
    execute(msg, args, client, Discord, prefix) { 
    //client.users.cache.get(`${msg.author.id}`).send(msgEmbed)
        try {
      //code

    var fs = require('fs')
    var cmds = fs.readFileSync('data/list.json', 'utf8')
    var cmds = JSON.parse(cmds);
    
    var i, len, text, embed;
  

    
    for (i = 0, len = cmds.length, text = "\`\`\`ini\n[Help Commands]\n\`\`\`\n"; i < len; i++) {
       var des = client.commands.get(cmds[i]).description
       var uge = client.commands.get(cmds[i]).usage
       text += `**${cmds[i]}**: \`${des}\` ${uge} \n`
    }

    /*var embed = new Discord.MessageEmbed()
        .setColor('#0099ff')
          .addField(text, 'e')*/
    client.users.cache.get(`${msg.author.id}`).send(text)
    msg.channel.send('Check ur dm\'s')
     } catch (err) {
      console.error(err)
     }



    
  }
  
};
umbral zealot
#

ignore this kid they're literally just sleep deprived and can't stop chatting

balmy root
#

me help command is auto

placid meadow
#

grabs sedation rifle with a shot of valium come here Ashley πŸ˜„

solemn quartz
#

documentations just aren't for me i think, i always understand things with videos/tutorials, or images with something already coded

placid meadow
balmy root
#

i have something

dusky sundial
balmy root
solemn quartz
#

im a good boi i swear

balmy root
umbral zealot
#

Admitedly, it's actually constructive to look at examples sometimes

#

at least to get started

#

then you can read the docs for other details.

dusky sundial
#

There's nothing wrong with video tutorials, but people tend to just blindly copy whatever they do on the video and learn nothing

balmy root
#

how can i get the bot count ?

module.exports = {
    name: 'server',
    description: 'Information about the server.',
  usage: 'v.server',
    async execute(msg, args, client, Discord, prefix) {
        try {
      //code
await msg.channel.send(`Server name: ${msg.guild.name}\nTotal members: ${msg.guild.memberCount}\nYour username: ${msg.author.username}`);
    await msg.delete({timeout: 20000});
     } catch (err) {
      console.error(err)
     }





        
    },
};
placid meadow
#

regex in a nutshell

umbral zealot
#

Often enough they're just full of outdated code

umbral zealot
placid meadow
umbral zealot
#

and discord won't give you the intents just so you can say "There's 3 bots!"

umbral zealot
#

But you won't get it.

solemn quartz
umbral zealot
#

it's not compelling enough as a feature.

balmy root
umbral zealot
#

who's mo

#

and what should I tell them

balmy root
#

i am a girl that wont go to sleep till my bot is review mo can do anything

solemn quartz
balmy root
#

i log every message from discords servers that my bot is in i think my ram can handle it

#

hehe random port go brrr

var n1 = Math.floor(Math.random() * 9) + 1; 
var n2 = Math.floor(Math.random() * 9) + 1; 
var n3 = Math.floor(Math.random() * 9) + 1; 
var n4 = Math.floor(Math.random() * 9) + 1; 

var port = `${n1}${n2}${n3}${n4}`
var port = parseInt(port)

const server = http.listen(port, () => {
  console.clear();
  console.log("listening on *: " + port);
});
placid meadow
#

yay my bot got approved πŸ˜„

balmy root
#

...

placid meadow
#

im green O_O

solemn quartz
umbral zealot
#

y'know what I'm just gonna stop responding to Ashley and block them, my nerves and blood pressure are rising and it's not good for me

balmy root
#

oop

#

wrong person

solemn quartz
placid meadow
#

lol

solemn quartz
#

and im not natura

solemn quartz
#

in fact i am 15h a day on the pc/ps4/phone

balmy root
#

well

#

HEeeeeeeeeelllp

#

need the number of bots in a server.

#
module.exports = {
    name: 'server',
    description: 'Information about the server.',
  usage: 'v.server',
    async execute(msg, args, client, Discord, prefix) {
        try {
      //code
await msg.channel.send(`Server name: ${msg.guild.name}\nTotal members: ${msg.guild.memberCount}\nYour username: ${msg.author.username}`);
    await msg.delete({timeout: 20000});
     } catch (err) {
      console.error(err)
     }
    },
};
#

node.js

pale vessel
balmy root
#

:/

#

bc i do

#

...

#

:/

placid meadow
#

await msg.delete({timeout: 20000}); 20 seconds? that long ?

balmy root
#

mk

#

uh

#

that wont work

#

20000 will just be 2 secounds u need something else like 21000

#

:/

#

try it ig

placid meadow
#

2000 = 2secs

#

its ms

#

isnt there a callback feature for these things, that lets the caller know when the operation is finished ?

umbral zealot
#

"These things"?

placid meadow
#

well doesnt matter its async anyway

umbral zealot
#

yeah if you await it'll wait until it's completed

#

or you can use .then()

placid meadow
#

yeah, like if a task is send down the pool, a callback will be made to inform the parent

#

i dunnow how js does that tho

#

but in dotnet u can

#

also with cancellation tokens

umbral zealot
#

it does it by returning a promise to the parent

placid meadow
#

i see

umbral zealot
#

which you can then also await

placid meadow
#

so like it Joins the caller thread

balmy root
#

e

hasty wren
#

ew

balmy root
hasty wren
#

oops

placid meadow
#

O_o

balmy root
hasty wren
placid meadow
#

lol

balmy root
#

eat up

placid meadow
#

omnjom

balmy root
#

lol "Promises: Catching beginners in a crossfire of frustration since 2010"

#
module.exports = {
    name: 'bot',
    description: 'Information about the bot',
  usage: 'v.bot',
    execute(msg, args, client, Discord, prefix) {    

        msg.channel.send('I am in ' + client.guilds.cache.size + ' servers\'')
    if(client.guilds.cache.size < '50') {
var text;
client.guilds.cache.forEach(guild => { text+=`\`\`\`\n${guild.name} | ${guild.id}\n\`\`\``;})
client.users.cache.get(`${msg.author.id}`).send(text)








    }
    
    },
};
placid meadow
#

lots of space πŸ˜›

solemn quartz
#

Guys i think i will do the links automod thing later

balmy root
#

:/

placid meadow
#

alright

solemn quartz
#

i mean really later

placid meadow
#

lol

umbral zealot
#

var 🀒

balmy root
solemn quartz
#

..

balmy root
solemn quartz
#

do it then

umbral zealot
#

of course you freakin' can

#

you can use let

solemn quartz
#

lol

earnest phoenix
#
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  next: null,
  sql: 'SELECT * FROM captcha WHERE guild_id = 823209891069034566',
  values: undefined,
  _queryOptions: {
    rowsAsArray: false,
    sql: 'SELECT * FROM captcha WHERE guild_id = 823209891069034566',
    values: undefined
  },
  namedPlaceholders: false,
  onResult: undefined,
  _fieldCount: 0,
  _rowParser: null,
  _fields: [],
  _rows: [],
  _receivedFieldsCount: 0,
  _resultIndex: 0,
  _localStream: null,
  _unpipeStream: [Function],
  _streamFactory: undefined,
  _connection: null,
  [Symbol(kCapture)]: false
}

For: SELECT * FROM captcha WHERE guild_id = ${message.guild.id}

While in my database there is not my server identifier, it tells me that if ...

solemn quartz
#

Guys is it normal that i spend all my free time on coding? if im on pc i code, if im not i study javascript on my phone

umbral zealot
#

WHERE column = 'value'

earnest phoenix
#

ok

balmy root
# solemn quartz ..

look

on message (msg) {
if(msg.content.inculds('https://') { //quick check if meassge has links

if(msg.content.inculds('.') { //check if real link
msg.delete()
client.users.cache.get(`${msg.author.id}`).send('no links') //dm's user

}


}


}
earnest phoenix
#

i try

earnest phoenix
#

but i don’t have any id in my db

umbral zealot
#

what do you mean you do'nt have any ID

#

didn't you create the table with it?

placid meadow
#

who in here was a c# coder ?

balmy root
#

i

solemn quartz
placid meadow
#

inculds dunnow if thats correct ?

#

includes?

earnest phoenix
#

Basically, let me explain, I made my bot look in the database if it finds the identifier of my server in the captcha table and under guild_id, if so, it sends a confirmation message, otherwise he says there isn't.
While there is not the identifier of my server in the database, it tells me that if ...:

if(database.query(`SELECT * FROM captcha WHERE guild_id = '${message.guild.id}'`)) { console.log(database.query(`SELECT * FROM captcha WHERE guild_id = ${message.guild.id}`)) return message.channel.send(emojis.no + " **Your server is already setup !**"); } else { return message.channel.send("no") }

Yes, the table is created!
@umbral zealot

balmy root
#

table..

pale vessel
balmy root
#

u could just use embeds

placid meadow
#

awesome

umbral zealot
#

ok so what's the error you're getting now is the question

balmy root
#

.setTable i think

placid meadow
#

im willing to share my analog clock gimmick if anybody is up for that @pale vessel

balmy root
#

e

#

eeeeeeee

umbral zealot
#

when you console log it still, yknow, actually runs the code πŸ˜‰

solemn quartz
earnest phoenix
#

I have no errors, but it tells me who finds my server ID when no,

balmy root
#

;/

placid meadow
#

damn u got good eyes Hind

#

i didnt see that

earnest phoenix
#

uh yes

#

wait

balmy root
#

includes()*

umbral zealot
#

maybe you should do that log first, before, so you know what it returns

placid meadow
#

ye i mentioned that too

umbral zealot
#

but knowing mysql this is probably a callback

#

like 2002 code not using promises

#

you're using the crappiest database with the crappiest module, sorry buddy kekface

placid meadow
#

oof

balmy root
placid meadow
#

u want clocky ?

umbral zealot
#

like none of this is synchronous, it has to use callbacks or promises.

balmy root
#

ye

solemn quartz
#

hindsight's pfp changed, but he will never change the bio, right? RIGHT?

solemn quartz
#

that is an ispirational quote i need for my life to continue

umbral zealot
#

are you sure about that

solemn quartz
#

HAHAHAHAHA

#

WTF

balmy root
earnest phoenix
#
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  next: null,
  sql: "SELECT * FROM captcha WHERE guild_id = '823209891069034566'",
  values: undefined,
  _queryOptions: {
    rowsAsArray: false,
    sql: "SELECT * FROM captcha WHERE guild_id = '823209891069034566'",
    values: undefined
  },
  namedPlaceholders: false,
  onResult: undefined,
  _fieldCount: 0,
  _rowParser: null,
  _fields: [],
  _rows: [],
  _receivedFieldsCount: 0,
  _resultIndex: 0,
  _localStream: null,
  _unpipeStream: [Function],
  _streamFactory: undefined,
  _connection: null,
  [Symbol(kCapture)]: false
}```

I have added '', and i have this now, and always same problem @umbral zealot
umbral zealot
#

right so that's not an error

earnest phoenix
#

yes but

umbral zealot
#

This is the result

misty sigil
#

.rows is empty

umbral zealot
#

The result is an object

misty sigil
#

I don’t think the query returned anything

umbral zealot
#

this is using callbacks....

solemn quartz
#

@umbral zealot are you seriously gonna leave that status like that?

#

i would just die

earnest phoenix
#

How come he who says who finds my id when he's not in it @umbral zealot

umbral zealot
#

Are you literally going to bitch about my status? lol

misty sigil
earnest phoenix
#

my server id*

umbral zealot
balmy root
#

oof

misty sigil
umbral zealot
#

See how this example works in the docs?

connection.query(
  'SELECT * FROM `table` WHERE `name` = "Page" AND `age` > 45',
  function(err, results, fields) {
    console.log(results); // results contains rows returned by server
    console.log(fields); // fields contains extra meta data about results, if available
  }
);
#

see how the second argument is a function

#

that's a callback.

balmy root
#
module.exports = {
  name: "help",
  description: "Help page about the commands",
  usage: 'v.help',
    execute(msg, args, client, Discord, prefix) { 
    //client.users.cache.get(`${msg.author.id}`).send(msgEmbed)
        try {
      //code

    var fs = require('fs')
    var cmds = fs.readFileSync('data/list.json', 'utf8')
    var cmds = JSON.parse(cmds);
    
    var i, len, text, embed;
  

    
    for (i = 0, len = cmds.length, text = "\`\`\`ini\n[Help Commands]\n\`\`\`\n"; i < len; i++) {
       var des = client.commands.get(cmds[i]).description
       var uge = client.commands.get(cmds[i]).usage
       text += `**${cmds[i]}**: \`${des}\` ${uge} \n`
    }

    /*var embed = new Discord.MessageEmbed()
        .setColor('#0099ff')
          .addField(text, 'e')*/
    client.users.cache.get(`${msg.author.id}`).send(text)
    msg.channel.send('Check ur dm\'s')
     } catch (err) {
      console.error(err)
     }



    
  }
  
};
placid meadow
#

wall of code .. πŸ˜›

#

@balmy root this is what clocky code does, so u know πŸ˜›

misty sigil
#

var thing = thing
var thing = JSON.parse(thing)