#development
1 messages ยท Page 1515 of 1
i need a way to assign personal and system mails to an account without spamming it or spamming calls on a creationg of account
very descriptive, thanks
Nah, there's not bugs or anything. I don't ever see that actually happening though? Is it a 1-to-1 process? If a shard is reconnected to the gateway that counts as +1 for that 24 hours? If that's the case, then, even on an update, I wouldn't ever see that. I could probably update the same bot multiple times in the same day. It wouldn't probably start becoming a problem until I hit millions of servers?
so a user can have many emails
the mails are generated on my end, not on theirs
ratelimiting isnt the issue at all
Ok
Millions of servers implicitly means a bunch of websocket connections in the form of "Shards". Updating all of them at the same time is guaranteed to reset your token. Rolling releases is a thing, but not optimal since that still means downtime
imagine the following
-10 system mails that were sent the past 4 weeks.
with a new user => i'd have to create all those 10 system mails with their user id
not only that, the new user would have their own personal mails too.
Each user would end up having 15-20 mails each.
I already got a user base of 200k users, i cannot afford to have over 4 mil entries in a database, thats absolutely retarded and not scalable
not only do i need to add a new system mail to every account existent, i need to also add it whenevr a new user is created
But, at the ending of the day, this sound as if it's a non-issue until the bot hits very large scale.
that is interesting
If I hit that point, I'll just move from docker ๐คทโโ๏ธ
Would you rather rush to implement something when you could be prepared for potentially unexpected scale?
why are you creating 10 system mails?
10 system messages were created last month, how do i have the user have those mails in their inbox without adding a new mail with their id?
The thing is, from how you're making it sound, if I had a rush of unexpected scale like that ... it'd be a great problem to have ๐
I see your point though.
cuz i also need a read state, so i cant simply assign a base one
so i need a PER user mailbox
the issue becomes with the sheer scalability of it
I haven't even conceptually thought about scale at that size because I truly have no idea if the bot will ever be that successful.
Well. You most likely won't gain millions of servers overnight, but preparing for the worst case scenario makes your application more resilient when you need a competitive edge. Those few seconds of downtime is everything to an end user
hmmm
now you starting to realise that the issue isnt a simple one to fix
yea....
hence why i was calling tim
Agreed. If this was a paid application serving millions of consumers, I'd be bent over and agreeing with you. At the ending of the day, my discord bot is just an economy-based bot. If it didn't work for an extended period of time, no fret.
i said before, i know what im doing but i dont know how to scale it
Lemme do some debugging with a db to see
actually, another person i might be able to bother is evie
I mean in my case I would just have those system mails as defaults
instead of creating new ones every time
@umbral zealot can you provide some assistance with logic?
wut
thats the issue, i need to assign those mails to a user
to have them in a read or non-read state
Then I guess that's all there is to it. Learn something new just in case
Hold up
let me try something
k
wat
is call an option to you
I appreciate your sentiment. I agree with your approach.
its a lot simplier to explain with voice
all gucci
but like, is it like a database and users have access to a "mail" system, and they can view their mails?
correct
and each user should have these system mails in their inbox?
not only when an account is created, but also when theres a new system mail
(make system mails default on created)
then why not have a table for system mails
provide assistance with what logic
thats the thing
and the content of the mail is a template that is replaced
I've not been following the thread
cuz i need those system mails to have meta too
i cannot afford to have over 4 mil entries in a database, thats absolutely retarded and not scalable
false
so i cant have just 1 system mail
what kind of meta
read / opened / used / amount
Database entries don't matter, you can have a billion of 'em in most databases
and possibly some more
they are indexed but i will still need to run queries on non indexed rows
SELECT * FROM table WHERE user = userid
a prob LIMIT 10
have your db be lazy loaded
wdym?
a good database with some redis caching is perfectly fine imho
i writed discord bot code on vsc now how do i run the code for the bot?
the issue is the sheer amount of entries, i could lazy cache them but that'd get big quick, specially when every user would likely have 20-30 display results
you have 10 system mails in a table for the system account
all users have access to these 10 mails, but the db is not populated, only when the user actually uses the email command, then those mail templates are taken, and added as mails to their accounts for full access
how do i run the code
hmmmm
you have 200k users, but less than 10k will likely actually use these commands
You're acting as if that's actually a non-solved problem, but it's literally solved. that's what redis is all about. you can add a TTL to remove stale entries after a certain amoun of time
i writed discord bot code on vsc now how do i run the code for the bot?
what's wrong??
https://prnt.sc/wkkewq
I will keep linking this until you actually do it
prompt is not defined, clearly
this is correct, but im future proofing it
but
what do i click on the message that you sent
You could literally use enmap up to a half million entries easy and it's a fully cached database.
which do i click
honestly scale isn't that much of a problem
Any of them. start with the first one
i could just fetch all system mails from a table and add them on the private user every time theres a new user created
go learn
ok
terminal
guys
how
ctrl t
you dont need to add them to the user when a new user is created
node .
k
but that goes back to what i mentioned, imagine 200k users, that'd be 2 mil JUST on system message mails
Erwin it's as simple as ```
get from redis or fetch & cache in redis for the next time
add them only when a user actually uses the command
go. learn. javascript
i was thinking of doing this, but the issue persists in the DB
Hi
my db is local, there shouldnt be much effect at all with queries
I writed Java for the bot now HOW do i run it?
copied code from github and youtube.com
dude literally any nodejs tutorial will tell you this, and you've already been told it's node filename.js
if you can do that
ffs go follow tutorials
then you can find a video on how to start it
with duplicate entries and stuff. Even doing as tim said and only gen on the command, it'd still rack up
specially when i plan it to be a core command
It can't rack up enough to cause problems. Literally modern databases can handle millions of entries trivially
well what else are you expecting to do?
what i was thinking was using bitwise to gen the system messages
There's no magic solution other than "just use a database" that's their reason to exist - to store data
that'd shorten the mails to a single int
at least the system ones
i could shorten the meta to a bool
either read or non-read
What's going on here
With Erwin silly
well yeah, i mentioned before, i could very well do it, i have quite a few solutions, but none of them seems optiomal
Erwin wyd
looks like you did not start localhost
sure you can do all of those optimizations, but they wont make that much of a difference
are you sure you did
how can i do that?
if you need 2 mil entries, you need 2 mil entries
hmmmm
i did
you can optimize them to be more efficient and use less space, but its still 2 mil entries
yep
unless you go the lazy load route and use templates
i might go with that then, and add redis to keep ti cached, or even let it in the process memory
how are you running this? the html or js file?
html
whatever is shared between accounts can be templated so its only stored in a single location and generated for the user when needed
oh if its html file
get live server extension
and use that
ez pz works like a charm
thats the only way to not need 2 mil entries
any link to install that extension?
search in the extension tab
"Live Server"
how does this sound
table 1 = system
all system messages with blank templates/default meta
table 2 = user;
when user uses command, check if user has system messages.
if it doesnt, SELECT * from system and then SET every one of them onto user with their id;
//cache entries
on new sys message => add onto system and add onto all users
only add to users whose db has been initialized
dont add to users who have nothing
or
add to system
and whenever a user accesses their db
check if there is any new system
and only add then
isnt that less performant? since it needs to check all sys entries?
COUNT() prob works
but only when a user uses it
but that'd be 2 queries
on-demand is always better than a query that affects all users
hmmmm
thats true
i might make a bigserial on the system table
and then fetch all and cache
you can put a timestamp on the user for the last time they checked system
or better yet, i think i can keep sys cached
that'd save that extra call i was talking about

i might not use redis and use it in the mem instead
well, back to work
ty both

actually why do i need a second table again?
i can just add user as "system"

ye
single table ftw

how can i paste something into a VPS's cmd?
right click
oh
weird thing about terminals.
Wait, why?
I just switched to redis, lol. Was it a bad choice?
cuz there isnt a use case for redis here, i already have my users stored in the process memory, splitting what belongs to user outside doesnt make sense
What about for sharding?
depends on what you need for sharding
I had a singular kevy cache instance stored as a frozen object ... but each 'shard' would actually spin up a new instance of it.
last time i fucked with sharding i almost got banned from twitch
So, the global caching didn't work ๐ข
What did you do lmao
it does work if you set the cache to not attach on a single process
Does twitch not support sharding
no
Bruh
How do you set the cache to not attach on a single process?
That's a bit stupid
once you get past 100 ish streams, you fucked good time
That's really stupid actually
good question, i know its possible but i never done it, i use postgres to share stuff across clients, though im aware that theres a way
google it
my VPS has it setup, but if you ask how, i wouldnt be able to tell you
you connect with the port, just like in postgres
Ah, yeah - at that point .. why not just use Redis though?
Singular point for your cache
i explained
,
splitting user into redis and process memory makes no sense
either i port everything to redis
oor keep it in process
where are you looking lol
redis is powerful, and most of the times the answer for most stuff, but not in this case
Gotcha
Yeah, I saw a huge performance increase when switching from in-memory maps to redis.
I honestly wasn't expecting it
using System;
namespace Program {
class MainClass {
public static void Main (string[] args) {
Console.WriteLine(example()[0]);
}
public string[] example()
{
string[] arr = {"aour","aour","aour","aour"};
return arr;
}
}
}
Always had a hard trying to return arrays in this language
java?
yea I thought so too but I kept getting this error however it is in repl.it
mcs -out:main.exe main.cs main.cs(8,25): error CS0120: An object reference is required to access non-static member `Program.MainClass.work()' Compilation failed: 1 error(s), 0 warnings compiler exit status 1 ๎บง ^C
I use repl.it for practice
hmm
oh
wait
I forgot I changed the name of the function
lmao
nice
but same thing weather it is work() and example()
I get the same problem incept different same for the function
I didn't read but
When I look up error
This stack comes up
so
Check on that
alright I keep forgoting that website exist
lol
why do you know c#?
wdym by know C#
isnt c# super common for lots of things?
well yea inspecially in applications
from what I heard people usually like that language due to how easy it is to compile
I've heard it's common to mistake cs code for Java
wait really?
that is understandable they look pretty simular in syntax
Like I said, just what I heard. I cannot confirm or deny but Java is pretty easy
u can type public static void in both java and C# I think
does C# care about the order
not sure haven't really went into how languages work in the background
public or private usually comes before any type declarations
closest I ever gotten to that knowledge was that intro to computer science I in the semester I just took
for java or in other languages
All statically typed languages
I forget if TypeScript would qualify as statically typed since JavaScript isn't but TypeScript kind of is based around types.
interesting
I haven't coded in Java in such a long time I only did it in one class I took in highest last year
and at the end of the year before that
TypeScript is statically typed.
ok
I messed around with Minecraft Forge for a while before I quit because it was horrendous to work with
But only for correctness rather than performance
Not a great intro for Java
any library can be horrendous to work with tbh
Im not surpised like how do u generate an infinite world
It was god awful. I constantly hated myself because people say the API has a lot to offer but it was so incredibly difficult to learn because the only docs to go by was intellisense from the IDE
Java has documentation online, what do you mean?
Forge specifically
Oh
Java wasn't hard
see I would love to do modding in minecraft but what u described is as horrible as I imagine
I already had a clear understanding from the beginning because I was already proficient in JS and TS
Not too hard to grasp concepts
Fabric is good. I took a look at that but still wasn't motivated to port some of the stuff I made
android studio lol
Yes, but why would you want to do that.
dynamic imports
how'd you do it?
You can just do Function.name
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});```
Hey in webhookAuth
password
what kind of password?
Oh oki
oh, ty
Hi, I have a repository on GitHub and recently was thinking on somehow hosting my bot to be on 24/7 but I don't know how much it is going to cost and where to host it, any suggestions?
i suggest galaxygate, or even google cloud f1 micros(free) if you wanted.
Oh, thanks I will try these
hello. i want to make some webhooks in my server. i have the JSON file. how do i axtually host it?
you want to host a json file?
so your looking to host a json file and make a webhook?
Sorry to interrupt - just wanted to ask if anyone knows if cdn.discordapp.com have a ratelimit? I want to do some stuff with images (profile pics, etc.) but dont want to be rate limited or banned
yes
i almost guarentee it does
id use express for that
If there is one, the rate limit would be absurdly high. Discord's CDN routes through CloudFlare, so I imagine how long it takes CloudFlare to ban your IP is the rate limit which would be at such a high scale or you spamming requests intentionally or unintentionally.
If you're doing simple stuff like image manipulation, I really wouldn't worry about cdn ratelimits unless you're making a ton of requests in a short timeframe
ok thank you
lmao
Woo, you kill me man lol
I'm trying to make a bot that reminds users of a message when it is reacted to. I'm having an issue stating that my remindUser function is undefined, but I'm also not sure if I'm totally doing everything in the more straightforward way. Would anyone be able to help? https://pastebin.com/LK1Y1vKC
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I know you're just asking for clarification, but it's just funny to me nonetheless.
part of being here and not going insane is responding to what people say, rather than what they mean :p
Haha, I see
Excuse me for asking, but are you here on your own accord? Or is it entailed in the bot reviewer position to additionally moderate development / interact?
nope, i just come to development inbetween looking at support and doing other stuff.
third monitor op
I could google it, but figured you knew the information off hand. Are the f1 micros only free for a certain period of time? I know AWS limits it to a 'free trial' on their nanos for a year.
it's not
last time i checked the micros are free forever
it's free forever as long as you got a plan afaik
wait what ๐ค
from what I heard, I still got my trial period so, not sure.
Is it 512mb ram?
trial period for googles free credit is temporary, the f1 micros i think are always free
yeah
they are tiny
Hah, gotcha
but perfectly fine for tiny bots
I haven't had any problems with my droplet
you get .2 of a cpu too
ikr
That's hilarious
for free though, i have some random thing on it
imagine ... ".2"
you can spend the free credit as much though
Do your account replenish each month with the credits?
for the f1?
it's $300 in the first place
anyone able to help me with this?
seems like the f1 is available as long as you got billing enabled
discord.py help needede
How will i make is check if the bot has perms or what not so the mods know what perms to give it
how do i change the roles and main settings
sorry, your question was about dsl right?
Use this deco https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.bot_has_permissions and handle the error
not sure what dsl is but just got the bot for my buddies server
what bot?
you need to ask in the activity bots support server @empty leaf
sure
what price would you put on it for my discord bot?
like 1$ a month
i might of been scammed
price of hosting is generally more complicated than just those numbers
with those specs, it could be worthless, to $10 a month depending on other factors.
if it works for you, thats fine though.
ok
Need-bot-maker-free-brain-not compatible AAAAAAAAAAA
learning to make bots is a long process
learning to code is an even longer process
ideally youd spend a month learning about programming before starting to make a bot.
Can someone do it for me? You guys should make a way to do that
yeah, its called hiring someone to do it.
No I mean for free
you wont get anyone here to do it for free
whats that link again that you reply to when people just say "HELP ME!!!" with no context?
Like to get robots to program- Other robots! Iโm a dumb genius
you know it requires a somewhat skilled person to make a quality bot right?
its like expecting someone to give you a car for free, it just wont happen.
thanks
only a month i am way over qualified
Well... yea
depending on the info and time/quality i could fdo it for the experience as long as i can add it to my profile
totally cool if you two want to do that, but you should take those kind of discussions to DM's
yeah DM me for more info
TypeError: core.remindUser is not a function
at C:\Users\Sam\Desktop\RemindMe\RemindMe\core.js:104:43
at Array.forEach (<anonymous>)
at Object.scheduler [as nodeSchedule] (C:\Users\Sam\Desktop\RemindMe\RemindMe\core.js:102:43)
at processTicksAndRejections (internal/process/task_queues.js:93:5)```
const core = require('./core.js');
//Remind User Function
remindUser: async function remindUser(bot) {
try {
let reminderEmbed = new discord.MessageEmbed()
.setTitle(data.messageLink)
.setDescription("You asked me to remind you at this time of the message linked above. Click the link to view the message. If the link does not work, the message may have been deleted or you do not have access to it anymore.")
.setColor("#FF0000");
await data.user.send(reminderEmbed)
data.remove();
} catch (err) {
console.log(err);
}
},
//Node-Scheduler Function
nodeSchedule: async function scheduler(bot) {
try {
(await messageReminderModel.find({})).forEach(data => {
let currentUnix = Date.now()
if(data.time <= currentUnix) core.remindUser()
schedule.scheduleJob(data.time, remindUser);
console.log("Scheduled a reminder.");
});
} catch (err) {
console.log(err);
}
}
``` Anyone know how to fix this?
Brain not compatible with that AAAAAAAAA
how do i send a embed and a message in the same message? dpy
await ctx.send(embed=embed, f"> Viewing Profile [ {member} ]")
content parameter.
wdym
code: https://srcb.in/PPnUwVpuYf
it wont find the channel. so i will get the error send of undefined
either ...send(embed=embed, content=content) or ...send(content, embed=embed). both work as content is a pos arg.
wdym?
like the comma separator?
tias
ty
I've been at this for 3 years and I don't think my bot is good enough to net me the ability to accept commission work
idk what you guys are on
epic pfp
how do i delete a role using the bot? (djs)
is it something like role.delete?
or smth
I kinda hate how there's no way to delete a resource from the manager and instead requires the resource to be cached to delete it
embed.set_image(url='attachment://profile111.png')
await ctx.send(f"> Viewing Profile [ {member} ]\n", embed=embed)``` like this?
Invalid argument: 'attachment://profile111.png'
Can't help much with that snippet.
What am I supposed to do with such incomplete code and traceback
Lmao uhh what do you need?
Like basically the docs say 2 things
It has the file=file part, and the url attachment part for embed
I only need the embed one right?
and you don't even have that file=file part
Yep
I don't, I didn't understand it
file = discord.File(filename="profile111.png")``` i dont need the path right? this leads to the file already
like its in the same folder
then don't specify any kwarg
mhm
it only needs 1 parameter, fp, which you don't provide. filename could be None and it'll take either the file name or the name attribute of the file-like object.
mhm
i just deont get
why it needs the file = part
and the embed.set_image(url="attachment://image.png")
isnt ^ this just enough?
How is discord supposed to know which image.png?
ok so i dont need the path?
attachment://image.png just basically moves the attachment to the embed
filename="image.png" works?
no
How do you cache a user?
Hey there
you can store the user in a variable when you have the opportunity to
pretty sure discord.js does it automatically or something i think
okay wait, i did <@userid>
nvm
lol
How do you get the user's in server nickname?
...
[ 'Neutral' ]
undefined
undefined
0
console.log(optionsboi)
console.log(predictions.className)
console.log(predictions.probability)
console.log(probboi)
predictions.className and predictions.probability is undefined
u want the names of ur bot users?
So it's never assigned
That's what I am confused about because if I do it without a for loop using indexing , it works
Send code
On djs, i tried message.author.name but it puts their username even if they have a nickname on the server. How do i make it the user server's nickname
js idk maan..
ok
async function fn() {
const pic = await axios.get(Attachment.url, {
responseType: 'arraybuffer',
})
const image = await tf.node.decodeImage(pic.data,3)
const predictions = await model.classify(image)
image.dispose()
console.log(predictions)
console.log(predictions[0].className + " " + predictions[0].probability)
let i = null
for (i = 0; i < predictions.length; i++) {
console.log(optionsboi)
console.log(predictions.className)
console.log(predictions.probability)
console.log(probboi)
if(optionsboi.includes(predictions.className)){
if(predictions.probability > probboi){
Attachment.delete()
}
}
}
}
fn()
Here
console.log(predictions)
console.log(predictions[0].className + " " + predictions[0].probability)
Gives out -
[
{ className: 'Neutral', probability: 0.7704196572303772 },
{ className: 'Drawing', probability: 0.22774365544319153 },
{ className: 'Hentai', probability: 0.0018031611107289791 },
{ className: 'Porn', probability: 0.00002596447848191019 },
{ className: 'Sexy', probability: 0.000007494812052755151 }
]
Neutral 0.7704196572303772
Try message.member.nickname
This is horrible to read on mobile xd
Lol
(node:6071) UnhandledPromiseRejectionWarning: TypeError: Attachment.delete is not a function
at fn (/Users/navdeepsharma/Desktop/anti-nsfw/index.js:45:34)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6071) 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:6071) [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.
Should It be msg.delete()?
You have to delete the message, you cannot delete 1 attachment

My bot is now deleting NSFW Imges which is big pog
Quick dumb question. I have a website that requires you to sign in with Discord. How can I easily stop search engines from indexing pages that require a login? (Seeing as the search engine is not logged in, it will simply be server-side redirected to the Discord login page, and I don't want that indexed)
:O
how to get a user's in-server message count?
The redirect is server-side. How can I set meta tags?
Oh wait
All you can do is increment a db on every message. Discord doesn't have a built-in way to do it.
So when you're not logged in you get redirected to the login page?
oh ok
thanks i guess
D.js can query messages
So also count
That is correct.
Are you using a web framework?
I use express and passport-discord
Not totally sure what you mean. It's handled by passport, but I assume it's a simple res.redirect() call
You can check if a discord token if present if not redirect
But how does that help me with the seo issue? Would it work to redir to a different page if the user-agent is Googlebot or something?
If no other page is returned first, I believe so
By the way, I did consider robots.txt, but that's not perfect.
I'm just not sure if google allows that
What
They have rules against a redir to a different page if a bot is detected
Like fraud prevention stuff
It does. However, I'm also trying to catch Twitterbot and discord's crawler.
I'm not sure. I don't think they do, seeing as they aren't search engines.
yeah i guess relying on robots.txt isn't the best idea
Also, if the bot (even Googlebot) follows a link from another site it doesn't read robots.
Why not building your website with Vue.js, which you have experience with according to your gh
I bet vue.js has some sort of guard
Cause this website isn't great for Vue, and my experience is pretty basic.
I'm just looking for ideas here lol
Just redirect to a different path if no token is found
That path is the discord login page ๐คฆ
Then redirect to '/'
@earnest phoenix Have u installed github desktop
no
wut
I obviously donโt know exactly what ur doing but it seems like ur doing something with oauth and ull most likely wanna use a web framework even if it isnโt vue
OKe
i = []
for x in range(1000):
i.append(x)
for y in enumerate(i):
yield y``` run this for good bot ๐
SEE I KEEP TELLING PEOPLE!
Tired Programmer are Dumbass Programmers.
You went to bed, you woke up, problem solved in 4 fucking minutes on your own ๐
You could have been playing a video game instead of bashing your head against the desk on a stupid code problem ๐
Sometimes i prefer play any videogame instead make new commands
I have to get fun too, not program every time
Programming is fun! That's why I haven't done any for a month

I mean when i'm tired or i programmed all day
Sigh. sometimes I really hate javascript and how it handles promises.
Lmao
Anyone successfully configured OAUTH with actually having a redirect server?
Possibly 'faking' it?
async mapByFunction(fn) {
const all = this.getAll();
const promises = Object.entries(all).map((value, key) => fn(value, key));
return Promise.all(promises);
}
This gets an object from this.getAll(); and it returns a fucking array of [key, value] arrays and that's really pissing me off.
OAUTH, as a protocol, requires a redirect /callback url.
Discord makes it easy to setup that iirc
oauth2 itself is pretty simple
There... is a way, without a server, I think
whoa there
But it's been a damn while since I saw that discussion on discord-developers
actually i can see that
I'm trying to interface with the Patreon API, but it requires a callback uri.
gm
When I feed it localhost, it comes back with a port 80 issue.
client side oauth2 
Of course, because that doesn't exist ๐
how about specifying the port
I don't have any open ports, that's the point. Do I really need to open up a port just to configure that.
Oh, sorry. Nope
But your "issue" shouldn't be an issue
i guess its kinda the same thing
I mean, it's all the same at the ending of the day ๐
oauth2 is oauth2
what do you mean by "port 80 issue"?
HAH that's oh so naive to think everyone actually applies a standard in a standard fashion ๐
That's definitely true.
OH! Well if oyu literally don't have any web service running, then no you can't use a callback URL
OAUTH2 has different flavors
I mean, it's not supposed too.
of course any standard is broken at least 99% of the time
Yeah, I read that post.
Just wasn't sure if anyone here had actually configured their Discordbot with the Patreon API ๐
Don't worry that post goes way over my head too
Samuel might have, I talked to him the other day about it.
I just wish I was given an access code associated with my account, but Patreon doesn't provide that. They assume everyone wants to configure a web-facing authentication so that users can 'view' their Patreon status / your website can look up if they're a patreon.
I'm fairly new to this whole coding thing, and I was able to get a bot out a couple months back. But I am yet to figure out how to get my bots guild cache, anyone able to lead me to the right direction?
<Client>.guilds.cache
OMG
I'm an idiot
They do provide an access token.
Nvm, forget I just said anything ๐
just beware the patreon API is Deprecated
Oh intresting
yea they stopped maintaining the api in July last year
well june but close enough
I wonder how they are having resource issues, I thought they are doing good money wise
they had issues to pay staff a while ago
Ah, yeah looks like they make less than I thought
500m for all their creators at on average 7% take is like what 30 million or so.
also the largest Patreon Creator deleted his Patreon Account back in December 2018 caused them to loose some money
oof
Wait, where is that documented?
the url beneath the picture?
Ah, my apologies.
also most API clients they offer are last updated 3-4 years ago
Does anyone use mongodb. I have a problem
Do you guys use Atlas?
What made you switch? Financial reasons?
I have a problem
While trying to connect to my database with mongodb compass. It says authantication failed.
well the features i need are aviable in atlas for 60$/Month
hey guys can i have some advice,
my bot just hit 100 servers and people really like it. but due to some things with my hosting provider we had to reset the database making all users lose all their coins and stuff
iโm also not interested in coding the bot anymore and fixing all the bugs with it
should i continue with the bot or go on a new path?
Why is this happening
how does your connection string looks like. pls no ip or passwords
there is usually no reason to reset a DB, also always keep a Backup
mongodb+srv://<username>:<password>@cluster0.e3q6j.mongodb.net/test(Where it says username and password, my username and password are written)
looks fine
did you allow external connections?
if you use atlas you have to allow external connections
the host shut down
well it was my friends vps
now he stopped paying,
you can download the Database and upload it to a better host
well rip
this is then another issue
and i shouldโve just kept mine
I gave permission for my own ip address
does it still error out?
It may sound dumb, but are you including the <> in your string?
Or are you removing those too?
ayy mongodb gang
Tried, but still same error
well its up to you, if you want to keep the bot running maybe make an Announcement and maybe recode the bot to improve it overall. also maybe switch to an Externally Hosted Database like MongoDB Atlas
Externally may be wrong wording, here. Maybe switched to a 'managed' database provider ๐ค
Such as, as you said, MongoDB Atlas
Not wrong wording, possibly misleading ๐คทโโ๏ธ
yeah thatโs what i did
yea but some people run them local
switched to the atlas
no?
I'm kidding, lol
i have a NAS a RPI and a VPS
I've been trying to solve this error for almost 1 hour
maybe i should fix the current bugs, then keep the bot up and let it grow itself?
I have a NAS for completely unrelated things, lol
well itโs grown to 109 itself
did you got a Dynamic IP?
Mainly media / home security
what
i have my Lancache and Plex on the NAS
I don't host Plex on my NAS. I strictly use it for hosting media
sounds good
rip RPI gets I/O Locked by Plex pretty easy
also it will get set on fire if you have to transcode 4k to 1080p
got myself a nice p400 for HW transcoding
I only have 1080p media files, lol
I guess nobody knows the solution to the error
Not without debugging myself, nope.
did you got a Dynamic IP?
Yeah. What country are you in?
would guess Turkey bcs of the name
๐
wtf? the snowflake id for your Discord bot
Could someone work me through finding how my guilds my bot is in, I've gotten "client.guildsize" like 1500 times and I have no clue where to go from there
bot id like this? 608120740100964372 this is @long marsh id oops
(programing)language
Are you trolling?
js
ok
i'm not trolling
when i copy id from bot it same like cleint id
I don't need args so rn I have this, I'm not even sure if this is a start to anything
ignore bad formatting
and just bad code ingeneral lmfao
It's a stupid question but... How do I get my bot to recognize an NSFW channel?
client.guilds.cache.size
```will show you your guilds, but it will return an array of sizes if you get shards
channels have the isNSFW property
I want to know it
they look like client ids but just for the bot
how is it look like?
772803287786455040
oh
Hi
this is your id, the one from your bot will lookslike this
oh
How to get roles
I wouldn't know what to do with this ๐ญ
yes
console.log it and you might get an idea
its possible that your isp for some reason switched the IP while you whitelisted yours. or even blocks the Hoster for some reason
Lmao , Thanks for help
maybe use a VPN and then whilelist the IP of the VPN, just to make sure
OK I did it. I was finally able to connect
@lusty quest I use copy ID option and I get this 794123427375874060 and it same as client id
well maybe its the same
<dbname> Will I write something in this section?
bruh
awkward
mhm
ik
you know?
yes
I mean, ok fine about the bot ID
but don't ask us how to fix some other bot list's avatar
that's their problem not ours
lmfao
im wronbg with that ;-;
sorry!
You are very sassy evie
well there is some prior stuff that happened with other bot lists
No no it's really just because I'm a sassy bitch ๐
๐ณ
lmfaoo
I wanted to post a "wrong neighbourhood" meme but they all say MF in the end and I wanted to be sassy, but still polite.
sports?
The @pliant gorge bot? That's for the server list, it gets stats and data from the servers it's on to display them on top.gg/servers
yes I am. <#memes-and-media message>
evie how did you become a bot reviewer
the applications, they closed months ago now.
lmfaoo
I need an adult
I'm gonna assume no...
smh my head
๐ฉ
update it then
I have a problem, I'm doing an nsfw command everything works, I test it on my pc with visual and it works well, then I pass it to repl it and install the modules well and what happens is this, if you're on a channel no nsfw works correctly the "this is not an nsfw channel", but when it's nothing happens, and on the console does not throw error D: this is the code
I was gonna just switch that section back to v11, is that illegal
lmfaoo
hahahaha
homie just direct your server to the hub if they gonna be that thirsty
good timing
yeah like
module.exports = {
name: 'hub',
description: "hub",
execute(message, args){
message.channel.send('cornhub.com');
}
}
So, your code is for the anal command but you're trying the vagina command. Which tells me that you're not looking at the correct code.
lmfaoo
v11 is deprecated.
That was a damn awkward sentence to type.
nono is example
yeah...
lmfaoo
is the channel marked as nsfw?
Ok well, your "example" is wrong because the code you showed looks fine to me
look
yep
OH! I had it the other way around
so it would be better to just update ig sigh
The problem is the bot doesn't send the embed when the channel is marked as nsfw
yeah ofc
it's probably not able to send anything because there's an error
"Project working!
StrawBerry is online :D"
That's actually a super cute way to show the bot online
this doesnt run the API Call async
how i can solve it?
wait I'm already in 12.13.1 and its still not working
learn about Async code and Promises
sorry idk why I @ 'd
np idk what you should do sorry
all g, thanks!
I tried it on my pc with visual and everything worked properly, but I got it back to repl and nothing
your code is v11
did you have all the packages installed on the server
Go to bed.
nah, 2 more hours leggo ๐
in a call 

surfing in csgo, reading development. totally paying attention
online school?
yeah sure
nah another discord server
some guy wrote a bot that attends for him in Online Classes,
oo
nice
like the bot knows his schedule and automatic joins the Microsoft Teams channel and mutes himself
when the lession ends the bot leaves the channel
Lol
well he found the 2020 Solution for a 2020 problem

I don't need a constantly accurate number, just a general sense of where I'm at tbh
Thanks โค๏ธ
That looks like v11 code
yea
no idea whats going on, aparently he has v12 installed, he even gave a specific number ๐คทโโ๏ธ
Check the package.json
It may have the old version installed ๐
@client.event
async def on_message(message):
if message.author == client.user:
return
await client.delete_message(message)```
I've never really messed with deleting messages like this before.
But how would I delete any message sent from anyone, anywhere? Just trying to do something.
it says "no defined"
take a guess
docs
๐ค
I did node -v and it told me 12.13.1 did I do something wrong lol
What's the updated one
you couldve searched this yourself
I forgot rewrite came out
oh
I checked by doing the node -v thing and it said 12.13.1 but only in the main bot.js file, should I also chexk that?
Wait
this is node.js not discord.js
in rewrite do we get channel ids like this
message.channel.id
check your packages.json
hey
Perhaps run npm list --depth 0
how do i transform a given channel id to channel ping?
uh
like #35239582952 > #channel1
<#channelid>
ty
@slim void no clue i dont use dpy, just picked this up from the docs
ah
discord.js parses channel objects to mentions
How do you fetch the channel id in py
lmfao yea 11.5.1 in package.js, whats the difference between the bot.js and the package.js (in regards to the version it says its running)
bot.js is your code. package.json is what packages are installed with npm
run npm update or npm i discord.js
but beware d.js v12 got a lot of breaking changes
the only thing it SHOULD change is that guild size thing. This is wishful thinking...
there is more stuff that got changed.
every command consists of
there is a list of breaking changes
I'm not seeing anything related to msg.content and that is literally what the other 4 commands consist of
along with var answers
I'll install tmrw and fix whatever messes up
var is bad, also deprecated, its still there to keep older code working
use cont or let instead. const is not mutable while let is mutable
I made this thing a year ago with no previous knowledge ๐ณi bet that is evident
var is for quite long deprecated
I think im a tad bit behind then
Im assuming that was the best tutorial I could find ๐ญ
let me guess




go to bed or else...
