#development
1 messages · Page 1579 of 1
...
ye..
Did you not define it
You won't learn much by just "watching tutorials". You need to actually learn what they're telling you.
* Installation completed.
* Make sure you create the node within the panel and then copy
* the config to this node. You may then start the daemon using
* systemctl start wings
*
* Note: It is recommended to enable swap (for Docker, read more about it in official documentation).
* Note: This script does not configure your firewall. Ports 8080 and 2022 needs to be open.
######################################################################```
im tryna deploy pterodactyl but this happens
This happened the first time lemme get what it showed the second time
module.exports = { name: "7", run(client, message, args) => { // code });
um
@mellow kelp uh variable and constant
Isn't this just a message telling you that it installed?
@quaint wasp learn js
##############################################################
- Pterodactyl Panel successfully installed @ endernodes.gq
- Installation is using nginx on ubuntu
- Thank you for using this script.
- Note: If you haven't configured the firewall: 80/443 (HTTP/HTTPS) is required to be open!
##############################################################
Yea
I am trying to...
that means it worked
But it didn’t install
carry on with coding
To refresh what?
ctrl + f5 to refresh the cache as well
The website?
ye
I already did
Try closing the website, restarting your pc to clear cookies and cache data
Cloudfare returns a 503 when trying to run the speed test as well
The only DNS records I have is the VPS IP which the domain points to and a CNAME for www
look
lets try again
you have a command in a file, right?
and inside that file, you have a function called, execute, right?
yes.
so
inside that file, you are CREATING the function
and in your main file, you are CALLING the function, which means you're using it
yes...
when you CALL a function, its like you're sending things into it
and in the file where you CREATE it, is where you receive the things
so in your main file
you do execute(client, message, args) right?
yes.
that means you are SENDING client, message and args, to the function in your file, IN THAT ORDER
it's like remoting executing that at the function's file
oh
so in the commands file, you are RECEIVING client message args, IN THE SAME ORDER
BUT
in the RECEIVING END, in the command file, you can RENAME them whatever you want
but they are still client, message, args IN THAT ORDER
& ?
How is that useful?
show your command file again
const Discord = require('discord.js');
let guild = message.guild;
module.exports = {
name: 'server-info',
execute(client, message, args) {
const Discord = require('discord.js')
const sEmbed = new Discord.MessageEmbed()
.setColor('#27FF00')
.setTitle('Server Infromation')
.addField(`Members in this server: ${guild.memberCount}`)
.addField('ID:', guild.id)
.addField(' ')
.setFooter('Type **++help** for help! Time:')
.setTimestamp();
message.channel.send(sEmbed);
}
}
Client.
saves image for posterity
so that should go AFTER that?
and if you want the ID from this guild, you just use message.guild.id instead
I know that..
I learned something from watching one 3 hour vd..
that should go wherever you want to use it
for example here .addField('ID:', guild.id)
oh..
Anyone know ?
so I dont really need message. everywhere..
you do
message.channel.send(sEmbed);
there.. I know.
wait that's really pog
and message.guild.id
road to 40k emotes
they said come here so
What do you mean with how to make dsl work tho
i think it's the addField method
no..
you just added a space
OH.
Oh?
I forgot to take that of.
After I deleted the message in it..
and couldnt come up with anything to put in there.
what public key? from where?
apart from getting the token, nothing else really
i want it to do the polls
once you have the token it's already possible to use it
what polls? i've never seen DSL do polls, can you show an example?
I think the bot.
how do i fix this
discord bot probably
yeah
db is database
o
no worries i’m just gonna remove it to much hassle
quick.db
Database is something that stores data used.
So like a command used it would go to the database
yes it does
oh wait did they rename fetch() and break it again 
show us how you defined db in that code
im not aware of what you can use it for, but a public key is a key to encrypt data. data encrypted by the public key can only be decrypted by its corresponding private key, and not by itself
they used to only have fetch() but I guess they needed it closer to enmap's features lol
Show us how you define the db variable, exactly
in spells.js
I lost the braincells I dont have reading that
if you have the public key, you can encrypt data
Ohoh
if you have the private key, you can decrypt it
It's like having 2 keys to a box, and you can only send things one way in the box, and one key doesn't work on the other side of the box. 😄
That isn't done with dsl, look for a bot on top.gg that does this
none. it's a key.
Any data.
whatever data you want to encrypt
Public and private keys can encrypt/decrypt anything
so i dont know what discord uses it for
(well, anything they've been used on)
probably for internal things
yeah
It's a very common way to store password. It means that even if you hack into the password database you'll only see encrypted passwords and you can't read them unless you find the private key
No, that's not how passwords are stored.
bcrypt 
Passwords are hashed and salted, not encrypted. They are not decryptable. They are not readable.
passwords are hashed, not encrypted ^
What would be the difference?
The difference is hashing cannot be "undone"
The only way to have to check if a password is valid is to salt/hash the password being used and compare the 2 hashes.
that's why you can't get your previous password from a website
you can only change it
Exactly.
Unless you have a website or system that's absolutely fucking horrible and managed by monkeys in suits that don't give a fuck about your security 😉
(unless the website doesn't encrypt passwords, in which case GET THE HELL AWAY FROM THERE)
imagine you have a mirror, you throw this mirror on the ground and shatter it. then you take a picture of the result
thats the hash
you cannot put the mirror back together
I thought things like password managers used your master password as an encryption key and stuff
you dont even have the actual glass pieces
no that's different though.
you just have a picture of it
passwords managers, yes, they do encrypt, because they need to store it
And your master password is used to decrypt it
Yeah that's where I got it from then, my bad
but we're comparing cars and trains here - two different purposes
i think its done
the port is done
small bugs here and there, but its all somehow working
my guess is that your 40 is not valid
@opal plank have you tried getting better
fyi u still blocked
am i? i never noticed
lucky you the notification still pinged me
trying to figure out what reason you would have to block me but ok
both me and xetera
and some other users i've seen you treating with similar entitlement
hm.
i didn't realize i was such an ass
HI Guys I Need Help
What would 40 even mean in a cronjob?
sometimes i get impatient or misunderstand answers to the point of being angered, but i'm honestly sorry
No
That place is for hours iirc
there is always a fix @blissful coral
Maximum 24
no, because i dont use d.js anymore

@opal plank whether you choose to forgive or not, know i don't wanna make you or anyone feel like shit
im using detritus now
d.js straight up garbo
kekw
dont start by making a discord bot start by making your own lib for discord then make a discord bot on that lib
never heard of that word in my entire life
this is the difference using a different lib yielded
well
lol
2gb reduction
from 3gb to 1gb, 1700 server, 400k users
its a pure ts lib
my bot uses multiple gigabytes of ram
but thats not because of djs
its because of my ai
kekw
the only difference in those 2 screenshots is the lib
the 3gb is using d.js
the 1gb is using the ts lib
k
ts is the only thing that makes js bareable
that sounds like the worst statement I have heard in here
Js was for web development I dont know why you guys expect so much out of it
thats not true
quite the opposite
imagine spending weeks fixing bugs based on user feedback or errors
imagine not catching bugs before even compiling
imagine not getting integrated intellisence
imagine not using intellisense
image not being able to compile code to older browsers and newer systems with transpilation
imagine not having a ide
imagine not using latest node features
if you using vanilla js, you should be on tim's level to be doing decent coding without aid from your IDE
imagine having runtime type errors
volt doesnt even have an ide
silly errors
@marble juniper https://youtu.be/zQnBQ4tB3ZA
Learn the basics if TypeScript in 100 Seconds! If you love TS, upgrade to Fireship PRO for 40% off using code mbus5Kcj at https://fireship.io/pro
TypeScript docs https://www.typescriptlang.org/
#typescript #js #100SecondsOfCode
Install the quiz app 🤓
iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.c...
I will never ever touch typescript
this isnt really a channel about which lang is better
not worth it
just watch the damn video
I reFuSe!
well, enjoy being a caveman then
imagine being so stubborn you refuse to simply watch a 100 second video to then say "well, i dont like it"
he spends the first minute just telling you why ts is good with real examples
after you get past the first minute, then he starts telling you how to use stuff
what can i use eval commands for
checking variables inside your code as well as executing code
@jolly mortar testing code but you dont really need one
Say like reload
eval is really handy for debugging
you can use it to reload commands
this
I mean
pog
link
sure you can set typings and stuff
if you can ACTUALLY say you dont like after all the features it provides, thats on you, i wont judge
wannna stay ts virgins?
and you get errors ahead of time
but i'd like you to at least know why ts is good and what its used for

so you dont spend 4 weeks debugging coding
just 2 days
imagine a command you wrote is wrong
if it takes 4 weeks to debug something you ight need mental health
or straight up notepad?
vsc is more convenient
same for ts
ts is there to help you assuring you dont make mistakes
intelli
vim is technically better
@opal plank I code on an apple 2 running memo v0.01
Second slot then, not the third
yikes
Cronjobs are second-precision
well, either way, you saw all the tools it provides you, remember that any valid js code is valid ts
theres no learning curve
you can set your tsconfig to be lax so it wont scream about your code
bruh
then you're welcome to fuck off
im not here to only talk to you
maybe el kuu and oliy
whoever wants to know about ts, i'll gladly introduce them to it
erwin is a missionary from the church of ts
its a great tool that offers great rewards
laughs in setting up eslint for the first time and getting over a 100 errors
you cant use "daily" for lua
eslint is the ONE thing im not too much of a fan of
more like twice per month
you can just use standard
i use prettier
instead of eslint
@quartz kindle dam lua dyin
its just personal pref
i just use prettier most of the time
bad thing is it doesn't catch unused imports
because, well, it's just prettier kekw
but does prettier make the code actually prettier
mine does catch unused stuff
Search "cronjob generator" on google, there are a plenty of tools to help u setup cron
its mainly what i use for tree shaking
eslint catches a lotta stuff for me ahead of time
absolutely
a lot prettier
lol
also I love that I can just use the wonderful auto fix button in vsc to 99% of errors automatically
i got a purge command for my bot and when they trigger the fail response it keeps on spamming and i cant find out where i left out a braket 
who the heck codes first and imports later
it's for when i copy and paste small chunks of code
THIS
um this
makes sense
laughs in having 15 extensions with code snippets

what if I used vue
How does vote detection work?
webhooks
im assuming you mean top.gg votes

beeg commit
full rewrite
this is how it's gonna feel like after i rewrite all my command objects into classes
oop gang
hey umm
redis error says max connections reached, but i have like 10k max connections..
does it have something to do with how frequently the redis.set and redis.get are?
You could check it with info clients in the redis cli
yeah there's only 1 worker connected to it
Are you instancing a new connection with every request?
nop
i have a global connection
but i have 3.5k users that access get and set like many times
that shouldn't be an issue tho
You could try increasing the max clients to like 100k and see if that fixes it
Yes.
i have a problem with the vote for server thing
K
why ping you little
Where exactly would I create a webhook? Like what server would I create the webhook in for my webhooks tab in my bot on the website?

What?
could you just fuck off
What makes you think that question wasn't about development? It literally is. Chill with that language.
holy stop pinging me
that is what Im gettign at
this is like the 5th person this hour I told not to ping me and they end up pinging me
If you're not happy with being pinged, go ahead and disable mentions here - or stop interacting with people.
then tell them to stop pinging you directly 
I have
ez
Discord is all about pings, like literally it happens 50 time a day for me, live with it, or mute everything, geeze.
Imma just start blocking people that ping me
-m 485987127809671168
You do that 
🤐 Muted 【↜𝒜𝓀𝒾↝】#9470 (@solemn leaf)
lol
kekw
So?
oh yeah
well you should probably host the webhook along with your bot
in whatever vps or service you're using
So, locally?
a webhook is basically a server listening for events
imagine the following
- user votes
- top gg recieves votes
- top gg sends a notifaction to an IP (that you can put ur bot/webserver)
- the event that a user voted reaches that IP (your server or bot)
- you then store the ID of the user who voted, along with the timestamp
with that data stored in a database, or somewhere persistent, you can then query and search if your users voted or not
So I create the webhook within the code, and not a discord server?
correct
so when it triggers on the code, you simply store what comes from it somewhere in a database, for example
i assume you use discord.js, correct?
Yes.
okay, so imagine this
the same way you have ```ts
client.on('message', (message) => {/logic here/})
you would use the same, but with a webhook
webhook.on('vote', (vote) => {/*Vote logic here*/})
the link that i sent you before covers all that
here
How do I create a webhook in the code, and not in a server?
Is the webhook auth the url, or?
it's a password to check that requests come from top.gg itself
it can be pretty much anything as long as it's decently secure i guess
So how would I get do I get the webhook link/url when I create a webhook via code?
after you created the webhook,it would be the ip + the port you listening on
in the example on the docs, they use port 80
which is not recommended
so it would be
YOUR_IP_HERE:80/dblwebhook
Why port 80?
doesnt need to be an IP, you can use a domain that fowards to an ip too
Isn't better port 443?
cuz port 80 is default for borwsers
It's just the default http port.
and a lot of shit
Unless you have certs you can't use 443.
you'll be getting bombarded with requests there
Basic web dev
bad idea overall to use both of those ports and a couple other common ones
Ik
What if I am hosting my bot via files on my pc and not a service, what port would I use?
20, 23, 25, 53 are a couple i remember back of my head
still the same
use your ip instead
If you don't have a web server you probably shouldn't try to use webhooks tbh.
IP:port/path
Because that's a lot to unpack, really.
lets say my ip is 177.77.77.88
and im using port 3000
you'd put http://177.77.77.88:3000/dblwebhook on top gg
Lol and then you explain how to unblock router ports next, Erwin? 
yeah theres that too lmao
you need to have TPC ports open
i dont think you need UDP
Sorry, I should not interrupt your helping. Carry on.
could be wrong though, but i think TPC is the only one needed
yeah, unless you wanna say "bye bye data"
@fresh verge TLDR;
copy that snippet
replace app.listen(80) to any port you want, 3000 for example
open THAT SPECIFIC port on your router, choose TCP
go to top.gg, on the webhook, put http:YourIPHere:3000/dblwebhook
and you should ahve yourself a webhook listening to votes
why not
Hey @opal plank bro
How did you do that
Ty.
I mean the button
I can add the Join Discord button but have no Idea about the Add ...... button.
NVM I already googled it out
database + indexing by their ID's
Can you explain
database table
|id | money | apples |
| 1235 | 10 | 2 |
| 5555 | 20 | 41 |
where ID is their discord id, to make sure its unique
oh
you'll need a database to store your data
if you store everything in memory you'll lose all of it once your bot restarts
so you need a database to keep all data stored
This is correct?
```db.set(inventory.${message.author.id}, { cf: 0, am: 0, amp: 0, ufo: 0 });
if (message.content === "5!inventory") {
const cf = db.get(inventory.${message.author.id}.cf);
message.channel.send(**__Your Inventory__**\n\n- **cf**:${cf}\n);
}```
i assume thats quick.db
i only use Posgtres and cassandra, so im not sure how quick.db deals with that sort of stuff
but it looks about right
ok
quick.db is like EasyDB
@umbral zealot Sorry for pinging Please tell me how to set cooldown for a command
anyone else getting this error when connecting their bots?
Discord bot failed to initialize. Top.GG API Error: 502 Bad Gateway
yes
Wich of the discord libraries was created first? discord.js, discord.py, javacord...
why do you want to know that
module.exports = (client, message) => {
try{
await client.snipe.set(message.channel.id, {
content: message.content,
id: message.author.id,
time: new Date(),
embed: message.embeds.length > 0 ? message.embeds[0] : null
});
console.log(client.snipe)
}catch(e){
return require('../../tools/functions/error')(e, message);
}
}
This dude is not even console.loging
No error
nothing
why await
oh
Curiosity
Hey how to set a cooldown for a command?
how to fix?
(node:2362) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 26 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:2362) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 26 disconnect listeners added to [VoiceConnection]. Use emitter.setMaxListeners() to increase limit
How to set cooldown for a command
stop doing client.on('message') on ur code
actually its not even message
its all under VoiceConnection and unhandled rejections
process.on('unhandledRejections')
the heck you doing on ur code mate?
its ur second one, never put event listeners inside your commands
everytime you run a command, it ends up creating a new listener
thats a memory leak
@sudden granite
oof.
what should i change .on to what?
like alternatives to .on
new to developing :/
you're using that as a catch block
you either use a catch block or a .catch
try {
//code
} catch(error) {
//handler error
}
or
so i need change .on to .catch?
<Promise>.catch(error => {/*handle error*/})
change this fromm
try {
console.error("Unhandled Rejection at: ", promise, "reason: ", reason.stack || reason);
} catch {
console.error(reason);
}
to what? like i said new to developent trying to understand source codes :/
@sudden granite Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:
- proper syntax
- debuging code
- basic features (vars, arrays, objects, functions)
- read and understand docs
- nodejs module system
As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.
Here are good resources to learn both Javascript and NodeJS:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/
Please take a couple of weeks/months to get acquainted with the language before trying to make bots!
you MUST know the basics before you make a bot
i recommend the last link
i am trying to install a Discord.Net.Rest package
but it gives me the error: Please specify a path.
For the question on the discord verification form about deleting data, am I allowed to say that I will retain some data (a user ID, the number of warnings they have and whether they have been blacklisted) even if the customer requests all their data to be deleted, or is that a no no?
Actually best to ask that discord itself: discord.gg/discord-developers
Ah okie thank you
@summer torrent the 1 day ratelimit has just been lifted, so now it can run, but now I am suddenly getting 429'd 😩
🤔
I don't know if this could be the reason, since it just uses cache, but I am not sure
what does the code do?
show me the function lol
how can i add the bot to the server
createGuildstofact
makes sure that any servers that it was added to, when it was offline, will be added to the database that it uses to check whenever a server will get a fact
what does guildstoFact do?
probably it slows up the start process
so that way I can save resources
and won't have to use client.guilds.cache.forEach() every minute
I mean, the error code is 429
I do you have to push them in a rray?
heh
when I used forEach on the guilds, the ram went extremely high
with this, I just use the id to find in the main db
and then check the time
if they are supposed to get a fact within the next minute
I set a timeout with res.time-Date.now()
and that is how it can be done in an optimized way
according to Tim, that is
I got help from him with optimizing it back when it took way too much resources
forEach is usable at times
let's say you're using multiple variables from arrays within an array
forEach is a good option
you can also just for loop it
rather than constantly doing like arrInArr[0] arrInArr[1]
forEach is slower because it needs to re evaluate the input fn everytime for every element
you can have .forEach((itemOne, itemTwo) => {})
that is because forEach is meant to use a function
for loops are meant to use an if statement a pre-decided amount of times or throughout a whole array
while loops are meant to execute an if statement until it returns false
hey guys
umm
{
"message": "DiscordAPIError: Missing Access\n at RequestHandler.execute (/home/m01425192/discord-bot/izzi-bot/node_modules/discord.js/src/rest/RequestHandler.js:154:13)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)\n at async RequestHandler.push (/home/m01425192/discord-bot/izzi-bot/node_modules/discord.js/src/rest/RequestHandler.js:39:14)",
"level": "error",
"timestamp": "2021-02-11T06:25:31.265Z"
},
is it possible to log the file as well when ever this happens?
im sure the bot has all the access, but it still shows this error often
cant figure out which file
also is there some api exhaust limitations? i got like 1.1k servers and almost 4k players.. my bot restarted twice
and i see no crash report errors
in the error log
If you're making loads of API requests in a short amount of time, then yes, it is possible that you are being rate limited
but how can i help the 3.5k user traffic?
obviously they would be making many calls
not the same user
different users
I'm pretty sure djs handles rate limits for you so it's unlikely that that is the problem
indeed
but sometimes the embeds dont get editted
so thought
maybe some rate limit
is messing up
i do have my own delay of 1sec before i edit the embed
So are you sure that your bot has permission to edit messages in every single server?
Yeah, but what if some server owner decided to remove that permission?
thats not the issue tho
well the bot will just throw a have no perms error
but i cant figure out why the bot would restart
there are no crash logs
What exactly is the bot trying to do when this error happens?
just edit embeds nothing else
but thats the issue
the discordapi thing isnt the issue
i assume the bot doesnt need "manage message" perms to edit its own message embed
During your bot development you will likely run into DiscordAPIError: Missing Permissions at some point. This error can be caused by one of the following reasons:
- Your bot is missing the needed permission to execute this action in it’s calculated base or final permissions (requirement changes based on the type of action you are trying to execute).
- You provided an invalid permission number while trying to create overwrites. (The calculator on the apps page returns decimal values while the developer documentation lists the flags in hex. Make sure you are not mixing the two and don’t use the hex prefix 0x where not applicable)
- It is trying to execute an action on a guild member with a role higher than or equal to your bots highest role.
- It is trying to modify or assign a role that is higher than or equal to its highest role.
- It is trying to execute a forbidden action on the server owner.
- It is trying to execute an action based on another unfulfilled factor (for example reserved for partnered guilds).
- It is trying to execute an action on a voice channel without the VIEW_CHANNEL permission.
This is what I found on Google
weird
i do check for these
AbortError: The user aborted a request.
what about this error?
Hi, do someone now how to escape to a youtube ip block?
on vps ?
Get some proxies, you usually need to pay for them tho
ok i'll search
They're most likely blocked as well, I'm assuming a lot of people try to use them
tk
spax
Seems like AbortErrors usually happen if a request is taking too long, or doesn't resolve at all
makes sense
--> npm install @json/presences @utils/cleanup @utils/utils @utils/responses @utils/schema node-fetch
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@utils%2fcleanup - Not found
npm ERR! 404
npm ERR! 404 '@utils/cleanup@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-02-10T14_04_48_604Z-debug.log
exit status 1
``` error
{
"name": "princess",
"version": "2.0.1",
"description": "lel",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "inhydrox",
"license": "Apache 2.0",
"dependencies": {
"@top-gg/sdk": "^3.0.7",
"axios": "^0.21.1",
"canvas": "^2.6.1",
"canvas-constructor": "^4.1.0",
"cheerio": "^1.0.0-rc.3",
"dblapi.js": "^2.4.0",
"discord.js": "^12.2.0",
"dotenv": "^8.2.0",
"fast-levenshtein": "^2.0.6",
"image-size": "^0.9.1",
"img-api": "^1.0.4",
"module-alias": "^2.2.2",
"moment": "^2.28.0",
"moment-timezone": "^0.5.31",
"mongodb": "^3.6.0",
"ms": "^2.1.2"
},
"_moduleAliases": {
"@utils": "src/utils",
"@structures": "src/structures",
"@json": "assets/json",
"@languages": "src/languages"
}
}``` package.json
but is it not possible to log where the error originates? it literally doesnt show the file
;-;
which makes it hard to find where the bug is
I have almost no experience with JavaScript :( someone else is gonna have to take it from here
np
its a little bit offtopic but did anyone know why discord recaptcha doesn't work in clone apps
How do I look if the user is in a mutual server?
just with the client?
What are you using to clone it? Using parallel space works for me
doesnt discord have a option, where you can change accounts?
Nah not really
reliably - use oauth
unreliably - look in your user cache
your user cache might be incomplete so that's why it's unreliable, you might need to download every member in every guild
nah, not worth it lol
got a solution for tons tons ping? 
-atmods
Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.
Here are some examples of emergencies:
- Raids / Multiple members mass spamming.
- Severe disruption of Discord's ToS (NSFW content, etc)
- Anything that requires more than 2 moderators to handle.
-wrongserver @earnest phoenix
@earnest phoenix
Hey! We think you have our server mistaken. We do not provide support, help, or advice for any bot. You need to click on the "Support Server" button on the bot's page, not the "Join Top.gg Discord" button at the top of our website. If there isn't a button that says Support Server, then we can't help you. Sorry :(
😩
Ohh
hey
dotnet add package Discord.Net.Rest --version 2.2.0 i tried to install the package with this command. It returned me this error: The project does not support adding package references through the add package command.
/help
Any python dev there? How can i prevent the error from logging in console?? Even tho i have error handler
@changeprefix.error
async def changeprefix_error_handler(self, ctx, error):
if isinstance(error, MissingRequiredArgument):
if error.param.name == 'prefix':
await ctx.send('works')
do you by any chance have a global error handler aswell?
no but do you have a on_command_error handle just existing in your code
Ye
@Akagibot.event
async def on_command_error(ctx, error):
if isinstance(error, CommandNotFound):
return
raise error
Only this one
What ive experienced is that having a global + local doesnt cause the local to silence it for the global
Oh
solution i did was set a ctx.handled = True and then if ctx.handled: return at the top of my global handler
easiest to fix is if getattr(ctx, 'handled', False): return
You know what, I just wanted to point out the typo exdee
toche
Om tysm it workss
i have created the database of the partnership in quick.db and i have made it by this.
Now how can i get those values?
You're pushing it?
i tried with this but its giving object Object
yes
when i use this it give object Object
@brazen violet you need to await the data?
umm how?
const <serverid> = await db.get(values)
oh i will try and say u
Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Substring(0, 8); how would i make this a fucntion and set the interval to 1000ms?
its giving same object Object
am i getting the data in wrong way?
log what your trying to get, and see if it returns what you want
umm ok
I havent worked with quick.db like that before but did you try
db.get(`partnershipcreated_${message.guild.id}`).serverid```
just a suggestion as I never did it like that lol
it might not work
but idk lol
maybe
db.get(`partnershipcreated_${message.guild.id}.serverid`)```
I had a look on https://quickdb.js.org/
theres a push
but eh
set looks like the one to use
db.set('userInfo', { difficulty: 'Easy' })```
is this quickdb?
yea lol, for the guy above
object Object appears when you try to stringify an object without using JSON.stringify
try console.log all of your variables
they will all be objects, guaranteed
How can I make them like \🔒?
7200000 is this what 2 hours in milliseconds would be or am i wrong
1000 * 60 * 60 * 2
aight thanks
yeah you were correct
60 to get it to 1 minute then 60 to get it to 1 hour then 2 to get it to 2 hours
yeah
milis * seconds * minutes * hours
const fetchChannel = await client.channels.fetch(guildData.plugins.verification.channel)
if(!fetchChannel) return```
im still getting errors?
the error being...?
DiscordAPIError: Unknown Channel
theres no way of checking?
catch it
the fetch?
yes
ok thx
.catch(() => null)
which means, if an error happens, return null instead
which then you can use in the if()
i pinged you
bruh
i used color
literally
good package, it uses color-string under the hood
so you might just need that
so https://npm.im/color ?
ye
use color-string actually
you only need the colors right?
that package is mainly for color manipulation
yea I just need colors
ayo
MANAGE_CHANNEL
Or
MANAGE_CHANNELS
@crimson vapor btw I was just trolling when your bot errored for the rank color command, I just added ZWS
and that uses https://npm.im/color-name kekw
I don't remember this
on the test server
can you link the message kekw
you can only resolve color names using that though
channel is probably deleted already
ah
I only need the hex from the color
but from what I can tell, none have more than like 200 colors
.-..
did u try one of those?

hey
does anyone know how i can generate a new random string of 8 characters every 1 second?
Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Substring(0, 8); i have this atm, but i want to call the convert function every 1 second
this is c#
ah
lol
anyone else that knows how to do it?
For sure
just follow java's way-of-life: make a thread for it
benchmarking rn
no
i already found a way on how to generate the random strings
but i need to update that string every 1 second
so the names will be different every 1 s
use timers
have you tried looking at docs
yeah ofc
...they have an example on there
what doesn't work about it
i meant, i just don't get how i would call that Program.namelmao = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Substring(0, 8); line in the timout function
i honestly just don't get it.
you didn't read the docs then
all you literally have to do is call that in the event function
did you read https://codereview.stackexchange.com/questions/113596/writing-cs-analog-of-settimeout-setinterval-and-clearinterval ? lol
depending on which timer you use
yup i did read that
that code is garbage
yeah idk
share your current code in a bin
almost thought you meant an actual bin
it probably is wrong
Timer timer1 = new Timer { Interval = 2000 }; timer1.Enabled = true; timer1.Tick += new System.EventHandler(Program.namelmao); this is what i found.
https://docs.microsoft.com/en-us/dotnet/api/system.timers.timer?view=net-5.0 The first thing I found on timers in C# - and the examples are crystal clear
okay. But is this timer i put good?
as it doesn't work
no
``public class Example
{
private static System.Timers.Timer aTimer;
}
private static void SetTimer()
{
aTimer = new System.Timers.Timer(1000);
aTimer.Elapsed += OnTimedEvent;
aTimer.AutoReset = true;
aTimer.Enabled = true;
}
private static void OnTimedEvent(Object source, ElapsedEventArgs e)
{
Program.namelmao = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Substring(0, 8);
}
}``i think that i got it.
that isn't your entire code
That's the code in the example with the body of the OnTimedEvent function replaced
yeah that would work.
as it is using the program.name and updating that in a timespan of 1s
i give up lol
you keep on claiming you read the docs and examples but you didn't even glance at them
and then when you're asked to provide your code
you don't
Hi guys does anyone here how to add images in description?
is there any way to deleted the data ? i saved the data in quick.db like this
u cannot
you need both setImage and setAttachment
if you mean embeds
I think they mean the bot's description
yep
We already said <img> tag or markdown
description
i- idk how to get those links @umbral zealot like convert them
like
you need to either upload your image to an image hosting platform, or convert it to base64
or use a link to an online image
Probably just upload to imgur
ok let me try
in your bot's description
is there a way of checking if user can receive dms without acctually sending anything?
I don't think it's possible. Only way is to try sending a message and catching the promise
Did you make this?
Why can't you just...
Math.floor(Math.random() * yourVariable.length);```
You don't need min and max actually.
<client>.users.<cache>.size
using the bot
Probably you need to build a gigantic codes for that.
If you mean, cached/collected by bot, you can use this.
Actually the best way is client.guilds.cache.reduce((x, y) => x + y.memberCount, 0)
hey umm, idk why i keep seeing this user aborted request error...
Since that gives all members and not just the cached ones
does it have something to do with djs ver?
Also, using the bot, so probably I don't know what he meant.
Wait. Yes, wait for the time. Probably rate-limit. #cmiiw
they mean "with code"
thanks
A parser I'm working on currently reads the line in the image like this:
const something = ((a, b) => a + b + c / 2).a.b();
c[d.e];
My question is... is this a bug or a feature 👁️ 👄 👁️
huh?
i mean
you mean BULK_DELETE ?
clear just may delete 99 messages
Yeah, is presence intent or server members intent?
you just need MANAGE_MESSAGES to get it
neither
BULK_MESSAGES are always accessible as long as you have permissions
its not intents related
yep
I'm verificating my bot
is this a good bot pfp? i made it btw
I need the intent to allow the clear command delete more than 99 messages
BULK_DELETE messages does not need intent, if you put that they'll instantly decline your request
Nice
thonks
Mmmm
Ok
If I verify my bot, I have the permissions to clear more than 99 messages?
permissions is NOT related to intents
Okok
does anyone here knows how to add an image
INTENTS just says what you want discord to be sending you in regards to events from the gateway.
PERMISSIONS is what your bot can do inside a server
I said permissions, sorry
css
is not permissions
you need to use CSS to add stuff to your bot's description
I just wanna know if I verify the bot, I can delete more than 99 messages with clear command
its not related
oh oke
you DONT need verification to delete 100 messages BULK
actually
i think you can do markdown with the <scr=> tag
You don't have to use css, people already answered your question multiple times. <img> tag or ![img]
yeah my bad







