#development
1 messages Β· Page 1148 of 1
Np
Could be an hour, could be 24 hours
That's either ratelimit or connection problem, check your internet connection or if you host on a hosting website, check it's support, if ratelimit
Ratelimit would only last an hour on max
For voice channel connection
Hi 
I think it is a connection problem
zzsound_quiz
Is this scrapping?
As i said, i think he is lagging or his discord is out of sync
zzsound_quiz
@delicate shore web scrappin?
Ye is it web scrapping?
As i said, i think he is lagging or his discord is out of sync
@earnest phoenix idk...
Becuase I couldn't find any API
lol
zzsound_quiz
Dsnt look like
@delicate shore It's just an api
What is this ment for?
Which one ?
@midnight blaze Do you realize which channel you are in?
dude
Auto Tyler
@slender thistle His discord might be out of sync
Typer
You can just use mathematics to calculate the distance between two lat/long coordinates
This happened to me before, idk wtf is going on
You don't need an API for that
@delicate shore It's just an api
@earnest phoenix
Which one
Auto Typer?
we have been tagging you
or maybe he's testing a permission thing
10 messages later lmao
@delicate shore What's the api Actually meant for tho
for the longest time
or maybe he's testing a permission thing
still wrong channel
@delicate shore What's the api Actually meant for tho
@earnest phoenix
Umm what?
the thing is, bots can see here, shiv.
you can test any permissions in your own server
oh yea
or lack of permissions
@delicate shore what do you want to do
There is also 2 testing channels
@solemn latch , It doesn't work on 4G either.
@delicate shore I mean does it have to calculate something like what's it's purpose? Maybe i got one
@delicate shore what do you want to do
@ionic dawn
XP bots use that reasonably. Permission testing isn't a valid reason to continuously use commands in testing intended to be used for communication
Yeah but what is that
Its a simple calc or does it require any data from somewhere else?
Explain the command purpose
I think it calculates the distance between coordinates and returns kilometers and time depending on the kilometers
Idk wtf is it supposed to be
it's simple
@delicate shore Does that use a map api or do you actually calculate the coords difference with a math function?
that 120 minute cooldown timer
That's what I dunno

if you need a map api or whatever, just use OpenStreetMap?
you dont need an api for that
Google maps provide coords
if you need a map api or whatever, just use OpenStreetMap?
@paper cliff
https://www.movable-type.co.uk/scripts/latlong.html
just find how long a degree of longitude / latitude is and you can calculate it yourself
ah i thought it was a real distance calculation, disappointed
Use the the haversine formula
or a lib for it if you're lazy, but I wouldn't offload that to an api lol
yes, that's the link I sent
[In fact, the earth is very slightly ellipsoidal; using a spherical model gives errors typically up to 0.3%1 β see notes for further details]
just find how long a degree of longitude / latitude is and you can calculate it yourself
@sonic lodge
How
they have copy paste code on that webpage
What do you have to scrape??
@faint prism
Web-scrapping
No
It's a math function
Ok
what is the alisases command?
thats from the site
im using py
Doctor House?
So as i've been creating functions, if a parameter is 0 and you use the ! operator on that parameter that's 0, it returns true even though the parameter exists, anybody know the reason behind this?
use ===?
!0
0 is falsy
inverse of false is true
if thats what you mean
yeah because Boolean(0) === false
Example:
Function
function whatever(firstP, secondP) {
if (!firstP || !secondP) {
throw new Error("Expected both params");
}
}```
=>
```js
whatever(0, 1);```
<=
```js
Error: Expected both params``` and yea
0 => false
1 => true
In booleans
what about if (secondP === undefined)?
I know the workaround this is js Number.isInteger() function
But yea just wanted to know the reason behind it
I know how to bypass it's falsy ness
I gues you could use === undefined
or isFinite(param)
I mean those involve a lot more than === undefined
true, im just assuming the params have to be numbers
what to do if i want my bot to send a message whenever it is added or removed from a Guild
hm ok
how 2 code
you cant 2 code, you have to 4 code
how 4 code
-faq 3
(node:7312) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.image.url: Could not interpret "{'name': 'a.png'}" as string.
can any1 help?
?????????????????????????????????????????????????????
If you are going to shitpost, #memes-and-media
(node:7312) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body embed.image.url: Could not interpret "{'name': 'a.png'}" as string.
no it's not
whats your code?
canvas to embed
if (done === data.length) {
const buf = canvas.toBuffer('image/png');
let attachment = new Discord.MessageAttachment(buf, "a.png");
let embed = new Discord.MessageEmbed()
.setImage(attachment)
.setTitle('A')
.setTimestamp()
message.channel.send(embed);
https://oliy.is-just-a.dev/38fal_5588.png cant say I expected that
@earnest phoenix how can I get the volume of the message author ID. The volume should be the volume, the user setted my bot's volume
Like:
You setted my bot's volume on 25
Bot: Volume: 25%
I know him. He's good.
π€·ββοΈ its not "do not mention people randomly unless you know them"
just do not randomly @mention people
thats not really a complete thought, or question or anything
I need very good one
this channel (which is for development) is not the one to ask
feel free to ask people in #memes-and-media or #general though
@sinful belfry ok
is that relevant to development?
@earnest phoenix
<link
href="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
/>```
this is not working
or am i doing something wrong i am bad at html
@lusty lintel dude, check the channel description and don't mention random people
I need to msg him
@earnest phoenix
@lusty lintel hi
dude check dms
Whatβs up bro
check dm ks
bru
bruh
anyways
<link
href="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
/>```
-checkdms @lusty lintel
@lusty lintel
Please watch the following video. Replace any instances of twitter with discord. https://www.youtube.com/watch?v=umxmHpUPS5A
this is my code
you could like, dm him directly
try img?
Carry on
^
instead of link
or is that not what you want
try img?
oh ok lemme try i am bad at html
<img src="imageurl" href="where it leads">
did not work either
theres probably more than that
try src instead of href
I thought img didn't have href?
i swear it did
oop nope
instead of logo on top left
mb
I was about to say "give me an hour to create an .html file and use PyCharm to get available attributes" but you were faster than my laptop
You need an img element
ok
aka nesting img in a
^
now we have to return the development to PY devs :))
it has been a long time JS devs took this Channel
ok


<img src="https://MY-COOL.LINK/HERE">
to allow the user to click on the image and be redirected somewhere, you would have to make img element a child element of anchor tag (<a>)
<a href="">
<img src="">
</a>``` for clickable images
regular images are just the ```html
<img src="">
then you got an invalid url
No, img is a single-tag element
or w.e you call them
Yuck glitch assets
what does decoding async do

what does decoding async do
@pale vessel it's not html tbh
it's apm html
to be specific
smp*
isn't it kind of self explanatory
runs the loading in parallel
this is useful for pages with a lot of image assets
Solve what?
that seems to be valid
are you sure none of the classes are hiding it
Tried inspecting it with browser's dev tools?
and that no elements are overlapping with it
if u want clean and clear code
<img
decoding="async"
alt="Mobirise"
src="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
class="i-amphtml-fill-content i-amphtml-replaced-content"
/>```
check console
press f12 and go to console
just inspect element
i just went to console anyways
Hi
will this work if i want my bot to send a message whenever it is added from a Guild
let channel = message.guild.channels.cache.find((x) => (x.id === "739469830343753778"))
let wembed = new discord.MessageEmbed()
.setColor("RANDOM")
.setThumbnail(member.user.avatarURL())
.setDescription(`${client.guild.create.name}`)
client.channels.cache.get(channel).send(wembed)
})```
it says a error flapeze
DevTools failed to load SourceMap: Could not load content for https://phrygian-bittersweet-rest.glitch.me/ww.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
will this work if i want my bot to send a message whenever it is added from a Guild
let channel = message.guild.channels.cache.find((x) => (x.id === "739469830343753778")) let wembed = new discord.MessageEmbed() .setColor("RANDOM") .setThumbnail(member.user.avatarURL()) .setDescription(`${client.guild.create.name}`) client.channels.cache.get(channel).send(wembed) })```
@weak rain https://tryitands.ee
will this work if i want my bot to send a message whenever it is added from a Guild
let channel = message.guild.channels.cache.find((x) => (x.id === "739469830343753778")) let wembed = new discord.MessageEmbed() .setColor("RANDOM") .setThumbnail(member.user.avatarURL()) .setDescription(`${client.guild.create.name}`) client.channels.cache.get(channel).send(wembed) })```
@weak rain discord.js
console.log("I am Ready to Go")
client.user.setStatus("idle");
client.user.setActivity(`Bot on Maintainence`)
})```
i m unable to set activity and status at the same time
client.guild.create doesn't exist
it says a error flapeze
@delicate shore that error is irrelevant, it's just looking for the sourcemap of the js code and it can't find it
Use setActivity once
wait, where did you define message? @reef cypress
i have not used js anywhere
client.guild.createdoesn't exist
@slender thistle u know js too?
Use
setActivityonce
@slender thistle wdym i want to set both
leave it
hm
Doesn't setActivity support statuses
its guildCreate
iirc yes
its guildCreate
@weak rain
hm
ok anyways
but
why does the guild create say its a member π€
client.on("guildCreate", async (member) => {
guild create emits a guild
@delicate shore that error is irrelevant, it's just looking for the sourcemap of the js code and it can't find it
@earnest phoenix ok
and your using message somewhere theres no message
why does the guild create say its a member π€
client.on("guildCreate", async (member) => {
guild create emits a guild
it gives a object called guild
and to get member just use guild.owner
uh no
there's no guild.member
i got guildCreate from djs guide
They are telling you replace member in the function parameters with guild
kk
just inspect element
this is the best I've got for your case
Make sure your element isn't being hidden by your CSS/JS or other elements
Well, if you are looking for a parent folder
yes
i am
noooooo π’ did not ork
work
oh guys i never sent u my whole code
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1"
/>
<img
decoding="async"
alt="Mobirise"
src="assets/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg"
class="i-amphtml-fill-content i-amphtml-replaced-content"
/>```
yesss
Guys is there function to get a random user from a server?
i tried the same code and made it guildDelete from guildCreate and kicked my bot from 1server
but didnt work
An image is an element the user views, so it needs to be in body instead
Guys is there function to get a random user from a server...
guild.user.random?
show your full HTML
full?
all of your .html file content
yikes
Isn't meta supposed to be in head?
well it is
Is it?
I highly doubt that
how do you add spacing on an embed for mobile phone? Right now everything is stacked and it's ugly af
you don't
you can't control how anything is displayed to the end user
not on Discord, at least
discord resizes accordingly to the device screen size
sadly the amount of control you have is pretty much non existant
i notice dank does it with their shop
so it's possible in some way
if you're going this deep into frameworks you might just migrate over to an SPA framework like react or angular, you'll have a much cleaner structure and there's already established frameworks (i personally use material-ui for react) @delicate shore
maybe they have blank values they are displaying
i can't navigate through your code from how messy it is
:+1:
I saw a tutorial online and it had this line of code:
var WH = process.argv[4] || 4;
Why is || there in a variable declaration even though it is a comparison operator in JavaScript
can there be more than one body elemt?
@delicate shore Wouldn't make sense to
<html>
<head>
<!--All your script,css, metadata links-->
<head>
<body>
<!--All your visual stuff-->
</body>
</html>
if process.argv[4] is a falsey value, 4 is assigned instead
its actually extremely useful for things where you don't know what your getting
for example, in an avatar command
const target = message.mentions.users.first() || message.author
will get a mentioned user if there is one, or get the author of the message if there isnt one
ooohhh
then you dont have to if else everything
ooohhh
or in cases of default values
const cooldownAmount = command.cooldown || 3
will get the cooldown from the command, if there isnt one, itll default to 3 seconds.
lots of little uses
Cool
JS has odd syntax
dude
How would I implement that in C#?
can I give donation
command?.cooldown != null ? coolDownAmount = command?.cooldown : coolDownAmount = 3 maybe?
Never have before
Maybe I just don't know that syntax
Ik you need to be careful to avoid null references
I thought you could do
s = q || ain C#?
@slender thistle You can do
bool s = bool q || bool a
but if it was anything other than boolean datatypes, I don't think so
well fuck
π
Json databases are known for being unstable.
In order to make a json database stable ish, you'd have to put in more work than just using a normal database.
c'mon
c'mon
@slender thistle Convert from 0 or 1?
0 to a boolean
(bool)0 doesn't work π
bool class might have a parse extension
What does bool.TryParse expect?
bool.TryParse(object, out bool varName)
oh shit, forgot out
Json databases are known for being unstable.
In order to make a json database stable ish, you'd have to put in more work than just using a normal database.
@solemn latch i wanna use the database in other programming languages too
(bool)0 doesn't work π
thats C type cast, ofc not, but you dont need to even do that in C/++
TryParse returns a bool on if Successfully Parsed or failed, out is the actual output
Most databases work with the vast majority of popular languages @earnest phoenix
it's expecting a string?
@slender thistle I saw that lmaooo
Or can be implemented anywhere
Most databases work with the vast majority of popular languages @earnest phoenix
@solemn latch mongoose included?
string xs = "false";
int x = 0;
if (bool.TryParse(xs, out bool yeet)) {
x++;
Console.WriteLine(x);
}
else {
x--;
Console.WriteLine("gay");
}
returned 1 aka true
bool result = someInt == 1 ? true : false
how you would do that in C btw ^? ok quick google search covered that up
why did I think that was double assignment
because inline Ternary operations look weird π
also
that code block may be incorrect
the if(TryParse()) is for if it parsed successfully or not
bool yeet is the resulting parsed string to bool
did it parse like if ParamString == "false" or am I missing something?
oh, so I'm supposed to check yeet instead?
Mongoose is specifically for js iirc.
Mongodb has libs for quite a few languages.
https://docs.mongodb.com/drivers/
string xs = "false";
if (bool.TryParse(xs, out bool yeet)) {
yeet ? Console.WriteLine("YEH") : Console.WriteLine("NAH");
}
else {
Console.WriteLine("Parse failed");
}
Oh
But how would parsing it fail and bool returned false?
wouldn't that mean the "true" branch just won't run?
I can't English tonight, excuse me
Why would yeet ? Console.WriteLine("YEH") : Console.WriteLine("NAH") run if parsing failed?
I wanna make a welcome text on my server. its a private bot.
@earnest phoenix dm the user bruh
TryParse's signature is for if parsing operation is successful
The output or out is the actual bool.Parse(string)
member.send("yo");
Should I try learn c#?
The simplest you can get
Why would
yeet ? Console.WriteLine("YEH") : Console.WriteLine("NAH")run if parsing failed?
@slender thistle It wouldn't, only if the parsing was successful
Is java or kotlin worth learning?
YES
I think I'm getting the logic
You should then get the channel you want to send to
C# all the way
@earnest phoenix fuck off
Should I try learn c#?
@golden condor yes
And send a message to that channel
I think I'm getting the logic
@slender thistle Read the dotnet docs π
So I should try learn c#
Implying I'm smart enough to understand, that is π
How would I use it on Ubuntu
But thanks, will do when I need more help with C#
Like what program do you recommend
How would I use it on Ubuntu
.net core
np
For editing
and vs code
I enjoy how unforgiving C# is π
Look at the docs
I can already see how unforgiving it is π
C# seems nice
in server
@earnest phoenix that's a little more complex but the main bulk is to get a config command with a welcome channel set and a welcome message (if you wanna copy MEE6) then just dobot.channels.cache.get("welcome channel id").send("welcome message with user ping");
I remember slapping LINQ queries everywhere in my C# assignments instead of doing everything manually
Is jvm any good to learn?
that's how lazy I was
Linq is great
Java sucks hail JavaScript
Shut up
Java isn't anything like JS lol
Lol
wut
Other languages exist
Java Virtual Machine (JVM) is a engine that provides runtime environment to drive the Java Code or applications.
sooooo uhhh
Java is more like C#
Do you mean "should I learn Java"
jvm is to java like node.js is to javascript
umm maybe
honestly depends on your use case
Java sucks though I don't like it (my opinion)
Java is okay
I want to try c# or java, which should I go for?
I like Kotlin more though
dotnet all the way
Java sucks though I don't like it (my opinion)
@faint prism aWeSoMe GrAmMaR
ikik
I intend to use C# for actual software like applications but WPF is pain in the ass to do as a beginner
wait i have a meme for this convo
Nahhh
Lol
I intend to use C# for actual software like applications but WPF is pain in the ass to do as a beginner
@slender thistle Let me do a tutorial sometime for you
<span class="navbar-logo">
<amp-img
href="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
layout="responsive"
width="54.72972972972973"
height="45"
alt="Rishtpusht"
class="mobirise-loader"
>
<div placeholder="" class="placeholder">
<div class="mobirise-spinner">
<em></em>
<em></em>
<em></em>
</div>
</div>
</amp-img>
</span>```
Python seems to be becoming big
I enjoy teaching
this is not working
but it is better than before
now it says a picture icon and rishtpusht along iwth
I don't intend to use Python for anything other than Discord bots
Should I try c# or java/kotlin?
I hate Python it is too slow
<span class="navbar-logo">
<amp-img
href="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
layout="responsive"
width="54.72972972972973"
height="45"
alt="Rishtpusht"
class="mobirise-loader"
>
<div placeholder="" class="placeholder">
<div class="mobirise-spinner">
<em></em>
<em></em>
<em></em>
</div>
</div>
</amp-img>
</span>```
shouldnt use python not even for discord bots :^)
try c
see this
Which is better/has more use cases?
pls
Tim please I'm a lazy ass :^)
shouldnt use python not even for discord bots :^)
^
Should I try c# or java/kotlin?
@golden condor try both
@quartz kindle it's not working
kotlin is like python btw
the syntax is similar
it keeps doing this
What about Lisp :3
instead of logo
I'll go c# because java can be weird
yeah
Which is better/has more use cases?
I love JS because it makes it easy AF to make a web dashboard for your bot because both use JS and you don't need to do translation (or smth) jazz
C# ftw
is the file extension .cs?
no
Should I try c# or java/kotlin?
@golden condor if you want all the stuff Java has but don't want to use it directly and prefer better syntax try Kotlin. Really you could try both C# and Kotlin and make your decision
I'm asking a developement question.
is the file extension .cs?
asking me?
yes
No
is the file extension .cs?
yes
;-;
Ok
Use Kotlin and make an Android app
can anyone pls look into my problem π₯Ί
can anyone pls look into my problem π₯Ί
@delicate shore just ask instead of begging
I am gonna do both, but I'll do cs first
<span class="navbar-logo">
<amp-img
href="https://cdn.glitch.com/df08f666-9280-420d-aa1e-87390a682bb0%2Frishtpushtlogo-90x74.jpg?v=1597248211629"
layout="responsive"
width="54.72972972972973"
height="45"
alt="Rishtpusht"
class="mobirise-loader"
>
<div placeholder="" class="placeholder">
<div class="mobirise-spinner">
<em></em>
<em></em>
<em></em>
</div>
</div>
</amp-img>
</span>```
i did like 6 times
scroll up
mobirise 
Just code html my dude
You can do that in normal html
mobirise 
Wish I had perms to screen share in voice channel lol. Code walkthroughs would be fun
Mobirise is littered with watermarks
the problem
hmmmm
@faint prism you can't?
You should be able to screen share
nope
O
isn't it supposed to be src
Is it because you have no roles?
I can add you to my bot if you want
Are you tryna make an img element
@earnest phoenix yes
Cc
Are you tryna make an img element
amp-img?????
huh
href
isn't it supposed to be src
@delicate shore try that
how to compare the build, and when the build changes send image ?
???
Sorry but we can't understand your English, maybe try asking in some other language in #memes-and-media
huh
shivaci once told a guy to come to shitpostfor support in other languages so
idk how to compare the build and when the build changes send image π
TheKidEdits what's your question
Hey
I have a question
What's your question
π
@earnest phoenix So, My question is that, I want the bot to add reactions and when a user clicks a reaction, It switches to another embed
Like CarlBot
Try smth like message.awaitReactions
Reaction event handler
The edit part is easy
The message.awaitReactions is a little hard
Can I have a link to it
why not search it up yourself
me always clicks the terrible tutorials
Keep a collection of pending message Ids or something
Like, If you click β‘οΈ It switched to next page
@vapid bluff same
i use that system
works prefectly
tip: use a custom emoji, not a default one
permission missing for fuckinf help command
just give it perms with the invite url lul
just give it perms with the invite url lul
The guy who added changes the URL permissions query lul
if you dont do that, well, you should lol
can i ask a question in a fancy way
owo what's this in javascript
so if i do this inside bot.on() then it will reference bot?
If it's inside the bot class. ||Idk JS :)||
||lmao what||
mattthew FTW
also we getting #general now
quicko ask a development question so mods don't kill us
bot.on === client.on right?
like simmalar
No
Not always
Depends
If you defined client as bot then
if bot = Discord.Client() yes
if bot = "gneusregursh" then no
lmao why not
sounds epic
i could do c.on
ye
just anything my client is declared as
Owo.on("owo"
if you console.log(this) inside a bot.on("bla", something => {}), you get the global context because there is no context, and arrow functions do not have their own context
if you console.log(this) inside a bot.on("bla", function(something) {}) then you get your bot client, because a regular function has its own context
WoW
So I want to start learning c#, what do I need to install on my system
(using ubuntu)
So I want to start learning c#, what do I need to install on my system
@golden condor dotnet sdk
You can build, test, publish, and even run C# code with the dotnet package
@faint prism how do I run it? Is it dotnet ?
ye that's the command
Worked
What is an npm package
What is an npm package
@earnest phoenix Bad code someone else made, that you shouldn't be using, but you couldn't be fucked to write yourself
lul reactions on Callum's message
Bad code someone else made, that you shouldn't be using, but you couldn't be fucked to write yourself
@faint prism lol what
You asked, lol
lol
A lot of bad code on npm
that was funny but ain't helpful
ewww
compact
eww, only seeing 10 messages at once
@golden condor dotnet new console -o myNewProject/
Will scaffold out a console app project
what
true
i meant non compact
i don't wanna look like I'm minimodding but i get too angry at smol stuff so just deal with it
Also
What is a node module
Lol
Lol x2
you also need the sdk
What is a node module
what do you guys think about making a minecraft wiki thing?
for my bot?
i think its a good idea lol
Cool
Good idea
i think your focus should be learning python first
What is a node module
https://lmgtfy.com/?q=what+is+a+node+module
and i am trying lol
Anything helpful === community will appreciate it
node modules come in a few forms
packages are modules, you can also make your own.
Cool
I'll make mine
Someone said he made his own discord libary is that possible?
node's ecosystem has too many shit packages tho lmao
yeah
Someone said he made his own discord libary is that possible?
@earnest phoenix of course
discord.js
is that difficult
and tim made discord.js-light
is that difficult
@earnest phoenix of course NOT
he said he made his own OP
If you try then it's easy
with cool stuff
OP?

whats an OP 

Operator
OP???
its op
overpowered


original poster
thank you tim
Binod lol
overpowered
@quartz kindle thanks for kinda ruining the joke
π
im op

yes you are 
owo what's this the difference between .mjs extension and .js extension
js is known as commonjs, it uses the regular requires and old way of doing stuff
mjs is some new fancy js afaict
mjs is known as ecma modules, it uses import instead of require and a ton of different things
ecma?
yes
mjs is known as ecma modules, it uses import instead of require and a ton of different things
So that's why using require throws a reference error in.mjsfiles
yup
huh
i tried function REEEEE = require("REEEEE"); but it doesn't work or maybe the syntax is wrong or maybe i am a dumbass
do you have a module named REEEEE
lmfao that was for just demonstration
i did have a module named smth else
and i referenced the file path correctly too
let REEEE = require("REEEE");
console.log(REEEE("bla")); // bla5
// REEEE.js
module.exports = function(a) {
return a + 5;
}
Of course
you're either not getting the guild from anywhere or you're trying to get a guild where it doesnt exist
show code for context
Can i host a bot on a potato?
Validation errors:
This application has been inorganically grown, so we cannot accept your application for verification at this time.
ok
Unfortunately I couldn't get a developer tag :( I already have the 76 discord and nothing
Ghost servers?
you need to wait for a response from discord
not really
Q: I received an "inorganic growth" error when I attempted to verify my bot. What does this mean? How do I resolve this?
If you're seeing an inorganic growth warning when attempting to verify, that means we determined that a significant number of the servers your bot is in are owned by the same user or set of users. This is considered inorganic and disqualifies a bot for verification. You will need to examine your bot's guild membership and work to fix this issue before being eligible to apply for verification.
Note that our Support team cannot typically undo this flag, and you will need to work to fix this issue on your own.
if (!botID || !await client.users.fetch(botID).catch(console.log) || !await client.users.fetch(botID).bot) return
it always returns, even if its a valid bot ID that belongs to a bot
they said if I donβt answer by October 7th, I donβt know what itβs going to be, I just know I got the 76 disagreements.
can you even .catch an awaited promise?
yeah
lmao
you cant !await bla, you need to !(await bla)
they said if I donβt answer by October 7th, I donβt know what itβs going to be, I just know I got the 76 disagreements.
@split goblet you need to search for ghost servers or multiple servers with the same owner, then make the bot leave that servers
People have some official member of discord on that server?
who needs Sync code when you can !await everything? 
the best place to learn about inorganic growth, or any bot validation stuff is here
https://discord.gg/discord-developers
if (!botID || !(await client.users.fetch(botID).catch(console.log)) || !(await client.users.fetch(botID).bot)) return
still invalid
@split goblet you need to search for ghost servers or multiple servers with the same owner, then make the bot leave that servers
@modest crane As well?
People have some official member of discord on that server?
no, discord can get info about the servers your bot is in
just do what i said
for example, if you or someone spam created a bunch of servers, and invited your bot. its inorganic growth
heh
User {
id: '718932190112776203',
bot: true,
username: 'aleBot',
discriminator: '9340',
avatar: 'f3dec8acd0c00aff08ad3380aec7060c',
flags: UserFlags { bitfield: 0 },
lastMessageID: null,
lastMessageChannelID: null
}
so this is logged after i do the promise ting so the .bot thing doesnt work either
for sOme reason
@pure lion show code
AlguΓ©m br
joking :p
terrible
still better than mine
ah got it
also i fixed
im excited for my botlist lmao
@solemn latch assuming it has oauth2 flow n shit
i think eren approved your bot, might want to talk to them, because im not seeing here
hmm yeah then ask mods
it looks like it was approved but missed being invited
ill get it here :)
invited :)
how do i invite my bot to this server
-faq 1
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=member
message.member can return null
that happens if the message was sent in dms
you also probably should check if its a command first
if(command){
things you need for the command
}
not
things you need for the command
if(command){
}
message.member is null in your case because the bot received a message to its dms, not from the server
you need to check if your in a server before doing sever specific things
if (message.guild) {
// the message was sent in a guild channel
}```
are you confused
can always check channel type too
or just do if(!message.member) return
or that
the error: TypeError: Cannot read property 'roles' of null
you are getting this error because message.member is null
therefore you need to check if the message.member is not null before continuing
your still using message.member before the check
bruh
if (!message.member.roles.cache.find // ...
// ^^^^^^^^^^^^^^ you are still using message.member here as if it weren't null
if (!message.member) return;
// move this statement before "!message.member.roles.cache.find"
if (!message.member) return;
if (!message.member.roles.cache.find // ...
does anyone know how to set up the thing on your discord server where you react to an emoji and it unlocks a new catagory?
you mean, how make a bot that does it? or how to use a bot that does it?
use a bot
you should really learn js basics before making a bot
some one in a diffrent channel sent me here
you should really learn js basics before making a bot
^^
yeah, he misunderstood what you wanted @remote hull
you should go to the bots support server for help with the bot.
learn js basics
@solemn latch where is that
he needs the how2search
-how2search
To find a bot that you need please try searching on the website the main feature you need. You may need to refine your search term, but with just a little effort you can find the bot you need. If you still haven't found a bot that suits your needs, then try searching google for it.
How is topggβs search feature made?
some guy is sitting down and when a search query happens he compiles a list of bots
ctrl f in the json db
does D.js has a way to handle upload emojis or am i gonna have to manual request em? 
havent found anything on the docs
you can upload emojis
well yeah that bit i know, but you got a doc on it?
Sec
<guild>.emojis.create
ty woo
yeah, feels bad when people beat you
go to paste it, just as you do someone else pastes it
I had just loaded the page
was supposed to add an ai to my battleship game today, but i just cant find the motivation 
also related, any way to check avaliable slots?
Uh
well all this i can do via axios
I suppose
but just wondering if d.js has it
You can check how many emojis you've used
the only way to get more slots it by nitro boosts right?
Yeah
Yeah
compare to the number of emoji's currently
It's easier than making a raw request
level 0 servers have 50 slots
level 1 100 slots
level 2 150
level 3 250
well yeah that bit im aware
though im still unsure how i'd get the count for animated/png ones
cache i assume?
and filter isAnimated() ?
does animation affect number of slots?
guild.emojis.cache => filter a => a.isAnimated()
50 animated, 50 static
i i were to upload an animated emote and all 50 are used but not the normal ones i'd get an error
that'd be another way too
get count and then deduce from the total
aight, thats it, ty yall

honestly surprising its such a pain

