#development
1 messages · Page 1135 of 1
What can I do now? D:
C++
I repaired my quick.db
👋
c++, c#, c, java, haskell, cloujre, rust, python, nim, go [@torn ravine]
discord.js v12 member need perms
discord bot in rust?
whats a great a language thats not javascript to learn
@torn ravine <insert favorite language> python
how do i check if someone has a role by the id
<GuildMember>.roles.cache.has I think
A message instance has the .member property, which is a GuildMember instance.
do you want an example
if (message.author.roles.cache.has === 'id') return
message.channel.send("u have that role or sumthin idk")
would that work?
No, message.author is a User instance. message.member, however, is a GuildMember instance.
and .has is a method, so you need to call it with the id.
oh
if (message.member.roles.cache.has === 'id') return
message.channel.send("u have that role or sumthin idk")
so that
but
i need to call it with the id right
Yes.
and .has is a method, so you need to call it with the id.
example please
call it like a function (has())
oh
so
if (message.member.roles.cache.has('id')) return
message.channel.send("u have that role or sumthin idk")
yeah now try it out and see
ok
Someone knows how to check if the message author has/need permissions to execute the command in discord.js v12?
well we don't know what requirements there are to run said command
async run(message, args, [target]) {
let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);
db.set(`levelsystem_${message.guild.id}`, 'off')
const member = message.mentions.members.last() || message.guild.members.cache.get(target) || message.member;
const userFlags = member.user.flags.toArray();
if(!member.hasPermission("MANAGE_MESSAGES")) {
return message.channel.send("You don't have the permissions to use this command!")
}
const embed = new MessageEmbed()
.setDescription('The level-system turned off')
.setColor('#ea6ef1')
.setAuthor('| Level System')
.setTimestamp()
.setFooter(`Requested by ${message.author.username}#${message.author.discriminator}`);
message.channel.send(embed)
}
}
message.author is a User instance while message.member is a guild member instance if you need to check something that only applies to guilds
```if (message.member.hasPermission(EXAMPLE)) {
// your code here
}
and also
Yes
|| is or and && is and right
yes
@torn ravine then the error undefined is coming
Or a quick.db error
member can either be a guild member instance of undefined/null
Hm.
like if6 said, you can use .hasPermission(the_permission)
yep
And how you defined member?
Then the quick.db error is coming
Tos go brr
const { Command } = require('discord.js-commando');
const { prefix } = require('../../config.json');
const { MessageEmbed } = require('discord.js');
const fs = require('fs');
const Discord = require('discord.js');
const db = require('quick.db');
module.exports = class HelpCommand extends Command {
constructor(client) {
super(client, {
name: 'level-off',
aliases: ['loff, levelsystem-off'],
group: 'guild',
memberName: 'level-off',
description: 'Disable the level system',
});
}
async run(message, args) {
if (!
message.member.hasPermission(‚ADMINISTRATOR')) {message.channel.send('You dont have permissions!');
let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);
db.set(`levelsystem_${message.guild.id}`, 'off')
const embed = new MessageEmbed()
.setDescription('The level-system turned off')
.setColor('#ea6ef1')
.setAuthor('| Level System', 'https://cdn.discordapp.com/avatars/714745136122429491/e16289a6de8bd22fb433b1e029fe98e1.png?size=2048')
.setTimestamp()
.setFooter(`Requested by ${message.author.username}#${message.author.discriminator}`);
message.channel.send(embed)
}
}
Will this work?
@torn ravine
why dont you test it
Good idea!
https://tryitands.ee
@honest perch thank you
I suggest trying and debuging your code
it got pushed away, but the quick.db docs mention nothing about fetch
Instead of asking if it works on every edit
i checked the source code, fetch is just an alias for get
i fixed every commands
but a command is still not working
TypeError: Cannot read property 'send' of undefined
oof
the command is this
let ucount = client.users.cache.size
message.channel.send('I am currently watching ' + ucount + ' users.')```
ah
any help?
where are you getting message from? show the full code
await client.get_channel(741482536961835009).send(f"{welcomemsg}")
does the channel id need to be a integer?
can it be a string?
its a variablr
hastebin?
yes
?
?
.js
Your not the only one with issues in this channel
yes ik
Mention able name is also looking for help
You know you have three message events
where
And every single time you get a message your building an embed
i don't understand
Client.on('message')
Every time you do that, your making a new event listener
yes
All of your commands can be in one
No, the three seperate events
oh
but that's not hte problem rn
the problem is the usercount command
it don't work
and idk why because servercount work
No, its not the problem, but it is a problem
Also, your loading command files but never using them anywhere
so im stuck, and i need some help, here is my code
if (!message.member.roles.cache.has('my role' || 'head of staff')) //only me and my HOS are able to issue this command
if (message.member.roles.cache.has('moderator' || 'admin'))
message.channel.send('You do not have permission to execute this command. Please contact Christian if you believe somebody is flooding the database.');
else {
return;
}
what im trying to do is make it to where if me or my head of staff issue the command, it goes through, but if a moderator or admin (on my support server) do it, it says 'You do not have permission to execute this command. Please contact Christian if you believe somebody is flooding the database.', and if a regular user with none of those roles do it, it just quits
but
whats happening
Roles aren't cached
uh
Not in member objects
that's not how you use OR
im dumb
and yes, they are
They are elsewhere
https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=roles https://discord.js.org/#/docs/main/stable/class/GuildMemberRoleManager?scrollTo=cache
I'm getting error when compiling my C++ app:
Error: Screen Height / Font Height Too Big
I'm confused
@amber fractal member roles aren't cached
and me
you just are using the OR operator wrong
!message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my role') || ! message.member.roles.cache.has('...'))
you cant just put OR in a function like that
because that's string OR string2
it will always evaluate to string unless it's empty
can anyone help me?? ;-;
No
You can use cache.some()
if !message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my role') || ! message.member.roles.cache.has('...')) //only me and my HOS are able to issue this command
if !message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my role') || ! message.member.roles.cache.has('...'))
message.channel.send('You do not have permission to execute this command. Please contact Christian if you believe somebody is flooding the database.');
else {
return;
}
yes
would it be like that\
that would work it looks like
but not with the ... one obviously
Just make it fit your needs, which is 2 roles (I think)
can anyone help me now
No
it says that it has to be like
if !message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my role') || ! message.member.roles.cache.has('...')) //only me and my HOS are able to issue this command
if !message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my role') || ! message.member.roles.cache.has('...'))
message.channel.send('You do not have permission to execute this command. Please contact Christian if you believe somebody is flooding the database.');
else {
return;
}
bruh
ok
Where is your error bro
i fixed my commands but usercount don't work
TypeError: Cannot read property 'send' of undefined
and the code
and this
at Client.<anonymous> (E:\Hi Bot(js)\index.js:45:21)
at Client.emit (events.js:322:22)
at MessageCreateAction.handle (E:\Hi Bot(js)\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (E:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (E:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (E:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (E:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (E:\Hi Bot(js)\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:310:20)
at Receiver.receiverOnMessage (E:\Hi Bot(js)\node_modules\ws\lib\websocket.js:797:20)```
Whats at line 45 of your index
let ucount = client.users.cache.size
yes
you might want to make a handler that ignores all messages unless it starts with the prefix
because from what im seeing
your bot scans every single god damn message
yes and
ok but that's not the problem
so
try changing line 20
from
client.on('message', message => {
to client.on('message', (message) => {
done
change all client.on('message', message => {
i did
Hello, i do command handler but now, how to make an automatic ignore the dm message
dude
but azorix
it still don't work
@jolly wave hold on
it should automatically ignore dms, it does for me at least
but
better be safe then sorry
Someone answer me please please I just need that
told u
thxxx
btw do you know how to make a xp system
generally, a few hours of playing around and you know the basics
sql is often considered a bit more difficult, but its really not.
like an array?
You could learn the basics: what a database is, how to create tables, insert update and delete data
like 1 - 10
[1,2,3,4,5,6,7,8,9,10]
do you want to get a random number in that range
you could just loop until you get to the largest number
and push each value into the array
actually, Array.from might be what you want @earnest phoenix
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from
this is the code thats giving me the issue
if (!message.member.roles.cache.has('my role') || !message.member.roles.cache.has('my head of staffs role')) { //only me and my HOS are able to issue this command
if (!message.member.roles.cache.has('admin role') || !message.member.roles.cache.has('mod role')) {
message.channel.send('You do not have permission to execute this command. Please contact Christian if you believe somebody is flooding the database.');
} else {
return;
}
} else {
then it continues to carry out the command
``` it always comes out as you do not have permission
even though i have the role\
.has() expects a key value, which would be an id, iirc
Yeah i put ids in there
i put my role id and etc
and it still comes out as you do not have permission
im not sure tbh
damn
You're executing it in the right guild right?
yeah
quick question
yes
docs
you can stop them aswell
thats the problem
docs ;p
collector.stop()
so your using it as a method?
and your collector is named collector?
am i supposed to pass collector
should a say command be availible for only those with manage messages or everyone?
ait i was supposed to pass filter D:
it doesnt say that in docs tho
i am trying to make a xp system with mongo db but the script don't work
Ok
bruh
maybe show the code
wait
also, your code is kinda getting real hard to read
Yea
expect people to be confused when reading your code
I'd recommend adding a command handler
and as it grows and needs more dependencies it's better
as I have about 10 lines just dependencies
I have ? How would I go about adding +nuke
So once u activate it, it deletes all messages in the channel
you can only delete 100 messages at a time
Really?
completely purging a channel isnt really possible unless you delete it
Yes ik like BetterAntispam bot
How would i go about doing something like thag
That*
Eris allows you to delete as many message as you want
that's because it does it gracefully with a small timeout period
good luck deleting all messages in a channel
imagine a channel with a million messages
it will take you days
Why not just delete the channel
might as well clone and delete the channel
exactly
TextChannel#clone
a lot of the nuke commands ive seen either do that ^ or have a cap of 1000(or less)
:o
syntaxError: Unexpected number
What does that mean?
Unexpected number
an unexpected number was found in your code which was a syntax error
typically, it means a number wasnt excpected
well show it or run it through a linter
Im on mobile so I just have to copy and paste
Or ill screenshot my evaling
title:"About",
description:"removed desc",
fields:[{
name:"Developers:", value:"Sandra#3781\nclient.users.cache.get("648451669671149588").tag"
},
{name:"Contributors:",
value:"client.users.cache.get("535508271474147330").tag - Bots fancy avatar artist\nclient.users.cache.get("614118045451026433").tag - Bot new name suggestion"
}]}})```
When I do this it runs unexpected number
you're mixing variables and text
Your issue is probably here
fields:[{
name:"Developers:", value:"Sandra#3781\nclient.users.cache.get("648451669671149588").tag"
},```
you're basically doing this "Sandra#3781\nclient.users.cache.get("648451669671149588
I see
So it goes like this?
name:"Developers:", value:"Sandra#3781\n" + client.users.cache.get("648451669671149588").tag
},```
thats one way yes
Okay
another way is to use string templating
value:`Sandra#3781\n${client.users.cache.get("648451669671149588").tag}`
👍
hey
so basicly i have a welcome thing in my py bot
and i need the users to be able to set the channel in which the welcome message will be sent in
can the channel id be replaced with a placeholder/var which in this case would be {wc}
and would i need the {}?
thats the code if anyone wants to help! @client.event async def on_member_join(member): with open('wchannel.json', 'r') as f: wc = json.load(f) with open('welcome.json', 'r') as f: welcomemsg = json.load(f) channel = 'wc' await client.get_channel(741842774223224894).send("{welcomemsg}")
can anyone help me install node on a linux vm
Yep
install nvm (node version manager)
Ok, so basically, I've started a MongoDB cluster, how would I add authentication via uname/pass to said database?
from their github
leremy???
yes
I have node version manager what do I do with that
you can install node using that afaik
then nvm use yourversionhere
can nvm install npm aswell
yea
what's the command for it?
I think it does it automatically when you install node
Anyone know how to add auth to mongo?
wait shite i meant mongo
No, I'm hosting my own mongo cluster
hey
no no no, I'm setting up the cluster and I want to add username/pwd auth
im having a little issue
I know how to connect read and write
{'740715653295767562': 'Welcome (ping)', '666016790140157992': 'welcome (user)'}
that would be mongo side wouldnt it?
Yea.
it spews out everything from the json file
not npms side
how do i get it to only send one server's message
youd want to have a database
why?
json databases are known to randomly corrupt
client.on('guildCreate', (guild) => { guild.leave() })``` guys idk why but this code makes my bot leave a server if it's invite, pls help me!!! will give hugs in return
'cannot set property "_cache" of undefined'
how would i make a db?
step one, choose a database to use
theres mongodb clusters you can get for free
client.on('guildCreate', (guild) => { guild.leave() })``` guys idk why but this code makes my bot leave a server if it's invite, pls help me!!!
@earnest phoenix your waiting for the guild to add the bot then your leaving...?
na im jk
ohok:)
client.on('guildCreate', (guild) => { guild.leave() })``` guys idk why but this code makes my bot leave a server if it's invite, pls help me!!! will give hugs in return
ctrl alt delete x)
couldn't tell
lmao some people would acc do that
yeah its true
i sent in them code channels and it got deleted
ill do databases in the future
i mean is it like a MAJOR thing
or can i get by with json for a couple months?
no
sure, just expect your data to get randomly reset for those months
uhh json isn't a db
but how can i make it only send the message for the specific server
the json file has the server od
id
use a database
just use enmap smh
wtf is that
search it
sqlite is meh
client.on('guildCreate', (guild) => { guild.leave() })``` guys idk why but this code makes my bot leave a server if it's invite, pls help me!!! will give hugs in return
@earnest phoenix perhaps enough internet for today
nosql > sql > sqlite imo
ill just do it in the futture
tf is that download
but how can i make it not just send the enire json file?
ah yes jpg_large my favorite file type
but how can i make it not just send the enire json file?
🗿
json is a shitty poopoo thing used at frontend for sending data back to the back where it can be parsed into not json
you shouldn't be writing
^
just reading
well id have to rewrite like 200 lines of code
I use json for people who I whitelist to be able to run certain commands like dev commands
so ill do that in the FUTURE
bitch listen to me
ok
ok
ok
why is your json db 200 lines
use a database or cry
HOW
Hm, i am storing some guilds info in JSON files. Bout it ain't good solution
dont come crying to us when your "db" corrupts
json databases are like 3 lines of code
its not 200 lines
use a database or cry
@pure lion you make me cry :'(
not an excuse
databases aren't that hard
json databases are more complex than regular databases
ADS 
lol
i learnt mongoose in a day

well ill do that next weekend then\
I learnt mongo in a few hours 
just how can i make it not send eveything
@misty sigil frick
i learnt mongoose in 30 mins
some1 poonged me
@misty sigil haha funi ping mod
this will be super slow, but load the entire json db into memory, then parse it, and get the one guilds you want
ok
me and the boys using fs to write in our jsons
and if i were to use a proper db?
this will be super slow, but load the entire json db into memory, then parse it, and get the one guilds you want
^^
TypeError: No
youll have to redo this every time a new guild creates a custom server message
and if i were to use a proper db?
@drifting wedge depends what db
mongoose?
in mongodb compass you can import json files
you see I only use sqlite because I can't be bothered to setup a proper database hosting thing on my pc:)
wait is is free?
also can someone help me
ill check it out 1 sec
databases are generally free
is there any db that doesnt have a graphical interface where you can edit data
🤔
youd be hard pressed to find one imo
yeah
you need a sqlite reader
wait woukd i have to rewrite the thing to store the messages?
also can i use json for prefixes?
please dont use it for prefixes
also can i use json for prefixes?
n o
please no
Your storing messages...???
your users will be so frustrated
okay listen up 0Exe
imagine users setting your bots prefix, and it resetting randomly
is there any db that doesnt have a graphical interface where you can edit data
well, i am going to create db wIthout GUI
is MongoDB like website thing generally okay to use? Or is it something to avoid
then not knowing how to use the bot, and bam
you easybake oven, you chicken nugget. listen to what we're saying and get your head out of your ass
he's gonna Create an DB
Imagine taking in raw SQL queries & having someone use SQL injection on ur boat
welp i made a cluster
just looked it up, sqlite has a client

welp i made a cluster
praise the lord
Yeah but it's separate to the main thinf
lmao
well u can use mongodb on desktop, inside your code editor (extension) or on website
not youtube
but just simplify it pls
plox
there is make user and connection string
DB Browser is for SQLite
doesn't MongoDB have a limit on rows for free?
bruh who wants to write a whole essay for this guy but in json because he loves jsons
oh
Thats on heroku, because heroku is shit
doesn't MongoDB have a limit on rows for free?
me when the rows in nosql
shush
heroku hosts it for free 🤔
bruh who wants to write a whole essay for this guy but in json because he loves jsons
@earnest phoenix already did
Ok, so, what I've done is made my mongo database, but I'm still trying to make my auth system work
every time I try to implement it it causes errors 
how would i like make it write to mongoose tho?
Ok, so, what I've done is made my mongo database, but I'm still trying to make my auth system work
bitch stop copying me
bitch im not copying you
bitch i made it first

calm down ladies
do i need to download it?
calm down lasses
or like import it?
bITCh i'm using it for discord pereicvfxes and serber leaderbeorafds!
Calm down bros
calm down ladies
is mtf trans<
aight guys on topic
yes
how do i fix my mongo problem 
use the fix button
It just says connection refused whenever I try mongo in my ssh

y-
Only after I've implemented my auth system
there are two types of people
https://alebot.is-inside.me/J6XSyVlt.png
wait what do i connect it to?
No, I'm hosting my own cluster
oh ok
those with problems, and solutions
on my VPS
are you trying to connect remotely
what
Nah, I'm trying to connect using the mongo shell
are you do have ufw?
It works, until I break it with my account system
then don't break it
It works, until I break it with my account system
then dont break it you grilled cheese sandwich
i choose the second one for nodejs
i have python
Do you guys think it'd be worth the extra latency to use a remote DB for my sites multiple origin servers?
Do you guys think it'd be worth the extra latency to use a remote DB for my sites multiple origin servers?
nyes
nyes
so yeah it doesnt draw anything to the screen plij help
https://hasteb.in/irojoqir.cpp
same lmao
im supposed to be working on my mongo cluster
im getting some weird ass _cache error
That code hurts my eyes
:D
bUHT NOTHING WORKS
So much recursion
wtf is that

wtf is that
firewall
No.
Woo, excited for what im making yet AgAiN?
he is using the shell
the shell is using him
I'm telling you, I can connect from my PC to the database, UNTIL I add a user.
the shell is using him
the shell was an inside job
I'm telling you, I can connect from my PC to the database, UNTIL I add a user.
well then dont add a use-
¯_(ツ)_/¯
But I have to, or I leak data everywhere
🤔
thats atlas lmfao
your the one who suggested it
i did
oof
and i put it in my code?
how did i get on the atlas page
mon🅱️oose.c⭕nnect
wait wut?
If you've told ur DB to allow connections via ur local home IP, then 9 out of 10 chance its ur VPS firewall thats blocking it @misty sigil
how do i connect it?
If you've told ur DB to allow connections via ur local home IP, then 9 out of 10 chance its ur VPS firewall thats blocking it
my point exactly
wait i can do per IP?
https://help.ubuntu.com/community/UFW
@misty sigil
i have the code
how do i connect it?
see example
I don't have a firewall.
Oh God
lmao jeremy
At least a firewall that isn't blocking my mongo
i have ufw installed you nut
I bet you use root as well with password login, right? @misty sigil
sure
i mean, he said he can connect
its just client?
using root is also bad security practice
I have root login disabled, smh
why spam sudo when you can root
mines still enabled, but its keyed and passworded
Disable root login, disable password login, using a fresh user account, & using SSH will get you much better security

bigbrain
mines still enabled, but its keyed and passworded
just like mine
you do understand that means any programs also have root privalges
The moment a bot or person gets ur root login, its gg for whatever project you had running
:e
doesnt even need the root login, just get access to a program
^ That too
npm i fuck-me-over-bot -g
my cat just bit my elbow 
my favorite npm package
for no reason
ouch™️
Man this is making me paranoid, time to go check my VPS's security settings
my cat is my elbow
Someone else with common sense when it comes to basic Linux security
youll be fine
POGGERS
i obsess a bit over security
i haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaave uwufw
i reinstall windows from time to time when i get spooked.
just because i get spooked
wait
I OS reinstall every few months
also using ssh keys instead of passwords
^
i get panic attacks about my computers security
which is why I make myself tired so I cna sleep without one
what do i connect it?
im using py
and i dont get it
like do i add the connect thing to my code?
do i have to improt something?
pip install mongoose? bruh
Linux basic security configuration:
- Use & configure UFW correctly
- Disable root login
- Disable password login
- Configure VPS to accept SSH only
- Don't run programs as root
- Use fail2ban
- Don't configure SQL DB's to accept all IPs (a common mistake I see, for some reason)
- Use different accounts for different projects/programs
Anything else I missed?
wut?!?
ponogmy
different accounts for different programs when possible
for i in range(1, 10):
print(i)
i am a good programer
idk
what do i do
i dont know
i installed mongoose
Okay, so heres the updated list
mongoose is js
Linux basic security configuration:
- Use & configure UFW correctly
- Disable root login
- Disable password login
- Configure VPS to accept SSH only
- Don't run programs as root
- Use fail2ban
- Don't configure SQL DB's to accept all IPs (a common mistake I see, for some reason)
- Use different accounts for different projects/programs

so i cant use py?
anyone know why this says 404 not found var http = require('http'); var url = require('url'); var fs = require('fs'); const run = require('./mongodb.js') http.createServer(function (req, res) { var q = url.parse(req.url, true); var filename = "." + q.pathname; fs.readFile(filename, function(err, data) { if (err) { res.writeHead(404, {'Content-Type': 'text/html'}); return res.end("404 Not Found"); } res.writeHead(200, {'Content-Type': 'text/html'}); res.write(data); return res.end(); }); }).listen(8080); console.log('8080')
the error isss
because it's 404 not found
no duh
:)
time to go back to my cave
do you know how to read?
errno: -4068,
code: 'EISDIR',
syscall: 'read'
}```
sorry i only speak express
its so fucking confusing

ok bruh mongoose sucks
for the last time use pymongo
I AM TRYING
dont make me ping shiv to explain it to you
i have no fucking idea what im doing
its ping shiv time
i installed it with pip
its funny how yall shit on quick.db then when you switch to mongodb you shit on mongodb too
lmao
its funny how yall shit on quick.db then when you switch to mongodb you shit on mongodb too
quick = shit
quick is shit
whats the easiest way to do it?
just write it all down manually 
whats the easiest way to do it?
navigate to your windows folder and delete the system32 dir, you'll have a few errors but it'll run okay afterwards
quickdb i actually really dont like.
most other databases i think have a purpose
SQLite? @drifting wedge
quickdb is a good learning db, other than that. no
assuming youre on windows
Yes, SQLite3 is built into Python 3.x by default
so how would i connect it?
@earnest phoenix #memes-and-media
@pure lion bir soru soracaktım developmentle ilgili
I like how the mods just can't deal with Turkish speakers, so they literally assign #memes-and-media to deal with it
yeah
i dont turkish
its like that with any non English language
British or American English?
Tends to happen when they lose their only Turkish speaking mod I guess
there are still turkish-speaking mods afaik
My discord server ► https://discord.gg/BN6WaDs
(If you have any questions or just want to have a chat with us)
(Some Cool Stuff)
Nertivia ► https://nertivia.supertiger.tk/
My server in Nertivia ► https://nertivia.supertiger.tk/invites/B4tMwO
Install discord.py ► pip install...
guess I'm going to #memes-and-media
this is like the perfect vodep
it explains how to do welcome messages with sqlite
tim can you cpp
YouTube videos about Discord.py are shit in nature, because kids who have no idea what they are doing get into it, & a lot of times get bad information
im getting this [Error: EISDIR: illegal operation on a directory, read] { errno: -4068, code: 'EISDIR', syscall: 'read' } on this var http = require('http'); var url = require('url'); var fs = require('fs'); //const e = require('./mongodb.js') http.createServer(function (req, res) { var q = url.parse(req.url, true); var filename = "." + q.pathname; fs.readFile(filename, function(err, data) { if (err) { console.log(err) res.writeHead(404, {'Content-Type': 'text/html'}); return res.end("404 Not Found"); } res.writeHead(200, {'Content-Type': 'text/html'}); res.write(data); return res.end(); }); }).listen(8080); console.log('8080') so why
If you really wanna get into it though, I suggest doing that but mixing in an actual Python course, so you can actually learn & not make stupid mistakes like using an on_message event to handle commands like an idiot, like a lot of the YouTube videos do
just enough to make bindings to c libs for node
would you know about rendering and shit
nope
fuc

what kind of rendering?
you're trying to make a game engine?
awesome
:D
pls
@earnest phoenix really? you go do it in another channel?
rly dude
what is this
do it one more time and beaned
no ads
why
then stop!!!
did you even read the rules
i will personally bean you
anyways, this is not development related
i neeeeeeed help
https://hasteb.in/irojoqir.cpp
e
i can't put it on the site invite him pls
did you just advertise

yikes some people dont learn
@earnest phoenix can you see what the channel description says?
ah
or even the name of this channel?
not the brightest is an understatement also off topic
can we not emoji spam its annoying af
ops.......................
what did you do?
feels bad man
horror stories with clacson
borked the mongo install so badly i had to reinstall
f
borked
i have luckily avoided having to restore from a backup for my vps
im looking to buy some block storage here soon, spooked ill break something then
hopefully never so bad i have to reinstall tho
how do i completely clear my vps?
install the os again
\
heY i fixed it
im trying to take off the enter keycap sorry mods
hey wait wtf
i restored it to a point that the mongo works

im the engineer
and that means i solve problems
Exactly like the old grandmas. Slap it till it works again
how do i completely clear my vps?
@pure lion or request it be reset/reprovisioned
Do you publish the code of your bots on github?
no
Why
because I don't care if someone wants to copy my code(?)
mm
my code is on github, but in a private repo
ok honestly
idgaf
im using json
for now
i just need it so not spew out the intire file
i have a welcome thing, how can i make it so it doesnt sent the enitre json file?
yep
sorry
it has the server ids
yeah, parse what you want from it
...
afaik?
as far as i know
its set for 2 servers right
when someone joins it sends this
{'740715653295767562': 'Welcome (ping)', '666016790140157992': 'welcome (user)'}
parse it
its the server ids, and the message
i mean it takes 2 seconds to google
yes, but what would i parse it as?
helo, im trying to create a channel and give it permission for specific user





