#development
1 messages ยท Page 385 of 1
I never said I wouldn't share I just don't see how any of the code would cause issues removing the iframe seems to fix the issue but that's probably one because the iframe makes the page as long as it is in the first place and the code you gave did stop it from repeating but it makes the image bloody huge in the background. I'll try with a smaller resolution in a second to see if that helps.
https://pastebin.com/This-Used-To-Be-The-Link-But-Now-You-Got-Thonked
<body background="https://cdn.discordapp.com/attachments/368412885078114307/397020079381807114/1440.png" style="background-repeat:no-repeat; background-size:1920px 1080px; background-attachment: fixed;" bgproperties="fixed">
Fixed the issue never mind
That is the solution that I gave ^
I see
Thanks for the help
Np
how do i get a pytho bot to react in โ and โ
someone can help me when I try to block a command with the upvotes of discordbots.org which includes an api gives me a 'pipe' error
const DBL = require ("dblapi.js");
const dbl = new DBL ("nope");
const Discord = require ('discord.js');
const snekfetch = require ('snekfetch');
exports.run = async (bot, message, args) => {
dbl.getVotes (true, 3) .then (voters => {
let k = voters.includes (message.author.id)
if (! k) return message.channel.send ('** You must upvote this bot for unlock this command **! \ nUpvote Here: https://discordbots.org/bot/418702711043915776/vote')
message.mentions.users.first ()! == undefined? person = message.mentions.users.first (): person = message.author
const avatar = person.avatarURL
const pls = snekfetch.get (`http://api.anidiots.guide/api/facepalm/?avatar=$ {avatar}`) .set ("token", "nope");
message.channel.send ({files: [{attachment: pls.body, name: 'test.jpg'}]});
})
}
How can I check if the message author voted for a bot? Me is dumb so I dont get the API Docs.
@mental willow message.react?
^
how do i get a channel by input ID/#channelname?
What language 
discord.js
Why do people ask here
Youre more likely to get help in a support area for your lib not some random development channel 
a lot of people hate dapi, like me
because people seem nicer here and tend to spoonfeed too much
Discord API is quite nice imo, at least the D.NET channel
No spoonfeeding but still helpful in the most cases
well in d.py channel, when you ask something most of the time you get an answer similar to "you don't know this!? go look at the docs, you cucc!"
not that literarelly, but it depends
in all channels
D.net channel is bad imo
They don't even have answers to some of my questions or ignore me or say it's wrong to do that
But I mostly have the more advanced questions
The issue is people start coding from discord bots and dont have any knowledge on how to use those docs
90% of the issues are solvable by just checking the docs
How do I stop a field in an embed from requiring a value???
that's annoying
is there any way to pass a value without adding any data (other than a space maybe?) into the value????
I doubt it
I guess I could just add a line stop I guess?
That might work
Mhmm
ok, thanks anyway ๐
๐
If I have a server id snowflake, is there a way I can get that server's icon?
you need to be in the guild
ugh effort
@solemn obsidian in the case of d.net documentation it's insanely garbage
It's auto-generated and sucks badly
well in that case its fair enough
(I mostly just see people asking simple things with d.js, no idea about other libs)
That I can understand but I hate d.net docs and could understand any confusion people get
Anybody know how to keep a bot online 24/7?
VPS
Buy a VPS from an online VPS service
Does anyone know how to allow users to customize a bot prefix for their server in d.py async???
I found the Anybody know part funny cause the majority of bot devs here host their bots 24/7 xD
use some sort of data storing file, a database prefered
oh...ok...I better start learning how to do that ๐ถ
I personally suggest you to learn SQLite3 since I'm using it
but there might be others that will give you other options
ok...
the issue with sqlite is that it's not concurrent
so it doesn't scale for writes
reads can be concurrent iirc
I'm clearly a noob....just saying...
ahhhh
just find a good source that teaches SQLite3 for python specifically in this case
ok
I'll learn it when i'm a bit more advanced....for now people can just stick to T. or @compact hill .... the mention alone is enough....
Is there a way to change the background of your bot's page????
thanks
np
this works on discordbots.org right???
Yes
k, thanks
Any ideas why it's wrong?
https://cdn.discordapp.com/attachments/264445053596991498/425370672508960770/unknown.png
Real offline number is 71
these are only the cached ones
Ur cached
But why at the same time both my beta version + main cached just my server
@topaz fjord no memes in here
I don't get it
what these are only the cached members

fetch all members before to make sure you get it correct
But how two version of the bot cached the count at the same time
All members is OK
Just offline
Idk why
i think i miss your point
This problem is only on my own server
In other servers its OK
Also I have only problem with offline member count
I'm losing my mind
What am I doing wrong
msg.guild.memberCount.filter(m => m.user.presence.status == "offline")
๐ค
as i said try to fetch all members on that server before and aswell use the members presence over the users one
OK, so, where do I put the HTML/Markdown code for a background image in the dbl page of my bot??? Is it detailed description or what???
Fetch all members and iterate through them
@nimble merlin in the description box
Using the style tag
What's wrong with this one:
msg.guild.memberCount.filter(m => m.user.presence.status == "offline")
so, short description...yes???
No
oh
In long description
What's wrong with this one:
msg.guild.memberCount.filter(m => m.user.presence.status == "offline")
Sorry for ping @restive silo
Yes
k
<a href="https://imgur.com/u4TZIQL"><img src="https://i.imgur.com/u4TZIQL.png" title="source: imgur.com" /></a>
</style>``` why won't this work....or have I just made a mistake???
hello? Anyone still alive??? lol ๐
case 'setlogchannel':
args = commandbody.split(' ');
let perms = message.member.permissions;
let cdi = message.member.hasPermission("MANAGE_GUILD");
if(cdi == false) return message.channel.send('You need manage server permissions in order to do this.');
if(args.lenght < 1) return message.channel.send('Please specify a channel ID ');
if(args[1].toString().lenght < 18) return message.channel.send('For now, channel ID must be a snowflake. Please refer to this link to see how to get what you need: <https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID->');
guild.modlogchannel = args[1].toString();
writeFileAsync('./guilds/'+guild.id+'.json', JSON.stringify(guild))
.then(message.reply('Mod log channel set successfully. Please wait a while until the change is saved.'))
.catch(console.error);
break;```
how do i make it more user-friendly so teh user can supply something like #channel OR an ID?
Discord.js?
<a src="https://i.imgur.com/u4TZIQL.png" title="source: imgur.com" /a>
</style>``` Why won't this set a background for my bot????
@nimble merlin
- You can't use HTML tags inside style tag.
- That's how you set a link, not a background.
MoonlightCapital, you can use message.mentions.channels to get the Collection of the mentioned channels in a message, and use that in your command.
<style>
element {
background-image: url(IMAGE_URL);
</style>
oh ok, ty ๐
obviously change element to what you want to set the background to
elaborate
lol
uh
i have a db connection that i need to access based on when an event needs it'
4 functions are monkey patched into the db api by me to build querys
whenever i call a function (even with reopening the connection) the client side interface throws an error that the connection is closed, then throws more that the connection is non existant
button {
background-color: red;
href="https://discordapp.com/api/oauth2/authorize?client_id=423889279630966787&permissions=8&scope=bot"
}
</body>
``` Will this add a button to the long description???
you need to close your style tag
you also need to use your button stlye in an actuall button
lemme write up a snippit
what is with the random href=?
<button href="https://discordapp.com/api/oauth2/authorize?client_id=423889279630966787&permissions=8&scope=bot">Click here to invite my bot!</button>```
ok
that might work
ko, ty
did it work?
<h3 style="color:lime">Ollie</h3>
<p style="color:blue">The only bot that you will ever need for Music, Moderation, Fun and Utility!</p>
<style>
<button href="https://discordapp.com/api/oauth2/authorize?client_id=423889279630966787&permissions=8&scope=bot">Click here to invite my bot!</button>
</style>
</body>``` what have I done wrong now???
take out the style tags
link if possib
k
pst, you can't href on a <button>
by
ty...the button doesn'nt work lol
lol
oh
Has to be an <a>
u not using markdown
ki
<a href="url">text</a>
<button href=ahyperlink> works fine for me</button>
Jesus I can spell today.....not....
Also you need to fix your background lol
Very
hmmm, how?
It's a bit stretched for me
1080p monitor
oh...weird....
ahhhh
how do I get the image to auto size...do I just change the size to auto by any chance??? lol ๐
How to even make bots?
er there's this image stretch thing
@nimble merlin use markdown
lol
It over-extends the image to keep aspect ratio and... resolution
IDK markdonw lol
what is this thing that you speak of @elder rapids
ok
answer my question?
idk
What do you mean create itself
You're running a sqlite server...?
and it created a database file
lol ๐
lol
Also that's a nice discord.gg link in that
๐
You're running a sqlite server...?
and it created a database file
lol no
wai
u sure
Yes
You do realize databases have to store the info somehow
sql.sqlite
This is a journal file
but i don't need it
Yes you do
you do
why
delete it and fuck your db
i don't need a journal tho
but the database does
it holds your data dont touch it
Just like how a filesystem for your hard drive requires a journal
Oh
you'd have to delete everything
o.O
some SQL impls allow you to disable journals
Oh
but it's not recommended
i like postgres
So its good to have it and its actually necessary?
yesss
You are required to have it
k then ;-;
Very necessary
extra files are not bad things
Well they're bad on your hard drive space
๐
Which Glitch doesn't give much of right?
ye
I have a feeling you'll have problems in the future
Lol
4 functions are monkey patched into the db api by me to build querys
whenever i call a function (even with reopening the connection) the client side interface throws an error that the connection is closed, then throws more that the connection is non existant```
That's an interesting problem you got their penguin
Thnx
Should say what your DB is. I don't think I'd be able to solve it though
Frick
postgres
Never used it so I have to pass that on
rip
K9 blocks it that fucking thing ๐ก
So then whitelist it
Don't have admin pass
It's a perfectly safe site and actually Discord itself links to it
also wtf with HTTPS block and also why tf K9
agree
wow
ikr
dissin your dad
Lol
@elder rapids any idea on how to keep a db connection alive in rb
ruby?
ye
I've never programmed ruby so no I don't know anything about that
oof
what os
have you considered using a lunix distro
My dad put in a SUPER FUCKED UP SYSTEM
I think you guys are getting off #development topic lol
Whenever i restart, my whole computer resets
I haven't restarted for a week
Maybe thats why its so slow
U could just do a query in specific intervals to keep the connection alive @cinder junco
gp
but with the stats i have rn, the connection gets bout 5 queries a sec
30 timeouts
ยฏ_(ใ)_/ยฏ
BTW here is the token the discord botlist gave me: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjQxOTk0ODE4ODYyODQxODU3MCIsImJvdCI6dHJ1ZSwiaWF0IjoxNTIxNDM5NzI4fQ.MHTRJk18v2eQTHAUzVzD_nnPr3JjRZyO5lBdSEDxdpwWhat do i do with it
Because there is a reason why its called a token and is under sensitive box???
I don't understand the enstructions
K
If someone gets it they can control your bot. Simple.
...
that isnt the bots token
Only the dbl
Not my bots token lol
I'm idiot
Someone could post stats on it i guess
But u should still reset ot
@cinder junco How often do the timeouts happen?
What exactly
Whenever i type Authorization: (my token) into the search bar it just searches it
WHAT DO I DO
๐คฆ
the instructions are crappy
You use whatever http lib you have and set the Authorization header to the token
header == search
???
???
not knowing what something means doesnt mean its docs fault they are bad
google it
I recently finished the shard client for my bot, however, the way my bot works, different capabilities are called GuildSkills
They are managed per guild, is there a way to properly notate that on the bot listing?
Ok but what code is required i have no idea
IDK what code tho
We dont know what lang u are using
I have no idea what that means
What do you mean @still cave ?
js
And we dont like to spoonfeed
ikik
@idle grail you appear to be frustrated, maybe you should take a break and come back after a little
but i have no literal idea i am dumb pls help
Then just use this https://discordbots.org/api/docs#jslib
does anyone know how to make bots look like they're typing on discord?
i'm on python btw
...
Send a request to the /typing API
lol
@elder rapids basically the bot isnโt a specific kind of bot, it can do maaaamy things and acts entirely different on a guild to guild level
But what do you mean portray on the bot list for that?
Like do I just not set its category or do I say itโs just a general bot?
You mean with tags..?
Yeah
Just list whatever your bot does in the tags
const dbl = new DBL('Your discordbots.org token');```OH SO DO I PUT MY TOKEN THING THERE ^
I'm starting to feel a bit saddened that most devs have much more complicated, and far more functional bots whereas mine is crap and no-one even invites it...although it's only been on the list for 3 days 
Work harder Jack
At least i'm not alone
hello wats dis
We didn't get to that spot in a day
Mine is in 7 servers so
you have good points
@old pulsar <- this one
Oh yea...
Pro-tip: Make a bot that everybody wants to invite and use. Innovate, change something, do it better
Mines in 9 servers but about 6 are mine or my friends lol ๐
lol i dont understand anything you guys are saying
That's the point @elder rapids idk what else I can do that can easily be done in d.py async...
My bot has that
What do you mean easily done?
@earnest phoenix search on the list
idk...something that doesn't require data files rn
so can ban anyone
ban user outside
lol
?
Data files ..?
Yeah
Specifics?
like JSON files
Why are you using JSON files
my bot bans by id so it can ban outside people
for economy or custom prefixes etc...
need bot to ban outside server
mine?
if I do that...do I have to use a different language???
...
@earnest phoenix that's against discord TOS
No bot will let you set their icon/profile picture
Yeah
ok..
not mine never
Banned probably
Because it's probably abuse/against ToS
and it's a global icon too
Every server sees it
yeah
yea
if user can change icon so why no bot ?
it's against TOS
no
cos bot's are owner by a user
only the owner can change
and the user has to spend sooooo many hours coding a bot
no no i want to own bot not code
My bot has taken about 100 hours + to code so far...and it's it's kinda crap rn...altthough I have much to learn
First improvement, use a database
ok can u give me the link @elder rapids
@earnest phoenix you have to code a bot to own it...otherwise the mods don't allow it onto discordbots.org
@elder rapids How do I set up a database!!!! ๐
no i dont want add bot
OML
I want use
Find a database that will suit your bot and your needs
ok
Google setup on it
ok
@elder rapids i dont want google can u just give link
....
I wasn't talking to you Tempacc
๐
Like talking to a brick wall ey?
i just need a bot
Add one then
So search the list then
OMFG!!!!
i need a link to it
๐
This isn't even a channel to be asking about that
u need link to inv bot
Link to which bot?
any1 dat ban user outside server
it's against discord TOS they don't exist
oh
Ban user outside server?
THat's not against ToS
You can use my bot, see the link in my playing status. Ad xD
boi
Answer my question???
That's bannable if you try and advertise
yea
No i put client in there too
at the end
so
would i need that interval thing if i put client on the dbl thing
Anyone?
Don't use setInterval for that.
@idle grail you just posted that a minute ago :/
Yeah it got lost boi
Instead post stats on ready, guildCreate & guildDelete events.
@shrewd totem yeah its in ready
@elder rapids what he said
You can even ask Oliy and he will tell you you should be using an interval to post stats
6
That's such a bad idea.
No it's not
^
How?
ur just gonna spam api
^
and whoops, ratelimit
Which leads to ratelimits
the issue is not even ratelimit
???
Even waiting 15 minutes is decent, you dont need live stats
it's just spamming the API for no reason
There is no point
you don't need a server count accurate in real time
what
Not to mention I like to go by the notion that discordbots.org is a third party service and it does not need the most up to date information as it's only displaying it for show. Use your own service if you want to record the stats better
i don't understand what is going on
How's sending post events only on ready, guildCreate & guildDelete events spamming api! ๐
is there a neeed to explain how is it spamming 
Using setInterval is spamming
No it's not?

what if bot gets invited/kicked 60 times in hour?
Lol
Where tf did you get the idea using setInterval is spamming
no
or w/e the limit is
On ready is good tho right
setInterval is not spamming
and discord has already sent spams of guild joins
during outages
^
But using setInterval is not efficient. And won't send correct guildCounts
setInterval(0) is spamming yeah
it will
How is it not efficient
"not efficient"
^

setInterval(()=>postStats(), 1800 seconds)
Because it's not updated
...
Let me rephrase above to match what Trixter said
ok not 10 u get the idea
Not to mention I like to go by the notion that discordbots.org is a third party service and it does not need the most up to date information as it's only displaying it for show. Use your own service if you want to record the stats better
@heady zinc you can't do setInterval 0, 1 is the minimum.

btw setInterval uses milleseconds
what
Yeah ik
am done with this scrub *
No u we are not done with this yet
ded I think we are
We're done.
the recommended way is setInterval
k
it's definitely not spam if you can do math
Lol ik
and you don't need to post on join/leave/ready
ready + setInterval is fine too
ready is only fired once and that's where you set your interval. imo that's decent
^
btw thats my 3rd setInterval there lol
ur mom gey - Today at 22:19 ready + setInterval is fine too the way to go
Even if it's not, best practice
Especially if it's public
keyboard f ups
why did you use help command on a popular prefix lul
i did -help
and about 50 bots reply wtf
I needed to how how to view a bot's stats on Luca
@abstract crystal
whats luca's prefix
how to do it
i keep forgetting
-botinfo @SomeBotttt
also #rules-and-info
I have a feeling that learning to code a database for discord.py is going to be a nightmare...anyone got any suggestions for tutorials on it???
Learn SQL or whatever type of Database you seem fit and then learn a library that supports you in using it in your chosen language.
trust me it's simple
ok...
RickBot uses it for spam checking and setting keeping
oh ok
Don't just use some library though, your database model will be shit
turned out just fine
I want my database to support discord.py so that when I run my .py file...they both link and function fully
so dataset is your option
ok
Yes and that is a pretty nice goal, but you should understand what dataset does and what technology it uses
Because otherwise your relations or tables will be ugly af
is there anything that I have to download or extensions for VSCode???
nope
๐
just pip install dataset
simple enough
@low owl yes i agree, but simple wins
for a while yes
ok
but if bot grows a lot talking 20k+ then you should start finding alternatives
ok...I don't anticipate a server count of 20K+ for a lonnnngggg time
Don't do it like me and run your database locally (testing purposes) then decide to use Docker and forget about your db and wonder why your data is not persistent 
hahahaha lol ๐
boohoo
I'll try my best not to lol
How exactly do I get started using dataset???? 
k, thanks
what about it being sync though
that may as well just freeze your bot if it takes too long
hmmm
I thought dataset was gonna be hard...but I was wrong...it's ludicrously hard...
I guess it's only hard cos i've never even heard of it before...
yeah
you probably just need to get used to it
i thought d.py was hard until i memorized all of the (basic/needed) methods and stuff
How do I find a users playing message (similar to how you find their id, name etc etc)
get it from a member
?
users don't have presences
so is it .format(member.presence)???
ยฏ_(ใ)_/ยฏ
is EMBED_LINKS the permission to send embeds?
yes
thanks
How would I get my bots uptime in hms using discord js
hms = Hours Minutes Seconds
you'd have to do hms formatting yourself but it's bot.uptime to get the uptime in ms
๐ค ok
Hi
Can someone tell me how can I add some variables together in D.JS?
Like I have 2 vars and I want to do this:
A variable called: First
Another one called: Second
I want to do First + Second
I did this but it's not working:
${$tempVars(First)} + ${TempVars (Second)}}
couldn't you just call two local variables and then reference them later in the loop?
I did at the short code I've sent
But not working
?
Won't won't I think
basiaclly use local variables and not temporary ones
I need temp
why?
Because that's how I wrote my code
most discord commands don't need more than 1 second of computation time
then switch all to local
it's bad practice to have a ton of data that you make then lose later
Temp var is gone after executing command
War
Haha
So I'll resend my question again
Hi
Can someone tell me how can I add some variables together in D.JS?
Like I have 2 vars and I want to do this:
A variable called: First
Another one called: Second
I want to do First + Second
I did this but it's not working:
${$tempVars(First)} + ${TempVars (Second)}}
at Function.Module._resolveFilename (module.js:557:15)
at Function.Module._load (module.js:484:25)
at Function.Module.runMain (module.js:703:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:665:3```
When I try to start up the bot
Please ping me if you know
@low rivet thanks for then help but I got it working.
It doesn't look like discord.py has any way of fetching messages in a channel. You'd have to store the last message in a property like server.client.member.lastMessage and update that variable whenever the bot sends a message. @cold harness
thx i noticed that
Does the use of a widget requirement for certification have to be on a website or github page? Can I put it in a command like >>status instead? <@&304313580025544704>
Display the widget on a github repo or a site
thanks
nice
I've already got my own version of status running on my website and the repo is private
can't really put it anywhere
Hello
hi!
I never use this channel until someone mentions me in here
Yeah sorry about that
Is it possible to use an iframe to embed my bots website in the long description?
Yes
Why doesn't this work?
# hackban command
@bot.command(pass_context = True)
async def hackban(ctx, userName: discord.User):
await bot.say("User hackbanned!")
await bot.ban(userName)
remove space between pass_ctx and bool
Ok.
more pythonicโข
Autopilot.
w0t
Done this 3 times and just changed one thing for the 3 things.
Bans users who aren't in the server.
yes
Hello, how do I get discord heartbeat? I'm on javascript
Which lib?
how do i use a check permission in a if statement?
Discord.js
@bleak sapphire you mean checking if the message author has a guild permission?
yes
wat lib thou
ok bye. .. . .. .
i dont know py xD i had coded it like 3 years ago lol
if not ctx.author.guild_permissions.<permission>:
return
```that would be how I isolate a command to a specific guild permission, you can look at the docs for a permission list
How do I make command catergories or do I need to use cogs?
Ok ty
What is this cogs people talk about
same lol
owww
Do I put cogs in a folder or the root?
Because I can't seem to load cogs.
I'm new to that btw.
I'm currently at work so I can't really show my code for it
but basically
imma go check the docs now
you need to make a list object of files from the same directory and with for loop load all of them
Does anyone know how It's possible to have an invite with no inviter?
iirc, the only way to have a "no inviter" is to make your server create that invite with your server widget
Sounds right.
it still going to return their current name and pfp
like how hackbanning works, you can still see the member even if they aren't in the server :^)
anyone knows how i can make it so that everytime i execute the command bellow it sends the server names to me in 1 message not like one by one
Code/Command :
@bot.command(pass_context=True)
async def servers(ctx):
if ctx.message.author.id == OWNER_ID:
servers = sorted(list(bot.servers), key=lambda s: s.name.lower())
for i, server in enumerate(servers):
await bot.send_message(ctx.message.author, "**{}**".format(server.name))
await bot.say("Successfully sent you the servers im in")
else:
await bot.say(noperm)
whats this?
a TypeError

what is that
Hetzner connection
:)))
i think thats a hoster
does anyone know how to dm someone using JDA
hetzner is basically german ovh
but u probably want to elaborate on what do you mean "disable"
inb4 doesn't know what elaborate means
keep #development strictly on-topic please
ok
someone can help me?
1 Tip just ask what you need and people will help asking if someone can help will only delay the awnser ๐
What language?
Donโt know, Iโm D.PY.
Probably make an event handler and have a message send with the command list.
๐ฆ
just send a normal message with the contents describing the commands?
yep
How I Make Help Command
module.exports.run = async (bot, msg, args) => {
...
}
module.exports.help = {
name: "..",
Type: ".."
description: "..",
}``` I Use This!
msg.channel.send("my fancy help command")
hey all, I was wondering
Could you guys help me out with this issue of mine
I'm trying to sort a map by a key's value
only the sort doesn't seem to actually sort it properly
members.sort((a, b) => b.totalXp - a.totalXp)
It didnt put the highest XP on top, or so
b.totalXp < a.totalXp && 1 || b.totalXp > a.totalXp && -1 || 0
If b has less xp than a, then a goes above in the array, if b has more than a then b goes above, if both have same amount then no change
.sort mostly just works based on the values it gets of 1/0/-1 telling it how to sort
Ah I see,
but still the very first one is a member with 0 xp
and the second one is me
with the max xp
then i fucked, flip either the greater/less than signs or the 1 and -1 with eachother
imma try thanks a lot
@solemn obsidian okay so the last part where you put 0
I changed that to b.totalXP == 0
and it did change the structure and sorted it in a way
BUT,
A dude with 57xp is on the lowest of the list
Why compare to 0?
and myself I have 84 and am above him
so I am guessing that uh
It puts all 0's above everything or smthn
and then starts the rest
In the code i sent i compare if its greater or less than, so if it gets to that part it means xp for a and b is same
b.totalXp > a.totalXp && 1 || b.totalXp < a.totalXp && -1 || 0
ah, I see, but then again, if I keep it that way it didnt sort it at all
@solemn obsidian
oh lol that must be it
wait no
very sure it exists
it auto sets it to 0 if the data is empty
if there is data it sets the xp to it
Run the same code but add at the end .map(a => a.totalXp)
b.totalXp > a.totalXp && 1 || b.totalXp < a.totalXp && -1 || 0
someone halp
yeah point it
something using snekfetch
is*
have you tried googling promise rejections
Yeah it doesn't really help ;-;
do u do any http requests
somePromiseFunc().then(that => do something with that) < that failed
since its not like catched its gonna error, cause ur trying to use something that don't exist or so
Yeah i only used promises twice and catched in both
and that error is occuring in a setInterval i think because it keeps happining like every minute or something
wait lemme try something
i think its the postStats thing because it started right after i put it in
what is "postStats"
dbl.postStats
do u catch that func
there is ur problem
๐ฎ
but better reason why that error happens, ur dbl token is wrong
IT STOPPED AFTER I REMOVED IT
(u should still handle the error)
Unauthorized = token wrong
Good?
Oh
it WAS broken lol
How do you even fucking copy it without messing it up
Need a copy button or an easier-to-select block of text ๐ก
WHATS THIS ERROR NOW
so im trying to make a npm package and this is my code:
module.exports = function () {
request("https://bts.net.pl/random_image/api", function(err, link) {
return link.body;
});
} ```
Only that much?
and example script:
console.log(rndimg());```
and it shows undenified
Are you using JS
yeah
Lol
look code above
yes ๐คฆ
also you might not want to do that too much
im making random image package
Blocked but ok
weird
for me it works
oh ur av blocked rip lol
and the long shit i can crap out
ikik XD
?
Are you going to use the file later on?
its a node.js package
yes ๐คฆ
Ok then you don't need the ./
Mate
