#development
1 messages · Page 1598 of 1
bruh
Woah

That's weird... You can try a different approach, instead of executing the code straight away, maybe send an event with the array?
client.shard.broadcast({type: "leaderboard", arr: fameLeaderboard});
And then:
client.shard.on("message", msg => {
if (msg && msg.type === "leaderboard") {
// Do something with msg.arr here
}
}
?tag ask
👀 Someone else may be able to help too
alr sec
oh so thats how to make types in js
👁️ 👄 👁️
wtf
I change 1 word and everything breaks
ikr :x I feel like there is something trivial I'm overseeing but everything seems fine
I'll try the other suggestion first, thanks once again 😄
I also think the other suggestion is generally better, it gives you more control
How does it break
that's... weird

I agree
So it's because of the typing
so im sinning and using any
can you show APIMessage?
it's from discord-api-types
im grabbing it
hmmm... usually that error means that a function is calling itself a bunch
Can you edit the typings and remove referenced_message?: APIMessage | null; to see what happens?
Typescript is somehow entering in an infinite loop by checking the APIMessage typing
Open @types/discord-api-types and remove referenced_message?: APIMessage | null;
yeah still fails
hmmmmm maybe you should open an issue? I feel like it's definitely a problem with the typings
@slim heart do this
Do you use the restrictions function anywhere?
yeah, it just returns a boolean
i just deleted a random flags check in tsc, probably not a great idea but it fixed it so
lmao
const entry1 = await guild.fetchAuditLogs({ type: "ROLE_DELETE" }).then(audit => audit.entries.first());
Why i have error in this code
what's the error
This is the error
Your bot doesn't have permissions to get the audit log
How I can Fix it
You give your bot the "View Audit Log" permission
You want to ignore the error?
There's nothing wrong with the code your bot just doesn't have the permission
module.exports = class {
constructor (client) {
this.client = client;
}
async run (role) {
const client = this.client;
const { guild } = role
const entry1 = await guild.fetchAuditLogs({ type: "ROLE_DELETE" })
.then(audit => audit.entries.first());
How I can catch it in this code
You put the .catch after the .then
Also, you're mixing async/await syntax with .then syntax, you should just stick to one
const audit = await ...
const entry1 = audit.entries.first()
module.exports = class {
constructor (client) {
this.client = client;
}
async run (role) {
const client = this.client;
const { guild } = role
const entry1 = await guild.fetchAuditLogs({ type: "ROLE_DELETE" })
.then(audit => audit.entries.first()).catch(err=>{});
Like this
Yeah that should do it
but you should also don't do anything if there's an error
I recommend switching to async/await and try/catch instead of using .then and .catch
Your context is already async, so there's no point in using .then
also, just destroying the error is typically a bad practice
try {
const audit = await guild.fetchAuditLogs({ type: "ROLE_DELETE" });
const entry1 = audit.entries.first();
// Do something...
} catch(err) {
send("No permissions, sorry!");
return;
}
doing something with the error would be smart
@cinder patio thank you bro
np
if an error isn't really useful and is 1/2 expected, what should you do isntead of destroying it?
or be even more lazy;
Object.defineProperty(Promise.prototype, "silence", {
value: function() {
return this.catch(() => {})
}
})
const value = await riskyPromise.silence()

i can one one better
can someone help me make my bot listing look nice
Object.defineProperty(Promise.prototype, "shh", { value: function() { return this.catch(() => {}) } })
const value = await riskyPromise.shh()```
i have this code for discord.js and i am logging the files loaded bit instead of listing the files after each other i want it under each other and i need helpjs client.once('ready', () => { console.log(commandFiles + ' loaded'); console.log('Bot launched successfully'); });
well, the command files doesnt load on the ready event anyway
so logging it there doesnt really make sense.
actually yeah
when i run the code it shows tho
sure, but you could log anything there, it doesnt mean it makes sense to do so.
const then = Promise.prototype.then
Object.defineProperty(Promise.prototype, "then", {
value: function(handler) {
return then.apply(this, handler, () => {})
}
})
const value = await riskyPromise
//idk if this'll even work lmao
where should i log it then?
when you load each command.
when readdir ?
how are you loading your commands?
for (const file of commandFiles) {
const commandName = require(`./commands/${file}`);
client.commands.set(commandName.name, commandName);
}
```https://github.com/Madmadz16/DcBot2 here is the code (its not much)
so log it then
ohh yea thx
Does anybody know of Eris based bots having stability problems?
why would they have stability problems?
Bc idk why my shit keeps going down
from what i understand eris is known to be a bit unstable
All I get is this https://cdn.tanners.space/JNUl
Then the bot goes offline
According to Eris docs it's supposed to attempt to reconnect which I've ensured is properly configured
hmmmmmm
how to i make my bot react to it self
which library?
js
i did
await message.react("🎉")
discord.js i assume
js is the language
not the library, but anyway
show your code
we all been there, just show what you got so far
message.react will react to whatever variable message is.
for example if your message is the received message it will go to that.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
okay so its sync
the channel.send() returns a promise
so
what you could do is
channel.send(embed).then(newMessage => {
newMessage.react('emote')
})
otherwise i would've told ya to use async functions and await for channel.send()
also, please take a look at this
I Was Trying To Install Quick.db And Got This. How Do I Fix It?
your code works, but its grotesque
@lucid prawn https://discordjs.guide/
follow this guide, and by the end you'll have a nice 6/10 bot
very ugly?
read the quickdb install troubleshooting listed on their npm page
but it works
np
What Does It Mean "Use The Switch"?
Anyone?
I did
did you follow it
and they said to install lastest version of py
and i went to the warns
and it said...
What Does Switch mean
like npm install quick.db --python="C:\Path\To\python.exe"
?
windows or linux?
windows
i tried that but now i have this error
if (message.reactions.cache.get("🎉").count <= 1) {
^
TypeError: Cannot read property 'count' of undefined
get() might return undefined
ini
incorrect
its not count thats undefined
its get() thats returning undefined
maps can return undefined, so account for that
@lucid prawn
check with an if or conditional chain
Cannot read x of undefined always refers to the thing x is being called on
js doesn't care if a property/method exists or not
u use big words
it will just default to undefined if it doesn't
get('thing')?.count
? means it'll stop if what comes before is falsey
its the same as
if(get('thing')) get('thing').count```
oh ok
check ur node version btw
i think its very recent stuff
node 14 i think?
yeah i think node 14 is the one that introduced conditional chaining
im on a hosting website
Still uses a version of node you should be able to change ...
i think it auto updates
that would be dumb
some node related stuff requires gyp for example which tends to break when new versions of node come up
if it auto-update it'd break a lot of users without notice
that would be terrible design
i dm the owner he said v14.14.0
it should work then
same error
yes
here error
if (message.reactions.cache.get('🎉')?.count <= 1) {
^
SyntaxError: Unexpected token '.'
it may be on node 15 then
ok
just check if cache has that
ok
I have a small problem with an npm
With the images ... - Some have spaces [discord.js - v12.5.1]
Is there anyway to fix this?
I am trying to work on an AI chatbot for a discord bot what would u guys suggest me to use?
an existing bot
tensorflow might be able to do it, but theres a ton of ai chatbots out there
some scrape stuff from Evie bot, and those online ones
theres also that python one
forgot the name
fuck
ts4 or something
i forgot
it didnt work
show code
ok
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ik
it ugly
i will fix it later i just need it to work then i will make it look better
cuz u didnt add what i told to you do
there you go
its not fixed btw
but at least its formatted
ok
Hello.
if i say
const vicky1 = Discord.Client();
const vicky2= Discord.Client();
const vicky3 = Discord.Client();
can i connect all of them to the one code?
like :
and
vicky2.login('');
vicky3.login('');```
what
the fuck
are you doing
thats not how js works at all
and why do you wnat 3 clients?
ummm
for my alts
what alts?
tokenns
users or bots?
user
i bought it tho
yes
TOS breaker in action
i wanna try this code
you dont
okay i wont
Too dark? Light mode 🔦
buying accounts AND selfbotting
Man
two big tos breaks
ow

Tensorflow seems popular i might go with that
The bot responds to commands 2 times after running for a while.
When I close cmd, the bot does not close and the answers are lonely
how do i solve this problem?
I can't see the other working
I change the token of the bot and reboot, after a while it becomes double again
does it only become double when you are doing stuff with it? ie editing/starting/stopping it?
you might be doing something in the ready event
ready can fire multiple times during your app lifetime
Anyone familiar with discord.py sharding
isnt py's sharding just a startup parameter?
@solemn latch I’m not sure
I’m new to this all lol
my bot is in 220 servers
And it’s delayed
220 guilds mm
Sharding is neccesary at 2.5k guilds
So you hasn't to start sharding rn
but if you wanna to, there is no any problem.
not necessarily, he mentioned delay issues, which could potentially be solved by sharding.
o
what platform are you using to host?
I would recommend doing it a little under 2.5k guilds
That delay can't be resolved by sharding
It's just probably their host machine having a weak connection to the gateway
which is why i asked about the host
some low end rasperberry pi's can start having cpu issues quite early, and sharding can help with that.
¯\_(ツ)_/¯
just make a better bot 😛
some features require a fair amount of cpu no matter how "better" you make it.
for all we know they could be talking about delays in the verification process lul
they didnt specify :^)
solving delays in verification by sharding 
Hi people of #development
hi
and by #development I mean #ask-tim
aw
tim is our personal stack overflow
right back to listening to Scottish techno then
wassup

@gilded olive you familiar?
speed it up by 10x
you can say that kinda yea
if you're at 220 guilds there's no need to start sharding
2k-2.5k
Why is my bot delayed then
there are a lot of reasons it can be delayed
imo its better to understand sharding before you are required to
that wouldn't change anything
delayed as in it takes a lot of time to respond?
is there a blocking process going on?
some api command using requests? that can delay your bot
How would you make a temporary warn using mongo. Right now I'm just using setTimeOut, the only issue with that is if the bot goes offline/restarts the warn will be there permanently since the timeout stopped due to the restart/downtime.
Ping me on answer please.
You could save the expiration date in ms
Then just check if it's passed
Well, that's for if you want to see if it's expired. To get a notification when it expires is something else.
yeah, kinda two ways to do it, if you want exactly when it expires I would just check for close to expiring events(every few minutes or 30 minutes or whatever), and then doing a timeout for that length for it for each one.
if a member doesnt allow direct messages from server members, but sends my bot a message, will my bot have permission to respond via DM?
nope
do they need to change that setting?
yep
dang, thanks
oh, they wont even be able to send a message to my bot?
that's weird
How do I make a Discord bot in a call 24/7?
How does Rythm and groovy do it
lol that’s what I mean
How do I do it?
I’m working on a 24/7 radio station for my bot and it needs to be in there 24/7
let it join a vc
and never leave

well you need to be a bit more detailed then that
with Rythm & Groovy you need to use a prefix to make them join you
I’m wondering if that’s needed in this regard.
not necessarily(meaning [prefix]24/7) but that would be the best way to go about it
its not 100% required to be a command, if its just for one server and one specific channel you can just have it join on startup
How would I do that in JavaScript, example?
how to do which one, you got several suggestions
for this there is no simplest way tbh, music bots are always relatively complex.
@earnest phoenix let me give you a piece of advice, a bot for your server or maybe 10? sure, it'll work fine
but those bots dont scale well
unless you got all musics cached locally
otherwise you're gonna start hitting ratelimits from youtube or spofity
which will lead for you to have to buy IPV4's to be able to "trick" their api
my advice is: if you wanna make a music bot for the public: dont
music bots are complex, and expensive
I’m going to be using Soundcloud so
soundcloud has a stricter api than youtube afaik
gosh
15,000 requests per day for soundcloud
well, the docs cover that
I’ve tried the JavaScript join commands, could I get an example
the docs have an example
The one I used didn’t even show anything in Output
search in google: discord.js music bot
ok
typically you buy a VPS for a music bot
as free platforms really cannot cope well with music bots.
I see
I host it on a second pc that runs 24/7
please not heroku, every single heroku music bot ive ever seen stutters so bad
if you have a credit card, go for google compute engine f1-micro
its free and much better than heroku
ok
i meannnnnnn, rn ive got a test bot running 24/7 on heroku and it works semi fine (in 1 server with low activity)
music on it was ok
its not rare to see them in reviews, they stutter a few times a song :/
then go with what tim said
if you want high performance you have to pay for it
^
ok
vultr, upcloud, ovh, galaxygate, contabo, digital ocean
those are the most recommended vps companies i've seen around here, in no particular order
ok
gg not first
xd
How much money does it cost to run a music bot in total? (around)
depends on the size
wew, am i big boi now?
well of course if your bot has millions of guilds
60 new guilds in the past few hours
pog
I’m willing to put $100 down for a music bot
you can start with a $5 per month vps and see how it goes
let me get a whole scope
then upgrade as needed
Ok, thank you.
@gritty tartan
i also spotted a memory leak, next update should be using less than 800mb again
pog
what are you leaking this time?
my reaction collectors
hehehe
what im confused is that big ass spike on startup
1.2k messages within a minute
thats way over avarage
❤️
indeed
im pretty sure discord queues events
hmmm could be but its weird that its bulking all those in one go
nothing wrong with it
just weird
it probably starts queuing the moment you connect
i assume as much, yeah
then send everything once you finish receiving the initial guild creates
thats likely whats goin on
This isn’t related to bots, is it possible to make a GUI on Visual Studio 2019 without coding?
cause the form method doesn’t work for me
ok
Also is it possible to host bots from Mobile?
It sounds unrealistic but not impossible
yeah should be fine
its possible yes
several people here did it or tried doing it
Host a discord bot on your amazon Alexa lol
iToilet™️
and have alexa tell you every time you get a new guild
LMAO
lmfao
get rid of your grafana and switch to alexa logging
LMFAO
Guild **I Put ketchup on my pizza** added the bot
"alexa show me ram usage for the past 15 hours"
prob get on some micheal reeves level of shit
integer overflow intensieifs
Would be a good usage for it
Alexa, delete the bot!
xD
have you seen that dude who was streaming himself sleeping on twitch?
and he had alexa on
can someone remind me of the name of if ? true : false
and twitch voice over on
Text to speech?
coallescent something isnt it?
inline check is what i call it
ternary operator
At least it isn’t like those which are like what is my location
xD
Alexa knows too much
and surely purchases using Alexa would require authorisation
there was also that stupid challenge that the guy had to hold his finger on his phone screen for hours, and some twitch viewer send a message under the name "hey zee ree"
and the idiot read it out loud, and his phone closed the game and opened siri
The Mr Beast app
IT WAS NOT STUPID
IT WAS MR BEASTS GAME
I don’t think it was real ?
discord just shit the bed
MrBeast got popular for this money
I honestly hate you a little bit now tim
and didnt send my messages
lmao
my note on tims profile:
Doesn't like Mr Beast so I dislike him a little bit
just heard of him from memes
I mean I understand why people dislike him, i think he's cool for just throwing money at random people who need it
lmao
just someone who follows rules and is around helping or participating

xD
good luck
aaaa
bbbb
xD
but it launches all clusters
so
now I need to wait 5 minutes before I can view my grafana dash again
its laggy


hi, does anyone know how to debug when a bot getting timeout trying to connect to a VC in certain servers?
like how to get a VC server ip address
I Cant Install Dependencies Because This Stupid Error. Can Someone Help Me Fix It
its also mentioned in this in the troubleshooting guide.
Install latest Visual Studio Community and Desktop Development with C++ extension.
https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/troubleshooting.md
Also, please stop using VB case when typing
Its a habit
You can't get ip of anything through discord
lies and deceit
Well yes but actually maybe
OMG DISCORD IP?!

heheheheh
i thought discord worked on magic hamsters and messenger pigeons
not the internet
😭
isnt that just a cloudflare ip
Who knows
not even discord
But does cloudflare use cloudflare?
discord has lied to us 😔
ah so there's still a possibility of magic hamsters and messenger pigeons
jinx
well, clearly i didnt bother going that far into a meme
between the cf and discord servers
cloudflare specific
to actually check the ip
they've got some for argo tunnels n some shit
sounds kinky, im in
lol ok then, i have no idea why my bot can't connect to VC only in some servers 😅
right.
Permission maybe?
o/
not a permission related, I digging into the log and getting some kind of TimeoutError
Idk then
only workaround is move server to another region, eg: from singapore to japan and then my bot can connect to vc just fine
but it works in another server in same region the other can't 
Maybe it's the high af latency then

let optiona = [
"add more",
"like this"
]
let optionb = [
"add more",
"like this"
]
let optionac = `${optiona[Math.floor(Math.random() * optiona.length)]}`
let optionbc = `${optionb[Math.floor(Math.random() * optionb.length)]}`
let embedwyr = new Discord.MessageEmbed()
.setTite("Would you rather...")
.setDescription(`1️⃣${optionac} **OR** 2️⃣${optionbc}`)
.setColor("GREEN")
message.channel.send(embedwyr).then (sentMessage => {
sentMessage.react("1️⃣")
sentMessage.react("2️⃣")
})
}
I made this for would you rather
but it doesn't work
can anyone help
what doesnt work
any error in console?
ok
stop the spam

please

im sorry for minimod btw
np
Anyone know why?
@delicate zephyr if your on ik you know mongo could you try to help out?
@blissful coral make sure mongo is listening on 0.0.0.0
how
/etc/mongo/
why 0.0.0.0 when he's connecting to localhost 
oh it's localhost?
bruh didn't see
and mongo went crazy
netstat -tulpen | grep mongo
^idk how the mongo process is called
@blissful coral shoot me a dm
But with that you can check if the port is listening, on linux
ok
can anyone say how to make a warn command for discord/py
ohk but I want to make the bot send the message in the server itself not DM the users!
and could you say which docs I need to see!
ohk
thanks @gritty tartan
Here let me help you:
https://discordpy.readthedocs.io/en/latest/
thanks @nimble kiln
rofl
in discordjs all DMs are handled by one shard right?
Yes
nice thanks
By the first shard specifically if I recall correctly
got it thanks everyone
👌
and there's no way to change this behavior?
nope
in reality there is no drawback as you are likely to get 1000x more guild messages than dms
i'm builing a feature that's pretty DM heavy so I was just curious
even then
think about it
every guild message gets sent
even if its not a command
lmao yeah
for sure
i was also curious about sharing local storage for dms though
for responses
wdym?
arrays, variables
it's convenient that it's on a single shard so i won't have to use mysql
ah
unplug it and plug it back in
is it plugged in? 
rip
Bye now
lmfao
@drifting wedge send a ss of the error
oh
lol
haha
@placid iron
coroutine 'render_template' was never awaited
and the proper way to do it is "return render_template()"

so wot
return await render_...
is this tim?
No
AHAHHHAHAHA
i need to read docs lol
i mean i do
waiy
gimme a second
yep
i just got confuzzed
confuzzled
@placid iron sorry for murdering 6 brain cells of yours
well at least since i killed you last 6 brain cells
at least youll die in your sleep

did you just insult rovi
no

@pale vessel fixed
Oh yes
It's fine. Shicaco is lib dev
shic
there
I still need to tell them about my rust one to see if I can get the role
I thought you hated rust syntaxes
kek, is this equivalent to async for ... generator?
Yes

hi, is normal a error for installing npm i quick.db?
thanks
does anyone happen to have a nice clean command system for JDA to give me some inspiration on my rewrite 🙂
https://i.callumdev.pw/cf61h.png
Why is my reaction collector not working? It doesnt throw any errors
there isn't an emoji with the name "success"

lemme rephrase that, there isn't a discord default emoji with the name "success"
that wouldnt matter
You could log the value of x.emoji.name beforehand
I figured that out, works now
Now I am wondering what part of this is giving Missing Access error
https://i.callumdev.pw/3p8hc.png

use breakpoints
is the bot reacting fine?
I am trying to make a command only useable 5 times every 24 hrs, what would be the best way to do this? Originally my solution was to set up a column in a mysql user database to increment when a user runs the command and set up a mysql global event scheduler to clear it every day but I'm not sure if this is the best way to do so
is a raspi 3 running ubuntu with 1gb ram good enough to host a bot for a private server?
Yes
guys im doing my bot uptime but sometimes bot down how to do alwasy up
source.pause is not a function
missing permissions to see channel
https://sourceb.in/HLTbl7J18k
look at this error
never seen like this before
even my bot not working
the cmds
only cc prefix working
default prefix not working
i am sure it is related to top.gg
how is that even remotely related to top.gg?
Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: yt-dl.org. is not in the cert's altnames: DNS:*.aries.uberspace.de, DNS:aries.uberspace.de
uh.................
i am not sure from where,why and how is the error coming
so idk which code to give 
{
id: '4',
user: true,
trigger: '5'
},
{
id:"5",
message: ({ previousValue }) => await api.ai.getReply({previousValue}),
end: true
}
SyntaxError: /Users/navdeepsharma/Desktop/demo/my-app/src/App.js: Unexpected reserved word 'await' (37:37)
remove await
it won't work
the function has to be awaited
will return null
and when I removed it I got this error
you await it when calling the function
are you using a command handler?
React is fun they say
either way it has to be awaited
command handler?
yes
like this: module.exports = { name: 'ping', discription: 'discription', execute(message, args) { message.channel.send('pong') }, };

are you coding ur commands in the index file?
try async ({ previousValue })
I messed up pretty bad
I mixed nodejs with react
and its just bullshit now
bru
hi
it shouldn't even matter because you still need to await the method when calling it
so removing await is fine
ys but I get some weird error
this right here
so I figured out that I will just
Delete the folder
I have a problem, the bot does not send messages if someone does not have permission, help?
cod
👍
that's weird, express?
client.on("message", message => {
if (message.content == "$clear 5") {
if (message.member.hasPermission("MANAGE_MESSAGES")) {
if (!message.member.hasPermission("MANAGE_MESSAGES")) {
return message.channel.send(You do not have permissions to use this command.)
}
message.channel.bulkDelete(5)
.then(function(list){
message.channel.bulkDelete(list);
message.channel.send("Chat cleared");
})
}
}
});
Why are you checking the permission twice
yeah
y
That second if would never be true
you should put a different permission in the second one
Third, sorry
@pale vessel delete if (!message.member.hasPermission("MANAGE_MESSAGES")) {
?
You're repeating everything twice
and ur using double quotes
hey what's wrong with double quotes
give me good script
?
I use them :(
;_;
if he is using eslint it will be wrong
im starting programin ;_;
It won't, it depends on what rule you set
ok
Lmao imagine using single quotes
i use ESlint so it corrects even the double quotes
all my homies use double quotes
name: 'purge',
discription: 'discription',
execute(message, args) {
if (message.member.hasPermission('MANAGE_MESSAGES')) {
return message.channel.send('You do not have permissions to use this command.');
}
message.channel.bulkDelete(5)
.then(function(list) {
message.channel.bulkDelete(list);
message.channel.send('Chat cleared');
});
},
};```
all you need to do is add your own command handler
np

bruh
they're going to copy paste that
..
At the permission checking you have to invert it with a !
yeah ik i fixed that

i wanted him to learn to troubleshoot problems :D
Does anyone write a bot in typescript?
A lot do
I want to learn, too.
i do
and i use a typescript library too
Do you wanna learn Typescript or How to make a bot with Typescript ?
Both.
probably best to start with something small
though
heres the question
do you know javascript already?
yeah
then you should be fine starting with ts right away
i recommend skimming through this
Your first step to learn TypeScript
Also try this course
https://www.freecodecamp.org/news/want-to-learn-typescript-heres-our-free-22-part-course-21cd9bbb5ef5/amp/
Click on the image to go to the Scrimba course TypeScript has been gaining a lot of popularity amongst JavaScript developers in the last few years. And it’s no wonder, as TypeScript code tends to be less error-prone, more readable and easier to maintain. So we’ve partnered up
can someone help me make my bot listing look nice
What does 'look nice' mean? What do you need help with in particular?
I would just like the text Organised better
do you know html and css ?
Yes
then use em
That's how you do it
You can put Custom style in <style> tag too
Can you help me make my bot post Catchy
what's cachy ?
some kind of module ?
Can I pm you
Why would you want to Post Meridiem me ?
Ok
I have a problem with this code https://sourceb.in/f0v2HwRcoe
It's not detecting usernames starting with 0, ", < and ;. Possibly others too. Seems to detect !, ,, ., (, -, 5, _ and $ based on the testing I've done and members in my server. Any ideas why it's not detecting some characters but is detecting others?
EDIT: Found the problem. In a Discord server that has member screening enabled, users who haven't accepted the rules yet still appear in the member list even though they haven't been approved yet, so bots can't detect them. Disabling the built-in member screening in the server settings allows you to get around this.
what is the use of worker sharding manager mode ?
i guess it uses Node.js workers for spawning each shard
what is the use of worker ?
running the process on a different Thread
omg I am so stupid... I could make gif modulation on a worker thered
so it happens more quickly
hmm 😛
its not really faster, just wont bog down your main thread running the bot itself
if you want to make it faster add a Dedicated GPU for rendering
no it uses cpu
yes but CPU is way slower than GPU for rendering
but my code uses cpu
yea i know. but if you want to make it faster add a Dedicated GPU
or have it running on mutiple threads at once on your CPU
Does someone knows how to put that description thing like Playing or Streaming on the bots?
await client.change_presence(activity=discord.Game(name="Fortnite: Ray Edition"), status=discord.Status.idle)
await client.change_presence(activity=discord.Game(name=f"on {len(client.guilds)} servers"), status=discord.Status.idle)
await client.change_presence(activity=discord.Streaming(name="Fortnite", url="url goes here"),status=discord.Status.idle)
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="My Master, Ray"), status=discord.Status.idle)await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="Dark Riot Gamers"), status=discord.Status.idle)
My BOT code
most of those r here
Thats the reply for my question?
yes
if you post code here make sure to not spoonfeed, also it might help to know for what language/library the code is
Ok
discord.js
Aha LOL
Search on google?
well your code doesnt look like d.js tbh. this is why im asking
change_presence is something i cant really find in the docs, this is why im not sure that its d.js
// Set the client user's presence
client.user.setPresence({ activity: { name: 'with discord.js' }, status: 'idle' })
.then(console.log)
.catch(console.error);```this is what the docs give you
well i am BIG noob, so i will let the true programmers talk here...
if its a thing ok but its nothing i havent seen here in about 1 year on this discord here
you can do setActivity("activity", { type: 'PLAYING' });
for streaming you'll need an extra key, which is url a link to ur stream
ok ok and what do I do next?
add the code into your ready event
thats really not how that works
please learn js
STUPID CODE
no
AAAAAAAAAAAAAa
WHY IS THIS NOT SIMPLE
i've litreally given you the code
I KNOW
its simple, you just have to understand how it works
then why did u make a bot
i like it
yea you do you
I do
1 function has killed your motivation




