#development

1 messages · Page 1680 of 1

toxic jolt
#

PLS HELP

#

i updated v12

#

but dont any changes for errors

earnest phoenix
#

read the docs

toxic jolt
#

I'm still getting this error, what is this

#

I made all of the codes v12

#

and im using shard.js

brave tendon
#

But the thing that I don't understand is I have the permission in the oauth .. why does it has no access to the old channels then?

dusky sundial
#

The oauth permissions only gives the permissions to the role the bot is given on invitation. That doesn't mean it will have those permissions for every channel as you can still set specific role permissions per channel.

brave tendon
#

Ahh okay

#

I didn't know that.. thank you!

toxic jolt
#

omggg

#

my all bot's have a this error!

#

omg!!!

#

THIS IS A REALLY?

stuck dawn
#

anyone knows how to fix this?

quartz kindle
earnest phoenix
#

discord.js-light is better than discord.js?

quartz kindle
#

depends by what metric

earnest phoenix
#

Tim might say yes because he created discord.js-light mmLol

quartz kindle
#

i try to be unbiased and objective

toxic jolt
#

here my discord.js v11 bot

quartz kindle
#

why are you using v11?

toxic jolt
#

im updated v12 but

earnest phoenix
#

ClientDataManager is v11

quartz kindle
#

looks like you didnt update

toxic jolt
#

e
gives the same error

earnest phoenix
#

Did you bother restarting after updating?

quartz kindle
#

did you update correctly?

toxic jolt
#

npm i discord.js@latest?

earnest phoenix
#

😳

quartz kindle
#

discord.js@v12

#

or discord.js@12

#

i forgot which

#

or simply uninstall discord.js

#

then install normally

#

its v12 by default if you dont have it installed

toxic jolt
#

Is v11 over?

quartz kindle
#

yes

toxic jolt
#

WHAT!!!!

#

WHAAAATTTTTT

quartz kindle
#

its been over a long time ago

#

not sure if it still works

toxic jolt
#

FUCK OMG

earnest phoenix
#

v13 is almost out KEKW

quartz kindle
#

but if it does, it will probably have many broken things by now

toxic jolt
#

IM DONE

#

IM DONE OMG

#

HOW TO UPDATE 100 FILES

quartz kindle
#

didnt people tell you to use v12 like 1 year ago?

toxic jolt
#

OMGGGGG

earnest phoenix
toxic jolt
#

stupid pudochu.

#

you are so stupid.

earnest phoenix
#

When you realize the mistakes you've done

#

This man just experienced that

toxic jolt
#

okay I switched to 10% v12

earnest phoenix
#

Good luck with the rest I guess

#

You might need this

toxic jolt
#

I'M DONE

#

REALLY DONE.

#

@earnest phoenix @quartz kindle pray for me ...

earnest phoenix
#

🙏

pale vessel
#

it's just search and replace + intents 4head

toxic jolt
#

for

#

100 .js files

pale vessel
#

yeah?

#

do you not use VSC?

#

or any editor that supports bulk replace

wintry wing
#

new discord api change broke my bot

toxic jolt
#

no

#

i using notepadd++

pale vessel
#

Even Notepad++ can do that

#

I used it, I know

earnest phoenix
toxic jolt
#

im updating v12 now

earnest phoenix
wintry wing
#

im on v12

#

not v11

earnest phoenix
#

Discord.js !== Discord API

toxic jolt
earnest phoenix
#

And how did it break your bot exactly

pale vessel
wintry wing
#

My bot keeps saying this

/home/fire/Desktop/bots/node_modules/discord.js/src/structures/Guild.js:523
       .replace(/'s /g, ' ')
        ^
 TypeError: Cannot read property 'replace' of undefined
toxic jolt
pale vessel
#

I never used any editor other than Notepad++ until I switched to VSC

earnest phoenix
wintry wing
#

I'm on v12

earnest phoenix
#

They're already on the latest version

wintry wing
#

12.5.1

earnest phoenix
#

Its weird

wintry wing
#

Those are mainly on bots that are sharded though

toxic jolt
#

1 million users and 35 thousand servers cannot use the bot right now due to my laziness. BRUH

wintry wing
#

every other bot that isn't sharded is working perfectly fine

earnest phoenix
#

My bot haven't experienced a single error since the new discord API change

#

Some bots are affected for some reason

wintry wing
#

That is weird

lament rock
#

Mine isn't affected either. I've been on API and gateway v8 for a very long time. The active session also was not created on v7 or less

wintry wing
#

This only recently happened when I've seen my bot keeps spitting out errors in a loop about that, plus the Error [SHARDING_IN_PROCESS]: Shards are still being spawned. too.

split cipher
#

What's this "new api" I'm hearing?

wintry wing
#

Not really a new api, just a new change that dropped.

split cipher
#

Oh

lament rock
#

V8 has been a thing for many months.

wintry wing
#

^

earnest phoenix
#

v8 is pogging

lament rock
#

v8 haha funny js version

#

what if we revived discordv8 cz_awkwardflushed

earnest phoenix
#

😳

lament rock
#

Reminds me. I need to submit PRs to Daswolke for their Discord modular interfaces. Updated them to TypeScript which is pretty poggers

lament rock
#

That gives me an idea. There should be a new HTTP status code which description is poggers.

Similar to how Twitter "standardized" 420 "Enhance Your Calm"

rough current
#

Does anyone know the event name for when your bot joins a server. Is it @client.event(on_server_join)
For discord.py. Solved

rough current
#

ty, i could not find the docs anywhere

simple zodiac
#

Does anyone know how to do message replies in Discord.js? I've looked in the docs, and I tried doing "message.reply("test reply")" but that just says like "@message author, test reply"

simple zodiac
pale vessel
#

You'd need to use Discord.js master or wait for v13

simple zodiac
#

what is the master thing?

pale vessel
#

you can also use client.api() if you really need it

pale vessel
wintry wing
#

I just fixed the issue I had

simple zodiac
#

okay in that case ill proly just wait for that v13

#

thanks

wintry wing
#

just have a bunch of guild.available checks

pale vessel
#

if you want to be cool you can still use it: js client.api.channels[channel.id].messages.post({ data: { message_reference: { message_id: "<reference message ID>" }, content: "A reply" } });

simple zodiac
#

what would <reference message ID> be?

pale vessel
#

The message (ID) to reply to

simple zodiac
pale vessel
#

Yeah, sure

simple zodiac
#

okay imma try that

#

cool COOOL thank you so much

pale vessel
#

If you want to disable ping, you can add allowed_mentions: { replied_user: false } to the data object

simple zodiac
#

aight i prolly will, thank you for the help!!!

crimson vapor
#

@pale vessel rude

simple zodiac
# pale vessel If you want to disable ping, you can add `allowed_mentions: { replied_user: fals...

hey, do you know if its possible to send reply EMBEDS? I tried doing this with my code but it only sends whats in content.

if (message.content.startsWith(`${guildPrefix}reply`)) {
    const embed = new Discord.MessageEmbed()
    .setDescription('me when the funny')
    client.api.channels[message.channel.id].messages.post({
    data: {
        message_reference: { message_id: message.id },
        content: "this is embed :flushed:",
        embeds: embed
        // allowed_mentions: {replied_user: false/true }
    }
    });
}
#

i also ttried embeds: [embed]

quartz kindle
#

embed: embed.toJSON()

simple zodiac
#

ill try that

vivid fulcrum
#

only webhooks can send embeds

simple zodiac
#

okay well thank you

vivid fulcrum
#

webhooks can send up to 3 per message iirc

#

everyone else is limited to 1

quartz kindle
#

wasnt it 10?

vivid fulcrum
#

uhh

#

i'm pretty sure i tested it and 3 was the max

simple zodiac
#

wait, how would you send multiple in one message?

quartz kindle
#

embeds is an array of embeds and can contain up to 10 embeds in the same message

vivid fulcrum
#

oh

#

guess i have dementia

simple zodiac
#

like <Message>.channel.send(embed,embed1,embed2)?

tulip ledge
#

array

quartz kindle
#

it might be a combination of website/image/embed

tulip ledge
#

[embed, embed, embed]

quartz kindle
#

not strictly messagembed

simple zodiac
#

ohh ok

#

then send in the channel the array?

tulip ledge
#

yup

simple zodiac
#

oh cool i honestly had no idea you could do that

quartz kindle
#

it only works with webhook tho

simple zodiac
#

ah ok

quartz kindle
#

normal messages can only send 1 embed

drifting wedge
#

is it possible to run a py webserver while in a dpy cog?

#

so the bot would still run

#

but would have a websever without blocking other code

quartz kindle
#

yes its possible

toxic jolt
#

guys pls help

#

@quartz kindle TİİİİM

#

TİİİİM HELPPP

dusky sundial
#

Relax mate

toxic jolt
#

i updating

#

300 js file

#

v11 to v12

#

im crying bro...

#

i'm dying

#
  
      
var activevar = [
      "!!yardım | !!davet | !!p Şarkı",
      "!!cortex | Benle konuşsana :3",
      "Özel mesaj at, cevaplıyım UwU", 
      ];
var activities = activevar[Math.floor(Math.random()*activevar.length)];
client.on('ready', async () => {
    setInterval(async () => {
      await client.user.setPresence({game: {type: 0, name: activities}});
    }, 7 * 1000);
});
``` i how to update v11 to v12 this code pls help
#

oh shit

#

I forgot to delete it

#

anyway

#

i don't feel my brain

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#
  
      
var activevar = [
      "!!yardım | !!davet | !!p Şarkı",
      "!!cortex | Benle konuşsana :3",
      "Özel mesaj at, cevaplıyım UwU", 
      ];
var activities = activevar[Math.floor(Math.random()*activevar.length)];
client.on('ready', async () => {
    setInterval(async () => {
      await client.user.setPresence({game: {type: 0, name: activities}});
    }, 7 * 1000);
});
``` how do i convert this part to v12
#

@sage bobcat can you help me please

quartz kindle
#

how about just checking the docs?

cosmic forum
#

Anyone know how I can parse data from this json response?

{"abilities":[{"ability":{"name":"limber","url":"https://pokeapi.co/api/v2/ability/7/"},"is_hidden":false,"slot":1},{"ability":{"name":"imposter","url":"https://pokeapi.co/api/v2/ability/150/"},"is_hidden":true,"slot":3}]}

My js code:

let abilities = [];
for (let i = 0; i < json.abilities.length; i++) {
  abilities.push(json.abilities[i].ability.name);
};

res.send(`<b>Abilities:</b> ${abilities.join(", ")}`);

Yet it keeps returning an error, anyone know what's going wrong?

vivid fulcrum
#

...JSON.parse() ??

#

oh right, you already parsed it

#

also

#

use map to clean up your code

#

in the end your code would look something like this

#
const obj = JSON.parse();
const abilities = obj.abilities.map(x => x.ability.whatever);
#

also also

#

if that's an API request

#

um

#

follow REST principles??

cosmic forum
# vivid fulcrum ...``JSON.parse()`` ??

Wait, here's the full code for it:

app.get("/:name", async (req, res) => {
  let name = req.params.name;
  fetch(`https://pokeapi.co/api/v2/pokemon/${name}`).then(r => {
    if (!r.ok) {
      return res.send("Invalid Pokemon");
    } else {
      r.json();
    };
  }).then(json => {
    let abilities = [];
    for (let i = 0; i < json.abilities.length; i++) {
      abilities.push(json.abilities[i].ability.name);
    };

    res.send(`<b>Abilities:</b> ${abilities.join(", ")}`);
  });
});
vivid fulcrum
#

why are you using then if your function is async

cosmic forum
#

¯_(ツ)_/¯

earnest phoenix
#

i'm testing discord.js-light and the bot send two messages, why?

cosmic forum
#

I was just used to calling fetch requests that way

vivid fulcrum
cosmic forum
earnest phoenix
#

i literally change

import Discord from 'discord.js'

to

#
import Discord from 'discord.js-light'

vivid fulcrum
vivid fulcrum
#

using sync code in an async function defeats the point of an async function if you get what i mean

cosmic forum
#

yeah

#

true

#

but is it what's causing the errors?

vivid fulcrum
#

🤷‍♂️

#

you never told us what the error is

cosmic forum
#
(node:999) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
(node:999) 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:999) [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.
(node:999) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'abilities' of undefined
(node:999) 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: 2)
(node:999) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'abilities' of undefined
(node:999) 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: 3)
#

Sorry, I had forgotten to.

vivid fulcrum
#

json is undefined because you don't return r.json()

cosmic forum
#

ah

vivid fulcrum
#

you should convert all of that mess into async code anyways

cosmic forum
#

Yeah, i'll do it rn

earnest phoenix
cosmic forum
#

@vivid fulcrum, I fixed it.

#

Thx

livid lichen
livid lichen
earnest phoenix
#

i'm testing in my computer

livid lichen
#

Great! Go to your terminal and remove a process. It should look like 2: node.

earnest phoenix
#

okk

livid lichen
#

(Tap the garbage can)

placid vault
#

Anyone know where I can look for javadocs for the wrapper? The readme on github doesn't seem to suffice.

quartz kindle
#

if you only see one message in your logs, then you have 2 bots running

earnest phoenix
simple zodiac
#

Hey could I get some help with a command I'm making? I have a purge command, and, it was working just yesterday but now it seems to have broken. I'm writing it in discord js btw. It is supposed to send an error if the person tried to purge more than 100, and purge the specified if it is less than 100. But it just doesn't do ANYTHING

if (message.content ===(`${guildPrefix}purge`)) {
  let canManageMessages = message.channel.permissionsFor(message.member).has("MANAGE_MESSAGES", false);
  if (canManageMessages) {
    var args = message.content.split(' ').slice(1);
    if (parseInt(args[0]) < 100 ) {
      message.channel.bulkDelete(args[0]).then(message.channel.send(`\`${args[0]}\` messages purged by ${message.author.tag}!`))
    } else if (parseInt(args[0]) > 100) {
      message.channel.send(`ooooops! I cannot purge more than 100 messages at once.`)
    }
  } else if (!canManageMessages) {
    message.channel.send(`Ooops! You don\'t have the \`MANAGE_MESSAGES\` permission and cannot do this.`)
  }
}
simple zodiac
simple zodiac
#

oh ok

#

sorry lol

earnest phoenix
quartz kindle
#

show your messsage event

earnest phoenix
quartz kindle
#

do this then

#

client.ws.on("MESSAGE_CREATE", m => console.log(m.content))

long crow
#

Btw Tim, we forgot 1 thing on the cache size of djs, the clientsOption.edithistory

#

It's all gucci now, but for sake of learning, I might trying detritus

lost wadi
#

How do I make the creation date like this? (message.author.createdAt)
15th Dec 20

quartz kindle
long crow
#

yea, saw it in wip PR

earnest phoenix
#

ex: 123d323m123h
how can i separate it into 123d 323m 123h?

quartz kindle
#

well this is one way

#

if d m and h are always in the same order

earnest phoenix
#

i want it to be ["123d", "323m", "123h"]

quartz kindle
#

this seems to work

earnest phoenix
#

thanks. i will try

silent hearth
#

my play command of the music bot I am verifying just stopped working for no reason, everything else works

quartz kindle
earnest phoenix
#

Ok

silent hearth
silent hearth
#

There is no way to make it work, all the copies of the bot that I had have stopped working, could it be discord?

#

Everything worked perfectly until a few minutes ago that it stopped working for me and I have not change anything

#

okay, give me a second

earnest phoenix
#

idk python pls help

#

it worked on my other install

#

same code

#

idk what happened

silent hearth
#

I send it in pastebin ?, it's long

#

the play command code

earnest phoenix
#
    print(graph_per_cpu(), end=" ")```
#

same KEKW

#

idfk

#

i dont use python KEKW

lavish minnow
#

Python good :(

earnest phoenix
#

ill just learn to make my own in c++ KEKW

#

👏

silent hearth
earnest phoenix
#

uhh wut

umbral zealot
earnest phoenix
#

"℃" is invalid

silent hearth
umbral zealot
#

do you have anything in your console appearing?

silent hearth
umbral zealot
#

Before that

silent hearth
#

nope

lavish minnow
# earnest phoenix "℃" is invalid

Ascii is a way of sending letters, like all the letters I'm typing rn are ascii, maybe try using a valid letter or number? Might be websites you can check for it

sour flame
umbral zealot
#

I see no reason for this to generate that error

earnest phoenix
umbral zealot
earnest phoenix
lavish minnow
earnest phoenix
lavish minnow
#

Oh goodness

umbral zealot
silent hearth
earnest phoenix
umbral zealot
#

So literally all those sends are for embeds

#

and all those embeds have contents

#

I do'nt seee how that could cause an error

silent hearth
umbral zealot
#

unless it's the return message.reply(error.message).catch(console.error); lines but those would send you the errors in console first

earnest phoenix
#

okay i give up

lavish minnow
#

Import it

#

Might have to do a pip Install

#

Put "import psutil" in the code and see if it fixes it@earnest phoenix

#

If not watchable video on how to use pip

lavish minnow
#

Hm

umbral zealot
earnest phoenix
#

i give up

#

i dont know python

umbral zealot
#

or find Sudhan's discord

earnest phoenix
#

i dont wanna use python

#

i just a

lavish minnow
#

Hold on lemme look at the code

earnest phoenix
lavish minnow
#

Maybe

earnest phoenix
silent hearth
earnest phoenix
#

so something is fucky

quartz kindle
earnest phoenix
quartz kindle
#

see if you can dig something

#

try a barebones bot

earnest phoenix
thin echo
#

Is anyone there?

#

How do I make this embedded, python:

#
  if msg.startswith("Lai hug"):
    await message.channel.send(random.choice(starter_hugtext))
    await message.channel.send(random.choice(starter_hugs))
#

hugtext is text, and hugs are gifs

#

I want to make it so it is one message

#

But I need to embed them

lavish minnow
#

@thin echo

Thyembed=discord.Embed(title="input value here", description=random.choice(starter_hugtext), color=input hex color here)
Thyembed.set_image(url="input image url here"
message.channel.send(embed=Thyembed)
#

Should work

#

Might bring errors since I'm writing this from my phone

thin echo
#

ok

lavish minnow
#

@thin echo this might also help you set it up, make sure to get rid of the "" around things that are referencing other parts of ur code or it will just send it as text https://codepen.io/orels/full/egZyxq

earnest phoenix
#

does anyone know any web builders that do not cost money for mak8ng the website and having it public?

#

like a free domain?

umbral zealot
#

free web builder and free domain are 2 different things

#

free domains are usually bad cheap ones.

#

As for free website "builders" that's a pretty wide definition tbh

earnest phoenix
umbral zealot
#

Both of those things can be easily found through google searches

earnest phoenix
#

i found some builders but not free domains that didn't what my full name where i live and my phone number

umbral zealot
#

Domain names are something that will always require your real contact information

earnest phoenix
#

i believe

umbral zealot
#

that's a free subdomain not a free domain though 😛

earnest phoenix
#

tru

#

tho i mean you could get like a name cheap one for $1 a year so not bad

#

is a subdomain one that is private?

umbral zealot
#

no a subdomain is something like thing.otherdomain.com

earnest phoenix
#

or docs.google.com

umbral zealot
#

you can get free .tk, .ml, .ga, .cf, .gq from freenom.com

earnest phoenix
#

o thats still better than what ive been able to find

simple zodiac
#

yeah and you could use something like google sites or weebly or many other builders that let you connect a domain

#

I use google sites & google domains because I'm incompetent and couldn't make a website lmao

short mason
#

Hello

simple zodiac
#

I believe google sites lets you connect any domain for free, not sure about weebly though

umbral zealot
#

I mean I literally googled free domains and that was the 2nd result

#

it's not that hard to google, c'mon

#

and then boom.

simple zodiac
#

yeah

short mason
#

Where do you speak spanish?

short mason
umbral zealot
#

No what

simple zodiac
#

lmao yeah what

#

what do you mean no

thin echo
#

the whole thing

earnest phoenix
#

i just:

# npm uni discord.js
# npm uni discord.js-light
# npm i discord.js-light
simple zodiac
#

what uh thing is that (idk what its called) like for the code block?

#

like how you do ```thing here

umbral zealot
#

"backticks"

simple zodiac
#

yes

#

but what do you put after that to get that specific colored one?

simple zodiac
#

I've used other ones before

#

like yml / fix / many others idk that one BC_sadpee

quartz kindle
#

that one's md

simple zodiac
#

thanks

quartz kindle
#

you can use hljs visualizer to test colors

#

chose the solarized dark theme

fiery copper
#

Does anyone know how to have per server things like filters and stuff? I have a filter for one server but other server may not like that

simple zodiac
#

oh cool thanks

#

I usually just pin a message in my test server with all of em

#

i dont have that md with # to get blue, but ik other ways

quartz kindle
#

there are over 100 languages, but most of them offer nothing interesting or are mostly the same

#

theres only like 10-20 interesting ones

simple zodiac
#

ig css has # blue too

#blue
``` you just cant have the space
quartz kindle
#

ye

#

i use less in my bot

simple zodiac
#

I'd say my most used one is js or yml cause js i use to send code easier, and yml is green and i think it looks cool

#

oh which color is that using what?

quartz kindle
#

i use it to list items

simple zodiac
#

it looks.. lime?

quartz kindle
#

like this

#
[abc][xyz]{fds}[xxx]
simple zodiac
#

oh ok

stark abyss
#

allData: [{}]
how do I add to this array in js ._.

quartz kindle
#

people can create and save things with my bot, and that shows a list of saved ones

stark abyss
#

allData.push("?")

simple zodiac
#

Oh what bot(s) do you have? I see you have the verified bot dev flag

umbral zealot
#
= I like asciidoc =

[It has nice colors]

== For commands ==
+ping      :: It... like... pings. Then Pongs. And it's not Ping Pong.
quartz kindle
#

my bot makes astrological charts

simple zodiac
#

oh cool

quartz kindle
#

xd

simple zodiac
stark abyss
quartz kindle
#

g2g sleep, its 3 am

stark abyss
#

gn

quartz kindle
#

c ya

simple zodiac
#

👋

stark abyss
#

so um can someone help me pretty sure it's a basic's basic question

#

allData: [{}]
how do I add to this array in js ._.

umbral zealot
#

there are many ways

#

usually, allData.push({ new: 'thing'})

#

that adds to the end of the array

stark abyss
#

ahh I forgot the {}, okay ty

umbral zealot
#

I mean that's if oyu want to add an object, of course.

stark abyss
#

Yeah I did wanted to

earnest phoenix
thin echo
#

WOW

#

My bot got accepted today

#

and drumroll

#

.. . . . . . . . . . .. . . . .. . ... . . . . . . .. . . .. . .

#

22 guilds

stark abyss
simple zodiac
lavish minnow
misty sigil
#

make exec async

#

and istg format your code

earnest phoenix
#

Umm okay

#

I understood

#
SqliteError: file is not a database
    at Database.prepare (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/quick.db/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at arbitrate (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/quick.db/src/index.js:365:8)
    at Object.get (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/quick.db/src/index.js:48:16)
at Object.exec (/app/src/commands/Setprefix.js:7:27)
at Object.exec (/app/src/listeners/message.js:15:31)
at MusicClient.<anonymous> (/app/src/structures/MusicClient.js:60:58)
    at MusicClient.emit (events.js:315:20)
    at MessageCreateAction.handle (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/rbd/pnpm-volume/779d4edd-06f1-4d31-b896-0195d42ffc0b/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
#

Umm🙄

vivid fulcrum
#

you corrupted it

earnest phoenix
#

Wdym?

vivid fulcrum
#

probably stopped the process during a write

earnest phoenix
#

Hm 🙄

#

Solution?

misty sigil
#

delete database file

earnest phoenix
#

It will create itself?

misty sigil
#

yes but your data's gone

earnest phoenix
#

Np it's testing bot 😂

misty sigil
#

it'll be a problem when it's not a testing bot and you don't have a backup ::))

opal plank
#

i did cool thing

long crow
#

Weebshin impact

summer torrent
opal plank
#

kinda pog not gonna lie

spare portal
#

working on a command for my bot that allows for a game to be played, in which the goal is to post words that either change one letter in the previous word, or add a letter. im using this function

function checkDifferentString(str1, str2) {
    let diff = 0;
  if (str1 === str2) return true;                    // equal return true
  let lengthDiff = Math.abs(str1.length - str2.length)
  if (lengthDiff > 1) return false;                  // checks length diff if > 2 return false

  for (let i=0; (i<str1.length || i < str2.length);i++) {
    if (diff > 1) return false;                     // diff greater than 1 return false
    if (str1.charAt(i) !== str2.charAt(i)) diff++
  }
  if (diff <= 1) return true
  else return false;
}

and it works fine if you add a letter to the end of the word (e.g. mat->math). but if you add a letter in the word (e.g. mat->malt), it says that the word doesnt follow the rules, when it does. how can i change the function so it also catches for letters inside the words?

#

this is the code for the checking command

if (!checkDifferentString(_word, lastMessage.content)) {
    var st = 0;
    if (!msg.author.bot) {
        msg.react("❌");
        if (!st) {
            msg.channel.send(`That word doesn't follow the rules of the game!`).then((msgg) => {
                setTimeout(function () {
                    msgg.delete();
                }, 1500)
            });
            st = 1;
        }
    }
}
quartz hill
#

How can I find out which shard I am in now? I am writing with discordjs v12 for the first time. shard.id doesn't work.and also How can I find out the number of guilds.

spare portal
#

for your second point, you could use client.guilds.cache.size

simple zodiac
#

Can bots not join stage channel VCs?

pale vessel
#

why not

simple zodiac
#

I tried to use one of my commands that joins a VC in a stage channel and it told me im not in a VC

#

it works in other channels

pale vessel
#

Watch erwin says "Maybe because discord.js bad, use detritus, it supports latest features" and he's right

simple zodiac
#

idk who that is + what that is

#

bruh lmao i moved my bot in and invited it to speak and it crashed ACOSP_lmao

pearl trail
#

creating stage channel only available on desktop app rn?

simple zodiac
#

Could I get help with a command I'm working on? I made an addemoji command. You provide an image link and then the name for it and it adds the emoji, but, when i give it an image and a name, it says it added the emoji, but it also sends the error. And, when I give it one or more things to give it an error (too long of name or too big emoji) it says it added it, but also sends the error mesage (obv it doesnt actually add the emoji) (Discord.Js) Code:

if (message.content.startsWith(`${guildPrefix}addemoji`)) {
  let canManageEmojis = message.channel.permissionsFor(message.member).has("MANAGE_EMOJIS", false);
  var args = message.content.split(' ').slice(1);
  if (canManageEmojis) {
    message.guild.emojis.create(`${args[0]}`,`${args[1]}`)
    message.channel.send(`Succesfully added your emoji, ":${args[1]}:"!`)
    .catch(message.channel.send(`Oops! I couldn't add \`:${args[1]}:\`. Possible errors: The name was over 32 characters in length | The file size of the image was above 256KB. | Your server doesn't have enough space for emojis.`));
  } else {
    message.channel.send(`oops! You don't have the \`MANAGE_EMOJIS\` permission!!`)
  }
}
languid temple
#

i have problems with some code i cant figure it out and then i need know how to put it online on the www as i have no clue i cant find out what i do wrong i get this error [dblapi.js] Warning: No DBL token has been provided. Ready to serve on undefined servers, for undefined users.

#

thanks, i will return if its still give me problems

#

@opaque fern it says not found ?

earnest phoenix
languid temple
#

@opaque fern yes excatly im still working on figure out where to upload my code

#

where to upload the bot code never made a bot for discord before now

#

okay so i dont need host it anywhere ? then good to know but how do it so work i hope its ok iim asking as im a noob here on this point 😉

dusky sundial
#

You do need to host it yourself, Top.gg is not a hosting service

#

The website is only used to list your bot to the public

languid temple
#

okay make sense where to host it ? site like heroku ?

dusky sundial
#

It's up to you where you want to host it, but it's generally recommended to use a VPS

languid temple
#

okay thanks 😉

grim lark
dusky sundial
#

Well, it's happening because channel isn't defined

grim lark
opal plank
#

this is pog

dusky sundial
#

The scroll bar was really hard to click though

dusky sundial
grim lark
dusky sundial
#

Is that the entire error message?

grim lark
earnest phoenix
earnest phoenix
copper cradle
#

show your code

cinder patio
#

looks like an internal error

vivid fulcrum
#

someone had the same error yesterday

#

they were running djs v11

#

if you are too, update to v12

tired panther
#

Tim has this keyboard lol

earnest phoenix
#

makes sense

median iris
#

can anyone help

#

i coded a music bot

#

and i code a cmd to stay bot in vc 24/7

#

but first bot is working

#

and idk why

earnest phoenix
#

=

#

?

median iris
#

2nd bot leaving channel

pale vessel
median iris
#

listen

#

i coded a music bot

#

and it stay in vc 24/7

#

and applied that same cmd to another bot

#

but 2nd one leave channel

#

idk why

#

:/

dim stag
#

re-apply

#

-apply

earnest phoenix
earnest phoenix
#

Coded 200 commands but can't pass them to V12?

#

Dont use copy paste command

earnest phoenix
#

The reason I didn't pass v12 music commands didn't work in v12

grim lark
coral stirrup
#

did d.js kill v11 or something?

earnest phoenix
#

d.js v11 bug fix removed

grim lark
earnest phoenix
#

Use v12

median iris
#

help pls

grim lark
median iris
#

this is code of my 2nd bot

#

of play.js

earnest phoenix
grim lark
median iris
#

this is whole cmd which i copy paste iin 2nd bot4

#

but 2nd bot not staying in vc 24/7

grim lark
coral stirrup
median iris
#

help ?

coral stirrup
#

@median iris please specify the problem

median iris
#

ok

#

i coded a music bot which stay in vc 24/7

grim lark
median iris
#

and i copy pastethe whole cmd and json files in 2nd bot

grim lark
#

I tried but many commands would disappear

median iris
#

with packages that i installed

#

but 2nd bot not staying in vc 24/7

#

Idk why

frail python
#

show the code where it keep bot in vc

coral stirrup
median iris
#

ok

median iris
#

check all

#

play.js

grim lark
#

😭

median iris
#

sorry

#

lemme show u error

#

I could not join the voice channel: ReferenceError: queueConstruct is not defined

coral stirrup
median iris
#

error

median iris
#

pls help

coral stirrup
coral stirrup
median iris
#

i need to code again

grim lark
#

neyse ben ağlamaya gidiyorum bye 😭

fiery copper
opal plank
#

not a single file should have more than 500 lines

frail python
#

holy

opal plank
#

unless its generated types

coral stirrup
#

500 is already overkill

#

but 3k????

opal plank
#

bet he's not using command handler

fiery copper
#

My largest file is like 200 and it's my command handler, but most of it is just the discord permissions

coral stirrup
#

i think he just put everything into his main file and thats it

opal plank
#

imagine needing a command handler

grim lark
opal plank
#

detritus has one built internally

coral stirrup
#

YES HE IS SURE

opal plank
fiery copper
#

Even back when my commands were in index.js with an external command handler that was like 150

coral stirrup
#

bet your server's running on 100% cpu & ram usage and the bot's response time is horrible, also you cant find shit in the file

opal plank
#

funnily enough

#

monolithic files are better than dynamic ones

grim lark
opal plank
#

you gain a couple microseconds by not having to require other files

opal plank
fiery copper
#

My bot is at 96ms ping rn

opal plank
#

ping is related to websocket, nothing to do with ur code

fiery copper
#

Ye ik

grim lark
fiery copper
#

@opal plank how do you do that thing you have with your status?

opal plank
coral stirrup
#

there shouldnt be any commands in the bot file

opal plank
coral stirrup
#

do you expect us to know turkish out of nowhere

grim lark
#

Turkish but you can read on translate

opal plank
#

frmo an image

fiery copper
#

If your bot is 3000 lines it better be fully sentient

coral stirrup
#

??

opal plank
#

100% gonna commit to translating an image to english

coral stirrup
#

lemme throw this pic into google translate real quick

#

bruh

fiery copper
#

I'm too lazy to get out of bed In the morning you think Imma learn Turkish to read something?

grim lark
#

This is a support place not a fight / domination place escapes

fiery copper
#

@grim lark what even is your problem

grim lark
opal plank
fiery copper
#

From scrolling up I've pieced together you're having an issue porting stuff to djs v12?

coral stirrup
#

the only thing we told you was that it would be a good idea to rewrite your bot because 3k botjs

median iris
#

replit is ok ?

fiery copper
#

3k on any bot file is outrageous

opal plank
frail python
#

bad? its perfect for small bots

opal plank
#

not by any strecth

#

you should avoid using heorku/glitch/repl

fiery copper
#

Heroku has never worked for me

frail python
#

why exactly is it bad

opal plank
#

ugh, here we go again

fiery copper
opal plank
# frail python why exactly is it bad

first, they werent meant for discord bots as in, they go to "sleep" once in a while to save on resources, unless pinged. On the same not, some of them will limit the amount of hours/days or memory/cpu usage you can use, and some of them wont even allow you to use storage locally, which is a pain if you need to save some stuff in the disk. Not only that, you're much better off using your own pc due to the little amount of resources they offer you since its free, you arent getting much at all, any decent new device(from 2009+) will be handling stuff a lot better. Not to mention a vps is around $5 for some good specs, using those services shows 0 care at all for the bots quality

cinder patio
#

If you don't want to spend any money on hosting, repl is your best option

frail python
#

if its a small bot it doesnt need much resources

#
  • u can hide token
craggy pine
#

But if you’re making a bot to list on top.gg to grow it should have a better host since you’re wanting it to grow

opal plank
fiery copper
craggy pine
#

Quality > quantity

frail python
opal plank
#

you welcome

#

thank you for pointing out you can hide tokens

frail python
#

i identify as a pointer

fiery copper
#

Discord dmed me when I accidentally leaked my token, they auto reroll it i think

opal plank
#

regen*

#

and yes, they do if you post your token on github

fiery copper
#

Sometimes it takes a minute for the new token to work so your bot will be bricked for a while

#

So your better off just putting your token in a .env or something and then setup a .gitignore to hide it

median iris
#

ok ill use vsc

opal plank
cinder patio
#

everyone does it

feral aspen
#

Holy hell.

cinder patio
#

cool

earnest phoenix
#

they should look at glitch + repl it tho

feral aspen
#

I like how it happened on January and didn't receive an email until now.

#

😂

frigid mountain
#

How do I turn these into a command

if(message.content.startsWith(`${config.prefix}modmail`)) {
  const user = client.users.cache.get('774903577068044298')
    user.send('Hey im just a all in 1 bot cool right')
    message.reply("sent him the mail")
  }
cinder patio
#

? already looks like a command to me

frigid mountain
pearl trail
#

use command handler

feral aspen
#

Ayo.

#

Is there a way to refuse it from allowing DMChannel?

#

I want it only for a guildChannel

opal plank
#

whats the average ratelimit for editing channels/channel topic?

#

ping pls

feral aspen
#
if (message.channel.type === "dm") return;

if (!guild.available) return;
#

Which one?

slender thistle
#

guild.available can be false when a guild is in outage for whatever reason

feral aspen
#

First one it is, more like it.

slender thistle
#

The first one is more reasonable. You could also probably do if (!message.guild) return;

feral aspen
#

I'm trying to do for the channelCreate event.

#

so.

#

if (channel.type === "dm") return;

slender thistle
#

Yeah, that should work

feral aspen
#

👍

cinder patio
#

Also

#

there won't be a guild object if the message is a dm

#

so you can also !guild

bright thorn
#
from discord.ext import commands
import aiohttp
import dbl
import discordlists.py # imports (must be over the code) 

class discordbotlists(commands.Cog):
 def init(self, bot):
  self.bot = bot
  self.token = 'api-token' # botsfordiscord
  self.token2 = 'api-token' # discord bot list
  self.dblpy = dbl.DBLClient(self.bot, self.token2, autopost=True) ## passed in the api token of the discord bot list bot
  self.api = discordlists.Client(self.bot) ## creates an instance of a discordlists client
  self.api.set_auth("botsfordiscord.com", self.token) ## passed in the api token of the botsfordiscord bot
  self.api.start_loop() ## loops every 30 mins

def setup(bot):
    bot.add_cog(discordbotlists(bot))

this is right for guild count on top.gg for my bot

cinder patio
#

60 seconds

stuck pike
#

O

cinder patio
#

I believe?

stuck pike
#

So many days after I m here

quartz kindle
opal plank
#

oh

#

shit

bright thorn
#

check this

opal plank
#

u kidding me]

bright thorn
#

i need help

opal plank
#

thats why that shit was more clogged than a BurgerKing's bathroom

quartz kindle
#

looks alright, test it and see if it works

quartz kindle
opal plank
#

fucking stage channels require a channel topic

#

reeee

#

thats why it wasnt joining all of the times

#

legit was await channel.editTopic()

#

if the ratelimit is that low, it would've legit taken up to 10 minutes for it to fully connect as a speaker

bright thorn
#

where i get self.token = 'api-token' # botsfordiscord
self.token2 = 'api-token' # discord bot list

#

api token

opal plank
#

@quartz kindle come join check stage channels

opal plank
quartz kindle
#

yes they broke discord.js

#

but join where

#

in your server?

opal plank
#

yup

quartz kindle
#

k

#

weeb music

opal plank
#

its different stations

#

look in bot-spam

frigid mountain
#

Should I change the

message.client.users.cache.get

To

message.mentions.members.first()

Cause I want to make it so I don't have to add the persons I'd and just ping them instead

feral aspen
#

Instead of message.client.users.cache.get('ID HERE'), use message.guild.members.cache.get(args[0]);

quartz kindle
#

for mentions you use message.mentions yes

earnest phoenix
#

I have my v11 unplugged? no bots are working i did it from google translate may be error

quartz kindle
#

v11 is dead

rich tree
#

hi

earnest phoenix
#

😭

rich tree
#

I would have a question

#

@earnest phoenix knk

earnest phoenix
summer torrent
#

they pushed a fix on new version

opal plank
#

oh so thats what tim meant

#

hehehe

#

death to all v11 bots

quartz kindle
#

v11 is finally dead dead

#

stage channels straight up crash it

quartz kindle
#

yes

opal plank
#

they ahd what? 7 months to switch?

#

it was september iirc when they announced it

quartz kindle
#

pretty sure more than a year

opal plank
#

possibly yeah

#

if they ditn switch, its on them

quartz kindle
#

when was djs 12 released?

opal plank
#

they ahd the time

#

erm

#

good question

quartz kindle
#

v11 was deprecated as soon as v12 was released

#

so they had since then

crimson vapor
#

hi Tim and Erwin

quartz kindle
opal plank
quartz kindle
opal plank
#

frick

#

beaten by mere seconds

quartz kindle
#

:^)

#

as fast as a flash

opal plank
#

you tell that to the chicks too?

quartz kindle
#

nope :^)

opal plank
#

gottem

#

all night

crimson vapor
#

erwin

#

what the fuck

opal plank
#

me

crimson vapor
#

loli_dance

opal plank
#

got a problem m8?

feral aspen
#

I don't know if this is possible.

crimson vapor
#

sus

quartz kindle
opal plank
#

go watch the rest million

feral aspen
crimson vapor
opal plank
#

whole thing?

crimson vapor
#

11 episodes

opal plank
#

good

opal plank
#

did you like or, love it, okay, or hated it?

quartz kindle
crimson vapor
#

I have no anime to compare it to but it was pretty good

feral aspen
crimson vapor
#

been so long since I binge watched something

opal plank
feral aspen
#

What is .addfields?

opal plank
#

i'll keep the quality up for ya if you want some more

quartz kindle
opal plank
#

takes an array of fields iirc

crimson vapor
#

if you dm me animes and crunchyroll links I might watch them

opal plank
#

[{name, value, inline}, ...]

opal plank
#

its much better

quartz kindle
#

watch kara no kyoukai

feral aspen
#

Oh.

quartz kindle
#

theres like 6 movies

crimson vapor
#

I have internet man

#

I just don't know how KEKW

quartz kindle
#

check out stremio

opal plank
quartz kindle
crimson vapor
#

what the fuck is fast

#

well it says 220

#

but speedtest says 500

opal plank
#

220mbps good

quartz kindle
#

220kbps

#

:^)

opal plank
crimson vapor
#

LOL

opal plank
#

you should trust it a bit more

crimson vapor
#

good point

opal plank
#

a couple ISP's do ask some known speed testing sites to bump their stuff

crimson vapor
#

ah

opal plank
#

@quartz kindle decent distribution

#

actually

crimson vapor
#

ye speedtest says 480

umbral zealot
#

It's been a year, it's about damn time you update.

earnest phoenix
#

200 commands very difficult to pass v12

umbral zealot
#

Well you had an entire year to update.

#

You procrastinated, now pay the price. You have to update.

earnest phoenix
#

But I just started writing code

umbral zealot
#

What?

earnest phoenix
#

V11 friend said easy

#

so i started v11

umbral zealot
#

Well your friend is an idiot for suggesting you should use v11 and you're an idiot for listening to him since v12 has been out for a year. Sorry buddy.

#

There's no arguing your way out of this. V11 is 100% dead.

crimson vapor
#

bit far, don't ya think

earnest phoenix
#

So do I v12 proof my codes?

umbral zealot
earnest phoenix
#

thanks

slender wagon
#

So i've been working on my dashboard and when i try to check on a server when the server owner is offline it throws an error

#
let owner = guild.owner.displayName
#

it only happens when the owner is offline otherwise it works fine

feral aspen
#

I am not sure why the bot doesn't cache the owner, you may have to wait for another user to help as it may benefit me as well.

slender wagon
#

oh okay

#

all the intents are on

umbral zealot
# slender wagon

You have to fetch them. await guild.members.fetch(guild.ownerId)

slender wagon
#

oh okay

umbral zealot
#

I believe it should assuming your bot is not verified or it does have the intents enabled.

summer torrent
#

you need intents for receiving member related events

slender wagon
#
 res.render("serverpage",{user:req.session.user,count:guildobj.memberCount, pageTitle:"Edit Guild" , name:guildobj.guildname etc...

^^ This renders the serverpage which gets the guildobjects such as membercount ownername and more

async function manageguild (g_id){
 let guild = bot.guilds.cache.get(g_id)
 const ownerId = await guild.members.fetch(guild.ownerID)
  if(guild) {
    let memberCount = guild.memberCount
    let guildname = guild.name
    let iconurl = guild.iconURL()
    let owner = guild.owner.displayName
    let id = guild.id
    return {memberCount,guildname,iconurl,owner,id}
  }
  return "You dont share mutual guild with the bot"
}

when i added async in the function it still logs it right but it doesn't show it on the page

tired panther
#

Guys look what happend to the discord.js server RIP

slender wagon
#

what could the problem be

#

link?

tired panther
slender wagon
#

oh

crisp zodiac
#

Hello,

I am coming to you because I have a problem using the bot

Normally, I have the reactions in this direction the

  • Validate
  • Refuse
  • Attempt

But there I had a weird thing. The Validate reaction displays :null:

Has anyone ever encountered this kind of problem ?

pale vessel
#

Go to the bot's support server

median iris
#

idk how to run node . cmd

crisp zodiac
#

thx

west junco
#

hey guys is there a way to get as a variable the number of server that uses the bot in discord.py?

quartz kindle
#

something like len(client.guilds)?

#

i dont know py

west junco
quartz kindle
#

when did it stop working?

#

do you use intents?

median iris
#

best app for coding a bot ?

west junco
quartz kindle
west junco
quartz kindle
#

you want to actually code a bot, or you want to use an app that does everything for you?

median iris
#

visual code ?

#

im using it

west junco
#

is better

quartz kindle
#

its literally the same thing

west junco
#

no

quartz kindle
#

the full name is "visual studio code"

#

aka "vsc"

median iris
#

now wht the cmd for running the app

#

node . ??

slender wagon
#

Tim does async change the way how things are imported on another file?

west junco
slender wagon
#

this case

median iris
#

tell

#

wht is the cmd for running

#

bot

#

in vsc

#

in vsc

#

?

west junco
quartz kindle
#

one said studio code, the other said visual code, both have "code" in it, so they are both the same "visual studio code"
the one thats different doesnt have "code" in the name

median iris
#

Tim tel;l pls

quartz kindle
#

do you know what a programming language is?

median iris
#

yes i just started

#

it

west junco
#

python is pretty easy to start with

median iris
#

currently im using replit

quartz kindle
#

what language are you using in repl.it?

frigid mountain
#
const Discord = require('discord.js')

module.exports = {
 name: 'dm',
 run(message, args) { 
  const sayMessage = args.join(" ")
  const user = message.mentions.members.first()
    user.send(`${sayMessage}`)
    message.reply("sent him the mail")
  }
}

This code is for my discord bot to dm the mentioned user with my message now I tried to make it embed and I failed so can someone pls help me make it embed

quartz kindle
#

show what you tried

frigid mountain
# quartz kindle show what you tried
const Discord = require('discord.js')

module.exports = {
 name: 'dm',
 run(message, args) { 
  const sayMessage = args.join(" ")
  const user = message.mentions.members.first()
  let embed = new Discord.MessageEmbed()
    user.send(
        .setTitle("Modmail")
    .setDescription(sayMessage)
    .setColor("#00ff00")
  
)
    message.reply("sent him the mail")
  }
}
quartz kindle
#

user.send(embed)

#

the .setTitle .setDescription etc have to be right after let embed

frigid mountain
#

Ow thx

quartz kindle
#

so that its like this: let embed = new Discord.MessageEmbed().setThis().setThat().setEtc()...

slender wagon
#
const {userhit,manageguild,checkguild,modifyguild} = require("../bot/webapi_handler.js");
let id,guildobj,mutualguilds,webuser;

Can i import a async like this?

#

it started returning undefined just when i added async to the webap_handler.js

umbral zealot
#

You can only import things that are exported at the top level

#

can you show us what webapi_handler.js looks like?

west junco
#

is there a way to show bc len(client.guilds) dosen't work

status = cycle([f"inside of {len(client.guilds)} guilds wow!"])

@tasks.loop(seconds=10) # does the given task every 60 seconds
async def changeStatus():
print(client.guilds)
await client.change_presence(status=discord.Status.online, activity=discord.Activity(type=discord.ActivityType.listening, name=next(status)))

#

?

umbral zealot
umbral zealot
#

well that's not exported now, is it

slender wagon
umbral zealot
#

I have no way to guess if it's exported or not

slender wagon
#

Cuz it did export without async

umbral zealot
#

because the code doesn't show it

quartz kindle
slender wagon
#

Thanks

umbral zealot
#

That's... not... the same question or the same answer, I guess I'm confused.

slender wagon
#

But it still was logging it right

#

On that file but in the other file where it was being exported nope

#

I will have to await em all

#

And will get back in here

umbral zealot
#

Anything that returns a promise must be awaited or resolved with .then(), it's unrelated to whether it's exported or not

slender wagon
#

Aightys

#

Ty

quartz kindle
#

everything inside the function will work correctly

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

but the return value of the function goes to limbo if the function is not awaited

sage bobcat
#

One message removed from a suspended account.

quartz kindle
shy turret
#

well

#

you can upload code files now

#

if you wanted to know

#

if anyone wanted/needed it for this channel

frigid mountain
#

To set permissions for my command do I use

if(message.member.hasPermission("MANAGE_MESSAGES")
earnest phoenix
#
TypeError: Cannot read property 'commands' of undefined
#

You never define a property called commands to the client

#

How can I define them 🙄

#

By defining them obviously

pale vessel
#

Very helpful

earnest phoenix
#

You can define a property by either using the assignment operator (=) or by using Object.defineProperty(), here's an example:

client.commands = new Discord.Collection();```
dusky lagoon
#

my index exist of command loaders im not sure anymore if that also counts as handlers

earnest phoenix
#
TypeError: categories is not iterable

willow mirage
#

I just got fucking rick rolled by teams.js

earnest phoenix
earnest phoenix
umbral zealot
#

Oh so no one else can help you? smh

earnest phoenix
umbral zealot
#

I mean don't post code in someone's DMs. post it here so others can help.

dusky lagoon
earnest phoenix
#

huh

quartz kindle
#

finally

#

i have like 60 message.txt files in my downloads folder

umbral zealot
dusky lagoon
#

it wasnt a insult it was a joke damn

latent heron
#

PEP 401 just got released