#development

1 messages Β· Page 1106 of 1

delicate shore
#

Token

still merlin
#

Your DBL token

delicate shore
#

Dketee it

finite nimbus
#

...

midnight blaze
#

hacked

delicate shore
#

Delete

#

It

still merlin
#

has been leaked

midnight blaze
#

noob

pure lion
#

@finite nimbus lmao idiot

delicate shore
#

Delete

finite nimbus
#

regenerated XD

still merlin
#

Delete it

midnight blaze
#

too late

tight plinth
#

still

delicate shore
#

Fucking delete

midnight blaze
#

xd

finite nimbus
#

Huh, i regenerated it and then send..

midnight blaze
#

like delete helps

tight plinth
midnight blaze
#

yeahh

delicate shore
#

Yes

#

-api

#

-supoort

#

;-;

midnight blaze
#

Again

still merlin
#

Mods only

delicate shore
#

;-;

midnight blaze
#

let us assume I have 2 javascript files and one I make an array and in this I am going to push with an event information into the array for example. For example I want to push message.content into an array, now. Can I push those information into an array that is not in the same javascript file?

tight plinth
#

i mean, you have to link the 2 files anyways so yeah

midnight blaze
#

it works with require?

#

hmm

#

I require array from an other file ok, then I put this array into my message event

#

now can I push my message into this array and will this changed in the original array?

#

(I dont think so)

#

I know, this sound silly and I could do this with a json file, but I am wondering if this is also possible with a normal js file

odd radish
#

how can i change the background of my bot page to a image

obtuse jolt
restive furnace
#

hot

quartz kindle
#

thats a lot

delicate shore
midnight blaze
#

I tried this, can someone explain to me, what I am doing wrong πŸ€”
a json file. Named:list

{
  "list":[]
  
  }

Now, how can I push from my main js file information into this array?

I tried stuff like this:

const list = require("./list.json")

list.list.push("test")

        fs.writeFile("./list.json", JSON.stringify(list), (x) => {
            if (x) console.error(x)
            }); 
quartz kindle
#

should work

obtuse jolt
#

I thought that

#

@midnight blaze do you get any errors by chance?

midnight blaze
#

no

#

nothing happens, that is why I was confused

#

thanks, it works now. Just had some problems with the api, it did not react for some reasons. Thanks for your help

surreal notch
#

I have coded a bot and it was working fine before but then I coded one more cmd and it also worked when in 1-2 mins I tried again to use commands of bot no cmd was working no error in logs nothing bot is online but still no cmd is working

quartz kindle
#

does it work again if you restart the bot?

earnest phoenix
#

I have coded a bot and it was working fine before but then I coded one more cmd and it also worked when in 1-2 mins I tried again to use commands of bot no cmd was working no error in logs nothing bot is online but still no cmd is working
@surreal notch show the code and errors

#

Maybe the bot is never detecting commands

surreal notch
#

No errors@earnest phoenix

earnest phoenix
#

Then I was correct

#

Is the bot online

surreal notch
#

Yup

earnest phoenix
#

Show the code

#

Without the token obviously

surreal notch
#

It is cmd handler with 18 commands how can I show u

placid iron
#

so to make a reaction role bot i need to use on_raw_reaction_add and remove because otherwise the code wont pick up the message after a restart. or is there a way i can have a permanent message cache for certain messages

surreal notch
#

😐

earnest phoenix
#

bruh

#

screenshot

surreal notch
#

20 ss GG

#

@earnest phoenix but bot was fine before

earnest phoenix
#

show your message event

#

just show the code

surreal notch
#

After coding a particular cmd it stopped responding

earnest phoenix
#

we can't help if we don't know what you were doing

#

so show the code

#

just send the code

quartz kindle
#

@placid iron you can cache the message ids that you want at login

earnest phoenix
#

unfold the curtains

quartz kindle
#

by fetching them

surreal notch
#

I have to share all cmds?

placid iron
#

that is pog

#

thank you

earnest phoenix
#

dude

#

why can't you screenshot yoir code

#

not like you store confidential info

placid iron
#

i didnt realise fetching saved them to cache too

earnest phoenix
#

even three year olds store tokens in other files

placid iron
#

i thought it just asigned it to the variable you wanted

earnest phoenix
#

ss the message event

#

so @surreal notch just screenshot the bot.on("message") thing

surreal notch
#

Ok

earnest phoenix
#

good boy

surreal notch
earnest phoenix
#

how can your message event be in an run which containes message as well

surreal notch
#

😐

earnest phoenix
#

Hello ! I turn to you because I can't code what I'm going to tell you: I try to make sure that when the bot joins a server, it automatically creates an invitation with infinite use and duration

quartz kindle
#

@surreal notch thats not nearly enough information to help you, but that 3 lines alone already look terribly wrong

surreal notch
#

😬

#

Now

earnest phoenix
#

Thanks ^^

quartz kindle
#

you need to ask permission from the owners, or clearly say that your bot does that when owners add it

#

because creating invites without their knowledge is a privacy violation

misty sigil
#

Hello ! I turn to you because I can't code what I'm going to tell you: I try to make sure that when the bot joins a server, it automatically creates an invitation with infinite use and duration
@earnest phoenix thats a ToS violation πŸ‘€

earnest phoenix
misty sigil
#

your bot will be banned from discord if they find out

earnest phoenix
#

Ok thanks for your help :pray_tone2:

misty sigil
#

maybe your entire account, so basically, just don't do it

placid iron
opaque seal
#

I was thinking of making my bot run ads in the server it was in, but I would need some sort of user agreements or term of service to make those ads not unsolicited

surreal notch
#
const db = require("quick.db")
module.exports = {
name: "prefix",
  category: "Extras",
  aliases: ["pre","currentprefix"],
  description: "Get the current prefix of guild",
  usage: "prefix",
  run: (client, message, args) => {
  let p = db.fetch(`prefix_${message.guild.id}`)
if(p === null) {
p = ";"
}
message.channel.send("**Default prefix**: `;`")
message.channel.send("**Guild Prefix**: "+p)

  }
};```
@quartz kindle After codding this cmd my bot stops responding @earnest phoenix  @earnest phoenix
lusty quest
#

did you get an error?

surreal notch
#

no

delicate shore
#

looks like api ded

surreal notch
#

which api

#

discord?

quartz kindle
#

@surreal notch nothing wrong with that code

#

you need to show your main file

mild flower
#

how do i make bulk delete exclude pinned messages from being deleted?

surreal notch
#

@quartz kindle server.js?

quartz kindle
#

whatever your main file is

broken crow
#
const { inviteURL } = require("../config.json")
module.exports = {
  name: "invite",
  description: "invite the bot in your server",
  execute (client, message, args)  {
  
  let embed = new MessageEmbed()
  .setTitle("INVITE ME")
  .setColor("RED")
  .setDescription(`[INVITE](${"https://discord.com/oauth2/authorize?client_id=733355725962739733&scope=bot&permissions=2147483647" })` ); //Looks Cool
    
    
    return message.channel.send(embed)

how can i make another invite thingy but with this source

quartz kindle
#

@mild flower you need to fetch the messages first, then filter them, then give the filtered ones to bulkdelete

broken crow
#

For a discord server

surreal notch
earnest phoenix
#

is calling a db everytime in every function better or importing db objects from a file which runs everytime a command is called better?

summer torrent
#

@broken crow you don't need ${} btw

#

just [INVITE](link)

quartz kindle
#

@earnest phoenix "hot" data should always be cached

earnest phoenix
#

oh

#

so retrieve the data one time

#

and store it in a json file

#

or sum file

#

and access the json file from next time?

broken crow
#

@summer torrent ok

quartz kindle
#

@surreal notch there are a lot of problems with that code

surreal notch
#

@quartz kindle πŸ‘€

blazing ravine
#

@quartz kindle hi πŸ˜„

#

i need help again

surreal notch
#

but that was working fine

quartz kindle
#

first of all, you should never have handlers inside handlers:

// good
client.on("something", s => {
  // do stuff
});
client.on("somethingElse", s => {
  // do more stuff
});

// bad, very very bad
client.on("something", s => {
  // do stuff
  client.on("somethingElse", s => {
    // do more stuff
  });
});
blazing ravine
#

i need help with args

quartz kindle
#

second, you have a lot of repeated code which is resetting itself

blazing ravine
surreal notch
#

😐

blazing ravine
#

when use nickname who have space

#

not work

earnest phoenix
#

@surreal notch your file is making my head fo crazy

surreal notch
#

☹️

quartz kindle
#

for example client.commands = new Collection() on line 30,
then again client.commands = new discord.Collection() on line 105
the second one is resetting the first

surreal notch
#

Oh

earnest phoenix
#

You added http.get("yourglitchprojevt"); and never entered your project name

blazing ravine
#

who can help me

earnest phoenix
#

Me

surreal notch
#

is it related to not responding of bot?

blazing ravine
#

pls

quartz kindle
#

you're also calling this twice ```js
["command"].forEach(handler => {
require(./handlers/${handler})(client);
});

earnest phoenix
#

huh

surreal notch
#

😐

earnest phoenix
#

this stuff ain't making sense to me

#

also can you stop sending the same emote again

#

and set a pfp

surreal notch
#

🧐

#

lol

earnest phoenix
#

stop

#

also can someone help me

#

i want to use some-random-api.ml but i don't know anything about JSON and stuff
makes minecraft resource pack which requires pack.mcmeta which is JSON

blazing ravine
delicate shore
#

i am not really good at coding

#

but somehow idk how my code worked

#

but i want my bot to give person a role

#

it should give a role called Upvoter

#

i have made a code

#

but it doesn't seem right

quartz kindle
lusty quest
#

he try to fetch a Username with a space in the name

#

(i guess a API call)

delicate shore
#
var Tet7 = bot.guilds.cache.find(gi => gi.id === "guild id").then(gi =>{
    let upvoter = gi.roles.cache.find(role => role.name === "Upvvoter");
      vote.user.roles.add(upvoter)


})```
#

i am sure this is wrong

pale vessel
#

where's cache

delicate shore
#

i forgot

pale vessel
#

also, if you're going to use IDs, use .get, syntax is simpler but won't make any difference

delicate shore
#

ok

pale vessel
#

also, isn't it gi.roles.cache.find()?

delicate shore
#

ahhh

#

i said i a not

pale vessel
#

and cache.find is not a promise, you shouldn't use .then

delicate shore
#

oh

#

then it should be

pale vessel
#

what's tet7 for

delicate shore
#

test 7

#

it is for guild

pale vessel
#

remove .then and put the rest on another line

delicate shore
#

ok

pale vessel
#

so Tet7.roles.cache.find()

delicate shore
#

e

#

so this?

pale vessel
#

sure but what's vote.user?

#

user don't have roles, members do

delicate shore
#

i will add this under vote event

#

and vote event gives us

pale vessel
#

vote.user is an id

#

change it to Tet7.members.cache.get(vote.user);

#

that gets the voter as a member

#

you can append .roles.add to it i guess

delicate shore
#
var Tet7 = bot.guilds.cache.find(gi => gi.id === "guild id")

    let upvoter = Tet7.roles.cache.find(role => role.name === "Upvoter");
     var mo = Tet7.members.cache.get(vote.user)
mo.roles.add(upvoter)

pale vessel
#

yes

delicate shore
#

ok

#

and to remove it after 12 hrs

#

it should be something like this

pale vessel
#

you can change .find on the first line to .get if you want to

delicate shore
#
setTimeout(() => {
mo.roles.remove(upvoter
)        }, time in ms);```
pale vessel
#

yes

delicate shore
#

ok thanks

surreal notch
#

print(hello world)

delicate shore
surreal notch
lusty quest
#

lol start with C#. the default Project in Visual Code includes already a hello world

opaque seal
#

What's the best language to make a bot that's easy to self host?

For example, with js you need node and is not so easy to npm i all the stuff for non coders. Is there any library which has a minimal setup to run a discord bot?

pale vessel
#

node for me

#

npm is preinstalled and it's not hard at all to use it

#

and you just need to use npm i and it'll install packages by reading the package.json file

opaque seal
#

Uhm

#

Ok

earnest phoenix
#

ok thanks
@delicate shore np

pale vessel
#

bruh

lusty quest
#

node is pretty easy together with python

earnest phoenix
#

i dont think it s easy

#

it is sooo hard

blazing ravine
#

@quartz kindle

#

yes

teal sun
#

hi

pale vessel
#

no pain no gain

blazing ravine
#

check 1 more screenshot

#

when nickname is with space args not using the nickname in args 1

pale vessel
#

join them

sudden geyser
#

What's the best language to make a bot that's easy to self host?
python or JavaScript are your first bets

For example, with js you need node and is not so easy to npm i all the stuff for non coders. Is there any library which has a minimal setup to run a discord bot?
node is not that hard to install and just running npm i in the directory will install your stuff for you.

delicate shore
#

@pale vessel (node:9466) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined

earnest phoenix
#

what

pale vessel
#

the guild is undefined

delicate shore
#

wym

pale vessel
#

make sure it's the correct id and that your bot has it in cache

delicate shore
#

uhh

pale vessel
#

the guild is undefined
@pale vessel if you don't get what this means, i don't really know what to tell you

delicate shore
#

how to make sure second

#

thing

#

that my bot has it in cache

pale vessel
#

it's undefined

#

omfg

#

are you sure you used the correct id

earnest phoenix
#

guilds are always in cache as long as you're getting the guilds in or after the ready event

delicate shore
#

are you sure you used the correct id
@pale vessel yes

pale vessel
#

show code

earnest phoenix
#

k

delicate shore
#

guilds are always in cache as long as you're getting the guilds in or after the ready event
@earnest phoenix it's not

pale vessel
#

yes it is

delicate shore
#

it's before

earnest phoenix
#

$cry

delicate shore
#

every event

earnest phoenix
#

then get the guild after the ready event? lol

delicate shore
#

ok lemme try

earnest phoenix
#

if you get a vote during startup while ready has not been fired yet just queue the vote in some map/list/array

delicate shore
#

ok i messed up

#

my bot is not even sending msg now

pale vessel
#

we know

delicate shore
#

o

#

i got the proble @pale vessel

#

lemme see if that is the problem

#

alr

#

one problem solved

#
    dbl.webhook.on('vote', vote => {
      console.log(vote);
        if (bot.uptime) {
            bot.users.fetch(vote.user).then(user => {
              const thanks2 = new Discord.MessageEmbed()
                  .setColor("RANDOM")
 .setImage(`https://cdn.glitch.com/f0d0daf5-a981-4bd1-bb7b-a3bdc2cd20db%2Fthank-you-437x230.jpg?v=1596176778617`)
      .setTitle("**Thanks For Voting! :)**")
                  .setDescription(`Thanks for voting :love::. In the future, this will have benefits!`)
             
              
           user.send(thanks2)
              
              
                bot.channels.fetch('739081152807305308').then(channel => {
                  const thanks = new Discord.MessageEmbed()
                  .setColor("RANDOM")
 .setImage(`https://cdn.glitch.com/f0d0daf5-a981-4bd1-bb7b-a3bdc2cd20db%2Fthank-you-437x230.jpg?v=1596176778617`)
      .setTitle("**Thanks For Voting! :)**")
                  .setDescription(`Thanks for voting ${user.tag} :love:.\nIt is super apricated!`)
.addField(
        `You watching can upvote me too!`,
        "[Upvote me on top.gg!](https://top.gg/bot/716985864512864328/vote)"
      )                    
                  channel.send(thanks)
                  
                  var Tet7 = bot.guilds.cache.get(gi => gi.id === "690557545965813770")

    let upvoter = Tet7.roles.cache.find(role => role.name === "Upvoter!");
     var mo = Tet7.members.cache.get(vote.user)
mo.roles.add(upvoter).setTimeout(() => {
mo.roles.remove(upvoter
)        }, 43200);
                  
                })
            })
        }
    });
#

show code
@pale vessel my vote code

golden condor
#

Bins exist

delicate shore
#

ik

earnest phoenix
#

and you picked the worst one

#

lmfao

delicate shore
pure lion
#

Me when the

delicate shore
#

hi @pure lion

#

vote.user is an id
@pale vessel no it gives name

#

with #

summer torrent
#

vote.user is ID of user

delicate shore
#

how

#

it is not

#

because I use it

#

and it

misty sigil
#

it is vote.user = id

delicate shore
#

sends msg in channel saying Hi Boomer#6969 thanks forr voting

#

ok

summer torrent
delicate shore
#

nvm

#

i am mad

#

yeh

#

i am mad

#

i need mental support

earnest phoenix
#

nice

delicate shore
#

this is my code

#

if anyone free

#

error

odd radish
#

I want to change the background of my bot page but this does not work

body {
    bacckground-image: url(https://i.imgur.com/HWxwIo3.png)!important;
}
pale vessel
#

guild is undefined

#

just show the code

delicate shore
#

the whole

#

code?

#

of my main file

pale vessel
#

the event code

earnest phoenix
#

you misspelled background

#

and that's not valid css

delicate shore
earnest phoenix
#
                db2_name=db_client["about"]
                db2_collection=db2_name["data"]
                x=db2_collection.find_one({"id":person.id})
                if x==None:
                    return```
#

will this close the connection

delicate shore
#

I want to change the background of my bot page but this does not work

body {
    bacckground-image: url(https://i.imgur.com/HWxwIo3.png)!important;
}

@odd radish
we enter these codes in long description?

earnest phoenix
#

if the x==None part is true

delicate shore
#

the event code
@pale vessel hope u got it

pale vessel
#

i'm eating rn

delicate shore
#

ok

#

when free then tell

earnest phoenix
#

.-.

misty sigil
#

const channel = client.channels.fetch("732691255452237904")
this should work in d.js light right?

pale vessel
#

await

pure lion
#

What is the python keyword for stopping code

pale vessel
#

return probably

earnest phoenix
#
                db2_name=db_client["about"]
                db2_collection=db2_name["data"]
                x=db2_collection.find_one({"id":person.id})
                if x==None:
                    return```

and this?

pure lion
#

Nope

earnest phoenix
#

.-.

misty sigil
#

oh shit

#

i forgot async

delicate shore
#

What is the python keyword for stopping code
@pure lion yo

pure lion
#

Sup

#

My net crashed

delicate shore
#

oof

pure lion
#

:d

delicate shore
#

can u help me

pure lion
#

Probably

earnest phoenix
#

stopping code?

delicate shore
#

(node:9645) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined

pure lion
#

Yeah

delicate shore
#

error

pure lion
#

If not x: (stop code)

earnest phoenix
#

um

pale vessel
#

how about Google how to return in python

earnest phoenix
#

where u gonna use that

delicate shore
#

brb

pure lion
#

On line 5 of my visual studio code workspace named hode hh in a file called snek.py

earnest phoenix
#

i just want to know whether the db connection closes if we use a return statement in with block

pure lion
#

@delicate shore what line

#

The connection should close when you use the appropriate function or exit the process (with node, not sure with py)

earnest phoenix
#

prolly use exit()

delicate shore
#

@pure lion this one ```js
let upvoter = Tet7.roles.cache.find(role => role.name === "Upvoter!");

pure lion
#

Return just returns

#

What is Tet7

delicate shore
#
 var Tet7 = bot.guilds.cache.get(gi => gi.id === "690557545965813770")
pale vessel
#

get(id)

delicate shore
#

@pale vessel it now gives roles but

pale vessel
#

you put it inside it

delicate shore
#
var mo = Tet7.members.cache.get(vote.user)
mo.roles.add(upvoter)
  .setTimeout(() => {
mo.roles.remove(upvoter
)        }, 43200);
                  ```
pale vessel
#

setTimeout(() => roles.remove(), time)

earnest phoenix
#

oh well it does close the connection

delicate shore
#

setTimeout(() => roles.add(), time)
@pale vessel
my one is correct

pale vessel
#

no

delicate shore
#

o

#

why

#

. will not come

pale vessel
#

roles.add is a promise but even if you resolve it, setTimeout is not a function for it

delicate shore
#

oh

pale vessel
#

setTimeout should be used by itself

#

don't chain it

delicate shore
#

I am not getting it

#

don't chain it
@pale vessel if i remove the . it justs

#

doesn't work

pale vessel
#

show code

delicate shore
#

i think it worked

#

nvm

#

thanks

pale vessel
#

k

digital ibex
#

hello gamers

#

anyone know how i can send the data in the option tag to the backend?

#

like

#

i wanna send html <select> <option>Select the muted role</option> <option name="role">hi</option> <!-- <==== this 'hi' --> </select>

#

to my api, its in the form tag already, i just dont know how to send it, any ideas?

blazing ravine
#

how to make args[1] to support 1 and 2 words ?

#
      .toLocaleLowerCase()
      .substring(PREFIX.length)
      .split(" ");```
solemn latch
#

So you want to combine two args?

blazing ravine
#

like when some1 want check him fortntie start f!fstats nicknime example [pvp game] with space

#

look

#

him nickname is tfx toxoidguyyt

#

but not working bcs is 2 args

#

console log 1 st is nickname 2 nd is gamemode

#

3 rd is platform

#

sorry for spam

#

@solemn latch can u help me

jolly quail
#

Hmm I've seen most bots take multiple words input within quotes ""

blazing ravine
#

how to make args[1] to support 2 words no more only 2

jolly quail
#

That wont always work

#

If the username is of one word only then

blazing ravine
#

but othe rbots

solemn latch
#

You could also have acceptable args.
Any args between the acceptable args and the command would be the username

blazing ravine
#

works with 2 words

solemn latch
#

Or have the username last

lusty quest
#

if you use "" for defining the string split before and after the tag

jolly quail
#

Told ya use "nickpart1 nickpart2"

blazing ravine
#

yes

#

i want to make args [1] to work liek part 1 2

lusty quest
#

or use minimist

blazing ravine
#

idk how minimsit work

lusty quest
#

lucky you it got a documentation on the npm page

jolly quail
#

Most things have doc xD

#

I mean no one knows to use without doc except the creator

lusty quest
#

i use it for one bot to have cmd like arguments

#

like --name

#

everything after the --name tag is one argument i can use

jolly quail
#

Oh ya that's an option too

lusty quest
#

how you desing the tags is pretty much up to you but it helped me to get rid of a really stupid workaround

hardy steeple
#

im making a roll command, and it works fine

#

the only thing is when you dont supply a number it can be easily used for terminal spam

#

which isnt great

lusty quest
#

just check if a argument is valid of not return

hardy steeple
#

id like to know how to make it so that if you dont supply a number itll say "supply a number"

lusty quest
#

js?

hardy steeple
#

d.js

#

yeah

solemn latch
#

isNaN()

lusty quest
#

if(!args || !args.isNaN())return message.channel.send("Give me a number Bro")

hardy steeple
#

okay

#

lets see here

lusty quest
#

this is a example

dull sluice
#

isNaN(args)

#

other way around

lusty quest
#

or this idc

dull sluice
#

ye

sonic lodge
#

basically checking if there is an argument provided, and if that arg is a number or not

solemn latch
#

Do you even need to check if args exist with isNaN

lusty quest
#

its just to make sure it wont error out bcs of a missing argument

solemn latch
#

If its undefined isNaN will return true

hardy steeple
#

yeah

#

undefined numbers default to NaN

#

so for this one at least it would work

sonic lodge
#

or use isFinite()

hardy steeple
#

args.isNaN is not a function

sonic lodge
#

isNaN is a global function

lusty quest
#

yea sry its isNaN(args)

sonic lodge
#

isNaN(args)

hardy steeple
#

ahh k

#

it didnt do anything

#

theres no error but it still responds with "You rolled a NaN!"

lusty quest
#

show your code

#

did you got a ! before isNaN?

hardy steeple
#

one sec

#

tysm, it works

#

i really appreciate your help

faint prism
#

NaN = Not a Number

restive furnace
#

yes

faint prism
#

yes

surreal rapids
#

thats my error

misty sigil
#

code?

surreal rapids
#

`C:\Users\playe\Desktop\999 club>node mybot.js
internal/modules/cjs/loader.js:968
throw err;
^

Error: Cannot find module 'C:\Users\playe\Desktop\999 club\mybot.js'
 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
 at Function.Module._load (internal/modules/cjs/loader.js:841:27)
 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
 at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
`}

restive furnace
#

probably some node module missing main file not found

misty sigil
#

P.S. learn js before making bot

restive furnace
#

^

tight plinth
#

@surreal rapids do you know what you're doing

misty sigil
#

learn that

#

before doing a bot

surreal rapids
#

im new to bots tbh used to dev FiveM servers and arma 3 more used to game stuff and thanks jeremy

sudden geyser
misty sigil
#

you should be able to figure out bots with some js knowledge

restive furnace
#

^ yes go learn js first, even you have some experience, since lua (i pressume fivem servers are lua) and js are completely different languages.

misty sigil
#

or use lua for your bot

#

i think you can do that

restive furnace
#

yeah you can

misty sigil
#

im smort

opal plank
#

Good luck with arrays if you started at Lua

restive furnace
#

just do ind - 1 ez

#

like 1 - 1

sudden geyser
#

if arrays don't start with 0 show me to the door

restive furnace
#

aPES_AngeryDoorLeave here

sudden geyser
#

I'll be borrowing your door and not returning it

restive furnace
#

ok thanks for not returning it

spare robin
#

hii

sudden geyser
#

why hello there

opal plank
#

Why did i get a mention here?

sudden geyser
#

did you check the cart-looking thing (inbox) to see if you can find it

opal plank
#

its a regex mention, not a ping

blazing ravine
#

who can help me with args

opal plank
#

what about args?

blazing ravine
#

@opal plank

#

names who have space not work

#

how to use 2 words in args 1

#

args 2 is for platform

opal plank
#

why you checking it like that?

#

parse message.content

#

not args

blazing ravine
#

let me try thanks

#

msg.content.split(" "); ?

#

like this

opal plank
#

here, let get you an example

blazing ravine
#

thanks

harsh moon
#

It would be /n for spaces

blazing ravine
#

@opal plank here ?

opal plank
#

i borked it, one second

blazing ravine
#

okay ;d

opal plank
#

but what im doing is replacing the prefix+ command name and thats your content

#

then parse for quotation marks

#

regex the first 2 quotation marks and capture group everything in between

blazing ravine
#

i cant it xd idk how

opal plank
#

first look up regex

#

you need to know a bit of regex to do that

#

you could do with indexOf() but that'd be a bit more painful

faint prism
#

It would be /n for spaces
@harsh moon \n is a newline character

harsh moon
#

ok

blazing ravine
#

😦 no idea thanks for help

opal plank
#

we cant spoonfeed, but i can tell you the path you need to take to accomplish that

#

cant help you if you give up though

blazing ravine
#

bro the big problem is my english is bad

#

i m understand %40 from ur messages ;d

limpid spoke
#

your best friend is google translator

opal plank
#

^^

dusty onyx
#

hai, what can i use in python pillow to get the individual frames of a gif into a list? ty <3

blazing ravine
#

:/

opal plank
#

Google Translate

#

Β―_(ツ)_/Β―

blazing ravine
#

args.slice(1).join(" ");

#

this work but its no tlimited

#

how to make the nickname tfx toxoidguy in 1 word

opaque seal
#

this work but its no tlimited
@blazing ravine what you mean

opal plank
#

Bruh i literally told you

#

dont use args

blazing ravine
#

bro i dont know how to make

opal plank
#

args split all the content

blazing ravine
#

rlly

#

yes

opal plank
#

i TOLD YOU

blazing ravine
#

okay how we make

#

other way

opal plank
#

but what im doing is replacing the prefix+ command name and thats your content
then parse for quotation marks
regex the first 2 quotation marks and capture group everything in between

blazing ravine
#

i dont know regex

opal plank
#

learn

#

1h to learn regex

blazing ravine
#

help me ? with code

opal plank
#

I No give ready code

solemn latch
#

We cant spoonfeed

blazing ravine
#

why 😦

opal plank
#

rules

#

@blazing ravine Out of my dms, support only here

solemn latch
#

I disabled dms here

#

Happens too much

opal plank
#

not a bad idea tbh

solemn latch
#

Only server I do it for

quartz kindle
#

what if i want to dm you?

blazing ravine
#

not erwin in dm ?

quartz kindle
#

</3

lusty quest
#

i have them disabled but for some reason they still work

blazing ravine
#

"(

opal plank
#

Tim always can

sudden geyser
#

Amateurs!

solemn latch
#

Tims always allowed to dm me

opal plank
#

Slapping that sweet friend request

quartz kindle
#

lmao

blazing ravine
#

@opal plank dm u can

opal plank
#

No Dm

#

here only

blazing ravine
#

why im not killing people

opal plank
#

RULES

#

no spoonfeed

blazing ravine
#

........................... fudj rules

opal plank
#

πŸ‘€

blazing ravine
#

ok bye

#

thanks

opal plank
quartz kindle
#

anyway, what you want to do is not an easy thing, because code cant magically know if the second word is part of the username or if its an argument like platform

#

you need to explicitly tell the code how it should process each part of the entire argument, you can use tricks like delimiters for example

opal plank
#

There are 3 he could do. Join arg 0 and 1, index of quotes and regex quote with capture block

quartz kindle
#

!command my username here, platform, arg3 (notice the commas)

opal plank
#

or that

blazing ravine
#

when the user name is with space like "tfx toxoidguy" the dead code using only tfx

opal plank
#

i usually use quotation marks for multi word commands

blazing ravine
#

not using 2 words

opal plank
#

cuz your args are splitting on spaces

#

hence why i told you not to use args as your delimiter

#

parse from message content

blazing ravine
#

its easy to say dont use ;d

opal plank
blazing ravine
#

!command my username here, platform this is good

#

but code shut

opal plank
#

message.content = all the content from message
replace prefix + command name

now you got everything in the content

now is when you manipulate the clean content, with commands or quotation marks

quartz kindle
#

check out these examples of different ways of processing commands. In the first option there is no distinction, the code doesnt know what is what, but on the other two examples it knows.

opal plank
#

So your options are.

  1. Split with identifier
  2. Clean content and parse
  3. Regex capture group
  4. Index of(first identifier - last identifier) ||(if you REALLY dont want regex, which is stupid)||
blazing ravine
#

im trying to make the 2nd but without [ , " , ","

opal plank
#

trim and replace

solemn latch
#

You mean an array?

earnest phoenix
#

not discord related, so i have a TXT with accounts in it, is there anyway to print how much accs in the txt. example:
TXT Has 23 accs

Total Accounts: 23

quartz kindle
solemn latch
#

Depends how you seperate them @earnest phoenix

amber fractal
#

why not just split by , then?

pale vessel
#

because some people use hi,he

#

uh

opal plank
#

wow

#

amazing censoring

pale vessel
#

nice

quartz kindle
#

split by newlines

solemn latch
#

Count the number of lines

amber fractal
#

you didnt do a good job at blurring

earnest phoenix
#

im just hiding the password dude idfc

blazing ravine
#
    let args1 = args.slice(1);```
amber fractal
#

Also that looks like cracked accounts

earnest phoenix
#

xbox fresh accounts

#

lmao

pale vessel
#

uh

#

no.

amber fractal
#

Yeah we dont help with that

earnest phoenix
#

cry about it

pale vessel
#

nah

amber fractal
#

I mean it's just a simple report no need to cry

blazing ravine
#

@quartz kindle

#

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

#

?

#

this will work ?

opal plank
#

you copied your args over

#

im dead

quartz kindle
#

thats still splitting by spaces

opal plank
#

thats from the d.js guide

restive furnace
#

no

#

dont u see the g

amber fractal
blazing ravine
opal plank
#

what is tfx?

blazing ravine
#

nickname

#

tfx toxoidguyyt

opal plank
#

"tfx toxdoiguyyt" is one thing?

blazing ravine
#

yes

opal plank
#

no subcommand?

blazing ravine
#

no

#

like my name

opal plank
#

how aboutb we 300IQ and just join arg 0 and 1?

blazing ravine
#

but with space

restive furnace
#

or 600iq and dont split to args at all

solemn latch
#

^

amber fractal
#

commands should be separate from args imo

opal plank
#

just a reminder

#

that i said that previously

blazing ravine
#

not easy

quartz kindle
#

@amber fractal yours is more performant

solemn latch
#

Not easy joining args?

blazing ravine
#

want this code to support 2 words]

sudden geyser
#

or even: /, ?/

opal plank
#

if(args.length > 1) args.join(' ')

#

literally one line

amber fractal
#

@sudden geyser yep that'd work too

#

forgot about the ? mmLol

opal plank
#

he doesnt have subcommands, why even bother with identifiers?

sudden geyser
#

but wait, that's only my first form

opal plank
#

its all message content without the command and prefix

sudden geyser
#

/, */

#

this is a super sayian

restive furnace
#

also uhh that linting

faint prism
amber fractal
#

now it doesnt matter how dumb users are

faint prism
#

Since you're only messing with strings right now

amber fractal
blazing ravine
#

not work

faint prism
#

splitting on a regex is interesting

#

haven't thought about doing that before tbh

restive furnace
#

you did that after you defined username @blazing ravine...

blazing ravine
#

i try before

#

not wkr

amber fractal
#

because you still do args[1]

faint prism
amber fractal
#

after you join it's no longer an array

faint prism
#

Are you doing a massive switch/case right now?

opal plank
#

Im going to rage quit

#

i literally asked if you had subcommands

blazing ravine
#

i ask no

opal plank
#

a what now?

blazing ravine
#

wait

#

xd

#

i have

#

now i used translate

#

do u see dm

#

@opal plank

opal plank
#

@blazing ravine out of my dms

#

second warning

blazing ravine
#

why

#

i dont care dm me

#

i sned code

opal plank
blazing ravine
#

why

faint prism
#

lol

blazing ravine
#

im not killin people

#

i send with pastebin wait

opal plank
#

i dont care, support is meant to be kept here

blazing ravine
#

2000 char

faint prism
blazing ravine
#

@opal plank check

restive furnace
#

whats commandRepository

#

:D

lusty quest
dire stag
#

Hello.

faint prism
#

It's my logic for my commands

lusty quest
#

like your command Collection in D.js

restive furnace
#

aight

faint prism
opal plank
faint prism
#

Logic is all seperated

opal plank
#

please use something redable

quartz kindle
#

@faint prism why no dictionary or whatever to hold commands?

lusty quest
#

is there somewhere a decent D.net tutorial? only found a Decent Dsharp plus one

blazing ravine
#

now what

faint prism
#

My repository is the implementation of the command

dire stag
#

Should I jump right into JavaScript or should I learn HTML and CSS ?

faint prism
lusty quest
#

both work @dire stag

dire stag
#

I want to build a bot. Then learn lua. Then learn a code that’s useful for soldering.

#

You know, to control the machine.

lusty quest
#

you can use lua for making a Discord bot also

#

and Lua is relative easy to learn

quartz kindle
#

@faint prism like, cant you do something like ```py
for c in commands
[Command(c)]
publick async task c()
{
await ReplyAsync(_commandRepositoryc)
}

dire stag
#

@lusty quest

near ether
#

is there a good place to study ratelimits and how to prevent hitting them? my bot specifically deals with using reactions as buttons and then editing the message depending on which reaction was clicked, and it gets api banned every so often. im just not sure on what steps i can take to reduce this

i already have cooldowns for using commands, and i increased restTimeOffset in client options

dire stag
#

Before we get into that.

#

Should I learn java without HTML and CSS ?

#

I’m not ready for a web project atm

#

As in I’m not interested or need it.

lusty quest
#

if you want to make Websites / Dashboards lean all 3 if not only js

quartz kindle
#

you dont need html nor css if you dont want web development

faint prism
#

The Command is called by the bot receiving a valid prefix

dire stag
#

I don’t not atm.

faint prism
#

Why would I for loop every command

lusty quest
#

you can learn it still in the future

quartz kindle
#

@faint prism i mean instead of declaring each command line by line, declare them in a loop

dire stag
#

Ok I was worried since some say that learning HTML and CSS would be useful for JavaScript

lusty quest
#

not if you only use Javascript for Console applications

blazing ravine
#

its not possible

karmic compass
#

how do i display the current time in discord.js?

dire stag
#

Console applications?

karmic compass
#

of the msg sent*

opal plank
#

createdTimestamp

karmic compass
#

so if i did !whenwasthissent it would say "message was sent at (time)"

#

o

opal plank
#

its a property inside the message obj

lusty quest
#

something that only runs in a commandline with no additonal stuff like a Web Dashboard

dire stag
#

I’m learning java to build I bot right now.

faint prism
#

@quartz kindle I'm not following what you mean by

in a loop

dire stag
#

Nothing else.

faint prism
lusty quest
#

if you are already into one language stay in it. you can learn both but im not sure if it makes sense

dire stag
#

What does?

#

I understand that HTML and CSS are used for web development.

#

I just started learning HTML today

restive furnace
#

if you are already into one language stay in it. you can learn both but im not sure if it makes sense
i recommend doing that yes, i did bi-learn many languages... and i didnt understand anything fron any languages at then...

quartz kindle
#

@faint prism i mean, currently you have: declare command a -> command a declare command b -> command b declare command c -> command c what im asking is if there is no way to do something like this instead ```
for cmd in someCommandList
declare command cmd -> command cmd

dire stag
#

i recommend doing that yes, i did bi-learn many languages... and i didnt understand anything fron any languages at then...
@restive furnace that’s time consuming though. And not efficient

faint prism
#

Because there is no reason to iterate over a list of commands.

restive furnace
#

i said i recommend that

quartz kindle
#

it would shorten the code and remove the need to add/remove from the list when new commands are added/removed

faint prism
#

Thats the purpose of the repository

#

It's expandable for new commands

dire stag
#

Why would you learn a code that’s not useful to you on the short term.

faint prism
#

I get what you're saying

#

If I decide to suddenly add a ton of commands

quartz kindle
#

yes but on each command you add, dont you need to again type [command(bla)] public async task bla() await replyasync(...) in your main file?

slim umbra
faint prism
#

I see what you're saying

#

Let me play around with that idea

slim tundra
lethal pine
#

how to use custom discord emoji with python ?

slim umbra
#

nobodies vibin with my extreme stonks

karmic compass
#

how do i get the bot to say the time of a message created? right now it just sends a combination of numbers (im using message.createdTimestamp, would message.createdAt work instead?)

quartz kindle
#

@slim umbra klasa-core?

slim umbra
#

nah

#

custom gateway thingy

quartz kindle
#

ah

#

cool

slim umbra
#

ya

#

klasacore has a mem leak iirc

#

or i made one xd

quartz kindle
#

lmao

slim tundra
#

Please, i want to start with making a discord bot but i dont know where to start

slim umbra
#

but thats so epic

#

14k guilds and barely any mem

lethal pine
#

how to use custom discord emoji with python ? @slim umbra

slim umbra
#

bruh why r u even tagging me

slim tundra
#

So anyone can send me the code of 1 simple command please

lethal pine
#

please help @slim umbra

slim umbra
#

i forgot what a shitshow topgg is how do u survive here tim

quartz kindle
#

yeah, with 0 caching you can pretty much scale infinitely, your only bottleneck is cpu/bandwidth

slim umbra
#

ya

#

ii redis cache alot of stuff too

#

but i can disable basically all of that

muted venture
#

anyone can help me to debug a thing in nodejs? i will be screen sharing in general voice chat

restive furnace
#

thus is development

#

this*

karmic compass
#

uh

#

wrong channel

blazing ravine
#

op

lusty quest
#

now i wonder if you could cache with d.js in a externally hosted redis server instead of the internal cache. would maybe make sense idk

slim tundra
#

PLEHEAS

muted venture
#

anyone can help me to debug a thing in nodejs? i will be screen sharing in general voice chat
anyone??

faint prism
#

Can you stream bc your a dev role?

muted venture
#

idk, maybe

restive furnace
#

probably to prevent some random stuff happening

muted venture
#

yo anyone here a nodejs programmer? kind of stuck in something

restive furnace
#

in where?

muted venture
#

in debuging a command

restive furnace
#

send code & error/bug

muted venture
#

yeah w8

quartz kindle
#

@lusty quest you can with djslight, but probably not with regular djs

faint prism
earnest phoenix
#

yikes

#

stop copypasting 0.9 examples

quartz kindle
#

i guess, im not sure about syntax

faint prism
#

Where DoCommand would have to be an array or list

earnest phoenix
#

follow official docs

muted venture
#

@restive furnace the file:

const { MessageEmbed } = require("discord.js");
var fs = require("fs");
var emjFile = fs.readFileSync("./botData/emojies.json");
var emojies = JSON.parse(emjFile);

var adminFile = fs.readFileSync('./botData/admins.json');
var admins = JSON.parse(adminFile);

module.exports = {
  name: "topic",
  description: "Change Channel Topic",
  async execute(message, args) {
    const msgID = message.author.id;
    const inp = args.join(" ");
    if (admins.some(msgID.includes.bind(msgID)))
    {//Check Admin
      if (!args.length)
      return message
        .reply(`Usage: ${message.client.prefix}topic <MESSAGE>`)
        .catch(console.error);
      if( inp.indexOf('{load}') >= 0)
      {
        inp = inp.replace('{load}', emojies.load);  
        return message.channel.setTopic(inp)
               .then(() => message.channel.send('Topic Changed!'));
      }else if( inp.indexOf('{loaded}') >= 0)
      {
        inp = inp.replace('{loaded}', emojies.loaded);
        return message.channel.setTopic(inp)
               .then(() => message.channel.send('Topic Changed!'));
      }else if( inp.indexOf('{verify}') >= 0)
      {
        inp = inp.replace('{verify}', emojies.verify);
        return message.channel.setTopic(inp)
               .then(() => message.channel.send('Topic Changed!'));
      }else if(inp.indexOf('{music}') >= 0)
      {
        inp = inp.replace('{music}', emojies.music);
        return message.channel.setTopic(inp)
               .then(() => message.channel.send('Topic Changed!'));
      }else{
        return message.channel.setTopic(inp)
               .then(() => message.channel.send('Topic Changed!'));
      }
    }else{
      return message.channel.send('Not Admin!');
    }
    //return message.channel.send({ embed });
      }
};```
the error:
```css
UnhandledPromiseRejectionWarning: TypeError: Assignment to constant variable.```
earnest phoenix
faint prism
#

jesus why

lusty quest
#

i was thinking about modifying a Module either D.js or d.js light to have Redis integrated

misty sigil
#

jesus god almighty

solemn latch
#

You cant re assign a var to a const variable

restive furnace
#

ctrl + h and const to let = fix @muted venture listen to tim nvm

quartz kindle
opal plank
#

did you...

#

did you post JavaScript code with css markdown....

muted venture
#

@restive furnace ok

earnest phoenix
#

they're not that bright

muted venture
#

@quartz kindle so as @restive furnace said i should change const to let

earnest phoenix
#

i'm more horrified from the code than the syntax highlight

opal plank
#

var

quartz kindle
#

yes, because const is immutable, you cant change it after declaring

muted venture
#

@opal plank yeah kind of

opal plank
#

var bad

#

var is a bitch that ignores scopes

solemn latch
#

Var good KEKW

cyan dove
#

Hey does anyone know why my main.js command in command prompt isn’t working?

opal plank
#

its very rare when you actually should use var

solemn latch
#

What about var client

#

πŸ€”

faint prism
#

My current flow to add a command isn't difficult:

  1. Add command route
        [Command("newcommand")]
        public async Task NewCommand()
        {
            await ReplyAsync(_commandRepository.NewCommand());
        }
  1. Implement it in the command repo (and it's interface)
        public string NewCommand()
        {
            return "Brand new command";
        }
earnest phoenix
#

why not take advantage of .net core 3.0 dynamically loaded assemblies

pine aspen
#

Hi, does anyone do eris?

restive furnace
#

Hi, does anyone do eris?
@pine aspen yes what?

hardy steeple
#

i just make a new file within a commands folder program it there and connect to the main file

pine aspen
#

How could I play audio?
I got the voice connection.
I don't understand the .play(URL).

#

I'm not getting it.

patent geyser
#

me neither dude

restive furnace
#

look the docs.

dire stag
#

i'm more horrified from the code than the syntax highlight
@earnest phoenix I feel you

pine aspen
#

I have.

faint prism
pine aspen
#

Do I need to grab the bots new voice state and then run play?

earnest phoenix
#

correct auger

#

you can create your own assemblies during runtime with roslyn iirc

near ether
#

hey i dont want to bother but i dont think anyone saw this earlier: is there a good place to study ratelimits and how to prevent hitting them, specifically with reactions/editing messages?

my bot specifically deals with using reactions as buttons and then editing the message depending on which reaction was clicked, and it gets api banned every so often. im just not sure on what steps i can take to reduce this

i already have cooldowns for using commands, and i increased restTimeOffset in client options and that temporarily solves the issue. however, i know that as my bot grows this is going to become a bigger problem and increasing the value of restTimeOffset will "work" but make the bot extremely slow to use

earnest phoenix
#

your lib should handle ratelimits for you, what are you using

near ether
#

d.js

quartz kindle
#

the only thing you can do about it is control your command usage ratelimits

#

the lib will workaround rate limits for you, but if you dont control your requests, you end up creating a giant backlog of delayed commands

#

also, shards are not aware of each others rate limits if you're using the sharding manager

faint prism
#

I don't have really much experience with controlling when an assembly is loaded/unloaded outside of it just falling out of scope during execution

#

What is it's benefit?

#

Less memory overhead?

near ether
#

how can i control my requests? do you mean by preventing my bot from interacting with a user for X amount of time?

dire stag
#

Anyone know a good IOS app to code in JavaScript ?

quartz kindle
#

with user and/or with channel

dire stag
#

And run it ?

near ether
#

also, shards are not aware of each others rate limits if you're using the sharding manager
my shards dont interact with each other in a way that would use the discord api

quartz kindle
#

most of discord's rate limits are per channel

earnest phoenix
#

that and you get to directly hook into d.net commands instead of having something finicky like a string and parsing it @faint prism

near ether
#

gotcha

patent geyser
#

Anyone know a good IOS app to code in JavaScript ?
@dire stag IOS?

faint prism
#

instead of having something finicky like a string and parsing it
Are you referring to the [Command("cmdstring")]

earnest phoenix
#

yes

dire stag
#

@dire stag IOS?
@patent geyser iPhone

#

Uses IOS

#

Apps store

faint prism
#

That's a feature of the d.Net lib

earnest phoenix
#

im aware

near ether
#

i already have a 5 second cooldown in place per user, and a channel specific cooldown should help too? also, im not a fan of having a hardcoded cooldown, is there a way to dynamically set a cooldown based on how close im getting to the rate limit?

earnest phoenix
patent geyser
#

@patent geyser iPhone
@dire stag I'm not sure if this is on the app store, but try searching for "kodiak javascript"

quartz kindle
#

d.js does not expose rate limits. you can access an internal bucket, but thats not easy to use

solemn latch
#

Does your bot use a lot of reaction menus?
I feel like reaction menus use a lot of requests.

quartz kindle
#

i use reaction menus too

#

never had any problem

faint prism
#

I use a repo just to abstract the logic away from the router

near ether
#

Does your bot use a lot of reaction menus?
I feel like reaction menus use a lot of requests.
yea it does

quartz kindle
#

are your reaction menus self-deleting? like when a user reacts, does your bot delete their reaction?

near ether
#

yes

quartz kindle
#

thats a potential problem

#

better not do that

earnest phoenix
#

-servers

tight plinth
#

im currently using quick.db, but i want to switch to something else. what database should i use?

#

(js)

warm marsh
#

Depends if you want to use NoSQL or SQL.

quartz kindle
#

i like sqlite

near ether
#

so just leave the reactions there? i tried to do that but unless i clear the reactions, it doesnt look right

quartz kindle
#

i just leave them there

quartz kindle
near ether
#

does clearing all reactions count as one request per action?

quartz kindle
#

probably yes, you can test rate limits through reqbin or postman

earnest phoenix
#

auger that's smart, a nice workaround however i'd still using assemblies

#

you can easily generate modules and commands during runtime, compile them and load them in

lusty quest
#

i like MongoDB. you can do some Fancy stuff with it and its easy to Scale

#

(like read only from Secondary nodes if you run the DB in a replicaset)

quartz kindle
#

if you ever grow that big

lusty quest
#

yea thats the other thing

#

or just dont care and build a replicaset bcs you can

near ether
#

This is what my reaction menu looks like. This is on my test bot so I set restTimeOffset to 300, but on the actual bot it’s at 700

faint prism
#

you can easily generate modules and commands during runtime, compile them and load them in
@earnest phoenix That does sound like a good idea. and I think I've seen that before in some production code snippets. However, I haven't grasped the idea good enough to implement it here yet. Currently I just follow SOLID design principles https://en.wikipedia.org/wiki/SOLID

In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable. It is not related to the GRASP software design principles. The principles are a subset of many prin...

earnest phoenix
#

why not refactor your code so it instead relies on the user sending a message instead of spamming reactions

quartz kindle
#

yeah thats quite expensive

#

i'd just keep the reactions there

#

keep the X as first reaction, and then add the others

#

and make them all always available

near ether
#

thats smart

#

thanks!

quartz kindle
#

thats what i do

#

you can check in #commands if you want (@oak sentinel help)

pine aspen
#

Anyone do Eris here?

near ether
#

why not refactor your code so it instead relies on the user sending a message instead of spamming reactions
honestly its because i think it looks ugly when users type back

blazing ravine
#

who can help me with args

near ether
#

that looks really nice tim

#

im going to rework the reactions

#

thank you!

quartz kindle
#

πŸ‘

blazing ravine
#

how to make args to split and limite with 2 words

quartz kindle
#

you're still stuck on that?

earnest phoenix
#

split and check if the length* is equal to or less than 2 items...?

blazing ravine
#

yes

#

😦

quartz kindle
#

is it always 2 words or only sometimes 2 words?

blazing ravine
#

example command !command nick name platform

#

when im using command !command gokselw pc working but when

#

im using !command gok sel pc

#

not work

quartz kindle
#

i already told you how

blazing ravine
#

lets try again pls

#

i odnt know

#

check code

faint prism
#

Dude your indentation is terrible

quartz kindle
#

with option 1, you cant. there is no way to reliably separate name from platform. your code doesnt know what is what

#

you have to use option 2 or option 3

faint prism
#

Idk JS syntax

case "fstats":
   if(args.length > 2) args.slice(1).join(' ');
   let username = args[1]
   let platform = args[2] || 'pc';
   console.log(args[1])
   console.log(args[2])
solemn latch
#

I still think since platform will be known, you could get everything between the command and platform
If platform can be pc, ps4 or xbox1
You can get the text between those two and thats the username

blazing ravine
#

@quartz kindle nothing

tight plinth
#

@blazing ravine whats args

blazing ravine
#
      .toLocaleLowerCase()
      .substring(PREFIX.length)
      .split(" ");```
tight plinth
#

also

#

you already splitted them

#

bruh

blazing ravine
#

but not work