#development
1 messages · Page 1549 of 1
How to do online mobile presence status?
that's the case
i can't see mobile online here
change browser in ws settings
Would not recommend doing that
@Brace#6565
Its not documented feature, avoid using it
Against tos to use it
oh is it
just my friend has two verified bots with online mobile and im like you know what hey i wanna do that too
I know how to do it, and the "my friend has it" excuse doesnt fly by
good to see theres an official statment about it, last time i checked there wasnt. It doesnt show in the docs, and the TOS states not to use undocumented features of the API
yeah
oof
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
it doesnt list anywhere about mobile status
hence why i said it shouldnt be used
if people wanna do it let them do it
^
fair point, but it still worth mentioning that it isnt a good thing to do
90% chance nothing will happen
9% chance discord will warn about it if they ever decide they dont want to allow it
1% chance they will actually ban for it
if they would enforce this stuff seriously it would be stupid and unnecessary load on the staff
i absolutely doubt anything will happen too
if they get a report in sure they maybe have a look
oh erwin is notable member too, congrats
ty
did you got a Dev License for settings the custom Status?
@summer torrent im trying to make sense of your nickname... Nordon Greeman -> Gordon Nreeman?
lmao
nice would love to do something useful while having called in sick at work. but the reason i cant work is a inflammation on a finger that my doc opened this morning and now i have a bandage around the finger, causing me to fatfinger everything
lmao rip
fat rip
which finger?
practice typing without it
it took me years to train writing with 10 fingers
just untrain one finger and retrain it la’ah
^^
i mostly just use 6
having all fingers on keyboard is weird af
ikr
yea used to do, got forced into it back in school. instead learning stuff like HTML we got foced to learn how to write with 10 fingers. now i write with 6
maybe 7
shitty outdated schooling methods smh
rip
sounds like the same sort of thing where it plays 0 role on what you do, exactly the same as using 10 fingers. If you prefer using 1 finger at a time, and still do the job, its completely up to you
seems like a completely waste of teachers and students time and money(if you paid for school)
well yea. but they changed a lot recently, partially to the worse
big f then
also i guess we become a bit offtopic
fair
anyways, need to get motivation to finish my dashboard.
you can do it!
im gonna make a node.js hashing benchmark repo
FINISH IT
because im addicted to benchmarks
hi tim
hai :3
hows development
some just made
as usual, slow and procrastinaty
my development is the opposite
im working on FTSet v2, and rewriting some parts of my bot
then i need to finish the c++ lib
but all i can think about is "which hashing lib is faster in nodejs"
already did
write a hashing lib with c++ backend for node
^ bad results
when it comes for very simple operations, pure-js will win against any native code
then just write the world fastest hashing lib
because the overhead of context switching between the js engine and other langs is bigger than the computational advantages
yea you are right
i tested some wasm libs as well
the overall fastest hashing lib in js is the DJB2 family
also, there are many different purposes for hashing, plus crypto vs non-crypto hashing
if i would start caring for how fast my bot executes code i probably could pick the bot and put it into a recycle bin and then start over
lmao
its not for my bot
(although i did switch levenshtein libs in my bot for a faster one)
im adding indexing to FTSet
i already chose a hashing method, but i like benchmarks so i wanna make a big ass bench
lmao
so, i became a dataphile and tim a efficiency freak. Niiiice
Lol
hmm what kind of hashing do you need? cryptographic hashes or just normal hashes
normal hashes for indexing keys
but since im here im gonna throw in crypto as well for performance comparison lul
Tim are you doing more tests?
const app = require('express')();
const http = require('http').createServer(app);
const io = require('socket.io')(http);
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
});
io.on('connection', (socket) => {
console.log('a user connected');
});
http.listen(3000, () => {
console.log('listening on *:3000');
});
When we createServer() with app. Can the argument also be, any router? On 2nd line
idk if it would satisfy tim but make benchmarks in rust. iirc rust is pretty much the fasts compiled language after C
the argument can be a thing that contains replacement classes for all of the above
but bloat :(
yes but since my target is node, i want to bench specifically in node
eventually you will run out of stuff to benchmark
for example, the fastest hashing family around at the moment is xxHash
but in node its not actually that fast
simpler things like DJB2 and FNV are much faster in node
in exchange for lower entropy and higher collision rate of course
plus the problem is not even which family or algorithm is the fastest
the problem is also which specific library or implementation does it better
there are countless libs on npm that implement the same thing lol
So if I do this, will it work?
const app = express(), gameRouter = express.Router();
app.use('/game', gameRouter);
const io = socketIO(http.createServer(gameRouter));
yea but with different flavours, Mongoose is easyer than MongoDB but mongodb is faster bcs of different way to validate the data
not in this case
all these hashing libs do exactly the same thing, just the internals are different
yikes
some use c++, others use wasm, others use ts, others pure js
but the algo itself is the same
jesus just search for "md5" on npm and you get dozens of libs
@client.event
async def on_dbl_vote(data):
print(data)
How To Get User ID From This Data I Should Use data.user or what ?
await client.channels.cache.get('803965153183399998').send('s')
why does it send "s" 5 times instead of 1?
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', async () => {
client.user.setActivity('s', {type: 'WATCHING'})
});
client.on('message', async message => {
if(message.content === 's'){
await client.channels.cache.get('803965153183399998').send('s')
}
});
client.login('no')```
this is the code
the bot is fresh new
if(message.author.bot) return;
done
You don't check if a bot sends a message. So your bot triggers itself
you get only 5 messages thanks to the discord.js ratelimit handling
oh
thanks
thank you
how to make href on the top.gg page?
(This)[Link] doesn't seem to work
endsWith?
nah
doesnt work
I tried
if("imgur.com/a/3odsbf.mp4".substr(-3) === "mp4" ) {
msg.channel.send("h")
}
this worked tho
tonc
@cinder patio do u know of this?
should work, though I've never worked with socketIO
wait
I think it should be createServer(app) instead of gameRouter
yes, thats what I want to know. If it'll work with routers or not?
like, if the createServer function will work if you pass a router?
Probably not, but you should try anyways
how do you outline text in html (it's for my bot)
unepic
@slender thistle
@green kestrel
Right
@earnest phoenix Could you not post big empty message please thank you
Hi, what would be a good data type for command configs. I'm planning to store things like ignored roles and channels for each command. I'm using mongodb.
node's build-in crypto module
what is this
yikes
lol
these are the winners for small strings
for big strings or files, node's built in crypto module is the best
LOL BASED

what are the benefits of TS over js?
i'm currently learning react
everything
Ts is js but better
this is not a reason its a opinion
@lusty quest https://www.youtube.com/watch?v=ahCwqrYpIuM
TypeScript has forever altered the lives of JavaScript developers. Learn why TS is so awesome and the basic concepts required to be successful using it https://angularfirebase.com/typescript-the-basics/
Deep Dive https://github.com/basarat/typescript-book
TypeScript Docs https://www.typescriptlang.org/
@quartz kindle did you use https://nodejs.org/api/perf_hooks.html
no, it ACTUALLY has some of the most helpful things you can find
yes
transpiling code to different node versions, catching bugs before you even compile/run code, type assurance, intellinsece, integrated wiki, it has everything
give me numbers, why should i use TS over JS, are there benefits outside of a bit different user interaction
^ none
i sent u a video that quickly explains it
lmao
Integrated react parser
bye bye babel
fuck bable, welcome tsc
ts is not faster than js, it just does better js for you
if you do good js, then ts wont be faster
if you do bad js, then ts will be faster
Not exactly
ts has way too many handy features that doesnt include transpiling code
also ts is quite smart when it comes to transpilation
apart from compiling time vs actual run time inside code, i would not think its much slower
yeah, ts can transpile your code in a way that makes it more predictable
for the interpreter
ts could in theory do microoptiizations for you
i think i still keep learning rust over TS
you'll get experimental ecma features in ts
decorators
@quartz kindle gg on notable member
ty
whitename forever
i believe in whitename supremacy
what can a notable member do
though cry made a good point, having experimental features before they even get added to node is quite handy
ts implements them before they are out in node, so you can have some really nice stuff
bragging rights
like conditional chaining before node even got it
oh man
whitename spotted
im on the road to 15k nice
1.2k messages noice
funfact
insert fun fact here
i think my got Bot a command for a funfact
dont lookup tim then
95% of my messages are in dev
same
you haven't talked in testing in years lmfao
same
was I pinged here?
there was a wallspam
bable
What topic is this
no one:
me in a single of js:
embed.addField(upgrade.name, `${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1] ? `*Tier**: ${roman.toRoman(user.renownUpgrades[upgrade.name.toLowerCase()]+1)}\N**Cost**: ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].cost} renown\n**Power**: ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].power}\n\n**${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].required > user.prestige ? `You need at least prestige ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].required} to purchase this.` : `${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].cost > user.renown ? `You need ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].cost-user.renown} more renown to upgrade this.` : `Do \`-renown ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]+1].name.toLowerCase()}\` to upgrade this`}`}**\n\n**Current Tier**: ${user.renownUpgrades[upgrade.name.toLowerCase()]}\n**Current Power**: ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]].power}` : `**Maxed**\n\n**Current Tier**: ${user.renownUpgrades[upgrade.name.toLowerCase()]}\n**Current Power**: ${upgrade[user.renownUpgrades[upgrade.name.toLowerCase()]].power}`}`);
help please this error
let user = message.mentions.users.first() || client.users.cache.get(message.content.split(' ')[1])
^
TypeError: Cannot read property 'get' of undefine
What version of discord.js are you using
12
you sure? client.users.cache shouldn't be undefined then
try console logging typeof client.users.cache
to see if it really exists
and if you are using v12
related to tensorflow.js
does it make more sense to have more cpu cores or a higher clock rate
whr rust is used in webdev?
L
client.on('message', message => {
let user = message.mentions.users.first() || client.users.get(message.content.split(' ')[1])
if (message.content.startsWith(prefix + 'unban')) {
if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send(':x:|**\`You dont have administrator permission`**');
if (!user) return message.channel.send(`Do this ${prefix} <@ID user> \n or \n ${prefix}unban ID user`);
message.guild.members.unban(user);
message.guild.owner.send(`The User has been unbanned \n ${user} \n By : <@${message.author.id}>`)
var embed = new Discord.MessageEmbed()
.setThumbnail(message.author.avatarURl)
.setColor("RANDOM")
.setTitle('**●Unban** !')
.addField('**●User Unban :** ', `${user}`, true)
.addField('**●By :**', ` <@${message.author.id}> `, true)
.setAuthor(message.guild.name)
message.channel.send(embed)
}
});
i fix problem
when i type t!unban ANd id user
it still say Do this t! <@ID user>
or
t!unban ID user
i mention him and i type his id and still nothing
faster is better, node is single threaded, but idk how it behaves if you use the c++ backend
dont use the <@${message.author.id}> use ${message.author}
and use message.author.avatarURL()
tensorflow.js-node
default backend
then why I can use it
you are god
i also run node 14 with tensorflow.js lol
true
it does support it
what are you talking about
u looked at some page from 2017 or something
I-
https://github.com/tensorflow/tfjs/issues/711 this is the error i get
you ever figure out how to patch a major problem in your code, and them simply forgot to go and do it? 
i legit spent 3h trying to figure out the mem leak, found one of them, and then forgot to patch it
tru dev
<@&802585422109736980> what does this role mean
that we are notable members
;-;
people who are actively helping out
hence why @quartz kindle for example has it
from DecoraterBotUtils.utils import *
hmmm i wonder how the heck imma implement this
its not even related to the node version?
It kinda is because when I tried it on node v12 it worked
When i tried with yarn on v14 it said not compaitable
i just installed with npm and it worked
Speed
I do have a self made tensorflow.js api
i change old code
and i change to this
But still same problem help please
node is singlethreaded
that runs in cluster
if you can run it on a Worker cluster get more cores
client.on('message', msg => {
var error = "❌";
var success = "✅";
var lodeing = "🤔";
var user = msg.mentions.users.first() || client.users.cache.get(msg.content.split(' ')[1])
if (msg.author.bot) return;
if (msg.channel.type == "dm") return msg.channel.send(new Discord.MessageEmbed().setTitle(error + " **You Can't Use This Command In DM!**"));
if (msg.content.startsWith(prefix + 'unban')) {
if (!msg.guild.me.hasPermission('BAN_MEMBERS')) return msg.channel.send(new Discord.MessageEmbed().setTitle(error + " **I Can't Bannd Any Member In This Server Becuse I Don't Have `BAN_MEMBERS` Permission!**"));
if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.channel.send(new Discord.MessageEmbed().setTitle(error + " **You Need `BAN_MEMBERS` Permission To Use This Command!**"));
if (!user) return msg.channel.send(new Discord.MessageEmbed().setTitle(error + " **Please Type User Id !**"));
msg.guild.members.unban(user);
msg.guild.owner.send(success + `This User <@!${user}> Has Ben Unbanned By <@!${msg.author.id}>`)
msg.channel.send(lodeing + " Processing The Unban Function...")
msg.channel.send(success + `This User <@!${user}> Has Ben Unbanned By <@!${msg.author.id}>`)
I use pm2 clusters
lol
arent those Node Workers?
what's your error?
yes
when i do
t!unban 587663056046391302
he say please type id
oh
if you manage to run them on mutiple threads go for more cores, if you can get both speed and cores its even better
class NSFW:
def __init__(self):
self.image = None
self.nsfw_text = PluginTextReader(
file='nsfw.json')```
wha i do_
why don't declare args
but from my switch from a 1.2GHz VPS to a 3.6Ghz Root server i found that it is faster and with less impact on a faster CPU
so it's easier for all of us
yeah will put it on a dedi
wha?
if you can get something like a Ryzen 3600 it will work perfectly i guess
even better if you could get a Dedicated GPU for it
would be good.
like i said i had some great improvement while running it on a faster CPU
when I ran it on my gaming pc I had a 30ms time to scan a single image
lol
on my vps 300ms
on my Single Core VPS i reached 70-80% Utilisation for Text Classification.
on my new Server i had barely even 1% Usage
also on your PC its probably GPU acclerated or did you not used it?
wait
then you probably could get down to 10ms
you can do something like this -
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift();
Something like this probably
then do const user = message.mentions.member.first() || args[0]
I do image classification doe
what is happening to me
even more intense, but its just a example
i cant download discordjsopus
even on my pc
also for image Classification i suggest to use a GPU
it always reaches 100% utilization
helpp!!!!!
yeah but dedi's with gpu's are like 100$+
i know
how much ST?
would be cheaper if you buy a older Server from Ebay and add a GPU something like a Quadro P2000
st?
cpu steal time
idk
build my own server or what
less than a second
it's the thing that 99% the times make your cpu usage go over the roof
help
if your vps has noisy neighbours it can be the cause of it
buy a decomissioned one from ebay, add a GPU and then rent into a Datacenter with it (could be cheaper than renting one from a Hoster over time)
possible, but ive got now a dedicated server
nice
my vps used to suffer from high st during 17:00h to 20:00h
during that time my ping jumped from ~50ms to ~9000
well either pay more for a dedicated core or get a cheap Dedicated Server
cheapest one ive ever had where 20€/Month
but with shitty support and a dead Harddrive
I can get a dedi but it wouldn't have a gpu
it would have good cpu power though
like 4ghz 8 cores
my pc has 4.2ghz 6 cores
lol
get one of these: https://www.ebay.com/itm/HP-ProLiant-DL380-G5-2x-QUAD-CORE-Xeon-2-33Ghz-8Gb-2U-Rack-Server-470084-524/202236224240?hash=item2f1637e2f0:g:McQAAOSwAL9UfuCW
and slap one of these in them: https://www.ebay.com/itm/Nvidia-Quadro-P2000-4-Display-Port-Graphics-Card-PCI-Express-GPU/133645831156?hash=item1f1de98bf4:g:GMIAAOSwMa9f92uW
server is just a suggestion.
if you done rent into a Datacenter with a good contract
i bet over a span of 2 years its cheaper
true
i saw people getting pretty decent servers for less than 300$ from Craigslist too, but its more a hit or miss
why? i know that you can enable GPU accleration for Cuda Cores
wtf?
no
You cannot convert an object which references itself to JSON
wait what? legit?
now where the fuck this even coming from
Tensorflow only likes Nvdia GPUs bcs of Cuda Cores, for amd i think there is a annoying way around
it'd be like
user: {
id: 1234,
user: {
id: 1234,
user: {
id: 1234,
user: ...
}
}
}
nah it expects the backend to be 'tensorflow' everytime
and will error if its not
i think you have to install the c++ backend then
ig
will also improve the performance of tf
when i installed tf it yelled at me install the c++ backend
but i guess i run a bit different tf impmlementation
@tensorflow/tfjs-node is the c++ backend for me
@cinder patio i think i narrowed it down to what is causing it
but it still bothers me that this was working before
but not anymore
and this one for GPU accleration @tensorflow/tfjs-node-gpu
this is likely the culprit, cuz that lib is already error'ing, but i have no idea how to fix this
Agent() should be a constructor
so im not sure why its error'ing with that
I use that already tfjs-node
use axios
axios handles most of the stuff for me
i am SO confused rn
its the c++ backend
oh ok
hi can I put code here and get help
ask a direct question, people will avoid giving you spoonfeed code
I got the code just it a error with connecting it
what error you get?
Braces wrong but when i correct them it says unexcpected error
Ill send the code
But i added it and it says unexpected
why is that code so ugly
also you don't use break in ur switch statement
also please use a formatter
also, I see where that goes so I'll say for once: Don't use switch-case for commands
its better than a else if statement with 30 else if
you can use JSON.stringify with a replacer function to get rid of circulars
i think i have one around let me check
wait, rlly?
you are missing a break again
No do it now
COnfused
I will after It responds
switch (variable)
{
case "Hi": message.channel. send("Blabla"); break;
}
``` is bad
switch(variable) {
case "Hi":
message.channel.send("Blabla");
break;
}
``` is good
it's far easier to find errors in a properly formatted code
@lyric mountain @opal plank ```js
function replacer() {
const seen = new WeakSet();
return (_, value) => {
if(typeof value === "object" && value !== null) {
if(seen.has(value)) { return; }
seen.add(value);
}
return value;
};
}
JSON.stringify(myobj, replacer)
Yes so
Do i make it say variable or command?
how does it represent the self-reference?
is WeakSet new
no, like, just format it
format the code
it just makes ur life harder in the end
tabs
no its pretty old
spaces
it puts all value references it finds in the set, and if it finds a duplicate reference, it ignores it
cool
What event is that
where
after the last line
you need to handle messages inside a message event
like this
note the "client.on('message') line"
client.on('message',)
Use only one message event please
@lyric mountain I added the message event is there something I need to add onto it for it to reply?
the message handling
adding only the event means the bot will do what's inside it on every message sent
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
so i change it to hi
on a very basic level, yes
to every command or on
show current code
How do I use regex
client.on('message', msg => {
if (msg.content === 'hi') {
msg.reply('test');
}
});
do I put it in a match
depends, what do you want to do with it?
you didn't add anything inside the event
like this
Like client.on('message', msg => {
if (msg.content === 'hi') {
msg.reply('pong');
}
});
do you know how JS works?
And that repleaces case
Yes but my database on my bot is different to this
"your database on your bot" what?
Its a different script
would .match return an arry
is-odd
is-not-even
@lyric mountain
client.on('message', msg => {
if (msg.content === 'hi') {
msg.reply('test');
}
});
switch (variable) {
case 'hi':
message.channel.send("Test");
}
}
)
like that
stfu that just returns the opposite of is-odd
if you dont know js just say so @knotty quartz
No that would be is-even. 😂
is-is-odd
point is there's a lot of npm cancer out there
to check if the function is the is-odd function
I do because I can take a whole screemshot of my bot
so how do I use regex exactly
the fact that you dont know how to write valid js says otherwise
¯_(ツ)_/¯
message.content.match("^\".+\"$")
what do you want to do with it?
then yes, you can use match
it returns null
That works on my other bot
does it return an array
so why cant you make a simple message event? @knotty quartz
Thats how it works opn my other bot
using switches for commands
thats the thing, it somehow fixed it
i have no clue, but between those screenshots i showed, the second one worked
so? its exactly the same thing, if you did that, you can surely do it again
weird o.o
It says it not valid when I load it on the repl
hence why im saying, you dont know js
stop pretending you do and look into learning how js works
start by learning how scopes work
i'll give you an example
newbie kids fear error where it should work.
wise men fear code working where it should error.
@knotty quartz
client.on("message", message => {
// message exists here
})
// message does not exist here
// trying to use message here will result in an error
Wise men fear when the code does nothing instead of throwing an error.
I do know js because I have a bot called Digtal Bot Ash all js just that uses a different format for the database
which im 90% sure you didnt write yourself
otherwise you wouldnt have issues with something this basic
there is no "different format"
Is it || if the thing before was null
u can even watch me add a command to my bot if you want. Ill name it test
databases have nothing to do with JS syntax
No bc I need to add something to my proper bot my new one is my TESTING bot for it but the app i use isnt the app I use for my bot bc my friend told me to use repl
what does that have to do with anything?
Soo
js is js, no matter if repl or node or anywhere else
I am explaining
if you use discord.js on both, then its the same on both
oh, wait
ig I know what he means
rex, do you use Discord Bot Designer or Discord Bot Maker?
I use Glitch on my proper bot and pay for its hosting
you pay for glitch...
glitch is expensive af
github is no host, it's a repo
?
Ik I use a different host for it
tell me, do you understand what this means? ```js
client.on("message", message => {
// message exists here
})
// message does not exist here
// trying to use message here will result in an error
Right Imma scrap this testing bot and use github for it
const z = message.content.match(/".+"/)[0].toLowerCase()
console.log(z)
let x = blocksByName[z] || itemsByName[z];
x.displayName isnt a thing but it is
{
id: 1,
displayName: 'Stone',
name: 'stone',
hardness: 1.5,
minStateId: 1,
maxStateId: 1,
states: [],
drops: [ 1 ],
diggable: true,
transparent: false,
filterLight: 15,
emitLight: 0,
boundingBox: 'block',
stackSize: 64,
material: 'rock',
harvestTools: { '585': true, '590': true, '595': true, '600': true, '605': true },
defaultState: 1
}
github or repl is not the problem lol
Yes but I did that and it said braces did not match
then you did it wrong
show your code
IK i use it to code and use a different thing to host it
ok, then, you may proceed
Give me a min
urn your bot in html and host with webhost
you could also, yk, download an actual IDE
that's no hosting actually, only static files serving
since browsers parse html files
Can i copy and paste it
you're showing the contents of z but doing x.displayName
yeah x is that
case 'hi':
message.channel.send("Test");
})```
z is "stone"
well, you removed the switch lol
case doesnt work without switch
thats another basic js thing
embed: {
title: "Text",
image: Image,
URL: URLImage,
color: "#0099ff",
footer: {
text: `Test`,
image: process.env.bot_logo
}
}
});``` Anything I'm doing wrong?
The switch is there
where is it?
Did u need to see that?
x is the same as doing
let x = blocksByName[message.content.match(/".+"/)[0].toLowerCase()] || itemsByName[message.content.match(/".+"/)[0].toLowerCase()];
and you console.logged x?
no z
Found out. Nvm.
then how do you know what the contents of x is?
ok it is undefined
client.on("message", message => {
switch (variable) {
case 'hi':
message.channel.send("Test");
}
}
)
Tim
but I did console.log(blocksByName["a"] || itemsByName["iron_nugget]) and it logged the iron nuggets strats
and how did you define variable?
command oop
?
but I did console.log(blocksByName["a"] || itemsByName["iron_nugget]) and it logged the iron nuggets strats
I give in ;-;
Does anyone know
How to cmake it so only the code shows on repl
The terminial is annoying
wut? only the code?
@earnest phoenix message.gulid.members
Ye
ye
ty
let's fly blindfolded 
log the regex match
there are no errors if you cant see them :^)
dude
lol
if you're struggling with basic JS syntax you'll die from python syntax
it looks easier
that's about it
its "iron_nugget" @quartz kindle
I can manage my other bot in js therefore I wanna try something else with ssomeone else
don't hop between languages, it'll just make u confuse
become experient in one, only then change lang
I wish i could show u the code for my other bot but its 2000 lines and I aint taking 50 screemshots ;-;
What would you prove by sending it
That I can script js
same
that doesnt prove anything im afaid
its like taking a picture of a car and saying its yours
wait are u saying I am going to send someone else script wow
no, im saying that if you're having very basic issues with JS, then either you received tons of help or someone else made the majority of your code for you
. . . I had help with getting it online wow I did the rest . . .
I've seem people who has 100000 line code who don't understand a thing, and people who wrote 100 line code who are lang-masters
lines aren't really a metric
if you did what you claim you did, then you should not be having such basic issues
thats all
My firend got it online and did the message fixc thing I did every command there so he did like very liyyler
little
its like saying "i can speak russian, look i wrote this essay in russian" but then not knowing how to say "hello" in russian
I heard Russian
yes blyat cyka
poshel nahui
da
?????
Imma go
also, nobody here is looking for proof, you dont have to prove anything
we just want you to learn what you need to learn in order to be able to do what you want to do
I didn't understand anything
about what?
About this
"we just want you to learn what you need"
My friend did the token section and the reply thing I did command and if you dont beilive me. I understand but have beilief in someone is good
that was not for you tho
Oh
It was at me
oh
tim
hence what im saying, if you did that before then it shouldnt be hard to do what you want to do now
tim
Now Imma go and code my main bot
its mostly the same thing
@quartz kindle ok Then how to bring my bot back in bot list
I am litersally stuck on the reply thing becvcause my friend did that and I did the commands.
where is your friend now?
what happened to your bot? was it deleted?
I don't know
and it returns undefined?
no
idk he sleeping
then wait for him lol
but then yourthing[z] returns undefined?
ye
but if you do yourthing["stone"] it works?
I added my bot and then it was showing 60% approved after 2 days that site gone and then I don't know @quartz kindle
yes
do you have your dms disabled?
you should have gotten a DM from luca
No I didn't get ?
Wrong server
yes
see Nerf's message
😭
the reason is written there
then you're doing something wrong, test some more, console.log everything
But the reason is wrong I didn't spam
I did this
"stone"undefined
const z = message.content.match(/".+"/)[0].toLowerCase()
const x = blocksByName[z] || itemsByName[z];
console.log(z + x)
contact the reviewer that denied your bot.
however, seeing its been a few weeks, the bot reviewer probably wont be able to tell you much.
😭 Then what should I do ?
Fix the listed issues and resubmit your bot
also make sure it follows #rules-and-info
the reason says that you put random stuff and your bot's code in your bot's description
plus that you said your bot will be offline
is that wrong?
But not for long time because only at night it will be offline
Tim what is your favorite thing you have learned from doing all the tests that you do?
@quartz kindle
finding out all these "fast" libs on npm and them turning out to be slow af
"Blazing fast, efficient and light X"
like just standard js testing
the results are fun to look at
console.log(z, x, blocksByName[z], blocksByName["stone"], itemsByName[z], itemsByName["stone"])
"stone" undefined undefined {
id: 1,
displayName: 'Stone',
name: 'stone',
hardness: 1.5,
minStateId: 1,
maxStateId: 1,
states: [],
drops: [ 1 ],
diggable: true,
transparent: false,
filterLight: 15,
emitLight: 0,
boundingBox: 'block',
stackSize: 64,
material: 'rock',
harvestTools: { '585': true, '590': true, '595': true, '600': true, '605': true },
defaultState: 1
} undefined { id: 1, displayName: 'Stone', name: 'stone', stackSize: 64 }
console.log(typeof z)
string
guild.members.cache if you're on v12, which you probably are
idk then, show the blocksByName and itemsByName functions
I sent the npm
oh they're not yours?
the regex is including the quotes
ok
so its basically doing blockByName['"stone"']
members.cache.get. guild.members is no longer a collection, to get the collection you need to do guild.members.cache.
well my name is also aki
do this
not a name
.match(/"(.*?)"/)[1]
how do I get the index from the match to slice it?
.setAuthor(`Order for ${x.displayName} x${message.content.slice(z.index + z.length)}`)
Are you using DiscordJS v12?
How do I get the index to cut off everything so I can get how much the person wants of it
.setAuthor(`Order for ${x.displayName} x${message.content.slice(z.index + z.length)}`)
when you're defining rMember you should use message.guild.member()
i.e. message.guild.member(message.mentions.members.first()
how does the command look like?
!abc stone 99999 ?
order "Stone" 64
roles.cache.has... lmao
args = message.content.split(" ");
command = args.shift();
number = args.pop();
block = args.join(" ")
I can just use args.pop()
@earnest phoenix it should be rMember.roles.add(role)
can someone invite me to the Discord Developers server?
Why i have this error when I run a play command in my bot
You can show all the code
missing FFMPeg
what did you plan to do?
I have installed this pkg
react twice to the same message?
FFMPEG/ACONV?
Yes
did you tryed to reinstall the entire modules folder?
also where did you host the bot? iirc the "free" hoster like repl.it doesnt allow music bots and doesnt support them package wise
Iam hosted my bot in heroku
yea they dont allow them either
Ok now I well try
mostly bcs they eat resources like crazy
e
@lusty quest look
yes but heroku wont install the module
how I can fix it
get a paid VPS
How
check the pins in this channel where it said VPS
?
Oops sorry..
^
Like are they called utilities or utility sorry I’m a bit confused yes command category
also, you can use UptimeRobot to get your bot 24/7 on repl.it
Wait how do I get channel by id again
<client>.channels.fetch("ID");
client.channels.cache.get(id)
I don't work in replit
he wants to install ffmpeg
Did you now another host for github
No, I was asking that if they are called utils in the help command @solemn leaf
it whatever you want it to be
but util is fine
Thanks!
i think repl.it can install it
nope they dont allow it bcs of music bots
ow
maybe its possible but i guess it will be super annoying to install
@lusty quest btw you have always been nice to me thanks for that!
so it's not as fast as write npm i ffmpeg?
you can work easyer with people if you talk to them in a friendly attitude, yelling at even stupid questions only create frustration
he got the package in the package.json but it wont get installed
true
Yea true, people normally are here to yell or something you’re pretty chill
How do I send a message to that channel?
"fast"
const channel = client.channels.cache.get(id)
channel.send()
client.channels.cache.get(804070122401955881).send(orderembed)
also, you can use fetch
const channel = <client>.channels.fetch("ID");
didnt send it
yes but channels are mostly cached (exept in some cases)
no error
is your embed valid?
and i use fetch to avoid these exceptions
yes
unnecessary API spamm
i don't use fetch all time, only in a few cases
also just for testing console.log the channel you get
what is your issue exactly?
Does using Next.js, don't even require to build project with client side react??
<img src="link">
does your bot got permissions to move your roles?
I know it’s in discord.js Docs but I can’t figure it out
client.user.avatar.URL()
Thanks!
wut?
Oh
wait did you mean the top.gg's page?
No, lol
oh
@earnest phoenix Search the docs for MessageEmbed, there a property to set an image
uh
so it's <client>.user.displayAvatarURL();
Oh thanks I guess
Oh my god my brain
.endsWith should work





