#development
1 messages · Page 1032 of 1
??
give me a week or 2 and i have this badge too
Just ignore them
lol open github.com and get his repo
can someone help me use mongoose then?
sorry, i use mongodb
@earnest phoenix i litteraly send you a YT series about this a week or two ago
but dont know how
no i mean npm i mongodb
no i mean npm i mongodb
@misty sigil ye
mongodb is way easier
can someone help me use mongoose then?
making a work cmd
then why are you moving
how do i get the last deleted message in a channel,
I wanna use it like
let lastdelete = and like however you get it
store it in a db
isnt storing every deleted message in a server agienst discord api tos
no
ohk
every deleted message
Why would you do that >.>
thats against TOS 🤔
snipe command 
Waste of db space
snipe is only the last deleted message
^
storing every one is against TOS, you can store the last one.
bigsnipe
Discord doesn't like you storing messages, for one it's a privacy issue, and secondly a potential security issue if your DB is breached & you don't store them properly
its not in your message event
^
I thought you were paying someone to do it
your code should be inside of this brackets https://nmw03.is-inside.me/BSXhtWFB.png
Guys pls help me what to do?
oo
Don't spoonfeed this man
sorry
thats not spoon feeding
let's see
where would message be defined on that line
seeing as the function that defined it has finished and had it's state discarded
Guys why is it still wrong?
nice token bro
??
lemme pull up my ocr rq
this is your message event, things inbetween those brackets run on that event
Ok
and you didn't just regen your secret irght
still helps
you do not need to ping me
Sorry man
and i'll note im not obligated to help you
Regen the token, now
Regen the token, now
@lyric mountain I did
if you want to continue to receive help from randos on discord be polite about it
Ok
anyways
my question was
on line 9
if the on message function has concluded and the state has been discarded
how can message be still defined as a variable
right
look two lines down
in your OWN screenshot
and we'll find it says that message is not defined
which is the actual error
What am I doing wrong
im asking questions to help you think of what is wrong
it says
right there
again in your OWN screenshot
message is not defined
am i clear
At least learn the basics of JS before getting into bot development
at least learn scope lol yeah
You have been helped
you have been helped
We don't spoon feed
we gave you a dirction in which to proceed
Yeah
bot development is something you should do after you learn the language.
if you're not willing to think as a programmer you're not coding
and bot dev is coding
Alright Im gonna try again
Send me a actual pic what Im gonna do
Also Im not 100% from US
You're trying to access message outside of the scope
Send me a actual pic what Im gonna do
that's the defintion of spoonfeeding
Hello there
as shiv said move all your message stuff in the message function
also why are you asking for a pic shiv sent one
Is it possible to make a npm module that gets information from my MySql database and returns it and how hard would this be? An example of what I want to do is
something.get("Client ID", "Database");
Like an ORM?
You're trying to access
messageoutside of the scope
@strange trout Yes but what am I doing like inside the brackets
Lemme see yt
Is it possible to make a npm module that gets information from my MySql database and returns it and how hard would this be? An example of what I want to do is
something.get("Client ID", "Database");
@pliant iron that's basically common database managers
putting the code you want, inside the brackets off the message event @autumn aspen
Just google about npm mysql libs
Thank you for the guidance
I use Sequelize
isn't mysql a straight up npm package aready?
Well
hes looking for an ORM
Idk, iirc it was sqlite
will it work if we define message as a global scope?
it changes for every incoming message
lol
Are you still trying to help that guy
good god damn luck
With that 2 line fix lmao
That's a different dude ain't it?
Sequelize + PostgreSQL
await message.guild.update({ 'starboard.channel': channel.id });
return message.channel.success(`Set starboard channel to ${channel}`);
i think they are friends @lyric mountain
his english must be bad so he didnt rly understand
Is larko Gostley?
?
said we 🤷♂️
Me i was just asking a general question about this
I like how he asked for a pic but you've already sent like 3
(Pr0 d3v)
:Hard:
Imagine making music commands
Imagine making music
Imagine making
Just use an actual good music bot
he edited a discord bot template and now hes considering himself a developer 🐒
More like tried to edit
if we're gonna lay on him do it somewhere else because this isn't dev anymore lol
bruh☠️ ☠️ ☠️
Tripped over the first twig
Edited and broke it ☠️ ☠️ ☠️
if we're gonna lay on him do it somewhere else because this isn't dev anymore lol
Let me just quote this to make sure people see it
Is their a way to code in discord.js for the bot to send a message when it joins a server?
Yes
Aight umm how lol
watch for the guildCreate event
Send it to the system channel if it's available:
https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=systemChannel
I think it'll be null if it was deleted though
You'll have to handle that yourself
current code
client.owners = '690414288065658881'
if(msg.author.id !== client.owners) return msg.channel.send('LOL, and I thought I was dum. You aren\'t a dev buddy.');
if(!args[0]) return msg.channel.send('Provide a group and command to reload')
if(!args[1]) return msg.channel.send('Provide a command to reload')
const commandName = args[1].toLowerCase()
let group = args[0].toLowerCase()
try {
delete require.cache
client.commands.delete(commandName)
const pull = require(`/home/container/src/commands/${group}/${commandName}.js`)
client.commands.set(commandName, pull)
} catch(e) {
console.log(e)
}
msg.channel.send(`\`${commandName}\` was reloaded!`)```
After i re-set the command
and try to run it
it returns command.run is not a function
const Discord = require("discord.js")
module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args, err) => {
let random = Math.floor(Math.random() * 100);
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: prevmoney + random}}, {upsert: true})
}
}
``` shit dont work
Cool
thats not a valid error
Very informative
i doesnt add
ikr
ok
i tried the example, didnt work
@solemn latch I did "Ping is 194 ms." Is that ok? ALso how do u fix what roles, perms the bot can run the command
@glass flare #topgg-api
Like what roles its activates on
thx
^ covers roles, perms, ping commands
@strange trout logs this
Lol
Okay so prevmoney is an object
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
What properties does it have
wdym
lalalalallala
Would anyone know why I can’t install
Guys how do I do a richpresence?
@earnest phoenix https://www.youtube.com/watch?v=aM_8WRaBljU
What are JavaScript Properties and Methods | Properties and Methods | JavaScript Tutorial. In this JavaScript tutorial you will learn about properties and methods used on JavaScript objects. Examples of objects include variables and arrays, which are used often in JavaScript s...
Lmao I have a JavaScript bot
cool
@earnest phoenix https://www.youtube.com/watch?v=aM_8WRaBljU
@solemn latch stuff like that doesnt work for me
What are JavaScript Properties and Methods | Properties and Methods | JavaScript Tutorial. In this JavaScript tutorial you will learn about properties and methods used on JavaScript objects. Examples of objects include variables and arrays, which are used often in JavaScript s...
Guys so I can change my prefix to anything in the command I want?
hi, I have this: js if (typeof this.data !== 'string') { console.log(this); throw TypeError('rawData must be a string'); } else console.log('not'); I do stroople.hash('1'); but its saying its not a string? does anyone know why this is happening? this logs:
Hash { data: undefined, amount: undefined }
@digital ibex Are u working with an object or a class?
Guys anyone knows how I can fix my rich presence?
For example if I want to access a members currency I'd have to do something like this
const data = await message.member.fetchData(['balance']);
console.log(data);
// Logs an object with the balance prop
console.log(data.balance);
// Logs the currency
class
@earnest phoenix properties are like this
message.content
content is a property of message
ok
ik, thats not causing the error though
Guys anyone knows how I can fix my rich presence?
message is an object therefore content is a key
FOr my bot
uhh
hi chicken
Hi
hi guys
Or I could do this
const { balance } = await message.member.fetchData(['balance']);
console.log(balance)
// Logs the balance
ok..
Guys anyone knows how I can fix a rich presence for my bot?
@digital ibex Can I see how ur structuring the class?
And the whole code as when working with a clas you need to do let <variable> = new ClassName()
@autumn aspen Well you haven't said what's wrong with it so no
If you forget the new keyword it breaks
thats not causing the error.
so let me try that then 1 sec
but sure
class Hash {
constructor(rawData, amount) {
this.data = rawData;
this.amount = amount;
}
hash() {
if (typeof this.data !== String) {
console.log(this);
throw TypeError('rawData must be a string');
} else console.log('not');
}
}
module.exports = Hash;
@autumn aspen Well you haven't said what's wrong with it so no
@strange trout I dont know how to fix one
Everytime I try to make a reload command, then set the command I get command.run is not a function
Pls help me fix one how do I do?'
oh and String is 'string' btw
What's the issue
When you're creating and object based of the class are you using the "new" keyword?
I have no idea what you're talking about
The issue is you're checking if a string is equal to a String class.
Oh okay
yes chicken dev, if there was something wrong with the class it would not throw my error, it would throw a different error
true
How can I fix one?
oH
look at the docs
Euhm
uhh fuck i get NaN
@strange trout guys can anyone show me how to do a rich presence for my bot?
and it logs undefined
Oh wait
The issue is you're checking if a string is equal to a String class.
@sudden geyser
Already told u
I just thoguht of the same lmao
@autumn aspen docs
thx
I already linked the docs
alexis, i've got this code: js if (typeof this.data !== 'string') { console.log(this); throw TypeError('rawData must be a string'); } else console.log('not'); } and its erroring saying rawData is must be a string, I do stroople.hash('1')
FUCk
Well the first argument doesn't really matter assuming stroople is a new instance of the class
bb'help
still not added
it's just a matter on what you set it in the constructor
new Hash(...props)
wdym?
let variable = new Hash(rawData, amount)
this is my full code: ```js
const Stroople = require('./lib/hash');
const hash = new Stroople();
hash.hash('bob');
reported, dotpost
can anyone help me
Welp.. Help
good for you @solemn latch
its undefined cuz you're not passing rawData
someone help it logs undefined
new Stroople(); your class asks for parameters but you're not giving any
The hash method doesn't have params
As seen here
I need help
I'm working on a music command atm and I get it to join but it doesn't play anything
everything is set up i'm just confused in why it wont play
@autumn aspen do it in ur 'ready' () arrow function
@kind sedge are you getting any errors in the console?
@digital ibex You wanna do like
let variable = new Stroople("String" ,1)
variable.hash()
As hash also requests no parameters
someone help
no i dont
@autumn aspen do it in ur 'ready' () arrow function
@spare mirage I dont have that command my is JavaScripted
not at all @sinful belfry
ik
As you're not asking a parameter
i fixed it just by adding the methods
@kind sedge lets see ur code then
Since it's using the data from the object
has it worked before?
bot.on('ready', () =>{
}); ```
Anyone help? DM
@autumn aspen stop spamming
Ok
Lost, do you know how OOP works
@autumn aspen move the code that sets the presence in to the client's ready event function
needs to be in an event @autumn aspen
preferably in the ready event
@autumn aspen
Ok
it's like how you fixed the problem with the message event
thx!
your using bot, he is using client @spare mirage
he wont 🤔
Prob not
jesus christ he's back
🤦♀️
Just like you Justii
stfu
🤷♂️
we spent 30 minutes trying to show him how to put an if statement in a message event
GOD
yes, alexis
LOL
no lol
yikes
yeah
i just removed the this and added the data and amount into the hash params
This?
How do I get the tag of guild owner
I’ve tried message.guild.owner.user.tag
🤦
@earnest phoenix show an error, code, anything
@misty sigil client.users.cache.get('owner id').tag
ok ty
np
const categories = fs.readdirSync("/home/container/src/commands");
categories.forEach(category => {
chokidar.watch(`/home/container/src/commands/${category}`, {
awaitWriteFinish: true
}).on("change", (file) => {
const commandName = basename(file, ".js")
delete require.cache[require.resolve(`/home/container/src/commands/${category}/${commandName}.js`)];
client.commands.delete(`/home/container/src/commands/${category}/${commandName}.js`);
const props = require(`/home/container/src/commands/${category}/${commandName}.js`);
client.commands.set(commandName, props);
console.log(`${commandName} from ${category} reloaded.`)
});
});``` ^^ Full Code | Error => `command.run is not a function`
What? Why does that work for you
OwO
oh well 
@earnest phoenix show an error, code anything
@sonic lodge ok it logs object Object thing code:
const Discord = require("discord.js")
module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args, err) => {
let random = Math.floor(Math.random() * 100);
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
console.log("Previous money: " + prevmoney)
console.log("Random money: " + random)
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: prevmoney + random}}, {upsert: true})
let embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle(`You worked!`)
.setDescription(`You worked and got ${random} money!💰`)
.setFooter("This command is in beta so it wont save your money we are sorry :(")
message.channel.send(embed);
}
}
We doing basic shit job here and I dont have a brain lmao
lol
so yuo admit it
u hae an error
go learn js
it wont work
this channels getting clusterfuck again lmao, bye
@earnest phoenix try logging prevmoney by itself
go learn js
@warm cloud yessir
@earnest phoenix try logging
prevmoneyby itself
@strange trout that wouldnt do anything
:3 it wouldnt do anything
can i get some help
clusterfuck noises
;/
it logs ur code
it wont work
@spare mirage lmao also I fixed the ping thingy'
You need to see it's properties
what?
@solemn latch check DM
How does your database look
yo, i gotta block you. too many tags
@earnest phoenix does it say Previous money: object Object? where does object Object appear
ive been pmed over 30 times, and like 5 or 6 pings
WOAh
just turn off dms tbh
i cant
i've had to block 5 people on this server already
i handle unbans in servers
oh
i gotta have open dms
eek
in this server?
no
why
const categories = fs.readdirSync("/home/container/src/commands");
categories.forEach(category => {
chokidar.watch(`/home/container/src/commands/${category}`, {
awaitWriteFinish: true
}).on("change", (file) => {
const commandName = basename(file, ".js")
delete require.cache[require.resolve(`/home/container/src/commands/${category}/${commandName}.js`)];
client.commands.delete(`/home/container/src/commands/${category}/${commandName}.js`);
const props = require(`/home/container/src/commands/${category}/${commandName}.js`);
client.commands.set(commandName, props);
console.log(`${commandName} from ${category} reloaded.`)
});
});``` ^^ Full Code | Error => `command.run is not a function`
@sonic lodge i run the first time and it says null because i didnt have any money and then [ object Object ]
Because prevmoney is an object. How did you structure your database
@strange trout check DM
-checkdms @autumn aspen
@autumn aspen
Please watch the following video. Replace any instances of twitter with discord. https://www.youtube.com/watch?v=umxmHpUPS5A
Because prevmoney is an object. How did you structure you database
@strange trout ?
what does console.log(prevmoney) show
-checkdms @autumn aspen
@sinful belfry I swear lmao
what does
console.log(prevmoney)show
@sonic lodge s
what does
console.log(prevmoney)show
@sonic lodge smh i showed you
object Object
stringify the object
it got converted to string
?
.toString()
try console.log(JSON.stringify(prevmoney))
ok
Just a question but lets say I have this class Car and then I do
class Model extends Car {
constructor(brand, mod) {
super(brand);
this.model = mod;
}
}
This will create a new class with the properties of Car and add model to it right?
does permissions = administrator work
@sonic lodge logs this
i think that super is irrelevant there, chicken dev, but yeah, it should.
prevmoney is an object, and you just need to access its Money property
money is also an object object?
Looks like you set Money to an object at one point though
prevmoney.Money?
Yes
yeah why does it say [object Object]39
the issue is your syntax?
The solution: Don't copy-paste code from the internet
what in the world is going on
The solution: Don't copy-paste code from the internet
@strange trout lol
Depends
yes, if you want to handle between reboots
Do you want it to persist even if the bot restarts
Then yes
bull queue i heard was pretty good for stuff like that if using js
(node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Money' of null
2020-07-07T16:37:56.940098+00:00 app[worker.1]: at Object.run (/app/commands/work.js:11:27)
2020-07-07T16:37:56.940099+00:00 app[worker.1]: at runMicrotasks (<anonymous>)
2020-07-07T16:37:56.940099+00:00 app[worker.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-07-07T16:37:56.940185+00:00 app[worker.1]: (node:4) 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)
2020-07-07T16:37:56.940259+00:00 app[worker.1]: (node:4) [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.
``` uhhh
@autumn aspen this:
}```
is the callback function for the `ready` event
when your bot is ready, everything in that function gets called
place your setPresence code in that function
I'd do something like this if I was to make a mute command
@earnest phoenix prevmoney is null if the user doesn't have an entry in the database, right?
check if prevmoney is null, and if it is, default it to 0
@earnest phoenix prevmoney is null if the user doesn't have an entry in the database, right?
@sonic lodge correct
prevmoney is the money var from before
yes
the command
great
check if prevmoney is null, and if it is, default it to 0
@sonic lodge how?
Couldn't you use an || op
// prevmoney is null; user does not have an entry
// handle adding an entry for the user, and set prevmoney to 0
} else {
// prevmoney is NOT null; user does have an entry
}```
actually you probably could ^
but he needs to also handle adding an entry in the databse for the new user
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: prevmoney && prevmoney.Money || 0 + random}}, {upsert: true})
if(prevmoney === null) {
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: 0}}, {upsert: true})
} else {
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: prevmoney.Money + random}}, {upsert: true})
}
``` correct?
Ah true
upsert true makes the db entry
i'm not sure how your database works but it looks fine to me
ok
Actually yeah if it's upserted it should create the doc if it doesn't exist right?
?
yes i am
Yeah so this should work just as fine. If the user doesn't exist it'll set the the balance to 0 + random otherwise Money + random
<Collection>.updateOne({ User_ID: message.author.id }, { $set: { Money: (prevmoney && prevmoney.Money) || 0 + random } }, { upsert: true });
Someone have the list of all Discord voice regions?
this?
(node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Money' of null
2020-07-07T16:53:31.566666+00:00 app[worker.1]: at Object.run (/app/commands/work.js:11:27)
2020-07-07T16:53:31.566666+00:00 app[worker.1]: at runMicrotasks (<anonymous>)
2020-07-07T16:53:31.566668+00:00 app[worker.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-07-07T16:53:31.566847+00:00 app[worker.1]: (node:4) 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)
2020-07-07T16:53:31.566960+00:00 app[worker.1]: (node:4) [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.
``` @strange trout
How does your code look
@sonic lodge Yes, but I'd need it as returned by the Discord API
oh
const Discord = require("discord.js")
module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args, err) => {
let random = Math.floor(Math.random() * 100);
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
console.log(JSON.stringify(prevmoney))
console.log(prevmoney.Money)
console.log("Random money: " + random)
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: (prevmoney && prevmoney.Money) || 0 + random}}, {upsert: true})
let embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle(`You worked!`)
.setDescription(`You worked and got ${random} money!💰`)
.setFooter("This command is in beta so it wont save your money we are sorry :(")
message.channel.send(embed);
}
}
``` @strange trout
Remove the logs
@balmy knoll are you on discord.js?
Yes
Remove the logs
@strange trout boi that wouldnt change anything
you can use client.fetchVoiceRegions() to ge tthe available regions
What can i use instead of roles.has in v12?
console.log(prevmoney.Money)
This is causing the issue
@sonic lodge Thanks
Anyone?
What are you trying to achieve
Who?
You
roles.cache.has?
👌
What happened
{Money: (prevmoney && prevmoney.Money) || 0 + random}
it should be prevmoney ? prevmoney.Money + random : random
;?
it checks if prevmoney is null; if it is, it returns random
if it's not null, it accesses the Money property and adds random to it
const Discord = require("discord.js")
module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args, err) => {
let random = Math.floor(Math.random() * 100);
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
console.log(JSON.stringify(prevmoney))
console.log("Random money: " + random)
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: !prevmoney ? prevmoney.Money + random : random}}, {upsert: true})
let embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle(`You worked!`)
.setDescription(`You worked and got ${random} money!💰`)
.setFooter("This command is in beta so it wont save your money we are sorry :(")
message.channel.send(embed);
}
}
``` correct?
sorry i added a ! by mistake
ok
change !prevmoney to prevmoney and see what hapepns
(")
hm
how do i set a roles permissions with discord py
let me try the other ones first
Messed up the parentheses
it kind of looks confusing over a ternary
Can anyone dm me good resources for Eris bot development...? I am a beginner...
Thanks!
I think it's easy to understand
you know how it works, right?
you know how it works, right?
@sonic lodge me?
yeah
The docs are a good resource for eris
imagine if discord lua existed lol
eris docs are eh
Any errors?
if you use an older version good luck
They are fine, just not a lot of examples and stuff
Any errors?
@strange trout logs null for other ppl
but you've handled adding entries for new users right?
const Discord = require("discord.js")
module.exports = {
name: "work",
aliases: ["w"],
category: "Currency",
run: async (bot, message, args, err) => {
let random = Math.floor(Math.random() * 100);
let prevmoney = await bot.db.collection("Money").findOne({"User_ID": message.author.id})
console.log(JSON.stringify(prevmoney))
console.log("Random money: " + random)
await bot.db.collection("Money").updateOne({"User_ID": message.author.id}, {$set:{Money: prevmoney ? prevmoney.Money + random : random}}, {upsert: true})
let embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle(`You worked!`)
.setDescription(`You worked and got ${random} money!💰`)
.setFooter("This command is in beta so it wont save your money we are sorry :(")
message.channel.send(embed);
}
}
``` my code
I'm pretty sure {upsert: true} should handle that
huh?
It's going to log null for them because they're not in the database
Tell them to repeat the command another time to see what it logs
that's interesting
Yeah upsert should find or create a document with the key
Unless I'm understanding it wrong
i think we're officially stumped
await is only valid in async function
lol put it in one then
you're already doing what he suggested
anyone know how to solve this in guildaddmember
make the function an async one
client.on ("guildMemberAdd", member => {
Make it async
Yeah you already have {upsert: true}
VΞЯIFIΞD BOΓ DΞVΞLOPΞЯ xD
ok xD
why sint this working then 😦
k
I'm trying to create my own password hasher, does anyone know where I'd start? I've tried several methods but they've all failed, im using node.js if anyone knows btw
press the problems button in VSC
fix the problems
did you see the bottom row where currently Terminal is selected?
http://node0.s8s.app/wkMj press on problems
no laggy, im not using a library
@autumn aspen are you trying to use java code in nodejs?
@lusty quest why does it says that void is unexpected
@autumn aspen are you trying to use java code in nodejs?
@sonic lodge I have a JavaScripted bot so yeah
?
where did you get the code, can you link it
java !== javascript
How i get skins ?
No
bots can't use rich presence
java !== javascript
@sonic lodge w8
bots can't use rich presence
@trim saddle But how do I add to mine
Like Luca
and all bots
??

lmao
it's not RICH presence
OwO
rich presence is for games
How I get skins ?
WHat ever the game they paly
@sly pike wrong place
lol'
so you want to get the game a user is playing?
rich presence is for games
@sonic lodge can u help me with this, I only want my bot presence to be "Playing a game !help"
i see
.setActivity()
@earnest phoenix huh?
wherever your ready event is, use client.setActivity() in there to set your bot's presence
i can't spoonfeed
Bro its NOT
😮
@autumn aspen how about
you read the docs
LOL
its Activity not Presence
thx
So I can use
client.setActivity()
copied straight from the discord dev portal
LMAO
yeah, idk why you trying to make presence a class
And smth in it
dude i just sent you the answer
yeah, check docs
// Set the client user's presence
client.user.setPresence({ activity: { name: 'with discord.js' }, status: 'idle' })
.then(console.log)
.catch(console.error);
d.js is literally built for selfbotting and regular botting
why are there 3 methods to change your status
that'd work, but prob better on ready event
no
in the bot.on event
activity()
i dont think its need to be there
you just making ti fire on that event
it'll run thru the code regardless
no spoonfeeding
No
Hi
@earnest phoenix Sup Blu
Hai Blu
is this for the bots status
@kind sedge yes
@autumn aspen we’re not going to spoon feed you
@earnest phoenix Aight
dont spoonfeed @kind sedge
oh well
client.user.setActivity(`status lolol`, { type: `PLAYING` }).then(presence => console.log(`Your bot is Online and active! ${presence.activities[0].name}`)) console.log("Your Bot Is Starting up!") })```
@kind sedge Thx
yup
Lol
some people just dont caer
Great now he learned absolutely nothing
and thats his fault
that's a rule
indeed
all good
Perhaps
Is it possible to make a web hook send all audit log notifications to a channel?
@earnest phoenix idts
Fetch the audit logs (may have to iterate)
lemme check if theres an event
I believe there is
i dont see any related
system messages is where it'd be i would assume
Lol
100%
Help
whats the error
are you saving
see example in the doc
I cant use it
hold
G>ot dammit
I deleted the command @kind sedge
alright
w8
doc
@autumn aspen click this dude https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setActivity
wwdwdwd
3 times i've sent that link, none has he clicked on it
okay client
I changed it to bot?
nope
Yes
it's probably his first line
he 100% didnt read
I did
im just gonna ignore from now
frikin 3x
yeah
Still cant use it
:\
read this
if you don't understand something
tell us
i have been reading discord py docs and i dont understand something
🤔
lololol
@autumn aspen read this also https://anidiots.guide/getting-started/getting-started-long-version
i dont understand how to set roles permissions
i see
haha
You were asking me for the code that was already given in the tutorials
@earnest phoenix Yes but u changed alot brotha
little hard
Low key take this out of #development and this server
cross server drama is not what this chat is for
Low key take this out of #development and this server
@modest maple LOEL
Yeah but the ping
so either s h u t or take it to DMs
@earnest phoenix u didnt smth wrong
do smth wrong
@earnest phoenix but u dont have the same kick command as in ur vid
Hey hey hey
ogod, another yt bot tutorial-er
how can we check user badges (discord.js)
user.flags.toArray()
Y does it not return any of the nitro ones?
@digital ibex and @pure lion stfu lol
why do you think
read the docs, you've been here asking simple questions for like hours now
Yo bro I'm dying right now you're so funny

Lol
haha
Cuz it default to playing
Can we keep this on topic
@autumn aspen Read the docs
Lmao
Yeah it's not custom status @autumn aspen
Alrighty
so if I was using a separate branch of a node module and I wanted to import my bot onto a cloud platform, how would I do this. I was testing locally and if I import it to the cloud, it gives me an error
What do you mean with importing to the cloud
and thank you
@kind sedge But I can change it to just playing (1) right?
you shouldn't even have your node_modules folder on whichever host you're using
@autumn aspen docs
try it for your self
You need to install all the node modules separately
you shouldn't even have your node_modules folder on whichever host you're using
@digital ibex lol
You need to install all the node modules separately
@fervent goblet I did
@glad charm please mute @autumn aspen
~~ pls say 12 ~~~
He's keeping this chat toxic and off topic
What's up.
Sup Dylan!
alright what did it say
Wait
losing brain cells
there ya go
@kind sedge
Yes!
Thx
Wow, wasn’t that easy?
@earnest phoenix Yes but that command tho swiiiish..
Did you learn something now?
@earnest phoenix Yes
I learned that I need to check Docks
...
no he didn't learn anything, he's been copying a tutorial 
that's how I started off
no he didn't learn anything, he's been copying a tutorial :tpsip:
@digital ibex No
and he can't even copy it properly 
and he can't even copy it properly :wowcringe:
@digital ibex Bro stop
^
All of you cut the convo.
That's the best comeback I've heard so far
LOl
damn
funniest*
🔥 we need a 🚒
Please don't make me repeat myself. 🙂
Hush you.
Allison thx

