#development
1 messages ยท Page 1647 of 1
lol, what does your bot do?
theres WAY too many multi purpose bots
^^
oh im glad you asked
clears throat
so, my bot is using detritus...
Since the Pandemic Discord bots are on hype, and 90% are trash
The recursive descent parser for my programming language written in JS is coming along nicely.
lol, they just pay you for this sentence, more self prom pls
unfortunately that's true, it's oversaturated with garbage bots*

typescript, postgres, redis and detritus.
im always talking about either one of those
I rarely develop with ts, but all others are fine for me 
ts bae tho
^^
and experimental es features
and you don't have to even worry about browser compatibility because it's transpiled to the es version you define
ts usually has stuff before node even releases it
conditional chain was in ts before it was in node

see? cry gets it
i just need someone who understands me on that level, but on detritus

for postgres i have xetera
for grafana i have zorotic
for ts we got a couple here
but i got no one to flex detritus with
me too, psql is superior

i prefer cutting/putting jam on my bread with a chainsaw tho
overkill tools for the right job

you're american aren't u?
im not lul
i recently migrated our school's account system from ms access to postgres
even though i had plenty of peanuyt butter jelly in canada
weird, because for america overkill is the only kill
access...
site loading (ssr'd) went from ~860ms to ~120ms
ba-dum-ts
who tf ever uses access?
our government ๐
lul
every government-issued school site runs on a 2008 forum engine with like 128mb ram
Cry where are you from
but sites can reject the request?!
ours dont lmfao
not protected by cloudflare
nor a reverse proxy
nor anything for that matter
put \ before >
what makes you think they know what CF is?
good point
schools are weird, especially universities
like
they teach you that innovation is the key in any business
yet they use the most deprecated or outdated software as possible
Ours is probably not protected either, but I don't have access to any of the school's servers sadly
and their computers are those white blocky machines from the 2000's
it's both funny and embarassing when they're supposed to educate you about security but they don't implement security in the first place ๐งโโ๏ธ
in fairness
dude, my CS university had https://ubuntu.com/ on blocked urls
Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.
who would attack a uni?
yet we had ubuntu classes on our 2nd year
don't need to point that our teacher had to undergo a bureucracy to free ubuntu site
Our grades aren't even stored in a database owned by our school
<iframe src="https://sites.google.com/view/narutoryo/home?authuser=1" width="80%" height="80%"></iframe>```
can a google site bot website work for this?
imagine not writing everything
fun fact, when online classes started due to the pandemic last year, our whole school authentication system (that goes through the government) crashed, nobody in the entire country could log in
classes where postponed for a week and in the end they blamed "hackers"... but it was just their shitty servers
in paper
for top.gg, yes
k
that happened with the healthcare and emergency aux systems here
welcome to brazil
brazilian/russian difficulty comes after hardcore mode
gotta beat it twice on hardcore to unlock it
brazil is gta online, russia is tarkov
you convinced me that croatia is relatively ok as a second world country ๐๏ธ ๐ ๐๏ธ
good comparison
here people fly on you in bikes and steal ur money
enter a new extra line between each one
ah yes english
so you get this
for getting multiple outputs out of a single function, I should use lists right?
in what context
minesweeper bot, because of custom emotes, the board has to be split into two messages
if its true set to false if false set to true, can i use this method or no?js true ? false : true
lol
a = !!!!!!!!!!!!!!!!!a
debug it
function randomBool() {
let bool;
return eval(`${"!".repeat(Math.round(Math.random() * 100))}bool`)
}
cursed
should i stay with normal js or learn ts?
help me? I confusion
hi confusion, i'm cry
anyway
i told you to debug it
we're not computers, we can't run your code on the go
trial and error baby
gradually fix your code
baby๐ซ
Try some TypeScript and see if you want to use it. Personally, I'd use another language that supports strong typing and other features natively (since TS is just safe JS compiling down to JS), but if you want interpolation with JS, sure.
k thanks
what do i use to skip the gap?
wdym
i wonder if theres a limit
let a = !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!true```
time to write a 40k line file with that

What way would you say is the best for making a DB for your bot?
you probably shouldn't make one but rather use one
which one? depends on your use case
Hello everyone, does anyone knows if there a fix for unicode emoji display being weird when using unicode? as you can see in the screen shot, the โก๏ธ displays correctly in the reaction but not in the embed
the footer doesn't support emojis
oh i see, thanks!
you can try setting the footer icon url to this https://discord.com/assets/464b4ad3ec906581bdc288c42780b3c9.svg
I fucking hate this so much
thanks!
does embed image fields even support svgs
nope
i don't think discord supports rendering svgs from a url at all
anyway
that should definitely work
Learning C# for Unity or whatever language Unreal Engine uses depending on your engine preferences
2d for now
can u do c# for browser games? like in html5
with blazor
Sounds jank
it is
here's a webseries that was shared in the c# guild https://www.youtube.com/watch?v=wTmZCu16LNU
Build a web application without JavaScript! In this tutorial series, we will build the game "Flappy Bird" using C# with Blazor WebAssembly!
๐๐๐๐๐
๐ Hi, I'm Erin. My goal is to help bridge the gap between "learning" and "doing" by building demo applications that are fun and interesting while also demonstrating important concepts within C# and ....
thanks
you should probably just use js though
Honestly, if you're gonna make html games, just learn js
yeah i am very fond of .io games
It depends on what the issue is.
For instance, If something isn't what it's supposed to be;
you should log the value of variables around where an error occurs then use that info to deduce where the logical error occured. Stepping back into code execution further if you find nothing useful
@earnest phoenix https://code.visualstudio.com/docs/editor/debugging
avoid using console log for debugging
console log should be using for logging, not debugging
it can be used for logs, but good practices would lead you to have a different app for testing, and one for production
use sentry for production or debugger for local branches
You should already have different envs for prod and testing
indeed, but my point stands, its bad practice to use console log for debugging
once you learn how to properly use breakpoints and conditional breakpoints, you'll ditch console logging as a means for debugging
Perhaps my practices are rather primitive compared to what vsc has to offer, but it is still a basic means to debugging since not all editors are built equally.
instead of
client.on('message', message => {
if(message.author.bot) console.log(message);
});
do
or use a logpoint if you always want a value
but in the example above you can set conditional breakpoints that'll only trigger on specific values
instead of having to change your code for the sake of debugging
the thing is, inspect is native for node
not really related to vsc specifically
the way you debug code is exposing a debugging port to it
it might be a bit too sofisticated, you're right, for someone new its best to use console.log() by a mile, simply because its easy to understand, but its not proper debugging
when offered tools, one should likely use them
dont use console.error for errors
i thought console.error was for logging errors so i was doing that in my catch statement and it kept crashing my project
crashes? errors? where? dont see any 
๐
I'm not on vsc
then what you using?
code
what code?
i dont see any code
notepad
notepad++
vim
atom
sublime
vsc
those are the only ones im aware of
oh, and neovim
i guess nano fits there too as an editor
but yeah, no code
none of them
cant help you if you dont reply with a definitive answer, letting someone else handle your question if thats the case

keep it here
def not
good luck then


Weren't you going to take courses?
my dms are only for business , friends or regarding stuff im developing or developed
such as bugs or something
i cant find anythignon google for a basic send a pre-made message to all guilds like a simple "Bot Going Offline - UPDATE"
have your guilds set an announcement channel for that
Mass messaging would be api abuse
Either use announcements channel or ask your users to setup a webhook
what's the most efficient way to make a menu with reactions to switch pages? reactioncollector?
if i do like (f'welcome {user.mention}') with that make it so it pings them
Map containing string-function pairs, with a onReactionAdd/Remove event checking that map
is there an example/docs anywhere for that? thx in advance
Don't think so
Unless you can convert a java code to javascript
The problem with collectors is that they create a new listener for each collector created
Even if they're short lived
That said, you asked for the MOST EFFICIENT way, not for the MOST SIMPLE
haha alright
i think i can take care of the map part, it's just figuring out the events
what would be the "simplest" or most conventional way though?
Collectors
i see
The maps would actually be string-array pairs
The key being message id
And the array containing object with emote names and functions
So the event checks if the message id is in the map, then checks if the reaction emote is in the array
If it is, execute the function
nah I was just messing around
ik the line for it just wanted to make sure I wasn't tripping
Didn't I say?
Is there a simple way to make a channel joinable for a role and then re-lock it?
Or do I have to do channel#overwritePermissions twice?
Even if the person joins before you hide it, he/she'll not be able to read it anyway
guild.member() returns null when the user is in the server
It's voice
Same for voice
why is this happening
He'll be kicked from it
Cache
I'm not hiding it though. Just making it joinable
it does when i run for myself
Will be kicked
this
Just add a user perm override if u want to allow only a specific person join
I need a role to be able to join though
If I do voice.join they can be moved and can stay in
Like, the same as you do with roles
Because if you pull someone onto a channel it's a different kind of join
Is that id valid?
Also, I'm pretty sure you need to do guild.members.cache(id)
theres only two users that exist in the server
The way you're doing is getting the author of the message, you can't pass an id to it
when the member count is like 50
Cache all
guys
I got this
const Discord = require('discord.js')
module.exports = {
name: 'report',
execute: async (client, message, args) => {
const myID = '717526789882380338'
var lockedList = ['717526789882380338', ''];
const person = message.author.username
const userID = message.author.id
if (userID == lockedList) {
return message.channel.send('***You have abused this feature before and as such have been put on a blacklist***')
} else { //ect.. }```
and when I put locked id in..
and the locked id trys to run command
They'll stay in the channel no?
it just acts like the part isnt there
I'm going to try it. I'm pretty sure I know bots that do something like it
I just tried and I wasn't kicked, unless I missed something
If you really want to reduce the request, ig you can move the member from an open channel instead
I'm currently doing that but trying to change it to make it easier for users
He's saying do lockedList.includes(id) or something similar
I dont think so..
How do you still compare a person to a building?
=== is "equals to"
A single Id will never equal an entire list of Ids
oh..
yes..
You could make it quicker if the list gets big and use a set instead
Will throw "id is not defined" tho
Well yeah. Don't user id
Adapt. Overcome. Thrive
This is a linear search in an array though
well that work if I do const lockedList = ["", ""] if (lockedList.includes(lockedList)) { }
Oh my dog
A building that contains itself
@earnest phoenix see?
That's what I didn't want u to turn into

Quick update, you can use overwrite permissions to allow users to connect and then deny the permission again.
It doesn't kick
wee
woo
in the discord.py rewrite is there a method or event for a user boosting the server?
thanks
is there an event trigger for it?
i want when a user boosts, to give them a custom role
you could do this:
@bot.event
async def on_guild_update(before, after):
if (some condition here) in after.guild.premium_subscribers:
print("found")
you can just listen to member update event ig
Heroku is a really bad option
If you can't do paid hosting you shouldnt do it at all
bruh
i wish i can curse
like "fuck you"?
Yeah idk what your problem is, we answered your questions with what we believe is right
And Extreme even posted you that guide
Set up an aws account with credit card and you will get 1 free year of a t2.micro instance
i dont have a credit card
and also idk what is aws
what is it
Amazon web services.
I think every vps service is going to require a credit card just to prevent hackers from creating bot nets
heroku dont
Heroku isn't a vps
he already got support, poor guy keeps getting tagged after he got support ๐
Itโs probably not in the correct scope of usage
its in the message event
but i cant put it in the guildmemberadd event cause then it says "message is not defined"
Try move this
To this
and change the message to member
member.guild.id should work
maybe tho
i dont think that this would work
Bruh
Did u need that welcome message for all command?
why u put it on the message event
not move then
because of message.guild.id
for all servers ye lol
okay wait
not the message event okay
okay ty bro it worked
How do I say if the given text is a youtube link ?
(I don't do regex)
use regex
bruh

Here http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?โโ[\w\?โโ=]*)?
From https://stackoverflow.com/questions/3717115/regular-expression-for-youtube-links
done!
Great, another botghost bot
Then you use like
let regex = "put the regex here"
"text".match(regex)
or
let text = "yes"
text.match(regex)```
@near stratus
and it gives true or false
Does anyone know a good api for random cats?
or margarine
You can use https://thecatapi.com/
I want some, which does not need get
http get?
You could use this instead, assuming youโre using nodejs https://www.npmjs.com/package/random-meow
that requires get lul?
Whatโs wrong with get? Do you have a person hatred? Because Iโm sure your browser wouldnโt agree with that idea
that costs my bandwith lul
having a discord bot costs bandwidth
all you have to do is get the url of the image, browsing the web on your pc uses more bandwidth then doing that, the node module I sent you will do that
make sure the code is running on your pc
Too many people use it for their bots, unfortunately
lol
I use it for my beta bot
Hey
const Discord = require('discord.js');
const db = require('quick.db')
const { defaultPrefix, deletionTimeout, reactionError, suggestionPending, suggestionApprove, suggestionDecline } = require('../../config.json');
module.exports = async (client, oldMessage, newMessage) => {
let data = db.get(`msglogssynapse_${message.guild.id}`)
if(oldMessage.partial) await oldMessage.fetch()
const logsmessageupdate = oldMessage.guild.channels.cache.find(channel => channel.id === data)
if (!logsmessageupdate) return;
const embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle(`Un message a รฉtรฉ modifiรฉ !`)
.addField(`Membre :`, `${newMessage.author}`)
.addField(`Ancien message :`, `${oldMessage.content}`)
.addField(`Nouveau message :`, `${newMessage.content}`)
.addField(`Channel :`, `<#${oldMessage.channel.id}>`)
.setTimestamp();
logsmessageupdate.send(embed)
}
```How can I use message with module.exports? Because I need this for my data db
client.guilds.cache.forEach(async (guild)=>{ }) will this work?
alright #development, your chance to screw me over here
what's a python db library i should use
sqlite3
I was gonna say mongo but I'm not sure if that exists in Python
hey
i have 2 users and their guilds in 2 differents array and i want to filter to get mutual Guilds in a new array
const mutualGuilds = [];
...
return mutualGuilds
}```
and append to new array if match
bu how
using loops

i have 12 guilds in common with my bot but it says 0 guild
yeah
for(let i = 0; i < user1.guilds.length; i++){
if(user2.guilds.indexOf(user1.guilds[i]) != -1){
console.log("guild is common lol");
}
}
smh don't spoonfeed pls
@near stratus will try thks
lol It was a joke
hmmm
..........
I am having a problem with my command reloader ๐ฆ
delete require.cache[require.resolve(`../${command.category.toLowerCase()}/${command.name.toLowerCase()}.js`)];
it cannot find any module
hmm
@near stratus i edited your code
thks
for(let i = 0; i < botGuilds.length; i++){
const guildPos = userGuilds.map(g => g.id).indexOf(botGuilds[i].id)
if(guildPos !== -1){
mutualGuilds.push(userGuilds[guildPos])
}
}
return await mutualGuilds;```
works fine
if it woks then congrats
UnhandledPromiseRejectionWarning: SyntaxError: Invalid regular expression: /http(?:s?)://(?:www.)?youtu(?:be.com/watch?v=|.be/)([w-_]*)(&(amp;)?โโ[w?โโ=]*)?/: Range out of order in character class
Hey
sup ?
const Discord = require('discord.js');
const db = require('quick.db')
const { defaultPrefix, deletionTimeout, reactionError, suggestionPending, suggestionApprove, suggestionDecline } = require('../../config.json');
module.exports = async (client, message) => {
const guildCreateEmbed = new Discord.MessageEmbed()
.setColor("GREEN")
.setTitle(`Omg, j'ai rejoint un nouveau serveur !`)
.addField(`Serveur :`, `${client.guild.name}`)
.addField(`Fondateur :`, `${client.guild.owner}`)
.addField(`Membres :`, `${client.guild.memberCount}`)
.setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
.setTimestamp();
const guildCreateLogs = message.guild.channels.cache.find(channel => channel.id === '819866826753441824')
guildCreateLogs.send(guildCreateEmbed)
}
```My guildCreate.js has a problem, client.guild is undefined, how to fetch this?
oh
change message to guild @earnest phoenix
at module exports?
but the const
the message guild find
const guildCreateLogs = message.guild.channels.cache.find(channel => channel.id === '819866826753441824')
change to client.channels.cache.find(channel => channel.id === '819866826753441824')
const guildCreateLogs = guild.channels.cache.find(channel => channel.id === '819866826753441824')
like this?
no
read the edit
client.channels.cache.find(channel => channel.id === '819866826753441824')
the channel is in the client object not the guild or message
.addField(Serveur :, ${client.guild.name})
cannot read property name
if you would do guild.channels.cache.find then it would return undefined if the guildis not the guild in which the channel exists
oof
change to guild.name
client.guild is nothing
I test
The event guildCreate gives a guid Collection.
Pass that
bot.on("guildCreate", guild => {
//....
})
thats what I told him
welcome
@earnest phoenix client.guild.cache will return all guilds the bot is in
so that was pretty much useless in your code
client.guilds.cache lel
oof
replace client
why? its works
@tired panther
oof
dont replace
read message history
const Discord = require('discord.js');
const db = require('quick.db')
const { defaultPrefix, deletionTimeout, reactionError, suggestionPending, suggestionApprove, suggestionDecline } = require('../../config.json');
module.exports = async (client, guild) => {
const guildCreateEmbed = new Discord.MessageEmbed()
.setColor("GREEN")
.setTitle(`Omg, j'ai rejoint un nouveau serveur !`)
.addField(`Serveur :`, `${guild.name}`)
.addField(`Fondateur :`, `${guild.owner}`)
.addField(`Membres :`, `${guild.memberCount}`)
.setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
.setTimestamp();
const guildCreateLogs = client.channels.cache.find(channel => channel.id === '819866826753441824')
guildCreateLogs.send(guildCreateEmbed)
}
I mean with nothing myfault lol
Its works I don't edit anything oof
yes
thats what I told him
I don't think that exists
its guild.name
yea
yes, thats why I asked lol, bc they had this in their code
@earnest phoenix you should read the docs for each event
-> https://discord.js.org/#/docs/main/stable/class/Client
no ones help me xD
RIP
hi
hi
yes?
it is ttelling not approved
what to do ?
How do you change the color of the review stars using css?
I tried this:
.entity-reviews {
color: rgb(114, 137, 218);
}
wait as you can read
Mhm
<@&304313580025544704> there is any option to advertise my bot or server ?
-atmods
@inland galleon
Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.
Here are some examples of emergencies:
- Raids / Multiple members mass spamming.
- Severe disruption of Discord's ToS (NSFW content, etc)
- Anything that requires more than 2 moderators to handle.
ah god damnit
If you looked on the website then you may have come across https://top.gg/advertise
Spice up your Discord experience with our diverse range of Discord bots
__dirname will help
Auctions #bids
delete require.cache[require.resolve(__dirname + `../${command.category.toLowerCase()}/${command.name.toLowerCase()}.js`)];
BRUH
did you just wake up all the mods for this ?
sorry sir
ndw
does not work lel
tried this to lel
i c
Use freaking path tool
i never needed to use that even when working on windows and linux machines
just __dirname worked fine so
client.guilds.cache.forEach will this work?
actually for reloading you don't even need __dirname
what?!
ah yea
๐
Or convert it to array then forEach
this works fine
I tried this to, on of this works lol
Is necessary
not for me
I also tried this way, Then I asked here
Its useful for sharded reloading
when it does not work its useless lol
Try what I sent or don't post query in dev channel
Asking for help without actually trying the code

I can show you, I tried it
Did you get it?
does not enter it
my code
client.guilds.cache.map(async (g) => {
let data = await ccdata.fetchall(g.id);
data.forEach(x => {
client.cache.push(x)
})
})```
require.cache[require.resolve(__dirname ,"..", `/commands/fun/meme.js`)];
let file = path.join(__dirname,'..',`${command.config.category}`,`${command.config.name}.js`);
delete require.cache[require.resolve(file)];
let newCommand = new require(file);
this.commands.set(newCommand.config.name, newCommand);
message.channel.send(`Command \`${command.config.name}\` was reloaded!`);
console.log(`Reloaded ${command.config.name} command`);
} catch (error) {
console.error(error);
}
I know, how to make the command lel, to not level me as noob lol
I never thought you were a noob 
error:
Cannot find module '/app/commands/fun/meme.js' It can not find the module
-.-
๐ผ
Does the file exist?
Beginner != noob
i guess not, at least not at the correct place
sure?
I am asking you
you can find a 15 yo beginner and a 25 yo noob
I am in js new (8 months experience)
3?
^
no, try other commands and the file exists
Does meme.js exist?
yes
Sometimes the command name and file name can differ
ik
Make sure they are the same
they are
of the reload command?
try{
const path = require("path")
let file = path.join(__dirname,'..',`bot`, `help.js`);
delete require.cache[require.resolve(file)];
}catch(e){console.log(e)}
I removed useless stuff
You aren't even setting the new command anywhere
That was not useless
Deleting require cache doesn't automatically reload the command
Ik, thats in the code of my reload command
Bro
I just sended the snippet, which is not working
You have to save the new command somewhere
yes client.commands.set(newcommand,bajaklaja)
Make sure your path is correct
how much time it take for approval ?
the problem is that the upper snippet is not working
2-3 Weeks
ok
The error u sent means that the directory and file is not found
So its your issue
In the file path
yes by deleting that cache
Fix the path.... it would work
I was trying what you told and it did not work. So no solution for this problem lol
Sometimes you should also try to fix things on your own end...
Try learning about dirt and paths
Someday...
let allguilds = Array.from(client.guilds.cache.keys());
for(let i= 0 ; i < allguilds.length; i++){}
you cannot perform asynchronous operations inside array methods
You would have to await Promise.all if you do so
only if it's an array of promise
not forEach() or .map() that doesn't return promises like in #development message
is client.cache reserved?
client.guilds.cache.forEach(async (v,g,a) => {
let data = await client.ccdata.fetchall(g);
if(!data) return;
data.forEach(async (x) => {
client.cache.push(x)
})
});
this does not work :c
you can't use await inside .map() or .forEach()
i can console it
it works but is not sync
it doesn't work
you can use a .map() but then you need to await Promise.all() iirc
only if it's an array of promises
so you would need to map it to an async function
tbh just use a for loop because this is just going to make it even more complicated
forEach doesnt respect async stuff
Let me quick send the code
let myArr = Array.from(client.guilds.cache);
for(let i = 0; i < myArr.length; i++){
let obj = myArr[i];
//loop body
}
Ez pz
for (const guild of client.guilds.cache.values()) {
guild
}```
Is that a thing ?
you can also
for (const [, guild] of client.guilds.cache) {
}
that would be entries(), I'm guessing?
wow I need to learn about modern for loop
you don't need to call .entries
yeah
I wonder which one of these two is faster
probably the same
the for loop is definitely faster
of course
otherwise you would need to go over the collection twice
both are for loops tho
yes
My bot i Finished i Just Need to Make it Run 24/7
What can we do?
The node_modules File is Large that it Cant Fit in Github
Oof
yikes
xD
i want suggestions on what to do
but with entries you go over the collection once already, then calling for on that means you iterate two times... when you could've done it in a single loop
micro optimizations people, if you don't do it now, dont be surprised your code runs like yandere simulator
it seems insignificant but when you scale it up, it has an impact
No but you said the for loop is faster, but both of em are for loops
i was referring to this
should've mentioned that
ah
@rustic nova
thanky
This is asking for help not giving help ;)
Discord.js master (Requires Node 14+), pm2 causse it says its using node 11.4.0
Screenshot: https://i.imgur.com/Le6opzp.png
Using nvm install node and nvm use node it put me to v15.11.0 node.
Tried editing something like the interpreter to -interpreter=~/.nvm/versions/node/v15.11.0/bin/node but still same outcome.
Frankly would anyone know how to edit anything regarding pm2 
try nvm use --lts
Same outcome
hmm i might try something quickly and force the process via package.json to use X version
Managed to find a workaround ๐
Hey, im not sure if anyboidy knows how i can update my local repo to what my online repo is? I have deleted all of these branches on my online repo but they are still here on my local one
git pull
That doesnt get rid of the branches
Also, im not wanting to merge with a branch, i just want to get rid of all the branches which have been deleted
Because only have 2 branches now, but this shows like 40
you're in intellij...
using command line git
in intellij
and activate ur windows
that's pycharm
thats clearly vsc
hi I'm using discord.net library. And it looks like one of their methods triggers API limits. Should I try to patch it by coding own method, or discord.net automatically limit itself to prevent Discord API spams?
yeah sure
rich presence has moved to game SDK
and "You can make games in Python ?"
im noob can u send any tutorial video
or link?
Bruh
Game SDK only supports C / C++ and C#
okay LOL
thats why i used this
๐ฆ
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
bruh they have their own webhook system
getting sarcasm is hard nowadays it seems
How to add buttons to your Discord Status
We will use Discord Rich Presence for this so follow the tutorial!
In-built video captions will be located in the bottom
.......................................................................................
๐ด Video by xZyn ๐ด
โบ \ Recorded with OBS Studio
๐ฌ \ Made with VEGAS Pro 17
๐ฅ \ Pl...
rpc moment
Oh. I have no clue how it works & I thought maybe a library could help.
Erwin: It'S caLlEd SdK nOw RPc Is DePreCaTeD
^^
Only that, most of them hasn't been updated in 1+ years.
its true tho
waiting for that
sdk harder to work with

its not tho

@livid lichen then
const express = require('express')
const Topgg = require('@top-gg/sdk')
const app = express() // Your express app
const webhook = new Topgg.Webhook('topggauth123') // add your top.gg webhook authorization (not bot token)
app.post('/dblwebhook', webhook.middleware(), (req, res) => {
// req.vote is your vote object e.g
console.log(req.vote.user) // 221221226561929217
}) // attach the middleware
app.listen(3000)
Thank you so much!
json scrapping?
well kinda, yeah
I don't get it
get the json responses from querying the bots directly
,

UMMM
So im doing the giveaway bot and it just doesnt end...
TypeError: Cannot set property 'hasEnded' of null
at endGiveaway (C:\Users\shree\Desktop\Discord Bots\DiscordBot\node_modules\discord-giveaway\src\functions.js:70:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Job.job (C:\Users\shree\Desktop\Discord Bots\DiscordBot\node_modules\discord-giveaway\src\functions.js:58:39) Unhandled Rejection at Promise Promise {
<rejected> TypeError: Cannot set property 'hasEnded' of null
at endGiveaway (C:\Users\shree\Desktop\Discord Bots\DiscordBot\node_modules\discord-giveaway\src\functions.js:70:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Job.job (C:\Users\shree\Desktop\Discord Bots\DiscordBot\node_modules\discord-giveaway\src\functions.js:58:39)
}
i get this error and it keeps resending the CONGRATS @dusk scarab you have won the giveaway!
const ms = require('ms')
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'giveaway',
description: "sends youtube link",
async execute(client, message, args, cmd, Discord){
const channel = message.mentions.channels.first();
const duration = args[1]
if(!duration) return message.reply(', specify a duration for the giveaway to last')
const winners = args[2]
if(!winners) return message.channel.send('Please specify a number of winners')
const prize = args.slice(3).join(" ")
if(!prize) return message.reply('Please specify a reward for this giveaway!')
await client.giveaways.startGiveaway({
prize: prize,
channelId: channel.id,
guildId: message.guild.id,
duration: duration,
winners: winners,
hostedBy: message.author.id
});
}
}
that is my giveaway code
please ping me if you know what suo
*sup
please show the function client.giveaways.startGiveaway
ok hold on a min
const { GivewayCreator, GiveawayCreator } = require('discord-giveaway')
const Creator = new GiveawayCreator(client, process.env.MONGODB_SRV);
wait, i dont have a client.giveaways.starGiveaway
I modified a tutorial I followed and it just doesnt end...
m8, the tutorial i wateched copy and pasted the packaging lol
i added all the args and stuff
wait
i might have a solution
yeah it works now
all I had to do was do const duration = ms(args[1])
Guys question.
When calling out a function, we pass the 0th or 1st argument, I'm confused.
What do we call the first one?
test(1); // <--- Is 1 considered as the 0th or 1st argument?
in the arguments array it's index 0 but in english we usually will called it "the first"
arguments[0]
Aight!
Thanks.
Lol, i'm living under a rock just to know that there is something called as rest operators in functions to make things an array instead of a single value.
lol, basic js xD
Well you should consider maybe crawling out from under that rock and going through some tutorials, that would help... #development message
it's just a lot easier to do things when you know what you're doing ๐
yes 
e
f
Hi, how do I make it so that only people with "moderation role " can use the bot ?
in js
check if they have the role
Help for my bot
ok you're a lost cause
yes
lol
I want to do the command .wl id_user and my bot will give the moderator role and only people who have their roles can use my bot, it avoids having a DB
is this inefficient
var removeIndex = client.cache.map(function (item) { return item.token; }).indexOf(change.fullDocument.token);
client.cache.splice(removeIndex, 1);
client.cache.push(change.fullDocument) ;
i remove it and add a updated
Ah, you mean if a user has a specific role ID on their server, it would execute, other wise it would not execute?
Yes if "user" has the role "moderator" he can use the bot. Currently everyone can use the bot
Oh.
Alright.
You can do this.
You basically need to get the guild since the role is is in a specific guild, and cache the member or user who is performing the command then check if the user has a specific role by ID.
Some people use JavaScript, other people use Python or JDA.
Python or JDA.
wha
So u know repl
I don't use it as a cloud
No one here use repl?
if(bot.guilds.cache.get('721372685275234436').members.cache.get(user.id).roles.cache.some(r => r.id === "736643325863395331")) {
return true;
} else {
return false;
}
Something like this.
๐
Hi! So I have the following code:
let eggs = db.get(`${message.author.id}.egg`);
let birds = db.get(`${message.author.id}.bird`);
const bread = db.get(`${message.author.id}.bread`) || 0;
let egglength = eggs.length || 0;
let birdlength = birds.length || 0;
let egglist = eggs.join("`, `") || "No eggs";
let birdlist = birds.join("`, `") || "No birds";
let embed = new Discord.MessageEmbed()
.setTitle(`${message.author.tag}'s Inventory`)
.addField(`Eggs - ${egglength}`, `\`${egglist}\``)
.addField(`Birds - ${birdlength}`, `\`${birdlist}\``)
.addField("Bread", bread)
.setColor("BLUE")
.setFooter("Rubber Duck Games", "https://i.imgur.com/s7R7YC3.png")
.setTimestamp();
message.channel.send(embed);
And it keeps throwing an error for:
let egglength = eggs.length || 0;
let birdlength = birds.length || 0;
let egglist = eggs.join("`, `") || "No eggs";
let birdlist = birds.join("`, `") || "No birds";
Saying that eggs/birds doesn't exist. Why doesn't it switch to 0/No eggs/No birds?
It works for the bread variable
nvm
@earnest phoenix i exposed our dms in another dm, with you being a devoted cultist of detritus
i figured it out
imagine exposing DMs
smh

I will subscribe to this bot forever and pay 5 usd monthly if the following options are added too:
-starboard
-rank roles (lv 1 members get one role, lv 5 get another role... like amari bot)
-birthday announcer (like mantaro)
-embedded welcome message that shows member acc info (like welcomer bot)
-when members leave and then, join- their roles are given back (like Role Saver bot)
-username colors can be picked by users if they type the hex color code from google (Lexa bot)
-reaction roles (like yagpd bot)
What?
this is not the place to look for developers
I really love the .pick feature and hope to see more
May I know where I can post my message please? :)
Anywhere not here.
I think you might be on the wrong server
I write only this ?
ik one person
I dont have tag perms :(
You put what you want to execute inside.
rip
ask @earnest phoenix
oh no... I clicked to join the mimu bot server
I use repl! Isnt that bad if all you really wanna do is coding and then after that you dont really have to do much. Not recommended tho
@carmine hornet #support message
๐
-support
bruh, whats the command.
ah, requests aren't allowed... nvm x)
I WANT FINANCIAL DEVELOPMENT, SOMEONE HELP PLES
thanks anyway
You dont have access, even I don't have acess 
Thank you for calling the official financial development service, how may I help?
f
i want moni
Hmm
You may open a Patreon page and ask people to donate (which is a thing I don't recommend).
why?
Rather than that, I am not sure how I can provide you with money.
why no pateron?
You could do in patreon.
Patreon is a membership platform that makes it easy for artists and creators to get paid. Join over {numCreators, number}+ creators earning salaries from over 4 million monthly patrons.
why did you say i would not reccoment
Cause it's not recommended to ask people to donate.
because patreon is shit
Unless they want to, and you give them something in return
at least the developer side
Agree to disagree.
Ok.
Good luck.
I have such an error on my discord bot please help me
no no no, gotta find it
its somewhere
Bot.users.cache.get(request.vote.user);This should work... correct?
yes
Does it require an intent?
Can bots do this aswell?
no
frick
I have a question.
I have removed some packages from the package.json
.. and I want it to update in the package-lock.json and all the node-modules.
How can I do that?
you're not supposed to modify package.json directly
use npm uninstall
that will also update package-lock.json
Hm.
But I did it anyways! ๐
Which was not good, I guess.
How can I make it update for all.
re-add it then use npm uninstall
Just ctrl z
Bruh.
I did that a long time ago and I got no answer, and now I am here asking again.
Ah





