#development
1 messages Β· Page 1683 of 1
lol
lol
you can't beat me saying lol
guys c'mon.
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
im deploying to vercel so cant use custom serverer
.setAuthor(`${user.username} $user.displayAvatarURL({dynamic: true})`)
That's not how you set the second argument in a method
read line 11 again, but slowly
I'd also point out that your user isn't a user, it's a member
and members have neither a username or displayAvatarURL
and your template string is wrong too
Like I said before
that too
... why are you using a template string anyways
member objects hava Information related to the server
you could pass the value straight to the function
user objects have data related to thier account and not the server
please get that into ur head
@frigid mountain oh btw ChargeYourPhone
K
Is there a way to make it so there can be multiple owners of the bot? (like in dc dev portal)
transfer application to team
ok
and add everyone you want to the team
they'll be able to see your bot token and do shit
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
discord themselves allows people in teams to see tokens
is it?
yep
yes
haha im qwik
Console.Title = "Social Bot"
Call New Client().Run(Environment.GetEnvironmentVariable("BTOKEN")).GetAwaiter().GetResult()
End Sub```
Your'e confusing code with discord dev portal features
we're not talking about code
oh my bad
so other people who you dont want to see cant see your tokens
i really thought so
imma go watch yt
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.
btw i have my birthday on 5 april
happy early birthday
happy bday already then
I was asking bc I accidentally made the bot owner my alt
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
hi
π
busy day
trying to fix a chart code, compensation for long nicknames in there, i cant do anything about it i believe
sounds annoying
@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
Names are also kinda hard to read
yeah maybe use a different font too
yeah im bound to what the unix fonts offers, i tired messing with it, dotnet on linux platforms
and increase the font size
tried*
also, when a discord client has his own window small then the client itself crops the image
so thats something i cant change
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?
looks almost the same to me
``js
the fields are increased, fonts havnt been changed
main_server = client.get_guild(826853914803568700)
coder_role = main_server.get_role(826853914803568709)
``` This isn't working why is that
is that JS or python
python
God knows why
π
I don't know about python but JS can't handle such large numbers so IDs have to be strings.
@umbral zealot they dont have Uint64 ??
.... no error but debug mode is off
never used to
bigint?
it's new in nodejs but only in like version 15
you werent asking me but i am also not okay
hmm
you need more of your name then! :)))
bigint seems simple too
wha
bigint = int64
print main_server and coder_role
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!
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
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!")```
I don't see you selecting a database.
yes because i would to create multiples databases
Ok but you need to select one, clearly.
Are you sure you don't just want to create multiple tables in a single database?
everytime?
Because that's usually what people do
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
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
Use different tables, not different databases
Ok
ok i have 2 bugs π
OK CAN SOMEONE HELP
With what
We can't help unless you actually ask a question
I WANT TO REPORT BUGS
Ok what sort of bug do you want to repoirt
also there's no need to scream. we can hear you fine.
#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
I didnt know we can hear text
every time i delete the bot website
the website still there
yeah ok so what were you told to do about that, specifically?
how can i report
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
One message removed from a suspended account.
One message removed from a suspended account.
how doesn't it work @sage bobcat
what is he trying to do ??
Guys where can i find a documentation about coding webhooks?
u tried google ?
._.
is there anyone knows how to delete the other owner from my bot
actually not lol
@summer yoke u wot mate ??
in what sense?
you currently cant
ok
One message removed from a suspended account.
if you would tell us what your trying to do, i might be able to help ya lad
dunnow who it was ...
return "Something " + x;?
One message removed from a suspended account.
One message removed from a suspended account.
where
Where
lol
One message removed from a suspended account.
Faith this is #development , just in case
One message removed from a suspended account.
thatds easy
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
ever heard of String.format() feature ?
One message removed from a suspended account.
One message removed from a suspended account.
you can nicely put variables inline, without the +'s
One message removed from a suspended account.
personally i dont like the sight of + concats
One message removed from a suspended account.
Faith
why would be rude ?
something + X
String interpolation gang
-.-
string interpol gonna arrest you
One message removed from a suspended account.
One message removed from a suspended account.
i always use string.format() , looks nicier
One message removed from a suspended account.
I have a problem
Repl murdered my nextjs process because it used too much memory
Halp
oh dear
One message removed from a suspended account.
a murder X_X
does C# seriously not support "string" + x ?
One message removed from a suspended account.
One message removed from a suspended account.
Why not use it then
Faith you need glasses
One message removed from a suspended account.
You didn't use it
you didnt use it in your code
if both sides are numbers, then it becomes an operator
time to use glitch
One message removed from a suspended account.

One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@_@
??
One message removed from a suspended account.
One message removed from a suspended account.
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.
@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
Congratulations, you almost became YanDev
does C# automatically output the result without using something like Console.WriteLine or Print?
One message removed from a suspended account.
Yandere Dev
O_o
You're storing a reference to the variable that's why
Worst programmer in existence

tss...
One message removed from a suspended account.
voltrex so rude -.-
Nah, you're not bad
One message removed from a suspended account.
Was just saying for jokes
One message removed from a suspended account.
@placid meadow what language is that
i know ^^
tsk tsk tsk Fiath
One message removed from a suspended account.
fiath
One message removed from a suspended account.
What?
fuckinf
FIath
Fath
One message removed from a suspended account.
she cant see sharp
Everything should work fine, i don't know why it's not working
show thy command code
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
objects in javascript are reverences, not copies
One message removed from a suspended account.
F# mmlul
One message removed from a suspended account.
One message removed from a suspended account.
Who's fucking
who 
lol
One message removed from a suspended account.
If i use Object.freeze(array) it should fix the problem?
nope
Freezing an array?
the main thread must wait for the input, once it gets this, the thread continues which is the end of the app
u can implement a loop for this
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
Object.hippityhoppityyourstuffisnowmyproperty(object);
Can't you just
JSON.parse(JSON.stringify(object))```
yes
okay ty for helping
but that will break the structure of collections most likely
not for classes
hmm
the best way is to transverse it and copy the properties
@quartz kindle can js use the google's version of serialization ?
which one?
its fast and small
protocol buffer?
there are many js implementations
but it needs schemas right?
just use $ strings
you need lay down attributes on the fields yeah
$"Something {x}"
yeah so it only works if you know the structure of the object beforehand
visual basic .net
there is one features c# doesnt have Like operator, its basically a poor man's regex pattern operator
damn it
VB stinks
well its my choice
Or and And are full evaluation and OrElse and AndAlso are the short circuit ones
π
oh lmao the Like operator isn't supported in .NET core anyways
looks interesting though
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
thats alright π
ive been coding for at least 10 years in my spare time
i know my way around
at the end of the day the best tool for the job is whatever works best for you
i coded from neural network recognition apps to games
so i didnt feel limited one bit
has coded for 10 years
whitename
Who cares
nice attitude π
Even cry is a better developer than you and he's a white name lol
why are u rude flaz?
the color of your role means literally nothing about your coding abilities
i see
i wonder if he knows vb though
who does?
i believe strongly if know one language, its not hard to adapt another one
to some extent CS translates directly to VB from my experience
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
}
I had to use VB for my comp sci class in school this year
tsx π
if you know CS you'll pick up the basics super quick considering they both run on the same runtime
okay maybe that run on the same runtime thing isn't valid
ive heard a lot about Rust, being ultra fast
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
What lib are you using
discord.js
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
What errors?
hold on
get the guild by it's id
client.guilds
.cache.get(id) // get the guild from cache
.fetch(id) // if it aint in cache
did this
this is the error
you mean keep alive the repl thing?
yes
yes
can you give me code for ir
i can help you

i did it only some days ago
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
@earnest phoenix https://dev.to/fizal619/so-you-want-to-make-a-discord-bot-4f0n
or buy hacker plan and get forever on
One message removed from a suspended account.
Is there any Discord bot libraries available for C++?
yes
What is qbasic?
exactly
lol
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...
so now if i want to find a channel from that guild, i just do this
const server = client.guilds
.cache.get(guildID)
.fetch(guildID)
const channel = (await server).channels.cache.find((channel) => channel.id == "channelID")```
replacing guildID and channelID with the actual IDs
@grim sinew First appeared 1991; 30 years ago
LOL
right?
Ms-dos?
no dos
Wtf that's old
flex
k good for you
ye
dos was the background, then windows 1.0 2. 3.11
they bought it from some dude i believe
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
awesome xD
Umm weird timing but
What firewall should I use for my VPS ?
is it linux ?
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
well iptables is the kernel module for the tcp/ip
ooh
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
yea
hello my bot have too much ping how can i do it lower?
get a better host
host it to a server closer to most guild regions
wdym sir?
@near stratus not so long ago someone send down a SYN attack, that was brutal, 1~2gb/hour traffic
AWS has around 30 ping and 95-170 ws
you can host there
If you're bon VPS get from a better company
oh ok tysm!
allowHalfOpen: false
but still enough to put 4-8 gig VPS to sleep
i wend professional, hired a leash with Coreo Smartwall, implemented a firewall
you get a private ipv4
and 12 months plan that protects me on demand
DDoS is always a pain
i know -.- altho this was not ddos, but SYN
ooh
How much does it cost ?
isn't SYN still a form of DoS?
that's kinda ddos type (I call all flooding type attack ddos, easy to say)
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
thats some cool visuals
wth is that ?
Etherape ?
That's cool imma get it now
etherape visualizes your network traffic
perhaps i could use some pointers for vps protection, currently only using fail2ban
should i use anything else?
i had an issue with ssh flodding that sent me offline for 5 min
one rule of thumb with ssh deamons, never use 22
after that i put ssh in strict mode or whatever
too obvious
use a higher port, like 14000
or higher
coz most scanners/probes dont even bother with large scans
i didnt want to change ports because i was afraid of accidentally locking myself out
btw the attack i suffered was a port scanner
oh ssh aint hard, also when u change, ur existing ssh link wont perish
not the same can be said on iptables tho, an mistake on this can be ...very annoying
rly ? so obviously local clients where scanning other clients on the same machine ?
yeah, thats not good
but never returned me
possibly lul
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
UwU
jesus
that has nothing to do with cheap or expensive that could still happend even when someone is charching you 10$ per month
i went cheap on my vps but i havent had any issues like that
No because it doesnt matter
@dusky lagoon well this is from actual experience, so u tell me π
how do i get all members have a particular role?
message.guild.roles.cache.get(roleId)?
experience < or something that should be .... where do you draw the line
this returned an empty array for some reason, but there are members with that role
well imma tell that i have had my experiance in 5 different vps's so dont act smart
wow ...hostile audience ..
like its wrong to inform people about having a cheap vps is bad
because it legit doesnt matter
why would i act smart, i merely share my experience ?
just dont inform people with bad information
im almost 40, you really think i would bothered by "doing smart" ?
thats all im saying
i dont understand the hostility ...
First enable GUILD_MEMBER intent
then
message.guild.roles.get('100000000000001').members.map(m=>m.id)
that doesnt suprise me
why are you so angry lad? did i do something wrong?
Does anyone have a vote reward code that I can borrow
what do you mean??
well seems to me you have a disagree with me, and thats alright. but no need to treat me rude
Like code for a bot that when you vote for it you get a bot reward
wasnt talking to you barret that conversation is over
hmm
you just need to enable a webhook
on the dev console
and create an express server
to listen to the route
Ok thanks
Without intents you shouldn't be able to fetch all members.
It'll return only the author and the bot
@quartz kindle if u still need help with your ubuntu, dm me anytime
thanks :)
Ya, that's this server's nature
To an extent
Sometimes
hmm thats shame, its toxic
Shrug, you can always teach us kids 
i dont consider you kids unless you want to be π
Aww
i consider you young developers, with ambition
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
i want to stimulate that as much as possible
i can sleep once i get dm telling my bot was approved till then i will stay awake no matter wat
That's the nicest thing I've heard in my entire day
when did you apply ?
Ty
^Β°^
2 days ago
first time 8 days ago
first time it was deliced due to offline
Spoiler alert: it wasn't.
that doesn't count
huh ?
first decline:
oh to bad
lol spam
i say it was offline
anyway let's say you'll go a few days without sleep
(Don't die please)
i havnt yet
@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
Yo nobody cares, let people help, aight? Don't need the random chatter here.
yes ma'am
;-;
there is the python server
node.js ;-;
So You don't wanna use data types to be exact
no, I just think that node.js is more efficient.
ever tried C++ ?
node.js is slower then python
yes
then you are coding wrong.
python is also interpreted right?
C + + is god
or coding to much π
node.js should almost never be slower than python
when u have over 3000 lines of code it can get slow
Rust, C and C++ is fast but takes your whole brain to code
You can code python or js with 2 neurons
3000 lines are also slow on python
Also dont start a language war here
lol
well u dont need as mean lines in python for goodness sake
console.log(e)
print(e)
Javascript is written in C++
Python is in C
there isn't much difference
Thats 1 line in both
javascript comes from java ;-;
No
yes
no it doesn't
wow ...
I actually tried learning it
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>
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
bc u can run java in javascript if u are big brain
@near stratus it certainly is one of a kind
tf is that
@balmy root N O
Java and Java script are different
sh
omg brainfuck
omg branfuck > node
.find_one returns one document. You sre iterating over it, so it returns the keys, which are strings
If you add a suffix to a thing it always doesn't remain the same
my brain needs to now one thing
that code is eq to "Hello, World!" π
See where my drunk ass is getting at?
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
BGSuper, why not use regex to match urls ?
wdym?
try await and run it again
what?
regex can fish out several types of urls , http /https/ftp etc
like
const server = await client....
hm, is there a documentation i can check?
oh sure hold on
okay, i'll try
BG, and btw if you do go with regex i got a perfect pattern for urls'
((http|ftp|wss|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)
Spoiler : regex is scary
no its not π
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();
Reguliere expressies zijn patronen om combinaties van karakters in strings mee te vinden. In JavaScript zijn reguliere expressies ook objecten. Deze patronen worden gebruikt met deΒ exec (en-US) en test (en-US) methoden van RegExp, en met de match (en-US), replace (en-US),Β search (en-US), en split (en-US) methoden van String. Dit hoofdstuk besch...
oh thats dutch
hold on
Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec() andΒ test() methods of RegExp, and with theΒ match(),Β matchAll(), replace(),Β replaceAll(), search(), andΒ split() methods ofΒ String. This chapter describes JavaScript regular ...
my bad
both of these work
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
ooof
let me see Vinx
`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???
try {
//code remove bot.error
} catch(err)
console.error(err)
}
nope
the error is the same
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channels' of undefined
@umbral zealot does the status field also need quote's ?
yes
alright
well the value does
oh...
not the field name
thanks
aka just used obfuscate.io, not anything special.
@balmy root dude why don't you just go watch netflix holy shit.
use this pattern to match any url (properly formed) ((http|ftp|wss|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)
I stay ONLINE
i use it too
then the server is "undefined"
Your bot isn't in that server.
Check the id again
yeah so please go be bored somewhere else 
k
bro i need to STAY online
try with another id
no
yes
or stay quiet? π
go to #general
:/
yes, do not?
cringe
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
i say online till me bot gets looked at i need to
starting with using mysql
ok
also
thx
me needs help
we know you don't
:/
turn off 2fa in setting
uh how do i get 2fa without a phone
nope
you can use google auth
still doesnt work
browser
SELECT guild_id FROM captcha WHERE status = 'on'
@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.
i cant install
man you really need to stop trying to do all this shit without a computer.
And no a chromebook isn't a "computer"
ik
you need your own devices and stop using the school's. this is ridiculous
i been doing this for 3 years leave me alone unless u want to buy me a pc

INT, VARCHAR, DATE and TEXT ?
I... can't even begin to start with answering that
ok
feels like you just need to go through a tutorial on databases at this point.
lol
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
i have this
that would great help with the support team π
rly?
so... π
shame
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 so.. that documentation is pretty big isn't it? i think i will read it in 2-3 days.
e
No
no sleep
?
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)
}
}
};
ignore this kid they're literally just sleep deprived and can't stop chatting
me help command is auto
grabs sedation rifle with a shot of valium come here Ashley π
documentations just aren't for me i think, i always understand things with videos/tutorials, or images with something already coded
let me get back at ya, i might find something other useful
i have something
The question is, do you understand them, or do you like them because you can copy the code? 
understand
im a good boi i swear
Admitedly, it's actually constructive to look at examples sometimes
at least to get started
then you can read the docs for other details.
There's nothing wrong with video tutorials, but people tend to just blindly copy whatever they do on the video and learn nothing
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)
}
},
};
regex in a nutshell
Often enough they're just full of outdated code
Don't, that would require you to fetch every single member first, which uses a lot of RAM, and it requires member intents. You don't want to have to deal with that.
@solemn quartz https://eloquentjavascript.net/09_regexp.html try this
and discord won't give you the intents just so you can say "There's 3 bots!"
i am up with that
But you won't get it.
hm, seems accurate
it's not compelling enough as a feature.
π tell mo
i am a girl that wont go to sleep till my bot is review mo can do anything
i will right after my mind begins working again
that will take 123213years
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);
});
yay my bot got approved π
...
im green O_O
YAY! :D
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
you need to accept that, real men are green like nature
lol
and im not natura
;-;
in fact i am 15h a day on the pc/ps4/phone
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

await msg.delete({timeout: 20000}); 20 seconds? that long ?
mk
uh
that wont work
20000 will just be 2 secounds u need something else like 21000
:/
try it ig
2000 = 2secs
its ms
isnt there a callback feature for these things, that lets the caller know when the operation is finished ?
"These things"?
well doesnt matter its async anyway
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
it does it by returning a promise to the parent
i see
which you can then also await
so like it Joins the caller thread
e
ew

oops
O_o

lol
omnjom
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)
}
},
};
lots of space π
Guys i think i will do the links automod thing later
:/
alright
i mean really later
lol
var π€’
thats easy thou
..
u cant do var e = d = v = y = 'bob' in anything else
do it then
lol
_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 ...
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
you need single quotes around your values in an SQL query
WHERE column = 'value'
ok
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
}
}
}
i try
same problem
but i donβt have any id in my db
who in here was a c# coder ?
i
includes*
and btw im trying to do something more complex than that
But im gonna yeet that 3rd line
there is no 3rd line
:/
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
table..
cry, Auger, a lot more people
u could just use embeds
awesome
ok so what's the error you're getting now is the question
.setTable i think
im willing to share my analog clock gimmick if anybody is up for that @pale vessel
noice
you added the single quotes in one place, not the other.
when you console log it still, yknow, actually runs the code π
I have no errors, but it tells me who finds my server ID when no,
;/
includes()*
maybe you should do that log first, before, so you know what it returns
ye i mentioned that too
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 
oof
clocky
u want clocky ?
like none of this is synchronous, it has to use callbacks or promises.
ye
hindsight's pfp changed, but he will never change the bio, right? RIGHT?
e
that is an ispirational quote i need for my life to continue
are you sure about that
mysql moment
my localhost go brrr
_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
right so that's not an error
yes but
This is the result
.rows is empty
The result is an object
I donβt think the query returned anything
this is using callbacks....
@umbral zealot are you seriously gonna leave that status like that?
i would just die
How come he who says who finds my id when he's not in it @umbral zealot
Are you literally going to bitch about my status? lol
ah, so, hell
ur id => 605371484046884865
my server id*
because it's not null, it's a value, so it's truthy
oof
check if thereβs rows, not a result
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.
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)
}
}
};
var thing = thing
var thing = JSON.parse(thing)


