#development
1 messages ยท Page 1884 of 1
wrong channel
Not really
if your doing a full scan expect a few hours.
client.on('messageReactionAdd', async (reaction, user) => {
if (reaction.emoji.name === "๐" && user.id !== client.user.id && !configl.userids.includes(user.id)) {
console.log(answer)
console.log(user)
if(configl.userids.includes(user.id)){
return message.channel.send("**Sorry but you have already answered this question!!**")
}
const filter = m => m.author.id != client.user.id;
const collector = message.channel.createMessageCollector(filter);
collector.on("collect", async m => {
if(m.content == answer){
reaction.users.remove(user)
user.send("โ
**This answer was right!**")
configl.userids.push(user.id)
}
collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});```Why is this code performing twice once i reacted?
it keeps on adding up amounts
ur probably not removing the collector afterwards
I am definitely not!
How would i do that?
if you're only listening to one answer, dont use a collector
there are multiple users that can answer
so that's why i tried ending the collector for the messages.
However, i need to close tthe reaction event too?
you're not ending it
huh?
collector.on("end") means "when it ends, do something"
nothing in there is telling it to end
collector.end()
would't that close the collector to each and every person that reacted?
yes
yeah that's not really something i want
then what do you want?
also, your issue is that your bot is sending "X answered the question right!" multiple times, but the code you showed does not have that text
well, the only thing you can do now is disable everything and re-enable things one by one until you find the issue
I did though.. ๐ฆ
in msconfig, do selective startup and disable services and startup items
According to the chat support with Microsoft Support..
I will.. let me see what this guy says.
they dont know anything
i mean, sure formatting will likely help
but everything can be fixed without it if you have enough patience
if you dont have patience tho, just format
This is why I don't want to format.
I know.. I am willing to do the selective startup.. let me end the conv with this guy, first. ๐คทโโ๏ธ
๐
how do i use await inside an eval command?
i can't do eval((async() => { code })()) because that will show Promise { <pending> } instead of the code
why can I only access my FTP through Windows Browser?
This is what I use```js
let result;
try { result = eval(code); }
catch (err) { result = err; }
if (result?.then) {
try { result = await result; }
catch (err) { result = err; }
}
ty
next problem: how do i render object outputs as a string without JSON.stringify throwing circular errors
hmm https://npm.im/jsonc this good?
u mean to convert the result into a string?
I cant fucking login
inspect it, u can control how deep you want to look into a nested object. And it returns a string
util.inspect all the way
I wrote my own parser based on JSON.stringify and it supported circular references and it sucked
why cant you login?
IT DOESNT LEt me login yet dude
You can still restart from the lock screen
I understand that. If it's saying your pin isn't available and you only restarted once, try restarting again to see if it keeps happening
problem 3
my bot isn't updating the user's xp
code:
guild = await Models.Guild.findOne({ id: message.guild.id });
const memberData = guild.members.get(message.author.id);
console.log("before", memberData);
memberData.xp += Math.floor(Math.random() * 5);
if (memberData.xp >= memberData.xpNeeded) {
console.log("xp biggers");
memberData.level++;
memberData.xpNeeded += Math.floor(memberData.xpNeeded * 1.10);
}
console.log("after", memberData);
guild.members.set(message.author.id, memberData);
await guild.save();
log:
before {
xp: 0,
level: 1,
xpNeeded: 20,
_id: new ObjectId("614b48dd1acff6a9c5e41458"),
punishments: []
}
after {
xp: 0,
level: 1,
xpNeeded: 20,
_id: new ObjectId("614b48dd1acff6a9c5e41458"),
punishments: []
}
why does tab character become 8 spaces
@quartz kindle senpai help pls
Discord sucks
Your tab settings may also have a part to do with it. I keep my tab sizes set to 2
my logs say something completely different smh
maybe because i forgor to clear terminal
you shouldn't have to clear the terminal
the clear character is also funky with scrolling
might want to log data before and after transforming
it's fine since they're not absurdly large. You might want to assign data.xp = data.xp + amount
if += isn't working
do you have a "signin options" option?
then what do you have?
then how do you have pin?
there should be a way to reset your pc
It told me I can setup a pin, but it doesn't allow me
show pic
I need a way to enable all microsoft services via cmd prompt
you can open command prompt?
Yes
can you open msconfig?
you can start the pc in safe mode with command prompt if you can't open it from the login screen
you should be able to open msconfig from the command prompt
No.. it didnt allow me
whats the output of bcdedit
It returned something
imma use a clone object instead of memberData
could be a problem with mongoose setters
something what?
dont use mongoose, problem solved
:^)
What value am I supposed to share
It returns the windows boot manager
pic
Discord JS
found the problem, i think
im using the copy of the document guild before it was saved
so im always gonna get xp: 0
this channel now belongs to tim
Restarting
Didnt work
Yet needs pin
@quartz kindle
I need a way to enable all services at once
I cannot understand WHY it's not saving the document
guild.save(err => console.error(err)) gives null
try this in cmd net user Administrator /active:yes
wtf is he doing?
Didnt work @quartz kindle
what does "didnt work" mean?
Still asks for the pin
You should have done a "clean restart" removing all non-Windows services etc. but not your private data
.. even though I can't access it or change it
its supposed to enable the built in admin account, you have to restart to get the option
btw, does ctrl-alt-del work in the login screen?
can you open task manager?
does ctrl-alt-del work?
No
try renaming your user account folder
that should make windows ask you to create a new user
in cmd: move C:/users/youruserfolder C:/users/youruserfolderbackup
which might also fix the slowness problem btw
The system cannot find the path specified
How can I check all the folders inside users?
Since it has a name
dir
How, again?
dir C:/users
or
cd users
dir```
The system cannot find the path specified
whats your current path?
X:\windows\system32
can you do C:
isnt that where windows is installed?
No
oh..
why not?
I installed it on the SSD
the ssd isnt C:?
what is it then
which one is the ssd now
it isn't able to read the ssd
I have the ssd set as C but now c is the hdd meaning it cannot access ssd anymore
I want ppl to just download files from a certain folder. is Simple HTTP Server enough? or should I go with Apache?
so the ssd is E:?
should be enough
how should we know?
no, you're just changing the folder name
windows will not find it, and should ask you to create a new account
then from the new account you can access msconfig
restart
What now. ๐ญ
try this then
ren E:\windows\system32\config\SYSTEM SYSTEM.BAK
copy E:\Windows\System32\config\RegBack\SYSTEM E:\windows\system32\config
``` if E is still the ssd
What does this do..
load a backup version of the SYSTEM file
then?
restart
@quartz kindle , do I paste it all, together?
two separate lines
Ah Ok
first one renames the original SYSTEM to SYSTEM.BAK for backup
second one copies the older version from the RegBack folder
Second one didn't work.
anyone uses quick.db here?
i want some help
or does anyone know sqlite3 here?
wht even is this error?
what does didnt work mean?
It says the system cannot find the file specified
for the 2nd line
Did you mean SYSTEM.BAK for the second line?
no
Didn't work then
@quartz kindle what's the difference between python2 and python3 http servers?
do dir D:/windows/system32/regback
no idea
fuckin hell this gif is a semi flashbang
Parameter format not correct - regback
@quartz kindle
ren E:\windows\system32\config\SYSTEM SYSTEM.BAK
copy E:\Windows\System32\config\RegBack\SYSTEM E:\windows\system32\config
For this
The ren worked
.. but the copy didnt
i know, you said already
i told you do run dir to see what are the contents of the regback folder
dir E:\windows\system32\regback
None
http servers are always a service
can you open regedit?
I can
y don't u simply use apache or something else?
if it's a static file u can serve it directly
click HKEY_LOCAL_MACHINE, then go to file > load hive
File?
why?
I dont know
yea, was asking that
what happens
๐๐ป
apache always run as a service
Load hives is a disabled option
did you select HKEY_LOCAL_MACHINE first?
Can you use argon dashboard MIT license for commercial use?, but on their web page it is labeled as demo
Yeah?
Then?
now see if you can go to HKEY_LOCAL_MACHINE\A\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device
No Passwordless folder?
hmm
then go back to HKEY_LOCAL_MACHINE
and load hive again
and this time open SYSTEM
I delete A?
doesnt matter
Then
then go to HKEY_LOCAL_MACHINE\B\ControlSet001\Services
Then?
now, all services have on the right side a Start value
I'm trying to have a bot create a support ticket if the ID of the button is support. However, whenever I click the Support button it says, "Interaction failed."
Code:
client.on('interactionCreate', async interaction => {
if (interaction.isButton()) {
const filter = i => i.customId === 'support';
const collector = interaction.channel.createMessageComponentCollector({ filter, time: 5000 });
collector.on('collect', async i => {
if (i.customId === 'support') {
await i.update({ content: 'A button was clicked!', components: [] });
}
});
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
}
});
These services need to be set to Manual startup (Start = 3):
lmhosts (TCP/IP NetBIOS Helper)
Netman (Network Connections)
VaultSvc (Credential Manager)
Wecsvc (Windows Event Collector)
WbioSrvc (Windows Biometric Serviced)
wlidsvc (Microsoft Account Sign-in Assistant)And these services need to be set to Automatic startup (Start = 2):
Dhcp (DHCP Client)
EventLog (Windows Event Log)
EventSystem (COM+ Event System)
LanmanServer (Server)
LanmanWorkstation (Workstation)
NlaSvc (Network Location Awareness)
nsi (Network Store Interface Service)
SamSs (Security Accounts Manager)
@simple stump I told u yesterday
Then I can login?
maybe
u need to acknowledge the interaction
I configure them manually?
Btw
I configure the default file right?
and set the value data according to its category value
the Start file
OH ok
@quartz kindle , done.
Each value has been modified to its value in the category.
YEs.
and restart
Where do I unload hive?
blue screen?
Yes
Yes. ๐ญ
How the hell did that happen, or what have you guys been doing
lmao
I disabled all microsoft windows services in the end.. ;/
he disabled all services, and locked himself out because his windows hello pin thing is enabled
so we tried disabling windows hello or re-enabling the services
and nothing worked
never use windows hello
he cant
its very hard to help when i cant see whats going on
I was afk for an hour and Tim destroyed his PC

With js Date.now(), how do we know the utc time?
can you enter the recovery mode if you turn off your pc 3 times when its still loading?
if not, you will need to download windows and put it on a usb
That is the UTC time
I'll try.. :/
@quartz kindle You should have suggested him this: #development message
yeah thats basically what he did
Still didn't work.
but i think forgot to hide windows services
Oh sowy i meant the utc time offset
didnt work in safe boot
you have to describe exactly what happened
otherwise i have no idea what any of that means
i tried running with safe boot then blue screen happened again
Or does Date.now() always gives UTCยฑ0:00?
I did.
did you rename your user folder back to the original name?
I did too
can you try the startup repair thing?
It does
Still failed
Unix time is a system for describing a point in time. It is the number of seconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.
can you run system restore?
I can.
So does that mean, Date.now() will give same number for both of us at same time?
Yes
That is just the risky part.. ๐ญ
Well not the exact number but yeah
It's going back in time.
how much back?
MOTHER A WEEK
mother a week?
A week
Wait
Backup all your files and reinstall Windows ez
only installed programs and updates
What description?
description?
9/9
thats just the reason why the restore point was created
it was created automatically when a windows update ran
What are the results of doing this?
any programs, windows updates, configs and settings done after that date will be reset
files are not affected
Files are not affected? So if I edited the file for like 3 hours yesterday and I want to restore back to a month
do I lose all the work I did?
Now what do I press?
next?
I press on the 9/9?
huh
Do I do this
You may get the error โYou must enable system protection on this driveโ when performing system restore in Windows 10/8/7. This page tells why it emerges and how to fix the error via CMD. Better way to protect Windows is provided as well.
in cmd?
Are you using Windows 10 (Pro)?
I am.
@quartz kindle
I did what the website says..
This happened
Not bad
But the status
Started
in my experience, system restore often fails for no reason as well
i dont think i've ever had a pc where a system restore worked lol
Just reinstall Windows at this point
wait what happened
you dont lose your files
you can install windows without formatting
you can always back them up to your other HDDs as well
Take a backup
USB
Wait..
Honestly, I didn't install windows.
It's the technician who installed it for us, but I had the key only.
when you install windows, if you dont explicitly format the disk, it will not delete your files
it will just replace the windows and programs folders, and create a new user folder
even the old windows will probably still be there under a windows_old folder
I need my appdata and the files in the desktop. :/
but as a safety measure, you can always copy your user folder from your ssd to one of your HDDs with cmd
all of that is inside your user folder
hey i have a fuction that checks if a user has a role, and then writes it to the database with the normal member in this case (if it doesn't have any roles)
however, after someone else writes the command with the OG role, it will do this:
It changes both people to - OG
only thing being changed which is really weard
weird*
"It's the technician who installed it for us"
wha
How can I do so?
cmd
copy E:/users/youruserfolder D:/youruserfolder
assuming E is the ssd and D is one of the other hdds, and D has enough space
someone was trying to bruteforce my /encoder endpoint lul
they were fuckin trying to make a sucessful http request
I can bid it was an Asian tech guy 
...except it is actually a websocket endpoint
Lol
/encoder
ye, I use it to encode frames into a video
made it only listen to local requests now
Btw.. I tried backing up, it backed up 6 random files, not everything.
try xcopy E:\users\youruserfolder D:\youruserfolder /E /H /C /I
xcopy is a better copy
E H C I are this:
/E โ Copy subdirectories, including any empty ones.
/H - Copy files with hidden and system file attributes
/C - Continue copying even if an error occurs.
/I - If in doubt, always assume the destination is a folder. e.g. when the destination does not exist.
xD
does xcopy "path" work?
it should
c
@quartz kindle
I have a question, so this backup is going to take about 3 hours or above to copy.
.. is there anything else to backup, or no? If so, or not, what do I do do next?
your user folder has everything except installed programs
desktop and appdata are inside the user folder
the only things that are outside is the windows folder, the program files folders and the programdata folder
Meaning?
meaning just reinstall the programs you need and you should be fine
sometimes programs also store user files in programdata, so you could check that, but its rare
yes, documents and downloads are inside the user folder
So nothing else to backup rather than /user, right?
usually not
.. ok, once I finish?
boot from the usb and install windows
.. and try not formatting, right?
Now suppose it did format and do sh.t, how can I go back to my original form?
.. do I like paste the user folder to the C: drive?
Shit..
Errors.
File creation error - The file cannot be accessed bt the system
did it stop copying? it should continue copying even if errors are found
๐ค I'm using cloudflare workers to send webhooks to discord.
I'm using global variables to handle rate limits(or at least stop some if someones spamming the "test" button).
When testing the ratelimits work great, resetting like normal, and sometimes they get cleared by restarts(thats fine).
But when properly doing it(same environment, just the request location changes), the global variable resets every time.
From my understanding workers are not supposed to reset every time, they can jump between datacenters or be cleared, but I could try it 50 times and its like it started for the first time every time.
how are you storing the global variable?
very complex, let ratelimits = new Map(); in the global scope
Isolates
Could it be this https://developers.cloudflare.com/workers/learning/how-workers-works
๐ค that could be it
if (!ratelimits.has(id)) {
ratelimits.set(id, new RatelimitBucket(5, 5500));
}
its just a class
am i just going to have to use KV or something then? 
Looks like you need some sort of cache service
there should be an owner ids field when you edit your bot
That's deprecated
Dblteam
@hybrid coyote
from the spotify api side? probably, if they authenticate you via the spotify oauth
What's up?
@app.command(
"foar",
description=(
"Foo bar, bar foo."
),
defer_register=False,
)
async def foobarify(search_query: str, ahh: str) -> Response:
...
@foobarify.autocomplete
async def all_results(
# or you can do **options to get all autocomplete specified values.
search_query: CommandOption = None,
) -> List[CompletedOption]:
...
# or you can do it on a per callback basis
@foobarify.autocomplete(for_="search_query")
async def search_query_options(value: str) -> List[CompletedOption]:
...
this is what we've ended up doing for the framework
Yeah that's what I'm gonna do too
@modest maple wait what's the completedoption type?
basically just a Pydantic model that takes name and value
Roid is basically entirely built around Pydantic for all the conversion and checks so yeah
๐ค
I dont understand how this works.
it isolates sometimes?
like a random user ip doesnt get isolated(from other ips in the region, or between requests), then top.gg always does 
mb sry bit confused what deferReply and deferEdit is
with interaction update/edit/reply you have 3 seconds to respond or the interaction times out.
Defering means "I want to do this later than 3 seconds"
Ah I see. So change time: 15000 to time: 3000?
or just defer it, and update later.
The webhook is available for 4s only for you to respond to it.
Defer can be understood as delaying.
After doing so you can respond to the initial webhook for up to 15 min.
its 3s isnt it? ๐ค
Alright. Thanks
Might be 3 or 4. I always forget this one.
It looks like they can run on the same instance, but they don't share a global memory space even if they do run on the same instance.
but it does sometimes ๐ค
how do i get slash commands on d.py 
i did from discord_slash import SlashCommand, SlashContext but it didn;t work
I really wonder if it has to do with the useragent, as top.gg's is non standard
It looks like there is one instance with many isolates running on it like how the djs sharding works
If you hit the same isolate then you have the same memory.
each isolate is running in the same memory, but they dont share
can anyone help ๐ข
right, but why would it have one isolate for everyone in a region, then one single ip gets a different isolate every single time.
like i can get on my vpn and get the same isolate every time
maybe because each ip points to an instance with many isolates running on it. it then does a round robin choice
i dont think it points to one isolate
its pointing to an isolate container with many isolates
i think the {} in this picture are each their own isolates
๐ค im going to start generating random global ids on script start, then log it in each request.
see whats going on
Looked at the cf worker discord, a lot of them recommend using durable objects for rate limits. probably will go that route.
weirdly, they also highly recommend doing it in memory using a map like im doing.
How can I delete them, I create many by mistake
@solemn latch I cleared all cookies and information from my browser and am still getting an empty array
the clear cookies fix was for your login issues, not the api issues
you really really should be testing using tools, not top.gg
the api does not check your login
anyway, I'm not really sure how to help further, using a tool like postman to simulate a top.gg vote is the next step.
I know this, I'm talking about the empty array I'm getting. some users who voted for my bot complained that they didn't get the award for voting, and the array is still empty on my console
ok, the next debugging step is to use an external tool such as postman
unless you have another idea for debugging this issue
ok
yo guys if i make a command which only i can run and which sends a message in all the systemchannels of all the guilds my bot is in will that be against discords tos?
like just an embed to tell the updates on my bot
after i update it
not
so not against tos right?
not
it easily can result in a global ratelimit from discord.
youll need to be extremely careful with it
oh
well is 65 servers a lot?
depends on how it is used
for getting ratelimited?
like just one message sent to every server the bot is in
-send blah blah update
it will send blah blah update to every server
Try to use interval
whats that?
Wait 3 seconds for each guild
the global ratelimit is what, 50 requests a second?
so if you sent 65 messages in 50 servers thats you getting ratelimited
ohh
look, are you going to send messages to several servers mutually, to understand?
what do u mean mutually?
that sounds kinda good
discord also added this feature anyway,
if you look in #announcements you can "follow" the channel to get notifications in other servers.
but announcements has to be a system channel right?
if you put a time limit on each message, it can be done.
Guild.forEach(x =>
Let y = x.channel === community
// Wait(300)
y.send()
});
I typed it for example
igghtt i will check it out
my system channel is welcome messages ๐
instaled postman
How do I send a file through a webhook using the raw API?
add it to the body, https://discord.com/developers/docs/resources/webhook#execute-webhook
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Hello all ,
Can anyone tell me if buttons and messageactionrow can be used for Discord.js Version 12.5?
v12 is depreacted. Only v13 supports Buttons iirc
Oh....
Buttons are an api v9 feature while Discord.js v12 uses api v8
Oh okay okay thanks for your help !

ALso to migrate all the code base from V12 to V13 is quite tough right?
Considering there are too many changes needed? ๐
It can be rough depending on how large your code base is. If you use vscode and keep your code properly annotated for perfect or near perfect typings and have checkJS enabled, it's super easy to find where things may go wrong.
It's not that bad. You don't have a choice anyway. V12 will stop working soon.
I got the hell out of the djs dependency hell a long time ago and I'm glad. Funny enough though, I wrote my own wrapper to resemble it based around modular libs I rewrote to TypeScript with original dev permission
Are new bots declined if they don't support slash commands and are likely to be denied the new intent in April?
hi flaze

It would be unreasonable to decline bots that aren't using slash commands since that change is mid next year. They will be denied the intent though if their only use case is for command handling
The only use case I can think of where they wouldn't decline is moderation
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
Oh sure thanks ๐ I use VSC too...
Yeah thats also true ๐
Tried that. I apparently didnโt see the part where you needed to use the multipart-form-data header at first, Iโll have to look into how to do that
const formData = new FormData();
formData.append("file", fileBuffer, { filename: "file.png" });
formData.append("payload_json", JSON.stringify({ content: "hello" }));
fetch(endpoint, { headers: formData.getHeaders(), body: formData.getBuffer() });```ez
im just thinking that like 90% of bots on top.gg are not going to be functional after the change.
Puny mortal, Iโm torturing myself with Apache in Java!
Gonna do it tomorrow though, found a solution for it
are u at least using a dependency
last time you were using like a built-in dependency for something and kuuhaku was mad
I was using an old ass part of Javaโs http package
Now Iโm using basically the node fetch equivalent in Java
someone
Much much better
do you know what dimensions the background needs to be
for top.gg
Just using raw Java, no Maven or Gradle
anything 16:9
cuz that's a standard
e.g. 1920x1080
unless I misunderstood
16x9 enjoyers
jpg better or png for a profile card?
png always better
depends on how good u want the image to look
png = better quality iirc
compared to jpg
guys how do i get the name of a channel mentioned in a message
so right now i have this: let chan = message.mentions.channels.first()
but how do i get the channels name from this
cause console logging chan gives me a whole key map
not trying to be dumb but, since discord is kinda removing the message intent what module/library, currently has most of the things that the api gives ?
i don't have any problem with switching language in general, but since i like making bots, i need to know what module/library i should use in future
are they removing it?
i thought they were making it privvelaged
use slash commands and no they are adding the message content intent
lol
wdym adding it ?
they are making it privellaged
doesn't Deprecation means removing it ?
you said they are removing message intent which is incorrect
can someone help me with this
please
than what does Deprecation means ?
it would be better if you ask it in the main discord.js server,
dm me te link plz
deprecation is more to discourage it's use
can you explain in easier to understand way ?
i already read that
If your bot has unique functionality that cannot be replicated or otherwise implemented with interactions, you can begin applying once we open the queue for this intent in fall of 2021.
if you can make your bots features without access to message content then you will be forced to do that
oh ok
but i still need answer for this
i use the discord api directly and created an interaction url
i moved my hosting from a vps to aws api gateway that calls lambdas
i don't know how would i do that, and i don't think i'm gonna do that ๐ค
it's a lot simpler that way
i still rather switch language
i think discordjs13 has slash command support
alot of libraries has slash command, but i want the ones that have most of the things that the api gives aka (buttons - dropdown - context menu)
using the api directly will always give you access to the newest features
i really don't want to do that 
it's easier than working with the libraries
try loggin chan.name
why the fuck isn't my mongoose model saving
it's logging the updated guild data but when I run guild.save it doesn't save the model
it looks cool
and way better than await mongo.db("botData").collection("guilds").findOne({ guildId: context.guild.id });
you're supposed to save the database and the collection in variables, I usually extend the Mongo.Client class
also mongodb is faster than mongoose
what about sql 
how about I just do Models.Guild.findOneAndUpdate({ id: message.guild.id }, guild);
@cinder patio wtf how does the same object have different object ids
guild = await Models.Guild.findOne({ id: message.guild.id });
const memberData = guild.members.get(message.author.id);
console.log("before:", memberData);
memberData.xp++;
guild.members.set(message.author.id, memberData);
console.log("after:", (await guild.save()).members.get(message.author.id));
I somehow fixed it
I don't know how

djs has that?
erwin moment
https://googlefeud.github.io/docs-demo
detritus is a bit hard for beginners but it is WAYYYY better than djs
e
#general for e
Does djs have contxt menu ?
droff has all that stuff too. But it isn't beginner friendly.
yes in v13.1.0
aka the latest version
djs is always up to date for discord's new api changes
hey
which hosting should i use for my bot?
u will eventually have to pay to upgrade ur db
personally i use MVPS (ยฃ3.12 a month with 2gb ram), but any VPS with at least 512mb ram should be good
repl.it ^
if the bot is in 100+ server will heroku good?
heroku is good to start with, but over time you will 100% need to move to something better
as Heroku is slow for bots
maybe google cloud
google cloud free is good
i wanna try it but i dont have a payment method
u only need a cc for google cloud free trial
u dont have to pay as the name suggestion "free trial"
suggest*
yeah ik but i dont have a cc
what about paypal?
yes i have paypal
you can use paypal
yes
so i cant
the reciever of the money pays the fee
runs to make an account
lol
oh ur talking to him nvm
ok
it wont take money
does paypal requires something
i mean will it take 1$ for verification and put it back?
i feel like theres a catch to it lol
nope
paypal is free, they make their money by making money with interest on the money you store
thx for letting me know!
and fees
no problemo
run to make a google cloud account
hey u sure it wont take any money?
im sure
how many day?
FREE
google cloud ends in a year of free trial afaik
mine uses 5% of the 2gb ram it has lmao
i have 20 commands
so around 200mp?
Mine uses not even 1%
mine is a bot that just sits there and is only really used when someone joins a server and checks the id
Ah
Yeah, imma get it rq
your bot in how many serverv
2 atm
But it won't rise that much
I had a bot in 100 Servers and it was around 30-32MBish
2 atm?
Ye
what is droff ?
2 atm means what?
2 servers
ok
Atm = at the moment
do you wanna try my bot?
k
no clue
in mp? megapixels?
guys how to get a channel by its channel id
so i am trying to this right now:
but then when i try to do channel.send('this is a message')
i get this error
youre mixing it up
either .cache.get()
or await .fetch()
if you didnt disable channel cache, yes
ohh okk lemme try
One of vetted typescript libraries for discord. https://github.com/tim-smart/droff
oh no....axios.............
oh it worked nice thnx @quartz kindle
Nothing wrong with axios. In some ways it is nicer to work with compared to fetch.
guys how do i send an embed and a message together?
tried doing this
didnt work only sent the message
not the embed
content and embed
?
on v13 its { content: msg, embeds: [] }
ohh
yup
ight ight thanks
hi how can i create slash command in discord.py in cog?
idk of you can
afaik dpy doesnt support slash commands directly, you have to use the interaction events and create your own
,
so how do i center text using PILLOW / PIL whatever its called
ah yes, comma post
draw.textsize
alr
Is it possible to have a subcommand and a subcommand group with the same name?
yes
ty
does this seem like a good idea
/mod
- logs (subcommand)
- logs (group)
- clear
i tried with a longer name
it didn't work
or this
/mod
- logs (group)
- clear
- list
the more u know
i adjusted the text height to be correct, but the text isn't centering @quartz kindle
(sorry for ping)
whats your code?
draw = ImageDraw.Draw(img)
W = 1640
w, h = draw.textsize(name)
draw.text(((W-w)/2,275), text=name, fill='white', font=namefont)
img.save(f"levels/{r['id']}.png")```
ignore terrible discord indenting
print h and w
ok
also is W correct?
its probably better to get W from img
or whatever the base canvas is
@drowsy crag IT WAS A NITRO SCAM AND ITS GONE
its 1640 as thats the image length in pixels
also, you want vertical or horizontal centering?
whatever centering in the width middle
i don't want EXACT centre (centred width and height), just centered width
centered width will make it go over the pfp no?
im gonna rearange it all
ah
not bad
id put level somewhere else
like in a tiny place at the edge of the pfp, similar to how discord does with online/offline icons
like a badge thing on top of the pfp
or even like the [bot] thing after the username that discord does
how do i add a red circle on the pfp lmao
so its kinda like a notification
put it somewhere towards the bottom right of the pfp
lr
alr
i need to work out how
maybe a red image and place it like the pfp
or will that take too long
seems like a skill issue
im trying to make it as fast as possibl
if you want performance, first thing is reduce the image size
1640 is way too large
alr
const emj = {
guildOwner: ":crown:",
id: "๐",
info: ":info:",
user: "๐ฅ",
channels: ":channel:",
time: "โฐ",
scroll: "๐",
server: ":server:"
}
const owner = guild.owner
crt = guild.createdTimestamp - 1623448172016
const Embed = new Discord.MessageEmbed()
.setTitle(`SERVER`)
.addFields(
{name: `${emj.server} | ServerData`, value: `> ${emj.scroll} Name: ${guild.name}\n> ${emj.id} ID: ${guild.id}`},
{name: `${emj.guildOwner} | OwnerData`, value: `> ${emj.scroll} Name & Tag: ${owner.user.tag}\n> ${emj.id} ID: ${owner.id}`},
{name: `${emj.info} | ServerInfo`, value: `> ${emj.user} Members: ${guild.memberCount}\n> ${emj.channels} Channels: ${guild.channels.cache.map.length}\n> ${emj.time} Created: <t:${crt}> (<t:${crt}:R>)`}
)
console.log(crt + ' ' + guild.createdTimestamp)
c = await client.channels.fetch('878045699911090217');
c.send({embed: [Embed]});
})```
so i made this
and its not working
is there any reason why or no
its giving me no error
or anything
use a codeblock pls
depends where you want to display it. for discord its still too big
good point
like this
"DEEZ NUTS"
its for discord devs to use for bots etc
alr
tim wanna see smth cursed
const logChannel = bot.client.shards.get((882906804575674368 << 22) % bot.client.shardCount).channels.get("886971962386182175");
i do not understand what my own copied code does
what does << do?
882906804575674368 << 22 is one big fuckin number
bit shift
let's say you do 1 << 3
1 in binary is 1, if you shift 3 bits to the left it becomes 1000
this was what evan told me to do when i asked how to get a channel (in detritus)
||then i realized this exists: client.rest.fetchChannel||
or let's say 5, which is 101, 5 << 2 becomes 10100
ye
the sharding formula is >> 22 not << 22
shard_id = (guild_id >> 22) % num_shards
๐
i;ve just got to resize and reposition everything now lmao
5/7
i need to make a bot which will register player in game names and sends it when asked




