#development
1 messages · Page 1109 of 1
Ok so where to put it in which box
In the box that says client ID
There are two mathjs packages, one is called mathjs and the other is math.js
The first one was published 20 days ago and is awesome AF the other one was published 6 months ago and is meh
it is rlly confusing
bruh
select bot in scopes
copy the link
done
then select the perms
no dependencies needed if u use Math.
it is rlly confusing
@surreal notch .
and i dont want to destroy myself with eval
@surreal notch .
@surreal notch i just explained you dumb
select bot in scopes on the ouath2 page
/math 1 + 1 * 7 / 2 % 2
that should work if u parse integers
no
yes
OOOHHHHHH
now i get it
lol, i depend on 3 packages rn
lol, i depend on 14 packages rn not including mathjs
awesomeeeeeeeeeeeeeeeeeeeeee returns nothing when i pass process.exit
yes
but im using evaluate from the mathjs library not the normal js Math
god these packages need better names
ok
solution abandon js and join the way of python
despite the fact i now have 3 modules called mplfinance just with every so slightly different variations of the name
real solution: dont use any libraries at all
that solution would make me cry
i can survive with 1 package, what is eris. :DD
if you're not importing atleast 6-7 different modules into your file you're not doing it right
why make your bot so depend on many packages?
Because the packages are maintained, they're efficient, they're quick and they're reliable?
😄
without me having to do any of the menial stuff
well, js has a LOT OF built-in functions, and you can use them instead of packages what do things a slightly easier.
what would you rather do, waste 5 hours coding out a google translate package yourself or just do import googletrans
i mean it's a no brainer
i mean simple packages, like Math.js
Why reinvent the wheel though
and google translate package just simply scrapes google translate tho
why make your bot so depend on many packages?
@restive furnace these packages are actually used by me: discord.js, quick.db ,moment ,moment-duration-format and...
it does..
so let's just say packages suck and everyone uses normal code
it's our choice to use packages
i was looking at the python package not 15 minutes ago
lemme get the page up again
"Googletrans is a free and unlimited python library that implemented Google Translate API. This uses the Google Translate Ajax API to make calls to such methods as detect and translate."
"I eventually figure out a way to generate a ticket by reverse engineering on the obfuscated and minified code used by Google to generate such token, and implemented on the top of Python. However, this could be blocked at any time."
it does support for both api and non
so they reverse engineered google translates code instead of scraped it? ok
there is
huh
if you read the page he says scraping can't seriously be done anymore
just press that -
-
and goes into detail as to why
but we're getting off track
why even spend an hour doing a scraper when you can just do import googletrans
yes, okay, it is your choice, and you can't force others to switch to python, since you need to use less packages, that is ppls choice too
it's inefficient and it's probably slower
I'm not forcing others to switch to python i meant that for any language in general tbh
not particularly python
the same could be said with npm
hey
doesnt Google TOS prohibe Scraping google?
no idea
well, same goes to youtube, but still big bots do it
in message.content.substring(prefix.length).split("/ /"); if i type something enclosed in quotations will it detect it as a single argument or will it split it into "a,b and c"
lemme just test on my own
awesome
you won't get it
doesnt Google TOS prohibe Scraping google?
@lusty quest yeah
what can i do about my bot's shards giving the 'SHARDING_READY_TIMEOUT' error
discord.js-light
ok
Can you try do client.on("debug", console.log) and see if it gives you a list of guilds or it tells you that's you reached a limit of identifications
what can i do about my bot's shards giving the 'SHARDING_READY_TIMEOUT' error
@sinful belfry does it ever ready?
it used to but now it has just stopped readying entirely
Can you try do client.on("debug", console.log) and see if it gives you a list of guilds or it tells you that's you reached a limit of identifications
ill give that a go
You might have reached the identify limit
You can login to your bot 1000 times a day and then you get a cooldown
If your bot errored a lot that might have caused it
How i can check does message.content include star
as a word, or just anywhere within message.content?
@sinful belfry yeah that happens sometimes and it's annoying
lmao yeah
how does it even happen tho
the bot was just online like an hour ago
and it suddenly went offline
It could have errored or you restarted it too many tines
@earnest phoenix Filter the args from the mentioned roles, users, channels, and spaces
I was wondering if there is any free translation APIs or any way to get translations for free in node.js. would I have to scrape or is there an api/package I can use. I can't use Google translate API as I don't have a card, thanks in advance.
http://translate.google.ru/translate_a/t?client=x&text={textToTranslate}&hl=en&sl={fromlang}&tl={tolang} Sometimes the captcha
solution
TypeError: 'list' object is not callable```
https://translate.yandex.net/api/v1/tr.json/translate?id=8f3e0411.5f266d98.ce1217ad.74722d74657874-59-0&srv=tr-text&lang={fromlang}-{tolang}&reason=auto&format=text&text={text}
How i can check does
message.contentincludestar
@earnest phoenix you literally typed it yourself.
message.content.includes("star")
ooh when did discord add this awesome feature
how do i escape roles
and make my bot ping em
\@role
solution
TypeError: 'list' object is not callable```
. anyone??
and escaped it is <@&role_id>@earnest phoenix
@glass steeple What are you doing?
i need to add green_check emoji to emoji variable and then i'm using it to check if that emoji is used as a reaction
so i'm facing problem getting that emoji
Node.js: Cannot use import outside of a module
Me: uses var {the, variables} = require("file");
Node.js: 
@void vale ok thanks trying
hiteke the
er
Node.js: Cannot use import outside of a module
Me: usesvar {the, variables} = require("file");
Node.js:
"type": "module" in package.json also:
me: uses typescript
@void vale that's giving syntax errors
emoji = get(bot.get_all_emojis(), name='EmojiName')
i need to do this
but this is in old code
i'm using that in on_reaction , i don't think it will work
Why are you giving js code to someone who's using dpy
LMAOO
lol
You don't use a dictionary as kwargs
XD
it's literally arg=value
Please consider confirming your code before actually helping

Not you
ME CAN'T AFFORD A GOOD VPS
ok sounds like a life problem, not development problem
Not you
@slender thistle ikr but just saying
I have a good vps
ok sounds like a life problem, not development problem
Code
async def on_reaction_add(reaction, user):
emoji = discord.utils.get(bot.emojis(), name='green_check')
if reaction.emoji == emoji:
if reaction.message.channel.id == 7224428676xxxxxxx:
Role = discord.utils.get(user.guild.roles, name="3PM IDP")
await user.add_roles(Role)```
error
File "C:\Users\bhatura\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "C:\Users\bhatura\Desktop\rolebot.py", line 29, in on_reaction_add
emoji = discord.utils.get(bot.emojis(), name='green_check')
TypeError: 'list' object is not callable```
bot.emojis is not a function
It's a list, and you're trying to call it with parentheses
can u tell me what will be the right command
i searched alot but didn't understand
Is green_check a custom emoji
@slender thistle yes
Glitch is giving free 1000 hours from 1 august how to use that?
by using them
how
keeping ur bot online
should we have to enable somethings?
replace bot.emojis() with bot.emojis
@surreal notch its as normal
wait glitch is viable again?
lol jk
shit
what’s the fuckin point o the 1000 hours then
u can only keep bot online for 1000 hours a month
1000 hours is a lot more than there is in a month
It will as usual sleep in 5 mins
41 days is not enough
It will as usual sleep in 5 mins
@surreal notch yes
Glitch knows
1000 hours is a lot more than there is in a month
@misty sigil
41 days isn’t enough?!
yes Ik ik
I get paid for using vps
What
what
How to keep images in a line with html code in top.gg ?
@stone meteor
Anyone knows ??
lines of code before beautifying: 1500
lines of code after beautifying: 937
My code takes 38 lines, and the bot can do everything 😎
why you shouldn't remove wrap text if you're weird and love to show off that you wrote that much lines of code in 4 months
not an instagram user
@slender thistle there's no error now but it's not giving the role as mentioned
My code takes 39 lines, and the bot can do everything 😎
lies
js can be written in a frikin single line
just put ; in correct places
this.commands.get(cmd).init(m, this);this.commands.get(cmd).exec();``` this is my code in single line on message event excluding checks
wait oops
ME CAN'T AFFORD A GOOD VPS
@earnest phoenix There is one for like 2 dollars a month with 450 MB RAM, 15GB SSD Disk, 1.5 TB DDOS protection, Intel Xeon E5 Skylake Processor and 2 MySQL Databases.'
if you cant afford a vps, don't do a public bot, recommendation.
@earnest phoenix There is one for like 2 dollars a month with 450 MB RAM, 15GB SSD Disk, 1.5 TB DDOS protection, Intel Xeon E5 Skylake Processor and 2 MySQL Databases.'
@pure hull what if i literally don't have a bank account
You won't be able to get a VPS.
what if you ask your parents
What is the common usecase of the topgg apis other than voting and server count?
basically that it is it.
ok cool
lol
I got my bank account when I was 11, had it for 3 yrs
well if i get a bank account how will i get muny and my parents won't give me either of those
that's why i love cryptocurrency
also how do i join message.author 's voice channel and play lol.ogg
memberVoiceChannel#join, probably this is good way to start around
const connection = await msg.member.voice.channel.join();
var dispatcher = connection.play('./lol.ogg', { type: 'opus' });
This code won't work for you
you gotta set a cooldown for a ||rick roll|| command
who cant afford a vps
bnBtIGluc3RhbGwgZGlzY29yZC5qcyBvcHVzc2NyaXB0
f what

<@&304313580025544704> someone leaked a token
????
-atmods @earnest phoenix
@earnest phoenix
Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.
Here are some examples of emergencies:
- Raids / Multiple members mass spamming.
- Severe disruption of Discord's ToS (NSFW content, etc)
- Anything that requires more than 2 moderators to handle.
you don't need more than one mod for this
it doesn't even look like a real token tho
DBL tokens are longer
base64
its base64
and you haven't even deleted your message
???
decoded the base64 string they sent
huh
npm i discord.js opusscript
hmm
his text was colored
but discord doesn't support the syntax
leave it
ok
you gotta listen to a qt
when you accidentally run two instances of npm
i hope nothing goes wrong
Hi!
I have my buffers
but i keep getting the same error
sec
I'll send it
0|index | Error: Invalid converter command
0|index | at new module.exports (/root/ModCord/node_modules/eris/lib/voice/streams/FFmpegPCMTransformer.js:7:15)
0|index | at Piper.encode (/root/ModCord/node_modules/eris/lib/voice/Piper.js:156:64)
0|index | at VoiceConnection.play (/root/ModCord/node_modules/eris/lib/voice/VoiceConnection.js:445:24)
0|index | at Object.module.exports.run (/root/ModCord/commands/fun/radio.js:30:31)
0|index | at processTicksAndRejections (internal/process/task_queues.js:97:5)
will i get copyright infringement if i download the first 30 seconds of never gonna give you up and use it
use it for what
no
no copyright infringement?
yay
REPL.IT HAS FRIKIN VSC INTELLISENSE FOR DISCORD.JS AAAAAAAAAAAA
How can i add async to this function? ```js
function getAll (bot, message) {
put async before the function
REPL.IT HAS FRIKIN VSC INTELLISENSE FOR DISCORD.JS AAAAAAAAAAAA
@earnest phoenix what???
did someone got an idea how to get all Documents where the ISO Date is >= Query ISO timestamo in mongoose (mongodb)?
doot doot response to lost
The rtc one https://alebot.is-inside.me/vwgp5i21.jpg
Thanks
Wait wrong quote
i dont think thats what he means
Fuk
superbrain
what u can do is, prob not the best way cuz idk how to do it properly, query any docs which dates are ISO date, and then make another query for documents which are ISO timestamps, and then if (ISO_DATE >= ISO_TIMESTAMP) { do ur stuff here }
@pure lion whars the websitee??
i mean
the website url
Which is why I set up a patreon
oh
I also want a custom domain name
So ye
I'll use LOC for now
Also does it have support for peerjs?
800 rubies
Oh?
is peerjs an npm package
But I can't run multiple consoles
wdym
I gotta set up the peer server on port X and the actual server on port Y
you can have up to 3000 processes
Oh cool
accord?
But the shit is in place already
no idea what ur talking about but oka
Yeah same tbh
@digital ibex found probably a way better method. query Aggregators are way more efficent
oh cool. my advanced mongodb knowledge is yes
LFG.find( {"$lt":[ "timestamp", time ]}); this should give me only Documents where the timestamp is greater than the supplied timestamp
oh cool
Who is aggregators and why is he efficient
An aggregate object is one which contains other objects.
it performs multiple operations and puts them into one result
and it doesnt work gg
;ldsjkkkkkkk
class XBoxClient:
def __init__(self, email, password):
self.total = 0
self.xbox = __import__('xbox')
self.requests = __import__('requests')
self.client = copy.deepcopy(self.xbox.client)
self.client.session = self.requests.session()
self.token = None
self.authenticate(email, password)
def authenticate(self, email, password):
try:
self.client.authenticate(email, password)
with print_lock:
self.total += 1
print('Authed ({}/{}) Accounts'.format((self.total), len(sessions)))
time.sleep(0.5)
self.token = self.client.AUTHORIZATION_HEADER
except (self.xbox.exceptions.AuthenticationException, JSONDecodeError, KeyError):
pass
except ConnectionError:
pass
self.authenticate(email, password)```
any idea why the ``self.total`` stays at 1? it should go up everytime an Auth is made but it stays at 1
does print('Authed ({}/{}) Accounts'.format((self.total), len(sessions))) get printed to the console?
make var I = 0 somewhere at the top
remove the = and keep the add, see if that works
and in your loop I++
++ doesn't exist in Python
ohh py.
self.total + 1 will only return a modified value, not increment self.total
remove the
=and keep the add, see if that works
@digital ibex therefor it stays at 0
no idea then, sorry :/
awesome
can u do += in py
Yes
yes
Hello guys
Yes
@slender thistle any idea on what the issue is?
use that?
it's what they're using
maybe if you read the code i posted you'd see that i am already using it.

Hey... I'm new in this server
BYCICLE PERSON
so no help? alright, thanks.
BYCICLE
can yall shitpost in #memes-and-media
@slender thistle kk
@patent geyser shitpost in #memes-and-media
@earnest phoenix have you tried printing self.total separately
@earnest phoenix have you tried printing
self.totalseparately
@slender thistle what exactly do you mean by that
do i have to encrypt literally everything
print(self.total) in the loop
because im storing user id and their balance whatever
actually, there's no loop
User ID isn't required to be encrypted, any user data is
do i add a loop?
the only thing ill store is the id, balance (money) and my custom badges
a for loop presumably iterating over whatever
Hi, I've got a readable stream for my Eris bot but it isn't playing anything
this is my prefix and for some reason its works only when it like this: & help and not &help
What's your code like
just sending your prefix isnt really heplping
^
a
forloop presumably iterating over whatever
@slender thistle im just gonna take that function out i literally dont understand
let response = await axios.get(api, {responseType: 'stream', adapter: httpAdapter});
let stream = response.data;
stream.on('data', async (buffer) => {
setTimeout(async () => {
await VoiceConnection.play(buffer.read(10))
}, 0.01 * 1000);
});
The buffers are complete btw
good to know. if you plan to use MongoDB and use the Atlas Free Tier you cant use $lt
i use localhost 😛
find() and .filter() 
@pine aspen you dont read the stream, you pipe it
Ok
Ah
VoiceConnection.play(stream)
are you sure the stream is in response.data?
0|index | Error: Invalid converter command
0|index | at new module.exports (/root/ModCord/node_modules/eris/lib/voice/streams/FFmpegPCMTransformer.js:7:15)
0|index | at Piper.encode (/root/ModCord/node_modules/eris/lib/voice/Piper.js:156:64)
0|index | at VoiceConnection.play (/root/ModCord/node_modules/eris/lib/voice/VoiceConnection.js:445:24)
0|index | at Object.module.exports.run (/root/ModCord/commands/fun/radio.js:23:17)
0|index | at processTicksAndRejections (internal/process/task_queues.js:97:5)
Well i get this now.
// let response = await axios.get(api, {responseType: 'stream', adapter: httpAdapter});
// let stream = response.data;
// stream.on('data', async (buffer) => {
// setTimeout(async () => {
// await VoiceConnection.play(buffer.read(10))
// }, 0.01 * 1000);
// });
}
I was doing this before
the correct way would be ```js
VoiceConnection.play(response.data)
note that the eris docs mention:
If playing from a non-opus resource, FFMPEG should be compiled with --enable-libopus for best performance. If playing from HTTPS, FFMPEG must be compiled with --enable-openssl
what kind of stream does your api output?
uhm i think its pcm
What's your code like
@slender thistle
@pine aspen make sure you have ffmpeg installed correctly
I think I don't have it installed correctly.
3 ifs
What would be the best way?
Merge into one ree
I just installed it with npm i --enable-libopus ffmpeg --save
the only thing ill store is the id, balance (money) and my custom badges
so this means there is no need to encrypt anything right
h moment
Arent most databases encrypted already?
yeah it works now
When Is My Bot Approved?
About 10 days have passed, but not confirmed
okey , sorry
this is my prefix and for some reason its works only when it like this: & help and not &help
read here 
this is my prefix and for some reason its works only when it like this: & help and not &help
the code:
&help doesnt exist, in this case, args[0] would be undefined because of how you're using it
what the actual fuck why so many dms
its working but i have to type & help and not &help
bots can read messages but can't send them
because & help is args[0] (help)
&help isnt being read, its like if args[-1] is a thing, it'd be that
args 0 should be &
i'll just foward him to the guides
he was asking the same stuff yesterday
if(!message.member.hasPermission("KICK_MEMBERS BAN_MEMBERS")) {
return;
}
``` i think there is something wrong with this? is there?
.hasPermission only accepts one permission
you'll have to do check both permissions separately
@slender thistle alrightys, is there any other way through
a custom function iterating over an iterable object checking for permissions
other than that, not any way I'm familiar with
aightys
docs might have something 
i'll just go with the first one
actually, now that i think about it
that might be the most overcomplicated shit ive said today
what would be the reason for this happening every couple minutes? (discord.js-light)
send bitfield data to commands and use a function to check lul
does my vds server give an error as windows operating system ?
it seems to just get disconnected every so often then login again
how to add bot?
-faq 1
almost bingo
What square you missing?
photo with cellphone
Shit
anyone can help me with downloading discord.py please
Guįz my ćødë dóesnt wœrk
1000 means that there was an unknown error rip not very helpful
i cannot use python thing in the commandprompt
'python' is not recognized as an internal or external command,
operable program or batch file.
pip
i got python installed
@sinful belfry i was checking Opcodes too, but check the type
pip enabled
its RPC
Did you add Python to PATH during installation
not gateway
'pip' is not recognized as an internal or external command,
operable program or batch file.
Did you add Python to PATH during installation
@slender thistle dont think so
@sinful belfry that 1000 event is only seen in RPC
reinstall :^)
need to delete everything and intall it again?
gateway nor json have those code status
i don't know how to do this please help
screenshare or somthing
something
i got the modify screen now
now what to do?
everything but "py launcher" is already enabled
@slender thistle
did you restart your pc after installing python?
can u run py
I don't remember having to restart my PC after installing Python
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
how the fuck is there a 3.8.5 already
what
Anyhow, use py -m pip install -U discord.py
so u run py not python
File "<stdin>", line 1
py -m pip
^
SyntaxError: invalid syntax
isnt it ctrl C?
it's a KeyboardInterrupt exception in Python interpreter
oh
or exit()
Should i use eris or discord.js? And what are the key differences?
yeah exit() works too 
Eris is better about ram usage
Should i use eris or discord.js? And what are the key differences?
@slow fable one does more for u
Ctrl+Z, press Enter, then enter py -m pip install -U discord.py
@slow fable discord.js = more features, more resources, eris = less features, less resources
or discord
@slow fablediscordis a weird fork of discord.py
which isn't even that, it's... just something that's not the actual package
it's a package with discord.py as a requirement for it
gateway nor json have those code status
@opal plank huh weird
@sinful belfry ikr
WARNING: The script chardetect.exe is installed in '-----------------------' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
meh ignore that
warning i dont care
ok
also, discord.js has a bigger community, better docs, extensive guides and its generally easier to use
eris has a smaller community, worse docs and its a bit harder to use
so it should work now?
then im sticking to discord.js
eris docs are ok
all i do is stackoverflow
stackoverflow is not a good place to learn these libraries lol
ik
idk how people say eris is harder
in pycharm it says "No module named discord"
Maybe your not using the right environment
xd
ive used both they are the same
when should i use const x = () => {
i do know eris collections are shit
map doesn't have filter
oh
how to make the the discord bot will work if i type the command with capital letters and with out capitals letters
.toLowerCase();
u can't .map() a map either
i think
i forgot what i added to my extended map class
Last question
Should i switch to linux?
.toLowerCase();
@slow fable you know how to make it so ill put that on top with the const and it will do that for every command?
no
😎 pieton expert
message.content = message.content.toLowerCase();
Last question
Should i switch to linux?
@slow fable desktop? yes, server? yes
oh
arch? i know how to setup
lmao
you think i don't know how to setup arch
its all in the docs
i just use ubuntu lol
if u don't want shit by default
ubuntu is shit from my experience
never had problems with it
ubuntu is bloated debian
is it fine to use the typing indicator like this?
.then on send
sending a message automatically cancels the typing indicator
oh ok
sending a message automatically cancels the typing indicator
@quartz kindle for some reasons it keeps going
generally typing indicators are weird af
ikr lmao
i use it for long processes
discord doesnt actually provide an endpoint to stop typing
@pale vessel extra dependencies 😩
so i better remove it from just a message function
would yall recommend sharp, canvas, or jimp
canvas
depends what for
^
I am trying to make my site's css (this is the css file so far:
body {
background-color: #2f3332;
margin: 0;
}
* {
font-family: Open Sans, Montserrat;
}```
) and it doesn't work to change the bg of the body and I'm confused as to why
Lmao I'ma make meh bot useless by removing all the commands
canvas
Fun
if you want simple invert, sepia, etc., use jimp
ill use it for welcome images and mostly adding text over member pfps
Someone made a ping bot
use canvas
that is, 121 commands
i'd go for canvas
what's the command for a dm i only know the message.channel.send but can't seem to find the dm option smh. i'm dumb ik
i want custom fonts so i use canvas
<user>.send()
Ok thanks guys
<user>.send()
@golden condor ty
author.send
Im gonna have fun
therefore <user>.send()
user is not defined
why when i make a get request then put it in a function, make it return the response text it doesnt work. but if i do a callback, it works
You gotta use your own <user> like message.author
const user = await someuser.getDMChannel();
user.send("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
```eris is great
lol okay
@slow fable if the response is made available inside a callback, you cannot return it as it is not synchronous
I am trying to make my site's css (this is the css file so far:
body {
background-color: #2f3332;
margin: 0;
}
* {
font-family: Open Sans, Montserrat;
}```
) and it doesn't work to change the bg of the body and I'm confused as to why
you'd need to use a promise variant that supports async/await syntax, or promisify it yourself
oh ok thanks
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/739453729949876244 anyone have any idea why shard connections to the websocket are being closed? (using discord.js-light)
const user = await client.getDMChannel(userID);
client.createMessage(user.id, 'ur mom');
Alright thats it im switching to eris
noice
anyways
Anyone know why repl.it says {Promise: pending} when i start my bot? i didn't add any console.logs
idk
maybe repl.it makes a promise that resolves when the bot has started or something
oh
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/739462709963128843 also getting a ton of 'GUILD_MEMBERS_TIMEOUT' errors (may be unrelated tho)
somewhere in ur code you're not properly handling the promise, its still pending
@sinful belfry code 1000 doesnt have a clear reason for why it happened, its basically a general network error
ah ok
ill give that a go, thanks
also with the 'GUILD_MEMBERS_TIMEOUT' error i get when the client logs in, is there anything that i can do about that?
are you using fetchAllMembers?
eris is great
but uih still dont do it like dat
@digital ibex that's the only way to do it
yup, i am
with intents?
yeah
do you have the GUILD_MEMBERS intent?
hmm, could be a network issue, but let me check that the fetchAll is working properly
S
nope, the same thing seems to be happening on a different host
both the members timeout thing as well as the shard being disconnected from the websocket with the 1000 code
@golden condor there is no send method
I meant createMessage lol
[WS => Shard 0] [CLOSE]
Event Code: 1000
Clean : true
Reason : No reason received
[WS => Shard 0] Clearing the heartbeat interval.
[WS => Shard 0] WS State: CLOSED
[WS => Shard 0] Tried to send packet '{"op":3,"d":{"afk":false,"since":null,"status":"online","game":{"type":0,"name":"-invite"}}}' but no WebSocket is available!
[WS => Shard 0] [DESTROY]
Close Code : 1000
Reset : false
Emit DESTROYED: true
[WS => Shard 0] Shard was destroyed but no WebSocket connection was present! Reconnecting...
``` this is the full log im getting
oh
yeah
im pretty sure that would be a d.js issue if you're receiving raw data
not sure though
Leveldown: keeps giving npm errors
Me: uses levelup
My dependencies: 
^
Pretty sure I have a few dependencies that I forgot to delete
I dont remember the best way to deal with that
yeah
i keep those because my bot is weird
occasionally come in handy
you never know
user.send(`Heya ${user.username}, the command you just tried to use is limited only to Administrators and Moderators of the server! You tried the $setwelcome commad at ${}```
how do i make it so it shows in which server the command was used
is RPC considered a bot
thats weird starman 🤔
it recieves the payload but cant connect :thonknirgbefwVgferv:
is RPC considered a bot

no
ok
Tonkku will give us the thonk if we talk off topic
@slender wagon guild.name
ty!
did someone has an idea why this wont work? MongoError: Unrecognized pipeline stage name: '$lt' LFG.find({ createdAt: {$gte: time} }); I use Mongoose
it says lt but with gte i get the same error
One has a better name
there is actually a difference. Mongoose is a little bit slower but mostly due to the data validation
HELPUP
speak!
Traceback (most recent call last):
File "C:---------PycharmProjects/app/venv/bot.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
did you install discord py
@solemn latch idk if you use MongoDB but i found the issue
I dont
please help me
well then
@slim tundra no need to spam or keeping saying 'help me'
😦
just be patient, if someone can answer your question then they will
but i am not rly patient
how do i bold a message XD i totally forgot smh
you need to be
wha
*bold*
BOLD
b o l d
smh
@sinful belfry qt
** B I G B O L D**
i mean in d.js
Wait wrong channel (still qt tho)
this takes much time
@slender wagon just pass it to the message ````${value}` ``` will make the value Bold
yep
noticed
ty
const sChannel = message.guild.channels.cache.find(channel => channel.name === "suggestions");
if(!sChannel) {
return message.channel.send("You don't have a channel with name `suggestions`")
}
// send to reports channel and add tick or cross
message.channel.send("Your suggestion has been submitted.")
const suggestembed = new Discord.MessageEmbed()
.setFooter("Yes or not?. it's your choice")
.setTimestamp()
.setTitle(`Suggested by:\n${message.author.tag}`)
.setThumbnail(`${message.author.avatarURL({format: 'png', dynamic: true})}`)
.setDescription(`**Suggestion**:\n${args}`)
.setColor('RANDOM');
sChannel.send(suggestembed).then(async msg => {
await msg.react("✅");
await msg.react("❌");
});
}
}
it works but the problem is that it gets spaces as a ,
you need to join the arguments by a delimiter
like .join(" ")
assuming args is an array
oh
(`Kicked ${target} with the reason ${args[1]} (${target.id})`)
``` it only shows the first word
?
args[1] means only the first element in the array args
so i can add any number?
well if you did args[2] then the reason would just be 'hot'
ohh
you need to put them together with a space between
(so you'll likely have to remove the first element from 'args' once you've finished with it)
so args[1 2]
oh okay
then you can do args.join(" "); to join the args with a space between each element in the array
ty!
his command handler already splits the arguments apart he just need to remove the first item from the args array and join the rest with space
/\s+/```
ohhh i fixed it now
@sinful belfry im still investigating, it seems there is an issue with fetching all members
ah ok thanks
const reason = args.join(" ");
let embed = new discord.MessageEmbed()
.setTitle(`Action: Kick`)
.setDescription(`Kicked ${target} with the reason ${reason} (${target.id})`)
.setColor("#ff2050")
.setFooter(`Kicked by ${message.author.username}`);
``` now the only problem is that it also pings the user that got kicked
would that be related to the websocket disconnect issue in any way? i still get disconnected with the 1000 code even when i change hosts (so i don't think it would be a network issue on my end but idk lol)
Woaw
@slender wagon use the member tag
also you dont remove the mentioned user (args[0]) from your args array this is why you get 2x the mention
@sinful belfry not sure, im not getting any disconnections on my end, even with the issue
oh ok
i've contacted discord about it too, so i'll see what they say about the 1000 error code
@sinful belfry that's a cloudflare code
oh really?
Yeah
You get 1001 when the websocket is forced to restart
But I've never seen 1000 before
yeah ig it could be a cloudflare issue because i can't find anything in discord's docs about it either
I found a github issue about it
npm ERR! code EINVAL npm ERR! EINVAL: invalid argument, read thanks npm
what
It's a clean disconnect
almost had a bingo
How to make shard?
To prevent/fix inorganically growth should I do this?
Object to JSON, filter the json to grab 4+ duplicates and kick my bot from that servers
yeah ig it could be a cloudflare issue because i can't find anything in discord's docs about it either
@sinful belfry https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes
unknown error
@ionic dawn dont add the Bot to Vote pages. its possible that you gain a few hundred Guilds in a day or two
Hm?
Inorginical growth can either be guilds that seem to be your own or just your bot suddenly joining many guilds in a short period of time
should windows-build-tools be installed with -g?
so im pretty sure its a problem with d.js, cant think of anything else
Yes
k
Otherwise it would work
I talked to the discord support via mail, they said I have to make any kind of script to kick my bot from those same owner.id guilds
They sended another mail cause I reached 101 and require the verify
you can get the guilds as a map and then just filter duplicates. then Leave the guilds with the duplicated owner
have this running once a day i guess and you have the script you want
Guys how do I make a command that will tell me the ram my bot use?
language?
ram usage is process.memoryUsage().heapUsed/1024/1024 iirc
Mkay I'll try this
Thanks @lusty quest
Oh
wait lemme ccheck
Everything like what you wrote Lumap?
Google: DiscordJS memory usage display
I probably won't understand xd
heap not only includes the usage by node it also takes stuff stored into the ram with into account
Console.log what
process.memoryUsage().heapUsed / 1024 / 1024;
Does Bootstrap utilize jQuery?
Yes
Wait
Where am I supposed to put that ._.
xd I am starting in js
I can't understand what you sent
you shouldn't be using jquery
That's why I'm asking
@sinful belfry https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes
@digital ibex is RPC to do with the websocket?
oh
It does use jQuery
Can I use normal frontend JS and ignore Bootstrap's jQuery
Lol @jolly wave
process.memoryUsage()
Wrong mention
its how you're connecting to the websoocket, so yeah
ooooof
and the credentials you provide etc
read Rule 7A again
Mate @jolly wave, they send the script like 5 times
oof
Just send that via msg.chn.send
lmao
Your name wasn't taggable
Not readable name
Resend the script again xd

Just scroll up

oof am lost
K
let's just watch a tutorial on yt
Hf
anyways hello gamers... im having a small issue with something. anyone know how can i send muted to my api using raw html?
Wheres the bingo sheet
How to save old data from api and write it in embed?
@viral iris you save it in a variable BRUH
and mention the variable in the embed
you need to update the variable data every time tho
wut
Every update should I update the var 2?
E
what is the var 2?
Yeah
Can someone tell me the complete script so when I say freaking ?ram it tell me the ram usage? :/
no
e
Because the embed will still display the old value of the variable
Can someone tell me the complete script so when I say freaking ?ram it tell me the ram usage? :/
@jolly wave why do you want the whole script
From us
We won't spoonfeed
@jolly wave you have tutorials and scripts at google
ooooof
@solemn latch are you doing #Im a developer bingo?
@earnest phoenix is there a way to make the data var then update it and write it like -~old data~~ -> New data
In a dev chat you should know atleast to make your own stuff and ask for errors or any tip
e
No, I have been out of town @torn ravine I just happened to be here
lol
They sended you the thing a few times and keep asking for it
@earnest phoenix is there a way to make the data var then update it and write it like -~old data~~ ->
New data
@viral iris first set the old stuff of the variable to a new variable then update the old one but the new one won't update so the new is the old and the updated one is the new one
because I can't understand what they send e
Brain.exe has crashed probably
message.channel.send(The thing they send);


