#development

1 messages Β· Page 1087 of 1

opal plank
#

i tag here cuz idk if it was the message before that triggered it

#

'pls' might be the command prefix and i triggered by mistake

wanton dew
#

@opal plank kicked lol

opal plank
#

thank god

wanton dew
opal plank
#

not only leveling system messages, it has the balls to dm users

earnest phoenix
#

hello

opal plank
#

could've added free nitro on the bottom to put the cherry ontop

amber fractal
#

a lot of bots dm when they cant chat in the channel

earnest phoenix
#

now 2 week left

#

to verify my bot 1 week

#

or 2 week

#

to verify my bot

unique knoll
opal plank
#

they shouldnt output leveling messages either way bonkcat

#

from definition, bots should reply to commands

#

not any message

earnest phoenix
#

yes

amber fractal
#

you know how many level up bots there are

opal plank
#

doesnt make it right though

amber fractal
#

Doesnt matter, it's a huge market

#

they are some of the most successful bots

opal plank
amber fractal
#

and the top bots do it

#

best practices

opal plank
#

allowed, not proper

#

Discord has a very loose interpretation of API abuse; as quoted by them:

American Jake01/21/2018
@​Danny automating the API in that way /is/ abuse. Automatically doing "X" every N is generally not a good idea. Where X could be posting a message, changing someone's nickname, renaming a role, changing a channel topic, etc... 

Generally bots should only react to user actions... 

Although, for very large N we generally don't care. But for small N, we do care. Think rainbow bots, etc....

"N" is not really defined, as rate limits are not a good thing to try to get very close to. You're going to have to mostly use common sense here, compare how close you are the rate limit, how often you do this, etc.

#

this is from Jake

amber fractal
#

I've seen that messages multiple times

opal plank
#

while it mentions status

amber fractal
#

You still dont see the point

opal plank
#

it does say, bots should usually react to messages

#

not ANY message

amber fractal
#

it also says usually

#

meaning it can react to any message

opal plank
#

grey territory

amber fractal
#

just usually not

digital ibex
#

anyone know how can i ratelimit u the way eris and discord.js does?

amber fractal
#

which is what a level system is

#

it usually doesnt tell you about it

#

until you level up

opal plank
#

leveling system is fine, outputing is the problem

amber fractal
#

which is the usually

opal plank
#

mee6 is a great example of how much of a shitshow it turns in a populated server

#

@ HEY YOPU LEVELED UP!

amber fractal
#

And as I said, the top bots do it and are in hundreds of thousands if not millions of servers, so discord clearly doesnt care if they have them

opal plank
#

every 5th message

amber fractal
#

smaller bots follow the precedent of larger bots

opal plank
#

being allowed doesnt make it right though, lots of things are overlooked cuz it isnt bothering them

#

same for automated status

#

automation of api bad. period

#

though they allow to some degree

amber fractal
#

Still not the point, automation is a big point of discord bots

#

Anti raid

opal plank
#

what?

#

thats not outputting anything to the api

#

tthats recieving events

amber fractal
#

And emitting bans and kicks

#

and messages

opal plank
#

indeed

unique knoll
#

I have a Discord.MessageCollector that doesn't seem to be following the integer option for max messages to process; it keeps reading messages. How do I have it stop after a certain amount of messages come in? Or what's the appropriate way to close it out?

digital ibex
#

how can i rate limit bots the same way eris & d.js does?

#

using node.js

smoky spire
#

you can look at the source code of those libs

digital ibex
#

im not talking about how they code it

#

im asking how to do something to stop users from doing something like sending 5 messages a second

snow urchin
sudden geyser
#

maybe it's the result of client.db.fetch(...) in your last statement.

restive lily
sudden geyser
#

hover over it. what does it say?

restive lily
sudden geyser
#

add a value="some value" to the kargs

restive lily
#

oh-

#

what if i dont want a clue

#

*value

#

can i just leave it blank

sudden geyser
#

Well you need some sort of value to pass

restive lily
#

my value us a

#

*is

rocky hearth
#

Can I hv multiple image files attached to a single message?

sonic lodge
#

yes

hollow current
#

If I’m using on_message(message) is it possible to make it only check if a message was sent in a specific channel?

sonic lodge
#

yes, just get the message channel property and then its id

jolly quail
#

Maybe something like message.channel.id===YOUR_ID in the first line

snow urchin
#
              message.member.voice.channel &&
              !message.member._roles.includes(client.db.fetch(`cmb.config.${message.guild.id}.djRole`)) &&
              message.member.voice.channel.members.filter(m => m != client.user.id).size != 1 &&
              (command.config.djOnly && client.db.fetch(`cmb.config.${message.guild.id}.djOnly`))

https://i.callumdev.pw/7peh0.png
https://i.callumdev.pw/4gi2c.png

hollow current
#

How would I get a list of all the text channels in a specific server

#

By id or name I don’t care

pale vessel
#

refer to your library's docs

hollow current
#

ah

#

Thanks lol

bright dove
#

if you put client infront make sure client is infront on your index too
@opal plank well now the other commands don't work if I don't put client on their parameters... any way to fix this or is or do I just have to ignore it?

#

cause it's not like it'll ruin the code putting client even on the ones that don't need it

#

just annoying lol

earnest phoenix
#

hey will this work?
NodeJS

console.log("Hey, will this work?");
pale vessel
#

no

earnest phoenix
#

ic

pale vessel
earnest phoenix
#

i can't try

#

cuz yes

livid scarab
#

?

jagged crater
#

So I am trying to turn my bot online for the first time but "node ." isnt working, does anyone know any other ways to turn the bot online?

bright dove
#

is it giving any error text when you run "node ."?

sweet dust
#

hi guys!

#

I am gifting out nitro for everybody

jagged crater
#

No it just puts to like next line thing

sweet dust
#

have a good day

bright dove
#

try "node <name-of-main-file>.js"

#

@jagged crater

jagged crater
#

k

#

No doesnt work erither

bright dove
#

do you have it set to console.log something when the bot comes on?

#

^

jagged crater
#

Yes

    console.log('Creator is online!');
});```
#

thats what i have it as

bright dove
#

hmm

#

screenshot all (or as much as you can) of your code and send it to me

#

if it has your token you can blur or whatever

jagged crater
#

well okay not much as it is just been made

#

so atm the screen shot isnt working but here is what i have

const client = new Discord.Client();


bot.once('ready', () =>{
    console.log('Creator is online!');
});

bot.login('token');```
lusty quest
#

did you have node installed and added to your path (windows)

jagged crater
#

yes

lusty quest
#

what does node -v print?

jagged crater
#

let me see

#

v12.18.3

lusty quest
#

ok

#

did you installed the required packages ?

bright dove
#

it's because your variable is client but you're trying to call it as bot

jagged crater
#

I do believe so, I have Visual Studio code and node.js, all i was told to download

bright dove
#

either change the second line "client" to bot

jagged crater
#

oh

lusty quest
#

also this

bright dove
#

or change all of the "bot"s to client

lusty quest
#

you probably need to install discord.js

jagged crater
#

okay thanks

#

oh yes i have that

lusty quest
#

so you installed the required packages

jagged crater
#

yes

#

okay so i did change it all to bot but it doesnt work let me try all client

#

no nothing lol

bright dove
#

did you press ctrl+s?

#

and then do node .

jagged crater
#

uh no

bright dove
#

ctrl s saves the code

jagged crater
#

omg i am so dumb

#

thank you so much lmao

bright dove
#

not knowing something doesn't make you dumb πŸ™ƒ

bright dove
#

be nice to yourself

silver raptor
#

Why is it showing?

jagged crater
#

lol

silver raptor
#

I can't make my bot online

lusty quest
#

npm i discord.js --save

jagged crater
#

thanks though much appreciated, have a good day/night imma go to bed ❀️

bright dove
#

you did do npm i discord.js --save right?

silver raptor
#

Okk

#

I will try

#

@bright dove where to write there

lusty quest
#

did you know javascript basics?

silver raptor
#

In cmd?

bright dove
#

yes

#

either in command prompt or your programming application's terminal

sonic lodge
#

what would the regex be to match the letter x, if there is no character to its left or the character to its left is not a letter

#

so 3x3 and x+x match (the latter twice)

#

but sinx does not match

silver raptor
#

It shows error @bright dove

bright dove
#

^

#

what error

#

either screenshot or send the error code

silver raptor
#

Wait

bright dove
#

waiting

lusty quest
#

install windows build tools

silver raptor
#

Link ?

#

Give the link please

lusty quest
#

npm install -g windows-build-tools

#

in a shell with admin permissions

#

(can easy take 30+minutes depending on your Internet/PC)

bright dove
#

wait

#

I don't think he did npm init

lusty quest
#

he still needs the build tools

bright dove
#

I didn't

delicate shore
#

Which is the best of the best

#

And not expensive

#

Vpa

#

VPS

#

Which gives remote access as well

#

That can be installed

bright dove
#

@silver raptor do npm init and just hit enter on all of the prompts, and then do npm i discord.js --save

delicate shore
#

But not some of them

#

Same was problem with me

#

I installed Windows build tool s

#

And it worked

delicate shore
#

Error

silver raptor
#

Next?

delicate shore
#

Install it

#

First

lusty quest
#

wait until it is finished

delicate shore
#

What r u doing

#

Open powersheel

#

Powershell

silver raptor
#

?

delicate shore
#

@lusty quest he is doing in cmd prompt but the Windows build tools have to be installed by powershell

lusty quest
#

it can work in a CMD too if you run it with Admin permissions

delicate shore
#

Oh nvm

#

Yeah I just saw

#

oof

#

Sry

silver raptor
#

How long will it wait?

delicate shore
#

It took me 30+ minutes

lusty quest
#

(can easy take 30+minutes depending on your Internet/PC)

silver raptor
#

Still waiting for installer log file...

delicate shore
#

If it takes 40+ min

#

Then abort it

#

And run again

lusty quest
#

did you run it with Admin Permissions?

silver raptor
#

Idk

lusty quest
#

then it will get stuck

#

close the cmd

delicate shore
#

Yes

lusty quest
#

and open a powershell with administrator permissions

delicate shore
#

Yes

#

πŸ†’

silver raptor
#

How to get that?

#

@lusty quest

silver raptor
#

@lusty quest how long will it take?

#

Is it right?

delicate shore
#

Is it right?
@silver raptor
Yes

#

Just wait

#

30-40 mins

bright dove
#

I didn't have to do that stuff

#

so idk why they're making you

#

but idk I've only been doin this for a day 😨

silver raptor
#

Still same

#

@lusty quest

bright dove
#

tell me exactly what you did after that downloaded

#

what did you put into command prompt?

#

@silver raptor

lusty quest
#

did you ran npm init before installing modules @silver raptor

bright dove
#

^

stiff stream
#

how do i make that in a field it will be empty after the field and wont say undefine

#

?

lusty quest
#

add \u200b as value for the field

pure lion
#

Get the guild ID

#

But fr

#

Don't use json as your fucking db

#

Please

#

:)

earnest phoenix
#

lol

pure lion
#

How are you storing the role?

#

Don't use json

earnest phoenix
#

It's him choice

pure lion
#

But json bad

#

@cry

#

@Cry

#

Where is the dood

earnest phoenix
#

im here dw

#

cry is typing

#

:p

#

anyways

pure lion
#

Send the json rant thing

earnest phoenix
#

stop using json as your database because it isn't a database in the first place, it's a notation meant to quickly exchange object structure and data

#

not to be used as a database

#

refactor your code to not use json

lusty quest
#

@pure lion json is fine for static data

earnest phoenix
pure lion
#

But idc

#

@lusty quest

#

:)

earnest phoenix
#

json is fine to be used as a config file for lets say, startup instructions

pure lion
#

Anyway, if the bot suddenly gets 100 servers, that's 100 writes and probably more in a short period of time

#

Anyway, if the bot suddenly gets 100 servers, that's 100 writes and probably more in a short period of time

lusty quest
#

json is fine for static data. but can get corrupted if used for dynamic data

pure lion
#

Did the discord servers just to down again

#

Nvm

bright dove
#

stop using json as your database because it isn't a database in the first place, it's a notation meant to quickly exchange object structure and data
@earnest phoenix what should we use instead? (not even close to needing databases yet, just curious for the future)

earnest phoenix
#

from my experience I'd suggest sqlite for small scale, postgresql for large scale

#

there are also nosql alternatives like mongodb

bright dove
#

define "small scale" and "large scale" like I'm 5 pls 😨

earnest phoenix
#

id suggest looking up pros and cons of each and picking the one that's best for you

lusty quest
#

large scale i would say 100+ Shards

#

maybe 50+ Shards

earnest phoenix
#

basically small scale is low usage, you aren't doing anything super big, large scale is big usage, having to constantly write and edit data

lusty quest
#

its easyer to build a prober database integration before you need it -> Sharding across mutiple machines

#

also idk how a Json DB reacts if you have mutiple processes accessing it at once

earnest phoenix
#

you cant mmLol

#

you can choose to lock the file, if you do so then all other requests to access the file will be denied

#

or you don't lock it

lusty quest
#

this will just cause cascading issues

bright dove
#

oh

earnest phoenix
#

correct, each request will write their own data without being aware of each other, which causes overwriting which is the main cause of data loss

bright dove
#

they cost money don't they

#

πŸ˜”

earnest phoenix
#

uh no

lusty quest
#

you can get a Free MongoDB instance

earnest phoenix
#

almost all database software is free

lusty quest
#

as example

earnest phoenix
#

ok

pure lion
#

ok

#

lol

#

get noobed

restive furnace
#

get noobed, i have played 0 microseconds of vsc

bright dove
#

bruh

midnight blaze
#

can someone help me to continue my eval command, so I can open the marked information in my picture?

#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(message.channel._typing))

#

when I console.log() this, I get a [object promise]

#

how should I resolve an object promise? I couldnt really find anything helpful on stackflow

pale vessel
#

await

midnight blaze
#

I can not use then?

pale vessel
#

that should return a collection, so use collection#first()

#

you can

#

try changing message to msg.first() since it returns a collection (you used the limit option)

#

and for channel._typing, what are you trying to do?

#

channel#startTyping()?

#

i'm not sure what you're trying to do

midnight blaze
#

yeah, something like that flazepe, but first of all, I try to understand how to open those marked position, I just want to learn how to^^(I am training atm)

pale vessel
#

msg.first().timeout._onTimeout
?

midnight blaze
#

hmm, let try that out, thanks

pure lion
#

i have a little issue with C, opengl

#

wait wrong server

midnight blaze
#

@pale vessel I tried your method
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().timeout._onTimeout))

this did not work.

The furthest I have came was this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first())

What I am wondering tho is, where u got that function first(), but besides that, I am still not able to get all the information I want.

pale vessel
#

messages#fetch(option) returns a collection of message(s). you can use the method first() to get the first element in a collection

#

so that gets the first and only message that you fetched

earnest phoenix
#

size of what

midnight blaze
#

@pale vessel ok, got it, thanks for that

earnest phoenix
#

the window? the font? a penis?

pale vessel
#

try doing Object.getOwnPropertyNames(msg.first())

#

probably the latter

pure lion
#

the window? the font? a penis?
the regrets of atmod

midnight blaze
#

ok, I will do that. ty

pure lion
midnight blaze
#

that only returns an array tho

pale vessel
#

uh, yeah?

#

what's the content

#

those are available properties that you can access

midnight blaze
pale vessel
#

timeout isn't there

midnight blaze
#

ok, yeah, that is why it did not work

#

hmm

#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel))

#

this worked

pale vessel
#

because it's available for you to access

dusty marten
#

Hi

tight plinth
#

How to make an image url visible on the discord.
@earnest phoenix ?

pale vessel
#

add a message after the url

#

or just a letter

#

that's not a valid image

dusty marten
#

hola

tight plinth
#

send a link to a valid image

#

lol

midnight blaze
#

@pale vessel sry for ping, can I ask you last question? πŸ€”

pale vessel
#

aSkToAsK

midnight blaze
#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))
this gives me a unresolved promise, if I do it like this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing)).then(msg => console.log(msg))

I receive undefined

#

yeah askToAskxD

pale vessel
#

bruh you already pinged me might as well ask but okay

midnight blaze
#

I mean, i asked u so many times

#

just wanted to make sure xD

pale vessel
#

why do you want to access channel#_typing

midnight blaze
#

no reason, just want to access it πŸ‘€

pale vessel
#

console.log the channel

midnight blaze
#

I did

pale vessel
#

show

midnight blaze
#

when I do this, I get a unresolved promise tho, dont I have to resolve the promise in order to access stuff like _onTimeout

#

?

#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))

#

I get this what I have just screenshoted

pale vessel
midnight blaze
#

yep

pale vessel
#

that looks like a message

#

why would a channel be a map

#

or have the property user

midnight blaze
#

no idea :> I am just console.log()

pale vessel
#

did you seriously try 1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel))

#

also, isn't msg.first().channel just message.channel

nocturne grove
#

lol

midnight blaze
#

I did when you scroll up message.channel

#

but then you told me I should try to change that to msg.first()

#

and I continued with that

pale vessel
#

msg.first() is a message

midnight blaze
#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))
to make it clear, the screenshot was this

half bison
#

how to import glitch to github?

pale vessel
#

facepalm oh

midnight blaze
#

I get it flazepe, but dont u see what I am trying? It doesnt really matter what it is

pale vessel
#

that's the _typing property

midnight blaze
#

I just want to open the stuff that they display me

pale vessel
#

what do you want to do with channel#_typing is what i don't get

midnight blaze
#

to open _onTimeout

#

for example

#

just to get further and see what we can find in {Function}

pale vessel
#

make sure you can access them by using Object.getOwnPropertyNames(msg.first().channel._typing)

midnight blaze
#

[ function]

pale vessel
#

oh

#

just toString it

#

msg.first().channel._typing.timeout._onTimeout.toString()

#

omit the () so that you don't invoke the function

#

i'm assuming you want to see the function code

#

since there's no such thing as properties inside a function

#

it's literally a function

midnight blaze
#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing.timeout._onTimeout.toString()))

I have tried this and when I do stuff like that, I get an error

#

let me show it to you

#

warning unhandled promise rejection, that is why I have aksed before, how to resolve the promise

pale vessel
#

means that msg.first().channel._typing.timeout._onTimeout is undefined

midnight blaze
#

oh

#

yeah, I wanted to see the function code

pale vessel
midnight blaze
#

yep

pale vessel
#

show

midnight blaze
#

empty array

#

1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(Object.getOwnPropertyNames(msg.first().channel._typing)))

I dont see tho how it is empty, when you can see that there are stuff, when you console.log it normally

pale vessel
#

oh yeah it's a map

midnight blaze
#

should I use map() function?

pale vessel
#

no, that's for arrays

midnight blaze
#

and for maps?

mild flower
nocturne grove
#

Okay I have a weird issue and I hope one of you can solve it. I think the problem gets clear when I explain it.
First situation:
bot: js const role = guild.roles.cache.get('id'); role.d = 'hi';
console.log(role); => role.d returns 'hi'
eval: guild.roles.cache.get('id').d => undefined

Second situation: (after restart)
eval: guild.roles.cache.get('id').d = 'hi';
eval: guild.roles.cache.get('id').d; => returns 'hi'

Why does it work if I add the property through eval and it doesn't work when the bot does it?

pale vessel
#

try console.log([...msg.first().channel._typing.entries()])

mild flower
#

bruh the $ arg is not working

#

like this one -> ${example}

earnest phoenix
#
`${example}`
#

you use ' instead of `

novel fable
#
const server = http.createServer(app);
const dbl = new DBL(`lmaokeyhere`, { webhookAuth: 'auth', webhookServer: server });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running with path ${hook.path}`);
  });

  dbl.webhook.on('vote', vote => {
    const voted = new Discord.MessageEmbed()
    voted.setColor(`RANDOM`)
    voted.setAuthor(`XBot DBL Webhook`)
    voted.setDescription(`${vote.user.tag} just voted for XBot!\nID: ${vote.user.id}\nThank you and don't forget to vote again!`)
    voted.setTimestamp()
    voted.setThumbnail(vote.user.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
    bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
  });``` hey anyone know what i did wrong here?
#

it doesnt send anything after a user voted

earnest phoenix
#

debug

#

see if the event fires in the first place

mild flower
earnest phoenix
#

Yes

mild flower
#

ok
thanks a bunch

midnight blaze
#

@pale vessel 1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing.entries()]))
I get an empty array again πŸ€”

novel fable
#
    console.log(`Webhook running with path ${hook.path}`);
  });``` hmm this doesnt clog anything ehh
mild flower
#

i just couldnt figure it ou

novel fable
#

but why tho hmm

mild flower
#

same
i need to know how to randomize embed color

earnest phoenix
#

for embed

#

.setColor("RANDOM");
will do

mild flower
#

oh

earnest phoenix
#

And by random message, you mean message with random string?

novel fable
#
const server = http.createServer(app);
const dbl = new DBL(`lmaokeyhere`, { webhookAuth: 'auth', webhookServer: server });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running with path ${hook.path}`);
  });

  dbl.webhook.on('vote', vote => {
    const voted = new Discord.MessageEmbed()
    voted.setColor(`RANDOM`)
    voted.setAuthor(`XBot DBL Webhook`)
    voted.setDescription(`${vote.user.tag} just voted for XBot!\nID: ${vote.user.id}\nThank you and don't forget to vote again!`)
    voted.setTimestamp()
    voted.setThumbnail(vote.user.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
    bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
  });``` hey anyone know what i did wrong here?
it doesnt send anything after a user voted
midnight blaze
#

xD I guess nobody can help me with this

#

how the hell, why is it so difficult

earnest phoenix
#

do you store the url in array?

#

aka
["url1", "url2", "url3"]

midnight blaze
#

@pale vessel
If I do this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing]))

I get this screenshot.

earnest phoenix
#

Your did it wrong

pale vessel
#

it's not that i don't want to help, it's just that i don't see the point in doing that

earnest phoenix
#

it will return boolean

#

store it in an array

pale vessel
#

you're trying to access private properties at this point

midnight blaze
earnest phoenix
#

array is a list of data

pale vessel
#

append [0][1]

midnight blaze
#

aight, but I was just wondering why it was empty

earnest phoenix
#

for example
["Data", 123, true]

mild flower
#

how do i get the username of the guy who sent the message using ${}

midnight blaze
#

with your command

earnest phoenix
#

you put all of the link into an array

#

["url1", "url2"]

mild flower
#

what is the thingy to get the username using ${}

midnight blaze
#

@pale vessel I know how to access that actually πŸ˜› thanks and I think I am more or less done, just a last question
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing.entries()]))

This was your command, but as I showd in my screenshot, it retruned an empty array, you have an idea why?

pale vessel
#

i tried getting the map entries

#

seems like you didn't have to do that

#

look at the code difference

#

ess em esch

earnest phoenix
#

then you need math.random

#

have you turn those link into array?

#

alright

#

SA

#

VSA

#

i don't like feeding you code

#

so

#

uh

#

you have to make a variable

#

let urlList = []

#

that's how you define a variable

mild flower
#

bruh i couldnt find anything related to discord.js in the list
could you PLEASE just tell me the tag for saying a user's username

earnest phoenix
#

got it?

#

so

#

user is an instance of author righjt?

#

@πŸŒ™ $hadow ノᡃˑⁿ
#0001

#

πŸŒ™ $hadow ノᡃˑⁿ
#0001

#

alright

#

@earnest phoenix

mild flower
#

ah ok thanks'

#

finally

earnest phoenix
#

you can access item array like this

#

array[0]

#

array[1]

#

so to get a random message

#

we have to get a random number between 0 and message length

#

that's why we need math.random

#

so do that

#

urlList[randomnumber]

#

uh

midnight blaze
#

@pale vessel
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing][0][1].timeout._onTimeout))
this is how far I got

#

what I get in the console πŸ‘€

pure lion
#

()

midnight blaze
#

I guess I wont be able to see what they have inside that

mild flower
#
            .setFooter(`Poll initiated by : ${user.tag}`)
                                              ^

ReferenceError: Cannot access 'user' before initialization```
Wut
pale vessel
mild flower
#

how do i specify user

midnight blaze
#

ok, true

#

I forgot about this πŸ‘€

earnest phoenix
#

@mild flower do you know what variable is?

mild flower
#

yes

earnest phoenix
#

yes do that

#

define what user is

midnight blaze
#

It worked

#

xD

mild flower
#

how do i make it so that the person who send the ;poll message gets specified as user?

earnest phoenix
#

so

#

#Message.author

#

that's how

mild flower
#

bru

analog roost
#

.setFooter(`Poll initiated by : ${message.author}`)

#

.setFooter(`Poll initiated by : ${message.author.username}`)

earnest phoenix
#

^

analog roost
#

choose one

earnest phoenix
#

or message.author.tag

analog roost
#

message author gives there id

tight plinth
#

${message.author} normally mentions the user, but I'm not sure it works in the footer

mild flower
#

yes its giving the id

analog roost
#

message.author.username just types the name

mild flower
#

ok

#

yea boi

analog roost
#

nice

earnest phoenix
#

Nice ^^

still merlin
#

I wanna make a suggestions command for a server but I'm not sure how I would get my bot to react on a message, Anyone know how?

analog roost
#

What I use:

pale vessel
#

have you tried reading docs?

analog roost
#
                messageReaction.react("πŸ‘");
                messageReaction.react("βž–");
                messageReaction.react("πŸ‘Ž");```
earnest phoenix
#

^

pale vessel
#

seriously

analog roost
#

Imao

#

simple and solved

earnest phoenix
#

or if you use await

analog roost
#

yeah

pale vessel
#

o shit

analog roost
#

await is easier

earnest phoenix
#
let message = await message.channel.send(embed);
message.react("πŸ‘");
pale vessel
#

i have a simple question: why didn't you read docs

#

also that won't work

#

you need the unicode for normal emojis

earnest phoenix
#

tbh i think why people here need help, is because that don't know it exist in the docs OR don't know how to read the docs OR too lazy to read logs;

pale vessel
earnest phoenix
#

dude i am sorry

analog roost
#

lol

#

so true

earnest phoenix
#

i didn't notice it got turn into :sdgsdkljgnwehj:

#

that's how discord work softShrug

pale vessel
#

that's how mafia works

analog roost
#

they need to be hand fed

slender thistle
#

simple and solved
@analog roost spoonfeeding is obviously simpler compared to explaining

analog roost
#

so true

pale vessel
#

but it's a bad practice and makes the person ask for more instead of learning for themselves

slender thistle
#

and totally not against our rules.

analog roost
#

you read me like a book

sinful lotus
#

also name variables a bit more concise

earnest phoenix
#

so true

analog roost
#

oh it is

#

sorry bout that

earnest phoenix
#

totally not against the rules

tight plinth
#

it is lol

pale vessel
#

sarcasm intensifies

earnest phoenix
#

totally TOTALLY not against the rules

#

Math

pale vessel
#

because it's Math.random()

earnest phoenix
pale vessel
#

k

slender thistle
#

Define "can't use"

sinful lotus
#

messageReaction is kinda confusing specially d.js has messageReaction class

midnight blaze
#

@pale vessel yeah, bad habbid. I can tell. People shouldnt ask too much pandasad

earnest phoenix
#

blocked

slender thistle
#

Do you get any errors

earnest phoenix
#

array[the_random_number]

pale vessel
#

uh

slender thistle
#

Math.random returns a value from 0 to 1

#

a float

earnest phoenix
#

LOL

pale vessel
#

wha

sinful lotus
#

nani kure

pale vessel
#

😩 fuck this channel

quartz kindle
#

well, you tried

slender thistle
#

Well you JS gang sort this out yourself

midnight blaze
#

oh noes flazepe

earnest phoenix
#

memeurls[Math.random()]

pale vessel
#

no.

sinful lotus
#

you will grab a random item in the array

earnest phoenix
#

i explain you like

#

10 minutes ago

quartz kindle
#

still wrong lmao

pale vessel
#

lmao

sinful lotus
#

using math.random math.floor then the times length of that array dude

earnest phoenix
#

oh wait

#

FUCK

#

nvm

#

@quartz kindle explain it please ty

#

i am dumb

#

i need info

pale vessel
#

saya did

midnight blaze
#

oof

pale vessel
#

look at what you did

#

this is why we don't blindly spoonfeed

sinful lotus
#

im not spoonfeeding anything but I said what you need to use

novel fable
#
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path} - Works`)
  });

  dbl.webhook.on('vote', vote => {
      let voter = bot.users.get(vote.user)
    console.log(`2`)
    const voted = new Discord.MessageEmbed()
    voted.setColor(`RANDOM`)
    voted.setAuthor(`XBot DBL Webhook`)
    voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
    voted.setTimestamp()
    voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
    bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
  });``` this still doesnt send the message tho, anyone know why?
earnest phoenix
#

i don't wanna spoonfeed you

sinful lotus
#

or a simple google how to pick random item from an array will work

earnest phoenix
#

oh yeah

midnight blaze
#

wth

pale vessel
#

in javascript

midnight blaze
#

that guy simply copy paste its code

#

doesnt even explain anything

earnest phoenix
#

no

pale vessel
#

no, i said "k"

midnight blaze
#
Math.floor((Math.random() * 10) + 1);

Return a random number between 1 and 10:

I dont really see what problem you have with random numbers

Is that spoonfeeding?

slender thistle
#

It is bad

midnight blaze
#

@earnest phoenix lol

earnest phoenix
#

i am done

pale vessel
#

would putting 1 inside the floor make a difference?

earnest phoenix
#

yall explain it

#

ty <3

pale vessel
#

asking just in case

novel fable
#

uh can anyone help me for vote logging

midnight blaze
#

@novel fable xD nice question, how about you are more specific?

quartz kindle
#

@earnest phoenix javascript does not have a built in way of selecting a random item from an array, therefore you have to build your own method using a random number
when you use Math.random(), it gives you a random number from 0 to 9.9999.
if you multiply this random number by the number of items you have, for example 10 if you have 10 items, then you will get a random number between 0 and 9.9999
but array indexes need whole numbers, without decimals, so you have to convert the new random number into a whole number. there are many functions that can do this, for example Math.floor() which rounds the number down to the nearest whole number, for example Math.floor(9.3545) becomes 9.
so basically you get a random number, multiply it by the number of items, then floor it into a whole number. then you can use the resulting number to get the item from the list using memeurls[final number here]

pale vessel
#

holy shit

sinful lotus
#

oh my

#

thats a lot of effort

#

but you need numbers

pale vessel
#

have you tried reading first

slender thistle
#

You want indexes

#

which happen to be numbers

sinful lotus
#

to pick a data from that array

midnight blaze
#

@earnest phoenix how about you read what he has written

earnest phoenix
pale vessel
#

you literally got a free stackoverflow answer

novel fable
#
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path} - Works`)
  });

  dbl.webhook.on('vote', vote => {
      let voter = bot.users.get(vote.user)
    console.log(`User with ID ${vote.user} just voted!`)
    const voted = new Discord.MessageEmbed()
    voted.setColor(`RANDOM`)
    voted.setAuthor(`XBot DBL Webhook`)
    voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
    voted.setTimestamp()
    voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
    bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
  });``` this doesnt send a message to the channel or log anything, do you know why?
#

(only for the vote part)

midnight blaze
#

@novel fable nobody is going to spoonfeed you like that bruh xD

earnest phoenix
#

hi guys

sinful lotus
#

or did you actually have opened ports on ur server?

earnest phoenix
#

how do i create google?

novel fable
#

i just need to know why it doesnt send eh

quartz kindle
#

@earnest phoenix go step by step, you can start by creating a variable for each step, in order to understand

#

for example

sinful lotus
novel fable
#

ehh ports idk oof

pale vessel
#

try adding vote.user.username or something since that could be the entire object instead of a mention (since this is from the api, not discord.js)

earnest phoenix
#

This is a short tutorial on how to get a random value from a JavaScript array.

Atta's Blog

A quick guide to learn how to select a random value from an array in JavaScript.

Here I will show you hot to get a random item from an array in JavaScript with a simple and easy way just by writing two lines of code.

pale vessel
midnight blaze
sinful lotus
#

if you dont know array, then I suggest you learning what array is

quartz kindle
pale vessel
#

please surround your links with <>

earnest phoenix
#

and this

sinful lotus
#

cause you actually made an areay

midnight blaze
#

@pale vessel ok πŸ‘€

pale vessel
#

for hayper

#

because damn that's long

midnight blaze
#

try adding vote.user.username or something since that could be the entire object instead of a mention (since this is from the api, not discord.js)
@novel fable do this

novel fable
#

o

earnest phoenix
#

wait what

#

<link>
this?

pale vessel
#

yes

novel fable
#

but i thought someone said vote.user gives ID

pale vessel
#

oh it does

earnest phoenix
#

i am a dumbo again

pale vessel
#

never used the api lmao

#

i post manually and don't need vote webhooks

earnest phoenix
#

gotta learn discord markdown

novel fable
#

o

midnight blaze
#

learned something new

silver raptor
#

How will I know if they rejected/accepted my bot?

pale vessel
earnest phoenix
#

The bot @gilded plank will dm you
@silver raptor

novel fable
#

let voter = bot.users.get(vote.user)

pale vessel
#

o

silver raptor
#

The bot @gilded plank will dm you
@earnest phoenix it DM to keep patience

pale vessel
#

it's users.cache.get()

earnest phoenix
#

just wait

pale vessel
#

you're on v12

silver raptor
#

How long?

earnest phoenix
#

3-4+ weeks

novel fable
#

oh feck i forgot

silver raptor
#

Oof

novel fable
#

is there a way to test this tho

stone kayak
#

Any one interested in free Tournamente pl

novel fable
#

i uh have no more friends to help me vote

quartz kindle
#

there is a test button

#

on your bot's edit page

#

also, you need to configure it there

novel fable
#

o

quartz kindle
#

else it wont work

novel fable
#

ye i added webhook url and authorization key there

plucky harness
#

i want emojis to post as this but how do i do it? example :

#

πŸ’ŽπŸ’ŽπŸ’Ž i want this

#

πŸ’Ž πŸ’Ž πŸ’Ž its posting as this

#

theres a space in between

#

in the second one which i dont want

#

view-appearance-zoom in

#

or out

opal plank
#

\πŸ’Ž\πŸ’Ž\πŸ’Ž

#

@plucky harness just copy above

plucky harness
#

dont wanna copy exaclty

opal plank
#

then?

plucky harness
#

just wanna paste them without spaces

opal plank
#

then dont add spaces?

#

it sends the same message you write

#

show code actually

#

you might be doing join()

earnest phoenix
#

do what

#

memes is just a string in your code

tight plinth
#

./memes.js

opal plank
#

no need

#

its same dir

novel fable
#
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at no - Works`)
  });

  dbl.webhook.on('vote', vote => {
    console.log(`User with ID ${vote.user} just voted!`)
      let voter = bot.users.cache.get(vote.user)
    const voted = new Discord.MessageEmbed()
    voted.setColor(`RANDOM`)
    voted.setAuthor(`XBot DBL Webhook``)
    voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
    voted.setTimestamp()
    voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
    bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
  });``` ehh idk why but this still doesnt send
opal plank
#

memes.js should work

#

actually nvm, ignore me

lusty quest
#

@novel fable did you want to use the Webhook?

novel fable
#

ye

lusty quest
#

you need to set a port

novel fable
#

but idk how to

#

uh the 5000 one?

lusty quest
#

and the webhook auth is a random string you generate and add to your bot and your bots page

#

yes as exmple

novel fable
#

ye i did

#

i just changed it all to "no"

lusty quest
#

did you allow the port to communicate throu the firewall?

novel fable
#

uhh

#

wait did i even get the port correctly

lusty quest
#

also did you set the webhook URL correctly on your bots page at top.gg?

novel fable
#

ye

#

ok wait how do i get my port

lusty quest
#

http ://yourip:port/dblwebhook

#

?

#

you just define a port

#

you can use 6969 if you want

novel fable
#

oh

#

it can be anything?

lusty quest
#

it needs to be a free port

novel fable
#

i see

#

i put 5000

#

does the test button actually work

lusty quest
#

yes

#

but it can take up to 30 minutes

novel fable
#

o

#

blegh

versed ravine
#

help me please

var queue = [];
var list = [];

bot.registerCommand("play", async(msg, args) => {
    if (!msg.member.voiceState.channelID) { // Check if the user is in a voice channel
        bot.createMessage(msg.channel.id, "You are not in a voice channel.");
        return;
    }
    if (queue.length >= 2) {
        return "You can't have more than 3 list of songs";
    }
    var url = args[0].replace('<', '').replace('>', '');
    var vcID = msg.member.voiceState.channelID;
    var mcID = msg.channel.id;
    let info = await ytdl.getInfo(url);
    var title = info.videoDetails.title.replace("'", "").replace('"', '');
    queue.push({
        title: title,
        url: url,
        voicechannelID: vcID,
        msgchannelID: mcID,
        requester: msg.member.id
    });
    bot.createMessage(msg.channel.id, `> Success adding **${title}** into music queue`);
    await playMusic();

}, {
    description: "add a song to the queue",
    fullDescription: "add a song to the queue",
    usage: "<url>",
    hidden: true,
    argsRequired: true,
    invalidUsageMessage: "Please specify url"
});
#
async function playMusic() {
    bot.joinVoiceChannel(queue[0]["voicechannelID"]).catch((err) => { // Join the user's voice channel
        bot.createMessage(queue[0]["msgchannelID"], "Error joining voice channel: " + err.message); // Notify the user if there is an error
        console.log(err); // Log the error
    }).then(async(connection) => {
        if (connection.playing) {
            return "yo i cant play right now";
        } else {
            try {
                bot.createMessage(queue[0]["msgchannelID"], `> Playing **${queue[0]['title']}** \nRequested by <@${queue[0]["requester"]}>`);
                var stream = await ytdl(queue[0]["url"], {
                    filter: 'audioonly'
                });
                connection.play(stream);
                connection.once("end", () => {
                    bot.createMessage(queue[0]["msgchannelID"], `> Finished Playing **${queue[0]['title']}**`);
                    queue.shift();
                    connection.stopPlaying();
                    if (queue.length > 0) {
                        playMusic();
                    } else {
                        return "finished all"
                    }
                });
            } catch (err) {
                bot.createMessage(queue[0]["msgchannelID"], "something is error");
                console.log(err);
            }
        }
    });
}
#

somehow my command must be called twice because it always skip the first song, like instantly

#

and it always skip the next song

tender cargo
#

bot still waiting for approvalllllll

versed ravine
#

im using eris, please if you know what i'm doing wrong please tell me

lusty quest
#

@tender cargo 3-4+ Weeks

solid falcon
#

is there a way to change Category or Channel settings to Private Category or Channel that was created?

earnest phoenix
#

change the permission overwrites

versed ravine
#

your welcome

sinful belfry
#

would you mind explaining what your issue is? @snow urchin

snow urchin
#

I expect the response to be true|false but it returns null

sudden geyser
#

What is ```js
client.db.fetch(cmb.config.${message.guild.id}.djOnly)

snow urchin
#

true

sudden geyser
#

hmm, what about message.member.voice.channel

snow urchin
sudden geyser
#

I think you should experiment, testing each condition by itself to see where your null comes in. Bulky condition checks in one can be hard to debug.

snow urchin
#

I have done this, I do not see why it returns null as none of the conditions themselves do.

sinful belfry
#

would it make a difference if you enclosed the entire thing in brackets?

#

or just double check your brackets to ensure the correct things are being assessed

stiff stream
#

some one know how to make it look like this:

#

and not like this:

pale vessel
#

lmao

wary flame
#

Put a space

stiff stream
#

?

#

its an embed..

wary flame
#

And dont do text

#

So your questions i how to make an embed?

stiff stream
#

no

#

how to make that he will looks like that

wary flame
#

*bold*

#

`code block`

sudden geyser
#
  1. Remove the double-space you add between each command.
  2. Only bold the title General Commands.
  3. <command name> - description, not <command name>-description
pale comet
#

So I'm going to start working on an Leveling/XP system for my bot, what would be a good xp time lock, so like the user has to wait a certain amount of time before gaining xp again

restive furnace
#

60 seconds

pale comet
#

Yeah seems reasonable, thanks

slender thistle
#

a few minutes also sounds reasonable

pale comet
#

Yeah I'm just planning it all out first, deciding how much xp to give like a randint of 15-25 or smth

near ether
#

are discord ids always 18 numbers long?

restive furnace
#

17 or 18

slender thistle
#

17-21 iirc

near ether
#

gotcha

#

oh it can be 21?

slender thistle
#

yeah

near ether
#

how do you know that?

slender thistle
#

from what I've heard

near ether
#

jw

slender thistle
near ether
#

ah

#

lmao

restive furnace
#

i heard it can be 17 or 18, but probably better to trust moderator :D

silver raptor
#

Anyone will host my bot for free? πŸ˜…

sudden geyser
#

no

split hazel
#

maybe but chances are close to 0

slender thistle
#

I mean, you've got plenty of time until the length grows to 20 characters anyway

silver raptor
#

@split hazel you checked my bot?

#

Anyone checked my bot?

near ether
#

i tried checking it out on a brand new account someone made and it was still 18, i had no clue it could be anything other than that lol

split hazel
#

You submitted your bot today

#

waiting times are 3-4 weeks

silver raptor
#

Ye

#

Huh

#

How to get the verified bot symbol?
@split hazel

split hazel
#

-verifybot

gilded plankBOT
#

Hi! It seems like you are looking for information on how to get your bot verified.

Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.

If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.

We cannot provide support on how to get your bot verified.

silver raptor
#

Lol that is my birthday

#

Really

#

My bot is in 14 server

#

How to verify?

gleaming canyon
#

Use the command

silver raptor
#

?

gleaming canyon
#

-verifybot

silver raptor
#

Oh I saw

#

What is needed

#

But after 100+ server how to verify

#

Or automatically

#

-verifybot

#

Xd

sonic lodge
#

you give them your id and answer questions about how your bot uses discord's data

silver raptor
#

Hmm

sonic lodge
#

then they review that and hopefully accept you

silver raptor
#

Ok

#

But my bot is in 14 server

#

Lol

sonic lodge
#

g r o w

silver raptor
#

I need 86 more

#

Oof

sonic lodge
#

you can apply at just 75

wary flame
#

You need at least 75 servers

#

Not 100

pallid glen
#

I need aomeone to make me a custom bot

gleaming canyon
#

So if it has less then 100 servers do you still need to verify?

silver raptor
#

That is also so much

pallid glen
#

For fivem server

silver raptor
#

?

#

Fivem?

sonic lodge
#

if it's less than 100, you technically don't need to verify, but your bot can't grow past 100 guilds after the deadline

pallid glen
#

Yeah

gleaming canyon
#

Oh

wary flame
#

So if it has less then 100 servers do you still need to verify?
@gleaming canyon no, but it wont be able to join more then 100 servers, starting 07 october 2020

silver raptor
#

Oh

pallid glen
#

Need a custom bot

gleaming canyon
#

Damn

wary flame
#

Need a custom bit
@pallid glen code

sonic lodge
#

hire someone

silver raptor
#

I heard the name Wolfy before

pallid glen
#

@wary flame yes

silver raptor
#

πŸ€”

gleaming canyon
#

Hire me, I'll make a basic bot and charge you lots

split hazel
#

-needdev

gilded plankBOT
#

DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.

wary flame
#

@wary flame yes
@pallid glen i meant code it yourself

silver raptor
#

Change my name to Destruc @split hazel

split hazel
#

We don't do custom name changes

pallid glen
#

O

#

I dont know how

silver raptor
#

Who changed to this

#

@silver raptor

pallid glen
#

Thats why im asking

gleaming canyon
#

I can create a basic bot

silver raptor
#

@split hazel will they make for free?

wary flame
#

I dont know how
@pallid glen learn to

silver raptor
#

I can create a basic bot
@gleaming canyon type?

pallid glen
#

Be more gentle @wary flame

wary flame
#

Lmao

split hazel
#

Please move to DMs when discussing commission work

silver raptor
#

Hmm

#

But who changed my name to mentionable name

#

Change it to Destruc

split hazel
#

A moderator, but ask questions not related to bot development in #support

silver raptor
#

Hmm

sonic lodge
#

what would the regex be to match the letter x, if there is no character to its left or the character to its left is not a letter

#

so 3x3 and x+x match (the latter twice)

#

but sinx does not match

slender thistle
#

-needdev

gilded plankBOT
#

DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.

solemn latch
#

\d?x

\d means digit
? means optional
x means x

#

About the limit of my regex ability

earnest phoenix
#

@sonic lodge i think this is what you're looking for, finally after 30 tests got it
/(\d|\W)x?(\d|\W)/

pallid glen
#

Need a custom bot

solemn latch
#

Is the x optional?

sonic lodge
#

no it's required

solemn latch
#

@pallid glen if you need to hire a dev, fiverr

misty sigil
#

and dont tell us you want it free

#

because, no

solemn latch
#

Dev work costs money

misty sigil
#

well time

#

and host costs

sonic lodge
#

that regex doesn't seem to work

earnest phoenix
#

What's the issue with it

sonic lodge
#

it matches 3x3, but not x+x

earnest phoenix
#

Didn't you say the x was required

solemn latch
#

Hes trying to get math from text

sonic lodge
#

...the engine was taking longer than usual

#

it works

#

and now it doesn't

restive furnace
#

i can make one file custom bot for 0.01$ xD

earnest phoenix
#

@sonic lodge what does have to be in the middle?

#

x? +? Or

sonic lodge
#

it doesn't matter what's to the right of the x

earnest phoenix
#

No i mean

sonic lodge
#

as long as there's nothing on the left or the character on the left is not a number

earnest phoenix
#

what's x actually supposed to be?

solemn latch
#

Not a number?

sonic lodge
#

ye not a number

solemn latch
#

So digits only for the left char?

#

So chars only*?

#

You've said both

sonic lodge
#

yes, everything but numbers

earnest phoenix
#

I'm confused

solemn latch
#

So /D is not numbers

sonic lodge
#

that's condition one

#

now just "or nothing to the left"

earnest phoenix
#

So like
=> Not a number<x is whatever idk what's it supposed to be>A number <= ???

#

I'm absolutely confused

sonic lodge
#

"not a number OR no character" + "x" + "anything, doesn't matter here"

earnest phoenix
#

Oh

#

K then

solemn latch
#

πŸ€”

cerulean venture
#

What the hell am I even reading right now? This is confusing

solemn latch
#

regex

#

its a nightmare

cerulean venture
#

ah makes sense

solemn latch
#

and a nightmare to communicate

cerulean venture
#

I hate regex anyways

sonic lodge
#

i realized i changed my regex's definition since i first posted the question lmao

solemn latch
#

yeah

#

multiple times

sonic lodge
#

πŸ€¦β€β™‚οΈ

solemn latch
#

this will match, anything thats not a char on the left, optionally
x
then anything of one on the right

sonic lodge
#

alright coolios πŸ‘

solemn latch
#

i did something useful

#

with regex

restive furnace
#

nice

#

% operator missing tho

solemn latch
#

ah

opal plank
#

regex is fun

sonic lodge
#

a curse and a blessing

opal plank
#

useful but annoying to learn

#

indexing is also really useful

misty sigil
#

how do i get the collection user

#

in awaitMessages

#

collected.author isnt it?

amber fractal
#

it returns a collection iirc

sudden geyser
#

collected is probably an array/collection of messages

amber fractal
#

collected.first().author

opal plank
#

collected is map no?

misty sigil
#

i have it filtered

opal plank
#

lemme double check

misty sigil
#

just to include what i want

amber fractal
#

yeah, it still returns a collection though

opal plank
#

yeah its a map

misty sigil
#

ty

opal plank
#

def not array

#

why do i make this harder on myself?

silver dust
#

hi i need help