#development
1 messages · Page 489 of 1
Heroku: https://heroku.com Git Download: https://git-scm.com/downloads NodeJS buildpack command: heroku create --buildpack https://github.com/heroku/heroku-b...
Watch that
All of it
I mean just heroku site
Well I can't watch videos rn
¯_(ツ)_/¯
Then copy all file contents like normal?
set up a git ignore that ignores node_modules and package lock
then install the heroku cli
open up your wonderful cmd or pwsh
git init in the dir
git commit -am <reason>
git push heroku master
that should do it
I can't even code on it
msg.channel.send('Alrighty, where will the poll be sent?')
.then(() => {
msg.channel.awaitMessages(response => msg.content, {
max: 1,
time: 30000,
errors: ['time']
}).then(collected => {
let channel = msg.guild.channels.find(c => c.name === collected.content)
if (!channel) return msg.channel.send('That\'s not a valid channel!')
msg.channel.send('Alrighty, got that, next! What will the poll name be?')
})
})``` this seems to not wait at all https://i.imgur.com/iqNLqcI.png
it immediately assumes a message was sent in the channel
is there something im doing wrong?
ohh
so make it only listen to responses from the command executor
check if response.author.id is message author id
alright, and if its not?
it does nothing
does anyone know a good character to replace these blocks with?
the blocks have lines in them so, eh
▬
tbh the look is quite nice and I wouldn't replace you
Compare the position of the role to the position of the highest role of the bot.
<Guild>.me.highestRole.position < <Role>.position
alright, thanks
whats the log
having this problem while using heroku cli to host my bot
so like
oh
whats that file called that has basically
worker: node app.js
i think you need that
Not procfile
then?
the fucking dashboard
how to modify it?
how to edit and add it??
how you added it?
Make sure the p is capital. Procfile
add this in procfile worker: node index.js
already
okay
git commit -am <reason>
git push heroku master
make sure you are in your dir
and have both git and heroku installed
windows explorer?
It should look something like this
idk then
are you sure you are logged in via the heroku cli
There should be this in the filepath
i dont have this
what
if you still don't have it @earnest phoenix then do $> cd <dir> $> git add .
i can see a .git folder
but still cant see worker
what do you have in your .gitignore
if you don't have one create one node_modules/ package-lock.json .idea/
Why are there files with 0KB in them
your branch is upto date
ofc its not tracking those
what are they filled with
nothing
idk just delete them as long as they are not required in your code
anyone know how to get the version of Eris your on from the code?
i fixed it
get it from package.json
halp someone teach me how to make help menu embeds in py
Isn't it like require('something').version? @sick cloud or are you talking about something else
i tried Eris.version but its undefined
yes
Could try using child_process and running npm info eris version and getting the callback from that.
i got it now, its just VERSION lol
Why this no work?
msg.content.replace(new RegExp(`<@!\\?${client.user.id}> \\?`), set.prefix)```
how doesnt it work, please elaborate
It's supposed to be code for a mention prefix
But it doesn't detect anything
The thing is
It works on regex101 https://i.imgur.com/4nfh1IF.png
When I log the constructed regex, I get this /<@!\?443374895783477248> \?/
dont escape the ? @deep inlet
well ? means optional so the ! is optional cos ita only for nicknames
msg.content.replace(new RegExp(`<@!?${client.user.id}> ?`), set.prefix)```
It's for spaces
Make the space optional
But even if I remove it the regex doesn't catch anything
on phone so hard to test and help
have you checked if the regex is matching? without trying to replace
check regex101. also not sure if template literal causes issue
also u shouldnt write to message content 😡
The screenshot I posted is from R101
How do I call an object variable but with a property changed for that 1 time? (JS)
because AI
Also, @trim saddle 
i mean this is my current code but it no do anything
Embed builders 🤢
I can't help, sorry
Dunno how to use 'em
(Embed builders for Python)
How do I get the eqmarry command working
@cold harness what
Wrong person?
Oh, my bad
Field value cant't be falsey lol
Field title cant be null or empty
Yeah, thanks for rephrasing that
...
search on youtube
just say: "i dont know any coding or problem solving skills so im asking in here for somebody to get frustrated tryign to help me"
I want to code with this software
its an IDE 
also what is this app name
@hot sleet i'm french
fuck
i mean coding language
and which module u use
all that
you don't know any of these
Visual Studio code
Learn how to code
You need to figure out what coding language you want to work in. There are many popular ones like discord.js and discord.py
I was referring to the langauge that the library wraps the API in
yeah but erise in node.js too
thats not very family friendly
@earnest phoenix 'I want to code with this software'...
code then 🤔
erise
it's an implementation on js
someone can help me for this?
Show code
@topaz fjord which one
Also
This might help
that usually means your code is doing an infinite loop
how can ı fix that
show your code
no
No
then?
yes
What
<a href="link">
k
Oh ok
I'll look at a tutorial
@quartz kindle https://github.com/wache4starsz/wolfy2
im not gonna read all your files
the problem is when using return-deep-diff
check your files and look for something that uses that package
@quartz kindle where i can put the code?
in your bot's html description
yes
@quartz kindle
How do I replace this with an image?
body {background-color: lightred;}
Thanks
@earnest phoenix also, there are loads of CSS snippets / templates / guides
Just try to google what you want to see on your profile, and you'll most likely find it
i need help on my new prfiex
@earnest phoenix ?
How can we help without seeing the actual problem? -_-
K
-reason
what
this does nothing
msg.channel.overwritePermissions(member, {
VIEW_CHANNEL: true,
SEND_MESSAGES: false,
}).catch(err) ```
VIEW_CHANNEL and SEND_MESSAGES should be strings
No
unless you declared them somewhere or you're using enums
how do Imake it a string
'SEND_MESSAGE'
'': true ?
'SEND_MESSAGE': true
still dont work
Log the error
nothing works now
they don't have to be strings
^
in object literals you can do just k: v
the whole command dont work and the bot logs no errors
Try passing console.error instead of err inside catch
and you shouldn't have that comma after SEND_MESSAGES: false
how can i see the amount of votes for my bot?
huh
Works now @frigid bone tyvm

For mute how would I make it go through all the chats and do it?
const ddiff = require('return-deep-diff');
module.exports = (oMember, nMember) => {
console.log(ddiff(oMember, nMember));
};
@quartz kindle
ı found that
would this work?
msg.guild.channels.forEach(async (channel, id) => {
await channel.overwritePermissions(member, {
VIEW_CHANNEL: true,
SEND_MESSAGES: false
});```
to make the user not be able to chat in all channels?
ok, so if there is no embed, it cant be created, because aome parts are missing, how do I detect it and send a error message?
what
In what context would an embed not be able to be created?
@high tinsel you cant make fields that have no text in
@idle mountain would that code work?
Oh like that? ^ just check if the field’s text length is null or its length is 0, if so then put a 0-width joiner or an emote with no pixels or something
Idk, I’m not familiar with JS permissions, sorry
Try it
k
I know, it is for a gif command and if it does not find any gif, the npm does not respond
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
this is used in the embed
so when it finds no gifs nothing is posted
i need it to say there are no gifs of this thing, or something like that
@earnest phoenix that code should work
Well your library should return an error when it can’t properly post, just a quick try{} catch{} would work
Try to send the embed, catch the error, if caught then send the error message
The best way to do that would probably be to ask giphy directly if the go exists, but eh
module.exports = (oMember, nMember) => {
console.log(ddiff(oMember, nMember));
};```
if (err) message.channel.send(err);
is already in my code
but does not do the thing
it dont it just complains about code under ut
@topaz fjord
nvm i was just being stupid
giphy.search(message.content.replace("ne gif ", ""), function(err, res) {
if (err) message.channel.send(err);
const embed = new Discord.RichEmbed()
.setTitle("🖼️ Gif")
.setColor(3447003)
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
message.channel.send({embed});
});
}``` the whole code, hopefully this will help you understand
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
^
TypeError: Cannot read property 'embed_url' of undefined
allways this error
no matter what I do
it just puts this in my console 😦
Log res.data before you create the embed
giphy.search(message.content.replace("ne gif ", ""), function(err, res) {
if (err) message.channel.send(err);
if(res.data === null){
console.log("works now")
return
}
const embed = new Discord.RichEmbed()
.setTitle("🖼️ Gif")
.setColor(3447003)
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
message.channel.send({embed});
});
}```
this is with null
but I tried undefined too
nothing works...
Try logging it outside of the if statement
oh, it is []
not null
🤦
giphy.search(message.content.replace("ne gif ", ""), function(err, res) {
if (err) message.channel.send(err);
if(res.data === "[]"){
console.log("works now")
return;
}
const embed = new Discord.RichEmbed()
.setTitle("🖼️ Gif")
.setColor(3447003)
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
message.channel.send({embed});
});
}``` ok, now it is this, but the error did not change 😦
J's?
py
Oh sorry, can't help I do js
Well it only work with the discord.js lib
my css isnt working for dbl
@vernal rivet .setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
^
TypeError: Cannot read property 'embed_url' of undefined¨ (same error as before)
@craggy fox mine either XD
why though?
I messed up my whole bot page XD
mine used to work
welp im just bad XD
@high tinsel did you define embed_url?
@craggy fox are u good at it ? idk XD still looking for someone that can help me
Oh wait
embed_url does not even need defining
mine should work since it worked last time
o
the error is in the
if(res.data === "[]"){
console.log("works now")
return;
}
part
not being able to filter the error response
foe some reason 😦
Check and make sure the URL you are providing is real
it is, the problem is when the gif if that thing does not exist
it gives back
[]
and this
if(res.data === "[]"){
console.log("works now")
return;
}
should detect it and return...
It should be if(res.data === []){
^
Don't put [] cause it's a array, array usually doesn't go in a message unless it's a object
The do this do
let gif = []; If(res.data === gif){
can anyone help with the custom css thing for the website
mine stopped working for some reason
does not help 😦
Ummmmm, can you send the full error? I am a person that needs to see the full error
@cosmic swallow i can help u.
Activity Log
/app/server.js:161
.setImage(res.data[Math.floor(Math.random() * 5)].embed_url.replace('giphy.com/embed/', 'media.giphy.com/media/')+'/giphy.gif')
^
TypeError: Cannot read property 'embed_url' of undefined
at /app/server.js:161:57
at IncomingMessage.<anonymous> (/app/node_modules/giphy-api-without-credentials/index.js:199:15)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
@neat vault with XD the website or the py thing ?
py thing
ok
Aaaaaaahhhhhhhhh, your url is being replaced aaaaaaahhhhhhhhh OwO
https://i.imgur.com/dG5y7ti.png
.addField(`Latency:`, `${msg.createdTimestamp - msg.createdTimestamp}ms`, true)
@high tinsel check the discord.js documentation
what part of it..?
It's not d.js related the d.js docs won't help you
?
const ayarlar = require('../ayarlar.json');
const moment = require("moment");
var request = require('request');
request('https://www.doviz.com/api/v1/currencies/EUR/latest', function (error, response, body) {
if (error) return console.log('Hata:', error);
else if (!error) {
var info = JSON.parse(body);
var prefix = ayarlar.prefix;
exports.run = (client, message, params) => {
if (!message.guild) {
const ozelmesajuyari = new Discord.RichEmbed()
.setColor(0xFF0000)
.setAuthor(message.author.username, message.author.avatarURL)
.addField('**Eğlence Komutları Özel Mesajlarda Kullanılamaz!**')
return message.author.send(ozelmesajuyari); }
if (message.channel.type !== 'dm') {
const sunucubilgi = new Discord.RichEmbed()
.setColor(`RANDOM`)
.setAuthor("Beinz Bot | Euro Verisi")
.addField(':euro: **Satış Fiyatı:**', info.buying)
.addField(':euro: **Alış Fiyatı:**', info.selling)
.setTimestamp()
return message.channel.send(sunucubilgi);
}}}
});
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 0
};
exports.help = {
name: 'euro',
description: 'euro',
usage: 'euro'
};``` **not updated,remains constant, help me?**
Check the send url part @high tinsel
Why are you making the request before exports.run?
Or itexlo will know more than me about it
http://prntscr.com/kwp5fg anybody that can help me with this error please
You do realize that if you do that, it only executes once
How will I do
@slate kayak your missing a permission
Put the Ajax request inside of the exports run
http://prntscr.com/kws4pm thats what im having on 173 @vernal rivet
@earnest phoenix ```const Discord = require('discord.js');
const ayarlar = require('../ayarlar.json');
const moment = require("moment");
var request = require('request');
var prefix = ayarlar.prefix;
exports.run = (client, message, params) => {
if (!message.guild) {
request('https://www.doviz.com/api/v1/currencies/EUR/latest', function (error, response, body) {
if (error) return console.log('Hata:', error);
else if (!error) {
var info = JSON.parse(body);
const ozelmesajuyari = new Discord.RichEmbed()
.setColor(0xFF0000)
.setAuthor(message.author.username, message.author.avatarURL)
.addField('Eğlence Komutları Özel Mesajlarda Kullanılamaz!')
return message.author.send(ozelmesajuyari); }
if (message.channel.type !== 'dm') {
const sunucubilgi = new Discord.RichEmbed()
.setColor(RANDOM)
.setAuthor("Beinz Bot | Euro Verisi")
.addField(':euro: Satış Fiyatı:', info.buying)
.addField(':euro: Alış Fiyatı:', info.selling)
.setTimestamp()
return message.channel.send(sunucubilgi);
}}}
});
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 0
};
exports.help = {
name: 'euro',
description: 'euro',
usage: 'euro'
};``` Is that like this?
Ummm
Add me friends, let's do it tomorrow, I don't know if I can.
Also, the line where it checks if the channel is not a DM will never get executed
Since you have an else if and a return
@signal saffron do me a favor and make the code readable
Fix your indentation and curly braces
My English is bad, I'm trying.
A JS beautifier should suffice
I could not. 😢
I don't understand
What don't u understand?
Hellloooooo? Anybody here with JDA?
Why r u typing such long?

Thyke, do you speak another language?
@jagged sun if you need help, say what you need
Yee
i need help, im tryna make a command only work for me but its not working
if (!message.member.hasPermission("KICK_MEMBERS") || message.author.id !== owner)
thats code
It is
That seemed right
What's not working 
Owner isn't defined?
Made sure owner is equal to your id
And it's ONLY for you
Dream
?!?
👋
Hi
Lol
Owner is defined, it just says i have no perms to use command
@topaz fjord I'll come over the East Coast and knock you over
your breaking your own rules idiot
You don't have the perms then
@earnest phoenix is owner a string or number
Faster
Ok, what does the error look like?
is owner a string or number 
@topaz fjord its my owner id
i do this
const owner = ['MY ID'];
it is
message.author.id !== owner[0]
@earnest phoenix answer my question
@west raptor what question?
if (!message.member.hasPermission("KICK_MEMBERS") || message.author.id === owner)
^^
owner is an array, is it not?
look, its worked before, and it works for other commands, just not this one
The conditions are failing, then
It looks like you are check IF the the author ID is yours
if (!message.member.hasPermission("KICK_MEMBERS") || message.author.id !== owner)
did that too, made no difference
thats full code
So you want members with kick members perms and you to be able to run the command?
yes
I had trouble with this yesterday
Try:
if (!message.member.hasPermission("KICK_MEMBERS") && message.author.id !== owner[0])```
Why is it an && 
@earnest phoenix did that work
@slender thistle
Using && is basically checking if both are true, if one is false it doesn't return the perm message
It's confusing
I know
I get that. What I didn't get was why you used &&
Because || is check if either one is true
And isn't that what they wanted?
If either one is true it returns the perm message
&& makes sure both are true before continuing
If you used || its only checking if one thing is true, which can cause problems, if you do && then it's checking for both to be true, so if the person doesn't have one of the required then it won't work for them
How
They want members with kick members and him to be able to run the command
yes
My actual question was "Didn't they want people who have Kick Members and themself allow to use the command?"
which will be ||
Yes that's &&
what
If you saying if have kick members or is the id then it would be ||
What
what
It's basically saying if the user doesn't have permission, or has the id, then don't run. But it's only checking if one is true meaning that if someone has permission but doesnt have a I'd, then it will still run. And is checking both things, usually you wouldn't use and in here, but it depends what the bot is going to do, usually you just check for one thing
You would only use && if you making sure that the person has both required things to use it, so in general this decision is pointless since the problem is that he didn't but the right id and didn't have the right permission
What
It's not a bot error, it's logical error
Then it would be ||
Therefore returning the perm message
Yes
What
shivaco, that statement wasn't followed by the command execution but by an error stating that you can't use the command
Hi I'm development
hence why ! and && rather ||
Oh
&& makes sure that both things are true, || is make sure if one thing is true
I get an error
Yes nameless?
I type throw err and it errors
Should I type catch error?
What does the full error look like name less
Lmfao
What
@vernal rivet I speak Turkish, bad english. 😠😠
oh ok
pinging people for using English is awesome
@timid escarp did you code the bot?
It doesn't look like he did
how can i see the amount of votes for my bot through the API?
var Maro = new commando.CommandoClient({
owner: 'Aidan W.',
commandPrefix: '!'
});
Maro.login('Token');
Maro.registry.registerGroup('other', 'Other');
Maro.registery.registerCommandsIn(__dirname + "/commands")
Maro.registry.registerDefaults();
``` can someone please tell me what is wrong with this?
Gyus, does someone wants to check my framework I`v done for discord?:)
@earnest phoenix maybe owner should be id, or array of ids and not your nickname
well @sly girder it says ```Maro.registery.registerCommandsIn(__dirname + "/commands")
^
TypeError: Cannot read property 'registerCommandsIn' of undefined
at Object.<anonymous> (C:\Users\user\Desktop\Maro\index.js:10:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3``` in the terminal
Registry is undefined then...
But the first Macro.Registery is ok, yeap?
Is is registry and not registery
Oh yes
@earnest phoenix are you creating new bot?
:)
ya a new bot
@earnest phoenix wanna check out my framework? 😄
@earnest phoenix there is no docs, but I can help you anytime with it 😃
ok
Welp... time to re-modulize my entire bot 
why
@rustic axle wanna try to use my discrod bot framework? based on service providers 😉
@west raptor it has no docs 😄
its all good
The framework I had was weak and I want to try and remake it
@west raptor i will DM you with the core component.
@west raptor better contribute to my 😄
So I can auto load new npm files and install them and also push new files to the cloud that auto reload as well
and by framework I mean the framework of my bot that I just create new js files that get loaded in as commands
not wrappers
assuming thats what you guys are discussing now
@rustic axle nah, that not framework 😄
Framework is tool that has build in many tools that allow fast resolving problems 😄
ah okay that type of framework
Who is the owner of this bot?
That a huge bug! Only owners or MANAGE_GUILD should have permission to change the prefix 😄
Yeap, but admins have option to manage guild
Funny thing is that I don't even give myself perms to update prefix
sad
ew bots that restrict stuff to admin perms
But guild managers should be able to change bot settings too
^
true
Even more, if you are doing some admin panels, this validation should be true on web site too 😄
unless you do per user prefix 
How do you describe the dangers of eval to somebody easily?
that kinda cool, but a huge data holding 😄
Accurate
Shit, why you even do eval in your bots?
i dont know
bc
Bagel bot has it, and is restricted to bot owners, and checks for user IDs and tag just to be safe
big server
You can type an I'd wrong 
Well it's safer to check both
I do not have even owener commands 😄
Yeap, but than i should change in bot validation if I will change my nickname or my Discrod Turbo ends
If you have nitro you can fake a discord tag
id is unique
Better is a Array of ids
And tokens can be bad to have
and then something like in_array 😄
guild ids and default role ids
why when I connect to my vps does it do this https://i.imgur.com/Pd7Nsuj.png
@earnest phoenix does your VPS has DE on it?
the vps is windows
yeap, answer is message up
I use windows because its easier for me
That is your problem, its windows 😄
Learn some linux, all server work is linux, even windows has build in linux core support 😄
And supports bash like commands
no im never using linux
@earnest phoenix you will not? 😃
linux is main for server structure
Yea, more memory, more virtual CPUs, even if you do not need them 😄
Shit code? Nah, that a low memory on my server 😄
I just need more mem and the problem with low mem will go
52 Gigs? now that's a bit much
You don't need that much RAM for a node application.
I can not image for what I will need 52 gigs?
Only i will spam shit in my Redis server
even spamming redis memory usage is fairly low :^)
it dont even let me
it just dont turn on apparently I have too many GPUs
4 isnt that many

what
omg i connected to my vps on my phone! @topaz fjord
yay..?
i didnt know I could!
i should get a vps soon
wha
o shit
no pls
o shit
gotta run

hey guys
so i made this locked command thing, and i noticed that it takes sometime for the vote to sync
is this typical
ew votelocks
ew votelocks
we votelocks
skcoletov we
You need that much ram for a node.js app if you refuse to use db's and use arrays instead and use loops that check for responses instead of async functions 
@rustic axle Eh, not really
Node.js apps are limited in RAM anyway
I think 64-bit is limited to about 1GB of RAM?
yoyoyo
64 bit is limited to 18 quintillions or something
2 ^64
18446744073709551616 bytes
"good news: we dont know what it is anymore"
That's actually bad news
you do want to know your limits
on any proper 64 bit runtime you don't need to care about memory limits
we're not even close to reaching 64 bit ram limits
isnt it like billion to trillion gigabytes
@bright spear remember listcord lmao
what
lmao yes
how about
replace your hard drive by using your ram as your disk
(which is possible)
Speeeeeeeeeeeeeeeeeeeeeed
no saves but
SPEDDDDDDDDDDDDD
battery powered persistent ramdisk
I am a noob in programming. just to get that out there lol. I created a bot for a game that calculates data for the players of that game but the bot seems to slow down a bit or have some issues. I was wondering if anyone feels like taking a look at some of the code and giving me some advice. I will know I need to rewrite it if I am told it is utter trash lol. I just want a few pointers. any help appreciated.
i found the code
const ddiff = require('return-deep-diff');
module.exports = (oMember, nMember) => {
console.log(ddiff(oMember, nMember));
};
someone can help me ?
Are u trying to run just that code?
Because right there ur exporting an anonymous function
And what is ddiff
@quartz kindle my css code that I used last time stopped working, I checked it out but couldn’t find the reason
Do I send the code?
send it in hastebin
stealing code not knowing what it does
I coded it last time but for some reason it isn’t working
Hastebin isn’t working for me so I’ll use pastebin @topaz fjord
idk much about html
so correct me if im wrong
but why is there a paragraph in the header
:thonkicide:
that html
The CSS classes might have changed
One of the logos for my bot isn't showing on the DBL website; anyone know anything about this? Link: https://discordbots.org/bot/488060245739044896
@craggy fox this is whats happening
dbl is putting your css code inside <p> tags
i didnt
try minifying the css
oh nvm
or at least remove the excessive spaces/lines
ok
@quartz kindle the button color isnt changing correctly on hover, its supposed to change to red but its changing to blue ish
if you use !important on the base element, hover will get overriden by it
unless you use !important on the hover too
how do i do that?
also how can i align the widget from dbl to be centered on my website?
@quartz kindle
your css is repeating the white on hover
.wrapper-page .longdescription .content .button:hover {
background-color: white
can bots see their own messages regardless of the read message history permission?
for some time yes i think
it shows up in the logs
but when i tried accessing old messages later, i got errors
so there is a certain timeframe or something else until the message history removes access to it
that's weird, because I know you as a user are always able to see your own messages even if other messages are hidden by the permission
no natan
that's what I've been saying
after a restart the client still fetches my own messages
back in the server that has a verification channel, you have to introduce yourself and see if you get verified, I waited 2 days knowing that there have been a lot of other messages sent by other users already but the client has been fetching only my messages
at Object.module.exports.run (C:\Users\User\Desktop\No name\commands\test.js:9:29)
at Client.client.on (C:\Users\User\Desktop\No name\index.js:61:31)
at Client.emit (events.js:182:13)
at MessageCreateHandler.handle (C:\Users\User\Desktop\No name\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\User\Desktop\No name\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)``` This is the error I am getting
if(!message.channel.nsfw) return message.reply(`Sorry, NSFW Commands can only be used in NSFW Marked channels only`)
let gRole = message.guild.roles.find(`name`, "18+")
if(message.author.roles.has(gRole)) return (`Sorry you need the ${gRole} role to use this command`)
Here is my code
?
Ok
I did
(node:8104) DeprecationWarning: Collection#find: pass a function instead
Returned that
if(!message.member.roles.has(gRole)) return message.channel.send(`Sorry you need the ${gRole} role to use this command`);
put !
Nvm
@lusty dew, Sorry you need the null role to use this command
This is what it replies with
it says null instead of the role
return (`Sorry you need the ${gRole} role to use this command`)
??
return
just return
???
put message.channel.send
how can i see the amount of votes for my bot through the API?
check the api docs 
I have created a bot from the discord py api and I was wondering how to, firstly share it with other people, and secondly how to set up commands like !setup where admins can change certain variables, I have read the API but I am still lost
to share it with others, go to the application page where you created it, and make it public (there is a checkbox option), then you can generate and share the invite link https://discordapi.com/permissions.html
the second part of youre questions where a command changes a variable is something you can figure out with a little bit of simple coding knowledge and problem solving skills
but to store them, such as settings, you should look into a database.
Thanks, one other thing, would 1 single instance of my python script running on my VPS work on multiple discord servers
yes, until you reach 2500 servers, then oyu have to "shard" -- but probably no need to worry about that now 😃
that is exactly how it works
bot being added to servers by users and they can use it there as well
I'd have thought that multiple instances of the bot would need to run on my VPS
a single instance can run up to 2500 servers
and thats a limitation imposed by the discord api, not the script itself
theorically, there is no limit on how many servers a script could handle, except for hardware/ram limits
i dont know about python, but nodejs for example is designed for handling millions of connections per second
any programming language could theorically do the same, if built properly
Would using a text file to store variables work instead of a database?
why am I laughing at this
can someone help me create a bot like Dyno please
@idle bough it would work, yes. many people store variables in json files
but there are drawbacks you must be aware of
first of all is the amount of disk operations you're doing with reading and writing to an external file, you want to keep those to a minimum, for example never do read/write operations everytime someone does a command, rather do one read operation and keep the variable in memory and only write when its changed
and second is the reliability. external text files are unreliable because they are locked during read/write, which means if your script exits or crashes for any reason, your entire file will be destroyed or corrupted
So a database would be better
having a proper database such as mysql, sqlite, mongo, etc... solve this issue by creating a layer that does that for you
they work in memory most of the time, so access is fast, and when reading/writing, they do so in a separate process to ensure the file doesnt get modified if it fails
whats wrong with sqlite?
its dogshit slow
nothing wrong with that
ok
Yeh i've used MySQL before, just didn't want to have to go there
only bad if you need a fast db which 95% of users dont
also theres a big difference between using plain json files and using sqlite (which is, indeed, a file unless you run it in memory)
you can always create a memory-allocated folder in linux and store the sql file there
and then do regular backups
if im not mistaken, most linux distributions mount /tmp in ram instead of disk
putting your database into /tmp 
just write your data to /dev/null for maximum speed :^)
maximum speed and unlimited storage :3
Is there is any bot that can make a rainbow role
I mean the bot that can change the role color in seconds
That's literally what rainbow roles are
And your question has been answered already :^)
Thnx
hello can one help me with one thing ?
when a member react a message, get a role..
:v
use reactioncollector
does anyone know how to make curl not verify/disable the ssl for php
-k option
i mean for php
does anyone know how to make curl not verify/disable the ssl
forgot to say for php
are you running curl with php or are you curling a php page?
curling
-k option will disable SSL cert checking
and for curl with php?
are we talking about the same curl?
idk anymore, what im trying to do is with curl in php trying to load a page that has an https to get json data from it. its giving me an connection refused. but if i tried postmaster with ssl verification off it works.
😂
@boreal acorn use guzzle instead of curl for php
does not work with php 7
hmm weird
What version did you install?
PHP has decent backwards compatibility
https://hastebin.com/buqurapeme.js
Doesn't want to add to queue.


