#development

1 messages ยท Page 1426 of 1

young flame
#

hM

latent cave
#

Ok

summer acorn
#

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
latent cave
#

That's all?

earnest phoenix
#

@summer acorn what are you trying to do?

latent cave
#

@earnest phoenix ^

summer acorn
#

I am trying to purge embeds whilst also purging messages containing embeds from for example sending the google url

earnest phoenix
#

@latent cave Yes

#

ah

summer acorn
#

although, most others here aren't

pale vessel
#

Have you tried message.embeds[0]

summer acorn
#

I tried just message.embeds, it returned undefined

#

so message.embed[0] would return an error

pale vessel
#

Hmm

earnest phoenix
#

aprixia

#

Those embeds only form after awhile

summer acorn
#

wait I just realized

pale vessel
#

That's fine

summer acorn
#

I forgot the s

pale vessel
summer acorn
#

ok just me being stupid I guess

earnest phoenix
#

aprxiIA

summer acorn
#

or blind would be more correct

#

hi hayper

young flame
#

hi aprixia

summer acorn
#

hi moon

earnest phoenix
#

anyways

summer acorn
#

ok this is not the channel for greeting, so let's do that in #general before a mod comes in

earnest phoenix
#

aprixia please helo this marine guy

#

i ran out of patient helping him

south aspen
#

what is the function of vps?

latent cave
#

When I say !update is shows the results after 10 mins ๐Ÿ˜‚

#

it*

summer acorn
#

cache probably

latent cave
#

Is there a way to fix that?

summer acorn
#

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

ionic dawn
latent cave
#

I donnu nothing from scripting

summer acorn
#

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

earnest phoenix
summer acorn
#

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

young flame
latent cave
#

@earnest phoenix Tank u btw it's working rlly gud now

#

hmm

earnest phoenix
#

Wait a fucking minute moon

young flame
#

yeah

earnest phoenix
#

Why are you creating another message collector inside one another

summer acorn
#

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

young flame
#

i did?

earnest phoenix
#

Show your code again

earnest phoenix
young flame
earnest phoenix
#

Bruh

young flame
#

hmmm?

earnest phoenix
#

awaitMessages inside a collector

young flame
#

O

#

where else would i put it

earnest phoenix
#

Nowhere

summer acorn
#

I mean to be fair, if code were to be written in English, my ping command would already be an essay kekw

young flame
#

but how would they enable the server warnings?

earnest phoenix
#

Umm, the collector i showed you already gets the role? Or what else are you trying to do

young flame
#

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

earnest phoenix
#

Explodes

young flame
#

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

earnest phoenix
#

I'm so confused, so you're trying to collect 2 different responses?

young flame
#

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'

latent cave
#

is it ok if I add 2 scripts in 1 folder?

young flame
#

@earnest phoenix so my idea is

earnest phoenix
#

Literally, put questions and outputs of their embed style in an array as all being an object and iterate through every question

young flame
#

once they type setup

#

it is like

#

wanna setup mute role whitelist roles or server warns

latent cave
#

@earnest phoenix Is it ok if I add another script to the bot folder?

young flame
#

then once they choose one it does the setup for that

#

big brain

earnest phoenix
earnest phoenix
latent cave
#

It's a small script for !userinfo

earnest phoenix
#

A new file isn't needed if all of your commands are inside a single file

latent cave
#

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?

earnest phoenix
#

It can't be broken because the new file will not even be used

latent cave
#

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

earnest phoenix
#

I can guide you how to make it but not gonna hold your hand entire through it (Means spoon-feeding)

latent cave
#

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

late kraken
#

i have amazing bot idea

latent cave
#

What is it

rustic nova
#

sure, tell it peek

earnest phoenix
late kraken
#

a bot and a mod does !give @fair rover (badge name) and the members can do !badges to see what they have achieved

rustic nova
#

cool, get started then with https://discord.js.org

latent cave
#

@rustic nova wsp

late kraken
#

oh damn i can make my own bot!!!!

delicate shore
#

Should I create 3000 Accounts with Name PGamerX and use the one with 9999 tag ?

late kraken
#

ye i carnt do that haha toooo complicated

delicate shore
#

You can

late kraken
#

na my technolagy skillly are no where near that level i can just about use them lol

delicate shore
#

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

late kraken
#

you made any bots i would know of ???

delicate shore
#

I made 3 bots but I doubt you know them

late kraken
#

oh can i see em

delicate shore
#

Yea sure , let's go dm

late kraken
#

kk

restive furnace
#

blame the 3rd module ur using

silent cloud
#

So...

#

What i can do with that

restive furnace
#

fix it by not using the module

earnest phoenix
#

no errors in console

#

dblapi is defined correctly

#

does anyone know canvas?

pale vessel
#

Just ask

earnest phoenix
#
- (node:17965) UnhandledPromiseRejectionWarning: TypeError: The first argument must be an object
pale vessel
#

Load the image first

#

await Canvas.loadImage(url);

earnest phoenix
pale vessel
#

Also, it's format not type

earnest phoenix
#
- (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.```
pale vessel
#

Because it's in webp

earnest phoenix
#

Not work's tho..

#

now image get's error

earnest phoenix
rustic nova
#

add a debug line

#

make sure to change the url in your bot settings

earnest phoenix
earnest phoenix
pale vessel
#

Use ctx.save(), ctx.arc(), ctx.clip(), and ctx.restore()

#

Isn't that your token?

mint tundra
#

can i get stuff on the best server on the server mineland??

shy turret
#

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

Discord Developer Portal

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
#

hey

#

how can i get stuff on mineland

twilit geode
#

@mint tundra dont ask for stuff

mint tundra
#

why

#

'

twilit geode
#

go to mineland for that, this is top.gg

mint tundra
#

ohh i dont know link

#

๐Ÿ˜ฆ

twilit geode
#

neither do we!

mint tundra
#

ok

shy turret
earnest phoenix
#

@twilit geode you got the warn?

twilit geode
#

yea yea

#

i got it

earnest phoenix
#

okey good

twilit geode
#

ill reset it

earnest phoenix
#

sure but dont forget it

twilit geode
#

but actually

#

how did you get it to work ๐Ÿ˜ฆ

#

would that not be the webhook link top.gg wants?

earnest phoenix
#

noo

twilit geode
#

h a l p

shy turret
#

'Content-Type': 'application/json', didnt do anything

pale vessel
#

It's not bearer, it's Bot

fallow agate
#

hi

shy turret
#

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

pale vessel
#

Content-Type should be in headers

shy turret
#

im being smart ahh i didnt see it was in the body, thanks

pale vessel
#

and you don't need body

#

What is that access token

#

It's just an API request

shy turret
#

it works thanks

#

access token is from oauth2

pale vessel
#

Oh, you're adding a member

earnest phoenix
#

If my bot declines can i add it again??

pale vessel
#

What

#

That's high resolution

earnest phoenix
#

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

earnest phoenix
#

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

pale vessel
#

I use that too but I set it to low res since I don't need to make it big

#

excuse the dead bot

pale vessel
#

Why?

earnest phoenix
#

i think i should increase the font size a bit

earnest phoenix
pale vessel
#

Then increase the font size, not the graph res

earnest phoenix
earnest phoenix
#

working, thanks for help ๐ŸŒ

young flame
#

@earnest phoenix it no worK

#

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"

silent cloud
#

Yo guys

#

Whats wrong

#

constructor(options) {
let hasConfigurations = 'configurations' in options;

#

Why it type about "in" undefined

young flame
#

because you dont specify it that way

#

but i'm not sure how you would fix it since i dont use construtions

#

ยฏ_(ใƒ„)_/ยฏ

silent cloud
#

Thats in tesseract module

#

Thats code OF TESSERACT

#

I need it to sharding, bcs i dont understand other (i dont know them lol)

earnest phoenix
#

Is here someone who used Dory/node.js app on android to host his discord bot?

young flame
#

most likely not

hoary void
#

who here uses my bot discord bot maker ??

young flame
coarse topaz
#

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
earnest phoenix
#

@earnest phoenix umm why are you doing substring(5) if you want to start from 3nd character

#

so what do i do substring(3) ?

carmine summit
#

drunk

earnest phoenix
#

?

#

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

earnest phoenix
#

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)

#

?

earnest phoenix
#

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

gleaming fulcrum
#

hi guys do i need to install chocolatey for discord.py or not

earnest phoenix
#
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

earnest phoenix
#

@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

gleaming fulcrum
#

i'm working in js today

#

not in python

earnest phoenix
#

but you said discord.py???

gleaming fulcrum
#

ah yeah sry

#

discord.js

earnest phoenix
#

you don't need chocolatey for that

gleaming fulcrum
#

my mistake sry

earnest phoenix
#

lol

livid lichen
#

MemeMessage.react("โœ…")
MemeMessage.react("โŽ") ``` `MemeMessage.react is not a function`
#

Anyone know how to fix this?

earnest phoenix
#

you're missing await

livid lichen
#

Oh. Thanks.

earnest phoenix
#

message.reply returns a Promise

earnest phoenix
#

For me not

#

Because i always get syntax error: unexpected token )

faint prism
earnest phoenix
#

was it Client#setActivity or smth else?

#

nevermind it's ClientUser#setActivity

silent cloud
#

Yo guys

#

Why i have NaNms?

earnest phoenix
quartz kindle
#

so it has no ping

silent cloud
#

Ohhhh

silent cloud
#

I dont understand what it is xd im bad in English

earnest phoenix
#

arc is epic'

silent cloud
#

So many info

#

NOOOOO MY NITRO WILL BE GONE TODAY

#

So

earnest phoenix
#

why when i do <Collection>.find({}) in mongodb dont return the documents?

lunar sequoia
earnest phoenix
earnest phoenix
lunar sequoia
#

Yes, that would be correct.

silent cloud
#

Ok, lets try

#

Yeah, thats work

#

Ty

cinder sandal
#

my bot's prefix is t_
but t+ works too
how

#

i didn't put t+ in the .env

silent cloud
#

Give your .env code

#

You can delete token

#

You SHOULD

quartz kindle
cinder sandal
lunar sequoia
#

How are you slicing the command? Show that part of code as well.

quartz kindle
#

^ show the code that checks for prefix

cinder sandal
quartz kindle
#

you dont have any code that checks for prefix

#

all you do is remove the length of the prefix from the message

lusty isle
#

Hi?

lunar sequoia
#

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.

cinder sandal
#

atually any symbol after t works

quartz kindle
#

any 2 letter sequence will work

#

your code is checking for anything that is the same length as your prefix

cinder sandal
#

so

#

what line should i remove

quartz kindle
#

you dont need to remove anything

#

you need to add a line that checks if the message starts with the prefix

dusky sundial
#

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

cinder sandal
#

i already thinked about that

#

let's try

#

it fixed it

#

ty @quartz kindle

quartz kindle
#

๐Ÿ‘

cunning breach
#

Yo, any good and cheap hosts?

rustic nova
cunning breach
#

thx

hollow sedge
#

digital ocean is one of the best for $5 a month

#

Look at that though

cunning breach
#

can't use them lol

earnest phoenix
#

I finished my bot

#

๐Ÿฅณ

#

I work a lot

earnest phoenix
#

i use and is very good

#

no

cunning breach
#

Glitch?

earnest phoenix
cunning breach
#

so?

earnest phoenix
#

discloud

cunning breach
#

Wait, can i use mysql on heroku?

cinder sandal
#

you cant

cunning breach
#

oof

cinder sandal
earnest phoenix
#

is not

cinder sandal
#

ohh it has english

earnest phoenix
#

the had a sv

#

yes

cinder sandal
#

thank god

cunning breach
#

It wants to join servers for me

earnest phoenix
#

i like

#

now my bot is on 24/7

#

i am happy

cinder sandal
#

noqw your account is hacked:))

#

you gib perms to them to control your server list

cunning breach
#

ok lol

cinder sandal
earnest phoenix
#

they are goood guys

rustic nova
uncut river
#

someone know how to get the little triangle after tags transparent for css?

#

.a:after doesn't seem to work

rustic nova
#

uno momento

#

I'll tell you the selectors in a second

uncut river
#

i'm using this extension called Live editor for CSS

rustic nova
#

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

uncut river
#

doesn't appear in the preview but i'll submit and test

#
.atag::after {
  right: -10px;
}```
#

o wait

#

i forgot the -

#

one second lmao

rustic nova
#

set it to 0px

jaunty surge
#

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
uncut river
#

it moved the triangle into the button

#

trying to figure out the color property of it

jaunty surge
#

goodbyechannel is the ID of the channel

rustic nova
#

then set it to none maybe

#

wait no thats not how css works

rustic nova
#

border-left: 10px solid var(--accent-secondary);

uncut river
#

perfect!

#

thank you

#

is there a way to edit the dot?

rustic nova
uncut river
#

i think i want it more bold

#

or darker

rustic nova
#

one moment

uncut river
#

thank you :)

rustic nova
#

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

#

change it to like 6px

uncut river
#

alrighty thank you

livid lichen
#

Message.member.addRole(FindRole).catch(console.error)

#

Why doesn't this work?

rustic nova
#

what exactly doesn't work?

#

what's the error

pale vessel
#

that's some old code

livid lichen
#

Unhandled rejection error! TypeError: Message.member.addRole is not a function

pale vessel
#

well yeah

#

it's roles.add() now

livid lichen
#

ah

#

Thanks!

pale vessel
#

read docs next time

#

They're really helpful

livid lichen
#

Message.member.roles.add(FindRole)

#

Right?

pale vessel
#

properties are case sensitive

devout frost
#

roles lowercase, then yes.

livid lichen
#

oops-

#

Thanks!!

devout frost
livid lichen
#

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.

indigo flax
#

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)

  }```
earnest phoenix
#

i don't know, what is wrong with that command?

#

it's your code

boreal forum
#

Error?

earnest phoenix
pseudo wadi
#

(node:27160) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ping' of undefined < Im getting this error but it has worked for me before

earnest phoenix
#

your code please?

pseudo wadi
#

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

molten yarrow
#

client is not defined

earnest phoenix
pseudo wadi
#

hm?

earnest phoenix
#

try to check what client.ws will return

pseudo wadi
#

without ping

earnest phoenix
#

yeah

molten yarrow
#

can u show your command handler?

pseudo wadi
earnest phoenix
#

no

pseudo wadi
#

?

earnest phoenix
pseudo wadi
molten yarrow
#
execute(message, client)

normally its (client, message, args) but depends how u setup your handler

pseudo wadi
molten yarrow
#

yeah its

command.execute(message, args, client)
#

change the execute function in your command aswell to match it up

earnest phoenix
#

hah

pseudo wadi
#

oh yh so i have to type it in the execute no matter what

molten yarrow
#

yeah

earnest phoenix
#

its matter

#

as BlackLives, xD (sorry, dont ban me for that plesase XDXD)

pseudo wadi
earnest phoenix
drifting wedge
#

html

umbral zealot
#

border-left: 5px solid green; then adjust the color and thickness to your liking

drifting wedge
#

like on hover or on taget or someting

drifting wedge
#

thanks

umbral zealot
#

^_^

#

it's selector:hover for hover if oyu want that. like, .menu:hover { blah } I think

#

haven't done CSS in a long time

drifting wedge
#

thanks

umbral zealot
#

๐Ÿ‘

drifting wedge
#

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?

floral creek
#

I get this error
Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group'
When I use googletrans

sullen yarrow
#

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?

quartz kindle
#

what is a nevel command?

opal plank
#

probably a poor fella who heard the term eval

sullen yarrow
#

like the people on my server keep evolving and gaining evolution roles and my bot sends messages on the level channel, understand?

opal plank
#

like mee6?

quartz kindle
#

so level, not nevel

#

lol

floral creek
#

o yes

opal plank
#

close enough lmao

floral creek
#

[p]rank

sullen yarrow
opal plank
#

you'd need a database first

#

to store user exp

sullen yarrow
#

just send the command kkk

stark abyss
opal plank
#

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

opal plank
#

a more detailed plan though

sullen yarrow
#

Send the command

quartz kindle
#

lol

molten yarrow
#

Erwin send him the command already... he's waiting.... xD

opal plank
#

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

stark abyss
#

lmao

sullen yarrow
#

q

quartz kindle
#

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

sullen yarrow
#

oh ye

#

this command

rustic nova
#

smh Tim spoonfeeding

stark abyss
opal plank
#
import easyDiscordLevelSystem from 'discord.js';

client.on(message => {
message.easyDiscordLevelSystem()
})```
sullen yarrow
#

this is the command?

opal plank
#

learn Js

stark abyss
#

yes

sullen yarrow
#

ok

#

thanks

opal plank
#

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

stark abyss
opal plank
stark abyss
#

i don't know coding

opal plank
stark abyss
opal plank
#

@ mods, they said it, clearly bad botum, remove role pliz

stark abyss
#

Nani

opal plank
#

@stark abyss

stark abyss
#

no thing exist

opal plank
#

good luck

stark abyss
#

you gotta code it man

#

not that easy unfortunately

#

it was meant to be a joke

sullen yarrow
#

I don't understand much about bots; -;

stark abyss
#

start by learning a language then?

sullen yarrow
#

I am brazilian

#

I'm using google translator

opal plank
#

so am i

#

so is tim

#

PROGRAMMING language

stark abyss
#

I am not sure how to respond

opal plank
#

like JAVASCRIPT

modest crane
sullen yarrow
#

goobbye

stark abyss
#

dam

#

now I feel bad

quartz kindle
#

lmao

opal plank
#

well p did say language though

#

blame p0

stark abyss
earnest phoenix
stark abyss
opal plank
earnest phoenix
#

;-;

#

?

opal plank
#

fuck it got deleted

#

goddamit

#

@earnest phoenix check THOSE bad boys

#

if you think that code is bad

quartz kindle
#

lmao

opal plank
#

LMAO

#

i didnt see that

#

well, its not a fake warning though

#

the content within clearly may cause brain dmg

earnest phoenix
obtuse jolt
#

whats the symbol for more than

molten yarrow
opal plank
leaden lake
#

How is it possible to do 2 wait_for at the same time ? I am doing a shifumi command bot (python language)

slender thistle
#

why

drifting shell
sudden geyser
#

all my homies use f-strings

cerulean ingot
drifting shell
cerulean ingot
#

its been failing all day

#

and ok

#

thank you

jaunty surge
#

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
pure lion
#

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
tight plinth
#

are you sure you're using the author field correctly @pure lion

rose warren
#

@pure lion you're not setting the name

tight plinth
#

wait lemme get the docs for ya

jaunty surge
#

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

pure lion
#

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

tight plinth
astral yoke
#

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

pure lion
#

Doesn't work

tight plinth
#

try to put a name

#

@astral yoke if (message===null) message="test"

hollow sedge
molten yarrow
astral yoke
#

same thing

#

null

jaunty surge
#

@hollow sedge for heroku itself?

astral yoke
#

wdym alina?

hollow sedge
rose warren
#

@astral yoke you're not setting the message variable

hollow sedge
#

look up what a package.json is

jaunty surge
#

it worked fine like couple of minutes ago but when I try to build it later it always fail

hollow sedge
#

did you require a new module?

jaunty surge
#

no, I have package.json

hollow sedge
#

oh

#

mb then

jaunty surge
#

how do you fix that?

astral yoke
#

@rose warren but changing the veriable still dosent do anything?

rose warren
#

@astral yoke but you're not changing it

quartz kindle
rose warren
#
if(message === null) message = "test";
#

@astral yoke

jaunty surge
#

@quartz kindle how do you check if I'm deploying node module

hollow sedge
#

Look in your repo?

jaunty surge
#

how do I get rid of it

quartz kindle
#

delete it from github

#

then redeploy

leaden lake
#

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)
hollow sedge
jaunty surge
#

@hollow sedge oh yes I have .gitignore

#

it's below that node_module

#

how do you also delete file from github

timber fractal
#

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?
quartz kindle
#

what is list?

#

and what is the error?

quartz kindle
jaunty surge
#

i don't know, I used node-fetch for fetching an api, but then i think they added node module after it

timber fractal
# quartz kindle and what is the error?
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

astral yoke
#

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?

eternal osprey
#

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

astral yoke
#

at once no not at possible

#

if you cant join multiple channels at once the bot cant join multiple cahnnels at once

timber fractal
#

@quartz kindle do u have a answer on my question

#

or anybody else here

eternal osprey
#

@astral yoke i mean like, there will be several people using that command

#

!join

#

so they are all in different voice channels.

astral yoke
#

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

eternal osprey
#

okay thanks!

drifting wedge
#

how can i make my html element like not affect others

#

like not push them

#

like for example i have a border element

boreal iron
#

position: absolute; (or fixed)

drifting wedge
#

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?

boreal iron
#

Guessing a div with 100% width

#

With 3px border?

drifting wedge
#

3px border in css style page

#

and width on html?

jaunty surge
#

does anyone know how to fetch any api without adding node_module in?

quartz kindle
#

those two have nothing to do with each other

jaunty surge
#

because I install node-fetch for fetching

#

then it install node_module in

#

I just removed it

quartz kindle
#

yes thats what its supposed to do

jaunty surge
quartz kindle
#

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

devout frost
#

When you add your first package*

obtuse jolt
#

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

quartz kindle
#

in your case, it returns the value that .then() returns

#

your .then() returns nothing

obtuse jolt
#

I see, how can I go about waiting for the true false return

quartz kindle
#

return it at the end of the .then()

#

you're returning console.log, which doesnt return anything

#

return data instead

obtuse jolt
#

im not completely understanding what you are saying

grizzled raven
#

your async function doesn't return anything though

quartz kindle
#

your .then() returns console.log

#

console.log returns undefined

opal plank
#

if only you had typescript to add :boolean in the end, it'd mark it down for you

obtuse jolt
#

how is it returning console.log

quartz kindle
#

fek off wid yer ts bullshite :^)

grizzled raven
quartz kindle
#

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

grizzled raven
#

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

opal plank
drifting wedge
#

how can i move an element without affecting other elements? html

opal plank
#

if you dislike helping tools, at that point might aswell downgrade to nodepad.exe mmulu

grizzled raven
#

it's all fun and games until you start scrolling horizontally

obtuse jolt
#

how exactly do i do this

quartz kindle
#

option 1: client.sql.query = util.promisify(db.sql.query)
option 2: return new Promise(resolve => { client.sql.query(... result => { resolve(result) }) })

obtuse jolt
astral yoke
#

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?

quartz kindle
obtuse jolt
opal plank
#

isnt it bad to return false or a promise?

tranquil drum
astral yoke
#

ah

quartz kindle
#

you'll want to resolve or reject also on error

#

else it will get stuck forever

obtuse jolt
#

oh?

drifting wedge
#

can anyone explain how the :target works

earnest phoenix
#

the css selector?

drifting wedge
#

yes

#

i want to like do something when the person like clicks it kinda

tranquil drum
#

you can use :active for that

hollow sedge
#

I think you should use JS for that

drifting wedge
#

doesnt work cuz when i click it it opens another menu

#

aka shows a div

hollow sedge
#

:active only works when it's held down I think

drifting wedge
#

so it :unselectes" it

#

yep

#

holding ownly

#

only

hollow sedge
#

Yeah that's a JS thing

quartz kindle
#

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

drifting wedge
#

it should be fine tho

hollow sedge
#

Use JS onclick

earnest phoenix
#

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...

โ–ถ Play video
#

hey Paimon was helping me before on using ffmpeg without root access. is it possible someone could help me do it for Opus

gleaming fulcrum
#
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)

tranquil drum
gleaming fulcrum
#

but it reacts at all the messages (everywhere)

earnest phoenix
quartz kindle
earnest phoenix
tranquil drum
gleaming fulcrum
#
    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

quartz kindle
earnest phoenix
#

whats the embed links permission do?

tranquil drum
stark abyss
#

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?

gleaming fulcrum
stark abyss
#

don't say that ;-;

graceful dock
earnest phoenix
#

How do I make a website for my bot for a dashboard?

gleaming fulcrum
#

How does a reload command work??

boreal iron
#

Depends on what your "reload" command is supposed to do.

#

Physically reloading your gun doesnโ€™t work, unfortunately.

gleaming fulcrum
#

reload all the commands and restart the bot

#

without restarting manually the bot

boreal iron
#

You should use a program manager or start the bot as service and use process.exit() (for node)

#

Which would cause a restart

gleaming fulcrum
#

ok

#

thks i'll try

boreal iron
#

You canโ€™t end a process and internally telling it to restart

gleaming fulcrum
#

ok

boreal iron
#

But you could start a new instance (process) in node and terminate the current one. That should work, too.

astral yoke
#
let option = bot.db.get(`ticketname_${message.guild.id}`)```
```(node:1300) UnhandledPromiseRejectionWarning: ReferenceError: Cannot access 'message' before initialization``` why does this error?
sudden geyser
#

can you show the stacktrace

#

I don't believe the error is coming from that snippet of code

astral yoke
#

what do you want exactly?

#

when you click on the error it goes to the message.guild part

sudden geyser
#

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 (...) => {...}).

astral yoke
#

the other ones dont error but that one does

earnest phoenix
#

it's more than likely occuring at where you want to pass in the message

#

not where you're consuming it

weary socket
#

I want that my Logo does fly as well

earnest phoenix
#

do what

grave musk
#

Can anyone tell me how to change the case sensitive by putting the command working anyway (discord.js)?

weary socket
earnest phoenix
earnest phoenix
#

use toLowerCase to transform the string

grave musk
boreal iron
astral yoke
earnest phoenix
#

oh my fucking god

weary socket
#

Could someone answer my question pls....

earnest phoenix
sudden geyser
#

It does have a difference, but I think it matters with the usage of this

#

Most people just use async run(...) {...}

astral yoke
#

does it make a different doing it?

#

like performance or anything just switching the two?

weary socket
#

-_-

boreal iron
#

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...

sudden geyser
#

the whitespace does not matter

earnest phoenix
boreal iron
#

Alright weird syntax then but ok, JS ...

stone cradle
#

does anyone want my piece of python code i use to generate help messages that im really proud of

hollow sedge
#

no

stone cradle
#

:(

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

yes

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

๐Ÿ˜”

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral yoke
#

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

worn hatch
#

"Error: 429 Too Many Requests"
have anything I can do to fix it?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral yoke
#

i mean whats the code..

worn hatch
#

this error is happening in the dbl api

sage bobcat
#

One message removed from a suspended account.

astral yoke
opal plank
#

like, actually bad

#

you're doing so many database calls

#

why not store it in memory?

jaunty surge
#

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

old latch
#
if (message.mentions.users.first().id === message.author.id) //should be working I think```
jaunty surge
#

ohh .id I forgot about it

#

thank you, I will try

old latch
#

:)

slow dragon
prisma wren
#

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.

wicked pivot
#

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```
pure lion
#

Why is there a callback

wicked pivot
#

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 ??

quartz kindle
#

are you sure the error is from there and not from a different code?

wicked pivot
#

just that can come from here: /

quartz kindle
#

you'll need to show more code

#

where is that function called from? could it be called multiple times?

wicked pivot
#

I just turned off my computer, I'm French and it's quite late I'll look tomorrow thank you for your help

quick flame
#

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?

slender thistle
quick flame
slender thistle
earnest phoenix
#

force the client to load a wasm binary

quick flame
#

I did see a non-certified bot using js functions on their webpage, which is what brought me to this question

earnest phoenix
#

:wesmart:

fierce ether
#

case `${tick}`: dosent work with custom emojis? const tick = client.emojis.cache.get("783516788985167892");

slender thistle
#

Interesting

#

You got the bot's ID handy?

quick flame
#

I can only presume you're talking to Astrah, so I'll await information from a mod for my curiosity

slender thistle
#

Nope, I was talking to you ๐Ÿ˜‚

quick flame
#

oh, interesting!

quick flame
#

starting to believe I'm in the wrong though.

slender thistle
#

Well, I'm very undetermined to confirm that so mention/DM a moderator for this

#

Bed is stronger than curiosity

quick flame
#

hahaha, same :D

#

Thanks nonetheless!

slender thistle
stark abyss
#

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

green kestrel
#

decided on a new nickname for christmas

#

๐Ÿ˜„

stark abyss
#

can someone just confirm that ^^

pseudo wadi
#

eyy bck wit a new error

#

Pc just crashed noice

stark abyss
#

ty man ๐Ÿ˜”

scarlet arrow
#

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.

earnest phoenix
#

You get the user from cache

#

then use that user you got from cache

scarlet arrow
#

How would I set that exactly? I just donโ€™t understand how to get a specific person

earnest phoenix
scarlet arrow
#

Oh ok thank you!

earnest phoenix
#

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

timid blade
#

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

drifting wedge
#

why does this not work?

channel2 = ctx.guild.get_channel(channel)
            if channel2:``` channel var is a channel id
#

got it thanks

pale vessel
#

Bruh

drifting wedge
#

the people @ discordbotlistthatthe#developmentchannelisbetterthandbls.notaactualdomain/botlist helped me

zenith knoll
#

huh

zenith knoll
timid blade
#

yeah, figured out how to test for it

earnest phoenix
#

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

cursive forge
#

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

earnest phoenix
#

string concatenation

cursive forge
#

wut?

earnest phoenix
#

if you don't know what it is, google it

cursive forge
#

I tried to do
if (prefix + message.content === '.help')

earnest phoenix
#

well that doesn't make sense now does it

cursive forge
#

lol

earnest phoenix
#

oh wait

#

what do you want to do

#

add the prefix to the content ๐Ÿค”

#

?

cursive forge
#

Yeah thats what I am doing right now but I want to separate it

earnest phoenix
#

but why

cursive forge
#

so I can change the prefix by editing one thing?

earnest phoenix
#

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

cursive forge
#

or do you mean if ( message.content === `${prefix} + help`)

earnest phoenix
#

why the plus

cursive forge
#

without plus?

earnest phoenix
#

yes, but stop mashing random things together hoping it works