#development
1 messages Β· Page 762 of 1
it does sometimes still come up
is this for js tho cause thats what im using atm ?
oki π
the gateway today is not the same as the discord gateway back in 2016
i'm guessing the client had to make an additional request to get the user's nickname
hence the exclamation mark
but right now the entire member object is sent through the gateway/rest
so the exclamation mark is obsolete
no idea why it's still in the client
uh
i know
that's not what i was talking about
i was talking about how the exclamation mark is obsolete but the client still does it
oh yh
The ! is for nicknames i think
Ahm. how do i count every member on all the servers my bot is active on?
including bots?
excluding bots
hmm
from what i see, youll have to do something with client.users and user.bot
not very good with collections, sorry
ah nP. π
dont use <Client>.users.size
if you want a real count
thats only cached users
to find a true user count you have to iterate through each guild adding their member count together
(and make sure each user is not a bot)
<Client>.users.size seems to give undefined anyway
What would make every user including bots be like then?
hey, idk if this is the right place to ask questions, but could someone help me? I'm trying to have the bot check for answers from the people in my server, and then respond if that person was correct or not
you can just use a foreach on <Client>.guilds
@earnest phoenix try to think of commands on your own
@modern summit please dont do that
would a collector work?
don't ask questions?
oh ok well
wouldnt args be something after a command
@modern summit sending everything separately will get you ratelimited and API abuse
use block quotes
youll get delays
block quotes r still handy
well I wanted it formatted neatly
you can either use block quotes or put \n at the end of each part and send as one long long string
\n is a neat whitespace
latest ye
Package.json
so you are following a tutorial to make a discord bot?
did you run npm i discord.js?
ok ur using v11
use awaitMessages
okay maybe a trivial pursuit bot wasn't the best place to start lol
you can try using the example as a learning point if its hard
no, not really I know C# alot better
and I've heard that js is commonly known as the easier one
I should probably learn js either way though
An unofficial .Net wrapper for the Discord API (http://discordapp.com) - discord-net/Discord.Net
look at which you like
pssstt....https://github.com/Quahu/Disqord
well
it really depends on what you're planning on doing/doing right now
js is not for everything
try using js to make a desktop app
I'm planning on going into computer science / game development , and I'm currently just dicking around in unity
electron 
its best to stay on your main language, but if you want you can branch out
id recommend youd stay on c#, its easier
well c# is also better for game dev
and u can make native apps
that too
its easier for them not generally*
generally js is easier yes
it is generally
aight so time to completly uninstall node.js lol
lol
i miscommunicated but oh well
C# looks alot more "english" to me than other languages
like it looks easier to read to me
nO
what discord asks*
thats not how that works lmao
What a useful answer
im tryna respond inbetween karaoke
but basic rule
NSFW Content in anyway shouldnt not be able to be sent in a SFW channel
what defines nsfw content
gore, porn, etc
Something that shouldn't be viewed as a child or at work
Not safe for work (NSFW) is an Internet slang or shorthand used to mark URLs and hyperlinks which link to videos or websites pages that contain nudity, intense sexuality, profanity, violence or other potentially disturbing subject matter, which the viewer may not wish to be seen looking at in a public or formal environment, including a workplace, school or in a family setting.[1][2] NSFW has particular relevance for people trying to make personal use of the Internet at workplaces or schools which have policies prohibiting access to sexual and graphic subject matter
and no links wouldnt be tollerated
@glacial anchor an easy fix to this would be to just lock all links to NSFW channels
so p0rnhub links are π
wait but if a website has a thing like "are you 18"
lol
is this still nsfw?
@tidal relic that is way overkill
No
technically thats what the NSFW channels do
no shit im not locking the whole bot on nsfw
@modest maple but if the website itself has it
is this fine? or i still need to make an nsfw filter
If there's no way to easily check the rating, which was your problem in the first place, then why not?
no as you're still sending it, if that link has a chance of having an NSFW Preview etc its still counted
Unless you want to manually make a request to the NG post to check if it's NSFW
if a command has potentionally nsfw content, it has to be locked to nsfw channels only

ok so im locking all commands besides song stuff nsfw only
any thumbnails descriptions etc.. are π if they contain nsfw stuff
as i cant make that filter because of the shitty web scraper
so whats that command again
i mean you could
msg.channel.nsfw?
which lib
i think its is_nsfw() which returns a bool (python)
if (<TextChannel>.nsfw) { return <TextChannel>.send("uh oh") }```
rtfm
?
Sure
doesnt work
Wait did you just copy and paste exactly what you wrote
if (msg.channel.nsfw) { return msg.channel.send("uh oh") }```
...which would explain how you have a syntax error
because what you're doing is
checking if the channel is nsfw
and if it is nsfw, return out of it
you want to do the opposite
yes
before msg.channel.nsfw
negate the boolean
Should be
fucking penis vagina sex
i mean, those are the first words i came up with
ok, im gonna go sleep
i swear if it goes down again
im gonna be so mad
Has anyone every tried to make a userinfo command that would work on people outside of the server?
Djs I know how to do it jsut wondering if any big bots have it
@weak parrot isn't that what Jack does?
Yes and I have seen a couple other bots who do it but I don't do JS
how it usually works is
try to find user in guild -> if not found look up your user cache on the client -> if not found use fetchUser which will return basic info on the user regardless of shared guilds
In C# you just use DiscordUser rather than GuildUser π©
Both libs. Both D.net and DSharpPlus use
Guild and Discord user objects (granted there are other C# libs but generally they're not really work talking about)
Both do their job so
.
doing it's job properly?
what a joke
d.net is so broken
i used it for a while and still use it to this day in some projects
im going to be migrating to disqord though
Uhh what? What would you define as "broken"?
half of the things don't work. CacheMode? doesn't work, casting Socket types back to their interfaces and then force downloadng in cache doesn't work, the lib makes 4 extra unnecessary requests to just call one endpoint
etc etc
plus d.net is missing out on so many features the api offers right now
I do agree with you on the last part as for the rest never really had to deal with it.
If I can program a bot using a library I wouldn't call it broken but I do agree that it has quite a few flaws
i just generally suggest using dsp over d.net right now
i still have to try out disqord
which is supposed to be extremely low allocation
Hmm might look into it myself however as it's 03:35 I will be calling it here 
is this correct im getting a error bc it cant find the channel id or name its discord.js
That depends, do you pass channel in your command handler?
is channel your message 
because you do channel.guild
channels do have a guild as well
but it's more common on a message
and messages have an id too so I actually dont know
this is a event to log when a channel is deleted
adding guild didnt do anything
my channel create event works but not the delete event
idk why it wont work ive been at it the past 40 mins
can you just copy paste the code real quick?
I know the picture
But I'm going to try it in mine
module.exports = (bot, channel) => {
let logs = channel.guild.channels.find("name", "server-logs");
channel.guild.fetchAuditLogs({'type': 'CHANNEL_DELETE'})
.then( logs => logs.entries.find(entry => entry.target.id == channel.id) )
.then (entry => {
author = entry.executor;
const embed3 = new RichEmbed()
.setColor("RANDOM")
.setTimestamp()
.setDescription(`**Action:** Channel Deleted \n**Target:** ${channel.guild.name}\n**Staff:** ${author.tag}`)
.setThumbnail(channel.guild.iconURL);
logs.send(embed3);
})
}```
you could try logging entry in the find block and see the difference where target is undefined, or simply check if the prop exists as I assume that's what's throwing
channel.id is what is coming undefind from what i belive
https://oliy.is-just-a.dev/xsyevg_2567.png it literally worked for me
you did channel.guild.<...> so I don't think that'd be it
what was it?
const {MessageEmbed} = require("discord.js")
module.exports = (client) => {
client.on("channelDelete", (channel) => {
if(channel.guild.id != "501853552835297280") return
let logs = channel.guild.channels.find(c => c.name == "staff")
channel.guild.fetchAuditLogs({'type': 'CHANNEL_DELETE'})
.then( logs => logs.entries.find(entry => entry.target.id == channel.id) )
.then (entry => {
author = entry.executor;
const embed3 = new MessageEmbed()
.setColor("RANDOM")
.setTimestamp()
.setDescription(`**Action:** Channel Deleted \n**Target:** ${channel.guild.name}\n**Staff:** ${author.tag}`)
.setThumbnail(channel.guild.iconURL);
logs.send(embed3);
})
})
}``` I changed it to meet how I set up my events and that I'm on master, but that shouldn't matter
ugg this is stressfull
can you try logging entry to see what you get
this is how it loads the events
It doesnt get to entry
it does though, it's line 6
yeah, line 6 is .then( logs => logs.entries.find(entry => entry.target.id == channel.id) )
where it says it cannot read property channel of undefined
meaning channel is undefined
which it was used before so it shouldnt be
yeah, so it gets to entry, which I assume target does not exist, and throws Cannot read property 'id' of undefined.
its id of undifined
which is the message: https://discordapp.com/channels/264445053596991498/272764566411149314/662525154588491815
so why would it error for me but not u?
how would i clear cache ?
do what they said and log entry
not clear it
for some reason your target is undefined
console.log(entry)
return entry.target.id == channel.id
})
)``` should suffice for that I believe, it will most likely still error but after logging the entries
I have no idea if that is syntactically correct
actually it doesn't really need to be logged, more just guarded with checking if .target is valid
https://oliy.is-just-a.dev/ikmha_2569.png .target shouldnt be undefined that's what confuses me
did it log the entry
docs bad
taget is defined for Steven but not my side for some odd reasson
yeah idk
this is a mess oof
let me try putting it in the main file instead of its own
ok same error :/
incase i did it wrong
ok i got it
sort of
i just removed the target and cvhanged it to this bc thats the only way it workd
at least it logs now
The api purely returns the id of the target
Don't know how discord.js handles that
I'd assume they simply use the target id and grab the "target" from your cache
The channel is deleted so it isn't there anymore
I'd expect it to at least give you the target id but guess not 
does anyone have a good string for messaging
i want my bot to be able to message some a response instead of putting it in a chat
msg.author.send()
yee
Does anyone know how to find the difference between two arrays in js?
any changes made, i'm trying to finish the logging feature on my bot and it would be quite helpful to be able to say what happened to a given channel/role
o wait figured it out
['muffins','are','cool'].filter(x => ['muffins','are','yum'].includes(x)) //['muffins', 'are']
now for me to figure out how to get the ones that have changed
for docs discord.js version master, it's normal that we don't see the event raw ?
Thatβs because raw is an undocumented event
ok
how do i find something that's 0 in mongo?
i tried { "punishment.amount": 0 } but it doesn't work properly
hm
Can anyone give me a best example for making a toggle switch button working with database boolean value(if db data is false then switch should be off and if db data true then switch should be on)
And can change db data with that switch
Language, db ect?
Html, js firebase
Oh for in a website xo
If your hosting has an API you can probb fetch the status.
Else maybe try to exe a fetch or smth from ur db and check if it raises any error.
Β―_(γ)_/Β―
But have that data value and i want to make a switch for change it and show for switch status
@ruby talon
Can discord bot maker bots become 7/24 active?
oh, I believe this should work.
(I don't have experience in js)
mybool = ! mybool
Ah
@earnest phoenix buy a VPS
Ok
for make 24/7 online
damn 7 hours per 24 days
xDD
Normal humans: 24/7 and DD/MM
Americans: 24/7 and MM/DD
Turks: 7/24 AND DD/MM
π€¦ββοΈ
shivuwu π
How do I get the top 10 players with the most Int value in MongoDB normal driver NodeJS?
like the top 10 players with the most points or something
Sort DESC and indeed use LIMIT 10
It might get a bit harder if you want to get users from one guild, but that depends on how you set up your db tables
just add a WHERE filter
nobody noticed he said MongoDB?
anyone help me
(node:4860) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:4860) UnhandledPromiseRejectionWarning: #<Object>
(node:4860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:4860) UnhandledPromiseRejectionWarning: #<Object>
(node:4860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)```
Who pinged?
@storm bluff if it's using async/await you should wrap it with try/catch block, if you use the .then() syntax then you need to append a .catch()
ok thnx @eager spoke
How do i make a bot online
what library do you run your bot on?
discord.js
run node . or node <start file> in your bots directory
what is the output*
did you put <client>.login('token here'); in your start file, and run node index.js?
if so, what is your command lines output?
well
oh
is the bot outputting an error?
no when i type node . it doesnt do anything
try node index.js
in your bots dir*
where ever your directory is?
(the folder of your start file, and libraries)
' Error: Cannot find module '
npm i discord.js
@earnest phoenix i suggest you learn the basics of js before attempting bot making
Were dat at?
https://discordjs.guide/ <- read this and learn basic javascript
I have a question. I've just finished updating my bot and made some big changes. I'd really like a message to be sent to guild owners with info regarding the changes.
I remember speaking to someone about a month ago here regarding sending a DM to the guild owner on bot join and was told that it's bad practise. I'm not sure if broadcasting like that would also fall into bad practise?
thats not bad practice thats API abuse
i mean it is
i think by broadcasting, sending a message to all guild members
you would be sending potentially hundreds or thousands of messages to users in a go
it would depend on the amount of guilds the bot is in
72 and Guild owner only.
that would be API abuse then
Oh, every guild owner. I didn't see that. api abuse
I didn't think about API abuse 
you could try updating your bots page, or maybe warn in its status
I'm trying to make a dashboard
I have a boolean value in my db
And i have a toggle swith on/off button
How can i show my switch default status with that boolean value
Like if my value true then switch should be shown default on automatically
Im using html,css and js
do you have a backend server
Yes i defined my boolean value correctly there
then just add an endpoint in the backend to return the values
on page load make a request to that endpoint and give the checkboxes/switches a default value that the request returned
Can you give me example plz actually im very noob in html
uh
...no?
do you even know what a backend is
Im stuck there from morning
No
π³
then why are you saying you have it
a backend server is mandatory for something like a dashboard
you cannot just give the end client your database credentials
I have that
Ill dm u a link u can check
i don't have my dms turned on
Can you accept my req please
I really need help
i accepted it
but i won't spoonfeed you anything
fun fact
(for something that was talked about earlier)
if your bot got updated, dont "broadcast" whatever changes there were
you can just say in the help command that there are new changes that you can view with a specific command
thats what i do anyway

broadcasting updates does more harm than good
i just used a central server for all updates
etc
i want to get back into public bot deving but i dont wanna deal with low iqs that dont know how to use the bot
despite it literally saying how to
yeah i just put instructions on the extensive commands but honestly most of the times people just do whatever
so sticking to the mainstream ways of command usage instead of implementing other ways rip
if they cant use it
not my problem
even though im the dev
so i just tell them to read if its basic
How would I align an <a> tag to center in html using css
I tried text-align: center; doesn't work
<center><a></center> does work but w3schools says it isn't available in html5, how would I do it in css
I'm not much familiar with top, can you tell me how I would do that?
you can do percents as well
you can do left as well
which moves it from left to right 
Ah, well it's basically the same thing in the other directions
thats an extra parenthesis, is there something above that needs a parenthesis?
yes
you're missing one at line 19
to close exports.run function
wait
why do you have module.exports.run and exports.run inside of it
hey so how do i check if a voice channel has no other people?
is there something like <VoiceChannel>.size?
<VoiceChannel>.members
doesnt work :(
@fleet chasm whats the script?
const vcSize = new VoiceChannel.members()```
or whatever it is
wtf
i cant spoonfeed, but vc.members returns a collection, from which you can get the amount of people in the vc
and then how to fetch its size from that collection?
vc.members.length?
might sound stupid
A collection extends a JavaScript Map
How can I delete someone's user id from a map he's in when i use a command? (with no args, normal command e.g !close)
<Map>.delete(key)
hey how do i figure out if an emoji is a normal emoji and not a custom emoji in discord.js
ur fast arent u
say if someone was to input "π" it would pass but "
" wouldnt
it contains every unicode emoji usable in discord
ur fast arent u
well... π
how would i use it

@grizzled raven i know mate
I try to make a ticket system which you can close with reaction or you can force close it
how would I do a command that when like 2ppl in a public voice channel and they run the command that it gets locked till they leave the vc?
parse the json, go into the emojiDefinitions array and check if any of them contain an object whose surrogates property is your emoji
and if you open one, you get registered in the map so you don't spam it.
And when I close it, i want the guy who got registered to be deleted from that map.
I can use mentions.members.first but I don't want to, that's why I don't know how to do it.
well if they are linked, do <Map>.get(message.author.id).persontalkingwith.id or whatever
That's the problem
I'm the author of !closeticket
And I want his id to be deleted.
so in the map, have their name
use a database to store the important info
user*
I suck with databases
tried for a xp system
well, get better at it
bruh sounds simple eh?
if youre gonna have a 4 week ticket then use a database
mkay
in memory maps or relying on discord channel names isn't reliable and you're asking for your bot to be broken
i've made just that in c#
the ticket with reactions i mean
ok
the reactions went perfectly
But i want to add additional commands.
i can point you on how i structured my database models
for the sake of it
Its okay.
I'm gonna use the member.mention.first until i advance to databases
just keep in mind that relying on channel names or on just maps isn't really advised at all
Which would you recommend? I used mysql in the past.
for something as small as tickets i think sqlite is good enough
if you ever need a reference on how to structure tickets, this is how i've done it and i guess it's pretty effective https://hatebin.com/npvqqlfpfe
make a GET request to it and parse the body of the (returned) request as json
c#
k
i don't know
use literally anything that supports getting the body out of a request
i did a small implementation of the json and it works
this is only a small implementation and shouldn't be followed though
well that is c#
http doesnt work with https, and changing the https to http and getting it doesnt work
but
How would I turn my code like this https://mee6.xyz/assets/24bc792ca004b2cf080d.js
That's minified + did something to be like that. It is hard to understand
Lots of sites are like that
obfuscate it
That goes different than that
because you googled js obfuscator and went to the first website that does it for you
i don't know lol
All those sites' js files starting with !function(e){
i don't work with js nor do i obfuscate it when i work with it
Oh then no
never, and i mean never, expose any credentials or important information to the end user
Why are the obfuscating it then
so people can't easily steal it
But I can't get a way to hide it
use cookies
Noob in using cookies :/
ok and
If I use cookies, I can put api keys?
what's your end goal here
because this just seems like http://xyproblem.info/
Asking about your attempted solution rather than your actual problem
What I'll do is basically let's say you click a button, it'll make a request to my api which must be used only by me using an api key to verify its me, and then return response
there's not really a reliable way to do that other than make a secure logging in system or require the user to manually input their api key
that button is in my website btw
The end user is a user of my website which has to display a data from my server when the user clicks a button
I can hide the api key, api link by making an internal request but still the user can exploit it by sending a request to my website
there's not really a reliable way to do that other than make a secure logging in system or require the user to manually input their api key
require the user to log in first
either with discord (which is an easier implementation just using oauth2) or make your own
they can't see the backend
They can just request it using code, can't they?
Not logging
After logging, they click a button
I need to get data and display it
That code will be visible
make an endpoint in your backend that returns said data
you'll know whether the user is logged in or not in your backend
But when they click login, I just want to login them and then they can click a button that will display data
More like dashboard
Let's say they update prefix
They put the prefix in input and then click button
Then the website would make a request to my bot server which will return a response to verify the process is done correctly
But I don't get how it gonna work in your way. What you say is this right
you have to have a backend for this sort of stuff
Me as a user > clicks login > authorizes > backend stuff display data > i see it
basically, yeah
But what I say is me as a user > clicks login > autorizes > goes to prefix update page > enters prefix > clicks "update" button > send data and receive successful response > display "success"
Whatever I put in button onclick code, it's visible to them
Ok, tell how I'm going to go to backend from clicking button?
what?
your backend serves everything
you simply add an endpoint which allows prefix updates
while in your frontend your onclick just calls that endpoint
That "endpoint" is visible to the user right
yes
So my question is can't a random user send a request to that endpoint?
just add auth to it
you can choose how you handle it
if you implement oauth you can check whether the user's logged in or not
there are a lot of documentation online explaining how oauth works
So if I make it like the user should be logged in, no code can send a request right?
Can you get me a good doc? There's like tonnes and I may end up finding a wrong one and come here again
This post describes OAuth 2.0 in a simplified format to help developers and service providers implement the protocol.
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
Thanks
ok i am not sure where to ask for help so i am going to ask here anyways i got this error Detailed description too short. Minimum 300 characters. If you use iframes, you need to add something extra... and i am useing an i frame shuld i just spam the rest of the description with dots...?
What bot was that.
check if zero width space works
I can't find any bots being declined for that reason under your name all I can see is your bot was offline.
no i am trying to update the bot info on the site
just add a massive comment 
'
I might suggjest added a list of commands or something
but im not the expert. Spider is
ted no
yes i have re applyed but now i am trying to update the info of the bot
have you read their message at all Ted
like i said try using zero width space
it has zero width but is counted as a char
i dunno if dbl filters it though
i dont think so
idk what zero width space is and how to get it
google exists
yeah that doesn't help
it very much does
you're just lazy to do it yourself lol
u know what i am raging rn from what u said!
good for you!
lol
the audacity of this bitch! they told me to do something i am perfectly capable of doing!
you're just too lazy to do it yourself because quite literally the first two results on Google provide information you need
no i am not lazy the problem is google
do u have any idea of how hard it is to try to remove google from your life
This is what Grovy did for there long decription
alternatives exist...?
ddg/bing...
so i dont get what is the problem here
yes there u go duck duck go boom best thing ever
im guessing you have an issue with ddg also
the problem is that we are in 20 20 and people (me included and you too) get very esaily offended
every search engine sucks
VERY ESAILY
you spelled easily wrong
no suck
i am blocking you
also no i literally never get offended
you dont get offended over someone telling you to google something lol
if you cant handle that then i dont know how you get around the internet
i hope you're aware discord is on google's servers
u say search it insted of google it very ease thing to do
ok anyways thanks for the help april
i will try the blank icon char
well not anymore i blocked them and now i can't see any of there messages
their
tfw you don't know the difference between their there and they're in 2020
@earnest phoenix google it 
This would probably be a less used feature but it would make your bot more moddable without people seeing your code, you could use websockets and allow people to add commands with an open websocket, they would make a command, and the bot would be able to run it, as soon as they close the websocket connection, the command is removed from the bot until they open the socket again, and this feature could be toggled for servers that want to use extra commands made by people, also, if you get your bot on top.gg that would be even better cuz more people will use it
It would probably use an on_message event
And when the command, lets say I made coolio a command, if {prefix}coolio was ran, it would send message to the websocket client
And it would send data whenever it sends a message
Then the output data (e.g. messages to be sent) are sent back to your bot, and then sent to the server that uses the command
I'm planning on implementing this in python
Would this class as a big feature btw?
Please ping me if you actually read it, and tell me what you think
To be quite honest, I don't think you would need a separate websocket connection
Fairly sure you could just make a dict that you would edit whenever a command is added/deleted
But the person who made the command is hosting the actual command @slender thistle
"Hosting"?
Huh
The websocket is just sending the data it needs back and forth
Well I can definitely say it isn't a simple feature
Yeah, do you think it would be a good idea/feature tho?
Trusting average Discord users to use websocket connections... I wouldn't really say it's good because of that
But if it's an actual programmer that is using your bot, it might come in handy
Yeah, and I'ma probably add a rate-limiting system that prevents people from spamming messages, so I wouldn't spam the discord API
Sounds better
Nice, anything else you think I should add to prevent abuse?
Prevent stuff like while True etc ig
I know someone already made a bot that does something similar to this. It allows you to add your own commands written in JavaScript. It has a 10ms timeout on all commands and some other stuff to prevent abuse. @spark star
Nice, thanks
np
also, it's open source @spark star https://github.com/braindigitalis/botnix-discord-cpp
Can anyone give me a example in html js
If my a value is true then my toggle switch always shown at on else off
ik about statements but didnt know much about html, css@west raptor
hi im new
how do u add cmds?
assuming you're using discord.js
ye
https://discordjs.guide/ this is a pretty bueno guide
ok
Anyone here good with PHP/Python?
read through it cuz it has some dank content 
Python intermediate here
Me too
(JDA) Hmm How someone how can i get Youtube API ? π€ For music Bot (Unlimited or sth)
you cant get unlimited yt api key.
get from google cloud youtube api v3 key, and you can use it 10k times/day
Help to understand I can not understand how to make a comparison of the role of the bot with the role that link
@green kestrel didn't you make sporks
@late latch I would say check if the IDs of the role you're comparing matches up with the Id of the role you want to compare it against
@modest maple brain did make sporks
Is there any space that discord wont detect on channel names? (not really developement question, but anyway)
Dont think so
To get the space you might Be able to use like a blank space unicode or a black space emoji
found Β \u2009
Not sure if the discord channel names will actually accept unicode but maybe
Does json { "a": "b" }
const a_and_b = require("./json.json").a``` work?
Wouldn't that just give you "b"
y i wanted to know
Well it's a dictionary
if you want to know, then run the program
a is the key
What I need is to get the position of the bot role and compare it with the position of the role that they want to choose through the argument
function checkPermission(message, minID) {
return message.member.highestRole.comparePositionTo(message.guild.roles.find(io => io.id === minID)) >= 0;
}
Something similar, but a little different
@hushed glacier dont ask2ask just say your issue
Hey
Ok
Does anyone know how to use ffmepg?
How I tag A Member
If you want then tagged at the begining then say message.reply
How do you download ffmpeg?
what programming language
are you trying to use it for music?
Yes
use Lava link rather than ffmpeg
Is it python or js?
both
LavaLink itself is in Java, but you can use wrappers in nearly every language
I am familiar with ffmpeg
But I don't know how to download it
How to download FFMPEG itself?
NPM: npm install ffmpeg-static
Download FFmpeg from the official website: https://www.ffmpeg.org/
Youtube Tutorial by Crawl: https://www.youtube.com/watch?v=SW-iKrT_nJs
Alternatively you can install ffmpeg via chocolatey, homebrew or your distributions package manager
@modest maple yeah sporks is mine
I have chocolatey
Hi!
yes
@timber cairn fun fact: you can use normal cmd for installing npm packages if youre o right directory.
of development
ok
offensive
its to look for help in developing the bot
yeah i need help
It's to talk about bot development, so talking about your bot is included in that
oh yes my new bot is the most revolutionary bot that ever exists
can you give me tips on what to use for communicating bots
wdym
ones that can speak to you
i use botghost
oh
stop right now
sad times
why stop
ok
and im not gonna help with that
i'll just ask one thing though
did the discord developers make this place
well that's basically being rude to botghost


if you want any sort of modifications you cant use botghost
not really
no
like
just learn to code pls
learn a programming language and learn a skill for life
ok
u can actually get a job if ur good at it
OH MY FRICKIN' GOD I'M IN

We do not provide support for discord bot maker here however we do allow the bots to be submitted here as they have a level of modification that is alright
OK
easy on the caps.. lol
What Is The "limit" Of Characters In Activity /Status
probably 128 or 256 chars
Out of curiosity, I know a lot of people make their database on mongo, I have a windows server and was wondering how to properly set one up on there?
Not how to do it, just if it's possibly for someone who is a basic at coding discord bots in discord.js
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.
oh
I'm slow sorry I'm so new to this
I appreciate it thank you, and thank you DVSAEZI for the screenshots. :D
eep
is there really even a point in having more than one shard if your hosting service doesnt have multiple cpus?
im required to shard with my bot bc it is in over 2500 servers, but i dont have multiple cpus in my hosting service so havign more than one shard seems kinda useless
you can do it so it doesnt use an entire new core per shard
sharding just splits up the bot into multiple processes, its not the same as splitting over multiple cpus/processors @near ether

ah ok
otherwise Pokecord and rythm would be screwed xD
lmaoo true
Weird Thing Is Happening to me
So when I am using pm2 start <File Name> The Bot does Start But It doesnt "dm" Me For A Command
But If I Use node <File Name> The Bot Works As It Should
(If Both Methods Are Working Then Normal On Channel Commands Work Twice)
d.js
Vultr VPS
oe
eo
lets not do this in #development
const fetch = require("node-fetch");
var url = "https://www.worldometers.info/"
var res = await fetch(url).then(url => url.json())
console.log(res)
}
world().catch(e => console.log(e))
Anyone can help me xD
you're not getting a JSON as a response youre getting something else
how would I get the json as a response?
well that kinda depends on what ever the site is doing
atm ur sending a request to "https://www.worldometers.info/"
yeah
and expecting a JSON back
is it supposed to be sending a JSON back
or is doing somthing else
hint: Its not giving you a JSON its just a website
When I try it with Instagram it gives me the thing I want.
not every site is gonna give you back a JSON just cuz you want it
so there's nothing I can't do about it?
Does that website have an API
@slender thistle nope else I wouldn't try that.
Understandable
Yeah, as cf8 said, scraping the website is the only viable option left
How would I do that




