#development
1 messages ยท Page 1716 of 1
message.split(' ').slice(1).join(' ') or message.split(' ')[1]
What port is better 3000 or 5000?
no difference
๐
Is this way to get a stylesheet valid: <link rel="stylesheet" href="https://raw.githubusercontent.com/kasparnoor/minecraft-logs-processor/master/style.css">
It's making the request but the css isn't applying
https://imgur.com/a/pbL1o9S
clear the cache
Guys can u help me with this ? https://srcb.in/C3fIYfDBDa this is my beg, it gives the coins but I want to remove coins for the user that gives the coins
How do you show the number of servers our bot is in? I have been reading #topgg-api but it all goes over my head ๐
hey
a user just voted for my bot
and in data it shows this
but when i check if the user voted
it shows false
whats going wrong?
what are you trying to do, send a dm to the user?
@zenith terrace yeah
it sends the dms thats not the issue
the issue is that the server doesnt really recieve the upvote, or add upvotes for me
guys pls, I need help
anyone any idea?
i mean, the error says it cant send messages to the user
what exactly is the problem?
are you storing their vote in a database?
show code
wut
hm
it means he do not accept messages so dms.
@earnest phoenix its not that part
it shows that the bot has received an upvote
when i check if the user upvoted the bot, it shows false
ah okay
meaning the user upvoted the bot, the bot recieved the details, but however server side didn't get upvoted
do not question my ways
do you know da wae?
do you wanna have a Bad time?
how to see in how many servers our bot is
please help
Which lib? Discord.js?
py
Yeah that should work
And it's guild I guess
Client.guilds
Just check in the DOCS once
Not sure
Im using servers for my rpc
If its changed in new update then idk
Whats not a thing?
It's amazing how people manage to use the weirdest variations and then give very unhelpful advice
Like, if you were actually up-to-date with dpy you'd know it's guild for server and server isn't used at all

Your RPC isn't dpy so
client.servers is about 3 years out of date.
let bonk = {resolve, reject}
if(tim) bonk.reject(pat())
else if(stargirl) bonk.resolve(bonk)
a loop for you
what?
@tired panther yes i need help for some cmd
i need to put vote required condition in few cmd s
I have a command on my bot that sends how many servers itโs in itโs possible
how can i do
can someone please help?
a user just voted for my bot
and in data it shows this
What does that got to do with anything
Plus that's API abuse
can someone please help?
a user just voted for my bot
and in data it shows this
but when i check if the user voted
it shows false
whats going wrong?
I made a music command but I don't find how to say Invalid URL when it's an Invalid URL
It's discord js
Can someone help me ?
how are you checking if the user voted?
@quartz kindle
different ways
one is getting all the users who voted for the bot
then checking if the user voted via the has_voted function
etc etc
i think 4 different ways
it all shows negative
however my bot shows that it recieved the upvote
from the on_dbl_vote
if youre using webhooks to receive votes, then you shouldnt be using any of those methods
you should store votes in your own database
its the only reliable way
'format': 'bestaudio/best',
'postproccessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}]
}```
This is my code... I want to download a video with youtube_dl and ffmpeg but it doesn't download on mp3 why?
Can anyone help?
probably
I am stupid
Things work better when you type them right, yes.
My answer is based around a typo
always bruh when its a typo bc its always stupid smh
let me see if it works
ik the feeling lmao
thank you!
The typos really annoy me
ye same
This is why you use typescript
yeah, no.
You don't like typescript?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
how can i add vote required cmd in .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.
What language is easy :- js,ts,Java,py
One message removed from a suspended account.
For making bots
One message removed from a suspended account.
One message removed from a suspended account.
Depends on your aptitudes for learning.
Ok
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Ok
One message removed from a suspended account.
Your parentheses are not matched
One message removed from a suspended account.
can anyone help me host a website?
i already have the html on github
but i dont want to use github pages
It matches the example, but the example doesn't make sense
There are 4 opening parenthesis and only 3 closing
message.channel.clone().then(m => {m.send(":recycle: Channel nuked \n https://i.gifer.com/6Ip.gif")} , message.channel.delete() )```
I managed to duplicate a channel, but how to put it in the same place in the category as the one I have nuke?
Cloning the channel doesn't do that? 
If not, you can just use https://discord.js.org/#/docs/main/stable/class/GuildChannel?scrollTo=setParent
ReferenceError: Discord is not defined
at /home/runner/topgg/index.js:1:16
at Script.runInContext (vm.js:130:18)
at Object.<anonymous> (/run_dir/interp.js:209:20)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47Hint: hit control+c anytime to enter REPL.
this error in my repl
looks like Discord is not defined
const Discord = require("discord.js");
Show the code
hmm
So I have a base 64 (first time working with it) I need to send that image data to this api but I get request entity too large. It has to be less than 10 mb it says. I am not really sure how I can compress it or what alternate way I can do it.
const Topgg = require('@top-gg/sdk')
const Discord = require("discord.js");
const api = new Topgg.Api('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjgwMjgxMjM3ODU1ODg4OTk5NCIsImJvdCI6dHJ1ZSwiaWF0IjoxNjE2MTg3MjM4fQ.XGe486ECupPwEiO8gx6ODf2Xkxhb2dr-OaCY4kTD0jI')
setInterval(() => {
api.postStats({
serverCount: client.guilds.cache.size,
shardId: client.shard.ids[0], // if you're sharding
shardCount: client.options.shardCount
})
}, 1800000) // post every 30 minutes```
๐คญ
you know you have to define things BEFORE using them right
javascript reads things top to bottom
not in random order
You have to have it before client because client is using Discord
how to recover the position of the salon?
Define Discord at top
and use ;setPosition
What's that token even
look at the page oyu're on
look at the properties of the channel
I shouldn't have to point it out to you. If I do, there will be a lot of exceedingly obvious arrows.
you may want to reset your topgg token
Where the legitimate fuck did they even get one from
magic is strong in this server
Ok
did you wait the 30 minutes
you would need to create a web server first.
consider consulting the documentation
Or just use the library, docs are there in #topgg-api
What doesn't work about it?
_idleNext: [TimersList],
_idleStart: 1016,
_onTimeout: [Function],
_timerArgs: undefined,
_repeat: 1800000,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 6,
[Symbol(triggerId)]: 1
}
Hint: hit control+c anytime to enter REPL.
REAL ON TOP.GG READY TO SEND DATA http://localhost:3000
is that right
How does it not work
What's the error?
message.channel.clone({ parent: message.channel.parent }).then(m => {m.send(":recycle: Channel nuked \n https://i.gifer.com/6Ip.gif")} )
message.channel.delete()```
How to create a bot
???
If you want to make a bot, here's how:
Step 1) learn a programming language
Step 2) choose a library in that language
Step 3) actually start writing the bot
Step 4) ask for specific help if you need it
I'm talking about that not they don't do anything
What doesn't do anything? what are you talking about?
hmm why does that look sketchy af
It's not. It's a normal channel nuke command, it's perfectly fine.
Like this
See my answer above
Ok
they probably just want a bot account
but
why
why do u need a bot that does nothing
Yeah
first, answer my question, why do you want a bot that does nothing?
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Because my gf want that lol
I see no point in this
Well if you just create a bot account it will do nothing, and it will not come online
In order to have an actual bot, you need to program it. like actually make it, code it, decide what it does.
That is programmed into the bot.
if u still insist in making the bot account just go here https://discord.com/developers
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
I see no point in it tho, then they're probably gonna ask "how do I make the bot talk"
When I try to use wasm-pack I get this in the browser console:
TypeError: Cannot read property '__wbindgen_malloc' of undefined
Any wasm-pack pros?
https://i.callumdev.pw/lbxh1.png
Why does this create an infinite login loop, removing the login line fixes the loop and it shows the session does exist.
Maybe set session to true once you run the function?
const [session, setSession] = ...;
if (!session) {
login();
setSession(true);
}
Though doesn't make much sense for your component to re-render once you call the function unless the signIn method does something, which idk if it's possible
oh where am I rn
hi
what I gave you is completely wrong lmao

const Discord = require("discord.js");
module.exports.run = async (client, message, args) => {
if (message.author.bot) return;
if (!message.guild) return;
if(!message.guild.me.hasPermission("MANAGE_CHANNELS")) return message.channel.send(":x: I donโt have the necessary permission").then(m => {m.delete({timeout: 6000})});
if(message.member.hasPermission("MANAGE_CHANNELS")) {
message.channel.clone({ parent: message.channel.parent }).then(m => {m.send(":recycle: Channel nuked \n https://i.gifer.com/6Ip.gif")} )
message.channel.delete()
} else {
return message.reply(":x: You do not have the necessary permissions ").then(m => {m.delete({timeout: 4000})});
}
}
data => []permissions
See if the stacktrace points to some file in your project rather than a dependency. mergeDefault is a function that sets default properties on an object when it hasn't been set yet, so I'd assume it has to do with the message.channel.clone call.
siema
wtf does siema mean, go to #general-int for other languages
Hi, I am learning discord.js, and for my whois (userinfo) command, what is the thing for it to say the user's status. So like for me it says hi because my status is hi
I think you meant presence
Yes
whats the reason of "Message not loaded" for inline replies
is there a way to fix it
Hm
cache
I want my bot to send a message if someone uses a command the bot does not have the permission to use but it does nothing
@clear.error async def on_command_error(ctx, error): if isinstance(error, commands.MissingPermissions): await ctx.send('This command requires a permission this bot was not grantec please check the description of this bot in top.gg')
make the user load the message
serverCount: client.guilds.cache.size,
^
TypeError: Cannot read property 'cache' of undefined
at Timeout._onTimeout (/home/runner/topgg/index.js:11:32)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
?
explain please
@umbral zealot
don't ping random people
setInterval(() => {
api.postStats({
serverCount: client.guilds.cache.size,
shardId: client.shard.ids[0], // if you're sharding
shardCount: client.options.shardCount
})
}, 1800000) // post every 30 minutes
error
serverCount: client.guilds.cache.size,
^
TypeError: Cannot read property 'cache' of undefined
at Timeout._onTimeout (/home/runner/topgg/index.js:11:32)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
how can i solve
client is something else and not a Client instance
so i need to define client or cache
Show us how you defined your client variable
console log client to see what it actually is
const Discord = require("discord.js");
const client = "xxx"; // Your discord.js client
const Topgg = require('@top-gg/sdk')
const { keep_alive } = require("./keep_alive");
const api = new Topgg.Api('xxx')
setInterval(() => {
api.postStats({
serverCount: client.guilds.cache.size,
shardId: client.shard.ids[0], // if you're sharding
shardCount: client.options.shardCount
})
}, 1800000) // post every 30 minutes
error in console
serverCount: client.guilds.cache.size,
^
TypeError: Cannot read property 'cache' of undefined
at Timeout._onTimeout (/home/runner/topgg/index.js:11:32)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

๐ฉ
Read the link
What is shards?
Shards are separate processes running a limited subset of all your guilds
It's required beyond 2500 guilds. Before that, it's pointless and should not be done
now how can i solve please tell me
Read what's in the link
shards are not different processes, shards are different ws connections. Clusters are different processes
realistically it doesn't matter
i read
tell that to discord.js sharding.
Then you know you need to go learn more javascript, as we will not be spoonfeeding you simple code you can't even copy/paste correctly
I've no idea why you made your client variable a string, but nowhere in the history of tutorials has anyone ever said this was correct.
i can do myself bye
You can spawn multiple shards in one process with d.js
yes, I'm aware, with internal sharding, but that's new.
see you again when i am done my work
Good luck
#development message anyone? I'm still strugglin
my discord is not ok rn
I pressed the link like 30 times
and it keeps pushing me up and down and up and down
try shouting at it
did it work
no
sadge
very
๐ญ
what is the best way to store an amount of time in mongodb
timestamp
are you using js?
yes
Like i want to put a time ( 30 days ) and i want to display how much time left
unix timestamps
const date = new Date();
date.setUTCDate(date.getUTCDate() + 30);
date.getTime(); // This is your timestamp
or, you know, Date.now() + 3600000 * 24 * 30
leap seconds walk in
why 3600000
anyone had a chance to play with activities in discord? such as youtube together.
iirc erwin did
How can I ask in an if statement for the bot permissions?
client.user.hasPermission doesnt work
message.guild.me.hasPermission
isnt it going to be permissions.has in the next update anyway
idfk
It is yes.
exports.run = async(client, msg, args) => {
if(msg.guild.me.hasPermission("MANAGE_CHANNEL")) {
msg.channel.send("Bot has no channel permissions")
}else {
msg.channel.send("Bot has channel permissions")
}
}
I tried this, but I get this error
RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.
at Function.resolve (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\util\BitField.js:150:19)
at Permissions.has (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\util\BitField.js:45:28)
at Permissions.has (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\util\Permissions.js:45:85)
at GuildMember.hasPermission (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\structures\GuildMember.js:271:24)
at Object.exports.run (C:\Users\Flo\Desktop\Discord_Bot\commands\test.js:3:21)
at Client.<anonymous> (C:\Users\Flo\Desktop\Discord_Bot\index.js:49:14)
at Client.emit (node:events:388:22)
at MessageCreateAction.handle (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Flo\Desktop\Discord_Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31) {
bit: 'MANAGE_CHANNEL',
[Symbol(code)]: 'BITFIELD_INVALID'
}
hasPermission method is outdated
You're missing an S at the end https://discord.com/developers/docs/topics/permissions
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Thank you it works :)
@quartz kindle are try/catch blocks generally for synchronous code? meaning it would make more sense to do .catch() on promises? or does it not really matter?
can u host php websites on vercel?
try/catch can be used for with async/await
and they did
well I know it can be but should it?
pretty much the same as discord, it boils down to what wrapper you find for it
do note however that discord is far more supporting to bots than twitter/twitch/etc
but how to find API TOKEN,API_SECRET
probably in your desired twitter account's config page
doesn't that tutorial show how to get it?
how can I remove the @everyone role?
member.roles.cache.map(role => role.toString()).join(", "
.filter it before .map?
He just say how to get TwitterID
dot dot dot
yk, being a developer is 70% knowing how to google
MessageMentions.EVERYONE_PATTERN regex for role, be warn, it's with g flag
how do I use that?
OK,i try
I'm here ๐
@cursive ridge Top tip for u so u don't have to constantly reset ur bot. If ur using discord.js, put in the package.json file "dev": "nodemon ./<files>" then in console type 'npm run dev'. ๐
what does that do?
how do i use .filter?
automatically resets it 2x as faster
so when it detects an update/save it will update
oh but when its in the index file changes
I don't think it would work right?
only for commands?
it will work for any file that updates. I have it with my bot
Now i'm not sure ๐ there is some way to detect is Role everyone
i have mine set to ./src/bot.js and it updates for every file so its fine
Ok cause i use an update command, and when I change one of the pages, it updates the code, but when it's the index file, I don't think it's doable
Ok, I will look into that, thanks buddy!
Found, guild.roles.everyone.id is the id you need
.filter(r => r.id !== guild.roles.everyone.id)
member.roles.cache.map(role => role.toString()).join(", ").filter(r => r.id !== guild.roles.everyone.id)
This?
put itright after cache cuz.join returns string
member.roles.cache.map(role => role.toString()).filter(r => r.id !== guild.roles.everyone.id)
oo at .map you modified each item, more left
member.roles.cache.map.filter(r => r.id !== guild.roles.everyone.id)
This then? ๐
ooo
member.roles.cache.filter(r => r.id !== guild.roles.everyone.id).map(role => role.toString())
should work
im not sure
Shouldn't I say that guild must be in scope ? ^_^
^
ReferenceError: guild is not defined
at C:\Users\Flo\Desktop\Discord_Bot\commands\whois.js:18:74
at Map.filter (C:\Users\Flo\Desktop\Discord_Bot\node_modules\@discordjs\collection\dist\index.js:190:17)
at Object.exports.run (C:\Users\Flo\Desktop\Discord_Bot\commands\whois.js:18:53)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
PS C:\Users\Flo\Desktop\Discord_Bot>
Well, i should
I have to definde guild, maybe
buuuuut
Just ping me if you know the solution ๐
@signal estuary where you get member?
How do I loop through a mongo cursor? Python
What help
i mean does discord provide any kind of builder like that
T_T
member.roles.cache.map.filter(r => r.id !== member.guild.roles.everyone.id)
this one too https://leovoel.github.io/embed-visualizer/
Carls bot embed is good
i mean i wanna create one for my bot
so i was looking if there is any easy way to do it
Ok that's great. It will take a fair amount of code to get that done.
it's not "easy"
ikr so i thought i will ask pros here
Specifically !embedsource msgid chnid
pros aren't going to do it for you, that's for sure.
IK IK
just wanted to know if discord provide something like that or not
They don't, but both those sites have sources available to you, directly in the browser.
ยฏ_(ใ)_/ยฏ
ah okie i'll look into it
Using next-auth, how can I have it force someone to login if they are not already, for all paths starting with /panel
Need to run your bot 24/7? Get a cheap VPS.
https://www.scaleway.com/ EU https://www.linode.com/ US/EU/Asia
https://www.digitalocean.com/ US https://www.vultr.com/ US
https://www.ovh.co.uk/ EU/Canada https://www.hetzner.com/ Germany
https://www.time4vps.eu/ Lithuania.
Self-hosting: Any computer.
Free hosting: No. Not even Heroku.
Kinda free: GCP, AWS have one year free micros.

Bye
looks like innorganic growth moment
Your bot has been flagged for suspicious growth, please wait a couple weeks before reapplying
suspicious growth, not inorganic ๐
@solemn latch your test was successfull, i got your suggestion
๐ you didnt need to respond. but ty ^_^
i agree that the test was succesfull
pog
hey guys i have been trying to implement the xp system, but i dont know why it doesnt register it to the database,
here's the code if someone could point out the errors!
can someone help me make a 24/7 bot on my rpi4?
What part do you need help with?
writing the script
Your bot's code would look the same, no matter where you host it
what files do i need to download
Have you made a bot already? Or are you just getting started on coding it?
ive made a bot but need the code
Do you know any programming?
not really
Then your first step is probably to get the basics down in a programming language
You host it by running your bot's script
i need the script. thats what i dont have
And that's exactly why you need to learn a programming language
so that you can write your script
i just want to download a script to get me started
That's a terrible idea, you won't learn anything that way
whats this?
help vampire
Essentially, no one is going to make the bot for you. This channel is for getting help with specific problems you have while you're making your bot
If you want someone else to make it for you, this is not the place
i know
yeah like if you ask the best way to get a bot's ping we could help you. If you ask for ping command code we can't do anything
i just want to know how i can make a bot on my rpi 4 24/7
By writing a code for your bot, and running that code on your rpi 4
yes
yes
i want to know where i can get that code
I KNOW
caps lock
im just trying to learn how to host it not learn anything for the com mans
commands*
And that's what I'm telling you. You host it by running the code
The code that you write to get your bot to work
Nowhere
What language do you want to write it in? (programming language, please don't say English)
https://discordpy.readthedocs.io/en/stable/intro.html
These are the docs for a library called Discord.py, which is the most popular one for Python
ok
File "<pyshell>", line 1
python3 -m pip install -U discord.py
^
SyntaxError: invalid syntax
did you run pip Install in python shell ?
lmc
run that in normal terminal not the shell
ok
that's...not how it works
"Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Fl1ThA/aiohttp/
"
wait
its working now
ok i installed now what @dusky sundial
Listen, I'm not gonna teach you how to make a bot. There are plenty of tutorials online for that
oh ok
umm
Is this correct?
I mean..
It looks like it isnt..
And I cant try and see because I already voted...
and I dont have alts because I actiauly follow Discord ToS sometimes..
wOaH
sometimes
use the test webhook button
If votesChannel will always resolve to be an ID that the client shard has cached, then that will work. If it doesn't have it cached, then you should use raw rest methods and only handle that logic on one shard
imagine not dealing with votes with a worker process
I would just slap logic like that onto my website's worker
o right thanks
sometimes
sheesh
how good my site lookiing took me 7 hours to develop thiis shit
very weeb website, btw, it's nice
hmm so, I just need a quick explanation, I haven't really used slash commands, so let's say I got 3 commands, eval, help, and profile, eval and help are showing on my server, and on my other server there are 2 commands which are help and profile, for some reason profile is not showing up in my server even tho it's a global command
any ideas
kick your bot and re-invite it
helloooo i have a questionis there a way to make a bot delete a whole entire chat only if there are 0 members in a specific vc? meaning lets say theres a chat made for a specific vc and when everyone leaves that vc the chat gets deleted along with it
oh so it's just a bug? @deft forge
if you're using global, you need to wait for discord to cache it in every guild. maximum is 1 hour
maybe it migth be because you uptdated your bot
@orchid vapor repetitively check for 0 users. if there are 0 users, then use channel.bulkdelete(). if there are still messages then manually clone the channel and delete original
that's how i would do it
ah ok that's better
so like how would u guys do it definatly not repetitive checking yeah
no repetitive checking
so what about if no one joins vc for 10 minutes channel.bulkdelete()
was my idea not good?
ah..... yeah.........
trying to make it so that it would delete the whole chat even if im not there like if random 5 people were in a vc and also talking in a #chat with people who dont talk in the vc then if 0 members remaining in vc the chat just poofs
Is it just me or have my shards been randomly failing for the past month? It may just be me
Cool, so it's just me ๐
Ah, 3 out of 4 of my shards always work.
so meaning i woulud have this chat and the only way to access this chat is to have a role "x" and once u get it u have access to this text channel along with a vc. then when members leave they would remove role "x" at the same time the whole chat would be deleted for the next group of people to use
ive never made a bot b4 no idea if thats even possible
ive thought about that already
the problem with that is its a bit too random for individuals
Another question, how do you all catch when a shard fails? I may have overlooked it in the documentation:
manager.on('shardCreate', (shard) => console.log(`Launched shard ${shard.id}`));
manager.spawn();
lets say they were having a discussion suddenly the whole chat disapears
Is there shardError or anything I can catch?
oh wait nvm
i read that too fast
that would have another problem then wouldn't it
recent messeges
would be left behind
for the next group of people
and they could see it
ive never done this b4 sorry
yeah
theres a limit to the amount of people who could be in this "chat + vc"
5 is limit
and the chat is there for people who cant talk in vc
i dont even have a bot set up yet
i just came here to ask how i could do this ๐
hehehe
working with @copper root atm
big brain
yes big brain
thank you life saver
i saw
so is it like this?
client.on("voiceStatusUpdate", (oldVoice, newVoice) => {
//on user leave channel
if(oldVoice.channel === null && newVoice.channel !== null) {
//if no users are in channel
if(newVoice.channel.members.size === 0) {
channel.bulkdelete()
}
}
});
@swift umbra do u mind if i send u a invite to something
where do I see the wait time again?
to where im setting this thing
why does this keep giving me syntax errors?
missing ) in py embed.add_thumbnail(url=str(ctx.message.author.avatar_url) - should be py (url=str(ctx.message.author.avatar_url))
ah, so it takes time, alr
oohhh
How does the ban-able thing work again?
It does some checks with the bot member and target to see if the bot can ban the target
Though the most reliable way to get the answer is to try and ban the user
No, I mean how do I use it?
What library are you using? Discord.js?
Yep.
This is a REALLY dumb but smart question I have for anyone that codes and plays Minecraft bedrock
Is it to make a bot that sends a message to a specific channel when something happens in game
For example I started King Of The Hill
I would want it to say
โKoth Just Started!!โ
<GuildMember>.bannable
youtube.js:
https://sourceb.in/K60INvFmGX
main.js:
https://sourceb.in/O2ImqHbOAW
Can Someone Help me With This?
Is there a kickable, or just use bannable to kick command too?
The documentation is your best friend. https://discord.js.org/#/docs/main/stable/search?q=kickable
What is the best way to check args number(integer) as isNaN still consider 4e6 as valid number in javascript
I wish I knew the answer. ๐
hello buddys i need an help
How may I assist you?
const Discord = require("discord.js");
const client = new Discord.Client();
const AutoPoster = require('topgg-autoposter');
const ap = AutoPoster('TOP.GG_TOKEN', client);
ap.on('posted', () => {
console.log('> Statistics are updated with success.')
});
//keep alive
const express = require('express');
const app = express();
const port = 3000;
app.listen(port, () => console.log(`BOT LISTENING http://localhost:${port}`));
client.on('ready', () => {
console.log('ALL DATA NOW SENDING TO TOP.GG CHECK OUT YOUR BOT PAGE');
});
client.login('BOT_TOKEN');
this is my code
bot online or offline not showing
I've had the same issues. ๐
The only thing with the status that works is the server count, and shard count.
same
bru- i hate it when my bot stops itself because of errors
have you tried fixing the errors
By what you're saying, are you asking what's the best way to check if an argument is a number even for numbers like 4e6?
If so, you could use parseInt if you don't care about scientific notation (eN where N is the notation) or the Number constructor (e.g. Number("100e3") => 100000). If neither could be converted to a number, it should return NaN (and you can use isNaN(...) to check it)
What Im trying to achieve is making the above 5e5 return false
And throw error not valid number
Why though? It's a number
Can Someone Help Me?
Ya, it's a number, but I want it pure number as args. Slash command seem to be great on become the check. Want to know the method how
Only thing I can think is regex
You haven't told us what the issue is
The YouTube Search Didnt Work
What Should I Do
I don't know how you could disallow scientific notation except to use a regular expression. The alternative is to use parseInt which will chop off parts succeeding valid numbers afterwards (so 5e6 becomes 5 since e6 can't be parsed as a number), but to disallow it, a regex may be a solution (unless there is a better one someone can suggest).
You should debug why it's not working.
Ok
Hi
What is shards
var user = msg.mentions.users.first();
var member;
member = await msg.guild.members.fetch(user);
TypeError: member.roles.cache.map.filter is not a function
at Object.exports.run (C:\Users\Flo\Desktop\Discord_Bot\commands\whois.js:18:57)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
remove map from there
member.roles.cache.filter(r => r.id !== member.guild.roles.everyone.id).map( ...
I typed it basing on 1 of your previous message
Thank you this works.
Thx for all the help :)
Glad to help you
ะะฑ ะทะฝะฐะบ ะฒะพะฟัะพัะฐ ะบะฐะบ ะฝะฐัะฐะปะพ GET ะฟะฐัะฐะผะตััะพะฒ ะฒะพัะฟัะธะฝะธะผะฐะตััั?
Sry ._.
MB question mark as the beginning of GET parameters is perceived?
Your could encode message in URL before put in request query
pretty dumb question, my bot goes online for a few hours and automatically goes offline(repl.it), its hosted on uptime robot, any idea why?
Cuz bad host, just dont use repl.it
vps
it works for discord.py as well?
any free way?
you should use encodeURIComponent(text) and pass that into the URI, otherwise, you will run into issues
Unencoded commas may ruin request
client.on('message', message => {
if (message.content === ".cv"){
message.channel.clone({ parent: message.channel.parent.id }).then(m => {m.send(":recycle: Channel nuked \n https://i.gifer.com/6Ip.gif")} )
message.channel.delete()
}
})```
The bot does not place the salon has the same place as the old channel
Pls log your result url and show us
ะัะธะฒะตั, ะผะพะน ะดััะณ, ััะพ ั ะผะพะณั ัะดะตะปะฐัั ะดะปั ัะตะฑั ัะตะณะพะดะฝั?
this is what my api recieves
wait
it works now
thnks
are you fucking kidding me, I've been trying to make wasm work on the browser for about a few hours now
sounds painful
There are only a few issues on this as well and they claim that it was a bug that got fixed
Cannot read property '__wbindgen_malloc' of undefined
Need A Code Which can do This In Node.js:
command: react [emoji],
output: Bot reacted with [emoji]
If You Find plz Dm Me Looking since 3 months
It's unlikely that anyone is going to find/write code for you. Get started on your own instead and ask here if you run into any issues on the way
oh my god I fixed it
no
?
@hallow hazel
This guy has some braincells
ikr
wtf
-m 803207064977276928
๐ค Muted 6417#7456 (@viral walrus)
How do I check if like the command author (mesage.author.id) highest role is equal then, or lower then like the targets highest role?
I Need stats cmd javascript anyone can help me
if you want to get the highest role the user has, you can do roles.highest.position
yo
i need some serious help
someones asking me how to code a bot, and i told him that i cant straight up tell him how to code the bot
he'll have to figure it out
and hes asking me why
wtf do i tell him
lmfao
Just tell them that programming is something you have to learn, just like any other skill.
And people will almost never write code for you, not for free at least
lol kk tks
js?
Okk
It's good but my bot having error
TypeError: message.content.includes(...).join is not a function
Boolean.prototype.join() is not a thing, String.prototype.includes() returns a boolean
let MSG = message.content.match('attachments').join("");
^
what even are you trying to do
btw what is image attachment format

weit
https://cdn.discordapp.com/attachments/815951481823297569/834401217786413117/34d051688ea8d1019506802362bfd5a9.jpg
like this
umm, are you trying to get the URL from the message's content?
i want this format var attachment= /(discordapp\.(com)|discordapp\.com\/attachments)\/.+[a-z]/
yup
/https?:\/\/cdn\.discord(?:app)?\.com\/attachments\/\d+\/\d+\/\w+(?:\.[^ ])?/```
you can use this regex and match the attchment URLs in the content by using `String.prototype.match()`, you can also append the global flag (`g`) to match all of the URLs if you want
var attachment = /https?:\/\/cdn\.discord(?:app)?\.com\/attachments\/\d+\/\d+\/\w+(?:\.[^ ])?/
var attachmentUrl = attachment.exec(message.content);
var attachmentCode = attachmentUrl[0].split('/')[1];
request(attachmentCode, async function(err, res, body) {```
why not wroking
define "not working"

what's so confusing, what's not working exactly? errors? expected result? unexpected result?
const firstAttachment = message.attachments.first();
request(firstAttachment , async function(err, res, body) {```
this works with only uploaded attachments i want to this work with url
then do what I said
regex
I told you to use that regex and match the URL you wanted
and do whatever you want
figured it out
I'm using #[path = "..."] currently but is there a better way to do it
help me please i tried but don't get success, sad
Reboot?
Not sure what you mean by that. But if you think there is an issue with a node module, you can just delete the mobule from within the folder (or delete the entire node_modules) folder and run npm install in the root directory of your project.
Doing anything with the npm modules requires you to restart your server / bot
@toxic jolt
you can also do npm uninstall <module_name>
Don't forget to reinstall the module after this command, otherwise your script won't work.
``` user in not defined
What is user?
message author?
user.user.username
^^^^

yupp
Dude what is user 
Gonna need some more context then just this line
sad
Give me my bot info 812379990783688796
@sinful trellis What kind of bot are you looking for?
1 million dollars and I will build it for you
I signed up for it.
BREH
I DON'T EVEN HAVE 1
Only 20 KD.
:p
20 BTC is good aswell
BTC?
bitcoin
Can you not hop in?
Bitcoin yes
not for free no
i help people here for free
but i dont do their work for them for free
Really?
OK you gotta be kididng me.
I will figure this out.
@sinful trellis In what world do you expect people to do free work for you
But why money?
Just pay me the million dollars
Why does it have to be money>
bruh
because programming is a real job
@sinful trellis You want to pay me in bananas?
I will pay in apples
500.000 apples then
damn thats a lot
Can I other payment?
Like no money included?
Just like something to do?
Since when are bananas money?
LO
Alright ehm
cause you gotta buy them
I will build the bot for you, if you can build a bot for me that can add bots to a server and can do everything
ok ok that joke is epic.
Bots can't add bots I think?
Development channel moment
I think only MEE6 can
๐คฏ This guy
Hey how old are you
Bots can't add bots 
๐คฏ
you need to be above a certain age and I'll make you a bot ;x
I became brainded...
@cinder patio You make free bots? You rich or something?
Imagine not being a freelancer
Breh.
@cinder patio That just sounds wrong ๐
lmao :^)
I dunno you have to tell me your age first
๐คฃ
Hmm
This guy is probably born in 2003 if I had to guess
10, IMa be 11 at Nov 25
OK
Ban hammer
Hahaha
rip
HOW MANY PEEPS GET THIS WRONG?
lmao
ToS moment
XD
Joink
Pfff... just take 20$ / h helping in here

@rustic nova
hes kidding lul
Bonk time
breh
shouldnt be joked about
@sinful trellis so how old are you now?
I will soon be 11
-b 768014523356938301
Banned TheKingBoy_2003#3234 (@sinful trellis)
MODERATOR OMGORT
lmao
f
lol

Now approve my bot moderator
(jk)
"Sa yardim lift my botum"
lmao
he identifies as being born in 2003
Imagine being born after 2000 
He just somehow edited his real life config file 
imagine 2000 being 20 YEARS AGO
kid wanted a bot made for him but had a bot in queue?? probably made from bot ghost
2010 is the new 2000
Makes me feel older again... thx
same
Unregistered hypercam 2
its math
Did I already inform you my db generation is done?
You should stop ._.
Guess I missed the daily newsletter somehow.
I cant see it
Imagine being born before 2000 and still be too inmature to take younger people serious 
See what
Recall old stuff
because we've been those people, and we know they cant be serious because we werent
lmao

๐
Well than... letโs get off the bed and do something
can i make this better, works for now but feels wrong
you should add a property to the command object that makes the command admin
admin: true
Maybe do cmds.toLowerCase()
and name all files in small letters
it works perfectly fine
im just curious
also this
seems like a bad idea
to include command file every time
Well then remove the condition and replace it for example by a check if the file is a JS file for example
hmm
is this gonna cause some trouble
Not efficient no. Storing the functions beforehand is better
maybe this
new at js, still struggling
nvm, i wont fix whats not broken ;d thanks for suggestions tho
if you use both readFileSync and require, you're basically reading each file twice
would be better to directly require all files beforehand, and check for admin by checking some property in the object instead of a text comment
VScode isn't a hosting service. To get a bot online 24/7 you need to get hosting, a VPS.
check the pins for more details and hints about that
if you know then what are you asking
oh you mean connected to voice? I guess you need to make sure it doesn't error out, and if it does, reconnect
ya am trying
ok so show the code?
I guess problem is in disconnecting after process restart?
yeah
Oh that's a much bigger problem. you'd have to save the ID of all the voice channels you're connected, and information about your voice state, inside a database, if you want it to persist between restarts.
any idea or how I can make number with scientific notation return false on an number/integer argument?
like 5e5 return false, while 5000 return true
shouldn't be possible
I can only think of regex, wanted to see some other opinions about it before going regex
Depends on how you initialise it
all discord messages are received as strings anyway
so string manipulation is the way
no matter how way they are represented, numbers are numbers, there is no distinction
so you have to make the distinction while they are in string form
as you said, regex is a good option
I gues regex it is
I've added a cookies to a site with Superagent npm module, but I want to clean it for all cookies.
@quartz kindle hello tiiiim UwU
how are you
@toxic jolt Cookies are not stored in a node module
I thought it would be cleared when restarting the module
@toxic jolt Cookies are stored on the client side of the website. So you would have to use some function in that node module to clear the cookies on the browser side
how
wat
I'm not familiar with the module you used. But as a web dev I'm used to adding cookies to a client with Javascript. You normally have a function to put data into a cookie and you also have a function to clear that cookie
Okay yea so its different I see
Every time you request something from Google it gives you new cookies
And you don't store them in this case
this is that cleverbot website thing isnt it?
wdym they are not deleted, not deleted from where?
@toxic jolt By default this would not store any cookies
Hmm
@toxic jolt The cookies that are returned in the log are default cookies you get from Google every time you send a request
Alright but if you send requests with superagent.get it wont save cookies and parse cookies by default
rate limits are not controlled with cookies usually
That aswell, most of the time they are controlled by ip's
It's controlled with biscuits
Or API keys if its not an open API
no with crackers
Pizza's


