#development

1 messages · Page 1122 of 1

solemn latch
#

Not sure how to help with that.

jolly wave
#

wait

opaque eagle
#

woah it works now

#

@lusty quest ty man

lusty quest
#

np

jolly wave
#

it's the error

lusty quest
#

i wont open random files on discord

jolly wave
#

bruhhh

opaque eagle
#

Spaces in directory names 🤮

lusty quest
#

you can embed trojans into txt files

jolly wave
#

dude

opaque eagle
jolly wave
#

i need help

#

i am not here to hack someone

thick gull
#

YOO bet I want a Trojan

lusty quest
#

then use hastebin like every other sane person

opaque eagle
#

^

#

It'd be super annoying to download and open up every .txt file you post

jolly wave
#

Error: Cannot find module '../User'
Require stack:

  • J:\Hi Bot(js)\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\structures\GuildMember.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\managers\GuildMemberManager.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\structures\Guild.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\managers\GuildManager.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\client\Client.js
  • J:\Hi Bot(js)\node_modules\discord.js\src\index.js
  • J:\Hi Bot(js)\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at TextChannel.send (J:\Hi Bot(js)\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:154:18)
    at Client.<anonymous> (J:\Hi Bot(js)\index.js:79:17)
    at Client.emit (events.js:327:22)
    at MessageCreateAction.handle (J:\Hi Bot(js)\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (J:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (J:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
    (node:8720) 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)
#

duh

opaque eagle
lusty quest
#

you request somewhere /user but its not defined

opaque eagle
#

show us your index.js

surreal notch
#

when will v11 discontinue?

misty sigil
#

Holy fuck

thick gull
#

cannot find user

lusty quest
#

October

misty sigil
#

USE A HASTE PLEASE

thick gull
#

when will v11 discontinue?
@surreal notch October

jolly wave
#

ok

opaque eagle
#

I found this cool project the other day on github

faint prism
#

Error: Cannot find module '../User Check your filenames and directory traversals

jolly wave
#

i bet it's gonna be too long

opaque eagle
misty sigil
#

use a bin then ffs

surreal notch
#

and can someone tell me how to update serveer count in top.gg i cant understand docs

opaque eagle
#

Lol

#

the docs are already made for babies

#

"Number or Array of Numbers"

digital ibex
#

they provide examples

surreal notch
#

where

jolly wave
#

i only copied and pasted that

#

const Discord = require('discord.js');
const { prefix, token } = require('./config.json');

const client = new Discord.Client();

client.once('ready', () => {
console.log('Ready!');
});

client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;

const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();

if (command === 'ping') {
    message.channel.send('Pong.');
} else if (command === 'beep') {
    message.channel.send('Boop.');
}
// other commands...

});

client.login(token)

#

bruhhh

solemn latch
#

In the docs

jolly wave
#

that was in the guide ;-;

opaque eagle
#

imma have a heart attack reading these non-codeblock, non-hastebin snippets

misty sigil
#

USE ```

solemn latch
#

Wheres your command handler at

#

You said you had one already

misty sigil
#

imma have a heart attack reading these non-codeblock, non-hastebin snippets
@opaque eagle same

jolly wave
#

e

solemn latch
#

Follow the guide in order

faint prism
#

you can embed trojans into txt files
@lusty quest
No. A text file isn't embeddable. It's simply a file full of characters, and unless you attempt to run it as an executable you're fine.

Also:

A genuine txt-file can contain virus code but it cannot be executed, so it's totally safe. However, a file can use double file extension like this, so watch out:
a-virus-file.txt.exe
Windows hides by default .exe because it's a known file type.

misty sigil
#

real programmers test in prod
@quartz kindle welp I must be the realest programmer ever

opaque eagle
#

Is that the actual contents of the index.js file when you ran it? @jolly wave

jolly wave
#

oooooof wait

opaque eagle
#

me comfy af with github actions

radiant kraken
#

Don't forget to use ```

opaque eagle
#

^

jolly wave
#

e

opaque eagle
#

```js
CODE
```

faint prism
#

me comfy af with github actions
@opaque eagle Get dat pipeline boi

misty sigil
#

or use a hastebin if it’s too long

opaque eagle
#

^

misty sigil
#

please don’t just

Djhsjhjs

opaque eagle
solemn latch
#

Let number = 2
?

#

vclose = 0

misty sigil
#

literally that

solemn latch
misty sigil
#

please

#

learn some basic js ffs

radiant kraken
#

@earnest phoenix are you new to javascript?

#

Don't just jump to discord.js without learning the basic stuff of the language itself

misty sigil
#

yea ^

digital ibex
#

thats why discord.js is so great

misty sigil
#

you should learn base js first.

faint prism
#

man i dropped the ball just now, accidently set my prod prefix to: debug+ instead of +

misty sigil
#

oof

faint prism
#

I dumbly copied over my config.json which also contained the debug prefix

#

derp

misty sigil
#

derp

digital ibex
#

nice 1

misty sigil
#

May I tell you to fuck off, autocorrect

solemn latch
#

^ i swear sometimes

misty sigil
#

the autocorrect devs need help from us

solemn latch
#

When I was trying to type the variable name, it took like 3 attempts because auto correct

faint prism
#

Question: Is it adverting if I ever post my bot's source repo?

pale vessel
#

no

misty sigil
#

I don’t think so

pale vessel
#

if you have a reason to

#

e.g. need help with code why not

jolly wave
#

you see the f******* bug

#

it deleted my bot file

pale vessel
solemn latch
#

You made code that deleted a file?

thick gull
#

okay

jolly wave
#

idk

faint prism
#

Well, I want to know if any Discord.NET devs want to view my source. I follow S.O.L.I.D. design principles, so I figure it'd be refreshing to see good coding lol

jolly wave
#

but something cleared my usb key

#

where my bot files was

thick gull
#

ok

solemn latch
#

Probably should start using git

faint prism
#

reformat

dense heron
#

why am i getting this error when my procfile is exactly named: Procfile

misty sigil
#

that isn’t an error by the looks of it

faint prism
#

git init; git add .; git commit -m "First commit! :)"

radiant kraken
#

Forgot the "

misty sigil
#

why am i getting this error when my procfile is exactly named: Procfile
@dense heron it’s procfile

#

not Procfile

faint prism
#

ty

opaque eagle
#

Doesn’t matter

misty sigil
#

wait it doesn’t?

pale vessel
#

it's actually Procfile and it mattered for me

opaque eagle
#

Both should work

pale vessel
#

at least for me...

dense heron
solemn latch
#

Not case sensitive?

pale vessel
#

it was for me

dense heron
opaque eagle
#

Now worker should be lowercase

radiant kraken
#

Procfile worked for me

#

Worker just need to be lowercase

jolly wave
#

what the f***

#

added the usb key again

radiant kraken
#

worker not Worker

jolly wave
#

and the file is still here

golden condor
#

You don't need to censor swearing

solemn latch
#

Probably should still start using git

jolly wave
#

e

dense heron
#

nope still wont work

radiant kraken
#

Swearing isnt against the rules

jolly wave
#

had a heart attack when i saw nothing was on my usb key

#

xd

#

i was about to create a new bot

dense heron
#

why is it not working???????

pale vessel
#

code harder

radiant kraken
#

why is it not working???????
@dense heron Worker: needs to be lowercase

dense heron
#

that didnt work either

radiant kraken
#

Is the logs the same?

dense heron
#

Is the logs the same?
@radiant kraken yes

solemn latch
#

Its litterally
variablename = whateveryousetvariableto

#

I cannot be more clear than that

radiant kraken
#

Yeah

solemn latch
#

I've linked you to things that explain variables

radiant kraken
#

Yes it's fucking simple

opaque eagle
#

@earnest phoenix have you finished learning JavaScript so quickly?

slender thistle
#

You people need to chill

solemn latch
#

I'm being nice tho pandasad

earnest phoenix
#

If you don't even know what a variable is, I suggest you stop what you are doing, & go read a book about the programming language you are attempting to use

Also yes, what Avacado is saying

pale vessel
#

nice server

dense heron
#

so why is it not working its so fucking annoying

sonic lodge
#

"Avacado"

earnest phoenix
#

Yes

#

Avacado

#

My bot was approved but it isnt in here

#

When will you add

opaque eagle
#

Check mod logs to see if it’s kicked

pale vessel
#

wait patiently

slender thistle
pale vessel
#

he should have the developer role

solemn latch
#

It does say approved

dense heron
#

@radiant kraken any clues?

radiant kraken
#

Idk sorry, it's long since the last time i used Heroku

dense heron
#

ok

slender thistle
#

he should have the developer role
@pale vessel don't rely on the role anymore, Luca keeps erroring out on assigning the role because Discord™️

midnight blaze
#

I am doing a command, with wich u can create a temporary voice channel, that gets deleted, when nobody is in it, but for now it gets deleted, because when I type the command, there is nobody in the room and it gets deleted. The things is, when I use setTime, it also gets deleted.

faint prism
#

Who made Luca?

midnight blaze
#
.then(cha => 
              (message.member.voice.connection)?console.log(connected):cha.delete({ timeout: 10000, reason: 'It had to be done.' }))
pale vessel
#

web admins and ken

#

ken was probably a web admin, idk i'm a new guy

solemn latch
#

You mean when the timer ends it still deletes it @midnight blaze ?

#

Or the bot is still instantly deleting the room

midnight blaze
#

the bot deletes the room

#

even when I am connected

#

but It should not delete it when I am in the room

solemn latch
#

Your timer needs to check if someone is in the room before deleting, aswell as any room deletions need to check before deleting

midnight blaze
#

well that is what I am doing, or at least what i tried to do

#
              (message.member.voice.connection)?

#

if this is true : console.log(something)

#

else delete

solemn latch
#

That would check if a specific member is in a voice channel right?

#

Not if anyone's in the voice channel

midnight blaze
#

well, that was my idea

#

the person who is making the channel

#

if he leaves, then it gets deleted

#

no matter if someone is still there

solemn latch
#

Then you'd probably want to store members and their respective channels in a variable

midnight blaze
#

this is a command for my language learning server. A command for teachers, they open a voice room. If they leave, the channel should be deleted.

#

hmm

#

ok 🤔

#

but why should I?

#

they make a command and I use the message event, so I get the information that I need

#

channel and msg id

earnest phoenix
#

Help me gays

misty sigil
#

ok

earnest phoenix
midnight blaze
#

this is developement @earnest phoenix

#

wrong channel

dire obsidian
#

Avocado

midnight blaze
#

Ok, so anyone an idea how to make such a command?

#

I kinda had it for a while, but then I messed it up and I can not figure it out how I manage it to make it work

restive pebble
#

db

midnight blaze
#

why db? 🤔 I dont need to store data

restive pebble
#

u have to

#

author id and channel id

faint prism
#

Oh yeah?

surreal notch
midnight blaze
#

u get author id and channel id by the message event listener

restive pebble
#

guildDelete lol

midnight blaze
#

lol

#

GuildDelete

earnest phoenix
#

@restive pebble

faint prism
#

I don't store guild or channel info

surreal notch
#

Ok

earnest phoenix
#

Get me projekt bot security

restive pebble
#

like a person made a channel

midnight blaze
#

with a command, yep

restive pebble
#

ok

#

text?

midnight blaze
#

?createchannel

faint prism
#

If i want to reference it, I just get the values from the client session. I don't need to store it though

midnight blaze
#

if author id is connected to channel = channel wont get deleted

#

why do I need db for that

restive pebble
#

voice or text channel?

solemn latch
#

the db would be in cases your bot restarts

midnight blaze
#

voice

solemn latch
#

when starting up, the bot will have no clue whos the owner of what channel

earnest phoenix
#

that's all in memory though 👁️ 👄 👁️

midnight blaze
#

aha, but woo, it is only for my own server :p

earnest phoenix
#

yeah what woo said

midnight blaze
#

not for many servers you know

#

just a little command, not a big deal if it gets offline

solemn latch
#

youll have to manually clean up rooms then from time to time

faint prism
#

@earnest phoenix, what lib do your bot's use

restive pebble
#

ok u have to use global variables then rip

#

voiceStateUpdate thing

earnest phoenix
#

@faint prism newer bots use disqord or dsp, older ones use discord.net

midnight blaze
#

voiceStateUpdate

restive pebble
#

then match that user id

midnight blaze
#

hmm

#

ok

#

sounds about right

restive pebble
#

.net GWjianWut

faint prism
#

.net :GWjianWut:
@restive pebble I use .NET

midnight blaze
#

I am sure with some promises you would be able to do it xd

restive pebble
#

ok cool

faint prism
#

You aren't dissing .net are you?

midnight blaze
#

we need .kek url

jolly quail
#

There's .wtf

#

Lol

faint prism
#

.succ

misty sigil
#

i wanna make my own tld

#

.clarkson

jolly quail
#

Hmm

#

Seems tough cuz I've no idea how to yet

misty sigil
#

jeremy.clarkson

faint prism
#

That'd almost seem like a local domain

midnight blaze
#

I have .dev url tho 👀 namecheap is nice

faint prism
#

like rasperypi.localhost

earnest phoenix
#

you get .dev for free on some provider with github edu pack

faint prism
#

what fr

earnest phoenix
#

yeah

jolly quail
#

Ya i got .wtf free

#

XD

faint prism
#

Guess I better go claim it

surreal notch
#

Ok I wanted that if someone uses my cmd it should show me in my official server

faint prism
#

mhmm

earnest phoenix
#
bot.guilds.cache.get("ur server id").channels.cache.find(c => c.name === "channel name").send(cmd)
#

@surreal notch ^^^

misty sigil
#

happy bd @earnest phoenix

earnest phoenix
#

thx

#

oh

faint prism
#

happy bd

earnest phoenix
#

before .get add .cache

#

and before .find add .cache

solemn latch
#

happy birthday

earnest phoenix
#

Thx everyone

#

:))

faint prism
#

Does anyone have a CI/CD pipeline setup?

surreal notch
#

@earnest phoenix I don't want only for my server but for every server my bot is

earnest phoenix
#

i just use github actions

#

@surreal notch wdym

#

i didnt get it

faint prism
#

That's a pipeline @earnest phoenix
Do you use it for deployment to prod?

earnest phoenix
#

U wanted to send cmd that ur typed to ur channel in ur server

surreal notch
#

@earnest phoenix I want that if my bot is in ur server and u uses the cmd that should reflect in my server that this user have used this cmd in this guild

earnest phoenix
#

Yes that what i mean

#

so what is the problem Thonk

#

That is the right code

surreal notch
#

Why I have to give server id

solemn latch
#

because you have to get your guild

#

message.guild wont be your guild

faint prism
#

It's the incoming message's guild

surreal notch
#

Ok let me try

earnest phoenix
#

That's a pipeline @earnest phoenix
Do you use it for deployment to prod?
@faint prism nah since i don't have any applications that need deployment however it can be used for deployment

stable eagle
#

So uh, im having some pain figuring out how to make a trigger for commands in discord.js

Does anyone know how?

earnest phoenix
#

i release builds of an application with it though

#

just prefix my commit message with [rel]

calm junco
#

can u add my bot pls

earnest phoenix
#

pay me

faint prism
calm junco
#

pwease

faint prism
#

advert

misty sigil
#

no ads.

calm junco
#

sorry

slender thistle
#

-faq 1

gilded plankBOT
slender thistle
#

Don't just go asking people to invite your bot

earnest phoenix
#

but if you give me money i wont mind it

midnight blaze
#

this doesnt work

.then(cha => message.member.voice.cha.join())
#

if my member would join

calm junco
#

how do u login to ur bot

midnight blaze
#

I could do it

#

anyone a clue why?

calm junco
#

?

slender thistle
#

What do you mean, cloudiix?

midnight blaze
#
UnhandledPromiseRejectionWarning: TypeError: Cannot read p
roperty 'join' of undefined
calm junco
#

that

earnest phoenix
#

lol

midnight blaze
#

where is TIM he would know how

slender thistle
#

What do you expect message.member.voice.cha to be

midnight blaze
#

cha => the created voice channel

thick gull
#

you make a selfbot with a fake discord link to force your selfbot to join a server

#

that’s how

calm junco
slender thistle
#

That means you must be logged in on top.gg to submit your bot

earnest phoenix
#

it doesn't say you must be logged in with your bot

#

at all

faint prism
#

Selfbots are against TOS

calm junco
#

ohh

thick gull
#

i KNOW

calm junco
#

oof

thick gull
#

:(

calm junco
#

im dumb lol

earnest phoenix
#

you did not have to tell us that

restive furnace
#

cha => the created voice channel
use cha then

faint prism
#

I'm using Azure DevOps pipeline. I'd like to (on build & unit test pass) checkin the commit to gated main branch.
On the main branch I'd need a CD pipeline that on new commit, builds and publish the build artifacts via SSH to my bot server.

Does that sound like how I should go about that?

earnest phoenix
#

Someone knows a way to let your bot sends a message after getting added

#

JS

surreal notch
#

@earnest phoenix

#
client.on("message", async message => {
client.channels.cache.get("727217470431035492").send(`${message.content.split(' ')[0]} command was ran at ${message.guild.name} by ${message.author.username}`);
})```
#

Ur code didnt worked

#

But maybe this work

restive furnace
#

guildCreate, mehh @earnest phoenix

#

cant ppl read the docs, like wut

earnest phoenix
#

oof

#

sorry

#

:

midnight blaze
#

ok

earnest phoenix
#

Btw don't make selfbots

midnight blaze
#

I hope somone is here

earnest phoenix
#

its just dumb

#

yes

solemn latch
#

no ones here

#

sorry

midnight blaze
#
.then(cha => (message.member.voice.cha)? message.member.voice.cha.join():console.log("test"))

xD

earnest phoenix
#

Lmfao

restive furnace
#

i did explain you to use cha

earnest phoenix
#

cha is not a property

restive furnace
#

not messagemembervoicechannel

midnight blaze
#

u mean

restive furnace
#

cha is not a property
^ of messagemembervoicechannel

midnight blaze
#

aha

#

I see^^

slender thistle
#
let x = 5
// error because `a` doesn't have an `x` property
console.log(a.x)

// no error, will output 5
console.log(x)```
#

A property is attached to an object/class, a variable is in separate scope

midnight blaze
#

free, I know what u mean, but my bot joins then^^ that is why I am using message.member

#

.then(cha => cha.join())

#

I want that my member joins and not my bot

restive furnace
#

what you want then?

earnest phoenix
#

what

restive furnace
#

its not possible k

earnest phoenix
#

you can't force other people into a voice channel

solemn latch
#

you cant make a member join a channel

earnest phoenix
#

are you on crack

solemn latch
#

if your bot has permission, it can move a member

#

but the user needs to be in a channel already

midnight blaze
#

that, I can do. Lol

earnest phoenix
#

no, you cannot

#

moving a member from a channel into another channel is NOT the equivalent of forcing them to join one

midnight blaze
#

yy

#

yes you are right.. ofc

earnest phoenix
#

im also blind

#

i read that as then I can

midnight blaze
#

the goal is just that the creator of the channel should be able to join the channel and when the creator leaves the channel: the channel gets deleted

earnest phoenix
#

then listen for the event and wait for them to join a channel

#

you can't force the user to do anything

solemn latch
#

a lot of bots have a channel that users can join to create a channel

earnest phoenix
#

set a timeout for how long the bot should be listening for before it just deletes the channel because the user didn't join

midnight blaze
#

that is what I did at the start, but it deleted the channel anyways

earnest phoenix
#

because you didn't cancel the timeout when the user joined

solemn latch
#

for example
user joins a channel called "create a channel"
the bot creates a channel called "users channel"
bot moves user to "users channel"
bot starts watching for user to leave channel.

surreal notch
#
TypeError: Cannot read property 'channels' of undefined```
earnest phoenix
#

the guild is undefined

#

read your errors

torn ravine
#

something before “channels” is undefined

earnest phoenix
#

I searched in the docs, GuildCreate couldn't find anything

#

:

solemn latch
#

what lib

earnest phoenix
#

classes

jolly wave
#

i need help

solemn latch
#

classes lib?

jolly wave
#

i said ?restart

#

to restart my bot

earnest phoenix
#

can't

jolly wave
#

but he's still running

earnest phoenix
#

u can't restart right

jolly wave
#

idk why

earnest phoenix
#

lmfao

#

u can kill ur bot

jolly wave
#

yes i id

#

did

#

yes

torn ravine
#

@earnest phoenix createGuilds is an event

earnest phoenix
#

inb4 the restart command is just logging out and logging back in

#

Im kinda nwe

#

im here

jolly wave
#

idk how but i think another version is running

earnest phoenix
#

these are the docs?

solemn latch
#

yes

torn ravine
#

gets emitted when the bot joins a new channel

solemn latch
earnest phoenix
#

look for events on the Client @earnest phoenix

#

K

jolly wave
#

Idk why he is still running

#

Even if I killed him

#

xd

solemn latch
#

restart doesnt stop the bot

earnest phoenix
#

U have terminal

#

opend

#

or something

solemn latch
#

it stops and starts the bot

jolly wave
#

No

earnest phoenix
#

bots have a gender now? wild

jolly wave
#

I don't

#

e

thick gull
#

did you make a command to restart

jolly wave
#

Yup I did

#

Btw I can only use it

#

No one can

#

Only me

#

xd

earnest phoenix
#

@jolly wave u use pm2 ?

#

when process.detroy

jolly wave
#

?

#

No

earnest phoenix
#

pm2 autorestart the app

#

also you should probably update from windows caveman edition, microsoft officially dropped support for it and many other services are also going to stop supporting it

jolly wave
#

Process.exit()

#

E

earnest phoenix
#

ye exit

jolly wave
#

Yes

#

That's what I use

earnest phoenix
#

try Destroy()

jolly wave
#

Mkay.

honest perch
#

And use Firefox

jolly wave
#

Why

solemn latch
#

and use screenshots

#

not pictures

jolly wave
#

...

solemn latch
#

i cant even tell whats going on in this picture

thick gull
#

god that server list gives me anxiety

solemn latch
#

most of its not readable

earnest phoenix
nimble kiln
#

Windows+Shift+S

jolly wave
#

?

earnest phoenix
#

Extremely light weight screenshot tool, even my old laptop from 2003 can run it

#

use sharex

#

¯_(ツ)_/¯

#

lightshot is yuck

#

use sharex

nimble kiln
#

oh nvm he uses Windows7

earnest phoenix
#

Screw ShareX, Lightshot works fine if you don't need a million different options

jolly wave
#

Bruuhhh

earnest phoenix
#

use Flameshot if u linux

#

windows caveman edition ™️

jolly wave
#

I killed hhe terminal and he's still running

#

Old pc ok?

earnest phoenix
#

but color is alitte bit trash

thick gull
#

went from code to roasting him for his system

earnest phoenix
#

Are you using something like tmux or screen?

#

PLS STOP BULLING HIM

thick gull
#

I killed hhe terminal and he's still running
@jolly wave discord shows it’s running for a few minutes or so before turning off

earnest phoenix
#

JUST HELP HIM

pale vessel
#

why don't you help him

earnest phoenix
#

xD

#

@earnest phoenix you'd be surprised from how many people are leaking vital information daily with lightshot just because they don't realise lightshot is a public uploader

#

cuz idk what is the problem

jolly wave
#

That's been 10 mins

earnest phoenix
#

he dont send his Cobsole

#

didnt

#

you can also just

pale vessel
#

i only use lightshot for my clipboard, never used the upload feature because lightshot site looks ass

earnest phoenix
#

I don't upload with Lightshot, I copy the image to clipboard weirdsip

#

restart your machine if you're clueless and don't know how to use task manager

#

@earnest phoenix

pale vessel
#

some 2008 looking site

jolly wave
#

...

pale vessel
#

exactly lol vertigo

earnest phoenix
#

I use Flameshot on Linux cuz i have no money to buy Windows 10

#

:))

jolly wave
#

Just stop talking bout my pc and help me

#

Bruhhh

solemn latch
#

i think we need more info

earnest phoenix
#

@jolly wave any error

#

?

jolly wave
#

Nope

earnest phoenix
#

show console

#

this is the you're underage police

jolly wave
#

Kay

earnest phoenix
#

how do u start ur application

#

@jolly wave dont use Nodemon

pale vessel
#

shows an xbox

jolly wave
#

Node .

#

In console

earnest phoenix
#

oh

jolly wave
#

Wait

earnest phoenix
#

then idk

sonic lodge
#

ctrl + c?

earnest phoenix
#

no he want to turn off with Js

jolly wave
#

Just tell me how is this possible

earnest phoenix
#

not manully

sonic lodge
#

oh

solemn latch
#

whats your code

restive furnace
#

I use Flameshot on Linux cuz i have no money to buy Windows 10
stay on linux ok

earnest phoenix
#

Show restart

#

file

jolly wave
#

K

earnest phoenix
#

or lines

#

Require it

jolly wave
#

client.on('message', msg => { if (msg.author.id === '702457675887280198') { if (msg.content === '?restart') msg.channel.send("Are you sure you wanna restart the bot?It will apply to all servers!") if (msg.content === 'Yes') process.exit() if (msg.content === 'No') msg.channel.send(Cancelling...
cancelled!) } })

#

oof

earnest phoenix
#

yikes

#

try return process.exit()

thick gull
#

what

earnest phoenix
#

but maybe it dont help

solemn latch
#

require MessageEmbed

earnest phoenix
#

@earnest phoenix what's the full stacktrace

#
const {MessageEmbed} = require("discord.js")
#

@earnest phoenix

#

LoL me 2 sometime

#

@earnest phoenix You can get a Windows 10 key for like $6 on a 3rd party site

jolly wave
#

command : if (command === 'hi') { message.channel.send('Hi!');

earnest phoenix
#

but i dont want to spend money for OS

jolly wave
#

e

solemn latch
#

paid $5 for windows 10 pro

earnest phoenix
#

Window SUCK

#

Linux the best

solemn latch
#

thats a hi command

#

not restart

jolly wave
#

is this a channel bout computer or FREAKING CODE

earnest phoenix
#

Im still trying with GuildCreate but its not really working, someone can send me a link to the good doc 😓

jolly wave
#

yes ik

earnest phoenix
#

you don't have to even spend money on win10

solemn latch
#

we asked for restart code

jolly wave
#

that's the command my bot say twice

#

I already sent it

#

bruh

earnest phoenix
#

get a preactivated build or edit the key servers

#

ye

#

you should update to windows 10 regardless mainly because of security patches

jolly wave
#

this is a channel about computer? No

#

e

earnest phoenix
#

Im still trying with GuildCreate but its not really working, someone can send me a link to the good doc 😓
(Don't hate on me, I'm a beginner)

solemn latch
#

the docs are perfectly fine

earnest phoenix
#

I can't find the good one

#

I know

#

what have you tried

#

Like dumb shit

#

and what isn't working

#

lemme sent it

jolly wave
#

oh ik how to fix my botr

#

change the token

solemn latch
#

?

#

you coulda manually stopped it at any time

#

ctrl + c on the terminal window

jolly wave
#

so the other running instance will be stopped since the token is not good rn

earnest phoenix
#

client.on('guildCreate'){
message.channel.send("Hello! My prefix is "-", use "-help" for all my commands!")
}

#
    message.channel.send("Hello! My prefix is \"-\", use \"-help\" for all my commands!")
}```
#

or this

#

it sucks

#

I know

#

that's not how events work

#

This channel is about everything about Development so repair PC ? maybe No

#

Oh

solemn latch
#

look at your message event for an example

topaz fjord
#

lambdas ftw

pale vessel
#

what the fuck is that code

earnest phoenix
#

Wdym Woo?

#

I dont understand 2

#

I know it sucks

#

Guild create then message.chennl ??

faint prism
#

on (string) send(string)

jolly wave
#

Yay

#

I changed the token

#

And it stopped saying the message twice

earnest phoenix
#

ofc i

#

know

#

u had 2 terminals

#

basic mistake

#

Thonk There is a message on GuildCreate Event ???

#

hmmm

#

what

#

i fked it up

#

i know

solemn latch
#

i mean look at the message event

earnest phoenix
#

lmao

jolly wave
#

Nutella

solemn latch
#

to look at the structure

jolly wave
#

First only a terminal was running

#

Why would I keep two instance of my bot open

#

It's stupid

earnest phoenix
#

Idk

pale vessel
#

i'm*

#

sorry

earnest phoenix
#

People are doing

#

because you don't know what you're doing

#

that

jolly wave
#

K want more screen

earnest phoenix
#

Wait who has a problem Nuttela or name

#

Me

solemn latch
#

everyone does

earnest phoenix
#

With GuildCreate

#

lmfao

solemn latch
#

its not guildcreate, its the structure you made

#

it makes no sense

earnest phoenix
#

I just make it like really bad

#

or

#
client.on("GuildCreate", guild => {
console.log(guild.name)
})
#

uhh

solemn latch
#

spoon feeding op

jolly wave
#

Btw flazepe

sudden geyser
#

lowercase G

faint prism
#

Anyone have an idea as to why my bot's cpu usage has dropped 15% and the latency is sitting at 900ms? I haven't made any code changes that would cause this...

earnest phoenix
#

this console.log the guiild name

#

for example

jolly wave
#

Thx for correcting ur message

earnest phoenix
#

ye

#

prolly

#

@faint prism Maybe wrong place of ur server

#

could just be discord's side, cpu usage probably dropped because a smaller influx @faint prism

jolly wave
#

Also dumbass, I'm learning js

earnest phoenix
#

for example ur server is in USA but u call it from India

#

for example

faint prism
#

Well I assume it's Discords-side issue

earnest phoenix
#

Also dumbass, I'm learning js
@jolly wave
you became the very thing you swore to destroy

faint prism
#

Does that sound like a rate-limit thing?

earnest phoenix
#

ratelimits wouldn't affect latency though

#

@solemn latch I am spoon feeding ??

solemn latch
#

copy paste code

earnest phoenix
#

they would just affect response time on the given action you're ratelimited on

#

i dont copy paste

faint prism
#

Hm

earnest phoenix
#

check out the latency on their api status page

#

@earnest phoenix I added ur code, but it doesn't show on console log the guild name

solemn latch
#

copy paste-able code

earnest phoenix
#

for some reason

jolly wave
#

Btw cry

solemn latch
#

it will only log when you join a guild

jolly wave
#

You know why my blocked user keep growing?

earnest phoenix
#

@earnest phoenix Well cuz the event didnt happend

jolly wave
#

Cause of people like you

earnest phoenix
#

I added it to a test server

#

u need to kick ur bot then add it again

#

lol

#

good job, i didn't ask nor do i care

#

i did

jolly wave
#

Btw I blocked you

slender thistle
#

are we back to square one

earnest phoenix
#

i didnt ask

#

for some reason i fked it up again

#

@earnest phoenix errorr ??

#

Nope

#

0 errors

#

@jolly wave bruh

#

hmmmm

#

like i added it but there happend like nothing

#

they're underage

#

don't argue here

#

surely behaving like so

#

show code

jolly wave
#

Shivaco mute me if you want Im tired of this channel anyways

earnest phoenix
#
    console.log(guild.name)
    })
    ```
slender thistle
#

Keep this channel on topic.

earnest phoenix
#

this

earnest phoenix
#

lowercase g

#

it's case sensitive

jolly wave
#

Let's go back to coding for me

earnest phoenix
#

ok

#

nice

#

Hm

#

Imma show u a example but only for this time

#

Why it doesn't work, I re-added it

#

k

#

wait ur coding on phone?

#

nope

#

just for now i am on phone

#

oh

#

no it's github

#

yes

#

i add everything on github

jolly wave
#

Actually coding on phone exist but when I tried a failed lol

earnest phoenix
#

and everyone does it

#

ye

sudden geyser
#

coding on phone is painful

jolly wave
#

Yup

earnest phoenix
#

@sudden geyser LoL

solemn latch
#

i dont even like coding on laptops

#

🤷‍♂️

sudden geyser
#

it's like cleaning plates with paper

jolly wave
#

Oof

faint prism
#

Same tbh

jolly wave
#

Yes

earnest phoenix
#

@solemn latch wtf then where on Nokia ?

solemn latch
#

^ programming on calculator, best way to program

earnest phoenix
#

LoL

jolly wave
#

lol

sudden geyser
#

pff

#

code with raw 0s and 1s

earnest phoenix
#

@earnest phoenix so what happend

solemn latch
#

punch cards?

earnest phoenix
#

btw it is guildCreate not GuildCreate my false

#

the Up cases are importain

solemn latch
#

punch card programming

earnest phoenix
#

wut

solemn latch
#

making a comeback

earnest phoenix
#

Nothing yet

#

im just reason

#

reading

#

lmfoa

#

on docs

#

atm

#

:o

faint prism
#

punch card programming
@solemn latch aka COBOL and maybe FORTRAN

earnest phoenix
#

tfw you fly to the moon with 32kb of ram but you run an electron app on 2 gigs of ram and windows BSODs

solemn latch
#

^

faint prism
#

People get lazy with these "comfy" high-level languages

solemn latch
#

i have some core memory

#

which is what they used

amber fractal
sudden geyser
#

It's all about the right tool fork for the job 🍎

faint prism
#

assembly* ftfy

jolly wave
#

Finally finished EVERY .js files for every commands

#

e

#

Time to eat

crystal stream
cinder cipher
#

Hello is someone's bot here got hacked cause I got dm from it

honest perch
#

i mean

#

theres thousands

#

not very direct your question is it

#

dm that to a mod

earnest phoenix
#

LMAO

digital ibex
#

i've been getting that too

#

but not from this server

viral iris
#

@viral iris [Click Here](Link Here)
@trim saddle fixed but thx

earnest phoenix
#

Anyone can explain how i can use Spotify api

#

cuz the Docs suck as fck

honest perch
#

dont

solemn latch
#

what are you trying to do with their api?

earnest phoenix
#

Get a muaic desc

honest perch
#

just scrape it

earnest phoenix
#

wut

solemn latch
#

the docs seem fine to me

#

they even have whole examples for everything

earnest phoenix
#

Hi, how can i check if mentioned user has a permission in discord.js. I tried but it's not working:js const user = message.mentions.users.first(); if (user.hasPermission(["BAN_MEMBERS"])) return message.channel.send("❌ You can't ban a staff member")

solemn latch
#

users dont have permissions

#

members do

earnest phoenix
#

@solemn latch how i can get the track id

solemn latch
#

probably search

earnest phoenix
#

@solemn latch thank you very much

solemn latch
#

np

#

|| is or

#

id recommend using includes for this

pale vessel
#

or some

solemn latch
#

["this", "that", "the other thing"].includes(message.content)

#

or some yeah

calm junco
#

hmm

earnest phoenix
#

can i check

#

message.content.includes() ?

#

wait imma eval it

solemn latch
#

message.content.includes() doesnt make any sense does it?

#

its array.includes

earnest phoenix
#

:0 it works

solemn latch
#

not string.includes

hybrid roost
#

so, how can i download track from Spotify for stream it by Discord Bod?

solemn latch
#

oh wait you can do string.includes

#

thats right

earnest phoenix
#

u sure ?

cinder patio
#

Lo4, that's not how the OR operator works. You need to do it like this:

message.content === "Something" || message.content === "somethingElse" || message.content === "..." || ... and so on

solemn latch
#

which really sucks to do

#

error?

restive willow
#

Hey Guys, Discord has disabled my bot and asked me to contact them for more information. I have but obviously they'll take a while to respond. I was wondering if anyone has had a similar experience and could shed some light on the issue?
@frank wyvern mine got disabled too - what does your bot do?

solemn latch
#

oof, so many disabled bots

#

finally discord fighting api abuse?

midnight blaze
#

yo, I was able to do it and yo guys talking about db

solemn latch
#

db was just incase of bot restarts

midnight blaze
#

ok, true

#

sry

solemn latch
#

storing everything in a collection or map was just because it is generally cleaner

midnight blaze
#
.then(cha => {

           
          setTimeout(() => 
          (message.member.voice.channelID==cha.id)?message.channel.send("connected"):setTimeout(() => cha.delete({ timeout: 10000, reason: 'It had to be done.' }), 10000)
          , 10000)
          
          }).then

Just in case someone wonders

#

how to it

#

lol

#

sry, I am tired

pure lion
#

When you cum

earnest phoenix
#

How i can downloads films on Netflix web (HTML5)

#

;))

pure lion
#

Oops wrong channel

earnest phoenix
#

ahm wtf

#

dude

faint prism
#

lol

solemn latch
#

netflix.download()

pure lion
#

How i can downloads films on Netflix web (HTML5)
H a c c

solemn latch
#

obvs

pure lion
#

Yeah

#

Smh

earnest phoenix
#

When you cum
@pure lion wtf

midnight blaze
#

I have never thought I would have to use settimeout inside a settimeout

pure lion
#

:l

#

What

#

Ever heard of interval?

#

@earnest phoenix no

midnight blaze
#

yeah, but I am still new with js

#

only coding since 3 months

pure lion
#

That's illegal

#

You can't have a bot respond to a bot

solemn latch
#

generally, bots responding to bots is api abuse

pure lion
#

Yeah it could be a loop

#

And fuck your IP

solemn latch
#

which, a few people have been reporting their bots got completely banned from discord

#

so id avoid api abuse

pure lion
#

Bot a says something that triggers bot b that triggers bot a

#

Loop

solemn latch
#

those are just commands

#

🤔

dire obsidian
#

i mean im tired of make a command handler, so anyknow hot to disable the help command on discord.js-commando?

golden condor
#

i mean im tired of make a command handler, so anyknow hot to disable the help command on discord.js-commando?
@dire obsidian there is an option

dire obsidian
#

help: false, rigth?

golden condor
#

idk

pure lion
#

What is djs-commando

misty sigil
#

djs commando?

#

whats that

dire obsidian
#

discord.js but with command handler integrated

golden condor
#

discord js command client

pure lion
#

Oh

misty sigil
#

well fuck that could've made it so much fucking easier

#

im angy now

pure lion
#

Imagine not writing your own

golden condor
#

~~Eris's version is much better ~~

pale vessel
#

no

golden condor
#

NEVER USE COMMANDO

#

NEVER

pure lion
#

@misty sigil f o u r l i n e s

hybrid roost
#

Hm, I am gonna ask it again.
How can i download Tracks from Spotify and stream it by Bot?

pale vessel
#

Eris command client is shit

#

use something like klasa

hybrid roost
#

I need no sleep. I need answers

solemn latch
#

if your looking for aliases(i think thats what your describing), youd probably want a full command handler

strange trout
#

I use a custom version of discord-akairo

dire obsidian
#

so maybe .-. maybe i need a command handler code, sorry boys

strange trout
#

Works great

solemn latch
#

^ command handling

dire obsidian
#

yes i do it

#

but im making on diferents folders

#

like ./commands/mod

dire obsidian
#

wait a guide for command handling

#

fock

golden condor
#
bot.registry.registerDefaultCommands({
help: false, 
prefix: false, 
ping: false,
_eval: false,
unknownCommand: true, 
commandState: true
})```I found this on stack
#

...

solemn latch
#

403 forbidden

golden condor
solemn latch
#

The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.

hybrid roost
#

If i say : c!apple
Bot say: Apple
If i say: c!banana
Bot say: Apple

How to do that
@earnest phoenix ```JS

dire obsidian
#

ok

solemn latch
#

the server is forbidding your requests, ie you dont have access to it

dire obsidian
#

@earnest phoenix do you use sitch or what?

solemn latch
#

if its your server, you should know how to properly authenticate to it

hybrid roost
#

yes javascript
@earnest phoenix I 4got press shift and message Sended...

dire obsidian
#

if (msg === !banana) {
msg.channel.send('banana');
}

solemn latch
#

i dont know how we would either

#

we didnt make it

hybrid roost
#

yep

solemn latch
#

i gave you resources on how to do it

hybrid roost
#

one moment..

solemn latch
#

pretty much copy paste code on the guide

strange trout
#

Didn't Woo already help you Lor4nd

digital ibex
#

hello

#

quick question

solemn latch
#

the kind i like

pure lion
#

Mood

hybrid roost
#
  .on('message', (message)=>{
    if(message.content == "c!apple" || message.content == "c!banana")
    {
      message.reply(apple);
    }
     
  }

It is the simplest solution. Are you need for more some features in it?

#

@earnest phoenix

solemn latch
#

spoon feeding is against the rules btw

#

🤔

pure lion
#

^^^^

hybrid roost
#

By the way. I still need help with downloading track from Spotify

solemn latch
#

spotify api doesnt provide music

#

just data for stuff

#

searching tracks, albums etc

#

getting release dates

hybrid roost
#

I know, but I saw so mush bots, that can it

pure lion
#

Lost: quick question
Also lost: officiallylost is typing

digital ibex
#

i'm trying to make the background colour of the option to be the role colour, so.. i've got the role colour but it gives it in the base 16 thingy believe, how can i convert the number to a hex/rgb/ anything which will change the colour in css

strange trout
#

Doubt

solemn latch
#

those bots typically search spotify for a song title, and then search the song on another platform

hybrid roost
#

Oh

pure lion
#

Like pootube

hybrid roost
#

Lol

#

OK

pure lion
#

Btw woo is there a SoundCloudDL

#

That I don't know of

digital ibex
#

so.. any ideas how i can change the colour of the backgeound to be the role colour?

solemn latch
#

ive never made a music bot, so unsure

#

ive heard of people using soundcloud

pure lion
#

Define base 16 thingy

solemn latch
#

base 16 is hex

#

🤔

digital ibex
pure lion
#

Why not use hex

digital ibex
#

yeah im stupid

pure lion
#

:l

hybrid roost
#

I thought, if I can't download full audio from YouTube...

digital ibex
#

discord sends u the number thing

pure lion
#

You ca-

digital ibex
#

not hex

solemn latch
#

most music bots use youtube to play music

#

iirc

digital ibex
#

so im tryna convert that to hex, if that makes sense?

pure lion
#

Yeah

solemn latch
#

trying to convert base 16 to hex?

#

In mathematics and computing, hexadecimal (also base 16, or hex) is a positional system that represents numbers using a base of 16.

hybrid roost
#

What Libraries (unless YTDL) can help me with downloading audio?

digital ibex
#

i mean

#

im stupid ya

#

but

#

discord sends u the number colour thingy

solemn latch
#

lavalink is something bots frequently use

digital ibex
#

and i need to convert the number thingy to hex/rgb

strange trout
solemn latch
#

discord sends color data in hex does it not?

digital ibex
#

with css, im confused

#

no

#

im making my own api requests

pure lion
#

O h

digital ibex
#

and i cant do it with html :/

#

not anyway i know of ^

strange trout
#

Are you sending the color from backend?

digital ibex
#

im sending an array of roles from the backend so i can create the select thing in the frontend

#

so, i can access the role colour

pure lion
#

There's probably a package somewhere

digital ibex
#

huh

strange trout
#

Just map and convert to hex

pure lion
#

Probably

digital ibex
#

how would i do that with html then?

#

send the stuff in the script tag to html? w/o framework

strange trout
#

Well you're using a template engine of sorts right?

digital ibex
#

just ejs

pure lion
#

Eggspress

solemn latch
#

color.toString(16);

pure lion
#

What does the number in toString mean

digital ibex
#

????

solemn latch
#

base 16

strange trout
#

Okay then what you can do is give the element a style attribute and set it to the color

solemn latch
#

ie hex

digital ibex
#

yes..

dire obsidian
#

what was the command to enable eslint?

digital ibex
#

i've got that bit done, lemme show u what i got rn

dire obsidian
#

npx eslint?

strange trout
#

Alright

pale vessel
#

don't forget to add .padStart(6, "0");

strange trout
#

I shared a screenshot of how to convert a while ago lol

digital ibex
#
      <select class="select-role" name="role">
         <% roles.forEach((role) => { %>
            <option style="background-color: <%- role.color %>" value="<%- role.id %>"><%- role.name %></option>
        <% }) %>
      </select>``` `role.color` is the number thing
pale vessel
#

number.toString(16).padStart(6, "0")