#development
1 messages · Page 1502 of 1
I didn't understand the buy thing
i hate css but i can try
i can try
sec ill get my previous message here.
Me too, i'm trash at css
Gotta make my page pretty 
soooooooo what the heck is wrong with this lol
Now what
and you dm me your bot's page and show which stars are the ones that dont work?
bc it dead
All work actually @quartz kindle
The main question is: When the page is loaded and by default 0 is selected, how can I add the css to it.
since changing the numbers to 0 and whatnot doesn't appear to work
Did you try making args a constant like this?:
const args = <message>.content.slice(prefix.length).trim().split(/ +/g);
you mean these stars?
or which ones
ya
</message>
this part wut about it tho
@earnest phoenix
problemo
where the heck do i put the </message>
copy pasting code isn't 100% going to work until you change it to fit your code.
<message> means the type message
the original selector seems to be this .selectable svg .svg-star:hover
const args = message.content.slice(prefix.length).trim().split(/ +/);
E
this is my check thing
for args
Indeed it was. Thanks 
👍
my brain
Lol
its dying in the afterlife
Uh
usually when people say <message> or <client>, they mean <whatever name you gave to your message variable> and <whatever name you gave do your client>
and some define client as shithead
shithead.shituser.getshitmessage
Bruh
You has to define it inside a client.on block
hmm
client.on('message', message =>{
Some code
});
I'm going to ask 3 questions.
1: how did you learn JS
2: Are you learning JS through bots?
3: Are you following tutorials for what you're trying to do (Like YouTube ect)
because it doesn't appear you're doing any trial and error. If it doesn't work you ask here.
class Shit extends Discord.Client {
shituser(id) { return this.users.cache.get(id) }
shitchannel(id) { return this.channels.cache.get(id) }
shitguild(id) { return this.guilds.cache.get(id) }
takeadump(token) { return this.login(token) }
}
const shithead = new Shit();
shithead.on("message", crap => {
shithead.shitchannel("3428472983452342").send(crap.content)
})
shithead.takeadump("*)C*2ym30y@)*$C@)M#*$c082my3408c0823cm8@#h")
i tried multiple times
and my brain is dead so i am serriously brain dead
Lmao
Not being an ass I'm genuenally curious
like do you know JS basics?
That's not a reason
If you know JS basics you never forgot it.
And a lot of this is revolved around the basics for the most part which is why I asked.
did you find any existing Content Security Policy line in your nginx configs? anywhere, not only in the reverse proxy block

Hope I wasn't being rude 

Althought, some people learns JS thought discord bots...
Like me
I learned JS thought my bot
Yeah I get that. You totally can but a decent chunk of people follow a outdated bot tutorial and ask 100000 times why x code doesn't work
Like me 

ok then lets add one
add_header Content-Security-Policy "img-src 'self' https://cdn.discordapp.com"; script-src 'self' 'unsafe-inline'
For sure.
Xd
are you loading a script from an external site?
ah its inlined
so lets add unsafe-inline
edited the code
should probably work inside it, but i think its better outside
right before location /
then restart nginx as usual
run nginx -t
for what reason
ah i mispelled
add_header Content-Security-Policy "img-src 'self' https://cdn.discordapp.com; script-src 'self' 'unsafe-inline'";
fixed
Imagine making typing mistakes.
xd
what do the logs say?
hmm, its saying that you have a duplicate CSP header...
does your node.js code add any headers?
do you have any security package like helmet.js?
so remove the header from nginx and configure helmet instead
well that will disable it completely
it will work, but its less secure
try this
contentSecurityPolicy: {
directives: {
...helmet.contentSecurityPolicy.getDefaultDirectives(),
"image-src": ["'self'", "cdn.discordapp.com", "data:"],
},
}
content security policy exists to prevent the browser from loading unauthorized things
for example if a hacker somehow manages to inject viruses into your website, when a person opens your page, the browser will refuse to load them
for example in the code above its saying only allow the browser to load images from itself (same website), from discordapp, or from a data url
welp, then you have to add whatever is missing
I will become a vampire lol
Has anyone here created commands for users to change the prefix of their bot?
you must use db to fetch the guild's bot prefix
flaze
To save and fetch*
ITS LOCAL >:0
yeah, ig better cache it
D: not know why with db?
Save it as a const
They're not replying to your question. They're answering someone else.
ah occcccccccc sorry
M
also thats not how you create a role
client.guilds.roles is not a thing either
Like fetching an specific one
Wich is your native language?
discord.js
anyone know how to customize file path thing in terminal
which thing?
I meant programming language
@lucid wharf native language, idiom.
spanish Q_Q
what is the endpoint to reply to a message?
linux its .bashrc or smth
Ah prro yo también xd
it is not endpoint iirc
just an option in message send
do you know the option?
one sec
oh I think I got it
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
https://discord.dev/resources/channel#create-message search "reply"
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
powerline kekw
im talking about such things https://i.imgur.com/cg2lYjq.png
yes that
ty norizon
Sooo, I am trying to run a .exe file (valorant.exe) and I want to be able to monitor the console of the game and see when files are updated or stuff is emited. Is there a way to do this in command prompt?
Any ideas?
Event Viewer wasn't a option it can't get the app cuz it isn't a windows application
can you just do valorant.exe in cmd?
lets see
I assume no
can you launch it as a child process in node
Will I be able to view what happens?
Like file writes?
I need to monitor emitters on the game
Trying to back track
uhh you would be able to read the output and you could probably listen for file writes if you know what directory to look in
ah
https://www.npmjs.com/package/fsevents @blissful coral is this what youre looking for?
oh this is for macos
what theme
MacOS events
One for Windows?
This work's for windows?
You could generate a hash from the file bytes and store in a variable, then inside a loop you keep generating a hash from it, if it changes then the file has changed
"why not working???"
"its still replying in my server sorry"
lets fix djs by making all requests blocking
hm yes
thats the obvious way to fix it
yes
how do you make a sync EventEmitter tf
why would you want that
say it takes 20ms to process a command
event emitter is sync
its sync even in djs
nvm then
if you have a command that blocks the bot, it will block other events
but I mean like message.reply() or something
yes
like stop the entire bot just to wait for that
lol
one way to make it:
let done = false;
let promise = message.reply(...).then(() => { done = true })
while(!done) {
// do nothing
}
lmao
that would probably not even work
What would be better as a bot invite redirect link
A. Bot support server
B. Bot website
bot website imo
what would work tho is setting up a worker thread with a sharedArrayBuffer, and have the main process block until the value of the buffer changes
waiting for things seems hard
and put the promise in the worker and have it change the buffer when done
:^)
wait until you attempt synchronous multithreading in node xD
lets not
its quite interesting tho, i have a shelved project based on it
what the fuck is that
don't worry about it
kill it before it has children
it can't
then kill whoever is responsible for that
what even is that suppose to do?
its a discord event handler lol
emit message event as long as there is content
why u making ur own handler?
no cache
I don't use them
why aren you using d.js?
isnt that what tim has?
making a barebones gateway for your own personal use is a very good idea
just a lot of work
I mean if I keep it simple it should not be that bad
honestly that snippet is just to show how I have message update acting as message event
why you emitting the data twice?
I am?
this?
your message constructor already has this, why you passing the emit with this again?
but if this is the shard, why not use it in the message contructor?
what do you mean?
attach this onto your message
i mean, nothing wrong with doing it like that
one is for the message constructor, the other is for the event. hes not necessariliy adding a reference to it in message
it keeps things separate and modular
case 'MESSAGE_UPDATE':
if(data.d.content) this.client.emit('message', new Message(data.d, this))
you could append this onto the message constructor
rather than sending a second param
doesnt make much difference
it would just point to the memory of the shard right?
yeah
so realistically there should be no difference except for style and preference
I choose this rather than making message.shard public because I don't want to accidentally eval my token for the most part
client.on("message", (message,shard) => {
// code
})
``` makes more sense than ```js
client.on("message", message => {
message.shard
// code
})
i would go with a single param, the only reason i'd use multiple is when you are comparing two equal things, for example member updates, old and new, stuff of the sort
or if they are not part of it
having the shard reference of where the message came from makes sense
im sending shard for all events so it should be fine
case 1:
case 2:
code();
break;
``` should work right?
hi
@staticmethod
def user_join(access_token, userr):
try:
url = Oauth.discord_api_url + f"/guilds/768019392596017164/members/{userr}"
headers = {
"Authorization": "Bearer {}" .format(access_token)
}
user_object = requests.get(url = url, headers = headers)
user_json = user_object.json()
return user_json
i have this function
for discord oauth2
im trying to add people to a server
but im getting a {'message': '401: Unauthorized', 'code': 0} error
plz help
idk if i should really use json there
but i tried
@staticmethod
def user_join(access_token, userr):
try:
url = Oauth.discord_api_url + f"/guilds/768019392596017164/members/{userr}"
headers = {
"Authorization": "Bearer {}" .format(access_token)
}
user_object = requests.get(url = url, headers = headers)
return user_object
as well
and that got the same error
case 1 would do code()
yes
i would still scope, but because ou using this it might get funky
this.client.emit('guildUpdate', data.d, oldGuild, this);``` this is my guild update emit
I do the raw guild, and the cached guild
then the shard
you want to add someone to a server when they add the bot?
what no
i want to add them
when they authorize
the link doesnt have the bot scope
but the bot does exist in the server
you did the whole code exchange and got their token right?
wait wha
i thought i would just use that url and it would work
what should i do instead then
also, from reading the docs
it seems you have to use your own bot token in the auth header
and the users access token in a json field
so do i also change
headers = {
"Authorization": "Bearer {}" .format(access_token)
}
to
headers = {
"Authorization": "Bot {}" .format(token)
}
yes
btw could you send me a link to the docs @quartz kindle
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
kk tks
discordjs, how do you cache reactions on an old message?
My Embed is not working
@barren brook send the code
K,
Im just getting back into this so I dont know much, Like restarting.
HelpEmbed.setTitle("Help Command")
HelpEmbed.addField("h-help", "Help Shows a List Of Commands.")
HelpEmbed.addField("h-ping", "Replys With Pong!")
msg.reply("Help Is In Your DMS! :yum:")
msg.author.send(HelpEmbed)```
Sending Double.
why's it concerned with message content
msg.reply("Help Is In Your DMS! :yum:")
msg.author.send(HelpEmbed)```
Thats weird af, Will that work
ofc
you could always newline each function
yeah
so it looks neater
HelpEmbed = HelpEmbed.setTitle("Help Command")
HelpEmbed = HelpEmbed.addField("h-help", "Help Shows a List Of Commands.")
HelpEmbed = HelpEmbed.addField("h-ping", "Replys With Pong!")```alternatively u could do this but its worse
worse in what way?
no reason to make all the assignments
you don't need to redefine it
he is playing vsc
yeah no more
MESSAGE_UPDATE doesnt always include content
nor does message
if you edit the content out maybe
https://million.is-a.computer/files/3oRm0dOFniljvfaX.png so I fixed it
nah embeds make content null
you shouldn't filter that out
I have no use for messages without it
Tf do I restart my discord bot using glitch.com
you're not supposed to be hosting bots on glitch
edit any file and glitch will autorestart it lol
are bots against tos or are uptime robots?
Is it against tos? @trim saddle
bots or uptime robots?
Ok well what do I switch to then
why
glitch is meant to be a place for small projects
they banned bot hosting because people were misusing the platform
@quartz kindle i meant to ask
which is honestly better
blame the 5 million turkish bots on glitch
is there like a
that have all the exact same code
safe, not overwriting version of Object.assign()
like, if the key exists, ignore it?
yes
well, you could just invert the order
well people recommend you pay for a vps
VPS?
read le pins
a dedi but not
the right variable replaces the left variable, so if you switch them around, the existing keys will replace the keys you want to ignore and the result will be the same
@trim saddle huh?
oke
donke
monke

does anyone know how to cache reactions on old messages? (discordjs)
@quartz kindle can you fetch reactions?
i can see what has been reacted, but not who and i need to know who
I thought that reactions were linked to an id
ive tried a lot of stuff like this but all to no avail
Spamming once I test the command
you do it once and it happens a lot?
Fornite to discord or are you just accidentally capturing two monitors
2 monitors
win + shift + s
Yea jojo it spams it
Gotcha. I had my bot connected to fortnite using a client made for it. Was fun while it lasted
too much work when it updates
youd have to send ur code cuz it probs has to do with executing a command too much
Fornite verification
Used to do scrim things so people wanted it 
so if they cheat they get their discord tag and Fortnite acc
host or play in?
dev
msg.reply("Help Is In Your DMS! :yum:")
msg.author.send(HelpEmbed)```
@sturdy gazelle


like i said the issue isnt there
do you know the name of the server you made the bot for?
We retired it like a year ago because it's too high mainence. One update on their end can kill the entire process.
Where is it? Console?
It probably wasn't ours. Our process was like this.
React to embed -> Bot DMS you some fortnite related questions -> It generates a captcha code -> you dm the bot on fortnite -> it dms you on discord linking the two together
if it us only sending you one dm, then the issue is in the reply, otherwise you are executing the command too much
thats smart
k
are you using commando?
But as mentioned. Any updates on the games end will make us have to regenderate things and ya
oh commando yikes
no ty.
Nah discord.js
At one point we made 800 on patreon
oh
but since customs became a thing it yeeted our pay
commando is a part of discord js but if u dunno what it is then no lol
no one really needed that feature anymore
yeah makes sense
Is commando better?
commando is depricated
I have a video if u wana see it in action
eh its got more integration

i dont use commando but im working on a bot that does
iirc it still uses djs 11
its nice to have a default command architecture but it can be a pain
i dont think so
.setTitle("Help Command")
.addField("h-help", "Help Shows a List Of Commands.")
.addField("h-ping", "Replys With Pong!");
msg.reply("Help Is In Your DMS! :yum:");
msg.author.send(HelpEmbed);``` Would this coding work or nah?
yesh
K
thats what i said
I dont understand what a loop is.
that would also be an issue
show the entire command
K wait up
Now the discord bot wont go online after I stopped it, Tf is happening now
discord.py how do i fetch user information from a user thats no longer in a server with the bot? i have the id. how do i get the users name from that
using bot.fetch_user(ID) returns error code 404 user not found
@crimson vapor
then the id isn't valid
show your code
let HelpEmbed = new Discord.MessageEmbed()
.setTitle("Help Command")
.addField("h-help", "Help Shows a List Of Commands.")
.addField("h-ping", "Replys With Pong!");
msg.reply("Help Is In Your DMS! 😋");
msg.author.send(HelpEmbed);
Tried to make it look cleaner
no, all of your code
your id is invalid then
K
bots can't fetch random users
why not?
const client = new Discord.Client();
const fs = require("fs");
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on("message", msg => {
if (msg.content === "h-ping") {
msg.reply("Pong!");
}
let HelpEmbed = new Discord.MessageEmbed()
.setTitle("Help Command")
.addField("h-help", "Help Shows a List Of Commands.")
.addField("h-ping", "Replys With Pong!");
msg.reply("Help Is In Your DMS! :yum:");
msg.author.send(HelpEmbed);
if (msg.content === "h-requirements") {
let COCEmbed = new Discord.MessageEmbed();
COCEmbed.setTitle("Requirement For Styx Clan");
msg.author.send(COCEmbed);
}
const blacklistedusers = [
"Currently Blacklisted-Ghost M033 Blacklisted until further notice",
"TNN PLU Blacklisted until 1/10/2021",
"Unknown"
];
if (msg.content === "h-blacklistedpeople") {
msg.author.send(blacklistedusers);
}
});
client.login("TOKEN IS HERE");```
how? I just tested it doe
they can?
ive seen others do it
thats strange
only members can't
invasion of privacy I thought
im just trying to figure out why its not working
you must have multiple instances running
@terse finch how do you do it?
hi
@crimson vapor How do i stop the instances?
yeah
I don't think fetch_user raises UserNotFound
async def banFuck(self, ctx, member: discord.User = None, *, reason=""):
# User, Moderator, and Server
mod = ctx.author
user = self.bot.fetch_user(member.id)
server = ctx.guild.name
first the param member:discord.User fails to find the user. so ive changed it to just an int which is the id. still fails
you can create a function yourself,
async def convert_user(id):
return bot.get_user(int(id)) or await bot.fetch_user(id)
oh wait, I'm unsure what d.py passes to that
if they are in the server, they will be in the cache, if they leave, they stay in the cache. if the bot restarts, the cache is cleared and only those in the server can be found
so the issue was i forgot my await when i converted it to a cog, i had to rename bot.fetch_user(ID) to self.bot.fetch_user(ID) and must have accidently deleted the await
I mean, that still won't get the function executed if the UserConverter raises UserNotFound error, will it?
people keep complaining it kekw
Pain.font
I have no clue, that's default
not complaining
Its probably windows text smoothing disabled
yo im kinda dumb but
im adding a user to a server
using guilds.join
and i used this method
user_object = requests.put(url = url, headers = headers, data = {"body": access_token})
ik its wrong but idk how to fix it
plz help
'code': 50035, 'errors': {'_errors': [{'code': 'CONTENT_TYPE_INVALID', 'message': 'Expected "Content-Type" header to be one of {\'application/json\'}.'}]}, 'message': 'Invalid Form Body'}
also i got this err
Add to your headers the content type it says to use.
so is the data thing fine
No idea tbh. I feel your body shouldn't be the acess token but I dont know. It would be on the docs
If you fix the header issue the error mentions if there are any further errors it should tell you.
if you use json kwarg it'll automatically set the content-type to application/json.
As Woo said though, ig you should replace body with access_token
kk
How do u block messange with colours
Access token in body? Lul
lmao
he's not checking if it's a bot requesting. he's also not got the send() in an if statement
so the reason is that, the bot is responding to itself
@barren brook ^ that's why
hi
i just came back
and looked at my code
@staticmethod
def user_join(token, access_token, userr):
try:
url = Oauth.discord_api_url + f"/guilds/768019392596017164/members/{userr}"
headers = {
"Authorization": "Bot {}" .format(token)
}
user_object = requests.put(url = url, headers = headers, data = {"body": access_token})
user_json = user_object.json()
return user_json
except Exception as e:
print(e)
this is already in the application/json format
lmao
aaa
idk what the problem is
no?
I was saying json kwarg, not json method doe
that body is still there kekw
"Authorization": "Bot {}" .format(token)
thats json kwarg
oh yea i changed it to
user_object = requests.put(url = url, headers = headers, data = {"access_token": access_token})
after that
lol
What is even kwarg lmao
kwarg
I meant you should pass the payload dict to json kwarg instead of data kwarg
that way, the Content-Type will be application/json
user_object = requests.put(url = url, headers = headers, json = {"access_token": access_token})
you mean like this
right
Kawaii argument
a
py
this is the whole code
import requests
class Oauth(object):
client_id = "790134964632813578"
client_secret = client_secret_here
scope = "identify%20guilds.join"
redirect_uri = "https://OAuth2.phoenix76.repl.co/login"
discord_login_url = "https://discord.com/api/oauth2/authorize?client_id={}&redirect_url={}&response_type=code&scope={}" .format(client_id, redirect_uri, scope)
discord_token_url = "https://discord.com/api/oauth2/token",
discord_api_url = "https://discord.com/api/v8"
@staticmethod
def get_access_token(code):
payload = {
"client_id": Oauth.client_id,
"client_secret": Oauth.client_secret,
"grant_type": "authorization_code",
"code": code,
"redirect_uri": Oauth.redirect_uri,
"scope": Oauth.scope
}
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
access_token = requests.post(url = "https://discord.com/api/oauth2/token", data = payload, headers = headers)
json = access_token.json()
return json.get("access_token")
@staticmethod
def user_join(token, access_token, userr):
try:
url = Oauth.discord_api_url + f"/guilds/768019392596017164/members/{userr}"
headers = {
"Authorization": "Bot {}" .format(token)
}
user_object = requests.put(url = url, headers = headers, json = {"access_token": access_token})
user_json = user_object.json()
return user_json
except Exception as e:
print(e)
@staticmethod
def get_user_json(access_token):
#print(access_token)
url = Oauth.discord_api_url + "/users/@me"
headers = {
"Authorization": "Bearer {}" .format(access_token)
}
user_object = requests.get(url = url, headers = headers)
user_json = user_object.json()
return user_json
hey guys, umm how do i check if the user is premium? there's no premium property on author or in message.client.user
you mean nitro user?
iirc you gotta get the user object
that
oh
Apparently GuildMember has a premiumSince property
According to a stackoverflow answer i just googled
so uh, you could try that
oh i thought you were talking about nitro 
Mmm
yeah theres no way rn
i guess its available on discord.py xD
it's not iirc
its not there on message.author
if ($(".badgecase img").toArray().find(x => x.attribs.alt == "premium"))
Cheerio gang
bots do be having limited access to users
!spam 2
https://hastebin.com/ariyematit.javascript
how would i check if args[0] === "categoryName", and if so give the categories properties?
discord.js btw
you just answered your own question
First thing:
args[0] gets the command too, so if your command is an example !help that gets the "help" string
I never used args[0] so i'm not experienced with that error but i know what happens....
Why not shifting the args array on command execute
So the "help" will be deleted
Welp
im not showing all my code, i did do that
Also, the hastebin link is empty.
What's wrong?
tryna see how to send all of the properties of one of the bigger properties, like sending all of the properties of moderation
ok well idk im trying to simplify it too much ik how to do that
how do i check if the first arg (args[0]) is equal to one of the category propertie names, but idk how to do it bcs its json which i cant use a for...of on to check the category propertie names to a string
First thing:
DON'T USE args[0]
It gets the main command
Also, show me where is defined args
Before i can suggest you something i have to see your args variable.
Or constant
i use args[0] for everything and it works, heres variable: ```js
const args = message.content.slice(prefixes.length).trim().split(/ +/);
dawg i aint tryna be mean, thanks for tryna help, but my args works fine
const arg = "play";
Object.entries(commandsJSON).find(x => x[1].cmds.includes(arg)); // ["music", { name, ... }]```this maybe?
i'm not sure what you're trying to achieve really
I suggest you to add that g
Yes
@valid temple https://discordapp.com/channels/264445053596991498/272764566411149314/796268789946646578 this finds the category that matched the given command (arg)
People like me are the reason that why we don't progress as civilization
@pale vessel i have big fat lazy

why does the tab is not working?
">>> \tBlablabla"
its just like gone
here's an example
i already try manual spacing and still there's no space at the beginning of the synopsis
Discord removes more than one spaces
alright
all good bro
thanks this got me on the right track, although im confused on how i check the name propertie of all. i got this but ik it's wrong ```js
(Object.entries(commandsJSON).find(x => x.name.includes(args[0])))
@pale vessel help me figure how to properly type my intents
intents
shush
interface ClientOptions {
intents: keyof calc.wsIntentsType[]
}
``` this isn't proper
it's just an object with a bunch of number keys
are the values also numbers
yes
why not use enums then
because, no idea
enum wsIntentsType {
TYPE1,
TYPE2,
TYPE3
}
...
intents: wsIntentsType
(assuming the types go from 0 - n)
yeah no
you don't declare types
and there's no equal
see my example
enum wsIntentsType {
GUILDS,
GUILD_MEMBERS,
...
}
hm.
Let's say I accidentally uploaded my token to my github repo (it's private tho dw) - how do I stop people being able to ever see the file that had my token in it?
gitignore it?
you delete and recreate the repository
oh, I didn't read that right kekw
Yeah I know it keeps it which is why I asked lul
I'll just recreate the repo
Thanks
np
some bot list doesn't allow tokens to be anywhere in the bot repo
not even in a .env file?
Another question before I upload everything again
Currently I am using plain/raw sql queries for my database - should I switch to a more secure method before uploading, or can I just fix it before I make it public?
nope
just fix it
make sure that there's sanitation of user inputs of course
Aight
I have a function that escapes any non-alphanumeric characters to theoretically prevent injection and I haven't had instances of it in the ~10 months the bot has been public so I'm assuming it's safe
yeaaaaaa
sql databases are a bit more sensitive than you think but aight
it's a common misconception that user input can be "filtered"
Yeah I understand that - otherwise injection attacks would never happen because basically anyone could make a function like mine
yea
I'll just keep it private for now, thanks
Yeah I'm going to switch to using a rest api and in the server I'll be using something like prepared statements (or maybe something else I'm not sure yet)
aight
discord will regenerate your token when you upload it to public repo btw
How I make poll in discord
Ah okay thank you - I've re-uploaded so it should all be good now
Hey guys
Can somebody help me pls
I have blacklist command
It successfully adding to blacklist, but not unblacklisting
Do you get any errors when you try to unblacklist?
Sorry if I'm not understanding your code correctly, but on line 45 should it be this.client.user.settings.update ?
It looks like you are telling it to update the wrong thing
So it basically forgets what you told it to do with the blacklist
Hm
Thats settings.js file
In main js i have....
const Settings = require("./Settings.js");
Ah I see
I'm not sure then
I'm not familiar with that way of doing things so you'll have to wait for someone else's answer, sorry
Kk, thx for watching
@silent cloud does it unblacklist guilds successfully ?
then I'm pretty sure it should be this.client.user.settings.update instead
either that, or you need to remove settings from wherever you use it
e.g. this.client.user.guildBlacklist instead of this.client.settings.guildBlacklist
wherever you use it
Oh lets see
you're updating this.client.user but you're checking this.client.settings
and you're also checking this.client.user.settings below the guild (un)blacklist
you're checking too many things that make no sense together
np
class Parent {
get isOfType_1() {
return false;
}
get isOfType_2() {
return false;
}
}
class Parent_1 extends Parent {
get isOfType_1() {
return true;
}
}
class Parent_2 extends Parent {
get isOfType_2() {
return true;
}
}
Guys is this a good practice or I should create a boolean member?
mfw i thought that was java
wdym?
best way to learn is to practice
make an extention of client or smth
and run your bot
I would have random instances of both the sub-parents in an array.
Then later I want to know if the instance is of what parent.
^
Would you like to appoint a therapy session or a development assistance?
asking for help but not saying why
But where's the fun in describing the problem and getting help immediately? 
why not both
Because development and mental health are not coexistent
that moment when ur trying to play ur favorite game
but they have maintaince
because of an update

So I wonder why
Same LOL
Let's go through this together
Sorry I’m new..
Are you familiar with JavaScript?
A bit..
Why are you developing a Discord without basic knowledge of JS?
Just uh, help me

If you had a slightest idea about how JSONs work
Also, what's the error JS is outputting
What's new, right
Don't waste your time with him
Bruh
Are you sure no error is being outputted and that you're not silencing them code-wise
Yes
Quite a confidence
Shows that it's successfully loaded
So what’s the problem? @slender thistle
leave command not working
it says leaved success in console but not leaving voice
code
case 'stop':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
if(server.dispatcher) server.dispatcher.end();
message.channel.send("Leaving...")
console.log('Leaved Succes')
}
if(message.guild.connection) message.guild.voice.connection.disconnect();
break;
@earnest phoenix learn basic js
And no it’s not showing any error
what problem
@rustic nova
Then give me the fucking reason is it showing a fucking error no right? Then wtf
then debug it
what is the problem i am saying
i know some js coding
It’s just not giving a embed response @glad violet
How do you call the function itself?
There's no run property in the returned object when you require that file
oh there isn't
I wonder why?
Maybe because they didn't set it in the module.exports part?
Specifically, you create a function run
and not attach some function as a property run
Applying some common knowledge from scopes and general common sense, that's not what's supposed to be done
Bruh, I’ve installed a package to make it work 24/7 and that’s why I have to use run rather than execute

That doesn't matter in this case
the name isn't the problem
Then what?
The problem is how you create and use (rather, not) it
Let me show you
See this piece of code?
See this?
Ye
Lemme see
Don't use an interpreter
use your common sense and JS knowledge
k
Now, if you were to do this and keep index.js the same, what do you think really happens?
I'll be pissed both at myself and JS for a sec, brb
👀
let x = args.join("") || message.author.displayAvatarURL({ dynamic: true })
How can I make something like this work where if args is nil it makes it the avatar
maybe shiv should take a break from this channel
its why I've been less active 
Take a break from discord and focus on your assignments 
I got all done today flaz
.<
>:(
Gg
now ima go gaming
shiv stargirl what
so i have this line
const bot = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] });```
i want to add ShardingManager there
something like this
const bot = new Discord.client({ shardCount: 'auto' });```
how to make it so that they both get included?
thats not how shardingManager works
That's the internal sharding
can i gets help#development message
oh is it
im just reading an idiot's guide about sharding
because i heard it's a serious stuff needed after passing 2000 guilds
are you in 200 guilds
@slender thistle worked
Thanks I guess..
oh ok thanks
Wonders of JS
JS is pretty good
But sometimes doesn't make sense to me
Yangire? I wouldn't say so but I don't mind if it is
let x = args.join("") || message.author.displayAvatarURL({ dynamic: true })
How can I make something like this work where if args is nil it makes it the avatar
no its js








