#development
1 messages · Page 1115 of 1
great job @golden condor
client.guilds.cache.get(GUILD ID).channels.cache.get(CHANNEL ID)
Better solution
great job @jolly quail
are any pythonistas out here??
@jolly quail will the same code what you have run in js work on py
that class
Guess not
Idk
Np lol
It's better to just get_guild whenever possible
@slender thistle can I use Client.get_guild for that??
what to do for whenever a personn uses my bot cmd it shows in my channel
@slender thistle for sending a message in a specific channel
Yes, you can use get_guild
thanks shivaco
throw er; // Unhandled 'error' event
^
MongoParseError: Invalid message size: 1347703880, max allowed: 67108864
at processIncomingData (/rbd/pnpm-volume/ea7b8d63-a344-452f-af1d-a100f4db4008/node_modules/.registry.npmjs.org/mongodb/3.5.10/node_modules/mongodb/lib/cmap/message_stream.js:118:7)
at MessageStream._write (/rbd/pnpm-volume/ea7b8d63-a344-452f-af1d-a100f4db4008/node_modules/.registry.npmjs.org/mongodb/3.5.10/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
at doWrite (_stream_writable.js:415:12)
at writeOrBuffer (_stream_writable.js:399:5)
at MessageStream.Writable.write (_stream_writable.js:299:11)
at Socket.ondata (_stream_readable.js:705:22)
at Socket.emit (events.js:193:13)
at Socket.EventEmitter.emit (domain.js:481:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:276:11)
at Socket.Readable.push (_stream_readable.js:231:10)
at TCP.onStreamRead (internal/stream_base_commons.js:150:17)```
how to fix it ??
do you know how to read? MongoParseError: Invalid message size: 1347703880, max allowed: 67108864
make the message size smaller
e.z.
can anybody say me does top.gg provide a server to run our bot our we should have our own??
i didn't meant discord server @crystal socket I meant hosting server
thanks shivaco
^, try glitch and heroku, they are about average free hosts
heroku is kicking my a** off @crystal socket by throwing errors
No private code tho
heroku is kicking my a** off @crystal socket by throwing errors
@wanton anvil show errors
what to next ??
@umbral pollen oh lol, are you trying to get the e p i c badge? all of us are trying to get the badge cause its so e p i c bait not tooken
@crystal socket app not compatible with buildpack
Guys
If I linked something using fs.writeFile, how can I unlink?
I dont want to delete.
@crystal socket app not compatible with buildpack
@wanton anvil select another buildback
@crystal socket this is my first bot
I did it @crystal socket didn't work
@crystal socket this is my first bot
@umbral pollen k
If I linked something using
fs.writeFile, how can I unlink?
@feral aspen .
any help!?
?!
@crystal socket i made one bot with the java but it is not here and this bot , i am making with pythin
sorry python
I love python
@wanton anvil if you have the money, the eaasiest thing is just to get a real host
if(args[2]) {
let bioStatus = args.slice(2).join(" ");
if(!bio[user.id]) {
bio[user.id] = {
name: bot.users.cache.get(user.id).tag,
bio: bioStatus
}
fs.writeFile("./bio.json", JSON.stringify(bio), (err) => {
if(err) console.log(err);
});
message.channel.send(`Successfully setted your bio to ${bioStatus}`)
}
}
}
if(args[1] === "reset") {
bio[user.id] = {
name: bot.users.cache.get(user.id).tag,
bio: bioStatus
}
fs.unlink("./bio.json", JSON.stringify(bio), (err) => {
if(err) console.log(err);
});```
its about 3-4$/month
i don't need your code
maybe show the error 
Unexpected end of JSON input
I am making a profile status thing, where they enter the status and it will save it in a json file.
This is the code.
if(args[2]) {
let bioStatus = args.slice(2).join(" ");
if(!bio[user.id]) {
bio[user.id] = {
name: bot.users.cache.get(user.id).tag,
bio: bioStatus
}
fs.writeFile("./bio.json", JSON.stringify(bio), (err) => {
if(err) console.log(err);
});
message.channel.send(`Successfully setted your bio to ${bioStatus}`)
}
}
}
if(args[1] === "reset") {
bio[user.id] = {
name: bot.users.cache.get(user.id).tag,
bio: bioStatus
}
fs.unlink("./bio.json", JSON.stringify(bio), (err) => {
if(err) console.log(err);
});```
you posted that twice
I need help with nginx
So basically h o w
Do I make it work
Because it's not working from the online generator thingy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-cqdI_Z/discord/setup.py", line 5, in <module>
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
TypeError: 'encoding' is an invalid keyword argument for this function```
how to fix this ??
Because it's not working from the online generator thingy
@pure lion have you sshed into it?
Yeah I've followed all the instructions
how to fix this ??
@umbral pollen step 1. read. step 2. done
Yeah I've followed all the instructions
@pure lion so you've sshed in?
Yeah
Wait I'll send the error
how to make people add my bot
@delicate shore torture
oh wait i misread it, just make a good bot
LMaO
systemctl status nginx.service
wait no
mi errór
lmao im retar
nginx: [emerg] host not found in "*<ip>:443" of the "listen" directive in /etc/nginx/sites-enabled/ale-bot.xyz.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
I have a vagrant box that has been working fine for sometime and today for some reason I get the following when I attemp to restart nginx.
nginx: [emerg] host not found in upstream "www.myclass.co...
tanq
Someone make a stack overflow bot
we have tim
can someone make me a clear command (node js, basics) against a twitch mode command
what
no, we don't spoonfeed
inhales A D S
A suggestion with inhales ** A D S **
Hi so suddenly my bot is crashing after a few minutes
Any reasons?
I had it on GCP first and thought that the problem was from their side, but then i deployed locally and seems the problem is from my end
What's the error
There is no error
Does it log anything on console when it crashes
my server is running
nothing
my server is running
but somehow the bot becomes unresponsive
Do you log errors
yeah well i shifted it on local so anything that comes on the console is an error right? or should i add a logger?
Depends if you log anything else, if you don't log anything yourself then most of the things that are logged are errors
i was messing around on youtube and made a discord.js ai bot
i cant interpret this nginx stuff ahahahaahfhgsgfuheiughfisluehfiureiulbdsv im stuck and im not sure what to do
@twilit rapids I am printing all the pokemon that are spawning in various servers
somehow the bot becomes unresponsive after a few mins
:/
Then, can you show any errors that are logged
Hm
only the bot goes offline from discord
what do you use to develop?
Are you still running the application
Like, you don't close it or ctrl c or anything
yeah its still running
@twilit rapids can u join my server once and see? I actually added a new feature last night and it has been bad ever since. So i unloaded half of it
it can be loaded back anytime..
I'm good thank you, I'm not really sure what's going on though
For your bot to go offline without any errors whatsoever is weird
Without any other information I can't really help you
so i was double checking that
What library are you using
pandas for data frame, sqlalchemy for data base combined with psycopg2-binary and ofc discordpy
Then you could maybe ask it in the discord.py server
can u share with me the link?
@smoky forge did you monitor your Rescource Usage? looks like you load a ton of stuff on your VPS with your code
@pure lion i know a little bit
@lusty quest yeah it was still free.. also if resource would be full i would have got a memory error right?
not only ram. ive had a Command that accessed a API. Someone managed to get the AI to DDos my Bot. this got the Bot to become unresponsive
if you throw to much stuff at your bot to process it can also become unresponsive
Hey, I'm from Poland, so sorry for hurting in English, but I have a question, does someone have a script, for example, on the economy or something like that?
did you monitor your CPU usage?
@earnest phoenix i think you should change your Nick first. and if you use d.js the d.js guide has a example
Nvm this is development
Sorry for nick @lusty quest
@earnest phoenix you need a database
And you need to add on to the money
Thats really it
How cen i swtch frm db to mongo
Mongo is a db
i wrote myself a migration tool to switch from Mysql to MongoDB
worked almost perfect
Quick.db
@lusty quest coooooooooooooool
i require assistance with nginx, ive made a profile here but im not sure what to put in and what not to put in
you cant manage to use this tool? wtf i wrote the configs myself
what did you want to do with it?
make my express rtc app website thing accessible
||can I make a bot which helps people to tag everyone :)||
no
:)
did you want to use SSL?
yeah
you know how to get a SSL cert?
i have certbot stuff set up
all the files are there but i get this error
nginx: [emerg] host not found in "*<ip>:443" of the "listen" directive in /etc/nginx/sites-enabled/ale-bot.xyz.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
did you point the domain to your Server?
show your config
brb
server {
listen *ip:443 ssl http2;
listen [::]:443 ssl http2;
server_name ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/ale-bot.xyz.access.log;
error_log /var/log/nginx/ale-bot.xyz.error.log warn;
# reverse proxy
location / {
proxy_pass http://ip:443;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
}
# subdomains redirect
server {
listen *ip:8080 ssl http2;
listen [::]:443 ssl http2;
server_name *.ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
return 301 https://ale-bot.xyz$request_uri;
}
# HTTP redirect
server {
listen *ip:80;
listen [::]:80;
server_name .ale-bot.xyz;
include nginxconfig.io/letsencrypt.conf;
location / {
return 301 https://ale-bot.xyz$request_uri;
}
}
where is your root?
which is that :d
the path to your web directory
root /var/www/example.com/public; add this below your server_name and edit the path
It's var/www/example.com but ale-bot.xyz
edit the path to match your settings
also did you got the ip inserted? bcs *ip will not work
is ip your server ip or just ip?
It's my server ip
remove *ip:
i havent done nginx configs in a while, i just take what the digitalocean page you send me offers
yes but it should be only the port
why did you set a ip there?
I didn't, digitalocean put it there
yea bcs you havent defined it
nginx: [warn] server name "/var/www/ale-bot.xyz/" has suspicious symbols in /etc/nginx/sites-enabled/ale-bot.xyz.conf:4
nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored
ran nginx -t
syntax is okay
okay
(the folder and in the config)
Is it weird that a letsencrypt file randomly appeared when I edited?,
it just refreshed the file index
why?
There is someone who can give you a script for tickets ?
When I go to the IP it shows the welcome to nginx thing
but dont question it if it works
if you do you get headache bcs you break it and then try to fix it again
possible
It's being used by nginx
so you got 2 nginx instances?
or did you got apache2 running next to nginx
This was a blank vps
alternative try to bind it to your server ip.
Through?
some linux installations come with Apache preinstalled
some wired behavior
the config you got from DO already tryed to bind the Ip but the syntax was wrong
serverip:port should bind nginx to your serverip on the port
Where do I put it tho I'm so confused
also dont confuse the IPV6 ip with the IPV4
bcs it defaults to this path
Alrighttt how can I change that?
set a root directory like i told you
Unknown directive public
did you edited the path to match your path?
Yeah
why does it then cry about puplic?
Ran -t and that's the error
ok its fixed
wait until @hallow frigate realizes that me, Tim and a bunch of others speak Hue-Hue
@opal plank Oh really? that good :D
so i have a json object inside a js file, and it looks like that: js "commandNames": { "avatar": "avatar", "help": "aide", "loop": "répéter", //... } . I want to create another object named commandIntervedNames that i can use for other stuff, that basically will look like this: js "commandInvertedNames": { "avatar": "avatar", "aide": "help", "répéter": "loop", //... }. How can i do that without having to re write the translations made in the first object?
@lusty quest now getting 404 not found when I go to ale-bot.xyz
does it worked before?
Nope that's the first time it's loaded something other than not found
function swap(json){
var ret = {};
for(var key in json){
ret[json[key]] = key;
}
return ret;
}
@tight plinth pulled from stack
is the config valid?
is it valid?
hm
nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
looks somehow fine to me
is your path correct? does your root directory point to the directory where you got your files for the website?
if you are in /var/www try to add your folder name behind your ip in your browser
you have somewhere an error, im to tired to figure this out
a h s h i t
is it possible to assign persistant storage to a runnning docker
without stopping or restarting it?
nope
ugh idk what to do
server {
listen 80;
listen [::]:80;
root /var/www/ale-bot.xyz;
index index.html index.htm index.nginx-debian.html;
server_name ale-bot.xyz www.ale-bot.xyz;
location / {
try_files $uri $uri/ =404;
}
}
this is the content of my ale-bot.xyz (not .conf) file
Any free 24/7 discord bot hosting?
I want free 😛
use glitch or heroku 
embed.add_field(name="Roles:", value=f'{ctx.guild.role}', inline = False)
my code is not working
@finite nimbus
he wants a free 
anyone know how i can use canvas as image in an embed?
so in the ytdl-core-discord lib, how can i see where of the music i am right now? like 1:30 / 3:00 ....
@misty sigil .attachFiles
me wen the
so in the
ytdl-core-discordlib, how can i see where of the music i am right now? like1:30 / 3:00....
anyone ??
but im using ytdl-core-discord one
https://www.npmjs.com/package/ytdl-core
@faint prism i messaged in theytdl-coresupport server, and they saidytdl-core-discordisn't for them, so they dont know too!
@lethal pine have you fixed your issue yet
Examine the source https://github.com/amishshah/ytdl-core-discord
And if it doesn't work the way you want it to, fork it or implement it yourself. These NPM packages are sometimes terrible.
@muted venture
ok, thanks
hello
let text = args.slice(1).join(" ");
const embedd = new Discord.MessageEmbed()
.setColor('#0012f5')
.setAuthor("Unknown Error", bot.user.avatarURL())
.setDescription('**Usage** : **-challenges {week number}**');
if (!text)
return message.channel
.send(embedd);
if( args[0] == "1") {
i did something wrong ?
I gotta figure out these embeds
@earnest phoenix is that a npm package or web scrapping #development message
what
@viral iris how
How do you have owner
Written next to your name ?
Owner badge
i need help ;-;

BOIS
mee6 is off
i need help ;-;
@viral iris
Pls tell plugin ;-
servers are dieing
BOIS
mee6 is off
@cobalt spruce
I know
keep this channel on topic please
Hmm
let text = args.slice(1).join(" ");
const embedd = new Discord.MessageEmbed()
.setColor('#0012f5')
.setAuthor("Unknown Error", bot.user.avatarURL())
.setDescription('**Usage** : **-challenges {week number}**');
if (!text)
return message.channel
.send(embedd);
if( args[0] == "1") {
why this happen
Plugin ;-;
How are you splitting args
^
i need it like -challenges -> first embed
-challenges 1 send the next commans
How u defined args
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
how can i fix it?
Same error as before
You cannot use properties of undefined things
Check if its defined before doing .get
Every time you get that error, it means the same thing
yo @viral iris pls tell plugin name ;-;
Your error tells you what line the error is happening at
at Object.run (/Users/alitugratasci/Desktop/humpty/commands/reaction.js:38:42)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18094) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18094) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:18094) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
at Object.run (/Users/alitugratasci/Desktop/humpty/commands/reaction.js:38:42)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18094) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)```
full error
check reaction.js line 38
Okay
Second line of the error says the location
reactionroles is undefined
nested lambda functions are insane how much space they save
"this error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch()."
All that means is you have an unhandled error
@lethal pine have you fixed your issue yet
@slender thistle yup
The unhandled error being using undefined.get
guys do u have any good lib for playing music from spotify? soemthing same as ytdl-core but for spotify
Spotify doesn't have an api for playing music like that iirc
Spotify should have it's own api if nobody has a package
Hm
I believe it has a developer section
They have an api for getting song data, but not playing right?
@solemn latch so how the rythm and other bots can play from spotify?
i forgot that that
right, that's the only use case I've had
Idk if there is an api call that streams bytes lol
I was told rhythm takes song data from spotify and plays from youtube
That's a good work around
More likly to be the right song
@solemn latch so there should be a spotify to yt convertor api or some shit....
Spotify API is really friendly though 🙂 I've used it before
@faint prism so do u have any example to use it in nodejs? cuz i really didn't found anything in github
there are npm packages
@earnest phoenix is that a npm package or web scrapping #development message
@delicate shore
what is?
@honest perch what?
Looks like a command 🤔
Idk about that. Why not use their api docs..? It really is easy to make the GET requests
@honest perch is it have anything like get the link and play it?
@faint prism my vps has some issues with sending request, so i dont think that would be a good idea, or maybe takes some time for me to buy a better vps xD
Wrappers just make the request for you
You can't make GET requests from your VPS...?
@faint prism it send 3 times request, and i have no idea why
@honest perch
This uses cheerio to scrape the spotify twitter widget so it is unsanctioned and likely to break
lol idk about that package
but for production code? Maybe not the best dependency to add to a project
https://www.npmjs.com/package/spotify-url-info
ok there is nothing as music file in that package
it just returns the spotify link
"title": "Immaterial",
"type": "track",
"track": "Immaterial",
"artist": "SOPHIE",
query title and artist
into youtube
And use a youtube-dl to grab the media stream
and plug that into the discord voice chat stream
Should be a property outlined in discord js docs you can check. Someone else might drop the link if you can't find it.
<Guild>.me.permissions
?
ok thx @solemn latch
How you deleted the file or how you copy pasted code into another file?
File "<fstring>", line 1
(ctx.guild.)
^
SyntaxError: unexpected EOF while parsing``` please help
you have a syntax error
import discord
from discord.ext import commands
from discord.utils import get
import time
import asyncio```
geting error in import discord
line 1
is it downloaded
what error are you getting
File "<fstring>", line 1
(ctx.guild.)
^
SyntaxError: unexpected EOF while parsing``` please help
@slender thistle
running a simple code
hm
Sorry, only chicken soup
thats your problem i suppose
Checking
remove the .
@misty sigil
remove the . from the end.
yes
There is no .
are you sure you installed discord.py on the right Python version
anyone know how i could make a basic api to post my bot's stats?
Do any of you have experience with using google sheets as a database?
Is it efficient?
wtf
xD
Hi
must be a joke XD
Who uses dbm
google discord bot economy leveling system lmao
I only use bing
Don't expose your token
its just the first bit
still
the first two parts are useless
^
How are you running the bot
still
@sand crown dont worry about that
How are you running the bot
@slender thistle means ?
How are you executing the bot files
what do you enter in your terminal to run your bot
anyone know how i could make a basic api to post my bot's stats to?
python3 -m pip show discord.py
don't name your files/folders to discord if there's any
if we only restarted the bingo, screenshots are a thing Avi
im making a membercount bot for some dude, whats the ratelimit to renaming channels
prob bad idea to automate api that way. at least make it an hour or two if you're going to
i mean when someone joins the server it checks last time the bot changed the channel
2 changes per 10 minutes to my knowledge
but it's not good to try getting close to rate limits
go for at least an hour, that'd be my recommendation IF you want to do it

@lethal pine Please consider formatting code & tracebacks properly next time, or pasting to something like https://hastebin.com/about.md
It makes reading code much easier, & you are more likely to get help if you do so
^ Another reason to do what I mentioned in my above message

show the whole error
show us your CONSOLE, like the whole thing
Please consider formatting code & tracebacks properly next time, or pasting to something like https://hastebin.com/about.md
Please consider formatting code & tracebacks properly next time, or pasting to something like https://hastebin.com/about.md
Please consider formatting code & tracebacks properly next time, or pasting to something like https://hastebin.com/about.md
@earnest phoenix
higher
thats still cut in half
missing permissions
hey guys
hi
should i make a public api for my bot
check for permissions before sending messages and if the message isnt empty
What would you need it public for
because i cba to make it private
I mean, chances are depending on ur framework/language
It won't take much to make it private at all
what is the API gonna do
not much
Django for example takes literally 1 line of code to do so
literally just display server count
if it does not need to be public: make it private.
if there is some to benefit from making it public: consider making it public
ddos time again 
lmao im sure ill make it private
for example, dank memer has a public api

cringe
who uses your bot?
o no, whatever shall I do
:/
:pepehands:
The Missing Permissions error means your bot tried to do something it did not have permission to do. The stacktrace is not very helpful but you could experiment and see where the error is coming from.
'im not using commands, surely no one in the 109 servers isnt'
make a global permission checker
When it comes to debugging, 2 things you should know
- Google is ur friend
- Spam print statements everywhere if you literally have no idea where its coming from, to help narrow it down
check if the bot has the permissions it needs before sending the output
dont spam print statements
- Spam print statements everywhere if you literally have no idea where its coming from, to help narrow it down
no love for built-in debuggers
they're both fine imo but built-in debuggers can usually do more
dont spam 30 print/console.log statements
you'll just add useless stuff on the bot + having to restart it to apply changes
unless you re-requiring dynamic commands
*which varies on your language
then you'll end up forgetting half of those console.log/prints in your code and you'll get bombarded with console spam down the line
console.Log("got to the for loop")
console.Log("completed for loop")
console.log("did the image editing")
i see nothing wrong with that XD
We can add our bots to that server?
define "that"
-_-
debugger > print/console.log()
the fact that yuo dont need to restart the bot/reload commands?
that you can trace all the variables and values as the code runs?
that you dont pollute your workspace with prints/logs?
that you use proper debugging tools?
¯_(ツ)_/¯
idk @earnest phoenix i may have a couple reasons
ooo
to make a high quality vector
then I just put it on a background (it was transparent) and made a 20px border
I don't even have an account called "Proton" lmao
I still need to replace the video stock photo that I had there for testing while I was designing
O and the text moves
and it's all responsive
tho the vimeo embed kinda big on mobile
bot goes online and offline when i tries to make it come online
and after 20 tries it finally comes online
@slender thistle now it is working
i have re installed discord.py
and it is working fine
thankx for helping me @slender thistle
u pinged him twice
xD
legends say 3 times gives you free nitro
@zenith terrace
try {
command.execute(message, args);
} catch (error) {
message.channel.send('there was an error trying to execute that command!');
if (message.author.id !== '')
}
who know how to script
Should that if be above the send?
xD
-ask2ask
dont ask to ask
Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.
Please read https://dontasktoask.com/ for an explanation on why this is an issue.
make a bot
#502193464054644737 @fathom jetty
o
if you dont, first step is learning a language for programming
sad....
or C# if your anal about data types like me
python prob easiest to learn if thats what u care about
....
but js has the """"best"""" discord library (I think)
debatable
need a lot more quotes in that 'best' mate
I think
no
ask others about what?
if you hoping for spoonfeeding, no one will do that, be it here or elsewhere

helping me make a bot
I wonder what answer you are expecting
we can help, we wont give you pre-made code though
They gave you the right direction to make a proper Discord bot and you refuse to listen 
we expect you at least know the basics of a programming language to get you started
well, to get started, you need to get started
leave()
nicely done
lol
it does
are you ok
thats why im asking if they have multiple event listeners for message
im making a userinfo commands, somebody knows the function to get: msg.author.precense or something?
presence*
msg.member.activity probably
py or djs?
presence is attached to members, not users
anyone know what's wrong with my svg? it does not do this when scaled up
I'm talking about the tiny line
you can access via author
Interesting
its rather convenient
omg im retarded
d.js has a resolver already
i was doing it by hand
LMAO
lmao rip
i have one listener for every cog 😎
Giving the reaction + under the user's message, he gets experience. Anyone know how to do this in DBM?
Discord Bot Maker
funny enought if you have asked me this a year ago i would know a answer
but now i can only give you one in plain js.
better ask in the DBM discord
sup i deleted the default file and made the root of my website the correct one but im still getting the welcome to nginx also its not letting me point to it using my domain
Eww DBM
Oh shut up
@pure lion are you sure you deleted the right file?
99% sure
@pure lion change it in sites_enabled
idk in sites enabled theres a shortcut to the default file
Oh god, are you on linux?
yea
K, what folder are you in (pwd)
welcome to the club
k...
alright
so
s o
nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored
s o
show me ur nginx.conf
great..
umm why are they shortcuts...?
what did you do?
is this just a fresh install of nginx?
sites-available and sites-enabled are two separate folders
standard nginx configuration usually includes symlinking the config files between both
What distro are you on?
english
k
so if you change one, the other is changes as well
its normal for them to be shortcuts
so yeah what the fu-
but its not normal for you to have two config files for the same website
Idk, I don't use nginx as a web server...
delete the xyz file and keep the .conf file
also check the other folder to make sure it matches
the one not named .conf has
server {
listen 80;
listen [::]:80;
root /var/www/ale-bot.xyz;
index index.html index.htm index.nginx-debian.html;
server_name ale-bot.xyz www.ale-bot.xyz;
location / {
try_files $uri $uri/ =404;
}
}
the one named .conf has
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ale-bot.xyz;
root /var/www/ale-bot.xyz/;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/ale-bot.xyz.access.log;
error_log /var/log/nginx/ale-bot.xyz.error.log warn;
# reverse proxy
location / {
proxy_pass http://145.239.115.76:443;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
}
# subdomains redirect
server {
listen 8080 ssl http2;
listen [::]:443 ssl http2;
server_name *.ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
return 301 https://ale-bot.xyz$request_uri;
}
# HTTP redirect
server {
listen 80;
listen [::]:80;
server_name .ale-bot.xyz;
include nginxconfig.io/letsencrypt.conf;
location / {
return 301 https://ale-bot.xyz$request_uri;
}
}
ye get rid of the non-conf one
alright
on the subdomains redirect section
https://alebot.is-inside.me/fNYzriQr.png
when i type in da ting
now the reverse proxy part is also wrong
assuming your node server is in the same machine
is your A Record for the domain correct?
proxy_pass should be localhost or 127.0.0.1 and your node.js port
theres no a record yet jajajajajjaja
Can you go elsewhere please
@coral trellis
@slender thistle
@star
lmao
@sinful belfry qt help us
Ty
throw the -atmod bomb
Get that bread
Ok hes gone
Whats happening in here lol
Just a spammer, mods saved us
Oh lmao
tim is port 8080 okay for the reverse proxy ting?
Depends
If your local port is 8080
yes its fine
is port 8080 free?
Should be fine
it should be the port your node.js is using
You should use port 80 for nginx
with http://?
Unless I misunderstood
The reverse proxy isn't the port nginx is using @golden condor
What
did you upload the nginxconfig folder and all the extra conf files?
yes lol
yes, it doesnt matter for proxies
h m its not working
proxy_pass ignores the root folder
oh
yeah theres still nothing
https://alebot.is-inside.me/fNYzriQr.png
same damn thing
You said earlier you have no a records
i made
*cryig*
There are ways to check it
https://dnsmap.io/
Check the current IP of your domain name or hostname from multiple DNS nameservers and resolvers from all around the world. Instant propagation check.
You should use cloudflare
Free DDoS protection plus it's proxied so it instantly propogates dns
Am i the only one who hates cloudflare
Yes
A lot of the time discord going down is because cloudflare
why tf would you hate them?
If you can give a justified reason for hating it then fair enough
It just goes down a lot.
The number of reroutes is insane
its possible that its not even cloudflare
A lot of the time discord going down is because cloudflare
@solemn latch no, cloudflare is rarely ever down, there was only tat one time.
like even large Websites rely on Cloudflare
Really? Discord was blaming the increase of client ping for months on cloudflare
Discord was really unprofessional for ages
This was a few weeks ago
If they didn't have cloudflare, they would be ddosed all the time
Cloudflare isn't the only ddos protection provider
Yeah
its possible that they configured something wrong
But it's one of the best
Its one of the largest, not the best imo
discord often goes down because of gcp, not cloudflare
And they provide the services for free on unlimited domains, that's a massive thing.
there have been a few instances of downtime because of cloudflare, the rest are gcp issues
that too
hm
their staff are extremely incompetent
Welcome to Cloudflare's home for real-time and historical data on system performance.
🤷♂️
Theres just always something going on with cloudflare
They have hundreds of servers
What do you expect?
am i blind
like i said, blame the furry staff https://cdn.discordapp.com/attachments/655288690192416781/731191846277087302/4bdtwft4ui541.jpg
re-routed does not mean that it's down, it just means it's been rerouted to another server
Just because a few are rerouted doesn't make it bad.
okay its propagated but still no work
🤷♂️ reroutes often mean periods of downtime
is it actually cloudfare that is having issues rn?
It just means that those servers are re routing their traffic
No
Cloudflare is fine.
*cries* lmao what do
so whats this whole convo on about?
I dont like cloudflare
Provide a valid reason why.
Id rather pay another company for ddos protection
You don't have to pay for cloudflare
Which I do
i dont like not having access to my website so please help
free and good or paid and good?
And their free plan is good enough
Absolutely it is
@pure lion show your current conf file
But what is the problem with them, I don't understand
for?
Nginx
the website conf file
o
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ale-bot.xyz;
root /var/www/ale-bot.xyz/;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/ale-bot.xyz.access.log;
error_log /var/log/nginx/ale-bot.xyz.error.log warn;
# reverse proxy
location / {
proxy_pass http://127.0.0.1:8080;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
}
# subdomains redirect
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name *.ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
return 301 https://ale-bot.xyz$request_uri;
}
# HTTP redirect
server {
listen 80;
listen [::]:80;
server_name .ale-bot.xyz;
include nginxconfig.io/letsencrypt.conf;
location / {
return 301 https://ale-bot.xyz$request_uri;
}
}
oof
e
your node.js server is on right?
yeah
can you see it if you access youripaddress:8080?
Did you let this stuff past ufw?
you cant see your node.js server?
Ufw status
nope
One message removed from a suspended account.
One message removed from a suspended account.
@sage bobcat no
try this:
add another location block in your config file with something like this ```nginx
location /test {
return 200 'ok';
}
then try accessing youripaddress/test
ok
right after your reverse proxy
a
or before
doesnt matter
btw
do the same in the port 80 server block
right before or after the return 301 location block
alright
Just don't block 22. Whatever you do, don't block it.
gets locked out<
Install UFW on VPS -> Enable UFW and block all risky ports -> SSH connection terminates -> ??? -> Profit
Client.user.id right?
No.
Problem.
Bro.
The docs are great for that stuff
The guide isn't the docs
took too long to respond
CPU holding up okay currently. It has a few guilds and one extremely active one... Kinda nervous it's at 20% already ngl
Does anyone else see this error occasionally?
A MessageReceived handler is blocking the gateway task
you can try sudo ufw allow in "Nginx Full"
to unblock all ports nginx uses by default
Does anyone else see this error occasionally?
A MessageReceived handler is blocking the gateway task
@faint prism you're blocking the handler for more than 3 seconds
the handlers are on the gateway thread
just run your blocking methods in another task
tim
did windows get rid of the pip feature for videos?
did windows get rid of the pip feature for videos?
windows never had native pip?
got rid of test
yes we didnt specify a content type, so it defaults to octet-stream which is a download
502 bad gateway
nvm, it was firefox @earnest phoenix i swapped to chrome when i reinstalled windows a few months back
damn, maybe i should go back to python
fantastic feature






oh no no no