#development
1 messages ยท Page 724 of 1
if you dont know how to code then you're going to really have a bad time
then why did you buy a bot 
but im a system administrator
ah gotcha
understandable
things are never easy
I would ask the dude you bought it from about the issue
he is a dick and wont give me advice
oofers
i've highlighted the important parts of the error message
that should get you started
thanks
@solar wraith dm me if u want
also
a simple hint is pleasant
i think i might know whats wrong
Yush
but i need to see the code
apparently ctx is a commandnotfound object and I have no fucking clue why, ctx is usually something else
have you actually told it to pass CTX?
can i just run this on every IP adress?
I'm not too familiar with python or discord.py but I know that ctx isnt that object
um
so im home now
yes
but if i run at school will it still communicate?
if you dont tell it to run with CTX it will just pass the message payload
and yes it will
yea as long as there isnt any firewall on standard ws ports
great
that means its only offline during thingys
@modest maple where do i tell ctx to kindly fuck off?
what is ctx?
context
i personally dont use it but i see why people do use it for bots
but i use the message payload instead
async def on_command_error(error, ctx):```
@client.event
async def on_message(message):
print(message.content, message.author, message.guild)
Message_To_Split = message.content
Split_Message = Message_To_Split.split(" ", 1)
Split_Message[0] = Split_Message[0].upper()
Person = message.author```
that?
thats my basic code for when ever anyone messages
that should be the order no?
ahhhhhhhhhhh
i think i might know, have you made sure its not a client event instead of a bot event
as its the client doing somthing
could be completly wrong
well i swapped them
xD
commands are not found
its trying to get commands that dont exist
find them
thats avrea's open source code for discord.py
if you wanna have a look should give u some good examples of stuff
how to make url markdown for embed title in discordpy?
@modest maple Traceback (most recent call last):
File "D:\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\ext\commands\bot.py", line 621, in load_extension
lib = importlib.import_module(name)
File "D:\Microsoft Visual Studio\Shared\Python37_64\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tanki'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "D:\tanki online\Tanki Online Bot\run.py", line 43, in on_ready
bot.load_extension(cog)
File "D:\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\ext\commands\bot.py", line 623, in load_extension
raise errors.ExtensionNotFound(name, e) from e
discord.ext.commands.errors.ExtensionNotFound: Extension 'tanki' could not be loaded.
:c
thats what i get every launch
The error is at the bottom
Line 43
can I have a question regarding discordpy please?
aha yes
Sure
how to make url markdown for embed title in discordpy?
oh, thank you I'll try it
Np
hmmm
@bot.event
async def on_ready():
print(f'{bot.user.name} has logged in!')
print("Starting up...")
cogs = ["tanki",
"economy",
"containers",
"DiscordBotsOrgAPI",
"help",
"general",
"admin",
"clans",
"shop"]
for cog in cogs:
bot.load_extension(cog)
print(f"- {cog} has been loaded.")```
yeet right your calling on the function load_extension and passing it the thing you want to find (cog)
its crashing cuz its trying to do somthing with cog
and it cant as youre missing a library
which
A) means something else is broken
B) you havent imported everything you need
C) youre using the function wrong
Oh that's shitty error handling
folder cogs
ExtensionNotFound
have you imported tanki
But it just can't be loaded
and does it know where to look for tanki
make sure python knows where to actually look
also getting a few of these
as it defaults to either the python folder on your drive where its installed or PATH
cuz ur using pycharm:
go to the interpreter settings
That's not pycharm
then see what modules its finding
That's visual studio
use a program that is built around the language
whats happening
hes getting import errors
partially
and not like pycharm xD
how about this
^
try:
bot.load_extension("whatevercog")
except Exception as e:
print(e)
then check the errors
Where you are loading cogs
where bot.load_extension was
ah
i think its python not finding the file
@bot.event
async def on_ready():
print(f'{bot.user.name} has logged in!')
print("Starting up...")
cogs = ["tanki",
"economy",
"containers",
"DiscordBotsOrgAPI",
"help",
"general",
"admin",
"clans",
"shop"]
for cog in cogs:
try:
bot.load_extension("whatevercog")
except Exception as e:
print(e)
print(f"- {cog} has been loaded.")```
ahhhhhhh indentation
async def on_ready():
print(f'{bot.user.name} has logged in!')
print("Starting up...")
cog = ["tanki",
"economy",
"containers",
"DiscordBotsOrgAPI",
"help",
"general",
"admin",
"clans",
"shop"]
for cog in cog:
bot.load_extension(cog)
print(f"- {cog} has been loaded.")```
ik i tired to indent it but it did not work xD
Python IndentationError will come back to haunt you
i just use os.listdir("cogs")
@modest maple so uh are these files in a folder called cogs?
yh i think they are
ohhh theres your problem
yup
if you need to import from a folder
not looking in the right area for it
bot.load_extension(f"cogs.{cog}")
if its in a folder youre gonna need to do what he said
or import it directly from that folder
@solar wraith did it work
Wait what
hold up
im getting help from some one
Lmao
pretty much
Sounds gay
# utils/gay/owo.py
# meanwhile in main.py...
from utils.gay import owo
it took u that long to do that xD
But like why
we don't use require
The import makes like
complete sidenote: how can i get my activity feed to update every 120 secs?
At least a bit of sense
But in a string?? lol
Tbf
Imports in rust are like rs use std::thing::AnotherThing
@valid frigate woah no
lol wrong channel my bad
thats still wrong
xD
kek im out
# good
from this import that
# bad
import this.that
a lot of languages use import statements
i think the only one that doesnt is js prior to emcascript 5 or something
Like anything
Like in rust ```rs
// private - unaccessible from other sources, only available to/in struct/class or said file
let private = true;
// public - accessible from other sources
pub let public = true;```
i actually don't know
Not that I heard of
how do I get a bot to check to see if there in a certain server
What library
im sorry do you mean like my programing language
The API wrapper you use (if you use one)
like visual studio code
you use discord.js?
yes
then that's the library you use
sorry
you can check the id of the guild is the same as the guild you want to be in
thanks
hey so i'm having a sort of specific issue with eris sharding on multiple processes, on some occasions (local & production) shards will go offline with code 1006 (connection reset by peer) and i'm assuming it has to do with my local device
most of the time the lib handles reconnections fine, but other times it's gonna be stuck in a "invalid session/already authenticated" loop
in these scenarios i have to manually reboot every cluster but obviously don't want this happening, i also debugged by listening to debug events emitted and everything seems normal so what could be the reason for this?
https://conquestsim.io/upload/sunny-level-2290.png anyone know if i can do operations like this in mongo queries
or will it yell at me
as long as it resolves to some value it's probably fine
iirc it needs to be a primitive type though like boolean, number, string, etc
also try it and s e e
yea .reduce resolves a number so we gucci
@valid frigate I also get 1006 errors with Yamashiro
yeah it should work then
I think it's the host and Discord's connection
it's not eris
yeah its our own devices
however it's eris' fault for not handling duplicate identify requests
I usually get 1001 or 1006 errors 
Is the use of ssh considered a security flaw?
``` how i get the dbl token and what is webhookAuth: 'passwaord'
idk

did you even created a webhook?
@raven torrent yaa
-bots
@warm marsh No, if you use it correctly you'll be fine
@cedar brook @summer torrent #commands
๐
I just said to not run it here..
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
You should be used to this then
Might wanna learn basics before getting into non-beginner-friendly libraries
XD
Perhaps ur right
But
;-;
ugh
ffs
discord.ext.commands.errors.NoEntryPointError: Extension 'tanki' has no 'setup' function.
:C
what the frick frack snack am i doing wrong
Don't put the function setup under the class
How are you defining the function
def
And where exactly
class Tanki:
def init(self, bot):
self.bot = bot
def tanki(bot):
bot.add_cog(Tanki(bot))
that
It needs a setup function outside of the class
Wherever you want, just don't indent it
Did you subclass
if (command === "ping") {
const msg = await message.channel.send("Pinging...");
await msg.edit(`Pong! (Took: ${msg.createdTimestamp - message.createdTimestamp}ms.)`);
console.log(`${message.author.tag}` + " Used PING " + `${msg.createdTimestamp - message.createdTimestamp}ms`);
}``` I want to add the time at the console log, What do i need to use?
@slender thistle i properly did the subclass it still complains about the cog error
How did you subclass
class tanki:
def init(self, bot):
self.bot = bot
self.cog = tanki
that\
is all i have
CreatedAt just found at docs
ig it's time for me to find a solution for you
(probably is)
I mean
That's the first website I found when Googling "subclass python"
Yet you're still not doing the right thing
F
class some_class(some_other_class_we_want_to_inherit):
i want to inherit the bot right?
How did you even come to that conclusion
I literally gave you a solution where you just need to replace 2 things
We're talking Python here
yush
i know
leave my brain out of this xD
YES
thanks
damn
im dum
<discord.ext.commands.context.Context object at 0x000002107F053988>
<discord.ext.commands.context.Context object at 0x000002107F053988>
Ignoring exception in on_command_error
Traceback (most recent call last):
File "D:\tanki online\Tanki Online Bot\discord\client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "D:\tanki online\Tanki Online Bot\run.py", line 212, in on_command_error
channel = ctx.message.channel
AttributeError: 'CommandNotFound' object has no attribute 'messag
@slender thistle well what the frick did i feck up this time
How do I say it
Did you help me help you by giving some part of your code
Specifically the one that applies here
well tanki now loads properly
but commands are recieved and then it gets a mental break down
no we are one cog further
xD
Give me your on_command_error
Eric I gotta ask how much experience have you had programming discord bots in python and python in general?
A lot of people either use bot makers or straight up get to Discord libraries without learning the language
and that would be your issue
That's kinda the issue... You've started with a library that is using alot of external classes and modules
Which you need to know how classes and functions works and python in general
yush
its also complaing about data even though data is a folder
and not a class
from data import config
from data.checks import owner_only, blacklist_check
data is a folder
containing owner_only.py and blacklist_check.py
but it cant import 'data'
Have you shown python where to look...
:/
which file you need?
Most likely the bot code itself, the modules shouldn't need touching and shouldn't be touched
i will send you the main file
As far as I can see you haven't told it to look for data directory locally
ah
well
link to how to do that?
but tanki.py uses assets located in data too
do i need to do this not only for run
but for all cogs?
No if the files are in the same directory they should be fine
But I'm not entirely sure about sepecifying location to import from
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 about i dont read a 14.19 megabyte file and just look for what i need :D
One message removed from a suspended account.
One message removed from a suspended account.
dv please
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i am not going to waste a year of my time programming shit that i will never use again

the furry python coder is at school
but they may get out soon and you can ask them then
One message removed from a suspended account.
channel = ctx.message.channel
line 212 reads as following: channel = ctx.message.channel```
i think chill fish can help me better he has the code
:3
lul
Bruh no offense but you're trying to stuff in python that you've never done before, you've dived straight into fairly high level code calling upon other homebuilt modules... So I do have to agree with DV that you should learn the language before trying Todo advanced things with it, the bot you've been sold isn't exactly simple in code and if you don't know how python works or how to program in it then how are you going to program the commands?
oofers
if you were sold a non-working bot then thats something you need to bring up with that dude 
when it is running stable i will look into things
If you don't know how to work python you are going to get error after error after error
There's no point in me helping you to correct the code that if it wasn't working in the first place should be taken up with the creator. Cuz even when it is working it won't respond or do anything you want it Todo cuz you can't program the commands which you need to know how to process data you get parsed etc...
Jumping into bot building in any language is a jump especially if you don't program the bot but by bit learning how the module works
are there any errors? @solar wraith
no
aw man deleted message
Bruh
One message removed from a suspended account.
Ofc it's invalid

One message removed from a suspended account.
Do you have a developer portal?
One message removed from a suspended account.
One message removed from a suspended account.
@solar wraith like said above, using another man's token is not suggested generally, head to the discord developer portal and generate a token for your bot
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.

Smh
ffs
AttributeError: module 'discord.ext.commands' has no attribute 'Cogs'
oh nvm
im stupid
let embed = JSON.parse(rest_of_the_string).attachFile();
message.channel.send({ embed }); //parse the command embed using leovoel.embed visualizer }
}```
this thing work, but it wont show me the imageee, anyone can help me out with this issue. :v
One message removed from a suspended account.
One message removed from a suspended account.
it still didnt show hmm
and my other members dont see any image in the embed too
there must be some line im missing to make it attach the file or something
JSON.parse will return an object that doesnt have an attachFile method
no thats not the problem
ill google lmao im gonna be stuck with this for hours
"image": {
"url": "https://blablabla"
}
you are sending embed data directly, so you gotta do it in the way they expect you to https://discordapp.com/developers/docs/resources/channel#embed-object
One message removed from a suspended account.
client.ws.shards.map => a a.status 
One message removed from a suspended account.
One message removed from a suspended account.
if you are having trouble with arrow functions, you should try using a regular anonymus function instead
One message removed from a suspended account.
One message removed from a suspended account.
the following 2 are the same
functionWithSickCallback(result => { /* do stuff with result */ })```
```js
functionWithSickCallback(function(result) { /* do stuff with result */ })```
wait did you just say you dont know functions??,
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.
thats the problem
Getting Started With Javascript | Learn Javascript For Beginners In this video series we are going to learn modern javascript from scratch. This video is rec...
this one seems to be a good tutorial too
function name(...params) {}
// or
let function = (...params) => {}``` in a nutshell
first is a regular function expression, second is an arrow function
the ... is the spread operator, if you dont know what that is, just dont use it
A function as a parameter is known as a higher level function or callback
here are some very simple functions
function add(num1, num2) {
return num1 + num2;
}
add(2,2) // 4
add(1, 999) // 1000
function greet(name) {
return `Hello, ${name}`;
}
greet('world') // 'Hello, world'```
One message removed from a suspended account.
it doesnt. you said you dont understand functions, so we gave you guides and examples
You should learn and read the guides first before you continue with the broadcasteval
One message removed from a suspended account.
You really work yourself into broken code if you don't learn before you code
Then read the docs about broadcasteval
What version of d.js are you on?
I believe she is on master
One message removed from a suspended account.
One message removed from a suspended account.
And are you sharding internally or are you using a shardingmanager
Like
Internal sharding or shardingmanager
One message removed from a suspended account.
One message removed from a suspended account.
Then read this guide: https://discordjs.guide/sharding/#broadcasteval
One message removed from a suspended account.
How much server is your bot in
Broadcast eval should return Promise<Array>
One message removed from a suspended account.
One message removed from a suspended account.
You just copied the code from the guide
One message removed from a suspended account.
Then read the guide...
One message removed from a suspended account.
previous...
Isn't reduce a built-in func
reduce is basic js yes

One message removed from a suspended account.
One message removed from a suspended account.
Client#shard doesn't exist
He's not trying to add all of shards' member counts together
One message removed from a suspended account.
Oh, apologies
-supportserver @analog jolt
@analog jolt
This server is NOT the support server for ANY bot. You need to click on the "Support Server" button on the bot's page, NOT the "Join Discord" button at the top of DBL.
also this @analog jolt https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-
One message removed from a suspended account.
sorry typo
y keyboard keeps cutting off the first letter of
very
my *
every sentence
idk why (i didn't swear, shut)
@sage bobcat im only gonna explain this one last time.
client.shard.broadcastEval('this.shard.id').then(a=>{
// a is an array of the ids of the shardsums
})```
broadcastEval is something that runs a chunk of code on all shards. It's literally an eval that runs on all your shards
One message removed from a suspended account.
One message removed from a suspended account.
client.shard.broadcastEval('this.shard.id').then(a=>{
/** a is an array of the ids of the shardsums.
so for example, if you have like 3 shards, it'll be [ 0, 1, 2]
**/
})
One message removed from a suspended account.
so basically
One message removed from a suspended account.
One message removed from a suspended account.
because it's running an eval on every single shard
One message removed from a suspended account.
a shard = a separate process
One message removed from a suspended account.
what
One message removed from a suspended account.
One message removed from a suspended account.
broadcast eval has a defined variable, THIS.
this is the client
so imagine if you're running an eval on one of the shards
basically
would be this.user.id in broadcast eval
it just runs on all of them
One message removed from a suspended account.
YES FINALLY
maybe 50/50
okay so
client.shard.broadcastEval("this.shard.id + '-' + this.ws.ping").then(a=>{
/** a is an array of the ids with the "-" and the ping of each shard
so for example, if you have like 3 shards, it'll be [ "0-somepingvalue", "1-somepingvalue", "2-somepingvalue"]
**/
})
it's literally that easy
i keep thinking it says shardums
it does
One message removed from a suspended account.
i speak in turkum
One message removed from a suspended account.
what are you doing
that just declares an array with those values
thats an arrow function
a just defines what is returned from the promise
because broadcast eval returns a promise
the promise is in an array
the array contains the value you evaluated but for each shard
One message removed from a suspended account.
yes i know 
One message removed from a suspended account.
One message removed from a suspended account.
what
wait you're using internal sharding or traditional sharding
cuz you dont need to do this if you're internal sharding

One message removed from a suspended account.
One message removed from a suspended account.
have you considered learning how promises work and how to read documentation before trying to dive into the deep end?
do you know what a callback is?
One message removed from a suspended account.
a is the callbackum
aafter the promise is resolved, a returns
just like how client.fetchUser() works; you have to .then(user => { /** run some func **/ } )
by "traditional" do you mean, you're trying to make your own sharder?
One message removed from a suspended account.
One message removed from a suspended account.

you're using the d.js manager, how are you creating shards?
One message removed from a suspended account.
One message removed from a suspended account.
okay and you're trying to fetch values from each shard?
One message removed from a suspended account.
this is what you need
go have a read
thats what iara has been saying for 2-3 days
One message removed from a suspended account.
finally

One message removed from a suspended account.
F
${the-status-thing === 0 ? "green heart" : "red heart"}
you used that in your prior code
One message removed from a suspended account.
did you even consider googling or thinking of the answer before blindly asking in #development first?
One message removed from a suspended account.
One message removed from a suspended account.
is asking peeps to do something for money allowed? Ping me if you have answer
Dm Oliy and get access to #434058442764714002
Stalking someone for money? Definitely not.
Do some code for money? Well, yes
How do I convert 3:41 into seconds?
One message removed from a suspended account.
One message removed from a suspended account.
TIAS
One message removed from a suspended account.
lel webmd
@slender thistle I know, but it's not always 3:41, depends on the song duration
?
One message removed from a suspended account.
One message removed from a suspended account.
Good fucking lord
@glacial mango here, I'll send you something in DM
It should help you out
Thanks
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.
@glacial mango 
You can calculate that very easily
if you know how to convert an hour into minute, a minute into seconds, etc.
I would take a wild guess on it but ik itโs wrong
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.
are those even in quotes
One message removed from a suspended account.
broadcastEval takes a string
^ it's a string with a script in respect to client
I would still use fetchClientValues
Something like let statuses = await <ShardClientUtil>.fetchClientValues("status")
But you still need to do what you want with the statuses array, which is what https://discord.js.org/#/docs/main/stable/class/ShardClientUtil?scrollTo=fetchClientValues returns (a promise array)
how to do or? js if (command === prefix + "help") { like help but can i add like a or to like help / commands
..```?
||?
Have you done basic js?
you don't know if you've done basic js?
I don't see any point in calling anyone dumb here
If you use lua its or 
same with python
How to get the ping of a shard?
discord.js
Master or stable
stable :)
client.ping
Okay ty
:+1:
One message removed from a suspended account.
One message removed from a suspended account.
Fetch client values takes a string and evaluates it in respect to client
One message removed from a suspended account.
One message removed from a suspended account.
I can tell you ws doesnt have a shard property it does have a shards property even with that Im not sure what you're trying to do would work.
Assuming you're on master because you use .ws though
I need to go anyways. Good luck though
@sage bobcat do you know what a promise is?
One message removed from a suspended account.
i'll take that as a no
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
http://www.r-5.org/files/books/computers/languages/escss/fp/Daniel_Parker-JavaScript_with_Promises-EN.pdf
https://discord.js.org/#/docs/main/stable/class/ShardClientUtil?scrollTo=fetchClientValues
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
if you "know" what a promise is, why aren't you resolving the promise returned from fetchClientValues?
One message removed from a suspended account.
is that why you're not resolving the promise returned from fetchClientValues?
One message removed from a suspended account.
d.js relies a lot of promises, i suggest you read on how promises work and what it means to resolve a promise before attempting to do what you're doing
http://www.r-5.org/files/books/computers/languages/escss/fp/Daniel_Parker-JavaScript_with_Promises-EN.pdf
either that or i think it would be wise to google your questions that likely already have answers rather than asking in #development every time you hit a small brick wall
eg. "how to resolve a promise in javascript/node.js"
Also another tip
If you're using async/await promise chaining becomes redundant
Basically .then and .catch don't really do anything since you can just put async before the promise
So if you see any examples in npm packages and such using .then don't copy and paste their examples
how can i show Custom Status text in command?
custom status is not available for bots yet
i think he is asking how to retrieve a users custom status
same answer afaik
fair
last time i checked, library maintainers were waiting for discord to officially release docs about it
ah
pretty sure you can get them if you use raw presence packets
i think a lot of people prefer not to use raw presence packets
also discord will probably release the docs in a little bit so lib maintainers will implement it soon
Hi
actually some libs already support it, have supported it for like 3 months before discord released it
in d.js master you can see it in user.presence.activity
Lib devs document and support it but bots still can't use custom statuses, right?
not sure if bots ever will
I mean I don't think we got a statement on that one, or did we?
I think the statement was "we're looking into it"
Custom statuses are activities with a type of 4, a name of Custom Status, the actual custom status in the state field, and a new emoji field for the main emoji. Bots aren't blocked from doing this, but... well, read the docs: https://discordapp.com/developers/docs/topics/gateway#activity-object.
Bots are only able to send name, type, and optionally url.
As bots cannot send states or emojis, they can't make effective use of custom statuses. The header for a "Custom Status" shows up on their profile, but there is no actual custom status, because those fields are ignored.
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
that was posted 13 days ago
idk the current state of affairs
Oh yeah that Reddit comment
In how many days they will see my bot
you know what discord should implement?
opening links like those in a popup or something
or preview them
imo actual quotes linking the original message and showing the quoted message content would be decent
do it
iirc there was a bot which is @carmine adder but idr if it does that
how can I make my bot scan videos and download them/sort them by the 'actor'. I got the downloading and sorting stuff, I just need the AI to figure out similar faces.

Basically just nodejs ai
You're an angel
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.
One message removed from a suspended account.
a is the response
promises are basically doing something that takes time, and then receiving an answer, same as requesting a website or url
doSomething.then(whateverHere => {
// whateverHere is the response. console.log it to see what the response is, do something with it, etc...
})```
One message removed from a suspended account.
ye
One message removed from a suspended account.
is the response
One message removed from a suspended account.
a is a response
One message removed from a suspended account.
basicly its a variable
you name it whatever you want
One message removed from a suspended account.
One message removed from a suspended account.
is the same as js doSomething.then(function(whateverHere) { // whateverHere is the response. console.log it to see what the response is, do something with it, etc... })
One message removed from a suspended account.
and u can async it by doin ```js
doSomething.then(async(whateverHere) => {
})```
its cleaner
One message removed from a suspended account.
not really sure about speed but yea
arrow functions have a slightly different behavior, especially when using classes and the keyword this
other than that, they are the same
lemme test which is the fastest
One message removed from a suspended account.
console.log it to see what it is
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.
if you cant test it, you wont be able to finish it lol
One message removed from a suspended account.
One message removed from a suspended account.
basicly... a in this case is an array
and the items in the array are the output of the eval for each shard
One message removed from a suspended account.
also whats with the " in front of the this.shard.id
yea should be
well thats what it says on the docs
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.
what no
One message removed from a suspended account.
<> means type
One message removed from a suspended account.
it doesnt exist in js, only used for documentation
cyber f.then(async (x) => console.log(x)) should work right
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.
probs just do (this.shard.id + '-' + this.ws.ping + '-') + (this.ws.shards.status === 0 ? 'green_heart' : 'broken_heart')
One message removed from a suspended account.
use the brackets
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
wait...
dude...
the promise returns an array
that means your a is itself an array
do .send(JSON.stringify(a)) and you'll see
the thing i sent dv is saying that this.shard doesnt exist... but yea
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
broadcastEval takes a string
your entire code to be sent to other shards, must be sent as a string
.broadcastEval("your code here")
o yea me stupid
else you're sending stringified versions of that shards own information
basically, this shard will send text, and the other shards will eval() it
and send back the result
bruh moment
theoretically couldnt you spawn shards using some upper level management then use ipc to request shard data on demand
writing a gigantic script in a string seems kinda wack


hm




why u do this