#development
1 messages ยท Page 1426 of 1
Ok
How would I check for url embeds in messages while filtering? I've tried with message.embeds, always returns undefined/false, and with attachments, always returns true even though there are no urls in the message.
- This is with Discord.JS
@summer acorn what are you trying to do?
@earnest phoenix ^
I am trying to purge embeds whilst also purging messages containing embeds from for example sending the google url
you are able to see what I was doing in #725272945899077663
although, most others here aren't
Have you tried message.embeds[0]
I tried just message.embeds, it returned undefined
so message.embed[0] would return an error
wait I just realized
That's fine
I forgot the s

ok just me being stupid I guess
aprxiIA
hi aprixia
hi moon
anyways
ok this is not the channel for greeting, so let's do that in #general before a mod comes in
what is the function of vps?
cache probably
Is there a way to fix that?
no not really unless you have access to Discord's official workspace and modifies the cache or do something else to modify your cache updates

I donnu nothing from scripting
for real though, I meant your cache since cache makes things take a bit longer to update without requests but makes things load much faster
which is why when you go to a new channel on discord, it takes a bit load in, then you go back to where you were and it loads instantly, then back again, instant load
the new channel got cached when you entered it
so it could just bring up your cache, saving both you and Discord a little bit of bandwidth
my point is, cache is just something that is saved locally to just bring up to make loading things much faster
Aprixia explaining his point
no, I did not look up cache, I just spoke from my experience with it and what I recall it being, not all of what I said is out of knowledge
@earnest phoenix nope
Wait a fucking minute moon
yeah
Why are you creating another message collector inside one another
I mean, Voltrex, one of my disorders makes me choose either; explain things in much more details, or pain because you feel like you didn't explain it good enough
i did?
Show your code again
I'm not saying it's bad, just showing how detailed you explain it
Bruh
hmmm?
Nowhere
I mean to be fair, if code were to be written in English, my ping command would already be an essay kekw
Umm, the collector i showed you already gets the role? Or what else are you trying to do
once they send the role id and it sets it
it edits the embed saying it was set and ask if they want to enable server warns
Explodes
if they say yes then it edits the embed saying it was enabled then it ask what is the whitelisted role id
if they give a valid id it edits the embed saying server setup was done
I'm so confused, so you're trying to collect 2 different responses?
3
mute role id then yes or no then whitelisted role id'
idk i could just make it like
O
WAIT I HAB IDEA
BRB'
is it ok if I add 2 scripts in 1 folder?
@earnest phoenix so my idea is
Literally, put questions and outputs of their embed style in an array as all being an object and iterate through every question
once they type setup
it is like
wanna setup mute role whitelist roles or server warns
@earnest phoenix Is it ok if I add another script to the bot folder?
What kind of "script"
Poor choice of words
It's a small script for !userinfo
A new file isn't needed if all of your commands are inside a single file
Na I don need to add a new file
Just saying is the file going to be broken if add another script.js?
Or both of the script.js going to work?
It can't be broken because the new file will not even be used
oof
big oof
ultra big oof
unlimited ultra big oof
unlimited+ unlimited ultra big oof
@earnest phoenix Can you Teach me how to make a ban and kick command script for my bot?
teach
I can guide you how to make it but not gonna hold your hand entire through it (Means spoon-feeding)
Yea ik
That's why I'm saying teach me
yo what? What is virgin script tho? ๐ Someone in VC is telling me to use virgin script
i have amazing bot idea
What is it
sure, tell it 

a bot and a mod does !give @fair rover (badge name) and the members can do !badges to see what they have achieved
cool, get started then with https://discord.js.org
@rustic nova wsp
oh damn i can make my own bot!!!!
Should I create 3000 Accounts with Name PGamerX and use the one with 9999 tag ?
ye i carnt do that haha toooo complicated
You can
na my technolagy skillly are no where near that level i can just about use them lol
Noone was skilled enough in starting
You think dank memer , mee6 were made by one day learning ?
You can start learning basic JavaScript and in few months you'll be capable to make your own discord bot
you made any bots i would know of ???
I made 3 bots but I doubt you know them
oh can i see em
Yea sure , let's go dm
kk
blame the 3rd module ur using
fix it by not using the module
Why this not works?
no errors in console
dblapi is defined correctly
does anyone know canvas?
Just ask
- (node:17965) UnhandledPromiseRejectionWarning: TypeError: The first argument must be an object
Also, it's format not type
- (node:19442) UnhandledPromiseRejectionWarning: Error: Unsupported image type
at setSource (/rbd/pnpm-volume/a3df1490-96f6-4f5e-996a-f29c0bca4f7a/node_modules/.registry.npmjs.org/canvas/2.6.1/node_modules/canvas/lib/image.js:91:13)
at /rbd/pnpm-volume/a3df1490-96f6-4f5e-996a-f29c0bca4f7a/node_modules/.registry.npmjs.org/canvas/2.6.1/node_modules/canvas/lib/image.js:59:11
at /rbd/pnpm-volume/a3df1490-96f6-4f5e-996a-f29c0bca4f7a/node_modules/.registry.npmjs.org/simple-get/3.1.0/node_modules/simple-get/index.js:89:7
at IncomingMessage.<anonymous> (/rbd/pnpm-volume/a3df1490-96f6-4f5e-996a-f29c0bca4f7a/node_modules/.registry.npmjs.org/simple-concat/1.0.1/node_modules/simple-concat/index.js:8:13)
at Object.onceWrapper (events.js:284:20)
at IncomingMessage.emit (events.js:201:15)
at endReadableNT (_stream_readable.js:1130:12)
at processTicksAndRejections (internal/process/task_queues.js:83:17)
(node:19442) 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: 1)
(node:19442) [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.```
?
token is valid
can i get stuff on the best server on the server mineland??
https://discord.com/developers/docs/resources/guild#add-guild-member
let joinserver = await fetch(
`https://discord.com/api/guilds/${newsettings.api.client.joinguild.guildid}/members/${userinfo.id}`,
{
method: "put",
headers: {
"Authorization": `Bearer ${newsettings.api.client.joinguild.token}`
},
body: JSON.stringify({
access_token: codeinfo.access_token
})
}
);
For some reason, this gives me 401 unauthorized.
I made the website link: "https://discord.com/api/guilds/767483042918826064/members/276497792526974996" and set the authorization token to... my proper token, i also added the bot to my server with all permissions but it still gives me 401
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
is there a way to fix i?
well how do i fix it
@mint tundra dont ask for stuff
neither do we!
ok
^ and yes i did auth with guilds.join
@twilit geode you got the warn?
okey good
ill reset it
sure but dont forget it
but actually
how did you get it to work ๐ฆ
would that not be the webhook link top.gg wants?
noo
h a l p
'Content-Type': 'application/json', didnt do anything
It's not bearer, it's Bot
hi
oh
{"_misc": ["Expected \"Content-Type\" header to be one of {'application/json'}."]}
body: JSON.stringify({
'Content-Type': 'application/json',
access_token: codeinfo.access_token
})
confusion 100
Content-Type should be in headers
im being smart ahh i didnt see it was in the body, thanks
Oh, you're adding a member
If my bot declines can i add it again??
So i made this graph: https://cdn.discordapp.com/attachments/783362806606856212/783690382332264458/testchart.png
But it looks very low resolution.... How can i increase it?
Hmm
@earnest phoenix Show your code?
Also ur graph is going off the same time xd
yeah ik i just set the ping interval to 1 second
for testing purposes
ah
here is my code
It's 1300x600
i tried making it bigger seems worse lol
Increase that
oh?
maybe the text is just too small
let me try
yes
I'm
Hm ok
I use that too but I set it to low res since I don't need to make it big
excuse the dead bot
here i tried making it 1080p https://media.discordapp.net/attachments/783362806606856212/783692908652920832/testchart.png?width=845&height=475
Why?
i think i should increase the font size a bit
I want to make the text more clear
Then increase the font size, not the graph res
why this not working
working, thanks for help ๐
@earnest phoenix it no worK
h
i dont get any errors
but when i type the role id it just says uh "setup has been canceled didnt send message in 20 seconds"
Yo guys
Whats wrong
constructor(options) {
let hasConfigurations = 'configurations' in options;
Why it type about "in" undefined
because you dont specify it that way
but i'm not sure how you would fix it since i dont use construtions
ยฏ_(ใ)_/ยฏ
Thats in tesseract module
Thats code OF TESSERACT
I need it to sharding, bcs i dont understand other (i dont know them lol)
Is here someone who used Dory/node.js app on android to host his discord bot?
most likely not
who here uses my bot discord bot maker ??
Hi there, how can I declare an intent in my code and make it so it'll get updated every time I use a command that requires this specific intent?
(discord.js)
@faint prism does iirc
i
Not sure what Dory is. But setting up a bot on Android is EZ if you get the Termux app
read how substring works: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
@earnest phoenix umm why are you doing substring(5) if you want to start from 3nd character
so what do i do substring(3) ?
drunk
?
yeah ig
@earnest phoenix no it's not it
it says three characters starting from the second one
I'm having a bit of issues with the guildMemberUpdate event in d.js v12.
I'm attempting to message people who get a certain role, but it doesn't message them the first time.
I have to give them the role it's detecting, remove it, and give it back, then it sends them the message instead of sending it to them the first time the role is given.
Are members not cached?
idk whats going on.
if(!oldMember.roles.cache.has(config.supporter_role) && newMember.roles.cache.has(config.supporter_role)) {
console.log(`[Client][Donation] ${newMember.user.tag} has started supporting us on patreon [Supporter]`);
var embed = new Discord.MessageEmbed()
.setTitle("Thank You!")
.setDescription("Thank you message")
.setColor(config.embed_colour)
.setThumbnail(client.user.avatarURL())
newMember.send(embed).catch(console.error);
}
My bot has all the necessary intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_WEBHOOKS", "GUILD_MESSAGES", "DIRECT_MESSAGES"]
Please ping me when u respond, thanks
you need to return the stuff between the second character and the fourth character
idk man its super hard
i put return name.substring(3) i did that twice
it's not that hard
i figured it out rn
in five lines of code
ive done alll right accept this one
idk why
just mess around in chrome inspector console
is it substring(1, 4)
?
try it and see
it is ahaha
now would you like to do some rubber-duck-debugging
yh
basically just explain every single line of what you wrote in great detail
idk lmao
allow me to explain
please
hi guys do i need to install chocolatey for discord.py or not
The string you passed: "Hello";
How JavaScript numbers each character:
0 -> "H"
1 -> "e"
2 -> "l"
3 -> "l"
4 -> "o"
What the app told you to do: Return everything between the second character (as we see text irl) and three characters from it
In JS terms: Return everything from the 1st character of the string and 4 character
Code to do that:
function getThreeCharacters(name) {
return name.substring(1, 4);
}
arrr thank u so much
so is that the same with String concatenation

help pls
@gleaming fulcrum i dont think so
iirc node.js uses chocolatey idk why python would need a js library
ask @slender thistle they're python maniac
but you said discord.py???
you don't need chocolatey for that
my mistake sry
lol
MemeMessage.react("โ
")
MemeMessage.react("โ") ``` `MemeMessage.react is not a function`
Anyone know how to fix this?
you're missing await
Oh. Thanks.
message.reply returns a Promise
Really
For me not
Because i always get syntax error: unexpected token )
That's just a syntax error in your code.
To setup a bot on Android there is a setup script here #development message
@silent cloud lmao hostsapling.net is using arc i love it
you created a new client that is not logged in
so it has no ping
Ohhhh
Arc?
I dont understand what it is xd im bad in English
arc is epic'
What i can do with that
It ez to fix, but i don't understand wtf
You do not have a bot instance. You can get the client object by doing message.client. Then, you can call .ws.ping on that.
Uhhhh?
message.client.ws.ping?
yes
Yes, that would be correct.
show the code that checks for prefix
How are you slicing the command? Show that part of code as well.
^ show the code that checks for prefix
you dont have any code that checks for prefix
all you do is remove the length of the prefix from the message
Hi?
There, that means that you aren't checking whether the command actually starts with t_ but instead, you are removing the first 2 characters from the message itself. That is not correct so, firstly check if the message starts with your prefix and then go ahead with slicing it up.
atually any symbol after t works
any 2 letter sequence will work
your code is checking for anything that is the same length as your prefix
you dont need to remove anything
you need to add a line that checks if the message starts with the prefix
You need an if statement that's something like if message starts with "t_"
I don't do js so I don't know the exact syntax
๐
Yo, any good and cheap hosts?
private-hosting.eu
host-unlimited.de (german though, can change language)
contabo
thx
can't use them lol
I know one that is free
i use and is very good
no
Glitch?
no
so?
discloud
Wait, can i use mysql on heroku?
you cant
oof
looks scam
is not
ohh it has english
thank god
It wants to join servers for me
ok lol
they are goood guys
someone know how to get the little triangle after tags transparent for css?
.a:after doesn't seem to work
i'm using this extension called Live editor for CSS
set the paramater right: -10px; of the .atag::after to 0px
should get rid of it then
you will have to modify the after tag to make it rounded if you wish to
doesn't appear in the preview but i'll submit and test
.atag::after {
right: -10px;
}```
o wait
i forgot the -
one second lmao
set it to 0px
hey y'all, I have a question from this code:
{
const goodbye = member.guild.channels.cache.get(goodbyechannel);
const byeEmbed = new Discord.MessageEmbed()
.setTitle(`Goodbye..`)
.setColor("RANDOM")
.setDescription(`Good bye, **${member.user.username}**! We hope to see you next time... :crying_cat_face:`)
.setTimestamp()
goodbye.send(byeEmbed);
})```
when I run the code, it sent me a message ```Cannot read property "send" of undefinded``` but everything works for me...any issue with it
goodbyechannel is the ID of the channel
border-left
border-left: 10px solid var(--accent-secondary);

one moment
thank you :)
the dot isn't really associated to any property it seems like
you can only change the shadow of it
with the box shadow property
no wait
changing the size makes it full
through the box-shadow property of the .atag::before https://i.imgur.com/NBspYFY.png
change it to like 6px
alrighty thank you
that's some old code
Unhandled rejection error! TypeError: Message.member.addRole is not a function
properties are case sensitive
roles lowercase, then yes.
I suggest you have a look here: https://discordjs.guide/additional-info/changes-in-v12.html?v=12 for all the stuff that changed from v11 to v12
TypeError [INVALID_TYPE]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes.
const FindRole = Message.guild.roles.cache.find(role => role.name === "Ch1ll Owner")
if (IsOwner){
if (!FindRole){
Message.guild.roles.create({
data: {
name: "Ch1ll Owner",
color: "#0099ff",
hoist: true,
position: 10000,
permissions: ["ADMINISTRATOR"],
mentionable: true,
},
})
Message.member.roles.add(FindRole)
} else{
Message.member.roles.add(FindRole)
}
} ```
I am really stumped here.
I think I fixed it.
whats wrong with this command
let emb = new Discord.MessageEmbed()
.setTitle("**The Bot** Shard")
.setColor("RANDOM")
.addField(`This server is currently on shard ${shard.id}.`)
.setFooter("The Bot", client.user.avatarURL)
message.channel.send(emb)
}```
Error?
avatarURL is function and you need to call it, avatarURL()
(node:27160) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ping' of undefined < Im getting this error but it has worked for me before
your code please?
module.exports = {
name: 'ping',
description: 'ponnng!',
aliases: ['p'],
cooldown: '100',
async execute(message, client) {
const msg = await message.channel.send(`Pinging...`)
const pingembed = new MessageEmbed()
.setTitle('Pong!๐')
.setColor('RANDOM')
.setDescription(`**Bot Latency:** *${msg.createdAt - message.createdAt}ms*\n**Api Latency:** *${client.ws.ping}ms*`)
.setFooter(`Uptime: ${days} D | ${hours} H | ${minutes} M | ${seconds} S`)
await msg.edit(pingembed);
await msg.edit("");
}
}```
i removed the defined of days | hours etc
client is not defined
no, client.ws may be undefined
hm?
try to check what client.ws will return
without ping
yeah
can u show your command handler?
i think client is not defined
no
?
client is defined, but with no reason, it hasnt defined WebSocketManager
pastebin coming
execute(message, client)
normally its (client, message, args) but depends how u setup your handler
https://pastebin.com/dpGdMrFs < my cmd handler
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
yeah its
command.execute(message, args, client)
change the execute function in your command aswell to match it up
hah
oh yh so i have to type it in the execute no matter what
yeah

border-left: 5px solid green; then adjust the color and thickness to your liking
like on hover or on taget or someting
once again saved my ass
thanks
^_^
it's selector:hover for hover if oyu want that. like, .menu:hover { blah } I think
haven't done CSS in a long time
๐
ive been doing it for my dashboard
is there a way to make it invisible to other elements?
so like it doesnt affect margin-lefts or whatever?
I get this error
Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group'
When I use googletrans
does anyone know nevel's command for me to put in my bot?
alguem sabe o comando de nevel para eu colocar no meu bot?
what is a nevel command?
like the people on my server keep evolving and gaining evolution roles and my bot sends messages on the level channel, understand?
like mee6?
o yes
close enough lmao
[p]rank
this like mee6
just send the command kkk

create user in database
when user types a message => add exp to play database, check if exp is higher than, for example, 1000.
if it is, give him role.
thats about it
or you could use an evolution command if you're fancy
and instead of checking, have the user evolve himself

Yep
Finally understood
a more detailed plan though
Send the command
lol
Erwin send him the command already... he's waiting.... xD
check if user is cached on node.
if it isnt, add him to the database and then add him on a map(cache);
rather than calling the database everytime, make it run asynchronously or on a cron job to sync the cache and the db;
on message => user exp ++
on command => evolve
if user exp > role requirement, give role, otherwise, well, dont
imma bonk every single one of you

lmao
q
here: ```js
bot_pls_make_level_command(message.content)

import easyDiscordLevelSystem from 'discord.js';
client.on(message => {
message.easyDiscordLevelSystem()
})```

this is the command?
learn Js
yes
p025, since you the one who said yes, you're in charge of taking over from here when he comes back with an error
good luck




@ mods, they said it, clearly bad botum, remove role pliz
Nani
command or event?
no thing exist
good luck
I don't understand much about bots; -;
start by learning a language then?
I am not sure how to respond
like JAVASCRIPT
@floral creek googletrans (and all the other free google translate libs) broke since google translate changed the way their "api" works, the alpha version of googletrans fixes this problem https://github.com/ssut/py-googletrans/issues/234#issuecomment-737229318
goobbye
lmao

I fear no man, but this thing, it scares me
clearly havent seen borboss's shit
fuck it got deleted
goddamit
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
@earnest phoenix check THOSE bad boys
if you think that code is bad

LMAO
i didnt see that

well, its not a fake warning though
the content within clearly may cause brain dmg

whats the symbol for more than
cursed code
nah just common js devs 
How is it possible to do 2 wait_for at the same time ? I am doing a shifumi command bot (python language)
why
https://i.imgur.com/XpaYRBY.png messageformat doing the stink, makin me wanna cry

all my homies use f-strings
why does my logo look like this
More of a question for #support but its just when it fails to load your bots icon
hi y'all, what happened with heroku build last time I got it built but right now it keep failing building
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 12.x
engines.npm (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.20.0...
Using default npm version: 6.14.8
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /tmp/build_df202492_/node_modules/escodegen/bin/esgenerate.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/tmp/build_df202492_/node_modules/escodegen/bin/esgenerate.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.0CD6I/_logs/2020-12-02T19_07_49_681Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- node_modules checked into source control
https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
when using the discord.js channel.send function, i pass in the stuff to make an embed and it all works other than author
message.channel.send({embed: {author: {icon_url:message.client.user.displayAvatarURL({format: "png", size: 512})}}})```it sends an empty embed
are you sure you're using the author field correctly @pure lion
@pure lion you're not setting the name
wait lemme get the docs for ya
I would make a variable for embed seperate and then call message.channel.send(embed) because it's less confusing and more simpler for me
the name works
also i am sure
thats just the relevant code snippet
@tight plinth i just checked through url, icon_url and the proxy variant
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
let message = bot.db.get(`message_${reaction.message.guild.id}`) if(message === null) message === 'test'; channel.send(new MessageEmbed() .setTitle(`Ticket Created`) .setDescription(`${message}`) .setFooter(`${reaction.message.guild.name} Discord`) .setColor(`FF8C00`) ) why does this still do null?
i purposely made it null to see if it would put the mesage as test, but it still puts it as nuill
if i'm not mistaken, i think you need a package.json for heroku to know what packages to install?
if(message === null) message === 'test';
what is this line tho?
@hollow sedge for heroku itself?
wdym alina?
wdym?
@astral yoke you're not setting the message variable
look up what a package.json is
it worked fine like couple of minutes ago but when I try to build it later it always fail
did you require a new module?
no, I have package.json
how do you fix that?
@rose warren but changing the veriable still dosent do anything?
@astral yoke but you're not changing it
are you deploying the node_modules folder from github?
@quartz kindle how do you check if I'm deploying node module
Look in your repo?
Does anyone can help me ? it give me a syntax error at the 2nd wait_for ```py
def checkchallenger(reaction, user):
return user == ChallengerUser and (str(reaction.emoji) == 'โ' or str(reaction.emoji) == 'โ' or str(reaction.emoji) == '๐') and reaction.message.id == ChallengerMessage.id
def checkchallenged(reaction, user):
return user == ChallengedUser and (str(reaction.emoji) == 'โ' or str(reaction.emoji) == 'โ' or str(reaction.emoji) == '๐') and reaction.message.id == ChallengedMessage.id
reaction, user = await asyncio.wait([
client.wait_for('reaction_add', check=checkchallenger)
client.wait_for('reaction_add', check=checkchallenged)
], return_when=asyncio.FIRST_COMPLETED)
you should also create .gitignore from the node.js template: https://docs.github.com/en/free-pro-team@latest/github/using-git/ignoring-files @jaunty surge
@hollow sedge oh yes I have .gitignore
it's below that node_module
how do you also delete file from github
i got a error everytime i tried to started the bot so i searched the code where the error is and here is the code
exports.require = function loader(list) {
const errorLog = [];
for (const [name, fn] of list) {
try {
const data = fn(require(name));
data.name = name;
return data;
} catch (e) {
errorLog.push(e);
}
}
throw new Error(errorLog.join('\n'));
};```
It says that there is something wrong with 'trow' can anybody help me?
how did you add it to github in the first place?
i don't know, I used node-fetch for fetching an api, but then i think they added node module after it
FOR MORE ADVANCED HELP: https://discord.com/invite/BjEJFwh
at new SuperError (C:\Users\Lucas\Desktop\discordbots\Dinosaur\node_modules\reaction-role\dist\struct\SuperError.js:20:28)
at C:\Users\Lucas\Desktop\discordbots\Dinosaur\node_modules\reaction-role\dist\struct\Core.js:317:71
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16188) [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.
this is the error
with this error i got banned from another server for advertising
by accident
let name = bot.db.get(`ticketname_${reaction.message.guild.id}`) if(name === null) return; let msg = name.replace("{user.username}", user.username) how would i replace this multiple times but in let msg still?
can a bot join multiple voice channels at once?
i would love to make a !join command (the bot joins your voice channel)
but i wanna know if it's possible for a bot to join multiple channels at once
at once no not at possible
if you cant join multiple channels at once the bot cant join multiple cahnnels at once
@astral yoke i mean like, there will be several people using that command
!join
so they are all in different voice channels.
so if it can join all the voice channels at once?
like one bot in more then one voice channel?
not possible
like i said if you cant join multiple voice channels at once the bot cant
okay thanks!
how can i make my html element like not affect others
like not push them
like for example i have a border element
position: absolute; (or fixed)
i want that to not move others
umm like normally its normal ofc
but i added a 3px border
and it pushed the text and icon off to the side
how can i move it back
while keeping the border?
does anyone know how to fetch any api without adding node_module in?
those two have nothing to do with each other
because I install node-fetch for fetching
then it install node_module in
I just removed it
yes thats what its supposed to do
how do you fetch this without any problem? I'm sorry--
node_modules is automatically created if you have a package.json
you dont add node_modules yourself
you let the system create it automatically
in heroku, not in github
When you add your first package*
im using an await on a function and its coming back as undefined and when I log the points its sending them back after it processes the rest
the await keyword waits for the full promise chain to complete and returns the last value
in your case, it returns the value that .then() returns
your .then() returns nothing
I see, how can I go about waiting for the true false return
return it at the end of the .then()
you're returning console.log, which doesnt return anything
return data instead
im not completely understanding what you are saying
your async function doesn't return anything though
how is it returning console.log
fek off wid yer ts bullshite :^)

o nvm i was reading the wrong function
i thought you wanted to return a result in the await line to a variable
your function has callbacks, you need to promisify them
i know i'm saying like the opposite of what tim is saying, but your cacheckr function returns undefined, so data from the resolved promise in your if statement is gonna always be undefined
@quartz kindle 
how can i move an element without affecting other elements? html
if you dislike helping tools, at that point might aswell downgrade to nodepad.exe 
it's all fun and games until you start scrolling horizontally
option 1: client.sql.query = util.promisify(db.sql.query)
option 2: return new Promise(resolve => { client.sql.query(... result => { resolve(result) }) })
if(option === "{user.username}") msg = `${user.username}s-ticket`; if(option === "${count}") msg = `${count}`; let channel = await reaction.message.guild.channels.create(`${msg}` { (node:14456) UnhandledPromiseRejectionWarning: ReferenceError: msg is not defined how would i define msg in this case?
yes
@quartz kindle do I'd do it like this? https://cdn.yxridev.com/u/4tHfq2O8.png
isnt it bad to return false or a promise?
msg isn't defined if option is not either "{user.username}" or "${count}"
ah
yes
you'll want to resolve or reject also on error
else it will get stuck forever
oh?
can anyone explain how the :target works
the css selector?
you can use :active for that
I think you should use JS for that
:active only works when it's held down I think
Yeah that's a JS thing
css doesnt have a concept of "clicks", it does have a concept of "selected", aka when your mouse clicks an input field, it becomes in "active" state as you are interacting with it
or when you click an url, it remembers you clicked on it
it should be fine tho
Use JS onclick
kind of offtopic but ontopic, i saw this yesterday and thought people would be interested, just shows the power of css flexbox https://www.youtube.com/watch?v=fuiEYR6Hoe0
Long thought impossible, Heydon Pickering has found a way to replicate the idea of container queries using a cool CSS trick / hack using a clever combination of flex-wrap, flex-basis, and flex-grow. It's a really powerful trick.
We'll still need media queries for stuff, but this could prove to be really, really handy!
Heydon's original article...
hey Paimon was helping me before on using ffmpeg without root access. is it possible someone could help me do it for Opus
This is the command I'm trying to do but it pings the user. How do I make it to where it doesn't ping them?
message.react("โ๏ธ");
if(message.channel.id == "783698506602905632") { //if message sent is in guild 1 then send in guild 2
client.channels.cache.get("783696563389595729").send(embed); //guild 2
}
if(message.channel.id == '783696563389595729') { //if message sent is in guild 2 then send in guild 1
client.channels.cache.get('783698506602905632').send(embed); //guild 1
Can someone help pls i'm triing to make the bot so it reacts to the messages in 2 specific channels (i'm making a bot to chat in between 2 servers)
Just remove the part where it mentions them
but it reacts at all the messages (everywhere)
I did and I think it still pings them.
use send instead of reply
Can't with the app I'm using.
You're calling message.react() outside of the if conditions
message.react("โ๏ธ");
if(message.channel.id == "783698506602905632") { //if message sent is in guild 1 then send in guild 2
client.channels.cache.get("783696563389595729").send(embed); //guild 2
}
if(message.channel.id == '783696563389595729') { //if message sent is in guild 2 then send in guild 1
client.channels.cache.get('783698506602905632').send(embed); //guild 1
sry like that
then you cant
Also, I tested this command and it didn't clear any messages. What am I doing wrong?
whats the embed links permission do?
Like I said, message.react() is outside the if conditions
so I don't wanna query my database too often right? Like not when every message sent, so what am I supposed to do again?
thx i'm really dumb
don't say that ;-;
bruh its more harder to code in this weird thing than in python
How do I make a website for my bot for a dashboard?
How does a reload command work??
Depends on what your "reload" command is supposed to do.
Physically reloading your gun doesnโt work, unfortunately.
reload all the commands and restart the bot
without restarting manually the bot
You should use a program manager or start the bot as service and use process.exit() (for node)
Which would cause a restart
You canโt end a process and internally telling it to restart
ok
But you could start a new instance (process) in node and terminate the current one. That should work, too.
let option = bot.db.get(`ticketname_${message.guild.id}`)```
```(node:1300) UnhandledPromiseRejectionWarning: ReferenceError: Cannot access 'message' before initialization``` why does this error?
can you show the stacktrace
I don't believe the error is coming from that snippet of code
what do you want exactly?
when you click on the error it goes to the message.guild part
In the error that got printed to your console, it shows what files the error originated from. I don't see why it would originate from that block of code you shared because it looks correct (run: async (...) => {...}).
it's more than likely occuring at where you want to pass in the message
not where you're consuming it
Can someone tell me how I do this? https://top.gg/bot/575252669443211264
I want that my Logo does fly as well
do what
Can anyone tell me how to change the case sensitive by putting the command working anyway (discord.js)?
Do make the Logo bounce up
how to make your commands case insensitive?
yes
use toLowerCase to transform the string
Thanks
Do arrow expressions allow the syntax to use async(...) instead of async (...)
I mean async is not the function
but when you console log the id it works but not on the database code?
oh my fucking god
Could someone answer my question pls....
i think it generally does not matter, i'll test it in a second
It does have a difference, but I think it matters with the usage of this
Most people just use async run(...) {...}
does it make a different doing it?
like performance or anything just switching the two?
-_-
I mean the general JS syntax is async function(...) not asyncfunction(...) <โ which would be the functions name
Just use a whitespace between async and the function and test it
run: async (bot, message...
the whitespace does not matter
^
Alright weird syntax then but ok, JS ...
does anyone want my piece of python code i use to generate help messages that im really proud of
no
:(
One message removed from a suspended account.
yes
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
๐
One message removed from a suspended account.
One message removed from a suspended account.
let option = bot.db.get(`ticketname_${reaction.message.guild.id}`) if(option === null) msg = `${user.username}s-ticket`; let count = bot.db.get(`ticketnumber`) if(option === "{user.username}") msg = `${user.username}s-ticket`; if(option === "{number}") msg = `${count}-ticket`; let channel = await reaction.message.guild.channels.create(`${msg}`, { (node:18204) UnhandledPromiseRejectionWarning: ReferenceError: msg is not defined why does this error? someone told me to reaplce === to = and it worked earlier but now it breaking
"Error: 429 Too Many Requests"
have anything I can do to fix it?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i mean whats the code..
how?
this error is happening in the dbl api
One message removed from a suspended account.
then go to #topgg-api
this is a horrible way to do stuff like that
like, actually bad
you're doing so many database calls
why not store it in memory?
https://cdn.discordapp.com/attachments/272764566411149314/783811720740864010/unknown.png
3 db calls in 5 lines
hey y'all, I have a quick terrible question, anyone know how to write a code so that the bot recognize when I mention myself. I'm writing the slap command from discord.js, if I slap myself it will return saying why slap myself
if (message.mentions.users.first().id === message.author.id) //should be working I think```
:)

?
wdm
wdym
So I just started to create my bot and the website in #502193464054644737 tells me to install discord.js. It says to shift+right click to open the CLI. When I shift+right click it, it brings up the menu and the only thing related to what they are talking about is the PowerShell thing. I click it and type in the npm init -y and it says invalid. Is that because I need to use a flash drive or somethings?
I think I did something wrong, I'm going to try somthing else.
I have a little incomprehensible problem
function(err, res) {
if(err) console.log(err)
if(res == undefined)return message.channel.send('ok')
else {
let videos = res.videos.slice(0, 1)
let embed = new MessageEmbed()
.setTitle(videos[0].title)
.setImage(videos[0].image)
.setColor('#E1B27B')
.setTimestamp()
.setFooter("ยฉ " + bot.user.username, bot.user.displayAvatarURL({dynamic:true}))
return message.channel.send({ embed : embed })
}
}```
```TypeError: Cannot read property 'image' of undefined```
Why is there a callback
I explain, I made a search so that he answers me undefined and he answered me undefined because the message was sent but why does he execute the else ??
are you sure the error is from there and not from a different code?
just that can come from here: /
you'll need to show more code
where is that function called from? could it be called multiple times?
I just turned off my computer, I'm French and it's quite late I'll look tomorrow thank you for your help
Curious, are we allowed to use js on the bot pages yet? or is that still limited to certified bots?
Also, the name of a server my bot is associated with on the communities is incorrect. I presume this is based on caching issues and nothing that can be sorted from top.gg's side?
Certification is planned to be removed in any case, so pretty much no JS.
that's unfortunate, oh well.
A good guess. Try waiting a few hours
force the client to load a wasm binary
I did see a non-certified bot using js functions on their webpage, which is what brought me to this question
:wesmart:
case `${tick}`: dosent work with custom emojis? const tick = client.emojis.cache.get("783516788985167892");
I can only presume you're talking to Astrah, so I'll await information from a mod for my curiosity
Nope, I was talking to you ๐
oh, interesting!
683462722368700526
starting to believe I'm in the wrong though.
Well, I'm very undetermined to confirm that so mention/DM a moderator for this
Bed is stronger than curiosity

So on my ready event I decided that I will query an table and then I will store that table in an object i will then export it to the file i wanna use and then use that instead of querying the db so often
is this a good idea or bad idea or wtf are you doing
No clue
ty man ๐
Hello
How would I have a bot dm a specific person. Or rather, what would I set user to? For user.send()
Not a mention.members,first() but rather only dm me.
How would I set that exactly? I just donโt understand how to get a specific person
Oh ok thank you!
You can also use users.fetch too
If theres value in cache it will get the value from cache instead
If not it will fetch the user and put it in cache
You can also force fetch which fetch anyways
i have partials "Message" "User" "Guild_Member" and "Reaction" enabled, and on a RoleUpdate event i am receiving a role which is marked as partial. I thought roles were not eligible for partials and were always cached? also which of the partial categories are they under??
discord.js
why does this not work?
channel2 = ctx.guild.get_channel(channel)
if channel2:``` channel var is a channel id
got it thanks
Bruh
the people @ discordbotlistthatthe#developmentchannelisbetterthandbls.notaactualdomain/botlist helped me
huh
roles are cached but i think they mark the new role differently than the old one
yeah, figured out how to test for it
Is it possible someone could help me instal opus without root perms? Its very hard as there isnt a precompiled version of it on the internet
well there are precompiled versions
you just gotta use your os' package manager to install it
how come you don't have access to root
if (message.content === '.help')
How would I add the prefix and then help
insted of .help as content
I have prefix defined in the code btw
string concatenation
wut?
if you don't know what it is, google it
I tried to do
if (prefix + message.content === '.help')
well that doesn't make sense now does it
lol
Yeah thats what I am doing right now but I want to separate it
but why
so I can change the prefix by editing one thing?
what the fuck
that's not
that's not going to do that
that's going to add your prefix to any message
so a message containing just help
will turn into .help
and will execute a command
or do you mean if ( message.content === `${prefix} + help`)
why the plus
without plus?
yes, but stop mashing random things together hoping it works





)







