#development
1 messages Ā· Page 1819 of 1
Discord.js wants to be more user friendly ig
not like they aren't already
lmfao
im not even bothering updating djsl for like 3 weeks now
same but I accidently did today
I would honestly understand why would people never want to update to v13
they removed a bunch of user friendly stuff tho
Indeed
like what?
In an attempt to be more user friendly
they made it abnoxious
and unfriendly
I still would use it though cause I can't be bothered learning something new with the discord api
Shortcuts, user-friendly getters, a lot of breaking changes, stricter validation
Im sorta done with it
Not to mention snowflakes being changed to stringified bigints
smh
should of left it as a string
made life a whole of a lot easier
They didn't change snowflakes from strings to bigints
just use nostrum
They only changed bitfields to be bigints
ez good discord lib
They changed the type to be a stringified bigint
They legit did
They did, but the behavior was never changed
it breaks in some specific usecases
dont use ts then
Says the type is not the same as a string
:^)
yeah it's a breaking change
v13 is still in heavy development anyway, dont bother using it
lot more things will break
You shouldn't start moving to it unless its offically released
I used v13 cause why not
you can't pass a string into a bigint so it breaks a bunch of shit
alright so I just wont upgrade to it š
if you change all snowflake parameters to use ${bigint} it doesn't break but you can't opt into that so it's a breaking change
I'd ditch discord.js before I ditch prisma holy shit it's amazing
v13 just gets a breaking change every weak 
isn't the bigint thing in v12 too
I like prisma but at the same time i don't
nope
I don't like not being able to use custom types
custom types? like what
With typeorm I could define the row type to be a string and then give it the type of Snowflake
so it saves as a string
No problems at all
Welp
I forgot the latest version of the version 12.
I think it was something like 12.5.6
have you considered not making discord bots? That seems like the real problem here
nope.
Like this
import { Snowflake } from 'discord.js'
import { Column, BaseEntity, Entity } from 'typeorm'
@Entity('test')
export class Test extends BaseEntity {
@Column({ type: 'text' })
test: Snowflake
}
imagine limiting the thing you're building to the api of a 3rd party platform for no reason 
I could define the row to be of type text(which is just postgres string ig) but give the definition a type of snowflake so I won't have type mismatch problems when defining test value to be an ID
This is what I mean by custom types
stick with v12 then
yeah but v13 has some features that tickle my pickle
use detritus where the features already exist š
@alpine crag
This it?
that's even worse
that changes it from 3 hours to 3 weeks
yes
Ok
bdfd >.>
I'm like move side to side with the v13 development, like the CommandInteractionOptions stuff from array into collection into option resolver
you have posted cringe
No
What
trolling
i need to update my code so it calculates an elo rating for each player of the team and the teams elo ratings
it's too tricky
Is this Application useful to enter the top.gg?
You enter top.gg with the intent of promoting your decently written bot that's intended to be used in public servers
I understand that
if(message.content.toLowerCase().startsWith("radio")) {
const voiceChannel = message.member.voice.channel;
if(!voiceChannel)
return message.channel.send("You must be in a voice channel!");
const permissions = voiceChannel.permissionsFor(message.client.user);
if(!permissions.has('CONNECT') || !permissions.has('SPEAK')) return message.reply('I am missing permission!');
var connection = await voiceChannel.join();
await connection.voice.setSelfDeaf(true);
connection.play("https://streams.ilovemusic.de/iloveradio14.mp3").setVolumeLogarithmic(1);
}```
I turn this code into a non cmd handler did I do it wrong
Bc it keeps Saying await is a error
I tried using var connection then I put const connection but await is always the error
If you know how to use it, then yes!
Is it inside of an async function?
I can already tell you aren't using await inside an async function
Nope
Then that is your issue
Then that's why your code is throwing
Learn how async/await works
Who created this code?
My friend created it as a cmd handler
I tried taken it out
is there a problem ?
Is what a problem
Well they already said there was a problem and its been resolved
They need to use await inside an async function
I ask you is there a problem or not?
It was but mistyboi and the other dude fix it
It may be very easy to solve.
It is very easy to solve
as we already told them how
client.on("message", message => {
//code
})
```async
```js
client.on("message", async message => {
//code
})
Something like this
Mhm
Yo I heard someone got a problem to be solved??? 
That will make that an async function
hey if anybody knows how to code spigot can i get some help with this:
so when i try to make my custom entity drop a custom item it doesnt work and
the error it sends is the ```java
if(entity.getCustomName().equals("§c§lThe Warden")) {
full code:
```js
@EventHandler
public void mobDeath(EntityDeathEvent event) {
LivingEntity entity = event.getEntity();
if(entity.getCustomName().equals("§c§lThe Warden")) {
event.getDrops().clear();
event.getDrops().add(Main.ironheart);
}
}
PROBLEM?????
Well that isn't even a full error
@earnest phoenix this is the solution
so
Well it would be helpful to actually see the error....
I won't be able to help since idk spigot but for anyone who does
seeing the actual error would be far more helpful
lol
Unrelated, but I'd recommend storing entity IDs you spawn somewhere and go based off that instead of by names since names are arbitrarily assignable
ok
What did I do it wrong
[ is there any way to start our bot automatically in vps when bot is crashed ]
ill try it out thanks
You are missing a )
You could use pm2 so it restarts after crashing
In Unix systems, you can use a while statement
while true; ./start-bot; sleep 1; end
pm2 how
Is this a nodejs project
yes
Oh it works lol there is no error but itās still not working working lol

Can't help with no information
@earnest phoenix Do you have a bot?
this is only constant run for the bot
I stopped programming bots
What?
Don't mind the promise pending
what are you doing now ?
that expression will always return false since the string to match contains an upper case character
Oh my how did I not see that l
Lmao I forgot all about them type of codes
Why too many people using mongoose (as npm package) instead of mongodb?
Personal projects unrelated to the discord api all together
cause mongoose is popular?
It gets the job done
mongodb is popular too and as I know mongodb is better than the mongoose in benchmark tests
Yeah why are you here?
mongoose is just a wrapper around mongodb, it uses mongodb as well; its just mongodb with Schemas
people prefer plug and pray instead of having to go through possibly extended setup
Cause I choose to be?
Is it the only difference between those?
What about this?
https://bugwheels94.medium.com/performance-difference-in-mongoose-vs-mongodb-60be831c69ad
I am going to start a new project in which I will use schemaless database and when I was doing freecodecamp, I used Mongoose because I wasā¦
Now you are working on creating websites right?
No
wrappers will always have overhead depending on their design
Anyone here used amazon AWS for hosting their bot and/or might know where to find information about pricing/specifics about the first year being free?
toLowerCase and then checking against capitalized string
Yeah I took that out itās working now
The bot join vc and everything

Wdym wow
Again, mongoose is just a wrapper for a wrapper aka wrapper for mongodb, the chance of the mongoose being slower than mongodb is a lot since it uses schemas
Nevermind, found it
You can help them. ^^ ):
It hardly does anything to actually affect the performance of mongodb anyway doesn't it
If mongodb is faster than mongoose. Why people are using mongoose instead of mongodb driver
I think voltrex just said why
Because not everyone cares about performance
iirc the performance difference anyways is very little
insert new devs using d.js
Not really
Yes Yes
Big bots people dont use mongodb lmfao
Its a giant meme
Postgres is by far better
The difference in performance of mongoose and mongodb are really small, they are the same thing but mongoose is just made to support schemas
@earnest phoenix Why are you at a loss from this?
What are you talking about my g
Also big bots mostly never use MongoDB, they use something that can scale well such as postgres
Alright, Is there any differences about storage size between schemas or not?
Indeed they do
Me I use postgres right off the bat
So I dont gotta worry about scaling
silence is better
sqlite => maria => postgres
No
sqlite good
nope, the difference is kinda small
my progression is what I was outlining
not that they're greater than. I realized that a little too late
json was my db
i did a small test for my use case, sqlite outperformed both pg and redis
lul
So which database you suggest to build a big bot? Should I start with mongodb and then switch it to postgresql or should I directly start with postgresql
Sqlite is trash
It doesn't support array types
While it is faster since it is file based
Postgres is still the better choice imo
no it doesnt, but neither did most rdbms for a long time
you have to design your tables accordingly
Yes true
what's postgres?
db
Postgresql is a db
?
sql based relational database
pg is better for large scale indeed, at the cost of the network latency
Just start with postgres
Use postgresql, if you're not likely to get along with it or if its not doing well for you, switch to MongoDB
ALso
If you don't wanna do all the nasty sql queries yourself
Or pain yourself with redis
use an orm
I hate relational databases š¦
Sequelize is a decent orm for postgres

its also js friendly
But if you wanna do sql queries yourself then you will have to use the appropriate package for it
Imagine using ORMs
I just don't have the patience my friend
I know SQL
If Mongodb is not scalable as postgres why it's so popular?
Its by far the easiest thing to learn
Its easier than postgresql
mongo was overhyped and overmarketed
Yep
also, it was targeted at horizontal scaling, which most rdbms have a hard time with
You are building an application once and I think difficulty shouldn't be that important
relational does leave some performance on the table due to it not exactly being K,V but relational is a very easy concept to understand and offers some level of type safety depending on how it enforces data types
and everyone was like "ooo horizontal scaling is the next big thing!!"
MongoDB is like the discord.js of databases, most people use it because its easy and does well for a while
In here, can I ask for codes help?
It is a development channel
yes, that's what this channel is for
so yes
Voltrex make bot when?
VXComplexity
Is that I see ppl chatting so I was confused
:drake:
xd
Thanks Discord

Its for chatting about development as well as asking for help

So, what do you think about the difference between sql and nosql. Which one is more important?

Depends on what you're trying to do and how large your data sets are
Okey so, What makes a database more scalable? Why mongodb is not scalable as postgres
nosql is mostly targeted at pototyping and undefined structures
I/O throughput and which has the least overhead when processing and handling a request
once you have a well defined structure, you usually move to sql
Well, the thing is that I want that the bot says: Watching: [Amount of members that bot its in all servers]
What lib do you use?
client.users.cache.size should give you the size of the members
no
users typically reported mongodb slowing down at some sizes, while postgres didnt
most times this can be resolved with different configurations
It was wrong
That's the cached users, not all the members
no
you need to wait for the client to reach a ready state and then map all of the guilds member counts to a value
assuming your lib emits ready after most or all guilds have been sent to the client
Gotta love how when anybody asks a question in here, we all assume they're using d.js
*flashbacks*
Well. Not an incorrect assumption most of the time
yea, we know
So, like this?
I'd probably start recommending music bot devs to use python or some native js yt extractor since ytdl is written in python and spawning ytdl every request for it to compile it's regular expressions takes a lot of cpu time
yes but unreliable
You shouldn't display the amount of cached users if you want all of them
yeah
r guilds automatically cached?
Do you have any doc about databases. I need deep understanding of them.
It's wrong as Voltrex said
As I know, bot is not caching offline members
in what context
wym?
Well, it works
well its unreliable 
Are you asking anyone here or are you directing that at someone? If asking anyone, I meant what lib and intents are being used

You need to use reduce @ruby vine
Oh, I undersand u
You have to reduce the member count of the guilds using <Collection>.reduce()
what does reduce do 
So, if a user its on 2 servers and bot its on that 2 servers, if I use the cache it wont detect it on 1 server?
<Client>.guilds.cache
.reduce((t, g) => t + g.memberCount, 0);
You should use that if you want to display all the members instead of only the cached ones
reduce takes a parameter which acts as an accumulator and also a current value which changes based on the iteration of the Iterable. Once all entries have been Iterated over, it returns the accumulator. The accumulator can be any arbitrary value and should be mutated in some way depending on the callback function
the return value of the callback function is the new value of the accumulator
Should have just linked the Array.prototype.reduce() MDN documentation
kek
You probably didn't create config.json
Send me how
Send codes
Please@earnest phoenix
Hey
How do I get my <a> element to fit the flexbox, so that when I hover over it, it changes the color of the whole thing, and not just part of it? (For the width of it, that is)
Sorry for the poor phrasing of that question, my brain is not running at 100% rn
@earnest phoenix you must see the docs or try to do it yourself
In your about me you have written you are Bot Developer but copying codes and running them doesn't make you a bot developer
You don't know basics too
bind is a property of a function
function thing() {
console.log(this)
}
thing.bind("xd")() // prints xd
You may not DM me as there is no need to
Well, there's no reason to DM someone for a development related question when there's a perfectly good development related channel to use for that
I told you the answer to your question. It's up to you to figure out how that applies to your code
basically evt.bind is not an existing function in evt
well it looks like you're missing the start script
in your package.json try checking if you have your scripts setup to start your program
@earnest phoenix
do { $this->reviewBot(self::cache, $item) as foreach($checklist as $item) }
while(self::queue_size < 0);
@earnest phoenix note: bind is assigned to objects, in this case you assign to evt's callback
basically that adds another parameter to the cb function
it's kinda late rep, sorry for ping 
alright
lemme see
type each thing you added in .env
key: TOKEN value: lol nerd
then add
?
so
basically it auto deploys when you have a commit
wait resend me the script
the like
wait
the TOKEN=no-token-for-you
PREFIX=ans!
yes
your prefix and token
add this thing in main folder, replace node index.js with your starting script
like node bot.js
no
add the file
in there
don't rename
like
in the folder
im confused
so
i download the file
then i put the file in the .env?
@obsidian flint
outside
are you there?
alive
k
I make a new file in repl.it
no wait
i ADD that file
then I change up the file to my settings?
@obsidian flint
hello?
@obsidian flint
are you there dude?
yes
k
k
maybe
it's a channel
I saw someone adding a bot
check my about its work by a tricks
k
hey
is it possible to get a guild, when the bot isn't on it?
apart from using it's invite link
so either its id or name
If you somehow got the id it should work
anyone top up diamond
Only members
For users, only IDs
lol wat
kk
f*** you
toxic mf***ker
sorry for being mean
but the fact that your name is that makes me feel cringe
Garena
you know?
how do I add something like a waiting function? So I would send a message saying something, wait some time, then edit it?
What do you code in?
JavaScript
You can use setTimeout https://nodejs.org/en/docs/guides/timers-in-node/#when-i-say-so-execution-settimeoutv
so in there example,
setTimeout(myFunc, 1500, 'funky');
``` Its first running the function, then waiting, and then saying funky?
You can ignore the third parameter. It uses eval internally
alright.
Just setTimeout(myFunc, 1500)
But its basicly running the function after the set amount of time, right?
and the function here is myFunc
ye
TypeError: Cannot read property 'guild' of undefined
at VoiceWebSocket.onOpen (/home/ubuntu/real2/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:123:44)
at WebSocket.onOpen (/home/ubuntu/real2/node_modules/ws/lib/event-target.js:144:16)
at WebSocket.emit (events.js:376:20)
at WebSocket.setSocket (/home/ubuntu/real2/node_modules/ws/lib/websocket.js:222:10)
at ClientRequest.<anonymous> (/home/ubuntu/real2/node_modules/ws/lib/websocket.js:807:15)
at ClientRequest.emit (events.js:376:20)
at TLSSocket.socketOnData (_http_client.js:553:11)
at TLSSocket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
anyone can explain
something before .guild is undefined
where
but
i this log i cant see where not defined
oh
you are probably using outdated version of discord.js
npm ls discord.js
and show output
hmm wait
discord-js-handler-template@1.0.0 /home/ubuntu/real2
āā⬠discord-reply@0.1.2
ā āāā discord.js@12.5.1 deduped
āāā discord.js@12.5.1
did
wait do you use template
for what ?
lmao
just do npm i discord.js
or define it in your package.json file in dependencies like this:
like ?
Damn it my files arnt loading
umm
Ill try to type it here
dependencies: [
"discord.js" : "^12.5.1"
]```
{
"name": "real",
"version": "1.0.0",
"description": "real bot for real army For Questions: 3",
"main": "real.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node real.js"
},
"author": "@! Pukhraj#0581",
"license": "ISC",
"dependencies": {
"@ksoft/api": "^3.1.9",
"@top-gg/sdk": "^3.1.2",
"ascii-table": "0.0.9",
"common-tags": "^1.8.0",
"cpu-stat": "^2.0.1",
"discord-buttons": "^4.0.0",
"discord-reply": "^0.1.2",
"discord.js": "^12.5.3",
"enmap": "^5.8.4",
"erela.js": "^2.3.2",
"erela.js-deezer": "^1.0.5",
"erela.js-spotify": "^1.2.0",
"ms": "^2.1.3",
"os": "^0.1.2",
"statcord.js": "^3.2.0",
"topgg-autoposter": "^2.0.0"
},
"devDependencies": {
"ascii-table": "0.0.9",
"colors": "^1.4.0"
}
}
oh ya theres version 12.5.3..
also btw for start script you can just do node .
since . is your main file
what's the best way to control when the process stops?
im thinking of this:
function controlledExit() {
if (process._controlled) return process._controlled;
process._controlled = {
interval: setInterval(_ => {}, Math.MAX_SAFE_INTEGER),
stop() {
clearInterval(this.interval)
}
};
return process._controlled;
}
controlledExit();
I know that's offtopic but is there a way to connect bot made in d.py to a server and make api for this server using this bot? I already made bot account and linked empty website to add authorizing oauth...
@ripe prairie
4 views lmao
@mild gale dont advertise please
let tomute = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
if(!tomute) return message.reply("**Couldn't find the selected user.**")
let muterole = message.guild.roles.cache.find(r => r.name === "muted");
if (tomute.roles.has(muterole.id)) {```hey why am i getting the error:
tomute.roles.has is not a function
hellloooo?
roles.cache.has
my code
module.exports = async(bot, message, args) => {
execute(bot, message, args) {
...
}
}```
error when starting the bot.
since I am using await inside the module, where do I need to put async() ?
async execute
Thank you
np
..
No reason you cannot hook up a bot to an api
;-;
It may help to learn how to make an api first, then making a bot use that api will be very simple.
Ok
I'm doing this
const commandFiles = fs.readdirSync('./Others-Dir').filter(file => file.endsWith('.js'));
const command = require(`./Others-Dir/${file}`);
bot.commands.set(command.name, command);```
It says `file not defined`.
But now I have no clue what to define in the `const file`?
hey i recently bought a nodemcu v3 controller. What can i do with it lmao?
commandFiles is a list of files, which file do you want to require? you have to decide
hey guys anyone use ytdl-core?
Its a pain
Maybe just ask question, I used it before, switch to youtube-dl-exec
Same
better?
And yeah, it a pain. Only limited to yt, and issues
š
Iirc it the issue ytdl-core itself. Either use other package or you can try troubleshoot it
404 erro happen when I try to play restricted age video
Yeah, that is the one
but 2 days ago not error comes
there is a package that not provide all this problem?
Question, I have a folder with item files this includes the base stats of that item, emoji, etc. Now would it be better to require that file once the user uses a command or require all item files and save them as a public object under the client?
Rule of thumb, nothing is perfect. Always expect some shit will happen
HAHAHAHAAHA
š¦
sad life
im coming crasy with this erorr š¦
doesnt really matter tbh
How do you run your webserver
So there's no more optimal solution between that?
generally its good practice to load all the files a script needs at the top of the script
I'm using someone code from GitHub
issue is that I load the item files that the user has
That question implies I need to see your code
Not all item files
Ok
I'll just load all items in a public object undr client saves me some imports
Wait
its a tradeoff, load all at the beginning = slower loading but faster execution
Don't really care about the loading speed tbh
load at command = faster loading but slower execution during the command's first run
I go for faster execution
I'll go with option 1 then
laughs with ssd
ssd is still slower :^)
I started the console but it's showing dis
It's codensole 
Whatever code you edited
Oh I editied the config file so that it works with my bot
@slender thistle uhhh now wut?
I hope you do realize that I have zero fucking clue what your code is actually doing
hence why I asked for it
I'll just send u tha github I used
Why not just send your code and let me see how YOU run things
Ok
@slender thistle but my token will be revealed...
Then don't send it
You can just send specific code snippets which don't include your token
Ok
Gotcha
And, regardless, use environment variables to store your private crap
Ah yes
is making a discord bot a backend or frontend work? Or it is something else?
Kind of both. But realistically it's only backend experience.
The discord client itself is doing almost all the front end work.
I'd say neither tbh
so is it just an api?
Isn't that backend tho
I'd say backend is an umbrella term
Most people consider a backend to be a server for a website
@slender thistle if I deploy on heroku will it stay online 24/7?
No
Heroku workers get less than a month of run time each month free.
Unless you pay there will be downtime
I thought we came to a conclusion that it was your code that's the issue and not the host
if you put your credit card info to heroku it gives 400+ more hours
so its longer than a month
Oh I thought it was 600 or 700 hours total with a card.
Whole time I wanted to host 24/7 tho
Looked it up. It's 1000 total with a card, which is plenty for one worker a month. Without it's 550 which isn't.
Add what?
Anyway it seems your issue isn't related to heroku. It seems your issue is code.
Repl runs 24/7 if you use a ping service. But it seems your issue is related to code, not repl.
i cant access new mongodb data unless i restart the bot, how can i fix this?
i only have this piece of code to start the mongoose service thingy
const mongoose = require('mongoose')
mongoose.connect(process.env.MONGODB,{
useUnifiedTopology: true,
useNewUrlParser: true
}).then(console.log("Connected to MongoDB!"))
.catch(console.error())
I'm using the music bot code from https://github.com/SudhanPlayz/Discord-MusicBot
like when new data is pushed, it cant be accessed unless the bot is restarted
@solemn latch if u want u can see the code link is at replied message
And tell me what I have to correct
stop pinging him every second bruh
Sowy
Just a heads up, we don't allow clones of other bots on our site.
Yeeh
Seems you just admitted to using one
No for my own
anyways my problem also ty
My server
then like i also have a schema file for config purposes
then the query itself (ithink)
.findOne() is technically quering the db right
since its finding somthing
it should be, thats weird.
Lemme take a look.
like
everytime i add new data, it cant access that data unless the bot restarts
so, example scenario
bot starts up, without the data
then user sets the data in a server
but then when the bot tries to access the new data, it cant find it
i presume this is happening each time you need to access this data right?
when theres new data added after the restart yeah
if i restart the bot, then the bot can access the brand new data
oh thats not what im asking.
im asking if this is being ran each time you want to access this.
Rather, this isnt happening outside an event correct?
yeah its being ran each time when the bot wants to access the data
and yes its ran on the global scope
like outside of any blockscopes
wait, so its being ran the one time at startup then?
I need for my own server....
I dont know that clone. probably best to ask the developer.
you mean the query?
U know any music bot git hub codes I could use?
yeah, the query.
If you query outside any scope its only being ran the single time and never again. so it never can get anything new.
FOR MY OWN SERVER
For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.
I genuinely don't know any good clones.
Wut is dat?
why not just use an existing music bot?
Alr
^
embed says it all>
@gusty kestrel
Ok
I wanna make my own tho
ill have to double check on that, wait 
I wanna learn some codes
copying other people's code is not how you make your own
I'm gonna see how we use them then learn some then try my own
if you want to learn, start from the beginning.
Alr
well thats weird, its being executed everytime i need something @solemn latch
probably heroku being 
i can access the new data tho weird
yep, it IS heroku being weird
wait no, its not
i just realised, a new document was made
then the query didnt get anythiing
er
ok so, i deleted the documents, but mongoose still thinks it still has the data?

is this probably cached or
what are you using to see the documents? Atlas, mongo cloud, etc?
i manually deleted the documents using compass
Refresh to check if you've deleted them
what the
its still there
ok now its gone
now its gone
???
what the
huh sometimes it works sometimes it dosnt..
yeah no i gotta solve this on my own, sorry for bothering
@solemn latch ads
@limber meteor please no ads
if you want to hire a developer, try fiverr
thats fine, please just keep in mind #rules-and-info if you come back
lmao wow, that escalated quite quickly
Anyone knows why when I type /ping this event isn't triggering?
this.on("interactionCreate", (payload: Interaction) => {
console.log("HEWO")
SlashCommandHandler(this, payload);
});
Just typing /ping will not trigger the event
What is interactionCreate?
I don't see it having a purpose.
Interaction, yes, the meaning is obvious.
How does it differ to message or messageCreate?
it's when an interaction is created
like when someone presses a button, or runs a slash command, or selects an item from a select menu
Whats up cool people
Hello fellow cool person
Is config file supposed to
.js
Or
.json
Json
Ehh
Most people use json but fuck it
A few people even use yaml for configs
Can I use env in it?
Use json its easiest.
Env is different from json
Js and json are basically the same
Where are you hosting your bot? LUNAR
replit
Its same..
I don't think
I'm using env vars
Soo
Can I use env var in json?
İdk replit envs
Env or use a config file
In config file it auto hides it?
I have a bot [D.js V12]
Its on 11k+ guilds and sharded.
I have a join voice channel command - It works fine. But now when I run the command it tells me that the bot has join. But the bot doesnt join and no errors shown on the console.
Env and JSON are not the same.
Ik But I'm using replit env vars
I don't think u can make env files in replit
I have to then put process.env."Name I add in the env for token here"
If replit has envs just add your variables to env section
@crimson vapor
And use variables as process.env.VARIABLE_NAME
I can't make env files
Alr will it work in the config.json file?
NO
Alr
you can
they're just called "secrets" there
I can't use env vars in config files
except you do via interface instead of directly editing the file
but both are exactly the same thing
does anyone know of docker connecting solutions for PHP via endpoints?
teloxide::repl(bot, |UpdateWithCx { requester, update }| async move {
//message.requester.send_photo(message.requester.chat, )
let mut photo = requester.send_photo(
update.chat_id(),
InputFile::Url("https://cdn.discordapp.com/avatars/247741991310327810/a470516dd5db7b67f4c52afa95128be9.png?size=256".to_string())
);
photo.caption = Some("Yehee!".to_string());
photo.send().await?;
respond(())
})
.await;
this is so dumb
I hv a circle div, I want to surround this div with 60 dots. How could I acchive this by css
hold up how tf did you get a circular div
border-radius: 99999px
welp
border: thiccness dotted color
was my initial thought too. But I can't limit the dots with that
changing the thiccness will affect how many dots there are
if you need more control use SVG
Wut is to be corrected
I can't even read what that says
What to change to?
So I re name to js?
no...
You're not supposed to use js code inside of your package.json file
package.json is for node to look at for information about your project and dependencies etc.
code in package.json lmao
It also looks like you haven't installed express through npm as well, judging by your dependencies...
Copy pasting code isn't going to do you much good, which is what I'm assuming you've done
if you copy paste things enough times you start learning from it š
but it might be a long process
eh, I wouldn't even say that
If you copy paste things but try to understand what they do, then that might work for learning a little
I feel like instead of copy pasting, actually writing out the code (even if it's a word for word copy) while trying to understand it is a better way to learn from it
But everyone learns differently ig
Nah I downloaded it
Tell me how tk intsall then ig
I highly doubt you downloaded code that had js code within a package.json file
I renamed it
Cuz
I was
...
Experimenting
This error is when json
Everything past the semicolon should be within the package.json file, and everything before it should be in a js file, such as index.js
You're getting a user object, and users have no roles associated with them
Uhh ok
Which semicolon?
The one in this image, on line 11
Alr
hey not really much coding related, but does anyone know a good idea to implement in my bot? I am running out of ideas and want to do something that hasn't been milked out yet
i am hosting a multifunctional dc bot
I'm not sure how people have the audacity to call themselves bot devs when they struggle with the basic stuff
I generally have idea but not for a function only, for all the bot ;-;
are you talking about me?
No
Have a read above and you'll see
It's interesting because I often see people with the "bot developer" role having simple issues such as the above
Makes me wonder how they got the role
damn. If you are still struggling with what file extension you need to use....
okay damn that one reaches deep.
Bot makers or just generally lack of experience
Lack of experience
To get the role you have to submit and get a bot approved, but then some of them will ask the most basic questions about bot development
And then their bio will be like "bot dev!"
is the v13 djs beta already usable?
You can use the master branch of djs for v13
Though it's not complete yet so some things might change upon official release
Hey, someone have maybe mobile version of replit to download? Official link broken
Bet your bottom dollar it will be a while...
yeah
replit.com, works just fine
Yeah but they have app and links broken
I just use a browser instead
In but there I can't copy paste
Ok
Oh yeah that's a disaster
@wheat mesa
how can people even code on their phone
How u copy paste? I don't have these buttons on kboard
Your curly brackets don't match up
I mange
ah nice! You mange nice then.
and you're missing a " on line 2
Where do I correct m
I can because 90% times I'm afk... Like now
just remove your package.json and type npm init -y in your terminal
will generate a new package.json with the desired packages.
Uhh what?!
;-; again...
using npm init -y will generate a new package.json file that isn't messed up.
Or you could fix it manually
And I was wrong, your curly brackets do line up, sorry
You're missing a " before name on line 2
I am using mongoose and created a schema but what is "_v"?
Alr
..
Where is terminal @wheat mesa
Don't bother with the terminal for now
It's used for document revisions
Just put a " before name on line 2
You can ignore that
Alr
š
@wheat mesa
calm down its browser only
you suffer on mobile
i'm amazed they even have some kind of mobile support
Gimme 2mins
can i put a .js for my top.gg page?
I want to create variables to put img color palette etc and then get it by css
OK. I was thinking where this app is cause link broken. : https://replit.com/talk/announcements/Replit-Mobile-App-MVP/14496
We did it! 10 days ago I created a post asking if people were interested in a mobile app for Repl.it. The answer in general was yes, and I set out to build the best possible thing I could. And I just released the MVP of the app. Here are some supported features: Creating and deleting repls and files š Both dark mode and light mode š Integrate...
?
Bruh no... Impossible. Top.gg blocks everything...
this doesn't even look official
so i'm not surprised they arent keeping the link updated
Look at comments also
hey one little question, is it possible to host a browser-based personal assistant (i've used the built in browser js properties to set up voice recognition etc.) on the nodemcu esp8266?
that article is from 2 years ago
Ik but comments yet from this year
And error I have isn't 404 but unauthorised
And xml (or in-app unauthorised because I alr installed this "expo" for that)
These I have :
@quartz kindle @split hazel
Idk. Have a raw .apk ?
if you check the comments, you will see that all the recent ones are complaining about the same problem
:/
why can't you just use the browser version
it's probably much better than the app anyways
Copy paste not working. I don't have physical kboard
im pretty sure they canceled the app and focused on making the browser version mobile friendly instead
is it even official
No. Very unofficial and never exited beta
what? discord is getting a mobile version for web?
wut
No discord
meh
Anywaays - gimme 5 mins, OK?
just tried it on mobile it works fine
I have Firefox, not chrome
And yes popup I have also but none of buttons really work for me
Do u want to know my phone? It'll turnoff forever if I'd install...
Here ya have: laggy, buggy, modded for not losing it forever:
how much storage do you have left
Storage? I have external SD
Many
But processor won't just run it. I have lags on discord, what bout chrome..
(node:8692) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channels' of undefined
help
Bruh, not channels but channel
yo
(node:9636) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channel' of undefined
Youāre trying to read a property of undefined





