#development

1 messages · Page 1776 of 1

wide wharf
#

Oooo I have made my own error logger thingy

earnest phoenix
#

I prefer not handling my errors leaves me surprises along the way

#

:)

wide wharf
#

I am starting to understand this shit

#

@quartz kindle Placed correctly?

earnest phoenix
#

depends on what message is

#

message.send doesn't exist I don't think

wide wharf
#

the command

earnest phoenix
#

and also you can't send empty content

wide wharf
earnest phoenix
#

That in itself would lead to an api error

wide wharf
#

bot will send hello

earnest phoenix
#

🤔

#

That in itself should error though

wide wharf
#

At least I don't think it does

earnest phoenix
#

It should

#

message.send isn't a thing

#

and even if it was sending nothing will cause an api error as well

wide wharf
#

v12 Discord.js

earnest phoenix
#

yea

wide wharf
#

mk

earnest phoenix
#

message.send isn't a thing

wide wharf
earnest phoenix
#

Those are all the methods of message

#

and send isn't one of em

wide wharf
#

@earnest phoenix Tim's error catching - or idk how to call it - code includes message.send too

earnest phoenix
#

I don't know the entire context

wide wharf
#

^^

earnest phoenix
#

message may not even be what I think

wide wharf
#
  if(command === "say") {
    // makes the bot say something and delete the message. As an example, it's open to anyone to use. 
    // To get the "message" itself we join the `args` back into a string with spaces: 
    const sayMessage = args.join(" ");
    // Then we delete the command message (sneaky, right?). The catch just ignores the error with a cute smiley thing.
    message.delete().catch(O_o=>{}); 
    // And we get the bot to say the thing:
    message.send().catch(console.log)
    message.channel.send(sayMessage);
  }
earnest phoenix
#

yea that shouldn't be working

wide wharf
#

It starts with this client.on("message", async message => {

earnest phoenix
#

message.send doesn't exist

quartz kindle
#

do you have a try catch somewhere ?

wide wharf
earnest phoenix
#

try/catch block

quartz kindle
#

if not then that should crash the bot

wide wharf
quartz kindle
#

are you sure you saved it?

earnest phoenix
#

you'd wanna catch the message.channel.send(saymessage)

wide wharf
quartz kindle
#

lol

earnest phoenix
#

cause message.send isn't a thing on the message object

wide wharf
#

I haven't saved the error catching thingy yet

quartz kindle
#

message.send() will crash your bot

#

because it doesnt exist

#

its message.channel.send()

earnest phoenix
#

which is what I have been saying cough cough

wide wharf
#

!say works for me

earnest phoenix
#

Idk why it takes coming from tim to convince them smh

quartz kindle
#

i doubt it

wide wharf
#

I can show you (screenshot or link in DM)?

earnest phoenix
#

I highly doubt that ever worked

wide wharf
earnest phoenix
#

Again I doubt

wide wharf
#

Wait can I send invite link in DM?

earnest phoenix
#

message.send legit doesn't work my man

wide wharf
#

to show you

earnest phoenix
#

you have to access the channel first

wide wharf
#

But why does it work then topggSob

brazen helm
#

Is there anyone who can help with an issue?

wide wharf
#

lol

wide wharf
#

lolz

earnest phoenix
#

I call everyone a man until proven otherwise

brazen helm
#

türkmüsün ismail

wide wharf
lavish bramble
#

How can I make fetch all channels command

brazen helm
#

Your name is Turkish

wide wharf
wide wharf
earnest phoenix
#

you wanna get all the channels in a guild? @lavish bramble

wide wharf
brazen helm
#

, when you add my bot to a server, it gives this error, but it seems there is nothing wrong, it still continues to work, there is no problem, but what is the reason for giving this error?

earnest phoenix
#

No idea

brazen helm
earnest phoenix
#

whatever is before id is null

wide wharf
earnest phoenix
#

line 215 of main.js please

lavish bramble
earnest phoenix
#

What?

brazen helm
#

let reklamkoruma = await db.fetch(reklamk_${message.guild.id});

earnest phoenix
#

message.guild is undefined

#

How are you using this @brazen helm

#

in a message event?

quartz kindle
wide wharf
#

(without token duh)

brazen helm
#

how to fix this error

earnest phoenix
#

Are you using that line of code in a message event

#

cause message.guild is undefined

brazen helm
#

No Security Command Blocks Ads

wide wharf
#

@quartz kindle Sent in DM

#

My whole script

earnest phoenix
#

just send the code here..

wide wharf
earnest phoenix
#

use a bin

#

smh

earnest phoenix
earnest phoenix
quartz kindle
earnest phoenix
#

guild is undefined dude

#

check guild

wide wharf
brazen helm
#

Okey

#

okey

#

thanks

wide wharf
#

@quartz kindle Yup it's running

#
(node:26) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message
    at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
    at async MessageManager.delete (/home/container/node_modules/discord.js/src/managers/MessageManager.js:126:5)
    at async Client.<anonymous> (/home/container/index.js:134:36)
(node:26) 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:26) [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.
container@pterodactyl~ Server marked as stopping...
container@pterodactyl~ Server marked as offline...
``` oops?
lyric mountain
#

you're fetching an inexistent message

#

either the id is wrong or the message was deleted

earnest phoenix
#

Well

quartz kindle
#

which command caused that?

wide wharf
wide wharf
earnest phoenix
#

What command did yo uuse

quartz kindle
#

which command did you run

#

lol

wide wharf
#

I just started the bot

earnest phoenix
wide wharf
#

and after a moment

quartz kindle
#

you didnt test the say command?

wide wharf
quartz kindle
#

werent you supposed to test it?

wide wharf
wide wharf
earnest phoenix
#

Did anyone send a message after it started could be something in the message event

lyric mountain
#

that error appeared because you're supposed to catch all promises

wide wharf
earnest phoenix
#

or it could be what kuuhaku said

pale vessel
#

@quartz kindle is there a point awaiting a promise like channel.send().catch(() => null);

wide wharf
#

The bot's running again btw

pale vessel
#

It's basically void isn't it

earnest phoenix
#

yea

lyric mountain
#

I only imagine the chaos that'll ensue when JS codes start to crash because of uncatched promises futurely

#

imagine the feel...

wide wharf
#

OOPS the say command doesn't work anymore

#

It deleted my message

#

and then doesn't do anything anymore

earnest phoenix
#

I wonder why

wide wharf
#
(node:25) UnhandledPromiseRejectionWarning: TypeError: message.send is not a function
    at Client.<anonymous> (/home/container/index.js:60:13)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:834:20)
(node:25) 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:25) [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.
wide wharf
earnest phoenix
#

cough cough

wide wharf
#

message.send

wide wharf
brazen helm
#

message.channel.send

wide wharf
earnest phoenix
#

You don't gotta ping me in every message

wide wharf
#

But then I have to disable ping every time

#

:/

earnest phoenix
#

or just not reply

wide wharf
#

brb

earnest phoenix
#

and talk like a normal person

wide wharf
#

but there could be multiple persons talking here about different things

lyric mountain
#

catch ur promises

earnest phoenix
#

Doesn't mean you have to spam reply when no one else is talking but us two

#

It gets annoying I now know how @sage bobcat feels

wide wharf
wide wharf
#

(I didn't ping this time)

earnest phoenix
#

you just use .catch on things that return promises.

lyric mountain
#
.catch(err => /* do something with err */)
earnest phoenix
#

since promises can reject

#

or whatever its called

earnest phoenix
#

Wdym example

#

It is pretty basic

wide wharf
#

What are things that return promises?

earnest phoenix
#

The docs can tell you that

wide wharf
#

ugh

#

I hate the docs

earnest phoenix
#

but message.channel.send returns a promise

lyric mountain
#

also why hate the docs?

wide wharf
lyric mountain
#

they're the only trustworthy reference you have

wide wharf
#

So I just code and try to fix bugs

lyric mountain
#

that's a bad thing

wide wharf
#

and that's how I learn to code

wide wharf
#

@earnest phoenix Here, I tried to send an empty message:

DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
  method: 'post',
  path: '/channels/682248069294587911/messages',
  code: 50006,
  httpStatus: 400
}
(node:25) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:25) 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:25) [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.
DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
  method: 'post',
  path: '/channels/682248069294587911/messages',
  code: 50006,
  httpStatus: 400
}
earnest phoenix
wide wharf
#

I already fixed that

#

I think

#

message.channel.send

#

or something

earnest phoenix
#

you can't send an empty message

lyric mountain
#

and put error in that

#

something that could be acomplished in 1 hour will take 1 day

wide wharf
earnest phoenix
#

Well

wide wharf
earnest phoenix
#

by not sending an empty message

quartz kindle
#

lol

lyric mountain
wide wharf
lyric mountain
#

it's about making up the logic to go from A to B

earnest phoenix
#

facts

wide wharf
lyric mountain
#

that's what schools lack when teaching CS

wide wharf
#

Lol

lyric mountain
#

they teach how to write code

earnest phoenix
#

This is why im self taught

lyric mountain
#

I'd say cooks are somewhat programmers

#

they program in Flour++

earnest phoenix
#

It may of taken 4 years to get to a decent skill level

wide wharf
#

lol

earnest phoenix
#

but I made it :p

quartz kindle
#

same

earnest phoenix
#

No where near tim tho

#

this mans a god

wide wharf
quartz kindle
#

well i probably have more experience since im older, thats all

wide wharf
earnest phoenix
#

you jsut don't send an empty message

quartz kindle
#

although i havent been coding for that long either

earnest phoenix
#

that is the best way to handle it

brazen helm
earnest phoenix
#

Tim is only in his 20s (I refuse to believe he is 30 we must preserve tim)

lyric mountain
#

I learnt the basics in my cs classes, then gone deep in Core Java book

wide wharf
quartz kindle
#

i am 30 lmao

earnest phoenix
#

I refuse to believe it

quartz kindle
#

born in 91

brazen helm
earnest phoenix
#

We must preserve tim at all costs

carmine solar
#

mudae is down?

earnest phoenix
#

ismailZ

wide wharf
earnest phoenix
#

how many times do I gotta say it

#

just don't send an EMPTY message

wide wharf
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

wide wharf
#

"(node:25) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message"

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

That means the promise was rejected

#

cause there is no message to be sent

wide wharf
earnest phoenix
#

Just dont send

brazen helm
#

Take care of the codes you have written, you are sending an empty message, look carefully at your codes, my friend.

earnest phoenix
#

a empty message

#

that simple

wide wharf
#

Okay

lyric mountain
#

or use for empty messages

wide wharf
#

I killed my bot cus I'm angwy

lyric mountain
#

\u200B

earnest phoenix
#

I'd be angry too if i didn't know how to read errors

#

👀

quartz kindle
#

why are you trying to send an empty message lol

stuck dawn
#

why is this happening

earnest phoenix
#

I don't know why it took me saying it 10 times for them to understand it

wide wharf
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Don't worry about that

lyric mountain
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

just worry about the actual error message

wide wharf
quartz kindle
#

lmao

wide wharf
earnest phoenix
#

yes you did

#

smh

#

poor tim

wide wharf
quartz kindle
lyric mountain
#

you didn't handle what it threw

wide wharf
earnest phoenix
#

isn't there a tag on a bot here about promises or was that a different server

quartz kindle
#

catch

lyric mountain
#

and it threw a "no content message" error

lyric mountain
#

it'll still error if you don't fix it tho

earnest phoenix
#
await getApp().commands.post({
        data: {
            name: "ping",
            description: "sends pong",
        },
    });

can I just leave this code after I have posted in once which makes people able to see the slash-command?
or do I need to remove it?

wide wharf
lyric mountain
wide wharf
#

rip

stuck dawn
#

@lyric mountainso what i need to do?

earnest phoenix
#

You can catch it but it won't fix it

lyric mountain
earnest phoenix
#

you still need to fix the error

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

by not sending empty content

lyric mountain
#

the only difference is that it'll be a catched error

#

nothing more

wide wharf
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

and wont make your bot crash

wide wharf
lyric mountain
#

the error size will reduce, but the error will still be there

earnest phoenix
#

and no bot crashing

#

ez

lyric mountain
wide wharf
lyric mountain
#

no

quartz kindle
#

Lol

lyric mountain
#

an error is an error

earnest phoenix
#

why not just use path.join

wide wharf
quartz kindle
#

are you using an empty message to practice error caching?

lyric mountain
#

you can, however send something like An error has ocurred when executing this command to the channel or something

stuck dawn
#

@lyric mountainsolved thx

quartz kindle
#

is that why you dont remove it?

#

or what

lyric mountain
earnest phoenix
#

I am getting mad at detritus

lyric mountain
#

all other stuff come from root

earnest phoenix
#

I am just going ot use discord.js

#

smh

wide wharf
stuck dawn
#

@lyric mountainok

earnest phoenix
#

What

lyric mountain
#

technically yes, but those are different stuff

earnest phoenix
#

I have a question about the slash commands. If I post the command once so it is visible to everyone, should I just leave that post code there so it will be run everytime the bot restarts, or should I remove the code since the command is already available to be viewed?

lyric mountain
#

gimme a sec, I'll show u what we mean

wide wharf
quartz kindle
#

sending an empty message

#

why are you trying to send an empty message?

#

just dont do it?

wide wharf
#

I wanted to test the !say command

humble rock
#

excuse me, i want to make a partnership bot, i've to get from a partnership a specific text (server link), and repleace in my message, how can i do?

wide wharf
#

but sent just !say

#

lol

#

I wanted to sent !say h

quartz kindle
#

well you can always add a check for that

#

check if saymessage is empty

wide wharf
wide wharf
earnest phoenix
#

with an if statement

quartz kindle
#

if(!saymessage) return message.channel.send("message is empty")

earnest phoenix
#

I am questioning if you know the language you are using at this point

#

👀

wide wharf
#

Discord.js

#

javascript

wise umbra
earnest phoenix
#

It would help to learn the basics first

quartz kindle
#

jabbascript

wide wharf
wide wharf
earnest phoenix
#

Javascript basics duh

wide wharf
earnest phoenix
#

On the internet

wise umbra
#

No @earnest phoenix

earnest phoenix
#

and please stop pinging me so much

earnest phoenix
wise umbra
#

Cause i used to ask these kind of questions before like a year back👀

lyric mountain
#

@wide wharf

earnest phoenix
#

I swear I know you from somewhere

lyric mountain
#

uncatched VS catched

wise umbra
#

Check mutual friends also let's move to #general

wide wharf
lyric mountain
#

the ONLY difference is that I did something with the error

#

nothing more, the error still ocurred

lyric mountain
wide wharf
lyric mountain
#

yes

#

well, not inspect element per se, but console

#

inpect element is in the elements tab

lavish bramble
# lyric mountain why?

Bcz my bot is in more 40 guild and have 10 users so I used fetchAllMembers: true in client but debug says unable to fetch users before ready

quartz kindle
lyric mountain
quartz kindle
humble rock
#

you can't send empty messages, so remove it

wide wharf
lyric mountain
#

also, you're not supposed to use fetchAllMembers too frequently

#

it's a costly operation

quartz kindle
humble rock
wide wharf
humble rock
#

it's empty

wide wharf
#

So I need to type sayMessage there

#

ez

humble rock
#

remove it

wide wharf
#

oh

lavish bramble
humble rock
wide wharf
#

Like this?

humble rock
#

yes

quartz kindle
#

you need to catch both sends

wide wharf
quartz kindle
#

yes

wide wharf
lyric mountain
humble rock
#

but at the catch to (after message.channel.send) ...().catch(err => console.log(err));

lyric mountain
#

maybe tim knows the answer

humble rock
#

like this

quartz kindle
#

.catch(console.log) is the same as .catch(e => console.log(e))

humble rock
humble rock
wide wharf
woeful pike
#

god I love seeing O_o=>{}, dead giveaway for code people copy pasted from that one youtube video

#

that's like 4 years old

wide wharf
lyric mountain
#

you still need to fix the issue tho

wide wharf
lyric mountain
#

knowing a car HAS the issue is only half the job

#

sending a blank message

wide wharf
wide wharf
lyric mountain
#

exactly

earnest phoenix
#

Yea

#

don't send an empty message

#

why would you wanna do that

wide wharf
wide wharf
earnest phoenix
#

Stop pinging me

lyric mountain
#

ye, since you're checking if it's blank or not

#

HOWEVER

#

you need to return if it's blank

#

else it'll still execute the bottom part

#

oh you're returning

#

nvm then

earnest phoenix
#

Aren't they doing that tho?

wide wharf
earnest phoenix
lyric mountain
#

ye, you're fine

wide wharf
lyric mountain
earnest phoenix
#

You can basically return anything, because the entire even listener is just a function

lyric mountain
#

also, I hope you're not planning to send stuff in dms

humble rock
lyric mountain
#

ok but

#

what exactly you plan to do

#

like, concat the url in the message?

#

also please, assert to me you're NOT GOING TO MAKE A DM ADS BOT

humble rock
humble rock
lyric mountain
#

so yeah, concat the url in the message

earnest phoenix
#

concat

#

ew

humble rock
lyric mountain
#

you could do ```js
partnership test, join us ${invite}

#

since it's an end on line concatting

earnest phoenix
#

I still do it

#

cause it looks better then

#
"partnership test, join us" + invite
humble rock
#

I explained wrongly I'm sorry, I explain again

earnest phoenix
#

Technically yes

#

but I don't catch sends

#

I like to be surprised

humble rock
#

when a member sends a link of a partnership in a channel the bot has to fetching only the link, as I do

earnest phoenix
#

Zeus better contribute to my open source project

#

or I will smack him

wise umbra
#

Just check if the necessary perms required are there before sending anything YEP

lyric mountain
earnest phoenix
#

could use regex

humble rock
#

I did not know how to explain sorry

earnest phoenix
#

maybe?

lyric mountain
#

ye, will have to be regex

humble rock
lyric mountain
#

but can be dead simple since discord uses a fixed format

#

/https:\/\/discord.gg\/\w+/g

#

I guess

humble rock
#

ok thanks

lyric mountain
#

forgot a + there

wide wharf
# quartz kindle yes it does

Okay like this?

if(!sayMessage) return message.channel.send("Message is empty!").catch(err => console.log(err));
quartz kindle
#

yes

long crow
#

Hi Tim mmulu

quartz kindle
#

hi

wide wharf
# quartz kindle hi

This another script of me btw:

/home/container/1index.js:1236
        client.channels.get('698983333782093925').send('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \nServer: ' + message.guild.name + ' \nChannel: ' + message.channel.name + ' \nUser: @' + message.member.user.tag + ' \nMessage: ' + message.content)});
                        ^

TypeError: client.channels.get is not a function
    at Client.<anonymous> (/home/container/1index.js:1236:18)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:834:20)
#

Error

#

when starting up bot

earnest phoenix
#

client.channels.cache.get

wide wharf
#

thx

earnest phoenix
#

with v12 everything words under a cache now

#

when accessing channels, members, guilds, etc

wide wharf
#

words?

earnest phoenix
#

works*

wide wharf
#

oh

earnest phoenix
#

typo from typing fast

wide wharf
#

np

#
/home/container/1index.js:1236
        client.channels.cache.get('698983333782093925').send('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \nServer: ' + message.guild.name + ' \nChannel: ' + message.channel.name + ' \nUser: @' + message.member.user.tag + ' \nMessage: ' + message.content)});
                                                       ^

TypeError: Cannot read property 'send' of undefined
    at Client.<anonymous> (/home/container/1index.js:1236:49)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:834:20)
#

Oof

quartz kindle
#

channel was not found in the cache

wide wharf
#

Oh

long crow
#

either that or wrong id

wide wharf
#

ez fix

#

UGH another error

#
(node:25) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor
    at notActive (/home/container/1index.js:784:34)
    at Client.<anonymous> (/home/container/1index.js:782:14)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
(node:25) 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:25) [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.
quartz kindle
#

RichEmbed is from v11

#

you're using super outdated code

wide wharf
wide wharf
quartz kindle
#

2 years behind

long crow
#

djs quite slow moving

wide wharf
quartz kindle
#

yes but thats 2 years

wide wharf
#

So this old script won't work?

long crow
#

v13 "supposedly" come out this mid-end June. But no guarantee

wide wharf
#

And I have to rewrite it all over again?

wide wharf
quartz kindle
#

just follow the update guide and change whatever needs to be changed

wide wharf
#

and use v11 discord.js

quartz kindle
#

v11 doesnt work anymore

wide wharf
#

oh

quartz kindle
#

it doesnt support the new discord api requirements

wide wharf
quartz kindle
#

a part of it maybe

#

not the entire thing

#

the bulk of it will likely remain the same

#

theres already an update guide if you wanna check it out

long crow
#

This the changes from V11 to V12

wide wharf
#

thx

quartz kindle
#

heres from V12 to V13

wide wharf
#

Just changed all "RichEmbed"s to "messageEmbed"

slender thistle
#
                role = client.guilds[ctx.message.guild_id]["roles"].get(role_data["role"]) or \
                       await shortcuts.edit_role(
                           handler=handler,
                           role_id=role_data["role"],
                           parameters={
                               "name": name
                           }
                       )

what the fuck did I think when I wrote this XDDDDDDDDDDDDDDD

wide wharf
#

Is it "messageEmbed" or "MessageEmbed"??

long crow
#

the later

wide wharf
slender thistle
#

the latter

wide wharf
#
(node:25) UnhandledPromiseRejectionWarning: TypeError: Discord.messageEmbed is not a constructor
    at notActive (/home/container/1index.js:784:34)
    at Client.<anonymous> (/home/container/1index.js:782:14)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
(node:25) 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:25) [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.
#

rip

earnest phoenix
#

MessageEmbed

wide wharf
#

oh

#

I need to change everything again then

earnest phoenix
#

you need learn discord.js

wide wharf
#

Uh error?

#

@quartz kindle The biggest part of my code that was in v11 was just "RichEmbed" so I changed it to MessageEmbed and now most commands work

lyric mountain
wide wharf
lyric mountain
#

not 1 version behind

#

more like 10 or 20

wide wharf
earnest phoenix
lyric mountain
#

it ain't exactly v11 > v12

#

more like v11.0.0 > v12.0.0

wide wharf
lyric mountain
#

there were MANY versions between those two

#

also...

v11  .  0  .  0
 |      |     --- WON'T break anything in your code
 |      --- MIGHT break something in your code
 --- WILL break everything in your code
wide wharf
#

smh

wide wharf
#

everything?

#

It didn't break everything for me...

earnest phoenix
wide wharf
#

only "RichEmbed" > "MessageEmbed" was wrong

lyric mountain
#

that's what you think

#

major version changes always break everything

wide wharf
lyric mountain
#

there's a reason node refuses to do major updates unless you explicitly tells it to

#

major = red zone
minor = yellow zone
build = green zone

earnest phoenix
#

there was a lot more then just richembed to message embed in v12

#

there was the introduction of caches so no longer guilds.size it was guilds.cache.size

lyric mountain
#

v12 was basically the "Use Cache™️" update

earnest phoenix
#

Yea

lyric mountain
#

oh also the gateway intents

earnest phoenix
#

They also introduced gateway intents

#

and managers for everything

wide wharf
#
(node:26) UnhandledPromiseRejectionWarning: TypeError: message.guild.roles.find is not a function
    at Client.<anonymous> (/home/container/1index.js:530:44)
    at Client.emit (events.js:326:22)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:834:20)
(node:26) 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:26) [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.
earnest phoenix
#

find doesn't exist on roles

wide wharf
#

.cache.?

#

oh

earnest phoenix
#

you gotta go through the cache iirc

#

since it returns the collection

#

or whatever

wide wharf
#

message.guild.roles.cache.find?

earnest phoenix
#

I think

#

yea

#

gotta go through cache

stuck dawn
#

Hey i am trying to do a bad word filter, and i want to do the bot say what word is considered bad. I have the badwords in a json file, what should i do?

earnest phoenix
#

Good luck

visual goblet
#

i need discord.py voice but its already installed yet none of my music commands work anyone know how to fix this?

earnest phoenix
#

A curse filter is easily bypassable

earnest phoenix
#

it is hard to make one that will be decent

visual goblet
#

the only error is RuntimeError: PyNaCl library needed in order to use voice

lyric mountain
#

not hard, impossible

earnest phoenix
#

Yea

#

true

stuck dawn
#

impossible?

earnest phoenix
#

Anyone can just bypass your words

lyric mountain
#

and if you succeed you'll have something like genshin's filter

earnest phoenix
#

and it renders the filter useless

lyric mountain
#

which blocks word dog

#

because dog is a swear in some langs

earnest phoenix
#

lmfao

#

Blocks every word

#

no talking in my server

lyric mountain
#

everyting is a swear if you try hard enough

earnest phoenix
#

true

#

everyting

visual goblet
#

does anyone have a fix for the error RuntimeError: PyNaCl library needed in order to use voice

#

i already installed it yet it gives me this error

stuck dawn
#

yes but i want to do something like

Bot: Choose your name
Me: Stick Cock
Bot: Word cock is considered a bad word

#

like

#

idk how to explain

earnest phoenix
#

Then ig

#

check if the message sent contains a bad word

#

but it will be rather pointless

#

Cause they can bypass it

stuck dawn
#

yes but i want the bot to say the bad word

earnest phoenix
#

i said learn discord.js dude

#

Then have it say the word it detected

#

🤔

lyric mountain
#

yeah but...like...I can say "b*tch" in 255 different langs

stuck dawn
#

how i can do that detection

earnest phoenix
#

By..

#

I give up

stuck dawn
#

@lyric mountain but i am doing a simple thing

lyric mountain
#

not to mention the leetspeak

earnest phoenix
#

not like I haven't already said how to do it twice now

#

🤷‍♂️

lyric mountain
#

like, you want to detect "cock" ok

stuck dawn
#

yes

lyric mountain
#

cock
c0ck
c()ck
cºck
c@ck
c°ck
c*ck
côck
cõck
cóck
còck
cöck

stuck dawn
#

no

lyric mountain
#

so it's pointless

stuck dawn
#

i just want the bot to detect

#

and say

earnest phoenix
#

I already said how

stuck dawn
#

i dont give a f*ck if they use c()ck

earnest phoenix
#

but no one listens to me

#

:c

stuck dawn
#

you didn't say anything xd

#

i want to do something like spell checker

lyric mountain
#

what we're saying is that it's literally pointless to make a word filter that'll only detect one variant

#

people WILL bypass it

#

you're making a gate without walls

wide wharf
#
 if (command === "dm" && botConfigs.plugins[13].activated == true) {
            let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
            if (!rUser) return message.channel.send("Provide a valid Ping or user id");
            let reason = args.join(" ").slice(22);
            if (!reason) return message.channel.send("Provide a message!")
            let dmEmbed = new Discord.MessageEmbed()
                .setDescription("DM Message")
                .setColor("#15f153")
                .setDescription(reason)
                .setFooter("This message was sent by: " + `${message.author.username}  ` + " 🕒" + `${timestamp('hh:mm:ss')}`, `${message.author.displayAvatarURL}`)
            let channel = client.users.get(rUser.id)
            if (!channel) {
                message.channel.send("Can't find a user.")
                return;
            } else {
            await channel.send(dmEmbed).catch(O_o => console.log({O_o}));
           }
        }
``` Why doesn't this work?
lyric mountain
#

this is your spellchecker

long crow
#

🇨 🇴 🇨 🇰

earnest phoenix
#

I did tell you how

#

you just don't listen

#

smh

long crow
#

Try filter that

earnest phoenix
#

No

stuck dawn
earnest phoenix
wide wharf
#

fg!

lyric mountain
#

unless you're stripping the prefix out of that, it'll not pass

#

also please use line breaks

visual goblet
#

would anyone know if i need to uninstall discord.py and then install discord.py voice in order to get it or can i just use both?

wide wharf
lyric mountain
#

so yeah, you need to have both

visual goblet
#

im trying to use it but i get an error

#

saying i dont have it

#

yet requirement is already satisfied

stuck dawn
#

this will work? @lyric mountain @earnest phoenix

visual goblet
#

every command works but i get the error RuntimeError: PyNaCl library needed in order to use voice

earnest phoenix
#

No

#

not at all

lyric mountain
#

no, definitely no

stuck dawn
#

😦

earnest phoenix
#

can't you use includes here kuuhaku

#

[arrayofbadwords].includes(msg.content)

lyric mountain
#

probably, but that's still a placebo solution

earnest phoenix
#

True

lyric mountain
#

it'd be the other way around btw

earnest phoenix
#

Oh right

#

I smurt

stuck dawn
#

cause i want to filter that word and bot say it

earnest phoenix
#

make an array of regexes instead

#

because one space is enough to bypass the filter

lyric mountain
#

that's where the issue lies

#

for a human it's dead simple to detect curse words

#

but for a bot you need to tell it what are bad words

earnest phoenix
#

i think this should work

let badwords = [
  /f\s*?[*uc]+\s*?[*uc]*\s*?[k]/i
];
let match = badwords.find(word => word.test(message.content));
match && return message.reply(`Message contains bad word: ${match}`);
#

note the \s*? if there's a space it will still detect it

#

if there's any other character there it will fail tho

#

@stuck dawn the above code should detect the following words:

fuck (bruh)
f*ck
f**k
fu*k
f*ck
f*k
fuk
fck
#

you need to add more regexps to the array if you want to detect more words

#

it wont work on strings tho

cinder patio
#

𝓯𝓾𝓬𝓴

long crow
#

Fak

earnest phoenix
#

there's no faxing way to detect badwords with non qwerty characters

#

which is why we have human mods

crimson vapor
#

55k smh

#

im never gonna get to that

cinder patio
#

f̵̆̍ű̷̑c̷̉͛k̸̿͘

#

f̶̰̾ȗ̷̈́c̶͛̾ḱ̵͉

crimson vapor
#
{
  '𝓯': 'f'
}```
earnest phoenix
#

i made the test even better

#

/f+\s*?[*uca]+\s*?[*uca]*\s*?[kc]/i will match all of this:

["fuck",
"f*ck",
"f*ak",
"f*ac",
"faak",
"f**k",
"fu*k",
"f*ck",
"f*k",
"f*c",
"fuk",
"fck",
"fak"]```
cinder patio
#

you're wasting your time :c

earnest phoenix
#

ikr

novel jetty
earnest phoenix
#

solution: npm uninstall windows --force

novel jetty
#

?

earnest phoenix
#

that error only happens on windows

#

sqlite3 has extra steps to get installed on windows

sick agate
#

Need msvc

#

Windows do not include compiler while Gnu/Linux does

#

@novel jetty

opal plank
#

@cinder patio how's detritus treating u so far

cinder patio
#

Haven't used it lol

opal plank
earnest phoenix
#

thank god i dont code bots anymore

cinder patio
#

not because I use a different lib

#

cause my bot can wait

#

until stuff gets better

opal plank
#

i c

earnest phoenix
#

erwin wanna see a regexp
try to figure out what this does: /f+\s*?[*uca]+\s*?[*uca]*\s*?[kc]/i

cinder patio
#

they can just scroll up

novel jetty
cinder patio
#

anyways... writing a type system is very difficult

novel jetty
#

Or how can i fix it

earnest phoenix
#

just install windows-build-tools

#

npm i --production windows-build-tools

novel jetty
#

Still the same error

cinder patio
#

it takes a while to download...

sick agate
#

Yup

novel jetty
earnest phoenix
#

discord-bugbot?

cinder patio
#

Pretty sure you have to install it globally and as an admin

earnest phoenix
#

yeah you do

cinder patio
#

Open powershell as an admin, add the --g flag to the command

earnest phoenix
novel jetty
#

The term '-g' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

#

@cinder patio

earnest phoenix
#

@novel jetty you have to put -g before the windows-build-tools and after the npm install

#

you put it the start bro

novel jetty
#

Like this? npm i -g production windows-build-tools

earnest phoenix
#

everything is correct except you removed the double dash from production

novel jetty
#

npm i -g --production windows-build-tools

#

Like this

#

This is still giving error

#

@earnest phoenix

#

@sick agateHey! Could you help me?

earnest phoenix
#

Lets refrain from pinging random people

#

just install windows-build-tools as is

#

I don't think the production flag is needed

novel jetty
#

It gives errors

thorny arch
#

hey uh is this fine

solemn latch
#

maybe its just me, but i wouldnt add a bot that requested every perm like that.

thorny arch
#

but its becoming a pain having to make a new link

#

to add a new perm

#

every time i add a new feature

solemn latch
#

you very likely decreasing the number of users who will use your bot.
its fine, but it will hurt you more than help.

solemn latch
#

you should know, you are the dev for your bot.

thorny arch
#

hmmm

#

ayt

solemn latch
#

I wouldnt know what perms your bot needs, because i didnt make it 👀

feral aspen
#

Hello!

thorny arch
feral aspen
#

Nope. 😂

thorny arch
#

oh

feral aspen
#

😂

#

I'm such a guy who concentrates.

thorny arch
feral aspen
#
!eval message.guild.fetchAuditLogs({ type: 22 }).then(audit => audit.entries.first().reason);
thorny arch
#

woah

#

i wudnt use eval if i were u

feral aspen
#

I'm trying to fetch for the reason when a guy gets banned for my guildBanAdd event, did I do it correct?

earnest phoenix
thorny arch
earnest phoenix
#

you cant run code from a message without eval

thorny arch
#

ah ok

#

sry

sudden geyser
thorny arch
#

huh

feral aspen
sudden geyser
#

Any sort of code evaluation should have the appropriate security measures in place

rocky hearth
#

whts the difference bw these two events?
"voiceServerUpdate"
"voiceStateUpdate"

feral aspen
#

Some people told me to check if the reason i am getting is from the correct user, so what can I do?

lyric mountain
summer torrent
#

voiceServerUpdate?

#

is it new

pale vessel
#

it's not

#

it's emitted when a guild voice server was updated

feral aspen
pale vessel
#

e.g. after you change the guild region

#

voice state update is different, it's for members that left/joined/moved between VCs

wooden kindle
#

guys small prob ive forgot what u have to install for discord embeds

summer torrent
#

hmm?

rocky hearth
wooden kindle
#

yep

#

thats what it was

#

thanks

tender raft
#

Ok I code alot in replit but for some reason client.login(With my token in here) doesn't work Any ideas?

sick agate
#

please you say you use .env

earnest phoenix
timber fractal
#

Can someone help

solemn latch
#

this is not something you should use json with.

timber fractal
#

What then

#

Mongo or quick.db

solemn latch
#

there are cases which storing data with json isnt super bad, but this is very bad.
you should use a proper database, such as something sql based, or mongo.

#

id prefer mongo over quick.db, but either would be better.

timber fractal
#

Im getting sick of it

solemn latch
#

well, any proper database will do. just not json.

earnest phoenix
#

use something different other than json

solemn latch
#

everyone uses what they know, so they recommend what they know.

timber fractal
#

And ye i found out when i tested it jt sucked

earnest phoenix
#

who know canvas?!?

crimson vapor
#

what do you need help with?

earnest phoenix
lyric mountain
#

spacé

earnest phoenix
#

whatt

sick agate
#

node proably not liking Ü

lyric mountain
#

the space

#

remove the space after dot

sterile lantern
#
client.on('clickButton', async (button) => {
await button.clicker.fetch();
console.log(button.clicker.member.id)
const yellow = button.guild.roles.cache.get('842790304607109120')
  if (button.id === 'yellow') {
  if(button.clicker.member.roles.cache.has(yellow)) {
     button.clicker.member.roles.remove(yellow)
     let e = new Discord.MessageEmbed()
     e.setTitle('Role Removed'); e.setDescription(`Successfully removed the ${yellow} role from you.`); e.setColor('GREEN');
        button.reply.send({embed: e, ephemeral: true})
     }
    else {
      button.clicker.member.roles.add(yellow)
      let e = new Discord.MessageEmbed()
     e.setTitle('Role Added'); e.setDescription(`Successfully added the ${yellow} role to you.`); e.setColor('GREEN');
     button.reply.send({embed: e, ephemeral: true})
    }
  }
});```
this does not work. anyone know why? 
instead of: adding/removing it just adds
when i restart
remove/remove
restart again
add/add

it should add/remove/add/remove on each click. so one click = remove if have role, add if not another click = remove if have role add if not
earnest phoenix
#

fontu nasıl kaydetmeye çalışıyorsun

wide wharf
#
API Latency is ${Math.round(client.ping)}ms
``` Why doesn't this work?
wide wharf
#

Can I just add this to every command?

.catch(err => console.log(err));
earnest phoenix
earnest phoenix
#

you use it to catch an error.

wide wharf
#

I really need to search up what promises are lmao

earnest phoenix
boreal iron
boreal iron
#

What's not to understand there?

#

Create a function to log your error instead of directly adding console.log anywhere.

#

If you're going to change the behavior in the future you just have to edit the function.

stable nimbus
#

So I'm adding another way to use my bot though more prefixes, however, it stops at the command return function.
Here is what I'm trying to do:
I'm adding more ways to get the bot to interact with its users, however, when I run the mention, along with the command name/alias it stops at my if (!command) return, and I am unsure as to why it does this. I was wondering if anybody could provide insight to the issue.

#

I'm supposed to get 4 and a response, I only get 3 and nothing else

boreal iron
#

You're already slicing of your prefix in args

#

Then shifting the first item of args again, which is not your prefix anymore

#

log cmd and you will see your issue

#

And additionally args

stable nimbus
#

Okay.

plush grove
#

Buenas tengo una duda tengo este comando para crear un guild pero quisiera que cree 2 rangos al crear el guild ejemplo bot oficial y Ceo/Director y que se de el rol de bot oficial esto es lo que tengo por ahora ```js
const Guild = await client.guilds.create("RafaMaster Proyect", {
channels: [
{"name": "general"},
]
});
const GuildChannel = Guild.channels.cache.find(channel => channel.name == "general");
const Invite = await GuildChannel.createInvite({maxAge: 0, unique: true, reason: "Testing."});
message.channel.send(He Creado El Guild Aqui El Code De Invitacion: ${Invite.url});

lyric mountain
#

just do .catch(console.log)

wide wharf
opal plank
#

@woeful pike , you might know about this, since you might've used it for the filter function for dbl

#

but do you happen to know a package to clean strings from shitty unicode characters?

#

examples:
┃♬●♪𝒟𝒥HƗĐŘΔ♩●♬ => HIDRA
┃♬♩●♪𝐏𝐞𝐝𝐢𝐫♪●♩♬ => Pedir
┃𝐵𝒶𝑔𝓊𝓃ç𝒶𝒶𝒶𝒶 => Baguncaaa

#

something that would clean out strings and replace them for their counterparts

woeful pike
#

we don't use anything like that and it seems very difficult to implement

opal plank
#

it'd need a good chunk of hardcoded unicode characters to replace it properly

#

not even fuse is picking shit like that

pale vessel
opal plank
#

trying to solve the issue of that skid h0nda

#

there still bots joining but they got those weird ass names now

opal plank
sick agate
#

Oof

opal plank
pale vessel
blazing flame
#

how i can check if the npm safe or no?

pale vessel
#

It's probably similar

#

I believe it's a fork

opal plank
#

like a charm

#

ty

slender thistle
pale vessel
#

I use that for my bot even though I had to use require()

#

It's the message itself, the one that includes the component

slender thistle
#

ty

lyric mountain
opal plank
#

but its a dead af server

lyric mountain
#

lul

#

tbf, I REALLY want something like that for java

#

now that I know it's possible I'll see if I find something

opal plank
#

its awfully rare for me to speak or be in a portuguese server. i only talk in portuguse with irl friends who dont speak english. 99% of my week is english

boreal iron
#

“irl friends” oldEyes

#

Who’s that Mr. Real Life?

lyric mountain
#

♬●♪𝒟𝒥HƗĐŘΔ♩●♬

visual goblet
#

hey i feel kinda dumb for asking but how do i add an image to vsc?

earnest phoenix
#

because missing after argument list dude read the error

#

idk you should know this

visual goblet
#

bruh thats stupid lmao

#

"yeah let me point out the problem for you but... you go ahead and find it"

visual goblet
#

wouldnt be asking for help if they knew where it was

sudden geyser
#

You may be missing a }) to match with sending the embed

visual goblet
#

hey lite buddy do you know how to add images to vsc?

#

for example

#

i kinda forgot how to do this and need to add one

sudden geyser
#

Just drag the image into the project?

visual goblet
#

ohhhhh LMAO sorry

sudden geyser
#

np

visual goblet
#

it wont let me upload my file with my image to github because its apparently empty

#

any fix to that?

sudden geyser
#

Is there a specific error? I've never had issues uploading images or videos (though I used PyCharm and Xcode at the time)

visual goblet
#

no errors its just telling me my file is empty

#

"This file is empty."

#

yet it has my image

sudden geyser
#

that's interesting

#

I just tried it out

visual goblet
#

it says the file is empty for me

#

trying to upload this

#

so i can update it with their spotify status and stuff

#

the code is done just need an image

#

but i cant upload an image to my assets folder on github

#

it will let me upload other images but not that one

visual goblet
#

i cant be crazy

#

theres a module named dateutil right?

#

im stupid its python-dateutil

sudden geyser
#

Python has a built-in date, time, and datetime module.

prime hawk
#

i need help ! what's wrong ?

solemn latch
#

Whats your error, or the actual problem?

indigo niche
#

I made a bot over a year ago, but never actually put and code into it. I have the code I want it to use, but I forgot what site to use to actually edit a bot I made.

vivid fulcrum
green fossil
#

Any guide on how to use shardmanager with topgg and which bot sent dm when someone votes?

indigo niche
opaque seal
#

Many bots send DMs when you vote

green fossil
opaque seal
#

What's your question?

green fossil
# opaque seal What's your question?

I'm using my bot with ShardingManager and I want that when they vote for it to send a message to the DM but I can't get the client in the app.post

opaque seal
#

topgg will send you the user id of the voter, with that you can request from your sharding manager (depening on the library you are using) the Discord user object from that user id and you'll be able to DM him

sudden geyser
#

@drowsy crag !!!

solemn latch
#

nom so fast

green fossil
boreal iron
#

If you can’t pass the active client into your webhook script then include djs and create a second instance of your bot temporarily

#

Fetch the user id and send the message and close the instance again

opaque seal
# green fossil How could I do it in discord.js?

This is a base for receiving votes, https://github.com/Giuliopime/top.gg-webhook-tutorial/blob/master/index.js, from there you get the user ID, then you will need to fetch that user from Discord, perhaps via https://discord.js.org/#/docs/main/stable/class/UserManager?scrollTo=fetch or it could be better to find a shard where the user is cached and send the message from that shard, unfortunately the discordjs sharding manager isn't the best for that

green fossil
gaunt ermine
#

Hii

opal plank
long crow
#

Hi Erwin

opal plank
crimson vapor
#

hi

earnest phoenix
earnest phoenix
#

@earnest phoenix

#

Hi

#

Hi

#

Can anyone help get invite for this discord bot

#

Or how do I get

gilded plankBOT
#

@earnest phoenix

To find a bot that you need, please try searching the main feature you need on our website. You may have to refine your search term, but with just a little effort, you can find the bot you need. If you still haven't found a bot that suits your needs, then try searching Google for it.

stable nimbus
calm raft
#

Can bots have RPC?

north sky
#

i dont think so

stable nimbus
#

I am having a new issue now that I have done some more logging. Currently, my bot doesn't respond regardless of what I do, and I can not figure out how to switch things around so it will function accordingly.

Prefix function

async function getPrefixFunction(message) {
            const db = await botdb.queryPromise(`SELECT * FROM server WHERE serverid = ${message.guild.id}`).then(async function(results) {
                return decodeURI(results[0].prefix);
            });
            const prefixes = [
                `<@!${message.client.user.id}> `,
                `<@${message.client.user.id}> `,
                config.prefix,
                db,
            ];
            let thePrefixValue = null;
            prefixes.forEach((p) => {
                if(message.content.startsWith(p)) {
                    thePrefixValue = p;
                }
            });
            return thePrefixValue;
        }

Args, Cmd, etc.

const args = message.content.slice((typeof prefix === 'string' ? prefix.length : 0)).trim().split(/ +/g);
        const cmd = args.shift().toLowerCase();
        const command = client.commands.has(cmd) ? client.commands.get(cmd) : client.commands.get(client.aliases.get(cmd));
        

===
Attached are two console errors that I am getting.

pure saffron
#

Ok, so I want to make a cool little counter that just sits in my Support Server for my bot. I want it to just be an updating status of how many times the bot has been in a server. So currently, every time someone adds my bot to their server, I get a message in the support server via a webhook stating this. I was wondering if I could make a counter, so every time someone added the bot, the number would go up by one? Any ideas?

lament rock
pure saffron