#development
1 messages · Page 577 of 1
Thanks m8
how do I put the amount of my bot server on the site?
Look at the docs
@indigo current could you send me
hey
i made a bot
but im trying to upload him to the site
but i dont know witch lib to choose
any sugestions?
if you don't know which lib to choose, then I don't think you made a bot
what lib did you use
i just used javascript
eris or discord.js
tnx
oh
if you don't know what lib then there's something wrong
how can you create a bot without a lib
you write all the gateway connections yourself
I mean, you still had to install one to code one, which will be your choice
yes
what did you install with npm
npm install discord.io winston –save
uashauhauhua
isn't that the outdated one?
I wonder if listing the lib on the bot page even helps anyone, cause I can't think of any reasons why it's still an option in bot lists
but I also suggest:
- Learning a programming language of your choice
- Code a bot with your new skills
Does anyone know how to get my db token?
dbl token?
yes
i know how to code
its just js thats new to me
js is a programming language, discord.js/eris are discord wrappers that are made to program discord bots without much hassle
that's why i said learn the programming language
node.js also isn't the lang it's a runtime enviroment
When I Make A New Command The Previous Commands and Chat Filter I Added In Will Stop Working For No Reason
I'm more concerned about why you have so many on_message events
im using python
in his vid you can see it's discord.py
this seems like you are using discord.py async
and also your python syntaxes makes me think you are using python 2
both are outdated
im using python 3.6.4
well it does use that
well either way, it still seems like you are using discord.py async?
yep
yeah, that version is so outdated that I think they will soon stop maintaining docs for it
and also not many people use it anymore, so you won't really get help from anyone, most likely
ok
I'd recommend using discord.py rewrite
that's the currently maintained version, and is considered the latest version
ok
Can someone help me? http://prntscr.com/mndfbg
dont use powershell
ok thanks
but actually
help with what
ur not giving much detail
I'm trying to put the amount of server pro to my bot on the site more when I send the error files
how then?
dblpy
The problem is this kk I do not even know
even though I changing the error remains
What even is the error
When you run your code do any errors pop up?
does anyone know how to use the guildBanAdd feature to get a full report on the ban like the user who got banned and the reason why they were banned? (im using discord.js btw)
Why mention twice 
do not mistake no more when I try to send heroku to that mistake
sorry
it's custom kk
The Guild Ban Add event supplies you with the user who got banned. If you want more information query the audit log.
I think you have to add a requirements.txt file in your project's root directory that contains names of pypi packages for heroku to install. I might be wrong

@gilded blaze how do you query the audit log? all i need from it is the reason for the ban
I don't think discord.py is on pypi
Is this a problem?
On discord.js stable - https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=fetchAuditLogs
okay 😦
@gilded blaze i still dont understand
i dont know how to use aduit logs
like what would my code look like for getting the reason a use was banned when sending a ban report using the guildBanAdd event?
don't use heroku for hosting
Use the filtering methods. Set the user to the banned user and the type to ban add
if something gets returned in the array validate it then send the log
i am too but i still don't use free hosting ¯_(ツ)_/¯
free hosting is shady and unreliable
@gilded blaze can you send out what this would look like or just dm it to me
if you can't afford to spend $3/mo on a vps you probably shouldn't be starting a public bot yet
Why not just on ban fetch the latest audit log that is a ban 
@amber fractal what do you mean?
On guildBanAdd, fetch the latest audit log
My problem is not knowing how to use vps
@amber fractal how do you do you fetch the latest audit log when the event triggers?
guildBanAdd passes guild and user
but yet again we're limited by discord and their very bad implementation, audit logs have strict criteria for an action to be logged and it has a slight to giant delay, depending on how discord feels, on the entry
Hasnt messed up on me yet
but how do i get the reason from the audit log into a variable that i can then add into a message
use the docs

it's literally .reason
well 😆 idk
would it look something like this
guild.fetchAuditLogs() .then(audit => console.log(audit.entries.first())) let reason = (idk here).reason
if you want to get the latest log
You'd put the reason inside the then
Well, I do everything inside the then
where in the .then
you change the .then from just being console.log to a function
heroku or any other free hosting is a no go
like .then(audit => .reason)?
Have you used a .then before?
private bots? fine, use free hosting, it's not going to be used by a lot of people outside of your scope, but for a public bot free hosting does not come as an option
no
lol how is heroku shady, its owned by fricking salesforce
and free hosting is an option for bots that aren't very resource intensive
any form of hosting has its benefits and limitations
//function body
})```
well i can also say bots in general are shady
just because some are doesn't mean all are
invalid
@amber fractal what would you put in the function
hosting and bots are two completely different things, you cannot compare them
I cant give you all the code
would it be like let reason = .reason
my point is that anything can have some shady instances
not to mention, if you have an edu email, many services are willing to fund you with a proper vps with some limitations, e.g github edu pack offers you 50 bucks on DO and a year free on AWS with no credit card required
that doesn't invalidate the entire idea
well yeah but ofc they'll try to suck you into paying after that's over
my bot held pretty good with 1.9k guilds on 1 gb so you should be good
They dont use that much ram, unless you did something wrong, or you get a lot of guilds
Or you're like me and cache everything because you're an idiot
but that's me
I just cache my user data, and release it if it needs memory, or they don't use it
got that 5ms faster response, u kno?
yeah, i cache user data for 24 hours, if it hasn't been touched for more than that it gets dumped
Yeah, I run 3-4 bots, but because it caches everything, it uses more than it needs 
and other processes
also i found a nifty little hack recently, if you want to get the first ever message in a channel you can use GET/channels/{channel.id}/messages, set after to 0 and limit to 1
wait
Integrate your service with Discord — whether it's a bot or a game or your whatever you wildest imagination can come up with.
that woulda been so helpful to know
I can now make a program to get the queue size

response for this channel
Wait, it gave me the most recent one 
@amber fractal i got it to work so thanks!
:+1:
it should be the same thing, shouldnt it?
nope it doesn't
makes a rest request
Yeah, Im on it
it says whether it's cached or not
Really weird then
Wait
thats fetchMessage
Whatever
I have a really bad migrane rn, Imma go have some tea and lie down
I just realized that my bot grew from 3 commands to 51 within 2 weeks.
migraine*
- a working money system
Take care man, you dont wanna get a too big headache
14 days for 48 commands is a lot
Yeah, i didnt even realize it lol
@amber fractal What you mean with "queue size"? And you use discord.js?
What?
I didnt ask a question
did I?
idk terible migraine rn preparing some tea before I take a nap
is there any way to fetch the amount of unbans like how guild.fetchBans() .then(bans => { let bannum = bans.size })
gives you the number of bans, can you do that with unbans or what?(discord.js)
no
😢
because unbans don't exist as an entity
ok
??
its a guild audit log type
ah
im trying to make it so it will count the number of unbans
The event is guildBanRemove, for d.js
so like if i unban a person i want the unban count to be 1
yes
could I do that
you're most likely going to need a database to keep that data persistent
you can if you save the number of times the unban even was triggered
ok nvm then
but you can fetch unbans tho
Are they? rip
how would i track unbans then?
and fetching all of them evey time will be slow and spam
TarpergonToday at 11:17 PM
The event is guildBanRemove, for d.js
easy way of getting ip banned
what would i put in the guildBanRemove event though to make it track the unbans for that server
I learn something new every day
learn js, for the third time now, we aren't going to spoonfeed you code
it's basic number incrementation
@undone hearth for bans you can save every time to your json file when someone gets unbanned
just an easy filesysyem
using json as a database 🙅
Well, if it's just something like bans, does it matter?
yes
I keep non important stats in json, user data in a DB
one of two unbans logged to a json file at the same time will fail
which is why you don't use text or json files as a database
you use a database as a database
beats me ¯_(ツ)_/¯
it's bad practice to use json as a database for persistent data
thats just stats I like to look at
it doesnt matter if they become corrupt to me, but they are just cool little things I like
and I just realized that was an accidental ad
now, i'm not saying "oh don't use json for anything it's bad", json is fine for app settings or settings on software startup, however don't use it for persistent data, it wasn't made for that
cool, what about a VPS now

how can i install that pleaz ? 😂
cause i do npm install moment
and nothing change
:+1:
i just have a question
when i am connected to my vps
do i need to go to the files node_modules
for do npm i
no
^
you run it in the root of your bots folder
You're trying to delete the same message twice
msg.delete() then a check then delete again
Remove the one before the check.
msg.delete() runs then another msg.delete() runs when msg doesnt exist
Thats the error
Google search is quite nice too
How do I make it delete the message before the purge?
Just dont have two msg.delete()s
Well what did you change?
Well mine is different, only accepts 2-100 and doesnt delete the command message beforehand, and does it in the bulk delete
ok
@umbral trench you dont "await" msg.delete()
it means it wont wait for msg.delete() to finish before bulk deleting hence throwing Unknown Message
k
so I've got this node.js HTTP server running, tested it locally and externally and it's working on both, but when I hit "test" on the webhook I'm not getting anything, anyone have any suggestions?
would it be because I'm using HTTP and not HTTPS?
nevermind
im trying to show the difference in roles before a role is added and after, my code looks like this
bot.on('guildMemberUpdate', (oldMember, newMember) => { let log = oldMember.guild.channels.find(name`, "log");
if(!log) return;
oldMember.guild.fetchAuditLogs()
.then(audit => {
let user = audit.entries.first().executor
let logembed = new Discord.RichEmbed()
.setAuthor(`User Update Case`, user.avatarURL)
.setThumbnail(user.avatarURL)
.setColor("8c0066")
.setDescription("User Updated!")
.addField("Updated By", user, true)
.addField("Updated Deleted By ID", user.id, true)
.addField("Roles Before", oldMember.roles, true)
.addField("Roles After", newMember.roles, true)
.setTimestamp()
log.send(logembed)
})
})`
what am i doing wrong?
when it runs, it just says [object map] where it should show the roles after and before
what version of d.js?
my bad this is what it says
yeah, roles is a collection of the member's roles
version of d,js one sec
yes
okay
that worked @brittle nova thanks!
welcome
/opt/watcher/app-types/node/start.sh: line 49: null: command not found
Whats the problem?
d.js? @clever wave
yes
Git Hub also found a music boat I wanted to set up ver I got such an error @earnest phoenix
glitch
and send all error
I'm using the glitch
I host all my bots there ^
glitch isnt really for hosting public bots. that is designed for testing only either ways
👀
what should I do
Projects require a start command in package.json, so try:
"scripts": { "start": "sh ./etc/app-types/node/start.sh" },
make sure
"scripts": {
"start": "node --max-old-space-size=128 --trace-gc --always-compact coreyamato.js"
},
this is pointing into right file
dont copy my tags because its for testing
just node <file.js>
what's your starting file name @clever wave
thats enough 
@earnest phoenix http://prntscr.com/mnjm52
remove Procfile...
... this is not heroku
node bot.js
this is glitch @lament meteor
I can make glitch 24 hours
So you can do something like what I’ve put above if you’re using a sh file. But if you don’t, then you can just do "start": "node server.js", replacing server.js with the name of your server start file.
@earnest phoenix same
this is hopeless
1 minute @earnest phoenix
k
My friend code a bot using notepad XD
Gg
LOL xd
It's hard using notepad
Yea
@earnest phoenix I remove Procfile
But he says its easy
@clever wave now go package.json and send me the code
@earnest phoenix send me here?
sup everyone
is there an way to listen for multiple events
with discord.js
in the same block
i want to listen for multiple events in the same code block
I think he wanna that the bot will listen to 2 things
like client.on('event1 event2')
yes you can
is that possible?
I never heard of someone did that
Maybe
but if you want read node.js docs
make INTERVAL
you probably can find your answer in node.js docs
interval, read in docs
i want to have this in one block
client.on('guildCreate', updatePresence) client.on('guildDelete', updatePresence)
okay
i'll read the docs
?
if you run it on interval
make sure you remove that listener
``
client.on('guildCreate', updatePresence) => {
//here
}
``
i know what i'm doing
or else you will have a leak in your listeners
i just want to listen for 2 discord.js events like this client.on('guildCreate guildRemove')
var interval = setInterval (function () { //here ) }, 1 * 1000);
why would i need an interval?
read there
thats basically event emitter which d.js use
but in my opinion as you can see in the docs, .on() only listens into one event
so if you want them to use the same function
const event = (guild) => {
// code
}
client.on('event', event);
client.on('event', event);
function doSomething() {
// code here
}
emitter.on(event, doSomething)
emitter.on(event, doSomething)
thats the only way
i'll try to explain it again
@sinful lotus the () isnt needed 
oh yas my bad lmao
so i want to listen for 2 events in one listener like this client.on('event1 event2', myFunction)
.on only listens to one single event. you cant throw 90 events into a single listener and handle it in a single block
I already answered you you cant do that instead you can do what we sent
no
You cant do it like that instead you can make them invoke the same function
there bold
sighs
the only question i have
is
is it possible to put 2 events in one listener
yes or no
okay
Did you read what we've told you?
its even in bold
losing braincells by the minute
you are the worst
said the weeb
if you're gonna ask technical questions and people reply at least be arsed to some extent to read their replies
instead of ignoring and spamming your question for the 9th time to get the same exact responses
awesome reply

my question was super simple
we answered it + we gave you examples
I dont see the reason for you to rant
and we've given you 5 super simple answers
You can't just do client.on('guildCreate', then the next event you want to listen to)

ik that

apparently you don't lmao
but you asked even you said you know that
xd
you guys clearly didn't read my question
i wasn't asking how to make add an event listener
we answered that you cant + we cited examples
"i want to have this in one block" was your first question, speech 100
thank you for that

this server is full of copy paste "devs"
yes I copy paste my 200 files code 
if you can't read docs you're nowhere near a position to shit on others
i can?
how come you had to ask if you can
node.js docs answer your question
I also gave a link to the docs^^
i wanted an short awnser from someone
not how to make an interval
or an callback function
the art of filtering valuable from trash responses that have nothing to do with your question
first of all your question was vague
it wasn't
anyway, research is a crucial part of software development, if you cannot be arsed to google a simple question development may or may not be the wrong hobby
we cant magically answer your question
"i want this in one block two code lines" clear 100
i didn't say two code lines
bye
everyone
thank you for the awnser @sinful lotus
you said this question bro. with this question normally what I have thought is
function stuff() {
emitter.on()
emitter.on()
}
if you want someone helping you fast clarify what you want
carification was only part of the problem he repeated what he actually wanted like 3 times while ignoring a shitton of responses telling him that it's not possible
to then go on a rant that we're not helping
should i use js or ts
So I had to add a temp workaround for this
But basically what's going on is the entire command was giving no output not even an error message when using "999"
Anyone got any idea why?
Discord.js
mobile coding 

request 😭
Not coding it on mobile dont worry lol
why are you debugging on mobile then 👀
Was just quicker to grab the screenshot through termux
I'm just confused though
On why it specifically isnt working with 999
Every other number I've tried is fine
i mean since it works for any other number it should fail somewhere in the block that handles 999 input, but that block looks fine
log num and try a few different inputs (including 999)
Alright.
Will get to that when I can get on my laptop
Dealing with a ton of updates on it rn
vim is like a curse
Vim-haters are horrible people
no u
Hi
How can i install module quick.db on Windows?
Its giving error about sqlite
I don't use Vim not because I hate it, I don't use it because I'm too dumb to remember every command
em
so i made lb
i got it to show 1-10 but i dont know how to make it 10-20
anyone help?
in which language is your bot wrote in?
JS
resps.length =
?
I don't know how your code exactly works because I can't read your mind magically. Modify it to 20 then? 
is resps an array
yes
If rersps is an array modifying length value does nothing.
You have to modify way you filter/query results.
so
create a new array from your original one that removes the first 10 elements
and log the first 10 of your second array
which essentially is 10-20
Well...
db.startsWith(currency_${client.user}).then(resps => {
how you filter resps?
thats example
dblClient.webhook.on('vote', vote => { console.log(`User with ID ${vote.user} just voted!); }`)});
^
TypeError: Cannot read property 'on' of undefined
can someone please tell why this error apair ?
i'm calling the class here
const dblClient = new dblapi("You tried",{})
You have to initiate the webhook.
Aka start it wasoever.
const dblClient = new dblapi(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });```
See if this helps ^
it's isnt something that we should make in the dash right ?
Wdym?
the webhook isn't something that should we setup in the dashboard or it is ?
Oh, you have to get your dbl api token, to set a adrees to point that Upvotes to.
only the api token ? (soory i'm giga dumb)
in your bot's edit page you can add the webhook url
^ that
where you have the listener running
Oh so i can't use a custom bot for it ?
If you turn on listener on another bot you can.
But you have to add the webhook url to the bot you want to get upvotes from.
That not wait i mean
i mean using an actual bot to send a message in a channel when someone upvote
How would i go about making a timed ban command?
I could use setinterval but my bot will definitely not run more than a couple of days straight
@split hazel what do you mean by timed ban?
basically it unbans the user after a specified amount of time has passed.
you would need a settimeout
not setinterval
setinterval executes it every time the given time is up
settimeout only does it once
ah yeah i meant set timeout
but set timeout resets after the bot restarts
which is a problem with longer ban lengths
yeah 🤔
I heard you can store the time in a database and when it hits that time, unban them. But the question is how would i fire that event
store in the db, start a timeout
when it runs, remove from db and unban
on startup, load all from db and start their timeouts
Is anyone here? I'm trying to install arch and idk how to partition the drive 
like how much swap do I need
aaaa
when i installed xubuntu i did 8gb for my swap partition
just out of curiosity.. what desktop environment did you use?
ok everyone has their tastes
I used to use xfce for about a month
then I learned that kde exists
xubuntu is what ive been using at school for almost 4 years, so im used to it
@spare glen 👀
what
That contains your password 👀
@inner jewel could you rephrase?
I don't see anything wrong with the code
tempban(target, time) {
target.ban()
saveToDb(target.guildId, target.id, now + time)
settimeout(() => unban(target), time)
}
unban(target) {
target.unban()
removeFromDb(target.guildId, target.id)
}
onStartup() {
loadAllFromDb((guild, id, when) => settimeout(() => unban(...), when - now))
}```
basically this
So is it wise to keep the commands for my bot in the index?
which library?
It seems easier to me doing that then creating individual JavaScript files for them
Easiest isnt always best
You cant reload commands/modules, and iirc, module.exports is faster, not to mention more organized than all in one file
in javascript is there any reason not to use Map() or to use it over objects?
If you're an oldie and dont feel like using maps
So basically Map is better in every case?
I still use objects because Im too lazy to rewrite my stuff
unless they become deprecated, probabably staying like that. Unless I get some incentive to actually optimize my bot
Hey, I have a small question: I was looking in #mod-logs and I noticed that sometimes bots are rejected for responding to words like "Hello". However, my own bot (which has already been approved) also responds to the words "Good bot" and "Bad bot". Should I remove this feature?
I love when people ask this question tbh. You just need to disable it for this guild
you dont need to remove it completely :+1:
Is my bot on this guild?
wat
if it was approved, it should be
Oh I didn't even know lol
speechless
I'll add an exception for this guild then. Thanks 😃
i was wondering, what does async actually do?
does something asynchronously
high iq
howdy
does anyone know what it could mean by duplicate
the default file hasnt been touched

Like I just double checked and there is nothing out of the ordinary
Im having a problem using json as a database since adds elements outside the array, and I can not find the error within my code
is there a good way to go about finding the error
^^ fixed my issue above - in-case anyone is ever searching messages, make sure you delete nanos 'default.save' file - itll cause issues
How would i go on making a spam filter?
well it depends on how smart you want it to be'
if you want a simple timer // to have the command wait before running, just add a userid to a set, and have the command wait like a few seconds before executing (if the userid is in the set)
Someone made a module on npm all about it 😂
Hm ok
Ah i meant like a proper spam filter
and that module didnt work because its very outdated
make it yourself
Is a raspberry pi a good computer to run a discord bot on?
Yeah
I have one but never used it for anything
Lol I should probably split up my code into some organized files
I’m at 2400 lines in a single file now
Scroll fer dayyyz
ctrl f
f
ive rewritten my bot
it now logs on (from ready)
in js
but goes off after 30 secs
how do i keep it on?
(no errors)
setInterval((a) => {
client.user.setActivity(activities[Math.floor((Math.random() * activities.length))])
})
@wide ruin this isnt good
should i use the ~~ one
no you dont have ms
if you dont have ms means that thing is spamming
means api spam
also how it turns of after 30 seconds?
it just goes offline
what node you are using
because if you are using node v10 above and a uncaught promise error happens, it will crash your bot silently
handle your promises
. . .
Promises can "reject" hence throwing uncaught promise rejection
in order to fix that you need to handle your promises properly
where do i look to learn how to fix?
async function stuff() {
try {
promise() // non awaited promise
} catch (error) {
console.error(error)
}
}
async function stuff() {
try {
await promise() // awaited promise
} catch (error) {
console.error(error)
}
}
some example is here ^
a promise that inside an async function but not awaited, if that promise errors your bot will crash silently EVEN inside a try catch block
the second part is a promise that is awaited inside a try catch block, if that promise errors, the error would be caught and logged hence not crashing your bot
another thing to catch promise errors are
promise().then(() => {}).catch(() => {})
do they both do the same thing?
on the first codeblock I sent, the first function will crash IF the promise rejects while the second function will catch the error if the promise rejects since its awaited inside the async function
the second codeblock is the traditional way of handling promises
and where would the .then stuff go?
if you want to know how to determine whether something is a promise for example in discord.js look in the returns part and take a look if it is a promise like how I circled
@wide ruin the .then and .catch is traditional way of handling promises. if the function isnt an async one as how I did in the first codeblock
so i just ignore it if its an async
yes but you need to put it inside
- a try catch block
- and make sure it is awaited
i have both of them now
yes but seeing you didnt know this until now, you may need to skim through your whole code again
where do i need them?
as I said earlier promises
I gave a screenshot on determining what is a promise
in discord.js functions so its up to you to study it
so where i do stuff that returns a promise, add that
yes if inside an async function
try catch and await
if not async
.catch(console.error)
thats all you need to remember
with dealing with promise rejection handling
if its not an async, id do message.....').catch(console.error)?
@wide ruin try booting the bot with a bare bones code only
if that stil dont work thenIm afaik it could be still an error with your code
can someone help me?
@ me if you can
@earnest phoenix no one (but me) is going to mention you if no one knows what the problem is
😦
(that was an invitation to you know.. ask the question)
how to add a role to a user in d.js masters?
member.roles.add()
o ty xig
@lament meteor or
``
let role = message.guild.roles.find(r => r.name === "name");
let member = message.mentions.members.first();
member.addRole(role).catch(console.error);
``
so you ping an member
How would i do to ignore welcome messages in this server (.py) from dms
Read the docs for the library you use
Find out how to get the id of the server that was joined
Ignore it if it's this server
Ye
@wide ruin your error is Error: read ECONNRESET
This thing happens in numerous reasons, most common is your connection died somewhere between your vps and discord
Beyler Koda Emoji Eklemeyi Bilen Varmı?
on what?
i need web developer
what do you mean?
i want to make a control panel for my bot
like on the discord bot website?
you need that or buy a website
ur create in glitch
I am trying to be able to code in Python on pc but idk really know how to download it the right way
Could someone help me?
Btw when i open command prompt it says microsoft Visual studio's 2017 is this normal?
Yes 64
download
Execyt1bke installeer?
you wanna code for discord?
Yes i have made my own discord bot and coded on mobile but mobile sucks so i wanna redo on pc
key
what? @slender thistle
That's really outdated version
pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice] to install rewrite, which is a newer version of d.py with a lot more features
@floral geyser
And docs for rewrite: https://discordpy.readthedocs.io/en/rewrite/
what is the differnce between Map() in js and dict() in python?
some sites say theyre the same, other that they are completely other things
Map is arrays, dict is... dicts
oh so a dict is a completely different object type?
so.. objects?
oh wow this makes no sense
What
a dict is a map
oh
Also, py is OOP, so kinda object too
they're both key -> value
better javascript
Good is only an opinion
I am back
I only need 5 more, I dont plan on applying any time soon tho
I think what cutie meant to ask was if dict was for key/value storage
Could someone show me what I am doing wrong here? I keep getting Error Uncaught Promise Error: TypeError: event.bind is not a function at evtFiles.forEach.file (/home/oem/Desktop/RedQueen/bot.js:145:36) and I think it's because of the function at the bottom of this code https://hastebin.com/ixetodewos.js
which is this line
client.on(eventName, event.bind(null, client)); It worked before
which why I am thinking it has something to do with that function at the bottom of that code I posted. IDK if it's supposed to be a function or something else, or if I just have it completely set up wrong.
If I have my shard count on auto, will the shard manager automatically create new shards?
Working with d.js
you can't add more shards without restarting all
Ok
How would i bulk delete a specific users messages?
Fetch > Delete
but how to fetch them
is there a way to make sq lite coin system to every server?
cuz when i go in different servers i have 0 coins 🤷
to every server?
and if we're on the same lines then yes
some bots have it to automatically set a users value to 0 even when they never sent a message, which uses unnecessary space. Most efficient way is to check on every 'coin system' command if their sqlite table entry exists, and if it doesn't, create one for them and set the value to 0
@lost scarab so make amount for bot.user not for guild.user @lost scarab

I'm creating a tycoon-type bot and need some information on how I should go to saving data. My bot is coded in lua.
mongodb
@vapid ferry what data do you wanna save?
like money,items,donation status etc
So with money
you can use batabase
like quick.db
items too ^
donation? @vapid ferry
quick.db isnt a database
How not?
it literally wraps around json or sqlite or something
not a db, its a storage wrapper
yes
I'm fine with saving it as a file on my local machine,
good for you
@sick cloud What do you recommend?
I'm planning to host on a Raspberry Pi
oh
Hallo, anyone know why when i use dark theme at the site, my css won`t work
hmmm...?
Idk lol
Anyone able to help me on connecting MySQL to lua?
hello there
Don't use Redis as a database use it for caching
Why not? Nothing wrong with it
Unless you have sensitive realtime data anf cant afford the slightest possibility of losing < 1 second worth of data
Nobody here has terabytes of data
Its oerfectly fine to usrme redis as the primary database specially in AOF mode, as long as your dataset fits in memory
¯_(ツ)_/¯
Uhm
I need help
;-;
In my bot coding, I'm coding a mute command.
But
It keeps getting an error
Whats the error?
your indentation is wrong
did you tab too much

