#development
1 messages · Page 1650 of 1
ask veld
otherwise i would lmao
@humble gyro
you can mock the member objects
need a single guild with a bunch of members
yo veld while you’re here any details on the lua thing
but then there are no presense updates
this makes it a good test subject
@humble gyro 👀
you can request all
yea
its chunked tho
thats why i told million to wait before putting the tests out
both for garbage collector
and to wait for chunking
yeah thats why im doing many tests
at 10 minutes
1. discord.js-light
2. discord-rose
3. eris
4. discord.js
5. idk how to spell```
let me check something
hum i am trying to do a leveling system someone know y that not work?
let xp = db.fetch(`xp_${message.guild.id}_${message.author.id}`)
var addxp = Math.random() * 15 + 11;
db.add(`xp_${message.guild.id}_${message.author.id}`, addxp)
let lvlnow = db.fetch(`rank_${message.guild.id}_${message.author.id}`)
if(!lvlnow) db.set(`rank_${message.guild.id}_${message.author.id}`, 1)
let needxp = lvlnow * 5
if(needxp < xp){
db.add(`rank_${message.guild.id}_${message.author.id}`, 1)
db.set(`xp_${message.guild.id}_${message.author.id}`, 1)
return message.channel.send("nice now you level: " + lvlnow)
}
what part doesn't work
please space out your code for readability
;-;
idk there is no err
what are you trying to achieve
.
@viscid gale if it is then no need to tell us that it's readable
Object.entries(process.memoryUsage()).reduce((T, [K, V]) => (T[K] = (V / (1024 ** 2)).toFixed(1) + 'MB', T), {})``` @opal plank
there is no lvl up ,essage
please run that
ugh fine
then the if statement is false
i was saying it because of this comment @earnest phoenix
I don't know how to do /1024/1024 in my head
yes i know lmao
thank you
nice function
@earnest phoenix
i could test on my bot, but it would be better to have a bot in a single guild instead
logging
do you think you could test my bot's code on your token, removing any responses?
so it just doesn't do shit
but still to test mem
you calling tim stupid?
no
HERESY

if I do thatt its stable cache
BURN THE SINNER
Erwin, what exactly did you want to me to test
a way better representation
Return frontend script to client that CANNOT be viewed by client side user. After all, why obfuscate code when you can just HIDE it
uk when i first began with this last week everyone who responded was saying "it's impossible" but now that it works they silent >:{
this can be used in really cool ways u web devs
well yeah, my bot has more members than here, but it would be nice to test it on a single server with a large amount of members
i called you out of instinct
but thinking carefully it matters not
my bot could be used for it too
bordering 600k members
but thats not the thing
having a single guild be used as reference would probably cut down extra varioables
members should be, by far, the biggest threshold on bots
i would say go --yolo and only enable guilds, channels and members
a normal bot should get by with only those
and disable everything else
though that might be unfair as fuck in terms of benchmarking
tim wanted to compare efficiency, but thats hard to do when the lib caches everything

it would be fine if you compared the same things, members with members, without extras
probably yeah
// ERIS
{
rss: '47.3MB',
heapTotal: '12.6MB',
heapUsed: '10.7MB',
external: '1.4MB',
arrayBuffers: '0.1MB'
}
// DISCORD.JS-LIGHT
{
rss: '43.3MB',
heapTotal: '9.4MB',
heapUsed: '7.8MB',
external: '1.5MB',
arrayBuffers: '0.1MB'
}
// DISCORD.JS
{
rss: '51.6MB',
heapTotal: '16.2MB',
heapUsed: '14.6MB',
external: '1.5MB',
arrayBuffers: '0.1MB'
}
// DISCORD-ROSE
{
rss: '53.2MB',
heapTotal: '11.4MB',
heapUsed: '9.8MB',
external: '1.5MB',
arrayBuffers: '0.2MB'
}
// DETRITUS
{
rss: '54.5MB',
heapTotal: '16.7MB',
heapUsed: '14.8MB',
external: '2.1MB',
arrayBuffers: '0.7MB'
}```
@opal plank
but detritus commandHandler by itself makes it worth ditching the other libs
functionality also plays a role
@crimson vapor #development message
thats not cacheless
thats leaves members, channels and guilds
@crimson vapor ```ts
import { CommandClient } from 'detritus-client';
const commandClient = new CommandClient(token, {
cache: {
applications: { enabled: false },
channels: { enabled: false },
connectedAccounts: { enabled: false },
emojis: { enabled: false },
guilds: { enabled: false },
members: { enabled: false },
messages: { enabled: false },
notes: { enabled: false },
presences: { enabled: false },
relationships: { enabled: false },
roles: { enabled: false },
sessions: { enabled: false },
typings: { enabled: false },
users: { enabled: false },
voiceCalls: { enabled: false },
voiceConnections: { enabled: false },
voiceStates: { enabled: false },
},
shardCount: 1,
prefix: '?',
});
commandClient.add({
name: 'ping',
run: context => {
return context.reply({
embed: {
title: 'Pong! DETRITUS',
description: ${Object.entries(process.memoryUsage()).reduce( (T, [K, V]) => ((T[K] = (V / 1024 ** 2).toFixed(1) + 'MB'), T), {} as any, )},
},
});
},
});
commandClient.run();
setInterval(() => {
console.log(
Object.entries(process.memoryUsage()).reduce(
(T, [K, V]) => ((T[K] = (V / 1024 ** 2).toFixed(1) + 'MB'), T),
{} as any,
),
);
}, 1000);```
that should be close enough
its not work that not log and no errors pls help
i did
@opal plank ok I restarted with no cache
tab: exists
So, I'm making a moderation bot using BDFD (since I can't use python/Java Script) and I feel like I need more commands but I am unsure of what else to add
@opal plank
your lib didn't respond
How can I authorize myself when using this endpoint, nothing I tried works
https://i.callumdev.pw/zydmn.png
you can't
yk, you're very very limited on what you can actually make with bdfd
use postman i anything
also, why can't u use those two langs?
lol
if so i cant find how
w3schools, mozilla, udemy, codeacademy, etc
What happens if you do .replace() and that isn't in the string
nothing
Ok noice
Can someone help me?
?
no matter what port I put for the dashboard port whether its 443 or 80
I have SSL running through Cloudflare and the server is hosted through OVH
I created firewall rules to allow and still not working
since people say that BDFD sucks (which i agree with) what if i use glitch.com
which has javascript
still sucks
@earnest phoenix Any idea?
but its a step in the right direction
do you have a vps?
both should work on chromebooks
nah bro sorry
Yea, i'm using OVH @crimson vapor
no I meant golden pineapple
Oh
sorry
how?
which one do you want?
either
https://installpython3.com/chromebook/
https://presstige.io/p/Installing-NodeJS-on-ChromeBook-6ce67ee440674605b5ecafdeab7c9b3e
ideally if you use nodejs, install v12 or newer.
my type of chromebook isn't new enough to run the linux beta 😭

pretty sure you can still do it, just extra hoops to jump through
ratelimit
but define "so slowly"
like, it is supposed to take about 0.5s to add reactions
well, no idea for javascript, but for java there's a setting called relativeRatelimits
which when enabled makes reactions slow af
see if for js there's something similar
I'm making a microservice for my database with rgcp and kotlin. I'm making a service which has a getGuild method which basically sends back the database data of that guild. The grcp response message should be a stringified json of that data right?
const { Client, Collection } = require('discord.js')
class EconomyClient extends Client {
constructor() {
super();
this.discord = require('discord.js');
this.fs = require('fs')
this.path = require('path')
this.mongoose = require('mongoose')
this.commands = new Collection();
this.timeouts = new Collection();
this.config = {
prefix: 'e!'
};
this.schema = this.mongoose.model(`economy`, new this.mongoose.Schema({
User: String,
Coins: Number
}));
}
commandHandler(path) {
this.fs.readdirSync(this.path.normalize(path)).map((f) => {
const File = require(this.path.join(__dirname, `..`, path, f));
this.commands.set(File.name,File)
});
};
start(token,path) {
this.commandHandler(path);
this.login(token);
this.mongoose.connect(`Database`, {
useNewUrlParser: true,
useUnifiedTopology: true
});
this.mongoose.connection.on('connected',() => console.log("DB connected"));
this.on('ready', () => console.log(`${this.user.tag} is now online!`));
this.on('message', async(message) => {
if(message.author.bot || !message.guild || !message.contect.toLowerCase().startsWith(this.config.prefix)) return;
const args = message.contect.slice(this.config.prefix.leght)
})
}
};
module.exports = EconomyClient
``` My coding so far on Economy Bot
impressive, you may have successfully beaten the browser's built in tools
but cant beat external tools
since i cant find a way to get linux on my chromebook, I am wondering if the pre-installed program called text can be used to code
ok.. im basically trying to make something that can host
the host would send script to the client that the user can't pick up
but apparently.. i still have ways to go :l
this app
this is what we mean by "impossible to hide"
i posted this like an hour ago.. so i guess it was difficult.. but still, tell me, how did you do it?
i see, i see
you may even fool a browser, but you cant hide network requests from the entire operating system
was that a puzzle type of thing?
but dont http requests go straight to the requester?
i'll repeat the explanation
http is layer 7
it has to go through all other layers before it reaches the browser
all other layers can be intercepted
Return frontend script to client that CANNOT be viewed by client side user. After all, why obfuscate code when you can just HIDE it
well shit dauuug
pssssssst
packet sniffing
just like i told you before
stop trying to do the impossible
it's not worth it
dude.. half the people said it was impossible to hide it from the browser
you can either obfuscate it, or render the page serverside, you're not gonna hide it completely
why stop now when i made this progress
anyone who's dedicated enough will find it
what you're doing now is literally the definition of a sisyphus job
technically we said impossible to hide from the client
bruuuuh u said this before..
which includes non-browser stuff
i said half of yall
he's saying it because he's right
i did say it before indeed
you have to open the door to walk through it
"no i can walk through walls"
you can't, you have to open the door first to enter
"no I CAN walk through WALLS"
dumbified analogy
sometimes a gate is more secure than the walls
this is an anology
do you really think you're smarter than the people who are actively working on web protocols
if it could be done, it would have already been done
way to do the david vs goliath pitch even though it has nothing to do with that
??
it could be.. it's just "impossible" so nobody is high enough to try
for java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int[] board = {0,0,0,0,0,0,0,0,0};
System.out.println(board)
Scanner input = new Scanner(System.in);
System.out.println("[ X ] - INPUT ARRAY FORMAT: ");
String input2 = input.nextLine();
board[Integer.parseInt(input2)] = 1;
System.out.println(board);
}
}``` where is this going wrong?
```[ X ] - INPUT ARRAY FORMAT: - SCRIPT
0 - MY INPUT
[I@4e04a765 - SCRIPT```
im trying to make tictactoe
if someone really wants to hide the frontend script, they wouldn't expose it in the first place - they would use SSR instead
whats ssr?
server side rendering
bro you're genuinely delusional
meaning the script would never hit the client
mad until proven sane 🤷♂️
no, you're geniunely delusional
also
the same reason people would obfuscate it
not nuke launch codes
why would people obfuscate it?
give me an example
sure this only works because the alert is blocking until clicked
i found how I can use javascript in bdfd
so appending has that weakness.. ok i'd just seal eval and use eval then.. easy fix, BUT THE OTHER THING U DID WILL NEED WORK
delusional
/dɪˈluːʒ(ə)n(ə)l/
characterized by or holding idiosyncratic beliefs or impressions that are contradicted by reality or rational argument```
in case you didn't understand what i meant by delusional
**anything** you send to the client, the client can see, you're just changing the way you send it
i don't know what you don't understand about this
@vivid fulcrum why is he trying to hide it?
he isnt answering
I think its just an experiment
ohh
i literally answered u
he's i dont see it
hes experimenting with a different form of obfuscation basically
yea ik it most likely wont work.. but i've come this far just by trying
kinda..
@viscid gale youre making a website tryna get people to host ur bot for you?
again, you're just changing the way you send it, you're not changing the fact that you're sending it
i mean, i think its interesting. I dont think its practical, worth playing around with.
wat
ok, clearly i need to clear up why im experimenting on hiding script
okay
clear up
is javascript in BDFD any better than the original language
no

pretty sure js in bdfd is more restricted.
._,
i dont understand ppl using bdfd
just code it
like literall
you can make a bot in 3 lines of code
10 total words
10!
my newest bot is super pog 👀
verified yet?
nah
gave up on woobot?
yeah woobot is ded
rip
@drifting wedge i cant use any other coding program, so
cus im on a chromebook that is to old to run linux

if it could run linux then i could oc get js or python

so basically.. i'll give an example
let's say the host is a game server.. it will give the client code to make a special connection(unique headers and shit) but the game dev doesn't want people imitating the code to make the connection themselves(they only want browser connections to do it)
usually, one would obfuscate the code so that it is ALMOST IMPOSSIBLE for the user to figure out the connection mechanism(unique headers or whatever) but what if you can just hide the code completely?
another example, is the hidden script can be an encryptor and decryptor system.. and if that script is hidden, encrypted communication between client and server can happen flawlessly(since no user would find the encryptor and decryptor system)
it doesnt matter what your computer is, you can code in any language
linux beta
this is true.. if someone was trying to say something else .... :lll
if you dont want to or cant run it in your own pc, you can always code it there and run it somewhere else
well i mean when it comes down to a program
how did i not realize this
gib script please or i report you
but wdym by "run it somewhere else"
a server, or a vps
another pc, a hosting service, a server, etc
or repl
o
xDDD
but i genuinely do not understand how they don't get the "data in, data out"
anything you send to the client will be caught one way or another
most bot owners rent servers to run their bots in, aka VPS, Virtual Private Server
no no no they are getting the script from the dark net
its hidden
its not free but its very cheap
if there was a (good) way to do this, it would have already been done
and it technically has - SSR
ssr is a big name for executing script on host
the 2 examples that i gave are impossible to replicate ssr
ssr is dumb, change my mind
you cant pretend to make a client server connection in theory you have to tell the client to connect
but hiding script would be able to do things ssr cannot do
you CAN'T hide it
you CANNOT
i don't know what you don't understand about data in, data out
wait a minute
it takes one person who knows how to defeat your method to defeat the purpose, which it seems many developers understand it, which includes the common hacker you seem to be targeting against.
glitch does free bot hosting right?
its against their tos
replit can do it free without breaking any TOS, just dont expect great performance
if i really want to tell you to grab me a can of coke, i can tell you that face to face - i can also write you a letter, text you and call you. you'll still get the message - "can you grab me a can of coke"
it's the same way for this. you're just changing the method of sending the script, not the fact that you're ACTUALLY sending the script. again - data in, data out
its generally a bad idea to host for free
well im a broke teenager so
as a man who wouldnt pay..
amen brother
exactly lmao
ive been using heroku but all my hours are used up
imagine paying to host
am i the only one who had pocket money as a teenager? 👀
nah
thats why im on a chromebook rn
*who wastes it on hosting and nitro
paying for a VPS is equivalent to a cheeseburger and fries at mcdonalds once a month
my pocket money is not being screamed at

the best free host you can get is google compute engine F1 micro, but you need a credit card to create an account
ah
just borrow one from your parents
yeah, $30 a year is a decent VPS, or a cup of coffee from starbucks a month.
you could buy a vps with money you've saved by saving 50p every time you buy something from a shop
alternatively, if you cant have a credit card, and absolutely dont want to pay a single cent per year, your best bet would be repl.it
^
you can definitely find ways to earn money even as a teenager, without any physical work
sell your services
i've picked up fiverr recently and it's a decent side hustle as i can't balance an actual job with extracurriculars and school
you should definitely check out fiverr and services alike
fiverr allows you to withdraw to paypal or through bank transfer
there's definitely ways
you can open up a btc wallet
accept payment in btc on forums like ogusers and mcm
i tried using fiverr, didnt get a single job
can i pay for hosting through btc
or other crypto currencies
😦 id hire you
instead i received 4 fake messages from chinese people who said they have "big business opporunity" for me
i've earned around 150 USD in my first month
and 1 message from a a dude from angola wanting to learn react, the only thing i dont do in js
lol
ur hiring?
nah
;-;
i honestly respect side hustling a lot, but i hate it when people complain about their financial situation and then proceed to... do nothing about it
yea, it really isn't hard to save a bit of money
well.. as of now im broke but when i finish college i shall graduate from unemployed
after i reach college of course
you should definitely find some places open to take traineeships
get work experience
i do think a lot of younger people here are also afraid to ask their parents to support them.
I think most here would be surprised how far your parents will go to help you make a little money, or to help you learn.
I remember using my moms paypal for all kinds of stuff. I would ask every time, explain what i was doing, and how i was getting money.
back then i didnt need servers, but if i asked any family member for $3 a month for learning purposes(using a vps to host my projects) im confident any one of them would have done it.
can you get rated on fiverr without doing jobs?
how did you get your jobs considering fiverr is so competitive?
like no matter what you post, there are already 20 other people with 500 stars doing the exact same thing
i sucked up to fiverr's algorithm
i took any free courses available to skyrocket my profile
hmm
obviously there's more to that
having images in your gig etc
basically doing everything fiverr allows you to do
yeah i did all i could and let it run for 3 months
until it deactivated itself from inactivity, because i didnt get any message to reply to
xd
oof
a lot of that is also affected by the gig name and the gig image
you gotta make users want to click on your gig
then once they click - make them want to work with you with your wording in your description
why they should work with you
what you offer but others don't
yeah i have no problem with that
im good at writing docs and descriptions
i know how to present myself and my product
i guess i was just unlucky
might give it another try later
quite possibly, i definitely recommend it
what kind of jobs did you do?
discord bots and totally not userbots
i'm totally not saying not to not get my account deleted
and your gig was just about making discord bots?
yup
ah
i might move to full software development later
true
more specific things often work better
i didnt want to go for bots because i've had bad experiences with that
try multiple gigs focused on different things
13 yo kids wanting bots that do EVERYTHING and pay 100 bucks
nope, that's on them
i compile the code and obfuscate it
the source code is sold separately as an addon in the order
hah tricky
there's also a full license i wrote
advantages of c langs i guess
you can also do that with node i think? compiling to node bytecode but god knows if it's going to work properly
nwjs can do that
they have a bytecode compiler for js files
its nice for desktop apps
const { Message } = require('discord..js');
const Client = require('../structures/Client');
module.exports = {
name: `ping`,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const msg = await message.channel.send(`Pinging...`);
await msg.edit(client.embed({ description: `Pong!\nMessage edit: ${msg.createdAt - message.createdAt}\nWs: ${client.ws.ping}`}, message));
await msg.edit(`Pong!`);
}
}
``` Did I do something wrong in coding cause e!ping not working
😉
the app just works™️
if you want the code, pay for it
license your code fellas
i mean people dont give a shit about licenses
fair point
but mentioning legal action will make them aware of the danger
instead of not posting
@vivid fulcrum if i copy ur code will u sue me?
exactly
- u dont know my real name
i wouldnt
cuz im an upstanding person
but other ppl
if i were to actually take some legal action against you, i'd probably find your contact information somewhere i guess
github
i dont have contact info there
commits
your email is in the commits
again i'm not qualified for this so i don't know lol
yeah lol
but like exactly
if someone would copy your code
u cant do anything really
you probably could if it was that important to take legal action against
ehh
like patents for example
u say exactly how to make it
publicly
and tell people to "not make it"
licenses are a simple yet effective way to protect ur stuff
never really paid attention to them
pretty sure most people do some form of license infringement without knowing
there is a lib that checks npm licenses for you
what is it
check this out
only things that i have installed are discord.js and eslint
15 ISC and 1 unlicense
you cant freely use ISC libs without permission
woah

I used to distribute my source as UNLICENSED until I made my own non permissive license.
people still tried to deploy my bot to Heroku despite it requiring an sql db and a redis instance
UNLICENSED means do whatever the hell you want?
aka, you're forbidden to use it without my permission
Ty for the translation
hi
Bot.setInterval(() => {
Bot.user.member.voice.setDeaf(true, "To protect & respect users' privacy, Ch1llBlox will always stay deafened.");
}, 1000)
``` Would this work?
Did It work?
Bot.user.member is not a thing. Why are you trying to deafen yourself every second?
Deafening yourself probably does not even give the user extra privacy except for confidence
That's the point.
Excuse my typeo. Thank you.
But that's just a feeling. It's not actual privacy
const { Message } = require('discord..js');
const Client = require('../structures/Client');
module.exports = {
name: `ping`,
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const msg = await message.channel.send(`Pinging...`);
await msg.edit(client.embed({ description: `Pong!\nMessage edit: ${msg.createdAt - message.createdAt}\nWs: ${client.ws.ping}`}, message));
await msg.edit(`Pong!`);
}
}
``` Did I do something wrong in the code?
Yeah. I know. Many music bots do it just for reassurance by the user.
Alright, though I think you should change the reason supplied since it's kinda misleading.
It was just for an example to see if this was possible. I wrote it in under a couple seconds.
oh I see
Yeah.
(node:20811) UnhandledPromiseRejectionWarning: MongoError: The dollar ($) prefixed field '$inc' in 'alm_oro.0.$inc' is not valid for storage.
let data = await g_economy.findOne({
userID: message.author.id
});
if (!data) data = await g_economy.create({ userID: message.author.id });
let busca_id = data.alm_oro.find(x => x.id == parseInt(args[0]));
if (busca_id) {
const si_existe = new Discord.MessageEmbed()
.setAuthor(
message.author.tag,
message.author.displayAvatarURL({ dynamic: true })
)
.setDescription(
":coolduerme: Se han almacenado " +
data.pro_oro +
" de oro"
)
.setColor("RED")
.setTimestamp();
let dep
if(busca_id.limite < data.pro_oro) dep = data.pro_oro - busca_id.limite
dep = data.pro_oro
await data.updateOne({
alm_oro: {
id: parseInt(args[0]),
limite: busca_id.limite,
$inc: {lleva: dep}
}
});
await data.updateOne({
userID: message.author.id,
$inc: {pro_oro: -dep}
})
message.channel.send(si_existe);
}
ping me if you can help me
<filter>,
<update>,
{
upsert: <boolean>,
writeConcern: <document>,
collation: <document>,
arrayFilters: [ <filterdocument1>, ... ],
hint: <document|string> // Available starting in MongoDB 4.2.1
}
)```
you already have the data so you should just be able to do something like data.alm_oro[0].lleva = data.alm_oro[0].lleva + 1
I do not understand
here "dep" is a number, my case money, and I want to add it to leads with the ID of args [0]
await data.updateOne({
alm_oro: {
id: parseInt(args[0]),
limite: busca_id.limite,
lleva: dep
}
});
If I do this, it will put the value that "dep" has, but it does not add
I do not know what to do
await data.updateOne({
alm_oro: {
id: parseInt(args[0]),
limite: busca_id.limite,
lleva: dep + 1
}
});```
Anything the rest of us can maybe help you with? ^_^
DJS | DJSL | DROSE | DETRITUS | ERIS
djs with no configuration
djs-light and drose with no caching
detritus with almost all of it disabled
eris was default
time to drose rewrite
my gateway + logic workers only use 3mb together
u might not want to
Cuz he legit did it the first time
what is it
rust?
both are go
Ok.. so I tried to hide some script.. I can trick the browser but I already dmed him asking him to use that tool again because I added some text in a specific way so I'll be able to tell where my wanna be hidden script gets caught
I've no idea, I don't think there is a minmum since when the logic worker boots its at like 400KiB
@solemn leaf that's y I was trying to ask him specifically
that is for a bot?
No it's for a .. OMG goodnight :(
do you have anything like intents or disabled events to keep it low? or is this just low because there isn't much shit like js and py do
4611 are the intents. and I don't block any events
I defaulted mine to be 516 I think
also having zero alloc read and write websocket lib helps a LOT
@commands.command(name='bounty')
@commands.guild_only()
async def _bounty(self, ctx, member: discord.Member = None, amount = None):
if not member: # if member is no mentioned
member = ctx.author # set member as the author
# user = ctx.bot.get_user(id=ctx.author.id)
# bountyperson = ctx.bot.get_user(id=member.id)
if amount == None:
async with aiosqlite.connect('/home/pi/Documents/Central_Communications/database/economy.db') as db:
cursor = await db.execute(f"SELECT bounty FROM economy WHERE user_id = {member.id}")
bounty = await cursor.fetchone()
bountycheck = bounty[0]
print(bountycheck)
if bountycheck == None:
embed=discord.Embed(
type='rich',
colour=discord.Color.dark_green(),
description=f'{ctx.author.mention}: You do not have a bounty placed on you!'
)
embed.set_author(name=ctx.author, icon_url=str(ctx.author.avatar_url))
embed.set_footer(text="Developed by LIPD Productions Inc.#1205", icon_url=str(ctx.guild.icon_url))
embed.timestamp=datetime.datetime.utcnow()
await ctx.send(embed=embed)
pass
pass
pass
pass
How can I get bountycheck as a str?
thonk
?
what is bounty data type in db?
then it's already a string? 
Well, the if statement doesn’t see it as a string
How do I do that thing where I see what type bountycheck is?
I have no clue which if statement
if bountycheck == None:
It just skips over it, doesn’t see the statement as satisfied
because, it's str 
What are you on?
this is hard to explain, but how do I store information by a name or soemthing (so I can find it back later) then inside of that information it has more info, then once it is stored, how do I later retrieve it
Use a database
I think the issue is None itself
there's no issue 
you're comparing a str with None, what's so weird from it evaluating False?
If there was no issue, then I would get the embed, but I don’t
Do you genuinely really expect str to be equivalent with None lmao
It works with the args
I have mongodb, but how do I use it within mongodb?
Idk, look up on Google how to create one with Mongo
const User = Bot.users.fetch(request.vote.user)TypeError: Cannot read property 'users' of undefined. I'm quite stuck right now. Anyone know what I did wrong?
Bot isn't defined
It is though.
show the code
Router.post("/ch1llblox/uservote", Webhook.middleware(), async (request, response) => {
const User = global.Bot.users.fetch(request.vote.user)
if (User){
try {
var Multiplier = await global.Bot.Database.get(`UserData_${request.vote.user}.multiplier`)
if (!Multiplier) {
Multiplier = 1
}
await global.Bot.Database.add(`UserData_${request.vote.user}.ch1llbucks`, 1000 * Multiplier)
User.send(`Thanks for voting!\nYou just earned yourself \`❄${await global.Bot.FormatNumber(1000 * Multiplier)}\` coins for voting on top.gg.`)
console.log(`User voted! Username: ${User} ID: ${request.vote.user}.`)
return response.status(200).send({ status: 200, message: "OK" })
} catch(err) {
}
}
})
Console.log(global.Bot) Shows it's there.
I don't see Bot itself defined
Console.log(global.Bot)
Gives the bot.
well you just put that there
What?
const User = Bot.users.fetch(request.vote.user) you sent this before
where it just shows Bot by itself
Yes.
Yes.
chill on the ping
Alright sorry

yeah you're confusing me
Same
Ay
cool, i'm just not gonna help
Hey!
i dont understand why you put Bot there by itself when you said Bot is global.Bot
have you saved the code
I'm not sure either. I'm very low on brain cells atm lol.
umm
how do I do this?
oh
OW
never mind.
wait
does the file suppose to be named...
git.git?
or..
me.git?
Or name doesnt matter?
I did this but it didnt work
help..
i think it's really something like git config --global user.name SmugTheKiller
and git config --global user.email "whatever@starboard.lol"
Without the quote
if you want the config for just that repository then remove the global flag
but eh they probably solved it in vc
o
@commands.command(name='bounty')
@commands.guild_only()
async def _bounty(self, ctx, amount, member: discord.Member):
print(f'Bounty on {member}')
user = ctx.bot.get_user(id=(ctx.author.id))
bountyperson = ctx.bot.get_user(id=(member.id))
async with aiosqlite.connect('/home/pi/Documents/Central_Communications/database/economy.db') as db:
await db.execute(f"UPDATE economy SET bounty = bounty + {amount} WHERE user_id = {member.id}")
print(f'Placed a {amount} bounty on {member}')
pass
await ctx.message.delete()
await user.send(f'I have placed the {amount} bounty on {member.mention} successfully!')
pass
Why is it whenever I give a member argument, this command just doesn’t want to complete
@earnest phoenix Any ideas if you’re still around?
if you want member to be optional, set the default value for it, for instance could be None
These are pretty much useless tbh
ctx.author and member are what you need, no need to get it again
Also, why on earth bounty is text? Why not integer?
Idk at this point
@earnest phoenix Apple took away my photos so I’m trying to do this and get my photos back
...
Just simple if statement. If you're using d.py and its command handler, there's dm_only decorator
I use js
Doesn't change my point
e
I'm here because of pokemon go? I was just wanting some pokemon
@ember atlas
@earnest phoenix This isnt the server for that
// COMMAND CODE
} else {
message.reply("This command is DM only.");
}```
np
if that doesnt work for whatever reason you can do: if(message.channel.name == undefined || message.channel.name == null) { // COMMAND CODE } else { message.reply("This command is DM only."); }
or you could do
if(!message.channel.type === "dm") {
// error code
} else {
//code
}```
it should work
or do the other way around if(message.channel.type === "dm")
You can do:
if(!message.channel.type === 'dm') {
// error code
} else {
// your code
}
Actually
That'll not work
Because !message.channel.type becomes a boolean
And boolean cannot be equals to a string
Help menu of what?
Idk, ask in its support server
lol
what about checking if message.guild exist
that'll work right
That's doable
@earnest phoenix you're in the wrong server
Some mod please do -wrongserver
You mean the text editor?
What about it?
I don't know, it's you who's trying to ask a question
Anyone know how to get the total boost count in a server? I'm trying to add a server info command for my bot, and I can't figure out how to get the total count. (Using discord.js)
<Guild>.premiumSubscriptionCount
why do you have guild in <>?
Because it's pseudocode, where <guild> represents "a guild object"
oh ok
do you know how to get the tier?
I tried ${message.guild.premiumSubscriptionTier} but that gave me undefined
There's only 3 of them surely you can just add some conditions?
wdym?
There's .premiumTier
"if the sub count is between 2 and 15, it's tier 2", etc
In the future check the docs first before asking here https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=premiumTier
tldr rtfd
sorry
what event is emmited when all shards are spawned?
Thanks for the help tho google, that worked.
How do i check what all servers my bot is in?
Anyone mind helping?
@earnest phoenix @leaden forum
Maybe u could help
i also want to see ;-;
yeeeee
Idk how
Hi this is a question related to the documentation. How do i create emojis in servers with code? it isnt stated anywhere on the documentation.
this is what i am assuming it might be
message.guild.emojis.create("name", {
image: "link"
})
so if you guys know how to do it. can you help me? (discord.js)
How does sharding on multiple devices work?
i ant help
thats called clustering
i am not that good at explaining but i can try
Nvm I googled it 1 hours ago
oh ok
Ready
shardingmanager on ready?
oh you use that
yeah
wdym?
free domains
maybe create an interval that checks <ShardingManager>.shards count
I made a repl on replit.com using the create react app template, change no files and when i run the repl it crashes
also what does sharding manager shardlist do?
Does it spawn only the indicated shard?
It says caniuselite or smth is outdated
shardmanager will emit shardReady for individual shards and ready when all shards are ready
why use shardingmanager even? just implement your own + assing one process more than 1 shard
/rbd/pnpm-volume/2a14667f-7197-42b7-8bde-032a9ed22324/node_modules/.registry.npmjs.org/youtube-sr/4.0.3/node_modules/youtube-sr/build/main.js:69
url: item.channel.thumbnails?.default.url,
^
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:703:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/rbd/pnpm-volume/2a14667f-7197-42b7-8bde-032a9ed22324/node_modules/.registry.npmjs.org/discord-player/3.4.0/node_modules/discord-player/src/Player.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/rbd/pnpm-volume/2a14667f-7197-42b7-8bde-032a9ed22324/node_modules/.registry.npmjs.org/discord-player/3.4.0/node_modules/discord-player/index.js:5:13)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
Can anyone help me
K
Why don't we use INI files for config?
(Left: INI, Right: JSON)
It's personal preference
also JSON files work best for node.js cause there's a built-in parser, while you'll have to install 3rd-party parsers or make your own for other config formats
Some people have their preferences on sharding modes. Having everything be in one worker has an upper limit of resources said worker can consume. It's a little more advanced to tackle efficient use of resources and taking advantage of worker_threads than it is to spawn more than 1 process and have an IPC layer
It's worth noting that most of the user base of discord.js and other high level libs are beginners
true true

Discord trust and safety

rip
https://discord.com/safety here lol
Is it normal, I have written Discord on email for the Member Intent on 24.2 and they did not reply till today 
its normal
Bru
Is anyone here good with kotlin microservices (grpc)
ask the question please.
Hey, I have a question.
hey, i have a question
Hey, I have a question
Hey, I have a question
Question, I have a hey
bot.users.cache.get("ID")
Is there a way to fetch by name?
I'm just checking with docs as well.
fetch or get
I didn't find how to do that in docs.
It just tells me this.
Anything to find the user name by the bot's cache and not from the server.
.. and not the user id
what theme is that
lol
commercial bots use python, java or c#
I use a modified discord.js lib
some atom theme or smth
commercial bots use whatever they want
js is good to 
I can't manage to generate associated java and kt files to my proto files in kotlin-grpc
guess what lib erisly uses
Atm this is what I have
https://github.com/Astro-Discord-Bot/mongodb-microservice
Not all. In the scope of bots, there is no difference between python and javascript. They're both interpreted languages, just one more representing functional but still oop than the other, arbitrary code execution at runtime, large user bases and lots of libs in active development
I can't see why anyone would want to unironically code a bot in java. Cs, I can understand why
definitely not eris
the flushed emoji game bot uses java
Okay. Couldn't any other language do that
also, what is this G.A.S Bot bot?
that's why I mentioned I couldn't see why people would want to unironically make bots in java
This.Discord.UserInstance.Messages?Guild:1&Message:1&Content:"This is basically Java."
Ew
the questionable language design aside, the performance sucks ass
kotlin ftw
...which still runs on JVM
heap size go brr
bts ftw
born to shit forced to wipe
JVM heap alloc suck
const user = client.users.cache.get(id) || (!!findMember && findMember.user)``` this dosent fetch from client, only works if member is in guild
client.users.fetch is the function to fetch from Discord
java is absolute garbage in 2021, i'd definitely recommend going with c# instead due to similar syntax and the fact that .net became really powerful in the last 4 years
cross compilation, self contained apps, godly GC
client.users.fetch(id).catch(() => {})?
sure. That returns a Promise<User>
Although, you'd probably want to handle the error properly if you're absolutely expecting it to be a User
const user = client.users.cache.get(id) || (!!findMember && findMember.user) || client.users.fetch(id).catch(() => {})
if (!user) throw new CommandError(t(this.errors.invalidUser))```
you'd need to await the Promise from fetch
!!Promise<any> would always resolve to true
Also why double !
looks about right
yeh its the user object, but idk why its still throwing errors
can you show what you edited?
i had to change the memberparamater thats why
static async parse (arg, context) {
if (!arg) return
const { guild, client} = context
const user = await super.parse(arg, context)
const getMember = guild.members.cache.get(user.id) || await client.users.fetch(user.id).catch(() => {})
return getMember
}``` to this
that's weird, you're mixing members and users
members.cache.get() returns a member and users.fetch() returns a user
message.guild.ban is not a function?
its a function to get the member from the user and throw errors with certain requirements
you can't ban a guild, you're probably thinking of this https://discord.js.org/#/docs/main/stable/class/GuildMemberManager?scrollTo=ban
jinx
yes thx
but now that throws errors yet im catching it
try{
if(member.bannable) {
await member.ban({ days: 7, banReason })
} else guild.members.ban(member, { reason: banReason })
} catch(e) {
return message.send(e)
}```
why, they both do the same thing?
you're not awaiting the guild.members.ban
Hey i typed a!help to my bot and it gave me this error
PS C:\Users\justi_8vy6ryi\Downloads\TTGProtect-master\TTGProtect-master> node bot.js
[info] Started the best Discord bot! Running...
[info] Connected to Discord as: Aferistai#8799 with the id: 794595155592085515! Prefix: a!, branch: master, version: 7.3
[command-execute] The command help has been executed by Rui#0069 in Aferistai
(node:3076) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor
at C:\Users\justi_8vy6ryi\Downloads\TTGProtect-master\TTGProtect-master\events\message.js:18:27
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3076) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3076) [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.
``` Help me
you might have updated to discord.js v12, which renamed it to MessageEmbed
do i not need both then?
the first one should be enough
guild.members.ban(member, { reason: banReason })?
(node:7776) 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:7776) [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.
Universal Economy#6211 is now online!
(node:7776) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined
at EconomyClient.<anonymous> (C:\Users\ravi_\Desktop\Discord Bots\EconomyBotV4\structures\Client.js:39:73)
at EconomyClient.emit (events.js:310:20)
at MessageCreateAction.handle (C:\Users\ravi_\Desktop\Discord Bots\EconomyBotV4\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\ravi_\Desktop\Discord Bots\EconomyBotV4\node_modules\discord.js\src\client\ websocket\handlers\MESSAGE_CREATE.js:4:32)
``` Keeps giving meh an error when I do e!ping
thats you my pfp isn't meh venting lol
i guess i am sus 
check your code
the property before .toLowerCase() is undefined
kkk
});
this.mongoose.connection.on('connected',() => console.log("DB connected"));
this.on('ready', () => console.log(`${this.user.tag} is now online!`));
this.on('message', async(message) => {
if(message.author.bot || !message.guild || !message.contect.toLowerCase().startsWith(this.config.prefix)) return;
const args = message.contect.slice(this.config.prefix.lenght).trim().spilt(/ +/g);
const cmd = args.shift().toLowerCase();
const command = this.getCommand(cmd);
if(!command) return;
if(command.timeout) {
if(this.timeouts.has(`${command.name}${message.author.id}`)) return message.channel.send(this.embed({ description: `Please wait ${this.ms(Date.now() - this.timeout.get(`${command.name}${message.author.id}`),
{long: true}
)}`,
})
);
``` Here
It's message.content, not message.contect
can someone tell me why I still get this error Top.GG API Error: 429 Too Many Requests even if no one spams the api?
are the rate limits cumulative? like if i got ratemited 2 times in 1 min will it be 1h 59min? or it still 1h?
My screen
failed to connect to mongo
can someone help i keep getting this error and i dont know what is causing it
did you read the error
no
no
Who reads
nerds smh
C:\Users\Creep\Desktop\node_modules\discord.js\src\rest\RequestHandler.js:154
throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Missing Access
at RequestHandler.execute (C:\Users\Creep\Desktop\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async RequestHandler.push (C:\Users\Creep\Desktop\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
method: 'post',
path: '/channels/784226460138995722/messages',
code: 50001,
httpStatus: 403
}
ok, but did you read the error
yes
and what does it say
missing access
so, what are you confused about
you not checking for permissions before executing commands
look at the method and the path
you can deffer that you don't have permissions to send a message to a channel
so i should just check if the bot can send messages?
That would be logical, yes

Cant rmbr the link to find the bots top token
well i didnt get this error before so maybe its because im using canvas and its trying to send images in channels the bot does not have perms for
you should check if your bot has permissions a command requires before executing it in the first place
attach files permission
nvm found it
Only 6000 characters can be sent in an embed across all fields
this includes author, footer, description and such fields
Hmmm
@vivid fulcrum im still getting the error even tho im doing
if (!member.guild.me.hasPermission(['ATTACH_FILES', 'SEND_MESSAGES'])) return;
Missing Access usually means you don't have permission to access some area, like if you don't have permission to view a channel yet try posting a message in it (I think)
hasPermission
passed array
check channel overwrites too
Now I'm not sure if that's just counter intuitive or me being pissy at random stuff for no reason
node:32) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
<stack here>
``` Hi! Is there any way I can remove the stack from the error?
Downgrade mongoose
I've seen process.on().
I just mean is there a way to hide the large stack that follows the error.
That was just an example.
.
I don't think you can hide the stack unless you're the one logging it (for any errors in general)
Generally you shouldn't be hiding it.
you shouldn't hide it, you should fix it
True, but it's something I can't.
That particular error? #development message
Already sent that multiple times already
if you're using mongodb, downgrade that instead
Hi this is a question related to the documentation. How do i create emojis in servers with code? it isnt stated anywhere on the documentation.
this is what i am assuming it might be
message.guild.emojis.create("name", {
image: "link"
})
so if you guys know how to do it. can you help me? (discord.js)
it isnt stated anywhere on the documentation.
https://discord.js.org/#/docs/main/stable/class/GuildEmojiManager?scrollTo=create ?
How Can I Have This Wait 2 Seconds Before The Message Deletes So Its Doesn't Delete Before The Embed Sends
message.channel.send('**Fetching Servers...**').then(sent => {
sent.delete();
})
ty
bruh this code is useless .-.
{
"greetings": {
"world": "Hello"
}
}
const { ?? } = require("Path to the JSON file")
I am not sure how I can get the "world" one in my {} to be used.
{ world }?
nah I'm outta here, count me out with this
Bye, I guess? 😂
for filename in os.listdir(r'C:\Users\Satya\Desktop\Warden\warden\src\main\cogs'):
if filename.endswith('.py'):
client.load_extension(filename[:-3])```
```py
import discord
from discord.ext import commands
class Test(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_ready(self):
print("ok")
def setup(client):
client.add_cog(Test(client))```
```File "c:/Users/Satya/Desktop/Warden/warden/src/main/warden.py", line 14, in <module>
client.load_extension(filename[:-3])
File "C:\Users\Satya\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 664, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Users\Satya\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 616, in _load_from_module_spec
raise errors.NoEntryPointError(key)
discord.ext.commands.errors.NoEntryPointError: Extension 'test' has no 'setup' function.```
why doesnt this work :(
pls ping when you reply :)
I shouldn't be giving an advice in any case since I don't speak JS
Ah now that's my field


no



