#development

1 messages · Page 1201 of 1

faint prism
#

Heyo! Anyone know of a member divider bot? Or a bot that can divide up server members so I can mass assign roles n such?

like if my server has 8 members, and I want groups of four, I want the bot to randomly divide members into those groups. whether it be id's or just autoassigning the roles

Kinda a niche request, but help is GREATLY appreciated.
@obsidian burrow Doesn't sound too difficult to implement

glossy elk
#

anyone have experience with Kurasuta

#

Kurasuta is a custom sharding package

#

anyways everytime i try to run it it says cluster failed

#

Cluster 0 failed to start

teal goblet
#

Hello,
Id like to cycle my discord.py bot status but it doesnt work, nothing happens. Here is my code :

import discord
import asyncio
from discord.ext import commands
from itertools import cycle

client = commands.Bot(command_prefix=";")

token = "xxx"

status_cycling = ["1", "2", "3"]

async def change_status():
    await client.wait_until_ready()
    cycling = cycle(status_cycling)
    while not client.is_closed:
        current_status = next(cycling)
        await client.change_presence(activity=discord.Game(name=current_status))
        await asyncio.sleep(5)

@client.event
async def on_ready():
     await client.change_presence(status=discord.Status.idle,
                                  activity=discord.Game("Test message"))
    print(f"{client.user.name} ({client.user.id}) ready")

client.loop.create_task(change_status())

client.run(token)

When I remove the change_status function the on_ready event works and my bots status is set to "Playing Test message", but when theres the change_status function it doesnt displays anything.
Thank in advance for your help

faint prism
#

Get all users in a guild.
for each user, randomly pick one that is unassigned
assign them a roll
loop until all users iterated through

teal goblet
#

Im on python

glossy elk
#

kek

teal goblet
#

And it says that setInterval isnt recognized

#

Wdym kek

glossy elk
#

nothing

teal goblet
#

Which language you on ?

faint prism
#

oh shit that's python

#

my bad

teal goblet
#

Yh

slender thistle
#

name="Test message"

teal goblet
#

No its ok

slender thistle
#

kwarg for discord.Game

faint prism
#

Might help you out @teal goblet

slender thistle
#

also iirc is_closed is a method

#

@faint prism bad idea

faint prism
#

?

slender thistle
#

Genuinely bad idea to use time.sleep or anything threading with d.py

#

The way they did the loop is fine

faint prism
#

There were a few examples I think.

slender thistle
#

Yeah, none of them should be used in d.py code

#

They're blocking

faint prism
#

ah

#

Don't want that

slender thistle
#

Mhm

faint prism
#

can you spawn a child thread that handles updating the status? Then if it blocks it wouldn't matter

teal goblet
#

Nah actually I dont think the problem comes from the sleep function (from the asyncio module) cause Im using asyncio.sleep() for another command and its working

slender thistle
#

aiohttp gang but I don't think many people here are familiar with multi-threading

#

coroutines or not

#

@teal goblet any errors you get when remove change_status?

teal goblet
#

When I put the lines related to the change_presence function into commentaries the bot works fine, and the status from on_ready is displayed

#

And actually when the change_presence function is in the program it looks like it doesnt do anything cause my bot still has the "Playing Test message" status

glossy elk
#

anyone have experience with Kurasuta
Kurasuta is a custom sharding package
anyways everytime i try to run it it says cluster failed

#

current code

teal goblet
#

Okkkk I fixed it actually I just forgot some brackets after that :
while not client.is_closed: while not client.is_closed():

#

Thanks for your time guys though 👍

glossy elk
#

so im getting ignored

faint prism
#

so im getting ignored
@glossy elk sounds like a niche library. Maybe nobody knows

manic moon
#

Any dice bots?

#

Let me fix that statement

#

Any recommendations for good dice bots

glossy elk
#

TypeError: Cannot read property 'binaryToID' of undefined

#

binaryToID is from discord.js right

manic moon
#

How do I add a bot to a server I’m working on?

idle swallow
#

How do I add a bot to a server I’m working on?

@GinStar go to discord calculator, type id, set permissions and invite via link

sharp thicket
#

Hi,anyone know any good roblox api modules?

thick gull
#

doesn't roblox have an api..?

#

like a web api

sudden geyser
#

[macOS] I'm currently running Big Sur on a separate volume from my main volume. I'm having issues installing Dart with Homebrew because it complains that my command line tool (CLT) is outdated (Xcode 11 < Xcode 12 (Beta)) even though I have Xcode 12 (beta 4) and have it set as the CLT to use.

I still have Xcode 11 installed, so I'm wondering if anyone can back up my hypothesis that uninstalling it will help resolve my issue.

urban olive
#

doesn't roblox have an api..?
@thick gull
does this look like a roblox development page?

crystal socket
#

[macOS] I'm currently running Big Sur on a separate volume from my main volume. I'm having issues installing Dart with Homebrew because it complains that my command line tool (CLT) is outdated (Xcode 11 < Xcode 12 (Beta)) even though I have Xcode 12 (beta 4) and have it set as the CLT to use.

I still have Xcode 11 installed, so I'm wondering if anyone can back up my hypothesis that uninstalling it will help resolve my issue.
@sudden geyser, it really should help

#

but

#

try updating mac dev tools cli

#

that might be using old xcloud

#

so updating it might fix $path volumes

winter basalt
#

does this look like a roblox development page?
@urban olive did you not see someone literally asked for it above him

crystal socket
#

but i do think uninstalling xcode 11 might fix it

earnest phoenix
#
Require stack:
- C:\Users\acer\Desktop\bot\node_modules\canvas\lib\bindings.js
- C:\Users\acer\Desktop\bot\node_modules\canvas\lib\canvas.js
- C:\Users\acer\Desktop\bot\node_modules\canvas\index.js
- C:\Users\acer\Desktop\bot\server.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 Object.<anonymous> (C:\Users\acer\Desktop\bot\node_modules\canvas\lib\bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\acer\\Desktop\\bot\\node_modules\\canvas\\lib\\bindings.js',
    'C:\\Users\\acer\\Desktop\\bot\\node_modules\\canvas\\lib\\canvas.js',
    'C:\\Users\\acer\\Desktop\\bot\\node_modules\\canvas\\index.js',
    'C:\\Users\\acer\\Desktop\\bot\\server.js'
  ]
}```
#

help pls

sudden geyser
#

I have Xcode 11 installed from the App Store (obviously) so I'm also worried if uninstalling it here (aka moving it to Trash then erasing it) may effect my other volume, or anything that depends on v11. In the past I did install the CLT from the developer download page when I didn't have Xcode installed (because I didn't want to hold on to that 9 GB download vs. like 300/400 mb)

#

Also I'm a bit confused on this line as installing the beta should come with it

"try updating mac dev tools cli"

thick gull
#

@thick gull
does this look like a roblox development page?
@urban olive this is for general development

#

and the message above mine

#

Hi,anyone know any good roblox api modules?

crystal socket
#

Also I'm a bit confused on this line as installing the beta should come with it
@sudden geyser, do you have public or dev beta

#

public beta doesn't come with dev tools

#

that might be the problem

#

here wait

sudden geyser
crystal socket
#

no i mean the OSX version

sudden geyser
#

oh

#

public beta

crystal socket
#

wait run this in terminal, xcode-select --install

drifting wedge
#

i have a thing that sends a message when a role is updated

#

when a role is moved

#

all the roles get "updated"

#

how can i stop it from spamming it

#

and just sending the one that was updated

sudden geyser
#

Does that command install the CLT?

drifting wedge
#

also, how can i display member count in bot activity?

#

like total users

#

got it

#

thanks

#

tho how do i mulitply a variable?

#

like for example i have like a volume thing

#

how can i send the message but 100x

thick gull
#
  • 100? not sure how py works
faint prism
#

you want to send 100 msgs?

#

or msg with the text repeating 100x? @drifting wedge

drifting wedge
#

@faint prism i got it

#

but it was muliply var by 100

#

cuz it send it as like 0.01

#

intead of 10

#

so now its 10.0

#

which works fine

faint prism
#

Confused, but glad it's working

round garden
#
const guildID = Number(giveaway.guildID) 
const shardID = (guildID >> 22) % Sharder.shardCount
console.log(shardID)``` How comes shardID is `-4`?
drifting wedge
#

thanks lol

pale vessel
faint prism
#

unfamiliar with the >> symbol, and you're getting the remainder of the division with Sharder.shardCount

simple stump
#

I'm trying to work on a Music Bot (or add a music FEATURE), however, my bot doesn't seem to sense whether I'm in a voice channel or not. I've tried without checking and WITH checking if the user is in a voice channel. Both times, it says it isn't in a channel and then I get an error.
Code:

        if (message.content.startsWith(`${prefix}play`)) {
            const args = message.content.slice(prefix.length).split(' ');
            const command = args.shift().toLowerCase();

            if (!args[0]) {
                message.channel.send("You need to provide a link!");
                return;
            }

            const channel = message.member.voiceChannel;
            channel.join().then(connection => console.log('Connected!')).catch(console.error);
            /*
            if (!message.member.voiceChannel) {
                message.channel.send("You must be in a voice channel!");
                return;
            } else {
                const channel = message.member.voiceChannel;
                channel.join().then(connection => console.log('Connected!')).catch(console.error);
            }
            */
        }

Error: https://hatebin.com/mzjqtmtkey

round garden
#

@faint prism that's 5

modest crane
#

@simple stump are you using gateway intents?

sharp thicket
#

hi lol odd question ow can i ban someone with an eval command?

simple stump
#

@modest crane wdym?

faint prism
#

however the lib says you can

sharp thicket
#

how*

modest crane
#

@modest crane wdym?
seems that you're not using it hmm
check if the bot can see the voice channel you're joining

simple stump
#

alright

ivory wasp
#

Hii

#

Anybody can help me ??

#

if (msg.content === 'rpg miniboss') {
msg.channel.send('⚔️ @Arena-Miniboss |Say JOIN ⚔️')

#

Why it didn't ping ??

#

@simple stump

#

Can you help me ??

#

@simple stump

#

Can you help me ??????

#

:'((((

#

@woeful pike

woeful pike
#

don't ping people for help

simple stump
#

^^

ivory wasp
#

Oh ok

#

Eltik

simple stump
#

And instead of @zinc pawnena-Miniboss you have to put <@role_id>

ivory wasp
#

Can u help me about that ?

simple stump
#

oh heck

#

im sorry didnt mean to ping ar

#

-__-

#

right click the role

ivory wasp
#

I can't see the id

simple stump
#

and select copy id

#

copy the role's id

ivory wasp
#

Onh

#

Ohh

#

Ok

#

I will try

simple stump
#

of Arena-Miniboss

ivory wasp
#

How to

#

Copy

#

??

#

I can't copy the id of the role @simple stump

simple stump
#

right click the role

#

and click copy id

ivory wasp
#

Hmm

simple stump
#

in this server

#

i right clicked the id and clicked copy

ivory wasp
#

Oh

#

Ok

#

Tks you a lot

simple stump
#

np

#

Also @modest crane sorry for the ping. I just tried that with a NEW bot with Admin perms on my test server. No luck.

modest crane
#

strange

simple stump
#

I added the if statements back and got this error:

C:\Users\Ian Lew\OneDrive\Programs\DiscordBot\Test Bot\index.js:773
                        channel.join().then(connection => console.log('Connected!')).catch(console.error);
                                ^

TypeError: Cannot read property 'join' of undefined
#

If statements:

#
            if (!message.member.voiceChannel) {
                message.channel.send("You must be in a voice channel!");
                return;
            } else {
                const channel = message.member.voiceChannel;
                channel.join().then(connection => console.log('Connected!')).catch(console.error);
            }
#

Oops error irrelevant

#

Just meant

#

That it still says, "You msut be in a voice channel"

ivory wasp
#

@simple stump sorry for the ping

#

But whyyy

#

That's the code

modest crane
#

@simple stump try using message.member.voice.channel instead of message.member.voiceChannel

#

@ivory wasp remove Arena-Miniboss_

simple stump
#

^^

ivory wasp
#

Ohh

#

OK

simple stump
#

Alright thx d4n will try

ivory wasp
#

Wotttt

modest crane
#

also, if you want to mention a role replace @ with &

earnest phoenix
#

actually

#

it's &

simple stump
#

^

modest crane
#

oops

simple stump
#

Tysm d4n. However now it says it can't read property of 'join' xD At least it doesn't say, "You aren't in a voice channel." lol
Error: https://hatebin.com/yykfmfnoyj
Code:

        if (message.content.startsWith(`${prefix}play`)) {
            const args = message.content.slice(prefix.length).split(' ');
            const command = args.shift().toLowerCase();

            if (!args[0]) {
                message.channel.send("You need to provide a link!");
                return;
            }
            if (!message.member.voice.channel) {
                message.channel.send("You must be in a voice channel!");
                return;
            } else {
                const channel = message.member.voiceChannel;
                channel.join().then(connection => console.log('Connected!')).catch(console.error);
            }
        }
earnest phoenix
#

Role : &
Channel : #
Mention (Nickname) : !@
Mention (Username) : @

modest crane
#

const channel = message.member.voiceChannel;
change that line

simple stump
#

lol im stupid tysm d4n fixed!

modest crane
#

np

ivory wasp
#

@earnest phoenix

#

Sry for the ping

#

But can you help me ??

earnest phoenix
#

<&roleid>

pale vessel
#

escape the role ping

#

\@role

ivory wasp
#

Oh ok

simple stump
slim umbra
ivory wasp
#

Anybody can help me

#

How to code like this ??

earnest phoenix
#

@ivory wasp Give a complete and useful explanation

ivory wasp
#

Hmm,

#

I need a remind code

#

Because when i hunt

#

The command will be cooldowns

#

And i want it to remind me

#

@earnest phoenix

#

Can you help me about that ?? @earnest phoenix

earnest phoenix
#

I will send you a examples in your direct . @ivory wasp

ivory wasp
#

Ok brooo

cinder lily
#

Is client.fetchApplication() a thing in discordjs?

fringe axle
#

Wrong link

cinder lily
#

yeah i forgot about the docs... sorry

fringe axle
#

No problem! (Link is correct now)

cinder lily
#

thanks

weak rain
#

Whats FFmpeg/avconv

earnest phoenix
#

When i do:
C:\Users\Myname\desktop\DinoBot\npm
It doesnt work, its just some weird command shiz

#

(command prompt btw)

fringe axle
#

What are you trying?

earnest phoenix
#

I'm making a discord bot

fringe axle
#

What are you trying?

earnest phoenix
#

wdym

fringe axle
#

With npm

earnest phoenix
#

What about it

faint prism
#

Lol

fringe axle
#

;-;
What are you trying with NPM?

weak rain
#
Error: Cannot find module 'E:\Thunder\node_modules\lzma-native\binding-v3.0.8-node-v72-win32-x64\lzma_native.node'
Require stack:
- E:\Thunder\node_modules\lzma-native\index.js
- E:\Thunder\node_modules\decompress-tarxz\index.js
- E:\Thunder\node_modules\ffmpeg-binaries\install.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 E:\Thunder\node_modules\lzma-native\index.js:13:14
    at Object.<anonymous> (E:\Thunder\node_modules\lzma-native\index.js:597:3)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'E:\\Thunder\\node_modules\\lzma-native\\index.js',
    'E:\\Thunder\\node_modules\\decompress-tarxz\\index.js',
    'E:\\Thunder\\node_modules\\ffmpeg-binaries\\install.js'
  ]
}
npm WARN fetch-blob@2.1.1 requires a peer of domexception@^2.0.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ffmpeg-binaries@4.0.0 install: `node install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ffmpeg-binaries@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Pujya Kumar\AppData\Roaming\npm-cache\_logs\2020-08-30T05_27_34_322Z-debug.log

E:\Thunder>```
#

wtf should i do

#

this fucking sucks

earnest phoenix
#

IDFK, ARENT u JUST SUPPOSED TO PUT NPM, AND THEN IT GIVES QUESTIONS?

faint prism
#

Are you by chance doing require('E') ?

weak rain
#

i think he is doing

fringe axle
#

IDFK, ARENT u JUST SUPPOSED TO PUT NPM, AND THEN IT GIVES QUESTIONS?
@earnest phoenix uh?

weak rain
#

npm init

fringe axle
#

Right

faint prism
#

IDFK, ARENT u JUST SUPPOSED TO PUT NPM, AND THEN IT GIVES QUESTIONS?
@earnest phoenix wat

earnest phoenix
#

ohh yeah

fringe axle
#

Do a terminal in the folder and run npm init

earnest phoenix
#

Thanks @weak rain

weak rain
#

Np

faint prism
#

cd /my/project/folder
npm init

weak rain
#

u can directly use vsc

#

I could not join the voice channel: Error: FFmpeg/avconv not found!

#

?

fringe axle
#

Packages

weak rain
#

i installed that

#

still ..

fringe axle
#

Any other error?

#

Show code.

weak rain
#

no

#

error

#

its joining vc too

#

but

#

sending this

fringe axle
#

Show code.

weak rain
#

kk

#

but it is in file

#

and its big

wheat jolt
#

uhm

#

how do I ban a user using d.js v12

#

not a guild member, a user

#

there was a Guild#ban method for v11

fringe axle
#

but it is in file
@weak rain then do a hastebin

wheat jolt
#

@weak rain What lib and what version?

weak rain
#

discord.js

#

lib

wheat jolt
#

version?

weak rain
#

12

wheat jolt
#

well did you install ffmpeg-static?

weak rain
#

no

#

wait

wheat jolt
#

well

sage meadow
#

Do the staff accept bots made from Bot Ghost?

wheat jolt
#

npm i ffmpeg-static @weak rain

weak rain
#

@sage meadow no

#

@wheat jolt kk

fringe axle
#

Do the staff accept bots made from Bot Ghost?
@sage meadow of course not

sage meadow
#

why

weak rain
#

using a template doesnt make u dev

fringe axle
#

It's nothing to code

sage meadow
#

if I use 2 api --- Bot ghost and BDFD . They will accept?

weak rain
#

no

sage meadow
#

please help @weak rain

weak rain
#

i cant

fringe axle
#

if I use 2 api --- Bot ghost and BDFD . They will accept?
@sage meadow no

wheat jolt
#

that isn't an api

#

it's a tool that makes you a bot

fringe axle
#

It's trash

wheat jolt
#

^^

sage meadow
#

ok

weak rain
#

It's trash
@fringe axle Yeah

wheat jolt
#

does anyone know what's the v11's Guild#ban for v12? (d.js)

weak rain
#

i fixed everything

#

@wheat jolt pepeno

#

now bot is not playing anything

wheat jolt
#

well

#

show me your code

weak rain
#

its huge

#

maybe becuase my api key is old

#

lemme gen a new one

fringe axle
#

Use hastebin...

wheat jolt
#

^

#

maybe becuase my api key is old
@weak rain no lol

#

what api key

weak rain
#

hm

#

yt

#

api key

wheat jolt
#

you don't need one to play a video from youtube

weak rain
wheat jolt
#

are you using ytdl-core?

weak rain
#

yes ytdl core

fringe axle
#

In the index? really?

weak rain
#

its my music.js file

wheat jolt
#

yes, that's your index file

#
const dispatcher = serverQueue.connection
    .play(ytdl(song.url, { filter: 'audioonly' }))
``` try this
weak rain
#

where

wheat jolt
weak rain
fringe axle
#

In play?

wheat jolt
#

in your code

#

lmao

fringe axle
#

Your play case don't has any code to play something

weak rain
#

it has

wheat jolt
#
const dispatcher = serverQueue.connection
    .play(ytdl(song.url, { filter: 'audioonly' }))
``` try this

@wheat jolt

limpid plinth
#

i have a question, how do i add my bot to this server. it’s already on the site.

wheat jolt
#

it is already here then

limpid plinth
#

o

#

@frank sierra

#

high iq

wheat jolt
#

yes

fringe axle
#

i have a question, how do i add my bot to this server. it’s already on the site.
@limpid plinth it's just muted because of the common prefix

limpid plinth
#

ah

earnest phoenix
golden condor
#

Did you ever login?

earnest phoenix
#

Login to the bot?

golden condor
#

Yes

weak rain
#

client.login(token)

#

xD

earnest phoenix
fringe axle
#

Do you have a index?

#

Delete this!

#

Guys can grab your token

weak rain
#

yess

earnest phoenix
#

okay

#

idk

#

idc

weak rain
#

nd fuck ur bot

#

xD

fringe axle
#

And do a new Terminal (top) and run node main.js

golden condor
#

Regen your token

earnest phoenix
#

Yeah, ik, mate

#

And do a new Terminal (top) and run node main.js
@fringe axle what

golden condor
#

Just tryna help you

fringe axle
#

Terminal

earnest phoenix
#

U mean cmd/

#

Ohh, run it?

fringe axle
#

Terminal

golden condor
#

in your package.json

#

change your main file to main.js

fringe axle
golden condor
#

If you haven't already

fringe axle
#

This ^^^^

earnest phoenix
#

Go into Terminal
Do New Terminal
and type "run main.js"?

fringe axle
#

No

#

node main.js

earnest phoenix
#

brub

#

aight

fringe axle
earnest phoenix
#

i hit enter, nothin happened

fringe axle
#

Change index.js to main.js

cinder sandal
#

f i consumed all my free dynos for this month

heroku bad

earnest phoenix
#

its that

#

my main thing just says main.js, so..

trail lance
#

imagine not managing your bot's time on Heroku

earnest phoenix
#

Wait, the test says "Error no test Specified"

#

cuz

#

that's the default test

#

Im dumb ;-;

#

it just echos that string

#

doesn't cause any errors

#

me real dumb

#

no

#

you just need to learn

#

by learn i mean go nuts

#

I am learning, im taking coding classes, and rewatching the same tutorial 5 million times ^^

#

Lol

#

Self learning is a lot better

#

Don't take coding classes

#

Well, so far, coding classes has helped me a bit, soo ehh

#

Im self learned in Lua, and Json

fringe axle
#

@earnest phoenix, all is working now?

earnest phoenix
#

Nopeeee

fringe axle
#

Try to run node .

ionic dawn
#

Classes are always a good idea if you have time, they can explain things faster and make sure you know what you are doing

earnest phoenix
#

Classes are always a good idea if you have time, they can explain things faster and make sure you know what you are doing
@ionic dawn Exactly

#

I did @fringe axle

ionic dawn
#

Btw, whats your problem?

earnest phoenix
#

My bot wont go online even tho im typing node . / node main.js

#

coding classes suck for these reasons:

  • everyone hates school
  • they most likely won't listen to you 99% of the time cuz they have to teach a mountain of people
  • they grade you for your hobby which is terrible
  • you need to pay fees
#

i tried it in the terminal inside of Visual Studio code, and cmd prompt

#

huh

ionic dawn
#

I dont hate school

earnest phoenix
#

discord doesn't update immediately

ionic dawn
fringe axle
#

Do you have Node installed?

earnest phoenix
#

coding classes suck for these reasons:

  • everyone hates school
  • they most likely won't listen to you 99% of the time cuz they have to teach a mountain of people
  • they grade you for your hobby which is terrible
  • you need to pay fees
    @earnest phoenix
    I take private Coding Lessons
#

try running a command of your bot

#

Do you have Node installed?
@fringe axle Yup

#

@earnest phoenix
I take private Coding Lessons
@earnest phoenix uhhh ok

fringe axle
#

Hmm

ionic dawn
#

Whats the error message?

earnest phoenix
#

wdym?

#

you're not cd in the correct directory

ionic dawn
#

When you do node .

#

Whats the output

earnest phoenix
#

it doesnt give an output

#

are you in the directory of your bot

#

check

ionic dawn
#

Thats impossible

golden condor
#

Did you save the files

cinder sandal
#

in 2 days my bot will be again up

earnest phoenix
#

that's an error i often make

#

are you in the directory of your bot
wdym ;-;

ionic dawn
#

Promot

#

Promot

#

Jesus the phone, Prompt

winter basalt
#

lul

cinder sandal
#

lmao

golden condor
#

What folder is your bot in and what terminal are you in? You can get a terminal in vscode so it's in that folder

ionic dawn
#

Check the dir you are in

earnest phoenix
#

When i do node . or node main.js all it does it go to the next thing wimmigie thing

#

Maybe your bot files are in a different folder and VSC opens terminals in C:/Users/(your name) by default

ionic dawn
earnest phoenix
#

Bruv ;-;

ionic dawn
#

Can you send a screenshot of the console

earnest phoenix
#

lmao check atleast

cinder sandal
#

pogey ** ** ** ** ** ** ** ** KEKW

earnest phoenix
#

What console?

ionic dawn
#

What console?

winter basalt
#

what did you try node in

fickle dune
#

Check /app/package.json: command not found. Is a start script missing? https://glitch.com/help/failstart/

earnest phoenix
#

the terminal

fickle dune
#

how to fix

earnest phoenix
#

debug console

ionic dawn
#

Where did you type node at

fickle dune
#

ik it has to be a start

#

script

ionic dawn
fickle dune
#

But i forgot

winter basalt
#

send a screenshot of that

fickle dune
#

what is the script

earnest phoenix
#

show the code

ionic dawn
#

Open the terminal, go to the right directory and then magic

fickle dune
#
  "name": "real",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "discord.js": "^12.3.1",
    "random-puppy": "^1.1.0"
  }
}
#

debug is broke

earnest phoenix
#

huh

fickle dune
#

but whats the start script

earnest phoenix
#

there is a test script

fickle dune
#

i made it so long ago

#

?

earnest phoenix
#

Run npm init

fickle dune
#

k

#

done

ionic dawn
#

@earnest phoenix you still there?

golden condor
#

Add a start script

fickle dune
#

there should be like ```
strat{
fsdfsfsf
}````

#

but i forgot

golden condor
#

,
"start": "node ."

fickle dune
#

oh ok

golden condor
#

after test

earnest phoenix
fringe axle
#

OMG

#

node main.js

earnest phoenix
#

LMAOOO

fringe axle
#

Not run

earnest phoenix
#

Ik

winter basalt
#

if you know then why do run

ionic dawn
#

First of sll is node, and Discord caps

#

Nvm

fringe axle
#

If you do node, the terminals name (see image) is changing to node?

ionic dawn
#

Is the name

earnest phoenix
#

if you know then why do run
@winter basalt
Because Vale told me to do run before
And then told me not to
So I took a screenshot of the thing saying run instead of node just to make her mad like be before 💩

ionic dawn
#

Is it once/on?

earnest phoenix
#

vale is a dumbass

ionic dawn
earnest phoenix
#

LMAOOO

winter basalt
#

please rule 1

earnest phoenix
#

he refused to accept that there is an error in his code

#

when i found it

fringe axle
#

vale is a dumbass
@earnest phoenix ;_;

#

@winter basalt
Because Vale told me to do run before
And then told me not to
So I took a screenshot of the thing saying run instead of node just to make her mad like be before 💩
@earnest phoenix I don't

#

You thouht it's run and I wrote node

#

her?!

earnest phoenix
#

Yeah, but u also said do 'run something"

ionic dawn
#

Run a bot isnt that hard

#

What is happening

earnest phoenix
#

Ur Picture is a "her" LMAOO

fringe axle
#

Yeah, but u also said do 'run something"
@earnest phoenix I said open the terminal and do node .

cinder sandal
#

where the term 'loli' should not be?

winter basalt
fringe axle
#

Ur Picture is a "her" LMAOO
@earnest phoenix who cares? I'm a male

earnest phoenix
#

@earnest phoenix who cares?
@fringe axle That makes people think ur a girl, duh, bish

ionic dawn
#

False?

#

Lot of guys use anime girls pfp

earnest phoenix
#

yeah, and its annoying

#

get them simps out of here

ionic dawn
#

And trust me noone think they are actual girls

#

Wow you are toxic mate

earnest phoenix
#

Lol

#

nothin' happened, mate

#

That means it ran and stopped

#

Your code is wrong

#

Wdym ;-;

#

If the bot is waitibg for events like messages then it won't stop

#

it isnt even online

fickle dune
#

dosent work

winter basalt
#

have you saved the file

fickle dune
#

i remember something like

#

start{

#

npm : node

earnest phoenix
#

no

fickle dune
#

something like that

#

in packje.json

#

i used glitch but my bot went brrr

pale vessel
#

packje.json

fickle dune
#

now i use heroku

#

but limit

earnest phoenix
#
"scripts":{
"start":"smth"
}
fickle dune
#

ok

earnest phoenix
#

Bruv.

#

the process exited

#

try installing code runner vsc extension

#

the only people that actually know what i need is @fringe axle @golden condor and someone else, i forgot

#

use it for debugging

#

Becuase it actually tells you when your process stopped

ionic dawn
#

Did you fix it?

earnest phoenix
#

ya'll just think ya'll helping, but ya'll making my head go brr, jesus christ, mate

#

then

ionic dawn
#

Well, if your answering to all is not working we just jump to the next option

earnest phoenix
#

learn actual javascript before attempting to make a bot

#

This isn;t javascript, u dumbass

#

auto-correct remembered that sentence cuz we have to tell that to SO MANY PEOPLE

winter basalt
#

uh it is javascript??

ionic dawn
#

Actually is weird to see someone with "dev" in the name and cant even run the bot

earnest phoenix
#

Its json

#

the fuck

winter basalt
#

i-

#

please learn js

ionic dawn
#

Json?

earnest phoenix
ionic dawn
earnest phoenix
ionic dawn
#

JSON is a fckin object like yaml

#

You cant program using that

earnest phoenix
#

Actually is weird to see someone with "dev" in the name and cant even run the bot
I'm taking coding lessons, and shit, jesus mate, and im a Roblox developer
so i dont know shit yet

#

then

pale vessel
#

feelsbadman

ionic dawn
#

Roblox developer

earnest phoenix
#

learn actual shit before attempting to make a bot

#

PLEASE

pale vessel
#

why are you guys shitting on him

earnest phoenix
#

it's always terrible to see people argue over a smol thing

ionic dawn
#

We tried to help you and you blame us

pale vessel
#

fucking relax

ionic dawn
#

Hes shitting on us

#

Read above

pale vessel
#

and why would you retaliate

#

he's just pissed

earnest phoenix
#

We tried to help you and you blame us
You guys just keep on going to the next option, and not let me explain what i need fixed

ionic dawn
#

No reason to talk us that way blobsipfast

earnest phoenix
#

^

#

not our job to help

ionic dawn
#

We just tried to help him

#

Im not wasting my time on him again CBBlock

earnest phoenix
#

wtf

#

wrong server invitr

#

dbl hates discord.js ig

#

Im not wasting my time on him again :CBBlock:
i dont fucking care

#

then

#

don't ask us for help

ionic dawn
#

16d since applied and still have +30d to go

earnest phoenix
#

go back to your coding classes where it's people's JOB to teach you

ionic dawn
earnest phoenix
#

Lmaoo, ok, fucking "Smarty pants"

fringe axle
#

Okay "Dev"

ionic dawn
earnest phoenix
#

let's put a period

#

period

winter basalt
#

if you guys are just gonna be playing insults please leave.

earnest phoenix
#

I call myself a dev because im a roblox developer, are u fucking dumb or some shit

#

i said that 8 minutes ago

#

I call myself a dev because im a roblox developer, are u fucking dumb or some shit
@earnest phoenix dude

thick gull
#

Self learning is a lot better
@earnest phoenix that is 100% a person's opinion

earnest phoenix
#

just

#

@earnest phoenix dude
@earnest phoenix People start somewhere, dude

ionic dawn
#

Whats a Roblox developer?

earnest phoenix
#

STOP ASKING FOR HELP IF YOU'RE GETTING TRIGGERED BY US

thick gull
#

@earnest phoenix hasnt someone already told you how to start your bot before???

#

like

#

multiple times

earnest phoenix
#

Whats a Roblox developer?
Its where a asshole goes when he doesnt know shit about the world

#

@slender thistle

ionic dawn
#

What?

fickle dune
#

how to install a specfic version of node in terminal

earnest phoenix
#

mod ping

#

now stop

#

@earnest phoenix hasnt someone already told you how to start your bot before???
No, everybody said different shit

#

how to install a specfic version of node in terminal
@fickle dune use npm

thick gull
#

man code your kinda being a dick here:)

fickle dune
#

yes but how

earnest phoenix
#

npm i node.js@version

fickle dune
#

oh ok

ionic dawn
#

how to install a specfic version of node in terminal
@fickle dune you can list the version and update to the available ones

earnest phoenix
#

wait

ionic dawn
#

Dont remember the commands

earnest phoenix
#

discord.js v12 doesn't work on older than v12 node.js

thick gull
#

yeah it doesnt

earnest phoenix
#

its so funny how i ask for help to get my bot to run, and i get so much blacklash for being a dumbass, even tho im new

ionic dawn
#

Mate, cut it blobsipfast

winter basalt
#

hey why not ask your question again so some could help? will be better that way

earnest phoenix
#

Do u want me to get people.
calling me a dumbass?

pale vessel
#

what do you need help with?

#

your question is like buried

ionic dawn
earnest phoenix
#

Well, my question is how to get my bot online, even tho the command to get it online is node. or something

#

"Boy"

pale vessel
#

node . only works if you have a main script defined in package.json iirc

#

what's your main script name?

#

is it index.js?

earnest phoenix
#

Its main.js

pale vessel
#

you can try node main

earnest phoenix
#

I did that, as well

ionic dawn
#

He did, but nothing happend

pale vessel
#

nothing? can you show me your directory structure? e.g. your files

ionic dawn
#

He was in the right directory aswell

earnest phoenix
#

Package . Json?

ionic dawn
#

Theres a screenshot above

pale vessel
#

aight wait

winter basalt
#

here

pale vessel
#

thank you

earnest phoenix
#

Dont look at the run part :<

pale vessel
#

run?

earnest phoenix
#

Oof

winter basalt
#

he now knows it's node

pale vessel
#

i see

earnest phoenix
#

I knew it was node the whole time, but someone else told me to do run

pale vessel
#

let me actually test on my vsc, i like never opened it

earnest phoenix
#

I dont know what's wrong

pale vessel
ionic dawn
#

Its weird

pale vessel
#

let me ask a stupid question, did you install node?

earnest phoenix
#

That is a stupid question

pale vessel
#

i knew it

#

just wanted to make sure

earnest phoenix
#

Yes

ionic dawn
#

Try tu run any other node command

pale vessel
#

looks like you're in powershell

#

try typing cmd and enter

#

after that, type node main.js

earnest phoenix
#

In terminal?

pale vessel
#

yeah

earnest phoenix
#

It said invalid parameter

#

Ohh

#

I put "mode"

#

LMAOOO

misty sigil
#

lol

ionic dawn
earnest phoenix
#

It doesnt say anything @pale vessel

pale vessel
#

can you show me a screenshot of the terminal?

earnest phoenix
#

I dont think it's the terminal or anything else that's wrong, i think it's the code

#

Is the argument over?

fringe axle
#

I dont think it's the terminal or anything else that's wrong, i think it's the code
@earnest phoenix it's not the node terminal

pale vessel
#

it's not the code either

earnest phoenix
#

Then what's wrong

#

your code

misty sigil
#

try using the run and debug function :^)

earnest phoenix
#

you literally said it

pale vessel
#

no, it's fine

earnest phoenix
pale vessel
#

jeez

misty sigil
#

your code
@earnest phoenix it’s fine code

earnest phoenix
#

Should I apply for helper role in plexidev

misty sigil
#

idk

earnest phoenix
#

NANI

#

HOLY FUCK

pale vessel
#

it worked?

earnest phoenix
#

THANKS MATTHEW

misty sigil
#

don’t forget to read the docs

#
ionic dawn
earnest phoenix
#

f i was gonna link the docs

misty sigil
#

that provides cool stuff that you’ll need

earnest phoenix
#

Aight

#

Ty

#

lmao why thank for linking the docs

#

Idk ,-;

ionic dawn
#

Why not tho

earnest phoenix
#

Yeah

winter basalt
#

why not

ionic dawn
#

Does anyone have used ytdl-core?

pale vessel
#

yes?

ionic dawn
#

Im using the Youtube API to find music and then passing the link into ytdl

#

But for some reason the second time I put the command it dsnt go in the queue, it crash the bot

#

But when I use raw youtube links and not the api the second link it does go in the queue

earnest phoenix
#

show code

#

screenshot me and send it

ionic dawn
#

Well, im actually at bed, just askin incase someone could have an idea of thecproblem

earnest phoenix
#

lol then we can't help

ionic dawn
#

ill send it later

lusty quest
#

any suggestions if i should use a CSS framework for a Bot Webinterface or build from scratch?

viral iris
#
    let items = [...response.free.rewards, ...response.paid.rewards];
    items.forEach(go => {
  setTimeout(() => {
      let m = new Discord.MessageEmbed()
        .setTitle(`Tier: ${go.tier}`)
        .addField("BattlePass Season:", `Season ${response.season}`)
        .setImage(
          go.images.full_background ? go.images.full_background : go.images.icon
        )
        .setColor("#0012f5")
        .setFooter("the official bot for lazy leaks server");
      message.channel.send(m);
}, 5000)
#

it send 5 embed then wait 5sec

#

how to make it send 1 embed then wait 5sec ?

lusty quest
#

use a loop at the end of the loop add a timeout

#
 function sleep(ms) {
        return new Promise((resolve) => {
          setTimeout(resolve, ms);
        });
      } 
``` i use this to create timeouts
#

just call await sleep(3000) as example at the end of your loop to wait for 3 seconds

viral iris
#

await can't use outside async function

tight plinth
#

async function sleep?

#

and make your run/execute function async

viral iris
#

await sleep(5000)

#

it is

tight plinth
#

apparently n9

#

you're executing it in a non async function

#

items. forreach(async go =>

sterile thicket
#

I want a to put bot.on("ready", async () => {console.log(`${bot.user.username} is online!`); }) in my main.js but that code of "on ready" event is in abc.js.
How do I import it to main.js and no I don't wanna copy paste the codes?

tight plinth
#

ig

earnest phoenix
#

Anyone can help me in rooting my device ? :c

tight plinth
#

Anyone can help me in rooting my device ? :c
@earnest phoenix this channel is for bot development

earnest phoenix
#

Ok 😭

misty sigil
#

no lumap

#

It’s for all development

sterile thicket
#

Anyone can help me in rooting my device ? :c
@earnest phoenix ig that's something not related to bot development, so... please find other server

earnest phoenix
#

@sterile thicket you know any ?

misty sigil
#

We don’t have to talk about bot dev here

sterile thicket
#

yes and you can find it in youtube as well

misty sigil
#

it’s about (bot) development

tight plinth
#

@sterile thicket the easier would be to make your abc.js a function that you export and then call it in your main.js

viral iris
#

only send 1 embed then got error

tight plinth
#

bot development, as the channel topic says

viral iris
#

also it was working before

misty sigil
#

implying that bots are the main topic, but other development issues are allowed here too

sterile thicket
#

@sterile thicket the easier would be to make your abc.js a function that you export and then call it in your main.js
@tight plinth how do I make .js a function?

tight plinth
#

do you know how module.exports works

sterile thicket
#

yes

#

I tried

#

I mean I know a little

#
module.exports = {
    run: async () => { 
  // code
  }
}```
#

right?

viral iris
#

@lusty quest u here ?

fringe axle
#

How can you do if you @ the bot he'll send a message?

lusty quest
#

ye

viral iris
sterile thicket
#

How can you do if you @ the bot he'll send a message?
@fringe axle set channel type to dm

viral iris
#

can u help me ?

fringe axle
#

@fringe axle set channel type to dm
@sterile thicket uh?

lusty quest
#

code?

fringe axle
#

I want if you do for example @fringe axle then I'll send a message in chat

#

Me = my bot

viral iris
#
let items = [...response.free.rewards, ...response.paid.rewards];
    items.forEach(function sleep(go) {
      let m = new Discord.MessageEmbed()
        .setTitle(`Tier: ${go.tier}`)
        .addField("BattlePass Season:", `Season ${response.season}`)
        .setImage(
          go.images.full_background ? go.images.full_background : go.images.icon
        )
        .setColor("#0012f5")
        .setFooter("the official bot for lazy leaks server");
      message.channel.send(m)
sleep(3000)
});
sterile thicket
#

@fringe axle message.author.send()

fringe axle
#

Okay

viral iris
#

I want if you do for example @fringe axle then I'll send a message in chat
@fringe axle do it, if message == <@urbotid> message channel send something

fringe axle
#

i did that

#

Won't work

lusty quest
#

@viral iris your full_background is not defined

earnest phoenix
#

Never knew i'd be mad about getting my bot offline after I got it online after 2 hours

viral iris
#

@viral iris your full_background is not defined
@lusty quest it was working before i add function

lusty quest
#

also make your loop async the same goes for the function

misty sigil
#

@fringe axle message.author.id.send()
@sterile thicket no.

lusty quest
#

then remove the function and see if it works

viral iris
#

client.on("message", async message => {

#

i did

misty sigil
#

message.author.send

#

ID returns a string

lusty quest
#

your loop is still sync

sterile thicket
#

oh

#

yea

misty sigil
#

you need to send it to the object

sterile thicket
#

true

#

@fringe axle message.author.send()

earnest phoenix
#

How do I get my bot offline? KEKW

lusty quest
#

stop the process

pale vessel
#

kill it

earnest phoenix
#

LMAOO

#

Kill it

sterile thicket
#

process.exit()

pale vessel
#

process.exit(69)

sterile thicket
#

process.exit(420)

fringe axle
#

@fringe axle message.author.send()
@sterile thicket It will send a message in the DMs

sterile thicket
#

Yes

misty sigil
#

use my npm module, node-exit-process

sterile thicket
#

what do you want?

earnest phoenix
#

Process.exit(420,069)

viral iris
#

if i did await sleep got error can't use outside async function

fringe axle
#

If I @ the bot he will response...

pale vessel
#

make the function async then

viral iris
#

i did

#

not working

lusty quest
#

you did not

pale vessel
#

you didn't as the error says lul

lusty quest
#

your loop is still not async

#

if you dont run the sleep async it will run all embeds then wait

viral iris
#

you did not
@lusty quest i did

lusty quest
#

items.forEach(function sleep(go) { where is this async?

#

also you got a loop inside the forEach loop

#

the funcion i send you was a standalone function you call to wait

viral iris
#

oh

#

let me try

#

1sec

pale vessel
#

you can't even use await on forEach

#

use a for loop

fringe axle
#

Anyone knows how to do it if I @ the bo he'll send a message in the chat?

sterile thicket
#

If I @ the bot he will response...
@fringe axle css message.content.startsWith(`@`)

viral iris
#

still send 5 embed

lusty quest
#

i told him he needs to run a loop async to use the sleep function i sended him but idk if he manages to do it

pale vessel
#

but it still won't work

#

he needs to use a for loop

misty sigil
#

@sterile thicket wrong, pings don’t start with @

fringe axle
#

@fringe axle css message.content.startsWith(`@`)
@sterile thicket then I can @ everyone and he'll respond

sterile thicket
#

ik

pale vessel
#

pseudocode

sterile thicket
#

I just don't want to spoon feed him

lusty quest
#
        return new Promise((resolve) => {
          setTimeout(resolve, ms);
        });
      } ``` this is a standalone function you call just the await sleep(3000) inside your loop to wait for 3 seconds
viral iris
#

also you got a loop inside the forEach loop
@lusty quest it's inside

misty sigil
#

@fringe axle
message.content.startsWith(<@botid>)

lusty quest
#

forEach cant be async

pale vessel
#

bruh

lusty quest
#

use a For in loop

fringe axle
#

@misty sigil, did that

sterile thicket
#

@fringe axle replace '@' with your bot tag

pale vessel
#

id

earnest phoenix
#

I feel like a dumbass for not kowning how to get my bot to respond to a command

pale vessel
#

@misty sigil js message.content.startsWith(`<@botid>`) || message.content.startsWith(`<@!botid>`)

misty sigil
#

Yes

fringe axle
#

I have that still

misty sigil
#

I feel like a dumbass for not kowning how to get my bot to respond to a command
@earnest phoenix use an if statement that looks at message.content

pale vessel
#

nah, use a new message event for each command

fringe axle
#

@reef aspen is my trigger.

misty sigil
#

@fringe axle is it in an if statement

fringe axle
#

No

pale vessel
#

check for both <@ and <@!

misty sigil
#

bingo

fringe axle
#

check for both <@ and <@!
@pale vessel I do that

pale vessel
#

good

#

wait what's the problem?

misty sigil
#
> message.content.startsWith(`<@botid>`) || message.content.startsWith(`<@!botid>`)```
In an if statement
fringe axle
#

OH NO

#

I forgot message.channel.send XD

pale vessel
#

bruh

earnest phoenix
misty sigil
#

I can’t see ur image

#

well looks like you copy pasted

earnest phoenix
misty sigil
#

well looks like you copy pasted

earnest phoenix
#

Lmaoo

#

Basically, but nah

fringe axle
#

Still not responding

misty sigil
#

command gets rid of the prefix so you don’t need the prefix in the if statement mmLol

earnest phoenix
#

Yeah, but I added the prefix because it wasn't working

viral iris
#

@lusty quest still send 5 embeds

misty sigil
#

also, do you have any programming experience

fringe axle
#

BTW how can I fix this? The code is working but this console warnings are annoying

sterile thicket
#

How do I make abc.js work on main.js?

earnest phoenix
#

also, do you have any programming experience
@misty sigil
On roblox ;-;

misty sigil
#

module.exports = function

lusty quest
#

@viral iris code?

sterile thicket
#

not working somehow

misty sigil
#

@misty sigil
On roblox ;-;
@earnest phoenix I’d suggest learning js before making a bot

fringe axle
#

Still not responding

misty sigil
#

It makes things a lot easier

slender thistle
#

@fringe axle one of your field values is an empty string

misty sigil
#

not working somehow
@sterile thicket did you require it?

fringe axle
#

It isn't...

sterile thicket
#

Yes

earnest phoenix
#

@earnest phoenix I’d suggest learning js before making a bot
@misty sigil
Yeah, I will, but I'm making a bot for the soul purpose to learn js okeh

viral iris
summer torrent
#

@fringe axle which presence extension do you use on vscode

misty sigil
#

definitely not a beginner project, but if you insist

lusty quest
#

you still cant run forEach async

fringe axle
#
 .addField(`Old Content`, oldMessage.content, true)
 .addField(`New Content`, newMessage.content, true)
#

All normal

slender thistle
#

Message content can be empty

fringe axle
#

Oh

slender thistle
#

For example, a message with only an image attached to it

#

Or embeds that bots post

sterile thicket
fringe axle
#

How can I fix this then?

lusty quest
#

if you use Node V14 you can use optional chaining

fringe axle
#

Me?

lusty quest
#

yes

#

its not the best way to fix it btw

#

it will just prevent it from erroring out

summer torrent
#

returns undefined

fringe axle
#

Hm

#

if you use Node V14 you can use optional chaining
@lusty quest v12

lusty quest
#

its not a thing in V12

viral iris
#

you still cant run forEach async
@lusty quest why

summer torrent
#

you need 14.x.x

lusty quest
#

bcs forEach cant be used async

fringe axle
#

oof...

lusty quest
#

use a for In Loop as example

fringe axle
#

okay, thanks

slender thistle
#

don't add the field if either/both is/are empty

#

aka if !oldmessage.content && !newmessage.content

fringe axle
#

And one more question: @reef aspen is my trigger but it won't respond if I @ my bot

#

aka if !oldmessage.content && !newmessage.content
@slender thistle okay

sterile thicket
#

I did require(./abc.js) in main.js
and module.exports = { run: async () => {...}} in abc.js

fringe axle
#

It's a messag edited event. But it triggers in pins and other things too @slender thistle

sterile thicket
#

but no response

slender thistle
#

You can check if message contents are the same

#

basically comparing old message content to new message content

fringe axle
#

Okay, thanks.

viral iris
#

bcs forEach cant be used async
@lusty quest so how to use it?

fringe axle
#

Do you know how to fix my @ problem too?

lusty quest
#

use a for In Loop as example

viral iris
#

how

earnest phoenix
#

Link me some trusted sites where i can learn Json

fringe axle
pale vessel
lusty quest
slender thistle
#

What's your code

fringe axle
#
client.on("messageUpdate", async (oldMessage, newMessage) => {
  const member = oldMessage.member;
  let lchannel = await db.fetch(`logchannel_${member.guild.id}`);
  const embed = new MessageEmbed()
      .setTitle(`![messageedited](https://cdn.discordapp.com/emojis/742648790388965378.webp?size=128 "messageedited") Message edited`)
      .setColor(`#ea6ef1`)
      .setDescription(
        `**User: ${oldMessage.author.tag} (${oldMessage.author.id})\nChannel: <#${oldMessage.channel.id}> (${oldMessage.channel.id})**`
      )
      .addField(`Old Content`, oldMessage.content, true)
      .addField(`New Content`, newMessage.content, true)
      .setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }));

      if(!oldMessage.content && !newMessage.content) {
        console.log(`-> Message Update -> Same Messages`)
      }

    client.channels.cache.get(lchannel).send(embed);
});
pale vessel
#

are you checking whether the old content and the new content are the same?

summer torrent
#

add if condition for that

viral iris
#

@lusty quest i didn't understand

fringe axle
#

are you checking whether the old content and the new content are the same?
@pale vessel yea

summer torrent
#

messageUpdate can trigger if you post a link with its embed (preview)

pale vessel
#

why not oldMessage.content == newMessage.content?

slender thistle
#

You're only checking if message contents are empty

fringe axle
#

Oh

slender thistle
#

I suggest you nest that into an if that will check if message contents are the same

lusty quest
#
for (item in items){
//your stuff you used in your foreach loop
await sleep(3000)
}
```use this inside a async block @viral iris
fringe axle
#
 if(!oldMessage.content == !newMessage.content) {
        console.log(`-> Message Update -> Same Messages`)
      }
``` I did this now but he's still sending the message
earnest phoenix
#

the fuvk

slender thistle
#

Well

earnest phoenix
#

!oldMessage.content

#

why the exclamation mark

slender thistle
#

Remove the negate operators

lusty quest
#

wait i think a for of loop is better

fringe axle
#

Okay

earnest phoenix
#

you're comparing booleans

#

Apple pen

#

Pineapple pen

#

the exclamation checks if the thingy doesn't exust

#

so it returns a boolean

slender thistle
earnest phoenix
fringe axle
#

Okay, nice

weak rain
#
  let channel = client.guild.channels.cache.find((x) => (x.id === "749542048025280552"))    
  
    let embed = new Discord.MessageEmbed()
    .setColor(`RANDOM`)
    .setTitle(`**Joined a Server!**`)
    .addField(`**Name**`, `**${guild.name}**`)
    .addField(`**Guild ID**`, `**${guild.id}**`)
    .addField(`**Users**`, `**${guild.memberCount}**`)
    .addField(`**Owner**`, `**${guild.owner.user.tag}**`)
    .addField(`**Owner ID**`, `**${guild.owner.id}**`)
    .setThumbnail(guild.iconURL)
    channel.send(embed) 
  })

WHY THIS IS NOT WORKING

lusty quest
#

error?

misty sigil
#

ok so first off

#

That is a creepy amount of data

earnest phoenix
#

no spoonfeeding

weak rain
#

no error

earnest phoenix
#

Then

misty sigil
#

it’s client.channels.cache.get("channelID")

earnest phoenix
#

Try to check what's wronf

misty sigil
#

not whatever that spaghetti is

viral iris
#
for (item in items){
//your stuff you used in your foreach loop
await sleep(3000)
}
```use this inside a async block @viral iris

@lusty quest item not defined

earnest phoenix
#

lmao

#

the fuck

lusty quest
#

@viral iris its a example code

earnest phoenix
#

gosh

misty sigil
#

client.guild.channels.cache.find((x) => x.id === "id") is just spaghettis

pale vessel
earnest phoenix
#

guildCreate

#

correct spelling

viral iris
#

@viral iris its a example code
@lusty quest what should it be ?

earnest phoenix
#

the fuk

lusty quest
#

idk its your code?

earnest phoenix
#

lmao

weak rain
#

oh

pale vessel
#

also, it doesn't give you client, just guild

#

so client.on("guildCreate", async guild => {});

lusty quest
#

depends if the event loader attach the client to the event then it does

pale vessel
#

it's not an event loader from what i'm seeing

lusty quest
#

ohh right

#

my bad