#development
1 messages · Page 813 of 1
Glitch Support
So im trying to make my discord bot catch everytime someone votes for it in discordbots.org, im using dblapi.js for this (https://discordbots.org/api/docs#jslib) According to the following this thread, I have to add this to my index.js: const http = require('http'); con...
just like create a webhook, copy its url and post
those 3 things are impossible to do for me, I dont know how to do these 3 things
Create le webhook and use for example axios and post a message payload to it
done
you successfully sent a message over a webhook
@tight plinth in your webhookPort, you should put process.env.PORT
in your webhookPassword, you should put whatever you want
then in your bot's edit page in top.gg
scrolldown to webhooks
in Authorization, you put the password you made
in URL you put your heroku's app URL
ie: MYPROJECT.herokuapp.com/dblwebhook
ok
2020-03-07T21:47:15.729042+00:00 heroku[router]: at=info method=POST path="/dblwebhook" host=myprojectname.herokuapp.com request_id=867c4f0c-7c7c-4f43-b000-0a6634995b8b fwd="165.22.130.154" dyno=web.1 connect=0ms service=42ms status=200 bytes=124 protocol=https
clicked on test button, got this in logs
https://prnt.sc/rd4xiy noiceeeeeeeeeeee
thx u for helpguys
the ip 0.0.0.0 doesn't need to be hidden
^
ok so im trying to make my lyrics command send another embed if the lyrics is over 2048 characters (in embed) how would i do that?
add a reaction event to the message and continue the lyrics to the next page embed.
Pagination sounds more reasonable
i just want it to send another embed without reactions
so split it before 2048 and continue it after that in a new embed.
@earnest phoenix what are those var names
jkasdnasd
you fucking smashed your kb didn't ya
lol
I keep on making different URLs for my bot because I’m trying to invite to my testing server. The problem is, the bot doesn’t join, no matter how many times I put in a new URL.
Does anyone know of a JavaScript library or api that can composite images like the leveling cards Mee6 has? (Don’t worry I’m not making leveling cards)
Like Canvas?
Not sure what that is
@leaden dagger wdym urls? like invites?
Is that similar to what I’m looking for?
Yes @earnest phoenix
Would I be able to composite a photo and send it in a discord chat?
Insert your client id at the bottom and check what perms you want the bot to have https://discordapi.com/permissions.html
A small calculator that generates Discord OAuth invite links
Okay.
I think you should be able to save the image and then send it
I use PIL which is like Canvas and has a "save image" option
PIL is for Python
Would I be able to combine canvas with imgur to make images and upload them using the imgur api?
If you can save an image you would be able to upload it to imgur
Hmm
I’m not sure how to save images with node or anything like that
I’ll have to look into it
canvas is a drawing library
its best suited for programmatially generating graphics, such as charts, etc
it can also do image compositing, but it might be a bit harder to use
discord.js guide has a section on using canvas to generate profile cards
if you want basic image composition, another good choice is sharp
So I could use sharp combined with a basic profile card template to generate profile cards?
yes
Oh sweet
if you have the images ready
I like using PIL because it taught me that JPEG is a cunt
JPEG is a boomer
yes
jpeg is still one of the best image compression algorithms lol
what about png 👀
png is mostly uncompressed, but supports indexed png8 which is awesome af
png8 should be mandatory all over the web
I mean for image composing PNG is better
png8?
PNG8 because it uses 8 bits per pixel
it has a maximum of 255 colors, that can be indexed on a palette
regular PNG is PNG24 or PNG32
24 bits per pixel = 8 for red, 8 for green, 8 for blue, and plus 8 for alpha
the reason png8 is so good, is that png is mostly used for simple graphics, such as icons, fonts, simple transparent shapes, etc... so these graphics can be converted to an 8 bit palette which makes the file size up to 90% smaller while retaining the same image quality
(lossless) PNG is basically a BMP with some extra options in a ZIP file
@earnest phoenix I put in the info for the permissions calculator, what next
replace INSERT_CLIENT_ID with your bots id and yes
which is..
that makes no sense, did you replace the ID part? did you open the link?
copy the link, and paste it into a new page in your browser
so, i saw this change on v12 client.on('voiceStateUpdate', (oldState, newState) => console.log(oldState)); I am confused even after logging the states. Is there a way to know exactly when a user joins a voice channel and leaves the voice channel?
I put in the bot ID, and I opened the link. I copied and pasted it into a new browser but I just got the same page I was on. @quartz kindle
Oh wait, now I fixed it.
@vernal yoke you have to compare the old one to the new one. one of them will have a channel, the other will not
if old has channel and new has no channel -> left the channel
i will save the message for tomorrow. I AM DED.
I’ve gotten my problem fixed, but it is still not joining my testing server or any other Discord severs. It says that no scopes were provided even though I had already put it in.
remove the rquire code grant
bots dont require code grants, idk wtf you're doing
It’s public
Disable require code grant
If the bot is linked to loled's account then the link should work for him even if the bot is private
send me the invite link, i'll test it here
Okay
@leaden dagger you need to disable code grant in your bot's settings page, not in the link generator
like DitchDoctor showed
Done that
and it still doesnt work?
I finally got it to work, don’t worry.
@quartz kindle thank you sooooo. much for your reply . let response = await got('https://yourwebsite.com');
let text = response.body;
then just msg.reply(text)
whats the command for the user to start the process like this ....if(message.author.bot) return;
if (msg.content === 'ping') {
like what do i put before . let response = await got('https://yourwebsite.com/');
let text = response.body; ...............to call apon the process and it post to the discord?
yourwebsite.com
Get the best sitebuilder to create your own website for only $ 3. Use our easy drag-and-drop website builder to make a custom in minutes with no IT or design skills.
rtfd
i will show you my tits if you help me lol
@silver wraith are you doing if (message.author.bot) return; every single time?
i need the entire command for index.js
client.on('message', msg => {
if(message.author.bot) return; if (msg.content === 'ping') {
msg.reply('Pong!'); client.on('message', msg => {
if(message.author.bot) return; if (msg.content === 'ping') {
msg.reply('Pong!');
like this...
but
i will give you an example.... I want a discord member to type in !block height and then the bot replies with 1233676 that it got from https://abe.dash.org/chain/Dash/q/getblockcount
i only need this one bot lol
you don't need to check if the author is a bot for each message
no the author is anyone who can type in a discord channel
like if you typed in !block height right now in this discord i want my bot to give you = 1233676
I'm not telling you that
i said that you don't fucking need to add if (message.author.bot) return; before each fucking command
you just need it once
and tim told you how to do it
let response = await got('https://yourwebsite.com/');
let text = response.body;
let response = await got('https://yourwebsite.com/');
let text = response.body;
yourwebsite.com
Get the best sitebuilder to create your own website for only $ 3. Use our easy drag-and-drop website builder to make a custom in minutes with no IT or design skills.
you're talking nonsense
lol i am hopeless
lmao
probably should change your name
if you where to make a index.js to do what i need it to do what would be in it lol
@pale vessel fixed
put the bot thing outside the if (msg.content...
wait why are you using message. you defined it as msg 
@pale vessel here is the example: i will give you an example.... I want a discord member to type in !block height and then the bot replies with 1233676 that it got from https://abe.dash.org/chain/Dash/q/getblockcount
what is the entire process to do that?
yet you're checking message.author.bot
please
learn the basics of literally any programming lang
then make your bot
@copper cradle you have yet to list the entire process.. So i have no clue where to put message.author.bot
that's why I'm telling you to learn
go on youtube and lookup a javascript tutorial
I'm really bad at teaching
dude.. I need this 1 bot.. never will i need another one but seems like the entire internet cannot solve this problem lol
we can
i have asked this same question in a dozen different bot channels and not one person can give the full commands to do it
and it's pretty easy actually
but we're not gonna spoon feed you
if you're not willing to learn then just pay someone to make the bot
i duuno. So far NOT one person has been able to figure it out lol
its ok if you dont know how to... so i need to research message.author.bot thanks @copper cradle
oof
@copper cradle if (message.content === 'blocks') {
got('https://abe.dash.org/chain/Dash/q/getblockcount').then(res => message.reply(res.body);
}
does not work
visual studio code throws all kinds of errors
i am hopeless . I guess i need to just learn all this....... everyone says it so simple but not one MASTER bot developer can make it work
@silver wraith we can make it work, your code on the other hand, doesn't work, by only seeing your other commands I can tell you
it won't work
the code I sent works
if you know how to "use" it
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});client.on('message', msg => {
if(message.author.bot) return;
if (msg.content === 'ping') {
msg.reply('Pong!');
}
});client.login('token');
see
this works
@copper cradle .js
so my visual studio works
@earnest phoenix I asked for the lib not the lang
@copper cradle Discord.js
yes discord .js lol
Yes
instead
Kk
@silver wraith btw, you shouldn't blame it on us, it's your fault that your code isn't working
just watch some js tutorials
they'll help you a lot
i am not blaming . I am sooooooo thankful for you @copper cradle
i am just sooo tired ... not slept much trying to figure out how all this works. I have learned alot but cannot solve the problem
it's an easy fix
send your index.js file
I'll scan through it and I'll mark each mistake
my index.js is....
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});client.on('message', msg => {
if(message.author.bot) return;
if (msg.content === 'ping') {
msg.reply('Pong!');
}
});client.login('token');
i can make it work in the server with ping . then it goes pong lol
but i need it to....
I want a discord member to type in !block height and then the bot replies with 1233676 that it got from https://abe.dash.org/chain/Dash/q/getblockcount
lol
const Discord = require('discord.js');
const client = new Discord.Client();
const got = require('got');
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', message => {
if(message.author.bot) return;
if (message.content === 'ping') {
msg.reply('Pong!');
}
if (message.content === 'blocks') {
got('https://abe.dash.org/chain/Dash/q/getblockcount').then(res => message.reply(res.body);
}
});
client.login('token');
there
i have watched 100 plus youtube videos and none cover it lol
idk if you already installed got
ok so, the indentation fucked up
but it doesn't really matter in js
thatnk you so much for your time @copper cradle .. if it works you solved something 12000 bot developers could not lol
i will test brb
It may not work
cuz idk if you have installed got
just send the error that shows in the console
nope i dont thinks so... npm install got right?
yes
seems like anything need to install goes npm lol
npm install got ... installing
aight
if you get an error
just send the error
we can help you better by knowing what the error is
so
@silver wraith
it doest like " ;" at the end of (res.body);
remove it
removed now it doesnt like } bellow it
wait
I'm on mobile
let me hope in my pc
show pic of vscode
ah yes
I'm blind
add a ) before the ;
so it ends up like ))
Teaching js from scratch I see
@copper cradle maybe suggest a linter
message channel not defined error
Well then its a simple fix no?
yes it is
message.content is auto changed to messagechannel.content
Message.
vs code doesn't do that
^
does the studio now something lol ok let my try again
I told 'em to look up a tutorial on youtube
but they said they only need this
scroll up
Just going to cause pain for both of you
https://discordjs.guide @silver wraith
@silver wraith send a pic of your code
They have examples for basically the setup and a bit beyond that
'got'
^
¯_(ツ)_/¯
fetch is awesome
Is fetch the same as node-fetch
I don't think so
yes
I havent figured that out yet
Does anyone know how to set the color an embed would be using meta tags or something similar? Youtube does this but idk how to do it with my website
if (message.content === 'blocks') {
got('https://abe.dash.org/chain/Dash/q/getblockcount').then(res => message.reply(res.body);
@earnest phoenix I think I have the metatag discord uses
ok thats exactly what mine looks like... error message not defined
Define it?
Yeah I haven't found anything about opengraph tags that have to do with color
That'd be lit, zsnails
I think its theme color
lemme find it
Mine is functional
I was right
@silver wraith send a picture of your code
:D
I'll try it
i cannot take a picture . i am on my phone and typing on computer
it looks exactly like yours
Well I spot 2 syntax errors already
you sure?
Missing ' and )
yeah+
that one is my fault
I was typing on mobile
and I missed a )
but then I told them to fix it
and how 2
use code blocks instead
@broken shale put and) where?
well yes, no spoonfeeding
that's what your code should look like
just copy what I'm sending
I'm tired
Rule 7a 👀
For js is there like a way to immediately tell if an element is not in an array
Similar to python's 'not in [array name]'
Array.find()
ahh
ah yes
the meta tags didn't work
@copper cradle is a wizard!!!!!!!!!!!!! worked like a charm.. 3 days and he sorted it in less that 5 minutes
¯_(ツ)_/¯
i am in love with java and learning this stuff. . started on my journey with coding 3 days ago
lol
i see ... thank you for all your help!!!!! i will be a member here daily.!!!!!!!!!
np
going to sleep and bother you more tomorrow lol
._.
Oh I got them to work
anyone know howto mention roles in a richembed discord.js 12.0.1??
Whats the command?
Ah ok
12.0.1 sucks so much
Agreed
I havent updated my bot to V12 yet as im still looking at every change made to the version
^
im using v12 but without managers
check your internet connection
I have a good internet connection, I also have other bots running in the same vps where this one is located and they don't give that error
d.js 12 is illegal because it isn't 13 yet
Lol
How do we made a bot ?
Youtube tutorials
It’s not working I am on mobile
i recommend using python
Well you are on mobile
i dont think there is a way to code on mobile
^
There are coding apps on mobile but they are useless
And any PC coding app you use wont be able to get on mobile
coding on mobile is like using a fork to drink milk
I mean technically you could code on mobile but you probably wouldn't have a way to run the code. Once you have access to a computer you would be right
i recommend using python
I recommend using a computer
idk I use assembly personally, this is sarcasm.
I created a bot on mobile
with canvas edit, sql db, json db, command handler, a life which no one has here
congratulations, here's a medal 🏅
can anyone here help me?
i keep getting an error saying that else: is an invalid syntax
py``
@Me.event
async def on_member_join(Member):
if not Member.bot:
await get.channel("welcome").send(f"Welcome to **{Member.guild.name}** {Member.mention}! Head over to {get.channel('general').mention} and say hi brother!")
else:
await get.channel("welcome").send(f"A Wild Bot Named **{Member.name}** Has Joined!")
return```
does anyone know what that "f" before the quotes do?
interesting
It was added with py3.6
Oof
I'm ngl that syntax hurts my eyes
xd
yesss
i have made lots of improvements in the last 6 weeks lol
i got a bot with cogs now
yeaaaa
and is rewrite still a thing
Don't take my word for granted, I haven't updated in a while
Which color
No
Rip
but you can tho?
@soft ferry just to clarify, you are talking about the text in the view and edit buttons right
or the background card
background card
Background card for your bot is for certs
ahh
Hi everyone, can anyone help me to fix this error: 
/rbd/pnpm-volume/d8ba29c2-c626-468d-a934-eebd2698fae6/node_modules/.registry.npmjs.org/discord.js/12.0.1/node_modules/discord.js/src/client/Client.js:40
} catch {
thats
not an error
^
Whats the problem then?
maybe show the actual error message?
that'd be immensely helpful
That's only part of the trace 🙂
Where should I put that?
I'm still getting the same error
Is the bot offline because i just invited it and nothing happens?
Wrong channel bud
^
anyone know how to fix this?
@earnest phoenix r u using discord.js 12v?
when i try to do serverinfo it says that
I don't know, am I using?
@finite bough
It looks like I'm using it yep
v12.0.1
anyone know how to fix this when i do serverinfo it gives that error
@earnest phoenix what discord.js version do you use?
v11.5.1
when i try serverinfo in this server it shows that error but in others servers it works good im not sure why it is giving that error for this server
For some reason, the owner of the server doesn't show up here
It's a strange glitch
I had to change mine to remove the owner in this server
oh
Uncached things
maybe because its alot of members and bot cant get some of the info for this server
@slender thistle what library have you developed?
dblpy
Nice
@finite bough How can I change back?
@golden condor see how it works for my server but not this one
It's because of the owner not being found
oh
Big guild = Owner not cached
@golden condor your right lol it works now
@earnest phoenix
Use npm i discord.js@11.5.1 (ver 11.5.1)
only the highlighted part
Thanks
tell me if it works
anyone know howto create channels in 12.0.1
@gritty frost sorry for the ping I feel like you would know
k
Sounds like rtfd
it should work maybe did something worng ig
{}
it said []
it said object
got it working thank you!

const Discord = require("discord.js");
module.exports = class {
constructor(client) {
this.client = client;
}
async run(channel) {
const path = require("path");
const events = path.basename(__filename, path.extname(__filename))
if(!this.client.logs.get(channel.guild.id)) return;
const language = new(require(`../languages/${this.client.settings.get(channel.guild.id,"language")}.js`))
if (this.client.logs.get(channel.guild.id, `${events}.enabled`) !== true) return;
if (this.client.logs.get(channel.guild.id, `${events}.channel_id`)) {
const channel = channel.guild.channels.cache.get(
this.client.logs.get(channel.guild.id, `${events}.channel_id`)
);
return channel.send(language.get(events, channel));
}
}
};
[2020-03-08 08:43:41.979]: ERROR Uncaught Promise Error: ReferenceError: Cannot access 'channel' before initialization
try await before path.basename
@earnest phoenix what would you suggest then?
to check what's being passed as a channel
If you know everything
because more than likely they're passing the wrong variable, or making a loopback
must be id
stop suggesting shit that doesn't make sense
@earnest phoenix they said one thing anyway
I just did quote
ah
And just didn't remove the tav
Why do people use client like a dB I don't get how that wodks
can someone tell me how to add permissions to the user when they create a channel
let new_channel = await message.guild.channels.create(`${message.author.username}-${quizcode}`, {topic: 'test'})
they inject their own variables into the client object, it makes it easier access and it follows circular flow programming @golden condor
it's possible because javascript isn't typed
their client isn't a database, they just inject database variables, methods, database clients etc
into the properties
Ohh
so they can easily access it from their client
Do you have a bot?
a public one? no i stopped public deving ages ago
UnhandledPromiseRejectionWarning: TypeError: message.guild.members.filter is not a function
const {Client, RichEmbed, Collection, Discord} = require("discord.js");
const superagent = require('superagent')
message.guild.members.filter(m => m.presence.status !== 'all').forEach(m => {
m.send(`${argresult}`);
})```
HELP => Discord js V12
@gritty frost what discord.js version
You need to include cache
it's not a bad change
I don't like it, it just makes everything more complicated
@golden condor OK
everything that includes caching now comes contained in a cache manager
i don't get what's bad about it
Fair
people complaining are the same people who are incompetent and struggle with writing an if statement
Lmao
filter returns boolean
all not a thing in status
no it doesn't
but still it returns array Boolean
what
it doesn't?
the code provided filters out members whose presence status isn't all
which will filter all of them out because it can't be all
you don't know what you're talking about and you keep providing false information, please stop
map returns Boolean my mistake sorry ..,
still incorrect
it returns whatever the callback returns
hence the name map
so you can map the values to new ones
Thats why if else exists
if(command === "search") {
const query = message.content.split(' ').splice(1).join(' ');
if(!query) return message.reply("Specify what word you wanna search.");
const Dictionary = require("oxford-dictionary"); let config = {app_id : "",app_key : "",source_lang : "en-us" }; var dict = new Dictionary(config);
const QueryResults = dict.find(query)
QueryResults.then(res=>{
const data2 = JSON.stringify(res, null, 4)
const data = JSON.parse(data2)
const Results = new Discord.RichEmbed()
.setTitle("Query Results")
.setFooter(`Query: "${data.word}"`)
.addField("Etymologies", `*${data2.results.id}*`)
message.delete()
message.channel.send(Results)
})
}```
I'm trying to use Oxford Dictionary API to make a search command, The defined "data" array works fine but "data2" won't get anything out!
How can i fix/format this?
<JSON: https://pastebin.com/gWvLVZ8H\>
data2 makes no sense, youre stringifying it, which turns it into a string
Is res a string or a json object?
You can do console.log(typeof res) to see
object ig
Guys how can i do the eval cmd?
what
It is a dangerous command that isn't suitable for people who are new to eval commands
An eval command that is set up badly can open up the bot for abuse
Just make sure you set it to only work for you
for example: if(message.author.id !== YOURID) return
i did when i first created the cmd :p
i already did it form when i asked you to help me
@quartz kindle @blissful scaffold
I tried to do "console.log(args[1])" but it only logs the words
Btw im not doing in console
i just tried
eval("code")
?
Guys how can i do the eval cmd?
explain
Youre using javascript, right?
Javascript has a built in eval function, like this: eval("someText")
Eval will attempt to execute the text you give it as code
hmmmmmmmmmmmmmmmmmmmmm
and if i want to say something like "?eval bot.token"
How do i do it?
like a command for everyting
Why would you ever want to do that?
This is why you should not have an eval command in your bot
it is not cool
And cuz i would be lazy to check the token myself
bot.token would be your command's argument, just give the argument to the eval and get its result
so if i do eval bot.token it will give me
You never have to check the token
Why would you ever need it tho lul
so i do "eval(args[2])
Yes
?
A variable
var/let/const
let bla = eval(something)
send(bla)
But keep in mind that if the eval throws an error, it will cause an error in your bot
that is what i was doing
i just tried it
i did
var evaled = await eval(args[2])
But it didnt worked -_-
why would you need args[2]
What is args[2] ?
wouldnt it be args[1]?
maybe
Arrays are 0 indexed
lemme test
Arrays start at 0 in js
the first one is args[0]
Depends on how he makes his args lol
Lmao
(node:16644) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at C:\Users\nope\Desktop\Super Bot\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15
at C:\Users\nope\Desktop\Super Bot\node_modules\snekfetch\src\index.js:215:21
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:16644) 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(). (rejection id: 2)
(node:16644) [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.
Now i cleared it
bye bye error
read the error
congrats
FUCKKKKKK YEAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
@quartz kindle Bbtw that was the args error :p
I don't recommend embed for eval
i know u can code send() too
but i like sendEmbed
Guys
why doesn't my eval embed look like this:
but
like this:
look at your code
what is difference
look at your code
Tat makes me want to die
you're adding newlines
because
reading comprehension
I'd say its cause you have the \n
thank you for saying the same thing
hmmmmmmmm
WTH
YOU CAN DO TEXT LIKE THIS
I ONLY KNOWED THIS
Wait what?
wtf
and at the moment at he knew
he killed NMW03
this hurts to watch
im not using bots?
im testing the developement
so i need to write in 2 chats
wtf
But you're testing, so it goes in testing
Testing Markdown isn't related to #development
oh gee if only there would be an appropriately named channel for testing
Bruh let's just have a separate #testing-(something) channel for everything that needs testing
Nice
why is the 'manager' so slow in v12, for changing a simple role? it takes 100 years
Show code
New version of discord.js is so trash
How can I change it to old version
I can't use my codes
They're all gone
Do you have to include the version at the end when installing discord
Like npm install discord.js then the version?
npm install discord.js@11.6.1
nothing to show tim, it just sets the role after 5 seconds
who can tell me how to make a embed message in discord.js?
I can't use my codes
@earnest phoenix why don't you update
what is your djs version
12.0.1
guyz
im making it in glitch.com
MessageEmbed()
i need to do a leave all servers cmd
its an emergency
change the version to master
there should be an option on top
Called?
it's okay. it tells you to change RichEmbed to MessageEmbed on v12 anyway so don't worry about the version
Guys
yes
can someone help me
yes
i need to do a cmd where the bots leave all servers
@summer torrent umm
Istantly
why?
Yeah code iy
you can remove some stuff @soft flare
i can remove discord?
First what library?
Remove the bot from Discord Portal
i meant the embed
and re make it
is it good this code?
``const exampleEmbed = {
color: 0x0099ff,
title: 'Some title',
url: 'https://discord.js.org',
author: {
name: 'Some name',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
url: 'https://discord.js.org',
},
description: 'Some description here',
thumbnail: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
fields: [
{
name: 'Regular field title',
value: 'Some value here',
},
{
name: '\u200b',
value: '\u200b',
inline: false,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
],
image: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
timestamp: new Date(),
footer: {
text: 'Some footer text here',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
},
};
channel.send({ embed: exampleEmbed });``
why?
@solemn quartz we dont sponfeed you
he's just asking how to
show error
what error
i'm sure you already defined discord
^
you can remove it if you did
remove it
it's a constant. they're not meant to be replaced
yes
ok
remove it
🤦♂️
Really?
lololol
message.channel
define channel
if that's what you mean
have you tried defining it
hmm
message.channel.send
do not sponfeed pls thanks
it's just a little
Rise and shine gordon freeman, wake up, and smell the ashes @summer torrent
Is this in a commands folder?
👏 define 👏 the 👏 message 👏
kill me
i just copy that
Is this in server.js or in a commands folder?
and paste it in
whyyy
fffffff
remove it
Oof
it covered my screen
Me eyes
3Head
@soft flare you should learn about variables and their scopes in functions and such.
jduxhdd
Eksdee
i just want to make a embed message for god sake
Plenty of tutorials
how did the command even work?
Is this in server.js or in a commands folder?
@soft flare
Anidiotguide gitbook is a good start actually
what is the file name
server.js
wha
put it in the message event
😩
pepega
so i have to create a file Messagevent.js
No there should be a message event
can you try making a basic bot?
where
Did you not make a message event?
You can't access "message" outside of the scope where you should get it: A message listener.
learn js basics first
You cannot use message where it doesnt exist @soft flare
there is no message there
https://anidiots.guide/ @soft flare
How would the bot know what massage are you talking about?
i told you

you need to put the command inside a message listener
that way you can get the message and respond to it
You havent even made a message event or command handler,
https://anidiots.guide/ @soft flare read that first
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
i think my brain crashed
and its hot

ie: ```
Message does not exist here
client.on("message", message => {
Message exists here
})
Message does not exist here
what's the error
@soft flare mine as well sir, mine as well
ohh i see now
just line the client on ready event that you have right now
records?
interesting
can i help you to screenshare?
no
fick
go learn
that's the only way



FINALLY
you need try catch and then finally
i think
In discord.js how can i see what packages require a certain package
I am tryna find out what packages use integer
I use glitch
You can also check package-lock.json
I just wanna know if there is a way
i use glitch too
Where would it be in package-lock.json
I use glitch as well
Anywhere, use ctrl-f on it
can i link a js file i dont want to fill the server.js with commands
Make a command handler
Not found
I DID
right
i mean
