#development
1 messages · Page 1296 of 1
yup flaze
ternary :)
fine
brackets 😳
?
I got an info that bots not using intents will be affected, idk what is going to affect and literally have no idea. Anyone have any knowledge about this?
So I just went to read the docs of the canvas
you won't be able to connect if you don't specify intents
once I read the basic info, I thought to myself "nah, im not gon do this"
thought the same but i got to do some cool things with canvas, you should try your best
if a retard like me could do it, so can you
nah, maybe after a ear or two
Take it slow, yeah 
i only have 7 weeks of experience of coding!!!
!rank
how would i make html/css with python backend talk to mongo?
like for example
i make a box, and the person types the prefix and it updates in mongo
first tho, how do i make it so the "dashboard" knows the server id from the oath identify guilds thingy?
Backend sends the list of guilds either in an array and the data is processed with frontend JS
or
Backend modifies the end HTML via a template language like Jinja, and the frontend then utilizes the IDs of the guilds (possibly via the id attribute)
is client.guilds.cache.get().members.get().setNickname a thing?
check up with the docs
Ok
is dat correct??
client.guilds.cache.get().member.get().setNickname()
why no s?
can smbody give time for collaboration for my music bot
need to improve lyrics command and add spotify
if you pay me
does anybody code c sharp for unity3d
i cant pay sorry:(
client.guilds.cache.get('').members.cache.get('')
there has to be cache
at both
Yes
if you can't pay for people taking their time to develop for you then don't expect anyone willing to help you lol
Correct
does anybody code c sharp for unity3d
Cry, take this to DMs with him plz thx
@vague jay just ask your question if someone does they will help
@faint prism Can you help me in getting inside my bot from android nothing else?
@earnest phoenix
#development message
This keeps erroring out
.setColor(colors.cyan)
.setTitle(`Welcome ${member.user.username}`)
.setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`)
bot.channels.cache.get(channel.id).send(embed)```
cannot read property 'user' of undefined.
What is “member” defined as
Anyone here able to help me?
I have a ticket bot written in Nodejs, and it has a transcript command. How do I make it so that for every user mention in the channel, it replaces <@userid> with the user's username?
Here's an example of my current transcript: https://tixy.js.org/t/761703550707040288.html
extreme i cant dm cry
Im doing a guildMemberAdd Event
extreme i cant dm cry
@vague jay 2 messages the one about cry wasn’t for you
@feral aspen what is member defined as though?
Console.log it
@cosmic forum check for a user being mentioned then do <user>.username
Ah
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");
module.exports = async (bot, message, member) => {
const channel = welcomeChannel[message.guild.id].channel
if(channel === null) return;
if(!channel) return;
console.log(member)
const embed = new Discord.MessageEmbed()
.setColor(colors.cyan)
.setTitle(`Welcome ${member.user.username}`)
.setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`)
bot.channels.cache.get(channel.id).send(embed)
}```
That is the code for it.
do client.on(“error”, console.log(error))
im new to this sever
@feral aspen how would you get “message” from a guildMemberAdd event?
client.on("error", console.log)
@cosmic forum check for a user being mentioned then do <user>.username
@blissful coral Ok, but how would I check for mentions across multiple messages? I only know how to do so for one.
what should I async()???
what are doing @blissful coral
If you want first mentioned
@blissful coral How would I get all mentions?
message.mentions.members
making bots
@nova moat helping people with there bots, if you would like to chat go to #general
message.mentions.members
i wan to maake a bot to
message.mentions.members
@pale vessel But wouldn't that only be for the message that was used to run the command?
Yes.
@blissful coral what can i do to fix the problem?
how to make a bot
So how would you do it for other messages as well?
@pale vessel But wouldn't that only be for the message that was used to run the command?
@cosmic forum yes
other messages?
Filter
Yes
do you have an array or a collection of them?
Bro can anyone help me to run a kayron movies bot?
i want to a bot like dank memer
do you have an array or a collection of them?
@pale vessel Yes
you can map them. messages.map(x => x.mentions.members)
that would be a collection of mentions across all the messages
I think I know what to do now
Bro can anyone help me to run a kayron movies bot?
One message removed from a suspended account.
a kayron movies bot
a what bot
@sage bobcat Kayron Movies Bot
One message removed from a suspended account.
check the attachments
If i try message.delete it have an error
i broke my crystal ball so i can't look into your mind to see the error :(
i want to a bot like dank memer
It's almost copy pasta at this point lol

Even worse then lmao
const colors = require("../../colors.json") const welcomeChannel = require("../../welcomeChannel.json"); module.exports = async (bot, message, member) => { const channel = welcomeChannel[message.guild.id].channel if(channel === null) return; if(!channel) return; console.log(member) const embed = new Discord.MessageEmbed() .setColor(colors.cyan) .setTitle(`Welcome ${member.user.username}`) .setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`) bot.channels.cache.get(channel.id).send(embed) }```
@feral aspen Any help please regarding this?
Im using a command handler for the events, and user is not defined.
What seems to be wrong with it?
What can I do..
what event is this?
umm where is bot commands
message in guildMemberAdd..?
do I remove it?
this too
If I send like,Welcome to server
it will work
but if I put like member.whatver.whatever
it wouldnt work
show your new code
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");
module.exports = async (bot, message, member) => {
const channel = welcomeChannel[message.guild.id].channel
if(channel === null) return;
if(!channel) return;
console.log(message)
const embed = new Discord.MessageEmbed()
.setColor(colors.cyan)
.setTitle(`Welcome ${member.user.username}`)
.setDescription(`Welcome to **${message.guild.name}**, ${member.user.username}.`)
bot.channels.cache.get(channel.id).send(embed)
}```
user undefined
like that.
the guildMemberAdd event does not provide message
what would message be?
a member just joined
I use a commahd handler
that has NOTHING to do with a message
If I remove message, message undefined
(node:5836) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined
advert
Spam?
@slender thistle
@slender thistle
cool
@grizzled summit plz don't advert here
double ping 😎
he is goto mod tbh
flazepe
(node:5836) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined
ping some other mod to handle it properly, I deleted it
@pale vessel then?
I dont understand
these can be replaced with member
you pinged mods for help
@compact oriole (edited)
.setTitle() the user in the set title is undefined.
still dumb
Doesn't ping tho
check your handler
still dumb
how does your handler work?
i'm assuming it provides client and all args the event gave
I dont understand how i can delete image by msg.delete()? How i need do it in a code
what age the low iq questions here today
what do you mean
what age the low iq questions here today
@tight plinth No one really asked for your opinion, actually! so shh.
smh
brain aneurysms as callum would say
@tight plinth No one really asked for your opinion, actually! so shh.
tbh same goes for you. "No one really asked for your opinion" is the shittiest response to anything

👏

love this chat
P.s. cut it out everyone
hello
i have been setup dbl webhook and i can post server count but i can't receive a meesage to the webhook when someone voting
I dont understand how i can delete image by msg.delete()? How i need do it in a code
@silent cloud What launguade do you use?
If you don't want to help, don't say anything
NodeJS
looks like js
So asking a question is violent to you? Good job to your logic
just delete the message as you would a message without an image?

nani

just delete the message as you would a message without an image?
@sonic lodge if i try msg.delete() i have error (Unknown message)
a message with an image is still a message
Nope
that message must have already been deleted then
anyone can help?
i have been setup dbl webhook and i can post server count but i can't receive a meesage to the webhook when someone voting
that message must have already been deleted then
@pale vessel bot
#topgg-api ? @hollow scarab
It deletes other text, but it cant delete gif
ok
can you show your code?
Only part
msg.channel.send(videoattachment)
backup.create(msg.guild, {
jsonSave: true,
jsonBeautify: true
})
msg.delete({timeout: 10000})
.then((backupData) => {
msg.author.send("The backup was created! To upload a backup, enter this command on the server: `"+prefix+"backupload "+backupData.id+"`!");
msg.channel.send("✅ The backup was successfully created! The backup ID was sent to you in private messages!");
});
}
you're deleting the author's message right?
you can do something like msg.channel.send(videoattachment).then(sent => sent.delete({ timeout: 10000 })); to delete the bot's message after 10 seconds
am i understanding this wrong
i'm not sure lul
msg.delete({timeout: 10000}) would try to delete the author's message
is that what you want?
the image is what you have to replace
.then(sent => ) where sent is the message the bot sent
which is the attachment
followed by sent.delete({ timeout: 10000 }) to delete it after 10 seconds
Ty, i need to try it
Anyone that is good with discord.py?
Yep, it working ty @pale vessel
Anyone that is good with discord.py?
@sudden cape https://dontasktoask.com
Im getting this error Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1124)')](plus alot more) over and over again and have tried almost everything on google but it won't fix. I get it when I use client.run(token)
what discord.py version?
update windows
hey im kinda new to coding ig, is there a wait command? so like i do !lol and then can i make it wait 5 seconds then reply? [discord.js]
a root cert expired a while back, a fix for it was pushed out in an update
sounds like setTimeout()
ok
you can wrap it in a promise so that you can make something like await sleep(10000);
ok ill try those
what discord.py version?
@pale vessel 1.5.0
Doing it now
i couldnt get the timer to work
@slender thistle the thing u gave me dont work ;-;
for(i = 0;i < parseInt(collected.content);i++){
message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
collected = collected.first();
return rules.push(collected.content);
}
Why this not looping ?
oh
im dumb
check if collected.content exists
Anyone aware of a way to stream audio from youtube-dl instead of downloading it to a computer?
@tight plinth it is exist
hm
collected = collected.first();
not thast
but collected exist
message.channel.send("Please supply how many rules you will need");
const filter = m => m.author.id == message.author.id;
let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
collected = collected.first();
if (collected.content.toString().toLowerCase() == "cancel") return message.channel.send("Canceled");
if(isNaN(collected.content) == true ) return message.channel.send("Invalid number");
else if(isNaN(collected.content) == false){
for(i = 1;i < parseInt(collected.content);i++){
message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
collected = collected.first();
return rules.push(collected.content);
}
}
This is the full code
GOD I'VE WENT THROUGH THREE CHROME CRASHES NOW
WHY IS MY COMPUTER SO FUCKING TERRIBLE
development allows technology stuff
iojo
but not yelling that ur pc rip
woops
ok
well it's technically allowed to ask for help with fixing chrome
@earnest phoenix @dark kestrel you can CHAT about bot development only but you can ask for help wirh anything programming related
OH BOI CHROME FIXED bye guys
bot is primary topic but other development topic can still be discussed here xd
idk about chrome crashes tho 😳
bruh pls help i rly need it fast https://discordapp.com/channels/264445053596991498/272764566411149314/762675725760462898
wut do you guys think of this
https://this-is-a-cool.web.app
have i achieved maximum epilepsy?
This is a cool web app
flashing images
be careful not to look at your browser
why
@slender thistle for this: https://theuselessweb.com
nice
let i = 1;
async function loop(){
console.log(i);
message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
collected = collected.first();
i++;
rules.push(collected.content);
if(i == parseInt(collected.content)) return;
loop();
}
loop();
Aahahah i don't need help anymore
@earnest phoenix weak
this is the real loop
It's still not working
Lemme thank god for NoScript
@sudden cape it works
Still getting the same error on client.run(token)
@sudden cape is it undefined?
client = discord.Client()
load_dotenv()
token = os.getenv("DISCORD_BOT_SECRET")
client.run(token)
Then I have the token in an environ
Also I have checked and it is working
what does this bot do
@earnest phoenix it does bot stuff?
Also that was parts of the code
oh wow
1.5.0
Error: Failed to authenticate, have you run firebase login?
ahh don't you tell me i have to login WITH INTERNET EXPLORER AGAIN with the URL then copy the redirect, goto my botum and do c.eval phin("https://myrepl.code913.repl.co/"); with the URL queries as after the /
Tried asking in the dpy server yet?
Havent joined that server

did you know my google is fucked so brave and cryptotab browsers both cause fucking errors whenever i try to login so i have to goto internet explorer to login then copy the redirect and come back to brave and open it?
is client.messages.cache.get() a thing?
yes
MessageManager is a thing
.get(<id>)
i know how to use it 
i know how to use it :catsmack:
@carmine summit explain how
just wondering if its a thing
You know how to use the thing you are asking if exists?
Why? I have Node.js
@barren valve node.js preview or just node?
It was working 5 months ago lol
last time i checked on my PC VSC only allows node.js preview
Looks good
and get this
Yeah, that's normal?
But it isn't online
Do you have a breakpoint?
Idk 🙂
lol
Does have websites for command development of bots?
Well I recommend looking up how to debug js in VSC. It's a pretty powerful tool since you can see variable values in memory and set breakpoints
✔ Success! Logged in as mdaatifalam2018@gmail.com
remote logging in to firebase on repl.it succeeded 
Okay
Well, have websites for bots dev, ex: botghost.
um
It is very hard to understand what you are asking.
Oh.
Before we get started, keep in mind:
* You are initializing in an existing Firebase project directory
well how do i make it initialize a whole new project
start from another folder ig
delete already existing firebase files?
that should work
it works

thanks for listening to me ask a question then figure it out on my own then go yayayay in chat

The satisfaction of making a command run with no errors on first try
The satisfaction of making a command run with no errors on first try
@carmine summit congrats on learning common sense
I'm graduate 
can you make it so instead of redirecting to a different page <form> tag executes a function with the parameters as the input?
MDN GET IN MAH BRAIN

How do I read URL queries in browser javascript?
Does anyone know how to use sentry with typescript? I've been searching but couldn't find anything
nope
i dont
@compact echo If you just straight ask the question instead of waiting for someone to say they're good at TypeScript it will save us a lot of time and will be a lot better
(this is not minimodding this is common sense)
@compact echo If you just straight ask the question instead of waiting for someone to say they're good at TypeScript it will save us a lot of time and will be a lot better
@earnest phoenix ? I never said you have to be good at typescript.
read the website we sent
errr where's Erwin...
||(saying we so i don't get beaned for minimodding smh)||
ah he's offline, rip
Oh
typescript is a superset of js, you use it like you would in js 
Anyone know how i can get the message link ?
How do I read URL queries in browser javascript?
I tried doingwindow.URL.searchParamsandwindow.URLSearchParamsbut both return undefined
How would you implement Sentry with typescript? Every tutorial on https://sentry.io/ doesn't work for me 😦
Anyone know how i can get the message link ?
https://discordapp.com/channels/guildid/channelid/messageid
or you can enable developer mode in discord then right-click message then click copy ID
thonk
they were asking for the message url
"Anyone know how i can get the message link ?"
guys how can I screenrecord on my screen?
alt + f4
alt + f4
@dark kestrel stfu
:))
:))
@dark kestrel do Ctrl + L
no
guys how can I screenrecord on my screen?
http://letmegooglethat.com/?q=screenrecord+software
window + L
exactly
not ctrl
lmao
@compact echo sentry literally has docs on how to use it with typescript??? first result of google
@drowsy sentinel how can I screenrecord with a tool in windows?
tf is that
how can I screenrecord with a tool in windows?
@autumn aspen
https://bit.ly/30Chx7s
it is verry good
Valder stop giving out false info
it record on 4k
You are not helping
:))
@slender thistle
dude pls
@dark kestrel stop trolling, this is a channel for actual help
ok
why am i getting Nan ms?
@mild flower chill I will help u
yeah how am i to tranport that same client over to that command?
@mild flower ```js
<Client>.ws.ping
^^
@compact echo that makes no difference than bot
@mild flower 
I changed it
oh
Bot Latency: \`${ping}\`, API Latency: \`${Math.round(client.ws.ping)}\` | :ping_pong:`}})
@mild flower
Are you creating a new client on every new command :D?
Are you creating a new client on every new command :D?
@earnest phoenix lmao sure he has no command handler
how am i to transfer that same client on a command handler?
whyyyyyyyyyy

oh lol
through arguments
Args
how am i to transfer that same client on a command handler?
@mild flower dude u dont need client on on a command handler
How to use modules to split your commands into different files and add some useful features:
https://discordjs.guide/command-handling/
📑 in source code all day
@autumn aspen they don't, but if they want to use the client then they need to pass the client through the arguments of the command handler
or anything that references the client for that matter
Sounds like an incoming advert
my bots name is FUN++
this what u mean
@autumn aspen they don't, but if they want to use the client then they need to pass the client through the arguments of the command handler
or anything that references the client for that matter
@earnest phoenix exactly as I did.
lol
my bots name is FUN++
@wintry sun oh yeah? Show source code
@mild flower I can literally give u a free command handler in chat but N O lol
why dm tho
:GWvertiPeepoSadMan:
@mild flower bc I cant give u mine it was a joke
''who asked endph''
^^
-bots
{
search: "?text=e"
}
what's the best way to convert URL queries like this to objects where the properties have there values from the URL
k sry
Not the place @autumn aspen
Not the place @autumn aspen
@blissful coral tf who are u?
Stop.
glizzy
Endph move to #general, you were told multiple times and another warning is a mute
Endph move to #general, you were told multiple times and another warning is a mute
@slender thistle yo wait a min hol up, ok but pls moderate good
Im going to gen
Hello
And this it relevant to this channel how?
{ search: "?text=e" }what's the best way to convert URL queries like this to objects where the properties have there values from the URL
@earnest phoenix what language and more context
And this it relevant to this channel how?
@blissful coral #development message
I was asking a question to the user 
why? they have already been told to move
> And this it relevant to this channel how? is just an indication to move to another channel lol
how can i create a role where my bot goes in a server and a person tries to play on my bot?
just asking
asking what?
as a reference
rephrase it, it doesnt really make sense
i mean when my bot will go to a server he will give a role to the user who uses the bot so how to do that
i asked you already in which library
like the user gets a role when they use the bots command?
ye
what lib
umm js?
that's a language
discord.js?
yes?
I think he is asking to give a role in a guild
no it will add the role when the command is being executed
To the person sending it
yeah
yeah
when the command event happens
well you would have to make it check if it exists
message.member
and if not
Is a guild member
create it
Yeah^
If the role doesn’t exist either return or add the role your choice at that point
client.on('message' , message => {
let prefix = '!'
if (message.content === '${prefix}hello' ){
// the user will get a role
message.reply("hello")
}
})
``` ?
yeah i want to add the role
message.member.roles.add(“role id”)
@blissful coral
have your prefix outside of the handler, otherwise you're creating it every time you get a message
also for string interpolation you need ` not '
i mean i could do it but i have some json file writings so i could not configure that part
how is that relevant
you could do that
you can use the way you did, just change ' to `
but a nicer way is just to interpolate with ` 
hmmk
message.member.roles.add(“role id”)
will this add the new role to the server or only the use? @blissful coral
so what will i do for the server?
oh ok
you mean this right?
guild.roles.create({
data: {
name: 'Super Cool People',
color: 'BLUE',
},
reason: 'we needed a role for Super Cool People',
})
.then(console.log)
.catch(console.error);
dont make it create one every time though
yeah ik
ok got it!
@charred geyser it will only add when a thing is purchased from the shop
give to user
ok
nice
no
yeah you can set the color of a role
ok
actually i am very new to this coding and stuff i just came from 3 moths of expirience
its something like
guild.roles.create({ data: { name: 'NAME', permissions: ['EXAMPLE', 'EXAMPLE2'], color: 'HEX' } });
i think
no
ok
i dont think anything is required
if you dont specify a name it will default to "New Role"
i think
How is it not a function
because it isn't a function
what are you even trying to do?
whats the context?
Is that important
kind of
A welcome message
to those of you whos bot has a dashboard
how many lines in total is it?
and how long did it take to make it?
so far mine is only like 1k lines
can i like see what it looks like?
ah ok
you are a python guy right?
nice
nah
so im dead!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
its not too hard
#discordjs #discorddashboard #oauth2
Discord OAuth2 Dashboard setting up with Express.
Want to support me and the channel? Donations are not required but greatly appreciated!
Become a Patreon: http://patreon.com/stuyy
Buy me a Coffee: http://ko-fi.com/anson
Streamlabs: http...
im doing this
nice
like following this
good luck
but the thing is the guy here uses mongo local
and i use mongo atlas
so ill see lol
ty
@drifting wedge outdated yt tutorials
theres like no difference
@drifting wedge outdated yt tutorials
@earnest phoenix its june 2020
mongo atlas and mongo local are the same thing just the server that stores stuff is different
honestly @earnest phoenix you like never help.... ever
mongo atlas and mongo local are the same thing just the server that stores stuff is different
@earnest phoenix yeah
honestly @earnest phoenix you like never help.... ever
@drifting wedge literally no fucking guy's job here to help
like when i say pls ping me: ur like! @drifting wedge @drifting wedge @drifting wedge @drifting wedge @drifting wedge @drifting wedge
ping me
fair ig
Let's be more helpful, cut the chatter, and stop being smartasses
lol
One example of less-lines-more-complex is working with 2D lists in list comprehensions in Python
Barely fucking readable as well, I regret ever doing it
@slender thistle well handling HTTP stuff in browser javascript is weirder tbh
xhr 
like wtf is a worker and stuff
try unsafe snowflake generator in c#
oh my god i went insane

@gentle lynx did you figure it out
is react js a decent thing to use for creating a ui for my dashboard or can anyone suggest something better?
yes
also
shiv i found the beauty
this method took me 3 hours to debug properly because i kept messing up the pointers
I smell C#
Oh God
oh no
pointers :spooked:

i think i can optimize that even more
but im lazy
the generator is fast enough for my uses already
@pale vessel no
someone help?
what's msMsg
A string
The system cannot find the file specified.
im getting this error with js
not supported in node
anyone know why?
use string.replace() instead
you can use the g flag
Global?
yes
The system cannot find the file specified.
@drifting wedge i keep getting this eror
anyonw know why?
only with js
@stiff walrus when requiring npm packages, they must be wrapped in quotes. e.g. ("discord.js")
oh k
What you tried do is access the js property of the variable discord. Which won't work because you've tried access it in the initialization of the discord
Show code now
me?
@drifting wedge what's your problem?
quotes
yes now its correct
you did it before
i want it be online
node yourfile.js
then you didnt save the file
someone plez help lol
ohhhh
How i can get a message id with bot
thank you so much sir
and then delete it
Message#id
and how i can delete it ?
@drifting wedge show full error
in which library
how i can find the message ?
i don't know
to delete
what are you doing
<@ 332238950351634436> when requiring npm packages, they must be wrapped in quotes. e.g. ("discord.js")
@signal vortex
._.
Asking about your attempted solution rather than your actual problem
you want to delete a message with its id?
yes
you need to fetch it from the correct channel
await client.channels.cache.get(channel id).messages.fetch(message id)
how do i restart my bot
from cmd or from discord?
discord
you can shut it down with process.exit()
so you can make a command then does process.exit() when you use it
but that will only shut it down, you need something else to restart it
let msg = await client.channels.cache.get(channel id).messages.fetch(message id);
msg.delete()
???
yes
ok
show full error
channel.send(embed);
How i can get ID from this ?
ok
guild.rules.rulesArr.find(a => a.ruleNum == args[0])
@quartz kindle how i can delete this value
ruleArr = array
rules = {"channelId":" ", "messageId": " " ,"rulesArr":[]}
oh i see how
If you want to remove a certain element in an array, you could use <Array>.splice
wtf
i cant even run anything
The system cannot find the file specified.```
thats the error im getting in js
You need to give us more context.
What are you doing which is resulting in that message.
just so u can see
atom
and what exactly do you press or type that makes it show that error?
is atom configured to run node.js in the first place?
i think so
did you install a package to run code?
yea
atom doesnt come with anything like that built in, from what i've seen
i can run python
never used it
python and node.js are different, if its configured to run python then it wont work
do you have the atom-runner package installed?
@drifting wedge how da hell would atom run javascript if you configured it to run python
what are you confused about
atom and vscode are code editors, they are like microsoft word, but for code
they are not made to run the code, just to write it
they either dont have the required tools to run code built in, or they rely on plugins to do it
traditionally, running the actual code was always done with cmd or powershell
in a separate window
const message = client.channels.cache.get(guild.rules.channelId).messages.fetch(guild.rules.messageId);
await message.edit(embed);
This is not editing
in console does show anything
@quartz kindle 😦
you need to await the fetch
oh nvm
woah
awaiting message.edit but not an actual fetch
const msg = await message.guild.channels.cache.get(guild.rules.channelId).messages.fetch(guild.rules.messageId);
await msg.edit(embed);
Still not working
@dark kestrel wtf is guild.rules.messageId
the message's id
yep
parenthesis = ?
what is guild.rules.messageId
message id
of what?
smh
nope
can you console.log(msg) before editing?
it doesnt matter what guildroles is as long as hes supplying a valid message id
he's doing RULES
yeah
NOT ROLES
it doesnt matter what guildroles is as long as hes supplying a valid message id
@prisma oriole i know but i assumed that the issue was that it wasn't a valid message id
he's doing RULS
NOT RLES
@earnest phoenix and I'm doing typos apparently
lol
ah ok
How can I create an embed page using addField?
let description = `Hello 1`
let embed = new Discord.MessageEmbed()
.addField(`${description}`)
let msg = await message.channel.send(embed);
await msg.react("◀️");
await msg.react("▶️");
let collector = msg.createReactionCollector(
(reaction, user) => user.id === message.author.id);
collector.on("collect", async (reaction, user) => {
if (reaction._emoji.name === "◀️") {
description = `Hello 1`
embed
.addField(`Hello 1`,`${description}`)
msg.edit(embed);
}
if (reaction._emoji.name === "▶️") {
description = `Hello 2`
embed
.addField(`Hello 2`,`${description}`)
msg.edit(embed);
}
})
it adds a new addField every time I change a page. How can I avoid this? a single addField will be edited.
YEY it works
how do i embed message?
const embed = new Discord.MessageEmbed()
.setColor('BLUE')
.setDescription('hi')
message.channel.send(embed)
What library are you using
is there a way to make a functions file where i can call it anywhere without having to always a define it? like a client variable?
thank youu
why is this showing up?
im p sure its general development
Can you try what it says here
And yeah it's general development
Bot development is just the main focus
I want to see if the logs explain what went wrong and if you're able to fix it from there.
@earnest phoenix one option you have is to use .spliceFields: https://discord.js.org/#/docs/main/stable/class/MessageEmbed?scrollTo=spliceFields
how do i make functions available like
client.toolbox.FunctionName()
@earnest phoenix one option you have is to use
.spliceFields: https://discord.js.org/#/docs/main/stable/class/MessageEmbed?scrollTo=spliceFields
@sudden geyser thx
@gentle lynx are there any logs which show that an error clearly occurred
@fervent goblet you add a property to client (e.g. client.toolbox = ...)
You could do it via assignment after initialization or using a class and setting the property in the constructor, which I recommend if you want to do more than just that.
Hm, so it's sort of doing the same thing multiple times.
should i restart my laptop
Probably wouldn't hurt
do you think 1k servers is too early to shard


