#development
1 messages ยท Page 1448 of 1
why are you storing guild name in the first place 
the show command is supposed to show it
that was one of the most complicated non-complicated things ever
it's just a useless piece of data you have to keep track of
how are typings used for regular js modules
@quartz kindle i got the stuff to work
Well, why does it not work?
By definition you can throw an embed.
it's just not conventional.
Usually you'll return the value and instead only throw errors.
Avoid throwing logic for non-errors.
[object Object] means you put it in a string
You put it in some string.
likely killed due to your system running out of memory
if you're on linux, monitor your memory usage using top or htop
I made a circle on canvas. but I cannot fit the picture in this circle. how can I do it?
ctx.beginPath();
ctx.arc(foto.width / 2, foto.height / 2, 22, 0, Math.PI * 2);
ctx.closePath();
ctx.clip();
ctx.drawImage(foto, 138, 130)
ctx.restore();
One message removed from a suspended account.
One message removed from a suspended account.
๐
Probably not
Tho i dont like when the fist is about to hit
Maybe ive just been staring at a screen for too long
lmaoo its the best non scary one i could find
same but its mostly just coding lol
I am supposed too


this.socket.send(JSON.stringify({
op: 3,
d: {
status: t,
afk: false
}
}));``` right so i'm trying to set my status using the raw ws, and this is just causing everything to crash and i don't see why.
HI i keep getting a error when i try to remove a role from a user
Code: https://pastebin.com/vKFaaPAZ
Error: UnhandledPromiseRejectionWarning: typeError: Cannot read the property 'roles' of undefined
i check if t is a valid status too
No!
wtf is a snake command
well it obv summons an anaconda that eats the entire guild
bruh
so spawns python.exe 
yall don't know the game snake
aka snek (for discord)
oh
lmao
anyone done anything with the discord api (specifically setting status with the gateway) here? i'm trying to set status using this code: js this.socket.send(JSON.stringify({ op: 3, d: { status: t, afk: false } })) and it seems it should be right according to the discord developer docs, but it just crashes the bot.
HI i keep getting a error when i try to remove a role from a user
Code: https://pastebin.com/vKFaaPAZ
Error: UnhandledPromiseRejectionWarning: typeError: Cannot read the property 'roles' of undefined
is the user in the guild
get returns undefined if no element can be found
and since you fetch all members, that rules out pretty much everything except one thing; the user with that id is not in the guild
i console.log(userID) im using my alt to test and it logs my alts id n my alt is in the guild
hm, you got server members intent enabled?
on the developer portal yes n in the code
it gives the user the role but doesnt remove it
list1 = json.loads(list1) Expecting value: line 1 column 1 (char 0) py
Tim could you explain *.d.ts?
typings for typescript users and intellisense
o
I tried to make it for a package for intellisense and it isn't giving anything
I can post code but do you know any common mistakes?
you need to define it in the package's package.json
have i been summoned?
yes
i heard the word typescript being said 3 times, as per contract, i am summoner
ship your shit with index.d.ts, ez pz
yeah, how do I define typings?
ye
you put the types in the .d file, and set the type in the main file
the main file is index.js
im confused
look at tim's example
iirc you dont even NEED the declaration for it, you can simply import
though i could be wrong about this specifically
by declaration i mean the typings declaration
<name>.d.ts should automatically be picked up by your ide(assuming vsc)
if you didnt you either have to or change the extension file to tms or something
i forgot the extension
.js is normal js
but theres a .ets or some shit like that
lemme check rq
mjs
.mjs is automatically picked as module type
o
do you mean exports vs module. ?
no i mean making your whole thing a module
you dont need to use those things, just a typings file is enough
isnt this the error they're getting though?
not error but just no intellisense
usually module related issues come by not setting them as type of module in the package
though if its only intellisense it shouldnt be an issue
yeah so the code works fine except no intellisense
here ill send the index.d.ts
declare module 'loggers' {
interface LoggerOptions {
debug: boolean,
method: any,
colors: boolean,
newLine: boolean,
catch: boolean;
}
export class Logger {
constructor(options: LoggerOptions);
private send: any;
public readonly options: LoggerOptions;
private _formatArgs(): string;
private _formatColors(): string;
private _newLine(): string;
public log(): boolean;
public warn(): boolean;
public error(): boolean;
public err(): boolean;
public debug(): boolean;
}
}```
hey guys so
im using erelajs and the setQueueRepeat is setting the repeat to true but its not actually looping the player queue
index.js:
const pkg = require('./package.json')
const Logger = require('./lib/Logger.js')
Logger.version = pkg.version
module.exports = Logger
when i skip with "player.stop()" it jsut disconnects after it ends.. but its supposed to loop
since it should automatically pick up
you need a type
const Logger: Logger = require('bla bla')
any help?
im a bit confused rn
if you need to manually import do import {Logger} from './index.d.ts';
cuz you are importing types from typescript into javascript
you either need jdocs for js, or typings for ts
hmmm
actrually, here, rather than explaining the whole thing
lemme just 100iq this
"typings": ".index.d.ts"
add that to your package.json
so I went into another project and installed it, and it is giving intellisense for logger.Logger() which I thought I defined logger() as the constructor
yeah I added that
so it should be working fine
aight
it isnt tho sadly
now reload ide
no intellisense?
well I was gonna say that there is but it is instead of Logger() it is giving intellisense for Logger.Logger()
what IS Logger?
a class
in your file
how you importing it
let Logger = new Logger()?
or let Logger = require('Logger')?
const Logger = require('loggers')
const logger = new Logger()
console.log(logger)```
thats why
do this for sanity sake
let Logger = new require('loggers')();
the issue is
you are requiring it
require is a bitch cuz it returns any type
you need to either type cast it or set the return
let Logger:Logger = new require('loggers')();
@scenic kelp nsfw
thats ts or js?
ts
im writing js
thats why its annoying to use require()
ah I see
ok so the issue is that the intellisense things that Logger.Logger is a thing
which it isnt
its usually better to write everything in ts and then transpile into js
Do you know why this is happening?
wrong type declaration possibly
do //@ts-ignore on the line above logger
with lowercase
and run it
Developer Log 1: PC is shipping, time for wait 
if js catches an error, its wrong type declaration
its a shit way to debug, but it works and its simple
if js errors, well, you declared your typing wrongly somewhere
js errored
there isn't any intellisense for that either
your typing delcarations are wrong then
do you know how I could fix that
no clue, you gotta debug it
np
what a great place to put your developer log
yeah
In ts is it possible to make an export a class? @opal plank
oh no i pinged KitPlayingMinecraft
can anyone help?
so basically whats happening is when the queueRepeat is true it kinda doesnt work when "stop()" is called. like the queue just stops and doesnt repeat
im usnig erelajs
they have a method "setQueueRepeat"
Uh
but it only works if the song completes without any skip
yeah i think it was Alex who suggested lavalink and erelajs
Ask him so
i forgot which alex ๐
Lol
wait it does again?
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
list1 = stdout.decode("utf-8")
list1.strip("[]")
print(list1)
list1 = json.loads(list1) ```
python
What are you stripping
But that's not valid
It worked yesterday
I don't know what I changed
wait wtf
it works when i do python3 filename
but not when i do pm2
:confusion:
in discord.py, is there a way to get the bot's avatar without taking it in as a command argument or putting its link directly?
.strip returns a copy
console.log(member.id)
if (typeof foo !== 'undefined') {
const channel = await member.guild.channels.cache.find(ch => ch.name === 'welcome');
let welcomeembed = new Discord.MessageEmbed()
.setTitle(`Member Join!`)
.setThumbnail(member.user.displayAvatarURL())
.setDescription(`Welcome ${member.user.tag}, Welcome to ${message.guild.name}!`)
.setColor('#21eb67')
.setTimestamp()
channel.send(welcomeembed)
}
})``` help?
help where ?
!=
yes and no
)
im drunk, whats up
i assume so yeah
ok then how?
won't just if(foo) work fine ?
foo is useless
a class is a function basically, after it had sex with an object
foo is undefined most likely
what is foo anyway
I mean
I thought it was a global variable
they wouldnt ask for help if they knew what they were doing
how would I go about telling ts that I want to export a class
module.exports
...
export class
thats it
module.exports = className
es6 syntax, welcome to the civilized world
bruh
https://million.is-a.computer/files/5ABJ2Xfj7n0eNGs.png
this should export a class as require('loggers')?
require is the annoyance
seems to me like 'loggers' has property Logger
hmm
Wdym possibly lol
no, nodejs has different flavours
es6 and higher is the one you should be aiming at
only really outdated browsers dont support es6
congratulations I just learned es6 modules in 36 seconds
yo

yeah it's kinda useful
can I set a property of a string if I use new String()?
specially the {} thing while importing
bruh what
so the Erelajs "trackStart" event is looping ;-;
why you even calling a string constructor
like (new String('hi')).msg = hi
like its being emitted 3 times
to do that lol
no
if there are 3 tracks
ok ty
It's been so long I've used JS a lot have changed
you can hack its prototypes though
Wait that's not VSCode is it
it is
Why is it showing the authors
extentions?
Oh
idk
you recommended me erela
whats erela
Do you mean eris
eris has nothing to do with music
idk ive never said to use lavalink
im almost there
well
trust me
you can
Well I didn't realize it was a music thing
with lavalink
you CANT scale them
you better off making a json database before you are able to properly scale music bots
you'll need to put investment into it
and buy ipv4 blocks
No you need a ton of other knowledge on actually deploying lol (million)
fuck you Erwin https://github.com/Million900o/jason.db
Nah he can use mongo it works fine
you cant
you dont even understand what im talking about
Doesn't the YouTube api work with ipv6? You can just get a free ipv6 block.
Isn't mongo slower and not async?
yea ik but most music bots don't really grow much bigger than 1 dedi
Thus making it unusable for big bots
1 dedi is still a ton of ips
A ton of backend you can't get from your basic YouTube guide
any api you hook into will need to be ratelimited, that means each ip will use up all the quota for that token, you'll need THOUSANDS of ipv4/6's and use lavalink or some other proxy/router for each request. Ive seen some stuff interanlly from rythm, you have absolutely no idea how complicated it is, dont assume cuz you have a bot on 20 servers your bot is scale friendly
both spotify api or youtube
"i made a music bot", some random user, who copied shit from d.js guide

people have no idea what they getting into when making music bots with the expectation of getting them popular
2 weeks later every single one of them comes here asking for another api that wont ratelimit them or how they can bypass it with scrapper or some other free method
It's honestly not worth it either unless you're just trying to learn
if you arent willing to put in the buck and buy ipv4 blocks, dont do it
I agree
There are already big bots that fulfill this function
discord bots are not the thing to make
And also actual streaming services that you are supposed to use to play music
But like if you're trying trying to learn then don't let anyone stop you lol
alright should i use fatjar or nah,
if yes then what should i use? maven-shade or maven-assembly or smth else?
Just because the reviewer thought there was no space in my bot prefix it got declined TwT i have to redo it all over again
Just ask
Contact the person who reviewed your bot in private. Search your bot's ID in #mod-logs to find that out
I mean, yeah i did, he said there was no space on the website so he ended up using the prefix without spaces and so the bot didnt respond, i just said "ah my bad, i'll upload it once again" im too scared to ask xD >.<
he might be a busy person
It's fine to contact them for questions if you understand what they go through on a daily basis 
you know that discord where using MongoDB before switching to a more performant one
also mongodb is easyer to scale than mysql
Hi Guys
I have question
What is the best in response speed
const BaseCommand = require("../../utils/structures/BaseCommand");
const { MessageEmbed } = require("discord.js");
const Discord = require("discord.js");
module.exports = class TestCommand extends BaseCommand {
constructor() {
super("evel", "testing", ["top-server"]);
}
async run(client, message) {}
}; ```
```js
const { MessageEmbed } = require("discord.js");
module.exports = {
name: "",
aliases: [],
permissions: [],
usage: "",
description: "",
ownerOnly: false,
enabled: true,
cooldown: 5,
exec: async (client, message, args) => {}
}```
do a benchmark.
generate a timestamp when the command is initiated and when its fullfiled
then compare both timestamps
idk never thinked about changing the way commands are contructed. the Class will give you more flexebility i guess while the conventional method is easyer and lightweight
but if you want to make a really big bot i dont think js will be the way.
if you want the best overall performance a compiled language would be better.
Idk but i'm use js and i'm learned ts
js is fine but at larger scales it will decline in efficency
But i like js
well its easy to learn. i started to learn C# bcs i want to have a more efficent use of Resources
i still like js and will probably keep using it. (mostly bcs i have no idea if i can easly implement the stuff ive made in C#)
its nice language and like Java
java is ok. but you have to code efficent, they used to teach it wrong in school for years.
java is bad in perfomance on large scale things
minecraft java edition is an example of this
lol
started out as a small game
was fine
fps wasn't that low
now its thicc
and pcs struggle with it
lol
smh
my gaming pc is decent for its price
for the money I had available
still runs like 500 600 fps
lol
and my pc can run genshin impact 60fps consistently
whatever
bedrock edition runs better
than java edition
cuz bedrock is c++
What
c++ uses more resources but in return you get more fps
Minecraft Bedrock edition used c++
huh
??
that statement is bullshit lol you can make anything use more resources
Why Mojang used Java in Minecraft Java and used C++ in minecraft Bedrock edition
im just talking about bedrock edition
the reason why people use cpp is because you can do proper manual memory management and tune it to your use case
using more than java edition
ahem microsoft
java sucks for large scale games
and c++ works better for mobile and the other devices
lol
java edition is not only running on java but its full of really really bad code that a 12 year old could've written better
yeah
thats also the thing
I mean orginally they didn't even make it
it's full of O(n^2) loops and what not
but also cry: bedwarstats

they're obfuscated
1.13 and on is especially bad because they got interns
so they added shit code on already shitty and archaic base
not to mention they're still using java 8
is it still feasible to rewrite a cleaner version in java
yes
java is java and it'll be a memory hog no matter what you do
but
writing actually good code produces good results
just by using modern day java they would already get a fuckton of optimizations
but no
java 8 hurr durr
this is why I bought a "I write beautiful code" shirt
thats why most servers are still using 1.12.2
lol
1.12.2 is more or less the sweatspot for mods too
var dt = new Date();
dt.setHours(dt.getHours() + 1);
dt.setMinutes(dt.getMinutes() + 10);
stats.timestamp = dt;
console.log(stats.timestamp);
const interval = setTimeout(async () => {
// do something
clearInterval(interval);
}, new Date(stats.timestamp) - new Date());```
Is there something wrong with this code? idk why the setTimeout is triggered before the actual trigger time
from emoji?
What kind of emoji?
custom emoji
Just split or parse the emoji identifier?
how to parse emoji
console.log new Date(stats.timestamp) - new Date() and see what it returns... it's most likely a negative number
Anyone got dbd codes?
That's not a custom emoji
That's just a unicode emoji like "๐ฉ"
Discord uses Twemoji though but the content still use unicode
Oh, im idiot thanks ๐
ik timestamp is correct because it gave the correct timestamp 2020-12-13T09:37:40.173Z
The thing is that new Date() is always bigger than the timestamp, so it returns a negative number
you need to subtract the timestamp from the date, not the opposite
(Unless the timestamp is supposed to be bigger than the current date, then something else is wrong)
I'm writing a class for something, can I somehow have this accessible when I move functions into their own files?
In TS*
Hey
In need of help
yep, the timestamp is supposed to be greater than current time, i have a feeling that the hours are setting properly? not sure whats happening TwT but it kinda waits for some time and then executes, something like the timeout was supposed to exe after 2 hours but it exe after like 30mins wtf
Weird. Try just stats.timestamp - new Date()
yeah that new Date() is redundant since it's already a date instance
but i'm not sure why that didn't work
I'm bored so I'm making my own library
How the heck does JS store this infinite loop:
Object.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__
it just does
new Date().now() is the timestamp
Date.prototype.now doesn't exist tho
The method is static
It can be used on the main class only not on instances

@pale vessel what does 5head mean tho
"hi".constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor.constructor
@pale vessel i did not run the script yet i know what it'll output Function () { [native code] }
yes that's why it also has a constructor
some xss work like this
they just do Function("return somethingbad;")()
where Function can be something like string.constructor.constructor
does anybody know how can I add a role to all the members in my server?
(not with my bot)
You're an object
no u
yay
@misty sigil what a large cock
Why does it not let me add more? for example a rob with a value?
hehe bots go brr
const newData = new Data({
name: bot.users.cache.get(user.id).username,
userID: user.id,
lb: "all",
money: 0,
bank: 0,
daily: 0,
weekly: 0,
beg: 0,
work: 0,
rob: 0,
})
I made a new data and when I added the rob: 0,, it didn't add in the database for some reason.
Is there like a limit?
Oh wait, I found the solution! Thanks! ๐คฆโโ๏ธ
does anyone know what the ratelimit is for guild.fetchInvites()?
I found how we make it for That image float ?
use a pc and then inspect element and see for yourself
Best SQL wrapper for node.js
And best wrapper for java?
Google search wont cut it, because people wll say that their wrapper is the best.
Best SQL wrapper for node.js
For me it was mysql2 since it supports promises
google search will cut it if people add reasons/facts/data to back up their claims
which they often do
Google cant cut it
google will cut you
lol
No u, google will cut discord.js-light
I will cut Google
is it better to compile ts files before pushing to npm or at client side?
if you dont compile before pushing, commonjs users cant use them
gotcha
ts packges usually have two versions, one for ts another for js
and you chose which one to use in your require line
In what language?
I'm not that good with js, but maybe something like
const Guilds = client.guilds.cache.map(guild => guild.name);
console.log(Guilds);
so i got this problem.
i use message.content.split(" ").slice(1).join(" ") and message.content.split(" ").slice(2).join(" ")
for example, i want to write <number 1 2
I know
@main trench I think he wants to know the names of the servers, not the number of servers
Yes, i know the numbers.
Ah
Yeah then do map
yep
here you go brotha
lmao
Hi
Why this command not working?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you did await mentionedMember.send(warnEmbed);
you have to do await bot.users.cache.find(mentionedMember).send(warnEmbed)
what bot do you have?
why
then just do bot.users.cache.find(mentionedMember).send(warnEmbed)
ok
where put that?
instead of await mentionedMember.send(warnEmbed)
ok
need to put await before bot.users.cache.find(mentionedMember).send(warnEmbed)
ok do it then
?
still no
๐ฆ
if you want to do it
Hello. Do you know if MySQL have a CONV function that works on large number? Because
select CONV('05A2919F5812D0CD80', 16, 3);
gives me garbage. I expect 221122112211221122112211221122112211221122
@earnest phoenix define user as message.mentions.members.first() then do user.send(embed)
where put that?
Replace your original dm code with it
ok
Can I use SCSS for my long description?
I do believe so yes
In discord.js if i listen to the guildMemberRemove i cant get the member's roles right?
if you have the gateway intend you get the entire member object
Oh ok
how can I make my bot remove its own reactions and not need manage messages
https://stackoverflow.com/questions/56379469/remove-a-users-reaction-from-fetchmessage-discord-js tryed this?
very true, u ask for help and they react with the ๐ฅ
Or you help and they tell you to read the docs since I didn't give the exact help it specified 
lol
Why my Command Handler doesn't load any command?
That server is weird, lots of karens
idk

i read it
and?
@humble rock its consol.log
Could be how your command handler is in the actual command itself
thats the problem
This command is a test
I'm not too experienced with loading commands since I don't need anything else logged in my consol
So probably can't help ya
Someone else can help me?
I need help
UnhandledPromiseRejectionWarning: Error: Error parsing info: Cookie header used in request, but unable to find YouTube identity token
I am making a music bot
and that error comes
When I run a file with python3 it works, but when I use pm2 it doesn't
Python
Linux Ubuntu
It like gives an error
hi I'm doing the snipe command. how do i get all addFields.
snipes.unshift({
silen: message.author,
author_name: message.embeds[0].author.name,
title: message.embeds[0].title,
description: message.embeds[0].description,
fields_name: message.embeds[0].fields[0].name,
fields_value: message.embeds[0].fields[0].value,
channel: message.channel.id
})
you might need to use a loop
how should I use a loop inside unshift
Why not just have a key/value for all the fields as an array (fields: ...)
Then give it .fields (an array of objects)
@sudden geyser you are right.
i have a .d.ts file but its not giving me extra intellisense in my node module
after compilation
this.socket.send(JSON.stringify({
op: 3,
d: {
status: t,
afk: false,
idle: t == "idle" ? Date.now() : null,
activities: this.activities ? this.activities : null,
},
}));``` this looks right and t is "online" but discord closes the connection with code 4001
could you link the opcode docs please
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
op 3 seems

all i can think of is invalid payload
maybe log the stringified data
I got noticed Discord is having kind of an API problem, and because of that problem ${client.users.cache.size} is not working. At my bot, it shows 1 user, and sometimes 3 users, but currently he is connected with more than 1000 users. But my friend's bot is normal, using the same code, same library (discord.js). Can you explain for me plis?
cache
caca
wdum
did you enable GUILD_MEMBERS intent
I think so
nothing to do with api
kk
let me check guild_membes intent
@summer torrent sorry how do I enable GUILD_MEMBERS intent
im writing a discord lib with matt and i want to have intellisense for a certain thing under client options. right now its this: https://alebot.is-inside.me/EVAj2nvq.png
i want it to be this: https://alebot.is-inside.me/K06OYyxe.png (the second image is in my ts file with the typedefs being exported and stuff)
the first image is the compiled source files interfacing with a js file im writing
Code: https://hastebin.com/xuvumoseya.js
Error: https://gyazo.com/a97a7591c8446028648d78e4ebfcc2de
Does anyone know why this doesn't work?
you cant send to a string
welcomeChannelData is not a ChannelResolvable
get channel from channel collection and send
https://hastebin.com/duyohosexo.js
what's wrong here?
uhm channels aren't supposed to ever be uncached ๐
Oh that thing. Nevermind, carry on.
there are cases where it can happen
anyway can anyone help me
const Discord = require("discord.js"); yay
In what cases would a channel be uncached since they're all sent on startup for every guild?
I've literally never ever in my entire 5 years of using discord.js, ever seen a channel not be cached, if it existed.
unfortunately still does not work
channel created after the bot went online. then it should be only cached on a event iirc
yea your syntax is wrong.
you try to send a message to an id
yeah I see the problem
welcomeChannelData isn't a channel.
it's... db data
it's not a discord.js object.
client.channels.cache.get(welcomeChannelData) doesn't... do anything.
you have to assign it to a variable
Heyo! I coded a snipe command which takes out the last deleted message and when I type the command, it shows the last deleted message and when I try the same in the separate server where my bot is In. It shows the same message like I have two servers. The first server's message content is ok and it shows the same content in the second server. I want it to show the separate deleted messages of the separate servers.
well it searches for the channel in the cache. adding a few ns to the command runtime
Language = discord.py
no no, it... that line returns the value
but the value isn't being put in a variable
it's not being used
i know
So it does nothing
it doesn't magically change the value of welcomeChannelData, which is still just an ID and not an actual channel
how do I do that? haha I'm not that good at coding yet haha
welcomeChannelData being an ID like "272764566411149314", he's essentially doing "272764566411149314".send("blah") which of course doesn't work because String.prototype.send() is not a function
If y'all don't know how to set a variable maybe you need to refresh yourself on the basics of javascript, eh?

there is more wired stuff. you make a if check if welcomeChannel exist. and in the Else you make again a if welcomeChannel
That would make sense, yes
anyone got a solution?
@river tide https://tryitands.ee/
{"op":3,"d":{"status":"online","afk":false,"since":null,"activities":null}}
``` does this look, valid?
as in sending a presence update event to the gateway?
wtf discord
won't work
im fairly sure it closes the socket
but without actually closing the socket
i know, the event isn't emitting
does the process exit?
I don't program python, but I can tell you your issue is about scopes. You're defining a variable outside your message_delete event and it's being modified within it - it has no way of knowing what server you're in. You'll have to change that to be a structure (a dict? object? whatever it is you folks use in python for key/value pairs) so that you're setting a message per server ID and not just one single normal variable.
then the connection didn't exit
why doesn't it get messages any more then
that disconnects you tho
Wdym
Sigh. I mean, I did say exactly what I meant.
what part of that answer didn't you get?
matt just reconnect
ok so
i do reconnect as dice suggested
but when i log back in i'm seeing a 1005 code
PYTHON
Hi
What Evie said was that you need to move from a simple bot property (bot.x = message.content) to a dictionary attached to your bot object (bot.x = {}) so that you can assign each guild (a guild's ID will be the key in the dict) a deleted message's content
@slender thistle Can you please send a short code on how to do it? ๐ฅบ
The idea is literally there
bot.x = {}
on_message_delete:
bot.x[message guild id] = message content
@misty sigil where is tim
yes.
ok ping tim time
no
whY NoOooOt
k fine do it
atTim please help me with this i am going to cry
@pure lion You making a discord API wrapper?
What's the repo
y๐ ฑ๏ธkes
like typings?
i should probably fix that
yeah
i have typings
as you can see in the src
but the .d.ts doesn't want to do its thing
yeah websocket.ts and websocket.d.ts have the typedefs and interfaces
also how can i make the listeners and their args have the intellisense
you uploaded it a few hours ago and already put it in npm? lmao
Speedrunโข๏ธ
i only put my stuff on npm when its already like v2 or v3 lmao
developemnt!
might pr
ask matt
Lmao what
use my zlib lib :^)
you dont need to require ffmpeg in your code, you just need to have the binaries installed
ok
@earnest phoenix show
my bot's command stops constantly when a new document is created and its being used later, is there a way to not make it not stop and rather continue?
mongodb
did you do new Client("token", {/* sense here */})
yes
show me a screenshot
Kristaaaaa
voooltrexxxxxxxxxx
K, imma open them later
yay
Also a lot of properties in the user class is nullable
Be sure to property? the nullable ones
Hi, does anyone know if I can fetch a user's linked account as facebook, github, ... With discord.js
only using oauth i'm pretty sure
Yea that's what I was seeing in a 2018 api topic :/
here? you cant, bots cannot access linked accounts, you'll have to use their oauth (which is js, discord.js is a library for discord's api, its completely unrelated, d.js cannot do that)W
You'll need to use fetch/request/axios or some other http request library and do it yourself, or try your luck finding some lib/snippet that does that for you
Oauth requires a domain too right? For the referer stuff
not really, no
check discord for example
you could foward back to your ip if you fancy it
top.gg => discord.com => top.gg
your ip => discord.com => your ip
or your host/vps
express does the job fine
weird only works in the ourcord project but when i install the npm package to use it in a new project, the intellisense didn't work
yeah so can you help out with that
@pure lion Isn't this supposed to be ClientOptions as param instead of just any
In JSDoc
yeah exactly
it doesnt show as clientoptions though
which is really weird
oh shit i thought i updated that

someone overwrote my thingy
It's the websocket.d.ts file btw
ohhh
How should I go about purging a map of data that has a property greater than another value?
Hi, I have a dm command where the bot will send dm to the mentioned person or with someone's ID. Currently I have this
message.mentions.members.first() ||
message.guild.members.cache.get(args[0]);```
But the bot cannot dm people that are not in the server where the command was run, the bot is in a mutual server as the mentioned user though.
Any way I can make it dm someone who is not in the server where the command was run?
that makes sense
you can as long as you fetch the user
@opal plank yo you're a ts lover right?
he is indeed
how to fetch that particular user from all the servers that the bot is in? That's my question
are these typings alright?
idk if thats the right way to do callbacks and iterators
does someone know how to fetch a particular user from all the servers that the bot is in?
at cache just filter the servers by the user ID
ummm
you want the member object from all guilds?
yes
like member for user A in guild A, member for user A in guild B, etc
a particular user
member?
@pure lion Uhh
why not use user?
you need to fetch the user separately for each guild
Why is there login and connect methods
wait what



