#development
1 messages · Page 823 of 1
what module is that?
wait
hold up
It's MYSQL but a mate updated it to use Better-Sqlize module
I think.
Yup
No ideea then
Doesn't matter if it's an int or a string
k
case 'embed':
const embed = new Discord.RichEmbed().addField('Author', message.author.username);
msg.channel.sendEmbed(embed);
break;``` I am trying my hand out on embeds and for some reason whenever I type ?embed nothing shows up. I get no error and the bot doesn't type anything. I am using a toutorial from early 2019 so would it have to do with the fact that I am using 12 and I think he is using 11?
I need some quick help
Code: https://pastebin.com/wFuhT6be
For some reason how to properly send the timeout message isn't coming to me. 🤔 d.js 11.5.1
(node:546) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `premium` of 'undefined' or 'null'. at Object.run (/app/data/DiscordBot/commands/admin/premium.js:91:5) at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7) (node:546) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, orby rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:546) [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.
Error.
@hoary elm what's the issue?
Oh.
nvm
Lol I attached the command code and problem
@dapper hill msg.channel.send(embed)
@dapper hill what version of Discord.js?
12.0.2
Toxic it ain't that.
Use MessageEmbed()
Oh v12
The code looks very organized
@dapper hill msg.channel.send(new Discord.MessageEmbed().addField('Author', message.author.username))
I'm sorry this is too advanced for me.
@pine aspen for the most part.... I just can't figure out the timeout
If they use the command nb/open without a reason the bot will ask them to provide a reason if they don't provide one in 1 min I want it to timeout.
Maybe.
It does the time out i just don't know how to get it to send a message saying that it timed out
For this bot no
k
It's just a single server ticket bot
Idk then sorry.
where did you add talkRecently?
Very bottom
oh
Ya @pale vessel That doesn't seem to work unless I typed it in wrong
did you check whether the user is inside the set or not and then add the id
yes keem is very special
ooooo
n
o
case 'embed':
const embed = new Discord.RichEmbed().addField('Author', message.author.username);
msg.channel.send(new Discord.MessageEmbed().addField('Author',
message.author.username));
break;```
remove embed = line
you already defined the embed in the next line
inside channel.send
.then(collected => {
message.delete().catch();
reason = collected.first();
if(!collected) return message.channel.send("Ticket Creation Timed Out")
})
}```
This is the timeout I was referring to
@pale vessel sorry for late response
Time is set via the awaitMessages string
case 'embed':
const new Discord.RichEmbed().addField('Author', message.author.username);
msg.channel.send(new Discord.MessageEmbed().addField('Author',
message.author.username));
break;
``` So like this @pale vessel ?
no

RichEmbed is deprecated, you already defined the new embed on the next line inside msg.channel.send
what happened
@hoary elm what do you mean by "can't figure the timeout"?
because you defined message as message, not msg
change msg to message
When it awaits their response it times out after 60 seconds when it times out I want it to send a message so they know it timed out
but it didn't send anything?
No
.then(collected => {
message.delete().catch();
if (!collected.first()) return message.channel.send("Ticket Creation Timed Out")
reason = collected.first();
});```
maybe check if there's collected first before declaring it
Oof I kinda figured it was something simple 🤦🏻♂️
but did it work tho
Testing now
Is there anyway to selfdeaf on ytdl?
@pale vessel didn't help
no errors?
Same thing times out but no message
No
Ok I lied
``UnhandledPromiseRejectionWarning: #<Collection>
``
Is there anyway to selfdeaf on ytdl, I'm not sure
if (!collected.first()) return message.channel.send("Ticket Creation Timed Out")
Oh 🤦🏻♂️ thats why I didn't put .first()
I was going to but I second guessed myself
Nope. Same error
does reason work?
Yes
Yes but I didn't have it inside the awaitMessage
Same error
But now this is included
DeprecationWarning: Collection#exists: use Collection#some instead
are there any encoder things like base64 but smaller
so to make a longer string smaller but when decoded still retain all the data
Is there anyway to self deaf when using ytdl?
@pale vessel just wanted to update and let you know I got it I just added a .catch(collected => { Timeout message here }) and seems to be working so far 👌thank you for your assistance
ah nice
Ok this might be very vauge
but
How do I add a specific image to my embed
not the persons profile photo. Just a specific image
.setImage('link or path here') afaik
ahhhh ok
I will try that out thank u
ok that worked but how do i make it small and put it in the top left corner?
Top left corner I believe is set with author...
.setAuthor("someMessageHere", "someLinkHere or PathHere")
like this
but in the top left corner
without any text if possible
I will try that I guess
If you don't want text you can try not setting any for example "" leave the quotes empty but it's most likely gonna error that embed fields can't be empty
did not work
Quistion
How do I keep my bot online even when I have shutdown my computer?
@hoary elm ? Do you know?
VPS
Check pins
^^
Np
You can
ytdl? nope, you need to do it via discord.js/eris voice sending thingy
so yes iys possible
Hey,
message.author.send(bot.guilds.map(g=> g.name) + bot.guilds.map(g=> g.id).join(`\n`))
I'd like to make the bot dm this to me on a command
<Server Name> - ID: SEVER_ID - Owner: SERVER_OWNER does anyone have an idea how i could do this?
For 2 days, most everyone is getting this error. How can we fix it?
Host: glitch.me
or
Host: heroku.com
getting this error
probably blocking code somewhere
@pine aspen you mean this? ```js
bot.guilds.map(g => <${g.name}> - ID:${g.id} - Owner:${g.ownerID}).join("\n");
i how to fix pls help guys
@toxic jolt you need to show your code
we're not doing it for you
how to marry a bot
You propose to it
@quartz kindle yeah like that but how could i fetch ownerid
and owner username
of the server
owner.displayName @pine aspen
await client.users.fetch(g.ownerID)
oh
so that works
so then i assume for member count i could filter bot users own
and do g.members
.size
its more complicated than that
to get an accurate member count, you use guild.memberCount
but if you want to filter bots and users, you need to fetch all members first
which is a pain because it eats ram for breakfast
imagine fetching 80k members for this server alone
Haha.
I'll not do that then.
I'm just simply bad an don't really understand mapping
mapping is simply converting each item in an array to something else
ie: [1,2,3,4,5].map(thisItem => thisItem + 2) // [3,4,5,6,7]
@toxic jolt you need to rewrite your bot. your code is very messy, lots of copy pasted things, broken and disabled codes, useless things everywhere, you have like 50 modules installed that you dont use. all of that together makes your bot very slow and full of strange errors
you need to clean up everything
Oh.
start again from 0, install and use only what you need
delete all codes that are useless, repeating or broken
@pine aspen Owner: ${g.owner.displayName}
what is not working?
life
displayName will only work if the owner is cached
thats what we're doing
u* xD
bot.users.fetch() is not a function ;/
message.author.send(message.client.guilds.sort((a, b) => b.memberCount - a.memberCount).map((r) => r).map((r, i) => `${r.name} | ID: ${r.id} | ${bot.users.fetch(r.ownerID)} ${r.userCount} members`).slice(0, 10).join("\n"));
I got to work.
well, if you're using client, use client
oh nvm
bot might not be defined in your current scope
use message.client instead then
K
and you need to await it
`js
so you need to do .map(async r =>)
need bit of help with discord.js v12
muterole = await message.guild.roles.create({
name: 'Mod',
color: "#514f48",
permissions: []
})
Its not nameing role Mod
Check Date
The Date + 30
If the date is 30 more days than in DB
remove premium
else return
How could i do this?
@round ridge what're you trying to do?
The name should be 'mute'
please read the docs.
i know i did wrong but still its not nameing role
the docs has everything.
Go read docs
it docs saying to do like that
no.
it is i did read them
Flazze
what's up
Go time to help rly quick?
sure.
Check Date
The Date + 30
If the date is 30 more days than in DB
remove premium
else return
I'm not to sure how to do this
Do you have a recommendation on how i could
the date + 30
what type of database are you using?
did you store the date in the database?
No not yet
@pine aspen mind sharing the wrapper?
than in DB
you can put a timestamp
hmm
and then add 30 days to the timestamp
so like con.prepare('INSERT INTO time = ? WHERE guildid = ?').run(timestap, message.channel.send)
sure. channel.guild.id btw
time stamp could be new Date().getTime()
it's in milliseconds
so 2592000000 for thirty days
idk
you can format the timestamp using module like moment
or you can use js but it's quite messy
k
i recommend using YMD because it's the standard
I tried to code a discord bot in owo language, here is my code : ```owo
owO oWO owoWowo //starts the bot
OwoWowo OwO UwU //message event
OwU(owo) //starts the bot
Yes we need to start the bot 2 times

haha..
what you trying to do?
passing {} as the default arg into a function and destructuring the lifetime property from the arg if one is passed
i cant help, sorry.
doesnt look like it
this.test becomes undefined instead of an empty object
this seems to work however
basically if a value is not passed, it has to destructure the default value instead lol
@quartz kindle everyone went quiet 😂
who?
but he is violating discord t.o.s already
Help what is the new version of filter in discord.js v12
(node:4420) UnhandledPromiseRejectionWarning: ReferenceError: filter is not defined
let proof = null;
await message.channel.send(prooooof).then(async () => {
await message.channel
.awaitMessages(filter, {
maxMatches: 1
})
.then(collected => {
proof = collected.first().content
});
});
@strange harness
i think he once tried to get his bot here
but then he left or something
how if it was working on v11
It doesn't.
it is
it's called maxProcessed now, not maxMatches
k
You're still going to get that same error.
i told that child to stop the development of his bot
he was already doing 10 errors
and he did not even learn a programming language
@pale vessel that did not help its problem with filter
How add my bot to the site ?
he says he has coding skills and he is the youngest developer 😂
they reversed the new properties xd
yeah discord.js likes to do that
(node:1336) UnhandledPromiseRejectionWarning: ReferenceError: filter is not defined
Still same :/
you need to define filter
how it never was like that
...ok dude
in v11 all was okay v12 releas and rip
this is what a filter should look like: const filter = m => m.content.startsWith('!vote');
Dominik if you downgraded your version right now and tested it you'd get the exact same error message.
so how would i define to bot wait for message
@sudden geyser my other bot is on v11 and work
maybe he accidentally removed the filter without realizing
anyway, it's not that hard to fix
oh yep i did that
const filter = res => {
return res.author.id === user.id;
};
forgot about this line
see
but never saw this my 2 dev might did that intresting 😄
i think max : 1 dont work as its not doing ant think
i try maxProcessed
yep maxProcessed work
last question how i get collected message content as this give error
.then(collected => {
proof = collected.first().content
});
(node:4688) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'content' of undefined
console log collected and see what it returns
maxProcess is the maximum number of messages for your bot to see. max is the max number of messages that pass your filter successfully to be collected.
v11:
max: max messages to process
maxMatches: max messages to collect
v12:
max: max messages to collect
maxProcessed: max messages to process
look at the difference
they flipped it and changed the name
They are truly different:
first one empty because nothing was collected, but it hit the max processed
its outputting
Collection [Map] {}
@round ridge well it's empty
Shit
use max
Ok
it's the same as maxMatches, which worked in v11
Dunno why I can't find it online, but how do you update to discord.js v12?
Either uninstall and reinstall, or instal with @12.0.2
npm doesnt let you update major versions because major versions will always break your code
Yeah I tried just npm update and it updated me from 11.5 to 11.6
How do I selfdeaf in ytdl-core
I use lavalink so I know how to do it on there
But I also use ytdl so wanna know that too
ytdl isn't related to discord in any shape or form
Ik
I use ytdl-core-discord
Nope never mind
I don't
I was getting lavalink-discord and ytdl-core mixed up
Ah but still
lavalink doesn't, it's the wrapper around lavalink that does it
since the only thing passed to lavalink is the connection itself
so lavalink can write to it
module.exports = {
name: "normshift",
desc: "Host a shift.",
usage: "",
execute: async (message, args) => {
message.delete()
const worked = new Discord.RichEmbed()
.setTitle(`New shift being hosted by ${message.member.displayName}!`)
.addField("etype:", "")
.addField("Game Link:", "")
.addField("Description:", "")
.setFooter("Module 1.0.0")
const invalid = new Discord.RichEmbed()
.setTitle("There was an error with this shift.")
.setDescription("Sorry, there seemed to be some trouble")
.setFooter("Module 1.0.0")
let whitelist = ["676786881161330690", "648717359632351283"];
if (whitelist.includes(message.channel.id)){
message.channel.send(worked)
}else{
message.channel.send(invalid)
}
}};
This still sends worked in non-whitelisted(AND whitelisted) channels and there are no errors.
put message.delete() last, just try
it
does
not matter
also, @earnest phoenix, debug
inspect your variables and step through your code block by block and see where the issue is
There are no errors
And it just doesnt make sense
I don't knooww
i told you to debug lol
it's on you if you refuse to do it
Sorry for another stupid question, but could someone link me the changes in d.js v12?
Cheers
Hey Tim
In the whitelisted channels, the ID is the same.
But in non-whitelisted channels it sends worked
and I don't know why
a day passed and still no solution yet lol
12.0.2
I'm sorry but whose bright idea was it to make us use .cache before absolutely everything in djs
By the time I've updated to v12 they'll have released v21
stop being moronic
cached entities are now contained in a cache container and there's nothing bad about that
also, regex replace exists
you could've had inserted .cache into everything you needed to within 30 seconds
Very sorry sir didn't realise that is such a sensitive topic
because it isn't lol
it's just that people are being morons complaining about the change without knowing what it actually does
and breaking changes are... kind of the point of major versioning
...but you don't have to
what IDE are you using
vscode
Learn about the basic editing features of Visual Studio Code. Search, multiple selection, code formatting.
^
Yeah
Fuck you
That is not nice
oh no please you're hurting my feelings 😭
Look at this comedian
-m @earnest phoenix Being annoying and rude in development | 3 days
I don't even know where it came from
🤐 Muted ₮[EsQureY]_SO 22#2440 (@amber crescent)
Lmao
wtf
He left btw
yes
how to get your bot verified by discord
discord can't verify your bot
how do you get bot developer role
what do you mean by verify?
Basically you add the bot
oh. you need to submit your bot and wait for its approval
^
not verify 🙄
it's optional
it'll tell you if it's required
aight
Good job
but it isnt much good
cuz i cant do something like if it only does ?8ball it says "what are you asking?"
So like i have a prolem
^
you can try awaitMessages
@solemn quartz check if an argument is given
Hello everyone 😊
hey
I just started development for the first time using node.js for discord bots. Is there any good resources out there anyone could recommend for a beginner? Just made my first hello world bot some days ago :P
ohhhh okay, took it in college, it’s not that bad at all :-)
@echo violet search on Yt "CodeLyon"
ah so youre familiar with thing like callbacks, etc.
Will definitely research JavaScript some more though and thank you BG!
Yes
CompSci major :P
Just getting feet wet here though!
lol
the codelyon tutorials are outdated now
GL @echo violet
d.js v12 has quite a few changes
i suggest documentation
You mean my IDE?
yes
I just use notepad++ :o
wat
I would suggest a better editor
I research code and implement it and mess around with it.. yeah :’D
notepad++ is not bad but especially as a beginner you would generally want features such as autocompletion and code suggestions
I just think it's messy
I see :) what would you guys recommend?
but then again i have no idea what your skill level is so ¯_(ツ)_/¯
visual studio code is a very popular option
and a very good one in fact
insanely good for javascript
https://oliy.is-just-a.dev/rrn4hp_3135.png VSCode is really organized
Been coding for a few years now here and there and did some work for Mainframes under IBM but I don’t have that much experience :(
Thank you!
That looks pretty neat and organized, will download it when I’m back home and give it a try
You guys have been pretty helpful, thank you :D
Never thought of using anything VS related for this LOL
Workspaces really help organize your code
-deleted-
Ooh I posted this in the wrong place :’D Sorry LOL
Trying to share documentation with another friend that just got into development too
Is there any way to wait for all of my shards to fully start up before allowing users to execute commands?
///...```
Is this true?
@wide ridge what lib
and version
nice token
you're gonna wanna reset that
whoever posted that
oh
it also can stay in someone's client cache lmao
i didnt post it
@wide ridge what lib
@amber fractal discordjs
so idk
11.5, sorry
why would someone post their token
lol
wait for all shards to be ready by them emitting this
The easiest way I can think of is storing the value somewhere where all shards can access like a database and check before the command is executed or you could probably use broadcastEval in some way too, but I never did anything with that
Hello! yeah it's me again... I was just wondering if there is a way to @ the person who called the bot
Probably something like message.author.mention, but it depends on what library you use
const Discord = require('discord.js');
module.exports.run = async (bot, message) => {
message.guild.members.map(c => {
if(c.presence.game)
if(!c.user.bot)
if(c.presence.game.name === "Custom Status"){
if(c.presence.game.name.includes("discord.gg" || "http")){
console.log(c.presence.game.state)
}
}else if(c.presence.game.name !== "Custom Status"){
if(c.presence.game.state.includes("discord.gg" || "http")){
console.log(c.presence.game.state)
}
}
})
};
module.exports.help = {
name: "scanstatus"
};```
I can't, how can I do? to see if in the status of a user on the server it has (http where discord.gg)?
version?
I got my bot to @ me and the number after the # but I got no ping....
^11.4.2
@tough relic that's bot how it works. Your but should do <@yourid> to ping you
You mean I should put <> around the name or delete the # and the numbers?
your should put <@> around your ID, not your name
Your ID is 495628159337627655
like this
So it will be @tough relic
^
^
Alright thx
Any idea how I could run complete nodejs virtualization, on my ubuntu server?
Also, I would rather use pm2 because of it's metrics
cool developers use only Eclipse IDE
isn't eclipse one of the buggiest IDEs out there and has an interface looking like it's straight out of 2006
It looks like it's straight out of 2006, because you can't improve perfection 😛
have you tried reading the error
no
The other description
icba
Short desc ≠ long description
tf is a temp email
never heard of 10 minute mail?
temporary email....
oh temporary email
yeah but how is that related to discord
I was thinking of temperature email
just wondering if DBL would ban my bot if i added that
studying too much chemistry
dbl can't do anything against your bot but remove it from their page lol
thats what i meant
dbl will remove it
as in removing it from thier site
if a temp email api is not breaking the discord tos
dbl should not have any problem
const Discord = require('discord.js');
module.exports.run = async (bot, message) => {
message.guild.members.map(c => {
if(c.presence.game)
if(!c.user.bot)
if(c.presence.game.name === "Custom Status"){
if(c.presence.game.name.includes("discord.gg" || "http")){
console.log(c.presence.game.state)
}
}else if(c.presence.game.name !== "Custom Status"){
if(c.presence.game.state.includes("discord.gg" || "http")){
console.log(c.presence.game.state)
}
}
})
};
module.exports.help = {
name: "scanstatus"
};```
I try to make a command which scans all the status of user of the server, and if one of the users has in its status "discord.gg" where "http" sa tells me by the good of a message
v11.4.2
@wicked pivot good of a message?
^
need bit of help as i cant get this only this to wokr
https://cdn.discordapp.com/attachments/468249189332287498/688822640693215248/unknown.png
@round ridge show code
that all
wait
doing String or String just gives you the first string (unless it's empty) https://oliy.is-just-a.dev/j5pxpy_3139.png
@finite bough its v12 btw
please help me console log js (node:22945) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN discordapp.com:443 at Object._errnoException (util.js:1022:11) at errnoException (dns.js:55:15) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26) (node:22945) 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:22945) [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.
the eval code which u use
@finite bough think is even when i put it in index or some else nothing happens its undefine all time
show me the code
ok
@earnest phoenix yap my server pc linux
@finite bough https://justpaste.it/7h253
@round ridge you didnt trim the command
if(["626346037975580672","594491170248458250"].includes(message.author.id)){
It isnt that
what r u trying to do here?
he's trying to eval with the command call
@amber fractal huh?
@earnest phoenix a google search says that the problem is with your proxy / connection
That checks if the user is a dev I'm guessing
try doing some solutions from google
yea but
@round ridge log args for me
never saw someone doing it this way
tell me what it is
@amber fractal problem is that i cant get user username all i need help with
Having an array of developer ids is probably the best if you have multiple devs on a project. but it should also be in a config file so you can change it with ease
^
@earnest phoenix i restarted the router and it improved
@amber fractal you understand what i mean
Yeah I can see that, message.author.username would work if your eval command worked properly
but its not working in any command
what does it show for the other commands
undefined
message.author.cache.username?
what?
wait
author returns a user
nvm
read docs pls
@sudden geyser did milion times
it should cache by itself
@round ridge can you show me other code where you use it and it returns undefined?
const Discord = require("discord.js");
const randomPuppy = require("random-puppy");
module.exports.run = async (client, message, args) => {
const img = await randomPuppy("greentext");
const embed = new Discord.MessageEmbed()
.setColor("#00dd55")
.setImage(img)
.setTitle(`Greentext`)
.setTimestamp()
.setFooter(`Image requested by ${message.author.username}`)
message.channel.send(embed);
}
what about message then is it being passed correctly?
what is the error specifically
nothing there is no error
but when i eval it u get SyntaxError: Unexpected identifier
I love js... So it sends but the footer says Image requested by undefined?
can u add .cache ?
to what
i did 2 times same error
I love js... So it sends but the footer says
Image requested by undefined?
@amber fractal yes
It appears that bots have access to print any emoji as long as you have the emoji name and id. Is this correct? I'm sharding my bot and I noticed I can use emojis for servers that the bot is not in.
This does not seem to be the case for message reactions while sharding, though. Reactions do require the bot to have access to the specific emojis.
@round ridge It may be dumb, but try message.member.user.username
well what did you do
eval that
jsk is just rename of eval..
It appears that bots have access to print any emoji as long as you have the emoji name and id. Is this correct? I'm sharding my bot and I noticed I can use emojis for servers that the bot is not in.
This does not seem to be the case for message reactions while sharding, though. Reactions do require the bot to have access to the specific emojis.
custom emojis can be used across shards, as long as your bot is in the guild with the custom emoji and has permissions to use them in the channel, they're able to use it
Yes, your args includes it
@amber fractal nope
That's the only way you'd get that unexpected identifier error
from that
wait
I see
you're evvaling twice
that is right
try using message.author
Last thing I could thing of is message.author ? message.author.username : (await message.guild.members.fetch(message.member.id)).username
wait
I misplaced a )
but if the author was undefined, it would throw right?
Hmm imma try the thing you're trying @round ridge and if it works... Imma tell you something...
anyways, yeah, try forcefully fetching the member
Unless he's catching unhandled rejections and doing nothing with them with like a process.on('uncaughtexception', ...
i try first reinstall all modules
that won't help
^
never know
wait
@round ridge idk how but i tried the exact same code as yours and it works....
@round ridge can u just try client on("message", message..... message.chhanel.send(message.author.username)
in ur main file
Did you do npm install discord.js --save?
Or what? @round ridge
does it matter .,.
i did npm install discord.js
But the --save is important...
depends
not rly
not rly
When i didn't do --save some of my code didn't work... Suspicious
just wait need to redownload all as that was main problem discord.js did not download right as i saw
pls 1st try getting it on ur main file
there can be a problem with ur command handler then
idk how but
ok
oh I have no idea how
XD
custom emojis can be used across shards, as long as your bot is in the guild with the custom emoji and has permissions to use them in the channel, they're able to use it
@earnest phoenix so you see, my shards are able to use all of the custom emojis even if they're not in the guilds that have the custom emojis
that's... weird
message reactions using the custom emojis doesn't work, but I can see the emojis in the embeds and in message replies etc
are they using them or are they using the url to them
they're using them like this:
<
idofemoji:>
<:emojiname:emojiID:>
which works for all of my custom emojis. I have over 500 emojis across 18 different guilds
it's more than likely a bug
and some of my shards serve only 4 guilds
could be because you have them cached maybe?
try sending :txt: and seeing if that's going to get resolved
thank you discord
you're useless
Hmm I haven't checked their cache
xD
@round ridge wait did you include that Embed message code in a different file than the very main?
Hmm that's very suspicious
@earnest phoenix ever heard of command handling?
Yea?
then why did u ask that
"another file"
actually
@round ridge can u check if u defined the guild something
like const guild = "?"
smthing like that
Hmm... I mean like i think i have found something... But...
I mean did he include all his codes in one file or did he use another files to store them commands in...
i did
@round ridge did you make a js file for every single one of your commands or you included them all in just one file?
@earnest phoenix yes
Umm... Which one now all codes in one?
his code works
that means the basic stuff is ok
@round ridge can u try logging out author username from ur main file?
nothiing work
you guys forgot
that fetch is a promise
and it needs to be resolved with either async-await or Promise.then
I ignored that as it's also not working in his embed
@earnest phoenixit would return an error tho
how?
ehh
fetch gets the object from discord directly
wat
aaa
await in non async method?
that's why i said or Promise.then
hi i am getting this error when i use node .
/home/pi/DiscordBots/ThemeBot/node_modules/discord.js/src/util/Util.js:32
);
^
SyntaxError: Unexpected token )
i think its bcus i have a old version
but how can i upgrade it
i can only use the terminal
npm -v = 4.1.2
it's a syntax error
how should i fix that ?
oef
by fixing the syntax
its in the nodes modules folder wont i break anything if i remove code ?
go ask the repo owner
i imagine root is gonna be index.js as for .env fuck knows
might wanna learn basic js before jumping into bot development
also build some things after you learned them for practise it wont help if you just watch hours of tutorials but have nothing built in that time just an advice @earnest phoenix
you don't
file inside a file
easy
step 1 make sure the file is a girl who is 18+
step 2, do I even have to explain further?

we all know u r a man of culture
Not sure but is there a way to detect the encoding of a string? Let's say i encoded text to binary, is there any tools available to detect it is binary (node.js specifically)
https://github.com/aadsm/jschardet like this?
@split hazel if u use vsc will detect the language I think
That's not what they're trying to do I don't think
but
the one I gave isnt either I dont think
not sure.
Yeah not what i wanted, that only detects the type of the string, i want it to detect the type of encoding which was used, for example binary, base32, base64, ROT etc etc
does anyone know why this error keeps popping up?
you didn't define db
not sure what u mean by that
do you have db anywhere in your code?
yup
then you're using it wrong
no
then show code
i just use it to get servercount on dbl
never had this problem just today it says undefined
show code
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('', bot);
// Optional events
dbl.on('posted', () => {
console.log('Server count posted!');
})
dbl.on('error', e => {
console.log(Oops! ${e});
})
removed key for privacy
well... where is db?
whats the full error?
db is not defined
that is the error
no its not
so why am i getting db is not defined
show the full error
that is what it shows nothing else
what is written under it?
dude i cant help if you dont show more
what you shown so far helps with nothing
and you refuse to show more
i dont think u understand
no, you are the one who doesnt understand
programming is not magic, i cant possibly know what your code is doing if i dont see it
@bitter sundial i keep getting this error db is not defined how do i fix this?
...
bruh
NEKO
Do you know how Tim has a bright green role
Because he knows what he is doing
i told you, if you dont show your code, nobody can fix it
i already showed the code
you showed a small irrelevant part of it
thats the code i have
Show the full error
you define the db or remove the code
how do i define db?
bruh
either show your code, or go learn javascript
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('', bot);
// Optional events
dbl.on('posted', () => {
console.log('Server count posted!');
})
dbl.on('error', e => {
console.log(Oops! ${e});
})
thats the full code already showed u
what are the lines under the picture you showed
they're important to locating the error

