#development
1 messages · Page 1446 of 1
and none are using pm2?
if you are using pm2 to manage multiple process, then yeah just get data from pm2
but i can switch over
im only running python on pm2
so if theyres any python ones
but i need to be able to get the data
"Advanced process manager for production Node.js applications." 🤔
it works with python
ig
code is easier than command line
welp
I implemented it but it doesn't work neither thow any errors
can i get the proccess stats from it?
you probably could but i mean you already got pm2 working
i just told you
like how can i get the response?
you execute commands
exec pm2 jlist
how
Python is a wonderful language for scripting and automating workflows and it is packed with useful tools out of the box with the Python Standard Library. A common thing to do, especially for a sysadmin, is to execute shell commands. But what usually will end up in a bash or batch file, can be also done in Python. You’ll learn here how to do just...
idk
wait
thats not valid python
import os
stream = os.popen('pm2 jlist')
output = stream.read()
print(output)
^
from the same thing that tim sent
yes
you read the stdout it returns
import subprocess
process = subprocess.Popen(['pm2', 'jlist'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
stdout, stderr
from the same article that tim sent
lol
you need to code that inside you python script
yeah
wherever you need to get that data
yes
calling python variables vars 😭
things*
whatever man
errors go to stderr
o ok
thats fine with me
does python have multiple variable types?
no
no
ik
tim and cloud, u 2 are fucking wizards
its just weird tho
go away demon
var is pretty much universal
ik but whenever i see it
^
i just think of JS
well then ur problemo
because im uncultured
xD
VARS IS FINE I TAKE IT BACK
just call them "iable"
alr
i have a iable problem
this iable called cloudfox is == "Dumbdumb" but it says its dummerdummer
your iable is undefined
ok im calling the mods and reporting you for cyberbullying
aTmodS
.js
can i pull a specific var from a file?
and how would i import it if the file is in a folder "Above" it
so like
import file
print(file.var)
you could just use a . before the name of the file
import .file
print(file.var)
ty
hey guys
so i found that if you disconnect your bot manually from vc it doesnt join back
any fixes?
well it won't reconnect unless you tell it to
U need to replace the ids with whatever schema you’re using, read mongoose docs if u don’t know what a schema is lol
My guess is ur using the wrong schema
what library and what are you using to join the vc in the first place
that is a library
ye just that basic no additional lib like discord-player
yup the voice connection class has a disconnect event
you will also receive a voiceStateUpdate event
that also but it would probably be more predictable to do it the docs way
yeah i saw the docs, but im confused as to where to use it. like can i use this in my music actions file? or should i do it globally?
something like
wherever you create your connection
ah
for example ```js
connection.play("bla");
connection.on("disconnect", () => {
// handle disconnection procedures
})
console.log(Util.parseEmoji(ax[0].trim()).id)
console.log(isUrl(ax[1].trim()))
if (Util.parseEmoji(ax[0].trim()).id != null && isUrl(ax[1].trim()) === true) {
console.log("hi")
}
but it doesn't write hi to the console? What is the reason? I do not understand
ye didnt work
the connection still exists
even after i delete the whole queue obj
if i have a list of dicts, how would i like use a key to find the response like to find the other part
like joe:mama
key = joe
would a change in boosts trigger a guildUpdate event?
i have a json that is 2 dicts, how can i get like the dict from having one argument
like the dicts have for example: name:joe
so if i try to find name:joe
if gives me the entire dict
I wanna give up on making bots on my iPad..... I can nothing I’m a loser
in which language
python
oof, wouldn't know in py
try a computer?
well shit I was about to write one in js
but u know what i mean?
yeah i understand
like basically i did pm2 jlist
which returns a json with the proccesses
and like they have a lot of things
but i have the na,e
ill try to write a function for you brb
@drifting wedge if I had one
uhhh
i mean ipad isnt too bad
testing is a pain prob
but like if u can run it
u should def try and continue
I can do nothing I can’t code I can nothing
I can just use prebuilt apps...
To make a bot
Hm, so how can I program in iPad?
if u have a app to run it
It’s just a prebuilt one I learn nothing...
watch yt lmao
what lang?
Idk if it’s an Lang but it’s for me kinda BDFD
WAIT REALLY?
ide's
DM ME DM ME DME ME!
pyto - python3
i fixed it thxs it worked!!
one i found
python wtf is an app?
no
like its a python IDE
uhh how old r u?
like most 13+ yr olds have laptops
wait
Found it it has 1 rating ALol
Nope I’m not lol
Turning 14 in February 21th
u dont have a laptop?
My dad said I’ll get a computer
Well a 20 year old if you want LOL
it works ig
Ye..
better than an ipad i rekon
where to host my discord bot?
rent a cheap vps
jay rizuri is typing
def find_dict(list):
cd = 0
for d in list:
cd = cd + 1
break if "key" in d.keys()
return cd
@drifting wedge so this is what I see
@drifting wedge it says “hello world”
What do I do lol?
oh oops I meant cd
run it!
So I what do I do?
run it
What do I write there?
where can I host my bot for free?
ok lemme give u a rundown
heroku
ty
u have a couple datatypes
bools, strings, integerns, and floats
integers*
bools are True or False
Remember the old days when Heruko had 24/7 free hosting time
strings are text with "" so like "Hello World"
they still do
Free?
yes
Damn
Uh, ye
So, what would I use print for?
Hm alr.
you're welcome bro 🙂
Like copy n paste?
look put this in
Alr.
coolkid = "Joe" # string
print(coolkid)```
now send console
Hello, world!
Joe
there we go
?
with?
Coding the bot......
With the bot coding
not learning pythn before is like shootning urself in the foot
but thats how i started
so i cant complain
In this video, we go over how to setup a discord bot in python using discord.py v1.0.1 (rewrite).
If you have any suggestions for future videos, leave it in the comments below.
GITHUB: https://github.com/Rapptz/discord.py
DOCUMENTATION: https://discordpy.readthedocs.io/en/latest/
OFFICIAL DISCORD.PY SERVER: https://discord.gg/r3sSKJJ
JOIN MY ...
figure out how to download livs
libs
Thanks babe
lol jk



Ok ok sorry lol ima start thanks
@drifting wedge delete it before SOMONE sees it
Someone
The link
why?
I don’t think it’s allowed
Alr, ima just start watching the vid and interrupt you if I need some help
His pc tf
@drifting wedge his pc man...
I can do nothing what his doing since I’m mobile...
How?
pip install lib
no fixes ?
Lemme try
for the bot manual dc issue
Nope @drifting wedge is it a website?
no
uhh
An app?
i want to like get the dict using the key
so like if "name":"joe"
i use that dict
ohhhh
does anyone know any promo codes for the bot by chance?
liberary
wat
someone help ;-;
@drifting wedge ;-; I’m confused
Idek what it is
yea same lmao
Lol
its a website im making
SANTA CLAUS?
it's a bit inconsistent
can u give me good stuff for christmas
def find_dict(list, key):
cd = 0
for d in list:
cd = cd + 1
break if d.name == "key"
return cd
what parts?
i mean its a bot admin only page
i cri
so its not that important
@drifting wedge uh what do I do? It’s all pc
stats has more attention than the title
way better
and the "disconnect" event is not triggered
I'm busy man
The look is nice, but I don't like the name: value going around.
Can anyone explain libs to this man
Wat?
This.
Oh
I mean it's for devs only
Like bot admins only
So not tooooooo important
But trying to make it not shit
I don't mind the stats, but I feel name: value just looks boring. Like, it could also look like this:
Title
Text here
On paper, it doesn't look like much, but if you give it a background tint, Title as bold and the text a little bit intended, it could maybe look better. At the same time, it's preference (and may be me being picky) and name: value is not the end of the world.
how do i add an embed to my sites link
i wanna try
@quartz kindle give command
@quartz kindle UHHHHH https://cdn.yxridev.com/u/sHYb6Z1T.png
ok
then
how would you use the result from that query?
in a function which i didnt add
does your eval support async?
tim ive seen ur bot
cool
what hardware does it have?
1gb ram 1 core 15gb ssd
its indexed
pro Tim
dict has no name attribute
oh oops
def find_dict(list, key):
cd = 0
for d in list:
cd = cd + 1
break if d["name"] == "key"
return cd
sorry I haven't used python in 2 years lol
hey guys
umm
when you dc the bot manually it doenst join back
the disconnect even isnt triggered
..
lmao i appreciate it
yeah
wat lib?
discordjs
legit tysm
the "disconnect" event doesnt occur
disconnect event?
im py
connection.on("disconnect")
yes please
wait it just returns 1
const dispatcher = serverQueue.connection
.play(ytdl(song.url))
.on("finish", () => {
if (serverQueue.loop) {
serverQueue.songs.push(serverQueue.songs[0]);
// serverQueue.songs.shift();
}
serverQueue.songs.shift();
play(guild, serverQueue.songs[0], message);
})
.on("error", (err) => {
console.log(err);
logger.error(err.stack);
return;
})
.on("disconnect", () => {
queue.delete(guild);
return;
});```
oh
here
its the position?
if i have a dict pos, can i get whats in that position?
.play() returns a dispatcher, so you cannot chain it
you are essentially doing dispatcher.on("disconnect")
instead of connection
exactly
ye
- i dont want to work at google
- you'd be surprised with just how good people who work at google are
you're like the person the google employees go for help
lmao
doc reading skills +100
there are plenty of people much better than me, im not anything special, im just good at reading docs
dict.values()[index]
yes
like i have a json dict
dict.values() puts the values into a list
just like Object.values()
yes, but the order is not guaranteed
every time you use .values() there is no guarantee that index X will be the same item again
^
i have acheived orbit in KSP!
with my 4 stage spagetti rocket
it blew up 😦
@ancient thunder
wait tho
the "dict"
is like list1 = [{dict stuff},{otherdict}]
uhh also
the list is originaly has like false instead of False
so what can i do?
@quartz kindle if u r available
what are you trying to do
alright I somehow just added a python eval command to my js bot so I can test it
lmao
Theres a ton of web apis for that type of stuff
also u could probably just use the python cmd to do it
whats the point tho
i don't know
lmao
I just felt like it
ok have fun
thats not a dict, thats a list of dicts
is there anyway to use emoji inside code block?
😩
woah it's possible
📻
📻
it's different
Hello,anyone know how to jcheck if a user is using a font anywhere in their username?
if you reply @ me if you may
One message removed from a suspended account.
One message removed from a suspended account.
everything is the same font
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
how to make streaming status?
@clever vector read library docs
nah
Dicts aren't sorted
There is a collections.OrderedDict
Aye
True
Every lang has good logging
...except C/C++, they can go to hell
python has 0 logging unless you either use the logging module or print statements
C logger be like:
"You have an error in address 0x01728511"
Print is great man
indeed
Python imo is legit the best
Like it's easy to understand
Easy to learn
Similar to English
Makes sense
Nah, java logger is hard to outmatch
You can get really far
I love python but in some areas it's really just not suitable
Ie?
Like threading
Front end web
Games
yes front end web
C# is unity
Sanic

Goin' Fast @ 127.0.0.1

Who else installed Ubuntu bash in windows?
me whos never even tried linux
https://i.imgur.com/X3DFgAg.png for 2 days or longer I haven't been able to figure out why the top one works, turns out it's the apostrophe but escaping it normally doesn't work 
i was gonna switch
then i learnt how many apps i would have to give up to switch
and just said no
Yeah, that's the main issue
Linux bash is goddamn satisfying to use
Bash script is easy af to automate most stuff
Windows scripts are...well...anything but script
Its syntax is gross, coarse and way worse than assembly
yea....
Like, what kind of lang doesn't allow c = a + b?
tbh i think command prompt is just a whole mess
In batch you gotta make a hella long command to add one variable to other
set FLASK_APP=file.py
will work
------------------------
set FLASK_APP= file.py
------------------------
error```

Not py, batch
both
doubt intensifies
im not saying py isnt good
im saying py indentation is absolutely insane inducing and uncessary to be forced
Well
I can read my nested loops so I'm good 
This is a simple sum in batch
A sum of two variables
When my laptop doesn't die every 5 minutes
zen of python say no

i will bring you to the dark side, dun worreh
the dark side?
I can just import this

I'll move there myself one day
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!``` @slender thistle

im just gonna slip myself in here
uwu
Im trying to make a sort of command that runs when someone says something specific, i got the running part but i cant figure out how to ban the message author. Any ideas, ive tried the traditional ban command but with message.author instead of message.mentions.first() and it did not seem to work. This is my code rn, its probably not right as it is just the code ive been trial and erroring on for the past hr.
const args = message.content.substring(config.prefix.length).split(" ");
let ar = args.slice(0).join(" ");
let ar2 = args[0] + ar;
var msg1 = ar2.toLowerCase();
const us = `<@${message.author.id}>`
const user = message.author;
const mem = message.guild.member(us)
if(msg1.includes('pineapples')){
await user.send('Banned from LCSN.')
await mem.ban({reason: `Saying: ${message}`})
}
```Discord.js
Flat is better [...]
Mhm
look at that mess
this is some weird development
my god
yea, well me
my language is real amazing
i thought language beef is prohibited
i was talking about how amazing js is
and im gone
👎
implicity saves code and memory
simple doesnt do enough of the job, sometimes you need complex solutions for complex/simple problems
nested is better than flat
sparse is also worse than dense depending on the case, redability is sparse, efficiency is dense
readability only counts when someone needs to look at the code, as long as it does the job, its fine
special cases are enough to break some rules
errors can be logged silently, as long as you're aware of them and their purpose, specially when interacting with other peoples code
too lazy to refute the rest

hold up lemme make that guys command in py
@bot.event
async def on_message(message):
if message.author.bot:
return None
bad = ["pineapples"]
if bad in message.content:
await message.author.send("Banned from server")
await message.author.ban(reason="Saying pineapples")
else:
return None```
done
oh .includes, assuming thats anywhere in the message
much better
let role2 = message.guild.roles.cache.find(role => role.name === `Ticket User`);
if(!role2) message.guild.roles.create({ data: { name: 'Ticket User', color: ('RANDOM')} });
let member = message.author;
member.roles.add(role2);

Isn't it supposed to be message.member
Can't you just use member.addRole(YourRole).catch()
its valid
me eval it
and it worked fine
like the whole command
message.member returned a Member version of the message author
dis
i fixed it loLz
backto cooking smh
x
Exactly where you belong
wow
oh my

hi
i made fried unions rice steak strips and lettuce
with a bottle of sachi and mild depression
Who knows BASIC?
Proof
also DMs, this isn't #moons-kitchen

Use DMs or I'll send nukes upon you
Anyone know how to fix
bot.on('message', function(message){
if (message.mention.user.first() === bot.user) (
message.channel.send('Hello, do -help for more info.')
)
})
Get a error when I mention the bot
What's the error?
/home/container/index.js:14
if (message.mention.user.first() === bot.user) (
TypeError: Cannot read property 'user' of undefined
at Client.<anonymous> (/home/container/index.js:14:25)
at Client.emit (events.js:326:22)
at MessageCreateHandler.handle (/home/container/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/home/container/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:108:65)
at WebSocketConnection.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:336:35)
at WebSocketConnection.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:299:17)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:314:20)
Do you know how to fix ?
Isn't it mentions and users? I don't use d.js though
message.mentions.users
Plural
Because there can be multiple mentions, therefore multiple users
So what should I do?
Isn't that obvious enough 
No I am new to coding
@earnest phoenix
What you should do is not to use non-existing attributes I suppose.
I don't really know how js works though, I just assume if the attribute doesn't exist or have no value it'll return undefined
Is common sense not taught nowadays
See this
And guess what you should replace in your snippet
the wgole thing
Not the whole thing
You definitely need your message event and the function you attach
You just need to look at your condition
And refer to my messages
How Do i make this a embed?
bot.on('message', function(message){
if (message.mentions.users.first() === bot.user) (
message.channel.send('Hello, do -help for more info.')
)
})
the guide also contains other stuff that is helpfull
is how to use google not taught nowadays?
whats problem here ? div.footer{ position: fixed; left: 0; bottom: 0; width: 100%; background-color: #1b1b1b; color: white; text-align: center; z-index: -1; } <div clas="footer"> <p>Author: Hege Refsnes</p> </div>
Problem at https://tesladev.glitch.me/commands
pls ping me if you can help me
open website in desktop mode to see whats wrong
@earnest phoenix clas
someone already helped me.. anyways ty
Just use js const { key } = await fetch("https://hastebin.com/documents", { method: "POST", body: code }).then(x => x.json());and put the rest of your code outside

So you want to check for errors?```js
const res = await fetch("https://hastebin.com/documents", {
method: "POST",
body: code
});
if (!res.ok) return; // error embed
const { key } = await res.json();
// send URL```
You're making it complicated
Yeah
This was the weird part
also, you don't need an else
Since you already return here
If the code continues then it means that the response was OK
Remove lang, you don't need it
Never mind, I'm stupid
you need it for syntax highlighting ig
👌
It didn’t work...
None
You can host the bot yourself up to 2.5K
That’s what I have been told by almost everyone
Well, if you want to get ahead of the curve, it really all depends on how fast your bot is growing
https://sourceb.in/iVowHPzwK7
Basic Javascript : It's removing all the elements in the array
how to fix/ get help?
I want it to remove only based on the msg I sent
wdym
it's an object, time is what time I have to dm the user their msg. Id is just their user id
yes
once i have sent them their msg I wanna remove that object from the array if that make sense 
first I would have to use a setInterval
second that's not what I asked ;-;
Can you clarify what you want ?
Yes
hey guys, so umm.. whem my bot is playing some music and then i send an embed with some chunk of data its lagging the music player
all the computatiosn are fast enough
but when multiple threads are running why does it interrupt ?
for (var i=0; i < myArray.length; i++) {
if (myArray[i].time <= Date.now()) {
let user = await client.users.fetch(myArray[i].id)
user.send(myArray[i].msg)
myArray.splice(myArray.findIndex(arr => arr.msg == myArray[i].msg));
}
now sending the user msg works, but I want to get rid of that object in the array
when multiple users are using my bot its lagging
but the computations on my server are fast
for attempt solution I don't have much to say
is that better
2cpu 8GB RAM, service is utilizing 5GB RAM on max
its actually a cloud service (gcp)
so i'd say its pretty fast?
it only happens while sending embeds
discordjs
vanilla music player no other music player libs like discord-player
ytdl
ye
yeah
to get the music
YTSearcher
ytdl-core
im filtering it to only audio
i see
but music apart if 5 6 people are using my bot the embed lags as well
what do you recommend?
haha never done that
That's torture
ye could be an edge case scenario im not validating
help me
expect this stuff. got someone DDosing my bot with an command that accesses an external API
he constructed a request that caused the API to return a few million results
the bot ended up with over 10 minutes of delay
yea bcs its busy downloading videos
This is what my typical embed would look like
Is it Glitch ?
do what Alex recomended
iirc lavalink also requires that you run a lavalink instance
it says optional
the js package is only a client iirc. you need something to handle the requests. and i dont think you will find many open instances you could use
can you elaborate?
could i run this instance on my gcp server itself tho?
i tried discord-player but it was dead
they deleted ytdl repo which was failing to npm install
im open to learning new stuff 😄
lavalink is a piece of software that is written in java that will handle the streaming of the yt stuff.
the NPM package Alex send in is a client to access the lavalink server you usually have to host yourself
so i basically need to host a lavalink server on my gcp?
its usually nothing hard to do on a proper VPS
i'll check out some tutorials
what about the embeds lagging when multiple users are using the bot
like thats a scalability issue but i have a good VM
the embeds lag bcs the bot is busy downloading stuff
For lavalink I suggest https://npmjs.com/erela.js
yep but those computations are logging very fast on the server
like i can see the data being loaded fast
did you run something async?
let chan = message.guild.channels.cache.find(channel => channel.name === `ticket-${message.author.username}`);
chan.delete();
why does it keep coming back as undefined
while sending the embed?
in the command / event that sends the embed
unless i gotta like ```js
ticket- + message.author.username
async causes the bot to wait with the next step until the asnyc step is done
this can cause that some stuff is "laggy"
yep thats where the data is pulled from my db for the computations
but thats happening instantly
the sending in the embed is where it lags
did you render stuff for the embeds?
this is what causes the "lags"
[{ time: x, msg: text, id: x },
{
time: '1607764119284',
msg: "some other bunch of text okay",
id: '298588307368050698'
}]
for (var i=0; i < myArray.length; i++) {
if (myArray[i].time <= Date.now()) {
let user = await client.users.fetch(myArray[i].id)
user.send(myArray[i].msg)
myArray.splice(myArray.findIndex(arr => arr.msg == myArray[i].msg));
}
}
This is removing the whole array, like absolutely deleting every object in the array. How can I get it so it only removes the object that has the message that I just send.
that looks like an array to me 🤔
thats an object.
inside an array 🤔
ok thx 
yeah it wouldn't work though I gotta findIndex that is same as the msg i send
first you use an array, then a map?
but message id seems a good idea
^^
use Redis
what does that mean
you can set a TTL and it got a event that fires if a entry expires
TTL?
time to life
oh
i see, but I rather not move to it for one command
myArray.splice(myArray.findIndex(arr => arr.msg == myArray[i].msg)); can you spot some issue in this line?
you dont need to
its not a full blown database like MongoDB or Mysql. its more for persistent temporary stuff
i see
@lusty quest how do you delete a channel
what is message.content
uh
what version are you using
version
not lib
discord.js smh
discord.js v11 ect
v11 is the version
alr 1
message.createdAt should just be .setTimestamp()
i have a bot system .._..
from what im seeing, yes it did? silver coins is clearly in a new line
Not the way I wanted. Shiv fixed it though
message.channel
.fetchMessages({
limit: 100 \\fetches 100 messages
})```
ect
and find a way to add message to it
message =looks like you defining message as that so you can have it filter messages ig
your code looks like a mix between djsv12 and v11
which is whyi asked
first
i dont think you coded it right
if quote is fetching messages why is everything else have quote on it
second msg should be message if its djs v12 and higher
you have inconsistencies in your code
which is why i said your going between djs v12 and v11
you dont need the .send({embed}); just .send(embed) ect
quote.createdAt shouldn't be there
actually most of the stuff with quote shouldn't be there
you asked the same thing yesterday, tinte
helllouu
hruuu
tired, i have a meeting but im so exhausted
@earnest phoenix y u still whitename u got no botum in q?
i dont do public bot deving anymore :p
pointless
@earnest phoenix I made h bot which is completely pointless so i can be greenname and flex on my friends
@earnest phoenix excuse me this.client.embed???
the coding is stupid af
[{ time: x, msg: text, id: x },
{
time: '1607764119284',
msg: "some other bunch of text okay",
id: '298588307368050698'
}]
for (var i=0; i < myArray.length; i++) {
if (myArray[i].time <= Date.now()) {
let user = await client.users.fetch(myArray[i].id)
user.send(myArray[i].msg)
myArray.splice(myArray.findIndex(arr => arr.msg == myArray[i].msg));
}
}
This is removing the whole array, like absolutely deleting every object in the array. How can I get it so it only removes the object that has the message that I just send or the one that triggered the if statement
If you want hosting I can I hosted my first customer bot
it supports async
I have a question as I am new to MongoDB. If I want to create a new way into storing data, do I just make a whole other type of model with a different name?
Example I have a model called economy, for economy commands, do I make a whole other model for like social commands (example)?
time is always going to be smaller than Date.now()
unless you set the time variable to future dates
Example.
This is my economy model schema.
// It is currently called data.js
const mongoose = require("mongoose");
const dataSchema = mongoose.Schema({
name: String,
userID: String,
lb: String,
money: Number,
bank: Number,
daily: Number,
weekly: Number,
beg: Number,
work: Number,
})
module.exports = mongoose.model("Data", dataSchema);
If I want to do same for another category called social. Should it be like this?
// This will be called social.js
const mongoose = require("mongoose");
const socialSchema = mongoose.Schema({
name: String,
userID: String,
bio: String,
})
module.exports = mongoose.model("Social", socialSchema);
Please do let me know if you have an answer, this is regarding MongoDB as well! 😉
I have been stuck on removing an object from array for hours how pathetic is that
@stark abyss .splice(index, 1)
you forgot the second parameter
the number of items to remove
a string that you put in the auth section
oh wait i thought its discord webhooks...
alright then
what should i put in the URL?
i'm confused, sorry
where is your bot hosted?
Why am I getting this error at random times.
EAI_AGAIN is a DNS lookup timed out error, means it is a network connectivity error or proxy related error.
fetch the channel into a variable then call the .delete() function on it
const filter = m => m.content.includes('+');
const collector = message.channel.createMessageCollector(filter, { time: 15000 });```this message.channel is undefined. But i cannot really define channel as it is handled through dm?
does it error out with channel undefined?
it errors cannot read createMessageCollector of undefined
i had it get a channel by the name and delete it
but it said
delete of undefined
validate that the channel exist





