#development
1 messages ยท Page 5 of 1
i .find() how exactly that has the object?
bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find());
array.find(condition) gets the first item in the array that satisfies the condition
Boolean or x => x are basically shortcuts for item => if item exists, return true, else return false
for example array.find(Boolean) or array.find(item => item) will return the first item in the array that is not null/undefined/""/0/nan
OHH
so if i have like 99 nulls and a defined object in the middle of the array
it returns that
yes
any boolean condition
.find(false).
item => item is a boolean condition
.. or like .find(Boolean) like that.
no, Boolean is a built in function
ahh okay
for example Boolean("a") === true
ah wait, tf
so if you do array.find(Boolean) its the same as array.find(item => Boolean(item))
ohhh
so right now, with shards, to get a server, i have to do this
let guild = bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x));
yes that should be fine
bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x)).members;
``` returned undefined
is it because i should add await?
yes
oh, damn, so
(await bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x))).members;
you need to await either the broadcastEval itself, or await the .then(), or put .members inside the .then
fair, but i want to treat the code above as if im like doing message.guild.members, if you got what i mean
for example ```js
const guild = await bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x)));
guild.members
or
const ev = await bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267"));
ev.find(x => x).members
or
bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x)).members);
you will likely face a bigger issue tho
broadcastEval does not support complex data like GuildMember objects or Guild objects
the data you receive will be converted to plain simple object
example? what do you mean
i understood the compelx data part
but plain simple object like what
like its just an object: { name: "xyz", description: "zzz", etc }, it does not have any functions like .setName()
and not sure if it does include members at all
oh, so it will return an object with no merthods
console.log it and see for yourself
yes
anything that is not serializable will be stripped from it
what am i console logging exactly?
2nd option returned an array
what exaclty do you want to do with those members?
oh, no .cache?
oh, woooot
.members is supposed to return the GuildMemberManager class
but it returned an array instead ๐คท
exactly
depends what exactly you want to do with those members
for now, ill not be able to treat it like im treating a normal bot without shards due to it not supporting complex data
well, lets take an example, i want to map every member's names
then do it inside the broadcastEval and return only the names
using this code:
bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x).members);
oh, what?
i need to call themethod again?
const memberNames = await bot.shard.broadcastEval(client => {
const guild = client.guilds.cache.get("737011108954505267");
if(guild) {
return guild.members.cache.map(member => member.displayName);
}
}).then(x => x.find(x => x));
yes
oh, so that's the only solution, correct?
because transferring data between shards is like transferring data between apis, it needs to be serialized into something like a json string and sent as raw bytes
i believe we don't need await?
hmm, i mean fair
so if you need to access any complex data you have to do it while still inside the shard, and then only return the final data once you know what you need
you need await if you want to use memberNames
else memberNames is just a Promise
now i understood for the sharding part, many thanks, not switching to promises question
why? we have .then()?
broadcastEval returns a Promise
we can handle with await or .then(), we chose .then()
awaiting a Promise lets you return its value as normal
using .then() on a promise lets you access its value inside the .then() and return a new Promise
basically .then() allows you to access and change what the promise will return
ohh ok
but it always returns another Promise
alrighty, fair
but this is so long compared to bots with no shards
yes, thats how it is
unfortunate
working with shards requires you to change your mind set
true
and see how your cache is split between different processes
challenging and worth it
like if you had part of your cache in one website, and part in another website
and you need to make api requests to each other to access it
now, question, you're in my place, isnt it better to have .member return the GuildMemberManager object, somehow?
not possible to transfer that data
however it is possible to construct a new GuildMemberManager
oh, how about so:
const ok = await bot.shard.broadcastEval(client => {
const guild = client.guilds.cache.get("737011108954505267");
if (guild) return guild.members;
}).then(x => x.find(x => x));
ok is the new class
that's a great idea, no?
ok will still be a generic object
then I can continue like ok.cache.map(x => x.displayName);
what?
ok is just the name of the variable
broadcastEval will always return a generic object regardless of what's to the left
guild.members will be serialized and deconstructed into an array of plain member objects
if you want to reconstruct the class, you can try something like const members = new Discord.GuildMemberManager(guild, arrayOfMemberObjects)
but that is not recommended
because you will be interfering with the discord.js cache system, and probably end up with duplicated caches across shards
meaning also objects with no methods?
yes
well thats amazing, looks like illl need to stick with plan a now
now, at least i figured out what ill be doing for now
the recommended way is to use all the classes you need inside the broadcastEval and only return when you have something simple
also reduces the payload size
alright, thats sounds good, now that i got lost a bit; when should i use this or the other?
bot.shard.broadcastEval(client => client.guilds.cache.get("737011108954505267")).then(x => x.find(x => x).members);
const x = bot.shard.broadcastEval(client => {
const guild = client.guilds.cache.get("737011108954505267");
if(guild) {
return guild.members.cache.map(member => member.displayName);
}
}).then(x => x.find(x => x));
you should always use the second one
๐ ๐ ๐
and always try to reduce the data you are transfering as much as possible
by meaning... ?
instead of sending the entire cow send just the beef
like if you only need names and ids, return an object with only those
dont return everything
return guild.members.cache.map(member => ({ name: member.displayName, id: member.id }));
now this helps in what, particularly? less memorage usage?
this
less stuff to transfer across shards, which does reduce cpu usage
๐
thanks, as well!
np
Hey, Tim. Isn't he getting values from one shard to another? Can't he just like do what he needs to do in the method itself as it is?
Like supposedly, he wants to use .send(), what would he do?
oh, yeah, what do i do when it comes to like sending messages or something ๐ good question
anyone got some cool effects for a website?
ask sayuri
(s)he's a few centuries ahead of us in terms of animations and stuff
anyone knows why using the property outline with border-radius makes a square in CSS?
i want to make a circle with an outline
I believe you've got to use the box shadow?
does somebody know how I could make anything outside the square transparent?
bet
<!DOCTYPE html>
<html lang="en-us" class="sr">
<style>
body { background-color: #000000; }
header { font-size: 15px; color: #ffffff; }
</style>
<title>
Anonymous Hater
</title>
<meta name="description" content="Work in Progress Web for Anonymous Hater Discord Bot."/>
<a href="http://hater.only-fans.club/terms">
Terms of Service
</a>
<br>
<a href="http://hater.only-fans.club/terms">
Privacy Policy
</a>
<center>
<header style="font-size: 50px;margin-top: 250px;">
Anonymous Hater
</header>
</center>
<center>
<header>
WEBSITE IS WORK-IN-PROGRESS!
</header>
</center>
</html>
``` not that good at css, but how do I make the terms of service and privacy policy text align at the top left of the screen?
top right*
how do I get a font again?
lmfao I just stole dyno's CSS I hope that's okay since it's literally publicly available
Just because something is publicly available doesnโt mean itโs not their intellectual property
Probably not the greatest idea to steal somebody elseโs work and pass it off as your own :p
change class names and it's all good
just modify it to remove all traces and ur good to go, and maybe learn something from the css/html
Okay How do I check if a value is actually null
I'm using
const a = something
if(a){}
But if the value is 0 it'll also return false
And I don't want that
Edit: Now I'm using
if(low === false || low === null || low === undefined){
}
Still looking for a better solution
if only nullable then only check whether if it's null or not
if (nullable === null) {...}
what do you use to render that image
alone in dev
if (!low && low !=0){} ig
The classic case of โwe need 4 falsy valuesโ
BUT THEN
confirmed
canvas
copium
use clip method ig
Hiii
already doing that
context.drawImage(loadImage, 0, 0, ctxWidth, ctxHeight);
context.beginPath();
if(ctxHeight > ctxWidth) {
context.rect((ctxWidth / ctxHeight), 40, ctxWidth, ctxWidth);
} else {
context.rect(( ctxWidth - ctxHeight ) / 2, 0, ctxHeight, ctxHeight);
}
context.closePath();
context.stroke();
context.clip();```
still returns this
you need to set a clip mask
THEN you draw the image
you lack <Canvas2DContext>.[moveTo, lineTo]
what is a clip mask?
use clip method before drawing the image
oh
discord guide says clip after drawn
d-d-discord guide?
dude that shit is hilarious
kekw
no readability
I could volunteer rewriting the whole shit page once I have an understanding of it
you should look at canvas documentation instead of some random discord guide
AWS moment
and test with codepen
Perhaps because itโs not discord-specific so itโs not really their job/expertiseโฆ
based font
no
I have to clip before drawing
like @ Glitter said
๐ ๐
didnt ask
didn't ask either

i don't have to be asked in order to respond to a statement that was previously replied to mine
not gonna read
anywho how do i render a canvas as if it's a webassembly app
time to get ip grabbed
it's legit I promise 
-Great
just kidding xd
how do I remove the transparent parts / scale the image to be scale the image height and width?
using canvas and djs
shush ๐ญ
who asked
jk
set the canvas to be that size
like, instead of making a canvas the size of the image simply use a smaller canvas to begin with
you will need to do some math to keep it in the same perspective
at this point just use a native photo editor app on your operating system 
you should test mine as well ngl
how do I add cloudflare to my website tho?
never acc done my own website before I always used glitch and a custom domain
uhh change ns
you simply add your website in cloudfare
yeah that
is this good stats for a bot that has been released for 7 days without any actual ads other than top.gg listing?
and will it automatically work with secure http?
๐ญ
you will decide on cloudflare
yeah that's pretty good
tf is this question
if you want https chose flexible ssl

just say the issue
with express and https

wifi shit over here
aight my bad, just had to change createCanvas() number arguments
๐
pepsi
so at the end, no description of the issue
pspspsps ๐โโฌ
the issue is the campfire is too hot
@earnest phoenix 
so im tryna use https using express with cloudflare cert
I see the website already worked
but why does ur bot require administrator
not so trustworthy
it doesn't actually
I added it to a dummy server
but it literally just doesnt work
when i start the bot
the website also loads normally
but i cant connect using https
IT DOESN'T I WAS JUST TOO LAZY TO PICK OUT INDIVIDUAL PERMISSIONS
lmao
well then why should I not be lazy to invite it?
that tbh makes a huge difference to the ppl if uve seen whats been going on with bots and nukes etc
whats your setup?
Actually taking a suggestion? ๐ฎ
maybe either side is lacking https compability
for me any bot that even mentions admin perm is a huge red flag, so red that it goes into infrared wavelength


I'll change it
so i tried doing
const server = https.createServer({ key, cert }, app);
I was assuming that this is scientifically inaccurate but the further โredโ you go you technically get closer to infrared so youโre right
i dont exactly remember cus i aint got the file
my bot is so swag it literally requires -1 permission bitfield value
you want to use cloudflare's certificate as a file in your own webserver?
as im on a completely new fresh laptop i bouht
yea
wait no
nvm
then wut
that was a diff thing i tried

hang on im tryna remember what i did
i tried a lot of shit
but nothing worked
literally just enabling https with express.js is what im tryna do
you have a website that is connected to cloudflare via dns, right?
while I'm editing the html do you guys have any tips to make the website better?
and dns
then you need to use cloudflare flexible ssl
images would be good
and use normal http express
actually use a framework ffs
and description
i tried that as well
also dont be so bold
laziness either encourage people to come up with creative solutions to autonomy or kill their mentals
most of them ended up in 2nd situation
alr bettt
well it should have worked
bro???
const express = require("express");
const app = express();
app.enable("trust proxy");
app.set("etag", false);
app.use(express.static(__dirname + "/website"));
app.listen(80, () => console.log('App on port 80'));```
what im doing rn
@ancient nova design concept first, coding second
both
nah this ain't some quantum superposition shit
and it works when you do to http://yourserveripaddress right?
@ancient nova you gotta know the design (outline) to figure out the layout and order
check your cloudflare settings again
try writing down on paper first
make sure flexible ssl is enabled
Takes time for cf cache to clear
how long usually?
what i thought
i tried this same thing
b4 i left for holidays
let it sit for a few days
and nothing worked
check your server logs
it's not erroring on cloudflare, it's erroring on the server
check if you have any kind of firewall enabled on cloudflare
nothing
I tried this and I can't position where I want the canvas to be centered, e.g.
.createCanvas(500, 500);
will just pick a square at the top left corner of my canvas
how do I make the text not curl and just be in a straight line?
negative coordinates is valid
remember the formula?
x + (maxWidth - width) / 2
ye
x would be negative
hey guys, how do i create a vote tracker for a server (not a bot)
webhooks
use a datastore ig
anyone know?
so how do i point / on my express to the index.html file
../ to go up one folder
do I need to say?
not idea how to fix this lmao I'm not good with CSS
also your entire site is empty
what am I supposed to add there
...
I only added it because I had to have a tos and a privacy policy
raw html + css + js is enough
yeah?
just use relative units
Said 15 million bots
that's true, it is (by my opinion) the best
it's a simple site
If youโre not good at CSS use bootstrap, itโs just a CSS library that makes your life easier
pissin me off xd
what do you mean?
be humble
okay I'll look into it
it's a very bold statement to call something "the best"
make it all in one line
it only makes u look even more generic
Every bot says the same thing
โBest at this, best at thatโ
Starting to feel like an apple product without any quality
since when was apple a quality product
I did an oopsie let me fix
remove is-half property
createCanvas says negative numbers are not valid, also the arguments are for scaling not for position :/
They have a little bit of quality at least
yeah ik
use negatives for the rect
oh that
I like it
I was refreshing -_-
yk u dont need to send it everytime right? refreshing the page will load the modifications
also u can press F12 and test live changes on element inspector
yeah I know that
it's better at least
this triggers me
I hope
http://lumadev.xyz opinions?
Invite Luma Bot to your server today!
sorry ๐ญ
why are u using background props if u dont have a background image?
really good
I'm not that good at CSS I just wanted it to center out the text
what does that have to do with background props?
I've got no idea, but it worked so
Work in Progress Web for Anonymous Hater Discord Bot.
Istg it actually looks kinda ok now
Mobile looksโฆ not good but Iโm assuming youโre not dealing with viewport scaling atm
๐
give it to me straight

if the canvas is already created using createCanvas, I can only work with that tiny frame ( which is not centered ) so I can't center the square frame
Very small and empty
lmfao...
does topgg even have a voting method for servers?
sigh
I could make the text larger if it detects mobile
look, canvas is technically infinite, what u see is the viewport
@winged temple how exactly do you display bot statistics?
oh
express.js
you can move stuff to negative coordinates which will go to top/left
let file = fs.readFileSync("./src/website/html/home.html", { encoding: "utf8" });
file = file.replace("$$guilds$$", guilds);
file = file.replace("$$users$$", users);
file = file.replace("$$uptime$$", duration);
already using express, how do you pass them onto your website? you technically would have to run them both on one server
and then for your text, use $$guilds$$ for your guilds counter
or whatever your prefix is
huh okay
You know from what Iโve gathered from bot development, Iโm never going to release an unfinished product again
inside of your
app.get("/", async(req, res) => {
}
But my god I need discord to hurry up with the modal updates so I can achieve that
doesn't look too bad if you scale it back a little
im trying to connect my repl to a custom domain name from Namecheap, does anyone know what th DNS host name needs to be?
repl dosen't tell that
Why does the topgg docs only talk about uploaded bots, and not servers?
so for example:
app.get("/", async(req, res) => {
const users = client.guilds.cache.reduce((a, g) => a + g.memberCount, 0);
const guilds = client.guilds.cache.size;
const duration = moment.duration(client.uptime).format(" D [days], H [hrs], m [mins], s [secs]");
let file = fs.readFileSync("./src/website/html/home.html", { encoding: "utf8" });
file = file.replace("$$guilds$$", guilds);
file = file.replace("$$users$$", users);
file = file.replace("$$uptime$$", duration);
res.send(file);
})
@ancient nova
^^
the host is the url
for the repl website
what do you use to connect to you website with?
without the custom domain
yeah I would have to log onto my bot to achieve that, but my bot and my website run on separate servers
namecheap
IP:PORT
no
ur tryna connect a custom domain to a website url
but you dont know what the url is?
not only that but ur using cname
lets say my custom domain is example.com
alr
whats the link ur tryna connect it to
https://___.ishaantek.repl.co
is the ____ for bluring purposes?
yeah
alright
what i recommend doing
is hooking it up to cloudflare
so sign up to cloudflare
change ur nameservers on namecheap
to cloudflares' ones
should look something like customname.ns.cloudflare.com
then after, go to your dns settings
hmm do i need to use cloudflare tho? it was working fine few months ago
on cloudflare, not namecheap
but forgot what to make the host
just recommended, overall easier to work around as namecheaps web panel is shitty and slow af
and then do something like this
true
ok lemme try
ty
@ancient nova dyno
ohh the host is @?
copy pasted lol
@earnest phoenix https://www.desmos.com/calculator/l4fuwaakdm
so u can understand how canvas coordinates work
vx, xy, vh and vw are viewport (red square) controls (x, y, height and width)
ox, oy, oh and ow are object controls (the black square)
I just literally tried moving my canvas by position after giving them 1 : 1 scale via createCanvas like u said and I literally can't move any more than I have scaled meaning that anything beyond that will either have no effect or you will cut your current canvas off if u move the canvas off the view
tldr u cant work with more than set via createCanvas because either nothing will happen or the spot will just become transparent
how do I freaking format this
inject that html
yeah I know the invis chars disappear
@quartz kindle http://hater.only-fans.club/ rate my website
Work in Progress Web for Anonymous Hater Discord Bot.

it's poop
why are the images still stacked like cargo containers?
can't get the ul li tags to work property
so I can't have something like
list:
-item 1
-item 2
different dimensions too
wrap them in a div and give it a margin-left
stfu
what would u do?
also just noticed, u forgot to fix this
why would I need this if I can't work with any more canvas than I have set via createCanvas
bitfields are useless to common users/mods
ah I'll still keep it there cause why not 
rect(-50, -50, 100, 100) will create a rectangle 50px off to the left and right
<div style="margin-left: 20px">
โโโโโโโโ- Moderation
โโโโโโโโ- Utility
โโโโโโโโ- Games
โโโโโโโโ- Image Manipulation
โโโโโโโโ- Customization
โโโโโโโโ- Logging
</div>
learn css pls
the very same u want to do with the image
just put negative y coordinate
it'll crop the image to show only what's visible to the viewport
like the black square in my example (only what's inside red square will be visible)
if I do that I will have transparent stuff visible taking up space
I want to get rid of that
This is without your <br>s
use flex or add them urself
no you don't
canvas doesn't render what's outside the boundaries
I think ur misunderstanding what I mean
what are you trying to do?
crop I believe
make the canvas the desired size
(marked by the red square)
then move the image to negative y
you'll have a cropped image
aight that looks good enough for now
4 sets actually
if they only want to return a cropped image I think simply moving the image up will suffice
just to answer this: because it's kinda a lazy job to print the bitfields instead of a formatted string
String.format("#%6x", color) for #RRGGBB
no user will look at those values and say "ah, that color"
thanks 
TypeError: String.format is not a function
I wasn't meant to use the String global var?
String.format is not a thing in js
I mean, u didn't think I would give u something to simply copypaste right?
oh didn't notice cause the snippet looks like JS slightly
๐ thanks
I think I can use .replace for this?
nope, u need to search how to format a string in js
dude if I do
canvas = Canvas.createCanvas(ctxWidth, ctxWidth);
and
context.rect((ctxWidth / ctxHeight), 0, ctxWidth, ctxWidth);
on an image that has a bigger width than height, I literally always get the same crop
full image
I get this crop
I literally can't move it to the right no matter what I fucking do
...you can
on drawImage
simply input negative coordinates and it'll move to the opposite direction
oh on drawimage
TIL js has no printf counterpart
You can use any of the 6699 libraries that include this feature
If you're tim you would rather code it yourself
like
if (!String.prototype.format) {
String.prototype.format = function() {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
});
};
}
(I have no idea what this thing I copied does)
it lets you do "abc".format(...)
damn didn't know that you can do it globally
but that's for blabla {0} bla
printf allows actual value formatting, not only replacements
like Color is #%6X will print Color is #00000F (for input 255)
yea c has types I understand
I'm actually surprised js doesn't
It was made to make html be able to think
I'm thinking about changing the bots name to Ratelimited, does that sound ok?
can't u use a normal name?
not make a memory efficient operating system
I meant the formatted replacements
not gonna like it took me over 10h today to figure out how canvas work
also I suck at maths
It was made to work with strings and html
replace() did the work fine
Then a new species appeared who started to use that weird language for other things
JS never needed a typed format
@lyric mountain ur good with web development, how would you do something like this with express.js?
list of servers the bot is in
You'd just loop through the guilds attached to the client assuming you're using something like djs
And display the appropriate data
iterate over servers and return html elements
do it inside the loop
but return with creating invites
now now, that's a danger zone
You'd have to make sure the bot has permission to do this though
theres literally a join button for each server
If you just willy nilly created invites without the owner of the servers knowing you'd face issues
ive gone thru over 200 pages now
second because that might cause privacy concern
If you're going to do something like this make it an opt in feature
but ion see dyno doin that
I believe dyno has opt-in
I'm sure not ever server wants their invite out there
like, it comes disabled and u have to enable
so ratelimited is a bad name?
Some just want a private server for themselves or friends
free advertisement :kewk:
Not for those who don't want their servers public
not all advertisement is good advertisement
what if it were a owner command / page only
You'd have huge privacy violation issues
cus thats allowed i believe
make it so server owners have to opt-in
alr
that solves one of the issues
At least that way you aren't held reliable
the other issue is that topgg doesn't allow list bots
idk how it gets away with that
but there was a ton of bots denied because they were listing bots/servers
maybe ask a bot reviewer
publicly, its allowed privately (bot owner only) (100% sure)
Yea I'd suggest doing that
Just ask a bot reviewer like Google said
They have more knowledge on this than us
...why are u going to make an invite dashboard that only u can see?
smells like backdoor
๐
its fun to see servers using my bot xd
Yea that definitely breaks some rules on discord
i really dont need invite shit
Seeing them is fine but having invites isn't
only displaying servers using it
that's fine then
I've already been reprimanded for experimenting with creating invites for servers
It's not fun
i connected my bot token to botghost to list the servers bot is in temporaily until i actually implement that into the website myself
tiny issue, im not good with web-development
Welcome to the club
inb4 "someone hacked my own account on my site"
ig imma have to pull up my credit card and commission someone to do it for me
How good of a site do you want ;)
my paypal got locked, so i have to use my "backup" paypal
@wheat mesa guess what bro
which has like 5 bux on it
it doesn't even pay a liter of gas
hmm, did u do shady things?
They'd have to of
no
Paypal literally doesn't do anything for anything else
any chargeback history?
its literally all bc of identification
Doubt
i dont have a drivers license, passport expired, id card- never had
I have none of that either and I can use PayPal just fine
my current bots name is Anonymous Hater, does that sound fine? I was thinking of changing it to just "Hater"
so u registered a cc without verification?
i used to be able to
until i added my paypal account to tebex (way to sell products ect)
what
back when i made the acc, that wasnt needed
I have my social security card now les go
nice
Finally getting a job
and my credit card (that works online) is linked to my locked paypal acc
so i cant unlink it and link it to my new acc
I had to give PayPal my SSN number to send money and accept it
After that it was fine
nice
we aint even got ssn here in norway
can yall please tell me
I need to fucking decide ๐ฉ
This server is full of programmers. They are notorious for not being able to name things
Take waffle for example
His bot is literally wafflebot
Mines ligma
mine can be guessed

nah u cheated, u looked at the bio
meh
no shit
my bots are named after minecraft mobs lol
๐
dirtblock
passive* mobs
spider
sheep is correct :)
Hey don't talk about your mother like that
that's one of them anyway
:((
i have 6 public bots
sheep, form fox, ticket golem, alex, ocelot, and enderbot
but...why
only 2 are on top.gg bc i didn't feel like doing the rest
they all have different uses
such as?
they all sound minecraft related
Homie never heard of multipurpose
fr
Multi-purpose, the scariest term on all of Discord
my bot luma has verification, economy, anti-raid, giveaways, tickets, music, moderation, ect
actually i have thanks, my first bot was multi purpose and i decided that trying to maintain that big of a bot is more of a pain than trying to maintain smaller, more specialized ones
it still exists tho and at some point it'll also get released
"we grab ur ip AND sell it to indian ppl"
Yes it's very scary

I'd rather manage a multipurpose bot than 8 small bots
how tf without nitro?
pls dont tell me u sat for hours
but anyway
sheep: role colors
form fox: forms/applications
ticket golem: support tickets
alex: heavy lifter for hub-style servers
ocelot: self roles & react roles
enderbot: starboard
tbh the minecraft thing started as a joke and then just kinda stuck
changing ur name
sheer fuckin luck
No
like mine which is 1 number off 1337
does it always change? or only if someone else has the username and tag?
something something if the original was taken, then you either keep or it gets rerolled
u can force ur tag to reroll if u find someone with the same tag as u
yea ik
Luckily no one had the same tag as me ig

me personally i added every 'max' with a good discrim and asked them if i could have it
bruh xdd
That url in your about me is sus
but how do they "give" you the tag?
domain expires in 2 weeks ๐
they change their username to something else and i buy nitro and take it
also
i didnt actually do that though i just stole it
You don't even have an ssl cert on it
why tf r u counting down to christmas????
Imagine
everyone loves christmas
redirect ๐
gosh.
xdtekoh
lets see how many valid snap accounts i have atm
around 500
ok
not bad
are u hoarding snap accounts or something
i used to do like generators / botting ect
so discord tokens, insta followers, twitch followers, ect
Why
funny innit
No wonder your PayPal got terminated
is there a way for canvas to fade? like from left to right slowly becoming transparent, or some cool effects for canvas
when trolling friends on twitch
like i have 500 followers on spotify
can be genned easily
Cool
search on how to make gradients on canvas
okk
with djs (default cache settings) will all roles for guilds be cached?
I'm pretty sure yeah, they are for me and i use default cache
yeah i know theyre cached but im not sure if all of them get cached so u dont need to fetch them
they should all be cached
how come
Cause your worries may become a reality
At some point you'll run into the issue of it not being cached
So use .fetch on the appropriate manager and it will fetch from cache first and if it's not their it will fetch from the API and cache it (unless told otherwise)
cuz i dont wanna spam api request when multiple users are running commands every second 
Fetching for something that might not exist will error out your code and possibly cause it to crash
You obviously don't know how .fetch works or read what I said

the issue i was getting anyway was related to finding a role by name
i said i dont use .fetch so
.fetch looks through the cache first, if it can't find it in cache it goes to the API and then caches it
So the next time you use fetch guess what it'll be in cache and won't fetch from the api
Assuming you're fetching the same resource

yeah i always use fetch when i have an id
It is highly advised at this point in djs development to never get from cache anymore unless you're sure it exists
what about when searching for something by name
Let me look at the docs real quick I'm certain there's more ways than just passing an id
I guess there isn't
That makes sense though as it'd end up fetching the API which only accepts snowflakes
Another option is to not pass fetch anything so it fetches all roles in cache and populates the missing from the api
And then take those roles and find the role you want
thats what i was doing and it wasnt finding the role
If it doesn't exist in cache tho you'd need to fetch it either way
Show code
It's a guessing game without code
Use === btw
== would just confirm the type iirc (someone who's more knowledgeable about this please confirm)
== allows type conversion
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness is a good read :D
== doesn't check the actual values is all I know
it does
No it doesn't
but e,g "1" would be equal to 1
const attachment = new MessageAttachment(canvas.toBuffer('image/png'), 'profile-image.png');```
how would I attach this image into an embed without having to upload the canvas somewhere to retrieve an url
```js
image: {
url: ...
},
I don't want to attach the image outside of the embed as an attachment itself
It's not a good habit
For something like this you don't want the name to be compared to something like a bool or number
And still match true
A bool is a bad example here cause strings are truthy by default but my point stands
As for why it's not getting the role back I'm not exactly saying that you not stringy checking is the problem but it could be a cause. Another reason is the role with that name doesn't exist
I barely ever use === because typescript momento
There's not a whole lot of need in ts as typescript is strict like that
You can use the setImage() method of the embed to use the attached image instead of showing it outside the embed, pass attachment://<attached image file name>
But js is a diff story
Are you certain the role exists?
I doubt fetching is the issue
If it is than djs needs to fix it cause it's purpose is to fetch and cache from the API
i thought fetching only works with id 
i fetched all roles and then looked through the roles returned by that for the role called muted
ah
It does work based on id
hello, i'm having an issue when i'm trying to launch my bot. I got the error below. I'm using typescript with nodejs and ts-node. my node-fetch version is 3.2.9 so I don't know why I have this error
But passing it nothing makes it fetch everything
You're using require on an esm module
Not allowed
i'm not
so how am i supposed to fix this issue?
You can try using dynamic imports to require whatever module is esm based
You'll have to do something weird though
the reason why i hate typescript
As dynamic imports also compile down into require due to ts fucking up
why everyone told me it was a good idea 
Well despite it's flaws ts offers more than enough benefits
I need to find the thing Tim told me about I don't remember it
node-fetch has older versions that support require if you really need.
Not sure if any security issues exist though
I tried that:
const attachment = new MessageAttachment(canvas.toBuffer('image/png'), 'saucePreview.png');
image: {
url: `attachment://saucePreview.png`
},
doesn't really do anything unless I am doing smthing wrong
isn't there a way to compile ts in es module?
I think there are some issues involved
imageUrl ? imageUrl : ... 
You can swap to esm yourself
But I've had issues with it so I can't assist you on that
okay
I'm using the function with the embed inside for multiple cases so I am just passing arguments
ty
@carmine magnet try using node-fetch 2.6.7 it works for me
Have you even attached the actual attachment to the message?
Show more of the code
hm ok ty
oh,
hi how fix code
const burbur = "me"
if (burbur == "qt") {
console.log("omg qt");
} else {
console.log("stinky");
}
it output stinky
Because you're stinky, very evil!
L