#development
1 messages · Page 1531 of 1
I am using discord.js module in discord bot And One Day When I Woke Up I Got NaN Error In Users Section In My V12 Bot
The code I use is this
it have all the code in index.js u may split it to multiple files like commands.js prefix.js main.js i think
5 seconds
bot.guilds.cache
.reduce((a, b) => a + b.memberCount, 0)
.toLocaleString(),true)
is it working fine locally?
Anyguy who knows about python?
help pls
There are many people that know python here
just ask your question; it's a waste of time asking
what error u got send a scr of err
Hey how can i know that why the error is coming in py file if a particular module is installed
it is giving error like that particular module isnt installed
see i am encountering this
@glad violet Error (NaN)
do u code with js or python
consol does not show error Says NaN when using command
Different environment/module name
meaning?
Show which module you are trying to import and what you are installing and how
ok sure
i wanna learn more about js if u can learn me dm me
How did you install it?
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:
- proper syntax
- debuging code
- basic features (vars, arrays, objects, functions)
- read and understand docs
- nodejs module system
As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.
Here are good resources to learn both Javascript and NodeJS:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/
Please take a couple of weeks/months to get acquainted with the language before trying to make bots!
How are you running the file?
using play button
idk how pip interprets it, but im pretty sure you need to use the same name
in vc studio
lemme try that
No Erwin
does it not need to be same name?
dblpy is a good example for cases when the package name is different from the module
me uploading 1.734 files
still same error
pip install dblpy
import dbl
thats retarded, ty whoever made that
Does it show what command it's running?
yeah its just that path written in "
which command is it
/usr/bin/python3.9 "path/main.py"
how to get an emoji from the message content?
i tried this
const emoji = bot.emojis.cache.get(args[0])
it doesn't seem to work
@slender thistle
Hm
it is also giving yellow line
What does pip3 -V show?
py 3.8
Is there any way I can save a function to database?
How fun
uuh
save it as string and eval it /s
anyway via terminal?
Hm guys can ya help me!
I suggest googling "edit environment variable linux"
ah ok thx
process.on("unhandledRejection", (reason, promise) => {
try {
console.error("Unhandled Rejection at: ", promise, "reason: ", reason.stack || reason);
} catch {
console.error(reason);
}
});
require('events').EventEmitter.defaultMaxListeners = 25
This line is having so much problem
I deleted it yesterday but than I was getting max listeners set to 11 than I resest this code because it was sending 404 error in every server when someone try to play song
Now I was try to solve this but I was not able to anything.
When my pc restarts ill try to help u
Here my pc is dead 
hoe do i make it send a message when someone votes
ok are u able to vc?
thats not how to fix those issues
thats trying to ignore the issue, not fix it
there's no one source code for it but you should write it yourself, you learn more and come out knowing what to do if it breaks
okay
you're only checking for undefined, not for null
so if its null, it will say null, and not 0
I am not good at English and I can't speak because my english becomes werid when I speak.
Yes I know after the problem came again
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>```
node version:
v14.15.1
npm version:
6.14.8
Why is this happening?
whats the line before that?
npm WARN tar EPERM: operation not permitted, open 'C:\Users\user\Desktop\starbol-js\node_modules.staging\punycode-effb31f5\LICENSE-MIT.txt'
npm WARN tar EPERM: operation not permitted, open 'C:\Users\user\Desktop\starbol-js\node_modules.staging\performance-now-aaa0899e\license.txt'
npm WARN tar EPERM: operation not permitted, open 'C:\Users\user\Desktop\starbol-js\node_modules.staging\discord.js-b971e32d\webpack\discord.js.LICENSE.txt'
npm WARN tar EPERM: operation not permitted, open 'C:\Users\user\Desktop\starbol-js\node_modules.staging\jsdom-ce9e3eea\LICENSE.txt'
Hi I got a problem
let emoji = bot.emojis.cache.get(e => e.id === args[0]);
const check = {
true: 'True',
false: 'False'
};
const embed = new Discord.MessageEmbed()
.setTitle(`Information about ${emoji.name}`)
.setThumbnail(emoji.url)
.addField(`Information`, [
`Animated: ${check[emoji.animated]}`,
`Added by: ${emoji.client}`,
`Added at: ${emoji.createdAt().format('LL')} ${emoji.createdTimestamp().format('LT')}`,
])
.setFooter(`Emoji ID: ${emoji.id}`)
.setTimestamp()
message.channel.send(embed)```
I only have problems with the first line
Where it has to get the emoji
I basically want to do something like this
close all programs that are accessing that folder, like cmd, vsc, any other code editor, etc
delete the node_modules folder
and try again
The check function is incorrect
same error
what does that mean?
Try Changing to const check = (inp) => {return inp == true ? "True" : "False"}
Ohh should I change null to 0?
use the NOT operator, that will handle both null and undefined
bro nonono check is correct
Instead of id try with name
it's all about this line
let emoji = bot.emojis.cache.get(e => e.id === args[0]);
don't think this is the solution
So what should I replace it with?
use find not get
@quartz kindle
@earnest phoenix
TypeError: Cannot read property 'name' of undefined
that means no emoji was found where the id matches your input
there is such emoji
@grizzled raven should I replace it with if(!coins)?
Instead

yes
Hi so I have a problem, my bot is taking up to a minute and a half to ready, and I don't fetch members on start or anything like that, so I don't know why this is happening, or how to stop it. Is there anything that may be causing it?
shut down the bot
shards
I don't use shards
then uh
My bot is at 238 servers
half a minute
I said in my message that I didn't
mhm
It used to take around 5 seconds
maybe some of the servers are unavailable, or the shard is waiting for a guild packet to come but it never arrives
@grizzled raven did the same :/
that's my only other guess
Ah
If you are awaiting some kind of external API or database, check that you're making the request correctly, because eventually the connection will time out which will allow the bot to start up
no
if (!coins) coins = "0"
On startup, I connect to a mongodb database, which works and connects fine
Isn’t it 3 ===? @grizzled raven
Ok 1
1 = changes it to "0"
I guess you just need to start console.loging and use Dates to work out how long each stage of your bot starting up takes - I used that method to find out my issue which was an incorrectly written web request that only allowed the bot to continue once it timed out
@grizzled raven should I change all of them to if (!coins) coins = "0"?
Like and without number like !coin1 !coin1, !coin?
I make web requests on ready, the only thing I do before it is connecting to mongo, but that works as the bot relies on the database to work
On that note, how do you have events in the mongodb wrapper for nodejs
sure
@earnest phoenix did you try what you were told yesterday
About removing the " " around the 0
Just logged the db, and it connects with 2 seconds, so it isn't the problem
At least that's narrowed it down slightly I guess lol
@zenith terrace still null...
Im out of luck for now
There is nothing else that can interfere, because I don't load or request anything else before ready I don't think.
does steam have oauth2?
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community
how can I fix this?
npm v: 6.14.8
node v: v12.19.0
In that case you probably need to putting logs in more places to try and work out if something is running when it shouldn't be - sounds like a very strange issue so it will need a lot of investigating
@golden condor console log on debug event
ok
It didn’t work
what is null
what is "this"
@green kestrel hey, if you got a minute for me later, I would appreciate it - struggeling with an UDP socket and the encoded string I'm sending, if u know how to work with sockets ofc
i know a lot about sockets, but very little about node.js
i'll help if i can @boreal iron
alright, great
gonna send u something
I'm not able to deal with C# but I mean it's not harsh to understand
CheckKey() is building an UDP socket, sending a string to the socket
public function getBattlEyeID( $steam_id )
{
if( strlen( $steam_id ) != 17 ) return null;
$tmp = "";
for( $i = 0; $i < 8; $i++ )
{
$tmp .= chr( $steam_id & 0xFF );
$steam_id >>= 8;
}
return md5( "BE" . $tmp );
}
//---
$socket = fsockopen( "udp://" . gethostbyname( "arma2oa1.battleye.com" ), 2324, $errno, $errstr );
$steam_id = "xxx";
$be_guid = $Call->getBattlEyeID( $steam_id );
$send = "";
for( $i = 0; $i < mb_strlen( $be_guid, "ASCII" ); $i++ ) $send .= ord( $be_guid[$i] );
fwrite( $socket, $send );
while( $socket )
{
var_dump( $data = fread( $socket, 8192 ) );
var_dump( $stream = stream_get_meta_data( $socket ) );
if( $stream['timed_out'] ) break;
else
{
if( strlen( $data ) > 0 ) print_r( $data );
}
}```
I'm encoding the var $steam_id like in the C# example above
how are you getting steam_id?
sending it to the socket, but the result is empty, always
I wonder if listening to the socket is the right way...
byte[] send_buffer = Encoding.ASCII.GetBytes(CreateRequestString(key));
sock.SendTo(send_buffer, endPoint);
Cannot find module '@discordjs/form-data'
how can I install this module?
ofc can't send the buffer as array, I wonder if that's the issue
update npm and try again?
how are you getting steam_id?
steam_id is just hidden here
would it be a literal steam ID?
ah
just have a general issue with the socket, not the encoding
hey guys
if(!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send("``You sadly don't have permissions to do that!``");
let rMember = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]);
if(!rMember) return message.channel.send(xdemb);
let role = args.join(" ").slice(22);
if(!role) return message.channel.send("``Please specify a role to add!``");
let gRole = message.guild.roles.find(role => role.name === `${role}`);
if(!gRole) return message.channel.send("``Couldn't find that role in your guild. Please double check!``");
if(rMember.roles.has(gRole.id)) return message.channel.send("``This user already has the selected role.``");
await(rMember.addRole(gRole.id));
await message.channel.send(`***``I just gave ${rMember.user.username} the ${gRole.name} role!``***`)
message.delete();
}```this sadly returns me:
who could help?
And why do you require Administrator Permissions for something that requires maximum Manage Roles Perms
Just give it a Role that exists.
Too easy
Now with my problem
How to show a Role's Permissions?
Like I noticed simply doing role.permissions doesn't work
Well it says unknown role
it literally logs the same id as the role
role.permissions.toArray() will return an array with all permission names, role.permissions is a bitfield
try putting cache here
how to get the permission integer?
role.permissions.bitfield
oh ok thanks
i need some help~ this wont upload the image i have in my file (near index.js) i get no errors even tho i have the catchjs const { MessageAttachment } = require('discord.js'); const botOwnerID = 300695488414351362 exports.run = async (client, message, play, args) => { if (message.author.id == botOwnerID) return; const attachment = new MessageAttachment('./ihs.png').catch(console.error); message.channel.send(`${message.author},`, attachment).catch(console.error); message.delete({timeout:10}); }
if (message.author.id == botOwnerID) return;
You are owner or the bot @onyx hare ?
ya
300695488414351362
300695488414351362
Yes you are
You are saying to the bot
If the id of the author is this
Stop
try !==
!=
ok
._.xd
still refused to send the attachment #
What is the err
nothing
The bot should say something...
Did you save the changes?
ya
And restarted the bot?
yup
Try making the ID a string
First of all, you are returning when the owner does the command
Second of all its ===
no misly it’s actually not
@green kestrel did u figured it out? or can't help me atm?
= is wrong
Third of all the id should be a string
they want to compare their ID from the API (string) to an int
== is the correct way
in many cases, no
ive tried with if(message.author.id !== config.ownerID) but i get "config is not defined"
maybe because config isn’t defined
oops there's no result
it works on my eval and i dont have it defined there
It must be defined
== compares === also takes the type with into account
Variables don’t just spin into existence out of thin air
In JavaScript, you cannot treat Discord IDs as integers
explain globals!!!
so you should always do a === comparison
they are still defined
yes, under the global object
i have no clue everything goes wrong when i try and assign a owner only
const config = require("./config.json");
Error: Cannot find module './config.json'
or doesnt exist
Again its not in the directory
it sits happily with my index.js the imag and a failed radio
image*
should i move a copy to my commands folder?
Good lord
Please, don't use json to store your configs in a public repl
fuck me
When and where?
after i moved a copy of the config to my commands it worked -.-
how can i add lines around the table? @drowsy epoch
oh
Can anyone explain me what does this resource leakage means?
why did you want to mess with the event emiter?
"resource leakage" means that your bot would use more and more resources until it runs out of them.
They’ve probably got the standard discord.js newbie bot with 77 message events for some reason
I am not messing with it I just wanted to know that what does that mean
ok
bcs usually people look it up bcs they get errors bcs they got to many event listeners
Ohh
Yes
@client.command(name='play', help='This command plays songs')
async def play(ctx):
global queue
server = ctx.message.guild
voice_channel = server.voice_client
async with ctx.typing():
player = await YTDLSource.from_url(queue[0], loop=client.loop)
voice_channel.play(player, after=lambda e: print('Player error: %s' % e) if e else None)
await ctx.send('**Now playing:** {}'.format(player.title))
del(queue[0])
The bot just typed
and didnt play any music
with the url
Can discord bots use the reply feature?
@boreal iron not sure whats up with it
aw.. damn, struggeling with it
yes
how
How i can make function to string
yourfunction.toString() litterally
ok
real footage of mod getting demodded for sexual contact with minors 

what the absolute
Lmao
oml
but yes I made that joke because of that

kekw
/images/nsfw/thighs

a link I hope
isn't that patched already
t
i think that was real
what
yes
:?
I'm using distube and youtube dl for my bots music module
Uhuh?
But time and again, I run into the 429 error
youre banned
Too many requests
Can you explain please?
Yes I see that.
Okay
But how do I find a solution
None of that actually works with youtube dl
nope
I researched on the issues
its not built in
On github
lavaplayer has it built in
Oh
Not sure how to do that😅
its an api around lavaplayer

(bot) ---http--- (lavalink) ---sockets--- (discord)
well
probably ?
read the github page, wiki ect
there should be lavalink clients for most languages
my client is for kotlin and is opensource
well ye theres one for that aswell
its listed in the readme somewhere
anyway
I wish you a lot of luck because getting a /64 block working is a pain
Oh
:/
well theres no real other way to work around it sadly
So /64 block should be working on the server where the bot is hosted?
Because I don't know much about the server side
I just write code and upload
well where your lavalink is hosted
its a seperate application
you can choose where you host that
Oh
I can afford just one host as of now
Still gonna find a way
Isn't youtube dl gonna work at all?
Like no chances?
well it works until banned
then youll have to wait for unban
normally about a day - week
In public bots, you can't really wait
Exactly, can't wait that long
What does Groovy do for that?
Does that also use lavalink?
Thanks for your time.
its not easy to start a public music bot :/
in the beginning youtube didnt ban bots
Well true
Most other commands work just fine
Its music which is a bugger
Can we get requests passed from other services
Which don't ban bots?
Maybe soundcloud, spotify
spotify doesnt have music playback options
one at a time if you reverse engineer their private api yes
Oh
soundcloud, twitch and and attachments could still work
@client.command()
@commands.has_permissions(adminstrator=True)
async def gstart(ctx, mins : int, * , price: str):
embed = discord.Embed(title = "Giveaway!", description = f"{prize}", color = ctx.author.color
end = datetime.datetime.utcnow() + datetime.timedelta(seconds = mins*60)
embed.add_field(name = "Ends at:", value = f"{end} UTC")
embed.set_footer(text = "Ends {mins} minutes from now!")
my_msg = await ctx.send(embed=embed)
await my_msg.add_reaction(":tada:")
await asyncio.sleep(mins)
new_msg = await ctx.channel.fetch_message(my_msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(client.user))
winner = random.choice(users)
await ctx.send(f"Congradulations! {winner.mention} won {prize}!")```
Trying to make a giveaway command
The whole thing is error
With over 44 errors
anyone know why
probably because it's incorrect but that's just a wild guess
yeah but i dont understand
why its incorrect
did you copypaste
did you got a linter?
maybe the linter can tell you where the error is
i importted everything
it shouldnt happen
C:\Users\users\Desktop\MoBot>C:/Users/users/AppData/Local/Programs/Python/Python38/python.exe c:/Users/users/Desktop/MoBot/bot.py
File "c:/Users/users/Desktop/MoBot/bot.py", line 249
end = datetime.datetime.utcnow() + datetime.timedelta(seconds = mins*60)
^
SyntaxError: invalid syntax```
i dont know py but did you have to declare a variable like in js?
in js you have to tell that you declare a new variable like const myVar = "string"
i know
Nan since yesterday. what is the problem?
then its maybe out of scope
idk
Is it datetime.datetime.timedelta ?
Is that users?
Yes @golden condor
What is your code for working out users
client.guilds.cache.reduce
Ah you need to check if one of your guild's memberCount is undefined, as sometimes it can be with djs, I had this issue myself the other day, it's when a guild is unavailable iirc
how can I do that?
For example
What is your exact code rn inside the reduce function
Send the whole line
@golden condor client.guilds.cache.reduce((a, b) => a + b.memberCount, 0).toLocaleString()
A ok
So
Change that to be
a + (b.memberCount || 0)
That should fix it
That code just checks if the server's memberCount is unavailable or not and replaces with an actual number
Okayy tnx let me try
This is how mine looks
client.guilds.cache.reduce((a, b) => a + (b.memberCount || 0).toLocaleString() @golden condor ?
uhh no
client.guilds.cache.reduce((a, b) => a + (b.memberCount || 0),0).toLocaleString()
oh okay
Should work
For tsconfig, what target should I select so that the complid code will work for node-v12?
1.12?
node
node 1.12?
I'm so dumb sorry, I meant node-v12
ah
You should use es2019 as a target but use the commonjs module
Hope that helps :)
worked, thank you very much @golden condor
:)
hello, I'm a bit confused on how permissions=0 works. I just kicked and re-added my bot to my test server with permissions=0 but almost everything still works
so are all the permissions like 'send messages', 'embed urls', etc. useless?
here's the perms I'm asking for by default:
perms.add_reactions = True
perms.attach_files = True
perms.embed_links = True
perms.manage_emojis = True
perms.send_messages = True
perms.manage_messages = True
Manage emojis and manage messages aren't strictly required
@wooden tapir If I'm not mistaken permissions=0 just uses whatever perms the @everyone role has
probably the @everyone role gives it said permissions
^
hello im trying to develop a bot for my server and im so lost
What are you lost about?
so does anyone know what actual permissions are allowed when the reviewers test the bot?
i made one and it was declined i have some clarifucation on the long description thats to secret agent
Default everyone perms when you create a server i think
i was told is was private is there a way of finding a bot that is declined to fix this
I'm confused on what your question is.
Why do you need to find your declined bot?
Are you trying to find who declined your bot?
to edit it so it can be approved
We delete your bot application when its declined
You have to submit it from scratch
great thank you how do i know if its public pls
If the bots public?
yes for the testing thing
Theres a little switch on the discord dev portal for enabling it to be public
yes i got the dm unfortunately i was asleep so is there a way i can make it public beforehand
dev portal ? thats where we make the bot correct ?
yep
thanks, so it's safe to assume the bot can post an image and react to it? that's kinda the whole functionality
yep, bots should have image perms, and react.
it should still be checked, since many servers it might not have those perms.
nope, only the perms you need.
thank you also where do i put its command things
i dont think you understand how bots work.
commands are written by you, and run on a server by you. you dont upload them to discord.
yeah I suppose I can check and default to text mode if I don't have the permissions for images
i dont know how they work thats why im here :/
do you know a programming language?
no
well, bots need to be programmed with a programming language.
im a gamer i just want a bot to say when streamers are live and was told this was the. best place to set it up im more than lost i got no idea at all
looks like you want to use a bot, not make a bot.
^
the twitch feature recently became premium tho 
FR????
https://top.gg/
^ you can find bots which do what you want here already made! you just invite them to your server
sorry init that im not as smart as you guys ill see myself out i came here for help not to be laughed at
Bruh mee6 is becoming a literal pay to use
yeah
Fuck that
hope EA isn't behind all this shit
probably is
this is a dev channel, for people making bots. I think your goal was misunderstood and thats why you got sent to this channel.
case 'setbal':
case 'setbalance':
var moneytoadd = parseInt(args[2])
if(message.member.id == "723081690792067143") {
if(!message.mentions.members.first()){
message.author.send("You need to tag the member you want to set balance to, example: e!setbalance @Broken Tooth 100")
return;
}
if(!args[2]){
message.author.send("You need to say what you want to set the balance too: e!setbalance @Broken Tooth 100")
return;
}
message.delete();
var money = await db.set(`money_${oppmem}`,moneytoadd)
message.author.send(`**I setted ${message.mentions.users.first().username} balance to: ${moneytoadd}$**`)
}
break;
how can i do that i could do it with a mention / user id??
I mean that explains why they don't go broke from #bids every week
Lol!
😭😭😭

i think i can just ask this here so
i wanna change from windows to linux, should i use ubuntu or mint?
im trying to make a bot dont worry ill work it out myself where im not laughed at for asking for very basic help
I'd go with Ubuntu
Well before you make a bot you need to learn a programming language first
i'm more on the mint side since it's supposed to have a more windows-like interface
ubuntu is a great first linux distro.
what does ubuntu have?
This feels like I wanna make a bot but got no idea moment
Learn the programming language first, at least the basics first
It's like driving on the highway if you don't have a license
is there an npm package that does stream notifications for you, otherwise this seems like a very hard bot idea for a first project.
- Be friendly and respectful to everyone just an fyi im in tears i came for help not to be treated like a dumb ass
???? I gave you advice
one person said "lol" and it wasnt even at you.
also fyi my friend was helping with the programming
stop getting offended by advice
no one seems to be making fun of you.
Oh my god I'm going to go cry now
😭
But no it was advice idk why you're getting mad at that
Which was learn the basics of the programming language first or else it will be very difficult
Why tf is there 2 people more like kids uh crying wtf am I in Roblox?
what programming language would you recommend? normally I'd suggest python but I feel like the async/await stuff in discord.py would be confusing for a beginner
most languages have async await
i found the async stuff pretty confusing when i tried making a bot with py
at least coming from a javascript async/await background
discord.py is really easy once you learn to read the docs properly
🤔
dpy is pretty similar to js yea
maybe i was too lazy to dig further 
at least in my exerience
it is, but if you do a python crash course it probably won't cover any of that stuff where with JS it kinda has to since everything worth doing is async

yeah i did a py crash course and they didn't even mention async
i wonder why 🤔
cause it hasn't been part of the language that long
OH
o
I guess you don't use async too much with the usual python projects
okay 
makes sense
I'd say got for either python or js when making your first bot. Otherwise I found Java to be pretty fun as well
Or Julia if you wanna feel really special
IMO I'd prefer py over js for making a bot
I found it to be much easier when I tried both
discord bot in HTML when

It depends on what you're used to, I guess
as someone who already knows a bunch of programming languages I'm pretty happy with discord.py, just curious what people would recommend if someone is learning from scratch
How would you make a bot with html? xd
Magic
<script />
by torturing yourself
Just go for cpp :)
Ah yes
a magnetized needle and a steady hand
Just open notepad and start typing binary code
who needs async/await and threading when you have memory management
o man, are we making those old ram blocks with the little magnetic rings 
a magnetized needle is not enough, you need a pedal that sends electric signals when you press it
how about stones and sticks
I was referring to this https://xkcd.com/378/
yes
why when I type this command in cmd py -3 -m pip install discord.py[voice] it says Successfully installed discord.py 1.6.0 and when I do a pip show discord.py it gives me 1.5.1 version ?
Try
python -m pip install -U discord.py[voice]
okay it worked thank you !!
🥳
but doesn't work for my linux computer.... only on my windows computer
which one
dropbot.mystik.xyz
dropbotdiscord.xyz```
or other (dropbot.xyz is taken)
second
i want to buy a domain for my bot, dropbot. but dropbot.xyz is taken
having 'discord' in your domain name might get you in trouble in the future
.top is also cheap

top.top
top.top.top
gg.top
lmao
top.gg.top
everything backwards gg.top
BIG SAD https://i.imgur.com/zFUJsjl.png
rip
gg.pot
that seems pretty cheap for a 3 letter domain
is it possible to get the USER who added a bot? or would i need to do some URI shenanigans ?
uri shenanigans.
frick
how bout audit log
yea

whats the website again
link it
ah
Hi, which country are you from? I will make my bot online according to him because when it comes time to check it, I go to bed and the bot goes offline
you cant
there are more than 20 bot reviewers, you cant know which reviewer will review it and when
@quartz kindle https://i.imgur.com/yfouCnK.png
And if your bot can't be online all the time, it shouldn't be on public bot lists where people expect bots to be online.
its premium
whats the difference in premium
either reserved or costs 20k
what is the time span
24/7
woo.lol is $110 
1 week i think?
And yes it's a week or more (the queue has gone up in the last month or so)
imagine
now its a good time to sell my btc
aaahhhhh
thanks I applied 5 times because of this issue and it was rejected because it is not online
well top.gg is meant for public-ready bots
if your bot is not ready for public usage, you should not add it yet
being ready for public usage includes being online most of the time
ye
damm
all 3 letter names are
wait really?
yes
how much?
wow
$10 every year after
a non-premium 3 letter
ikr
amazing find
Online for my home country from morning till night but I can't keep the time because of the time difference
I am having a music bot
There is an command -afk
It means bot can stay in vc for 24/7
But I wanted to make it for some specific permission
So I am confused which permission is required for using -afk command
Not admin power something else
do you want it to be a staff command or no @wanton knoll
its easy to remember at least.
Staff command
dam ur premium again https://i.imgur.com/ZZ8LHwg.png
maybe one of the voice channel permissions
move members?
just become a chef tim
anyway brb getting food
Is it ok with verification?
Top.gg verification
let the tld tell you your profession

👀
Wat
timtaxi
oml oml another good one
pog
moving members may be im not sure 
omg
lmao nice
my own image host here we come
owo
should be
ok
easy to remember
case 'setbal':
case 'setbalance':
var moneytoadd = parseInt(args[2])
if(message.member.id == "723081690792067143") {
if(!message.mentions.members.first()){
message.author.send("You need to tag the member you want to set balance to, example: e!setbalance @Broken Tooth 100")
return;
}
if(!args[2]){
message.author.send("You need to say what you want to set the balance too: e!setbalance @Broken Tooth 100")
return;
}
message.delete();
var money = await db.set(`money_${oppmem}`,moneytoadd)
message.author.send(`**I setted ${message.mentions.users.first().username} balance to: ${moneytoadd}$**`)
}
break;
how can i do that i could do it with a mention / user id??
wtf is that 
it's a punycode domain
lmao
so, whats the laziest way to do an image host 🤔
pyrocdn
find one that exists? lol
with my own domain ;p
okay thanks flaze 😄
you can use sharex too
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0])
I dunno I wrote my own in Clojure and then in JavaScript and it's like... 100 lines of code with express or koa
¯_(ツ)_/¯
cant sharex, will get bonked by cms 😦
$78.76 for sex :3
deal
That can be cheap or expensive depending on what you're getting 
ah yeah this seems super easy flaze
owo
indeed 
if they leave the server, and i use their id, it will still work?
open for offers
get the bot to get all users across all the guilds it is in?
its cache them in quick.db tho
eww quick.db
ik ik
hey now everyone starts somewhere 
ok ima be on youtube now
A better start is enmap, or nedb.
did you got an woring url for the pyrcdn dns setup? i just get redirected to /200
quick.db is like the very opposite of "Quick"
nope for me the entire page is borked
make sure you set the a record to pyrocdn otherwise it won't work
if i press manage sub domain here i get a 404
if i press view guide here i get a 200
you have to go to the subdomain itself
anyone know of any good temporary free hosts to use while I sort out a VPS?
with a custom domain?
yes
even tho the domain is managed elsewhere?
https://i.imgur.com/sLJ6S7y.png is i go to the settings it cant get it bcs the domain is managed by cloudflare
i could fix it if i knew the ip to point the adress to
ping it
worked for me
i believe you could also just put pyrocdn.com
but I used the ip
if i use pyrocdn it works
atleast the subdomain
found a way
created a subdomain from pyrocdn pinged this one then used the ip to set the dns record
i just ping pyrocdn.com and used the ip from the response
and <subdomain name> <ip> for the a record
and then visit the subdomain.domain.tld
so, you have to use a subdomain?
yeah
kinda pognt, but i.woo.pics is good enough
I think it's just how it works
yea
what did you have to set for sharex for uploading stuff? i know they have some sort of api but i cant find any docs
did you see the key though
APi key?
yeah
yes
just sitting here, waiting for the dns records to update 😦
under upload path
yeah, will take some time for the subdomains dns record to propagate.
took me less than a minute
mines already mostly propagated, guessing i just need to flush dns
manage works
but it's useless
lulw
on DJS, i forgot how to put the bot's profile pic on the footer?
if you use the embed constructor you can use embed.setFooter(text, image)
ah, my pihole cached the dns too 
i have a pihole running and no issues with the caching
my pihole is set to cache stuff pretty hard
ok
still not 100% sure if the way i integrated the lancache into the pihole works entirely
sharex has a way to have multiple binds for separate providers right?
you can set as many custom uploaders as you want
but idk how it handles if you set mutiple for the same thing
like you tell sharex if it is a image, text ,file uploader
i might just manually click for the custom one, and leave imgur as the bind.
prevent accidentally using mine for stuff i shouldnt.
o
it works

^
there aren't really any good ones per se
so yeah, you can set a bind to a specific uploader rather than using the one selected in the menu
PERSONAL RECORD
google cloud
dont upload node modules
why are you uploading node_modules though
and if 1.7k is recursive in the folder then that's small.
two questions
can i make this look less stupidjs for (let i = 0; i < canvas.width; i += 32) { for (let j = 0; j < canvas.height; j += 32) { for (let index1 = 0; index1 < 16; index1++) { for (let index2 = 0; index2 < 16; index2++) { if (patt[index1][index2].height != 0) { ctx.fillStyle = "gray"; ctx.fillRect(i, j, 32, 32); } else { ctx.fillStyle = "white"; ctx.fillRect(i, j, 32, 32); } } } } }and can i make it change colour (at the if statements it doesnt change the fillstyle colour, it stays on gray even if the value is 0)
im alreadyh arranging to get some stuff set up on AWS
so i dont need a vps
i just need something to work for a little
until everythings good
from what i can see, your patt variable only checks for the value of the height property, and this value doesnt seem at all dependant on the indexes of the canvas
so all your pixels will have the same color
oh btw it went to index (16^3)*2
i dont understand what that code is supposed to do
yikes
yeah i know
O(n^4)
its just loops inside loops that have no relationship to each other, so it ends up doing a shit ton of duplicated operations on the same pixels
you could use at most 2 loops to iterate through each pixel
okay what its supposed to do is get the thing at the index of the array and then colour the rect accordingly
nested?
get what thing from what array and color what according to what?
2000^4
colour the rect based on the height property
youre missing a relationship here
color what rect based on the height property of what?
and in what basis?
panik
like
what exactly do you want to do
in terms of graphics
you have two images, right?
patt is a 2d array that has objects in it as its second d, and if a value from the object isnt 0 then set the fillstyle to foo and fill the rect in
how can i add an item to a div, with html/js without replacing the dib
like adding another item
nah its just a blank canvas
with innerhtml without like replacing it
ok set a fill style, but then use this fill style to do what?
fill what rect, where
with what size
filling the rect at i, j with a size of 32x32 px
but what is the relationship between i and j with the 2d array?
they're a grid





