#development

1 messages ยท Page 1060 of 1

hazy sparrow
#

so @quartz kindle will it be like this now

const Discord = require("discord.js");

const client = new Discord.Client();

const fs = require('fs');

const prefix = ("bow");


client.commands = new Discord.Collection();

const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
    const command = require(`./Commands/${file}`);

    const name = file.split('.')[0];
    client.commands.set(name, command);
  }
 

  client.on("ready", () => {
  console.log("bow bot is online!!");
});

client.on("message", (message) => {
  
  if (!message.content.startsWith(prefix) || message.author.bot) return;
  const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
 
   
if(client.commands.has(command)) {
   cliebnt.commands.get(command).execute()
 }



} 


)








  client.login('NzI1NjMwMjkwNTg3ODExOTQ5.Xw8Hwg.er_YArUZDJyBOs0sQyvRwXvFsd')
#

token is wrong dont worry

tulip ledge
#

If u spell client right yes

hazy sparrow
#

oh lmao

quartz kindle
#

looks good, and dont forget to give the message object to the execute, else you lose access to message in all your commands

hazy sparrow
#

kk

quartz kindle
#

also, you can keep using separate folders for different command categories, like you had before

#

just put them all inside client.commands like you were doing before

hazy sparrow
#

wow this made my code half as lenghty

quartz kindle
#

exactly

#

thats why command handlers exist

hazy sparrow
#

let me see if it works

#

none of my commands work

jagged sun
#
                name: 'password-checked',
                color: 'WHITE',
                mentionable: false
            }).then(r => {
                Database.setPasswordChannel(msg.guild, chan.id, pw, r.id)
                console.log('ROLE: ' + r.id + ' CHAN: ' + chan.id)
            })``` I have a problem at this code. It is supposed to push some variables into a database function. But somehow it sometimes can't resolve id of r, and sometimes it works...
quartz kindle
#

@hazy sparrow in this case, all your commands are named after their file, so to use them you also need to type their file names

hazy sparrow
#

like

#

!ping.js

quartz kindle
#

before you had ! cf to run the coinflip command

#

now you have to type !coinflip

jagged sun
#
                name: 'password-checked',
                color: 'WHITE',
                mentionable: false
            }).then(r => {
                Database.setPasswordChannel(msg.guild, chan.id, pw, r.id)
                console.log('ROLE: ' + r.id + ' CHAN: ' + chan.id)
            })``` I have a problem at this code. It is supposed to push some variables into a database function. But somehow it sometimes can't resolve id of r, and sometimes it works...

It might be because of a network delay, and that it tries to get te id before the role is even existing...But what can I do here?

hazy sparrow
#

but !ping had used the ping command only

#

it isnt working now

tulip ledge
#

Oh

#

i see why

#

You're not slicing the prefix.length of command therefore it's checking !ping

quartz kindle
#

@hazy sparrow your prefix is bow correct?

tulip ledge
#

And since your command is called ping

hazy sparrow
#

yes

tulip ledge
#

They don't equal

quartz kindle
#

before you had bow ping

#

now it would be bowping

hazy sparrow
#

oh let mecheck that

#

ok it works

quartz kindle
#

if you want to keep the space, you will need some adjustments

hazy sparrow
#

is there a way to change it to bow ping

#

like should i name it ping.js

quartz kindle
#

remove the .slice from args

tulip ledge
#

By setting prefix to "bow " and then splicing prefix.length of the args

hazy sparrow
#

like should i name it ping.js
can i do it this way?

tulip ledge
#

yes but it would be unnecessary

#

By doing .splice you can add multiple prefix

hazy sparrow
#

ah i see

tulip ledge
#

Like bow , !, ?, etc

quartz kindle
#

i'd do it like this ```js
args = message.content.split(/ +/)
command = args[1].toLowerCase()

tulip ledge
#

Oh

#

Yeah then u have "bow" "command"

compact echo
#

pls help

quartz kindle
#

however, you need to change the prefix check

tulip ledge
#

I'd just do like:

    let prefix = "bow ";
    const args = message.content.slice(prefix.length).trim().split(/ +/g);
    const cmd = args.shift().toLowerCase();
hazy sparrow
#

this is the code now

slender thistle
#

token

compact echo
#

lmao I saw token

quartz kindle
#

you have command twice

hazy sparrow
#

its wrong dont worry

#

@slender thistle

tulip ledge
#

Dude

quartz kindle
#

@compact echo what is that

tulip ledge
#

Why are u linking it if it has only been a minute?

hazy sparrow
#

lmao I saw token
@compact echo its wrong

compact echo
earnest phoenix
#

use http

quartz kindle
#

^

compact echo
#

lmao

#

I'm so stupid

#

That works

hazy sparrow
#

you have command twice
@quartz kindle okay which one should i remove

earnest phoenix
#

If you wish to use HTTPS, get a domain and SSL Certificate

jagged sun
#
            var role
            msg.guild.createChannel('enter-password', 0).then(r => {
                var chan = r
                chan.send('Please enter a password to get a role here.')
            })
            msg.guild.createRole({
                name: 'password-checked',
                color: 'WHITE',
                mentionable: false
            }).then(r => {
                role = r
            })```Hi, how can I get the result of the codes to a var? Because every time I try using it like this, both are undefined...
quartz kindle
#

make an SSL cert for localhost :^)

earnest phoenix
#

hec

#

it's possible?

#

i don't know that

quartz kindle
#

nope

#

not possible

#

i mean

earnest phoenix
#

oh lol

quartz kindle
#

it is if you self-sign it and self-authorize it

#

and be your own authority

solemn latch
#

Your redefineing chan @jagged sun

jagged sun
#

how @solemn latch ?

solemn latch
#

Var chan = role
That var is redefining in that scope

earnest phoenix
#

chan = r

tulip ledge
#

oh and use let as var is depricated

quartz kindle
#

thats not the problem

solemn latch
#

Oh ik

jagged sun
#

ok, but it is not the problem...

quartz kindle
#

the problem is that you're defining them inside a .then which is async. meaning by the time the .then finishes, the outside code is already long gone

jagged sun
#
            let role
            msg.guild.createChannel('enter-password', 0).then(r => {
                chan = r
                chan.send('Please enter a password to get a role here.')
            })
            msg.guild.createRole({
                name: 'password-checked',
                color: 'WHITE',
                mentionable: false
            }).then(r => {
                role = r
            })```
Still both undefined
tulip ledge
solemn latch
#

Lol

quartz kindle
#

still the same problem. by the time the promises finish, the outside code is already long gone

earnest phoenix
#

semicolons

jagged sun
#

and what to do now @quartz kindle ?

quartz kindle
#

use async/await

jagged sun
#

ok

tulip ledge
#

Oh btw hi Woo! ๐Ÿ‘‹

solemn latch
#

Heya

earnest phoenix
#

the only solution i can think of is to create a function lol

compact echo
#

So I wanna do express on my own website and just host it from my own computer but how would I do that?

quartz kindle
#

with a domain or without?

#

with ssl or without?

compact echo
#

with a domain

#

with ssl

earnest phoenix
#

have you bought the domain

compact echo
#

My website hoster like got hacked sooo

#

Freenom

earnest phoenix
#

ig no

compact echo
#

????

digital ibex
#

turn your pc into a server

earnest phoenix
#

^

quartz kindle
#

you need to buy a domain, point its DNS to your ip address, port forward your router, make sure your ISP gives you a static ip, if not, you need a dynamic DNS service, then get an ssl certificate, and add them to your express config

compact echo
#

oml that's so complicated

earnest phoenix
#

you can get a free domain from github education program btw

digital ibex
#

then just host it lmao

earnest phoenix
#

it's .me domain

tulip ledge
#

Oh and make sure your router can handle a good bit of trafic aswell

compact echo
#

@earnest phoenix How?

tulip ledge
#

Wait for real?

#

I want one

earnest phoenix
#

Yeah'

digital ibex
#

u can get a .me, .tech, .com, .co.uk and stuff

#

i got .me

#

๐Ÿ˜Ž

earnest phoenix
#

it also come with like

tulip ledge
#

I'm gonna make a coding server

quartz kindle
earnest phoenix
#

1 year of unity pro

digital ibex
#

tbh

earnest phoenix
#

1 year of intellij programs

tulip ledge
#

Wait where can I get it?

restive pebble
#

glitch kek

earnest phoenix
#

how can i make a scheduled messages bot ?

compact echo
#

ye

digital ibex
#

github student package is fucking amazing

earnest phoenix
#

I can send link here right?

restive pebble
#

timeout

#

interval sorry

earnest phoenix
#

okay

hazy sparrow
#

aye boeing

earnest phoenix
#

but there's one requirement

#

you have to be a student

quartz kindle
#

depends, is the schedule supposed to survive bot restarts?

digital ibex
#

lol

jagged sun
#

@quartz kindle how can I make it with await?

compact echo
#

@earnest phoenix I am one

restive pebble
#

hello

tulip ledge
#

@earnest phoenix Where can I get it?

earnest phoenix
#

Where should i post the link?

nocturne grove
#

I see split(/--(.+)/) in my code but can't remember what .+ does, maybe it's just an accident. Does anyone know what it means?

tulip ledge
#

dm me the link

earnest phoenix
#

@restive pebble can i do it like tomorrow at 15:40 send a message?

quartz kindle
#

@jagged sun ```js
let chan = await msg.guild.createChannel(...);
let role = await msg.guild.createRole(...);
await chan.send(...);

hazy sparrow
#

can someone tell me a free server hosting thing without needing to download a 64bit application

quartz kindle
#

what

digital ibex
quartz kindle
#

@earnest phoenix 15:40 according to what timezone

earnest phoenix
#

I already sent them the link

#

no worry

digital ibex
#

ook

earnest phoenix
#

GMT+3

quartz oxide
#

Can anyone pls make me a bot sorta like mee6 for free pls and if u can call it Alpha Bot and Iโ€™ll dm the pfp for it

earnest phoenix
restive pebble
#

subtract the time

#

and set it interval

hazy sparrow
#

is it 32bit?

quartz kindle
#

downloading a 64bit application has nothing to do with anything

nocturne grove
#

I don't think anyone will do that @quartz oxide

quartz kindle
#

why are you even asking that

earnest phoenix
#

website for free hosting

restive pebble
#

heroku

earnest phoenix
#

Heroku suck

restive pebble
#

ok

earnest phoenix
#

it's hard to host

digital ibex
#

glitch isn't a host

earnest phoenix
#

glitch is easier

lime jungle
#

anyone knows how to get the message content when someone sends an emoji like ๐Ÿ‘

earnest phoenix
#

Yes it is

misty sigil
#

glitch isnt a host

restive pebble
#

glitch has fking downtimes

hazy sparrow
#

heroku needs github

digital ibex
#

glitch isn't even a fucking host

misty sigil
#

glitch is dumb

restive pebble
#

no

#

it has cli

digital ibex
#

no

misty sigil
digital ibex
#

where tf does it say that?

solemn latch
#

Glitch is taking down discord bots

lime jungle
#

cuz it returns \๐Ÿ‘

restive pebble
#

yes

nocturne grove
#

anyone knows how to get the message content when someone sends an emoji like ๐Ÿ‘
@lime jungle <messageReaction>.message.content?

earnest phoenix
#

ah nvm

digital ibex
#

it doesn't

lime jungle
#

no i wasnt meaning that

#

it's hard to explain for me

restive pebble
#

k

lime jungle
#

x)

quartz kindle
#

it returns the emoji as an unicode character

nocturne grove
#

or do you want to detect when someone sends an emoji?

quartz kindle
#

what do you need?

lime jungle
#

exactly

fervent oyster
#

has anyone ever found an instance where a channel id is the same as a guild id?

lime jungle
#

i need the name of the emoji

nocturne grove
#

that's hard I can't do that

digital ibex
#

its just because retards are hosting their bots there with pingers which is stupid, making it host... but its not a host its not meant to host anything

quartz kindle
#

there is no name

lime jungle
#

like thumbsup

nocturne grove
#

has anyone ever found an instance where a channel id is the same as a guild id?
@fervent oyster that is not possible, never

fervent oyster
#

ok

lime jungle
#

and not \๐Ÿ‘

quartz kindle
#

default emojis have no names in code

#

you'd need to create a table of names yourself

fervent oyster
#

i was told that it was possible, but thanks

lime jungle
#

lets go

#

guess somoene already did it on github

#

haha

nocturne grove
#

afaik every entity has a unique id

fervent oyster
#

everyone role is just guild id

earnest phoenix
#

What

lime jungle
#

emoji-unicode-to-name

fervent oyster
#

thats an exception

nocturne grove
#

first part of an id is the time, second one is an unique number

lime jungle
#

yay

#

npm module

earnest phoenix
#

digital ocean just gave me 100$

fervent oyster
#

k

earnest phoenix
#

hecc yeah

nocturne grove
#

well fair enough, but for me the everyone role is not a role

#

you can't change name/add/remove it etc.

#

but @quartz kindle do you know what .+ does in this regex? split(/--(.+)/)
I found it in my code but no idea why it is there

solemn latch
#

^

fervent oyster
#

ok good, that clears a lot of stuff up, im making a settings module for my bot and i dont want to have to indicate a difference between guild and channel ids

nocturne grove
#

right

earnest phoenix
#

Also

solemn latch
#

The discord dev site covers snowflakes.
Really good read imo

#

The structure is good to know

nocturne grove
#

yeah

fervent oyster
#

but <pong> do you know what .+ does in this regex? split(/--(.+)/)
I found it in my code but no idea why it is there
@nocturne grove what it does is it takes all letters after -- and splits them iirc

earnest phoenix
#
MessageEmbed.setAuthor(`Easdjipdgioh`, msg.author.displayAvatarURL);

For some reason i can't get the user icon to work

tulip ledge
#

Doesn't .+ look for 1 or more instances of .?

#

as a+ looks for 1 or more instance of a

solemn latch
nocturne grove
#

hmm yeah Idk lol

fervent oyster
#

if you have questions about regex i just recommend a website called regexr

nocturne grove
#

I can test it tho, maybe it's clear when I do it

fervent oyster
tulip ledge
fervent oyster
#

yup

nocturne grove
#

hmm thanks, doesn't seem like that should be there in my code

solemn latch
#

Regex shouldnt?

jagged sun
#
                r.send('Please enter a password to get a role here.')
                return r
            })

            let role = await msg.guild.createRole({
                name: 'password-checked',
                color: 'WHITE',
                mentionable: false
            }).then(r => {
                return r
            })```Like this @quartz kindle ?
quartz kindle
#

without the .then

jagged sun
#

ok

nocturne grove
#

Regex shouldnt?
@solemn latch no the .+

tulip ledge
#

Should I use comments in my code?

solemn latch
#

Yes

nocturne grove
#

I don't, but if you're working with someone else or think you will forget things over time, it could be useful

#

that's my opinion

solemn latch
#

I dont comment anything either

#

But I should

lime jungle
nocturne grove
#

xd

lime jungle
#

finally

#

lmao

tulip ledge
#

ALWAYS WANTED ONE

nocturne grove
#

how can I make my eval command eval things in an async function? I thought this was working but it doesn't give 6 if I eval 3 + 3, it returns undefined

const evaluated = await eval('(async () => {' + toEval + '})();');```
tulip ledge
#

Make the module.exports async

nocturne grove
#

it is

tulip ledge
#

Full code?

nocturne grove
#

I can give it but no one will understand it

#

trust me, I have async execute(blabla)

#

and toEval is just 3 + 3

barren basin
#

i need help with "awaitMessages"

quartz oxide
#

Can anyone pls make me a bot sorta like mee6 for free pls and if u can call it Alpha Bot and Iโ€™ll dm the pfp for it

misty sigil
#

no.

nocturne grove
#

again, do you really think anyone will?

#

Tell me your question @barren basin

hoary lily
#

Ahh how can I define "client" from index file?

marble juniper
#

Can anyone pls make me a bot sorta like mee6 for free pls and if u can call it Alpha Bot and Iโ€™ll dm the pfp for it
@quartz oxide wrong place

hoary lily
#

So exhausted

slender thistle
#

-needdev @quartz oxide

gilded plankBOT
#

@quartz oxide

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.

barren basin
#

I am not sure what i can tell you because i've no idea where is the problem, but for example, when i call a function which uses "awaitMessages", some things that should be done before "awaitMessages" are not done whereas everything is correctly logged in the console

solemn latch
#

code please

nocturne grove
hoary lily
#

I can smell async

tulip ledge
#

Can somebody send me a cheatsheet with all the permissions? For like permissions.has()?

solemn latch
#

you mean the docs?

tulip ledge
#

wait

#

Docs have them?

#

oh i didnt know that

opal plank
misty sigil
#

beat me to it

pure lion
#

x)

opal plank
#

gg ez no re

pure lion
#

Beat meat to it

barren basin
solemn latch
#

also on the djs docs

pure lion
#

Await messages easy

barren basin
#

Await messages easy
@pure lion so could you help me ?

tulip ledge
#

Whats the issue?

#

@barren basin

pure lion
#

@barren basin channel.awaitMessages(filter, {opts})

barren basin
#

my functions which use awaitMessage do strange things

pure lion
#

Use a .then to get the collected messages

tulip ledge
#
<MessageChannel>.awaitMessages(filter, {options}).then(collected => {
  //Do Stuff
})
barren basin
#

but here is not my issue

tulip ledge
#

Then whats the issue

barren basin
#

why when i use awaitMessage, the code before which is supposed to check is a list as an element return true while it should be false and the console.log doesn't work, for example

tulip ledge
#

I can't do much without code

#

And what you're saying is pretty confusing

blissful carbon
#

@lime iron

earnest phoenix
#

sorry wrong channel

solemn latch
#

np

barren basin
#
if (!test_in(list,user1,-1) && !test_in(list,user2,-1) && user2!=user1){
     list.push(user1)
     list.push(user2)
     console.log(list)
     message.channel.awaitMessages(m => (m.author.id == user2),{max: 1, time: 300000}).then(collected => {
     })
}
sudden geyser
#

What is user2

barren basin
#

a client id

solemn latch
#

so you said list logged true, when it should return false?

#

but it appears to not be a boolean at all

#

also,
.then(collected => {

barren basin
#

console.log(list) returns nothing and (!test_in(list,user1,-1) && !test_in(list,user2,-1) && user2!=user1) return true while it's not

hazy sparrow
#

@quartz kindle you remember telling me how to change the name of a command right?

solemn latch
#

the code you want to run after the message is collected should be inside the {} of the collected

#

right now, its just an empty then, so your doing nothing with whats collected

barren basin
#

yes i know, i removed this part, it's a function call

earnest phoenix
#

Is anyone good with cogs in discord.py? I'm trying to get cogs to share the same function by importing it but I'm running into issues if I want to change the function. I can't just reload the cog, I have to restart the whole bot for the changes to have any effect.

barren basin
#

is it possible to use awaitMessages in a then() of an other awaitMessages ?

solemn latch
#

yeah

north hollow
#

i have a command that i want to be a dm them can some one help me

earnest phoenix
#

@north hollow are you using js?

solemn latch
#

in most libs, just send to the user object

north hollow
#

@north hollow are you using js?
@earnest phoenix yes v12

solemn latch
#

User.send(message here)

digital ibex
#

js v12?

#

cool

solemn latch
#

lol

north hollow
#

User.send(message here)
@solemn latch thx

#

how a about this code

pure lion
north hollow
#
client.on('message', message => {
    if (message.content === Prefix + 'help') {
     const embed = new MessageEmbed()
       .setThumbnail('https://cdn.discordapp.com/attachments/719316812021366836/721760261597560922/LOL_AM_OMG.png')
       .setDescription('โŒจ๏ธ **Help Commands--** โŒจ๏ธ \n \n Dont Forgot All Commands Are Lowercase \n \n  ๐Ÿ“Œ  **prefix- {+}**  ๐Ÿ“Œ  \n \n --  **Meme** \n --  **Joindiscord** \n --  **Mountain** \n --  **Dogs** \n -- **Authors** \n --  **Avatar** \n --  **JoinBot** \n \n ๐Ÿšซ **Administration cmd--** ๐Ÿšซ \n \n --  **Kick** (@The Name Here) \n --  **Ban** (@The Name Here)  \n \n  โ˜Ž๏ธ  **Contact cmd--**  โ˜Ž๏ธ  \n \n --  **Contact** \n --  **Website** \n \n More Commands Soon \n \n NOTE:This Bot Still Under creation Period! \n If They Are Bugs Pls Tell Me With DMs or Do +Contact')
       .setTimestamp()
       .setColor(15158332)
       .setFooter(message.author.tag,message.author.displayAvatarURL())
    message.channel.send(embed);
  
    }
  });
pure lion
#

Why not .addField

#

Instead of having it all in the desc

solemn latch
#

lots of bots do description help

#

๐Ÿคทโ€โ™‚๏ธ

pure lion
#

Eh

solemn latch
north hollow
#

@solemn latch where do i put this User.send(message here) for this code

solemn latch
#

๐Ÿคทโ€โ™‚๏ธ

north hollow
#
client.on('message', message => {
    if (message.content === Prefix + 'help') {
     const embed = new MessageEmbed()
       .setThumbnail('https://cdn.discordapp.com/attachments/719316812021366836/721760261597560922/LOL_AM_OMG.png')
       .setDescription('โŒจ๏ธ **Help Commands--** โŒจ๏ธ \n \n Dont Forgot All Commands Are Lowercase \n \n  ๐Ÿ“Œ  **prefix- {+}**  ๐Ÿ“Œ  \n \n --  **Meme** \n --  **Joindiscord** \n --  **Mountain** \n --  **Dogs** \n -- **Authors** \n --  **Avatar** \n --  **JoinBot** \n \n ๐Ÿšซ **Administration cmd--** ๐Ÿšซ \n \n --  **Kick** (@The Name Here) \n --  **Ban** (@The Name Here)  \n \n  โ˜Ž๏ธ  **Contact cmd--**  โ˜Ž๏ธ  \n \n --  **Contact** \n --  **Website** \n \n More Commands Soon \n \n NOTE:This Bot Still Under creation Period! \n If They Are Bugs Pls Tell Me With DMs or Do +Contact')
       .setTimestamp()
       .setColor(15158332)
       .setFooter(message.author.tag,message.author.displayAvatarURL())
    message.channel.send(embed);
  
    }
  });
solemn latch
#

User is a class

#

youd have to get the user you want to send to.
or if you have a message, you can send to that message author, if thats what you want to do

pure lion
#

Ohmygod

#

Okay, you have to define user as a user or guildMember

#

Eg let user = m.guild.members.cache.<search method here>

#

Or mentions.members.first

#

Etc

solemn latch
#

๐Ÿค”

pure lion
#

hmmm

#

Anyway

hazy sparrow
solemn latch
#

does args[1] exist?

opal plank
#

usually you want that to be 0

#

arrays starts at 0

#

ยฏ_(ใƒ„)_/ยฏ

stark abyss
#

So I am trying to make a command where:

  • You activate the command
  • It reads the embed in that channel and sends a message
  • It should continue reading the embeds and triggering it to send a message until they do this other command

Would I need a database for this?

hazy sparrow
#

oh ey wait

solemn latch
#

that seems like api abuse potentially @stark abyss

stark abyss
#

no

#

it's only sending a message once when it finds something in the embed

solemn latch
#

๐Ÿค”

stark abyss
#

other bots are doing it so it's not api abuse

opal plank
#

'other bots' also do rainbow roles

stark abyss
opal plank
#

doesnt make it allowed just because someone else does it

solemn latch
#

other bots should never be a sign for acceptable use of an api

opal plank
#

^^

stark abyss
#

okay

#

well why is it api abuse then?

solemn latch
#

sending messages without user input, or some form of input is generally api abuse.

opal plank
#

embeds can only be sent by a bot, how you even reading and reacting to it?

#

It reads the embed in that channel and sends a message

stark abyss
#

var embedTitle = message.embeds[0].title;

opal plank
#

this basically states you want to react to a bot

stark abyss
#

yes

opal plank
#

your bot shouldnt react to bots

#

only users

stark abyss
#

yes but that's only if they user wants it though

#

they can turn it off anytime they want

opal plank
#

what

#

that'd still be spamming it, no?

stark abyss
#

you don't understand let me show you

opal plank
#

go ahead

solemn latch
#

and i want to be able to send 500 messages in a channel, but its still api abuse and i dont do it

#

๐Ÿค”

earnest phoenix
#

Everytime I type npm init in command prompt it says this

solemn latch
#

npm needs to be installed

stark abyss
#

does that help?

#

people want timer for when it despawns

opal plank
#

are those 2 messages related?

stark abyss
#

yes

opal plank
#

why use 2 bots?

#

well either way

#

i kinda see what you are doing now

stark abyss
#

timer : 10 shows that the card will despawn in that time

earnest phoenix
#

npm needs to be installed
@solemn latch i did

opal plank
#

you should still limit it, at best

#

otherwise it'd be spam

stark abyss
#

those cards doesn't spawn every min

opal plank
#

or manually type the command

#

!check => returns the new card

stark abyss
#

so it's still api abuse?

solemn latch
#

honestly, if this is a feature someone wants, the original bot dev should add it

stark abyss
#

ikr

opal plank
#

it'd be best having something manual rather than automated

stark abyss
#

because of api abuse spam?

opal plank
#

well yeah,if you dont limit it it'll run undefinetly, and if you do limit, whats the point of sending multiple messages?

#

attach it all onto 1 embed and then edit it

solemn latch
#

^

stark abyss
#

wdym run undefinetly

opal plank
#

its better to do a PATCH rather than a POST

stark abyss
#

i am not sending multiple messages though?

opal plank
#

every new card, it'd make a new message, no?

stark abyss
#

yes

opal plank
#

bad

stark abyss
#

api abuse?

opal plank
#

send one embed, edit it

stark abyss
#

well people talk in that channel so what's the point of editing t

opal plank
#

though i still recommend using a manual command to check for newest card insetad of automating it

earnest phoenix
#

Guys can you guys help me with this problem

opal plank
#

!newcard

#

something along those lines

stark abyss
#

so u want the users to do !new card?

opal plank
#

first off, is that for one server?

sudden geyser
#

@earnest phoenix how long ago did you install node

stark abyss
#

hm no

earnest phoenix
#

@earnest phoenix how long ago did you install node
@sudden geyser Just now.

stark abyss
#

that wasn't my aim

opal plank
#

second question

#

how long between each new card?

stark abyss
#

2 mins or more

sudden geyser
#

your path variable is probably not set. You could try restarting your computer (it's worked for people I know in the past) or set it manually

opal plank
#

then no, do manual checks

stark abyss
#

the least it could be is 2 mins

opal plank
#

nor are you doing it for 1 server, but the n is too low

stark abyss
#

what is n?

earnest phoenix
#

your path variable is probably not set. You could try restarting your computer (it's worked for people I know in the past) or set it manually
@sudden geyser I restarted my computer twice to be honest.

opal plank
#

@stark abyss 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.

#

2m is too low of a number, they do care bout low numbers

#

if its every 10-20 mins, i dont see much problem

stark abyss
#

I see

opal plank
#

but because you are doing it in:
a) multiple guilds/channels
b) with a low timer
its betetr not to

stark abyss
#

you know what I am glad I got to talk to you

opal plank
#

why's that?

#

most people here will help

stark abyss
#

what if I limit the number of guilds?

#

cards only spawn in one channel too

opal plank
#

if you change that to 10m and do jusst that, that might be a better approach, though automation is very bad

stark abyss
#

can you tell me why automation is very bad?

opal plank
#

its not OUR definition of bad, its Discord policy that's against it

#

Generally bots should only react to user actions...

stark abyss
#

right

opal plank
#

there are exemption to this, but usually the gist is: dont automate the api

stark abyss
#

what if the guild is like 10

#

would it still be a problem?

opal plank
#

10 channels and 10 minutes between each spawn, i dont see too much of a problem, but like i said, thats Discords policy, my opinion on it doesnt affect the outcome

stark abyss
#

i gotta read their policy then

opal plank
#

usually we use common sense, knowing not to spam the api and reduce the amount of calls we do on it

#

thats the thing, its pretty grey area where they stand

#

that message i copied above is from one of the devs

stark abyss
#

yeah i am aware but not exactly sure what would be api abuse/spam

#

oh

stark abyss
#

okay

barren basin
#

i have an other question about awaitMessages: why the code written after is executed before awaitMessages has finished ?

solemn latch
#

because its async

coral lichen
#

because

solemn latch
#

which is why you use .then

coral lichen
#

you need to use .then

#

LMAO

sonic lodge
#

awaitMessages returns a promise which resolves with all the messages it's waiting for

#

that's why you need to use .then()

coral lichen
#

^

stark abyss
#

@opal plank but.. the bot sends a card in 2 ish mins or so how is that not api abuse?

opal plank
#

what i assume is that the cards you spawn are global and not channel specific

barren basin
#

ok i understand, but when i put all the code in then() i have an error

stark abyss
#

it is channel specific

coral lichen
#

what error

stark abyss
#

you do as!activiate and the card spawns only in that channel

opal plank
#

idk dude, all the info i know i've told you, its best not to automate it

north hollow
#

I need help for a command that sends a message to them privately so like a dm

opal plank
#

ยฏ_(ใƒ„)_/ยฏ

coral lichen
#

@north hollow message.author.send()

stark abyss
#

these are some confusing times

opal plank
#

usually you argue with stuff like PokeCord which does similar stuff, though they had to require specific global rate limits from discord to allow their stuff to operate

north hollow
#

@north hollow message.author.send()
@coral lichen where do i put that for this code

opal plank
#

its also arguable they stand a little bit different grounds than smaller bots

north hollow
#
client.on('message', message => {
    if (message.content === Prefix + 'help') {
     const embed = new MessageEmbed()
       .setThumbnail('https://cdn.discordapp.com/attachments/719316812021366836/721760261597560922/LOL_AM_OMG.png')
       .setDescription('โŒจ๏ธ **Help Commands--** โŒจ๏ธ \n \n Dont Forgot All Commands Are Lowercase \n \n  ๐Ÿ“Œ  **prefix- {+}**  ๐Ÿ“Œ  \n \n --  **Meme** \n --  **Joindiscord** \n --  **Mountain** \n --  **Dogs** \n -- **Authors** \n --  **Avatar** \n --  **JoinBot** \n \n ๐Ÿšซ **Administration cmd--** ๐Ÿšซ \n \n --  **Kick** (@The Name Here) \n --  **Ban** (@The Name Here)  \n \n  โ˜Ž๏ธ  **Contact cmd--**  โ˜Ž๏ธ  \n \n --  **Contact** \n --  **Website** \n \n More Commands Soon \n \n NOTE:This Bot Still Under creation Period! \n If They Are Bugs Pls Tell Me With DMs or Do +Contact')
       .setTimestamp()
       .setColor(15158332)
       .setFooter(message.author.tag,message.author.displayAvatarURL())
    message.channel.send(embed);
  
    }
  });
coral lichen
#

jesus

solemn latch
#

๐Ÿค”

#

we cant spoonfeed sobba

blissful carbon
#

ยฏ_(ใƒ„)_/ยฏ

barren basin
#

what error
@coral lichen please wait i'll tell you

coral lichen
#

of course

restive furnace
#

ugh those \n's

sonic lodge
#

instead of sending it to the channel, send it to the author

opal plank
#

i wish discord allowed linters for codeblocks

solemn latch
#

๐Ÿค”

restive furnace
#

that would make too much work for discord

opal plank
#

ik, but still

barren basin
#

@coral lichen i think i have an idea, thank you

coral lichen
#

uh your welcome?

barren basin
#

it was because of an awaitMessages iteration

#

i think, but i don't know how to solve it

#

i could use a function but idk

stark abyss
#

so they get special global rate limit

opal plank
#

indeed

robust moth
opal plank
#

its an object, no?

#

stringify it

#
JSON.stringify()```
earnest phoenix
#

const Discord = require(discord.js);
const bot = new Discord.Client();
const token = token
const PREFIX= *;

bot.on(ready , () =>{
console.log(This bot is online!)

}

)

bot.on(message , message=>{
let args = message.content.substring(PREFIX.length).split(" ");

switch(args[0]){
    case `ping`:
        message.channel.send(`pong!`);
        break;
        case `info`:
            console.log(`message received`);
            if(args[1] === `version`){
                message.channel.send(`Version 1.0.0`);
            }else{
                message.channel.send(`Invalid Args`);
            }
            break;

        }
        
    })    

bot.login(token);

opal plank
#

omg

earnest phoenix
#

no commands run

opal plank
#

please use code blocks

earnest phoenix
#

k

opal plank
#

hastebin*

#
const Discord = require(`discord.js`);
const bot = new Discord.Client();
const token = `token`;
const PREFIX = `*`;
bot.on(`ready`, () => {
  console.log(`This bot is online!`);
});
bot.on(`message`, (message) => {
  let args = message.content.substring(PREFIX.length).split(' ');
  switch (args[0]) {
    case `ping`:
      message.channel.send(`pong!`);
      break;
    case `info`:
      console.log(`message received`);
      if (args[1] === `version`) {
        message.channel.send(`Version 1.0.0`);
      } else {
        message.channel.send(`Invalid Args`);
      }
      break;
  }
});
bot.login(token);```
#

so, whats the issue here?

earnest phoenix
#

no commands run

#

i do *ping

#

doesnt respond

#

with pong

opal plank
#
    const args = message.content
      .slice(FREFIX.length)
      .trim()
      .split(/ +/g);```
#

im assuming args is blurting when its passing on that

earnest phoenix
#

prob

barren basin
#

how can i loop awaitMessages ? ^^'

earnest phoenix
#

ok now my bot has 2 prefix

opal plank
#

you first check if it starts with the prefix

#

dont copy what i sent you, thats just an example

stark abyss
#

not erwin i can have it send message for high tiers so it it will be like over idek but some time that won't be a problem so can u help me now?

opal plank
#

with what?

stark abyss
#

So I am trying to make a command where:

  • You activate the command
  • It reads the embed in that channel and sends a message
  • It should continue reading the embeds and triggering it to send a message until they do this other command

Would I need a database for this?
I don't know how to get started

opal plank
#

you still reacting to other peoples bots?

stark abyss
#

it's not other people's bot it's only this bot

opal plank
#

if your bot sends the info, you dont need to read anything, its stored in the bot

#

then you dont read embed in that chat

stark abyss
#

wait what

#

the bot can send messages that i don't want it to trigger

opal plank
#

heres the thing

stark abyss
opal plank
#
message.channel.send(embed); //sending an embed

message.channel.awaitMessage(filter);//reading an embed

this is what you are trying to do

let embed = embed
message.channel.send(embed)

//do stuff with embed

why would you read embed when you can store it in code? theres no point in sending, reading, then using that data

#

you KNOW whats being sent

#

why read it twice?

stark abyss
#

um

#

if (message.author.id !== "673362753489993749") return;
if (!message.embeds[0]) return;
if (message.embeds[0].title == "Vote now") return;
if (message.embeds[0].title == undefined) return;

if(message.channel.id == serverChannelTimerID){
  var embedTitle = message.embeds[0].title;

  if (embedTitle.includes("Tier: ")) {
    timer();
  }
}
#

that's my code

#

that's not the issue

opal plank
#
if (message.author.id !== "673362753489993749") return;
    if (!message.embeds[0]) return;
    if (message.embeds[0].title == "Vote now") return;
    if (message.embeds[0].title == undefined) return;

    if(message.channel.id == serverChannelTimerID){
      var embedTitle = message.embeds[0].title;

      if (embedTitle.includes("Tier: ")) {
        timer();
      }
    }```
stark abyss
#

code block yes sorry

opal plank
#

i have absolutely no idea what you re trying to do from this snippet

stark abyss
#

so what i was saying was that "serverChannelTimerID" i need them to do a command to activate it for their server only

opal plank
#

map the channels who has it active

#

check before sending if it map contains that channel id

stark abyss
#

would i need database to store if they command was activated or not?

opal plank
#

after bot is offline, yes, you'd want to save it, otherwise everytime your bot goes off it'll lose all that

stark abyss
#

because i want it so that they can activate or desactivate it at their will

#

yes so i would need database after all?

opal plank
#

thats only if your bot goes offline

#

which is highly likely

stark abyss
#

ok

#

i didn't make any progress

opal plank
#

but i told you how to approach it

#

now try it

stark abyss
#

map the channels who has it active

opal plank
#
  1. create a new map
  2. check if channel is in map before sending embed
  3. if they do !enable, add channel to map
    profit??
stark abyss
#

okay

opal plank
#

the 2. is a check, if channel is there, send it

#

otherwise, dont

pale vessel
#

no

opal plank
#

map is a map()

stark abyss
#

kk

opal plank
#

actualyn

#

noino

pale vessel
#

oh

opal plank
#

this

stark abyss
#

ok

#

and where can i learn to use database

opal plank
#

which database you have in mind?

#

mongo? seq? mysql? sqlite? postgres?

stark abyss
#

that's a very good question

#

if i have to pick i would go with the easiest one possible

opal plank
#

sqlite prob the easiest, though i use postgres cuz my data is bulkier

stark abyss
#

ok

opal plank
#

you could also use a JSON file

#

if you REALLY wanna avoid

#

load json on bot startup, and change it/save everytime the command is called

stark abyss
#

hm

opal plank
#

without too many read/writes cycles, json is fine

stark abyss
#

i think ill make a database since i will need it for different commands aswell

opal plank
#

then yes, go for a database

stark abyss
#

thank you erwin

opal plank
#

np

earnest phoenix
#

help me await message.channel.send(message.guild.user.avatar_url)

slender thistle
#

What's wrong

earnest phoenix
#

not using ext

#

member not user

#

I want to send the avatar

#

guilds have members not users

pure lion
#

What language is that

earnest phoenix
#

py

#

python

pure lion
#

Oh

earnest phoenix
#

@earnest phoenix

#

idk then sorry

#
        embed = discord.Embed(color = 0x22a7f0)
        embed.set_thumbnail(url=message.guild.member.avatar_url)
#

what?

stuck compass
#

what version of d.py?

opal plank
#

ignore me

earnest phoenix
#

1.4.0

#

python 3

stuck compass
#

i'm presuming that's rewrite?

earnest phoenix
#

not using ctx or ext

stuck compass
#

hmhmm

earnest phoenix
high crypt
#

are you trying to get the author's avatar?

stuck compass
#

looks like it

earnest phoenix
#

yes yes

high crypt
#

ctx.author.avatar_url

earnest phoenix
#

not using ctx

stuck compass
#

they're not using ctx

high crypt
#

message.author?

earnest phoenix
#

not

#
        embed = discord.Embed(color = 0x22a7f0)
        embed.set_thumbnail(url=message.guild.member.avatar_url)
lyric mountain
#

not what?

high crypt
#

is this inside an on_message?

earnest phoenix
#

yes

#

@client.event
async def on_message(message):

high crypt
#

have you tried? message.author.avatar_url

earnest phoenix
#

yes

#

woops

stuck compass
#

what happened when you tried message.author.avatar_url?

earnest phoenix
#

ops

#

ops

stuck compass
#

change message.guild.member.avatar_url to message.author.avatar_url

high crypt
#

that's not...

earnest phoenix
lyric mountain
#

ah, br

high crypt
#

I've just tried using message.author.avatar_url in my own on_message and it worked fine

slender thistle
#

Show your code

stuck compass
#

did you await the embed?

earnest phoenix
#

ah, br
@lyric mountain full br

slender thistle
#

They don't need to await the embed

#

they need to send the message

stuck compass
#

yes

quartz kindle
#

more br

stuck compass
#

that';s what i meant i'm sorry ):

earnest phoenix
#

ok ok

stuck compass
#

if you don't send the message nothing will happen

earnest phoenix
#

if message.content.startswith("?Avatar"):
await message.channel.send(message.author.avatar_url)

high crypt
#

that just sends a link

#

nevermind my internet's just bad, it should preview whatever the link goes to

earnest phoenix
#

Thx friends

#

โค๏ธ

opal plank
#

@earnest phoenix i told you, check if it starts withy our prefix

earnest phoenix
#

How to reduce the link?

lyric mountain
#

you don't

cloud vortex
#

[Your Avatar(avatar.link)

lyric mountain
#

put it in an embed

#

[Your Avatar(avatar.link)
@cloud vortex won't work

cloud vortex
#

Really?

lyric mountain
#

inline URLs only work in embeds

opal plank
#

embed works with that format

#

except title and footer

cloud vortex
#

embed in links avatar

earnest phoenix
#

how do I do that ?

opal plank
#

though that wont display the image

#

Author, thumbnail, or image

#

in embed

north hollow
#

@earnest phoenix here

cloud vortex
#

bizimki tรผrk isi

opal plank
#

those iirc are the only displayable properties you can use

cloud vortex
#

Uleyn

north hollow
#
client.on('message', message => {
  if (message.content === Prefix + 'Avatar') {
    const embed = new Discord.MessageEmbed()
      .setTimestamp()
      .setTitle('Your Avatar')
      .setAuthor('This Code Is By S O B B A')
      .setImage(message.author.displayAvatarURL())
      .setColor(15844367)
      .setFooter(message.author.tag,message.author.displayAvatarURL());
    message.channel.send(embed);
  }
});
``` @earnest phoenix
lyric mountain
solemn latch
#

๐Ÿค”

lyric mountain
#

@earnest phoenix

earnest phoenix
#

hi

opal plank
#

is that favela lang

north hollow
#
client.on('message', message => {
  if (message.content === Prefix + 'Avatar') {
    const embed = new Discord.MessageEmbed()
      .setTimestamp()
      .setTitle('Your Avatar')
      .setAuthor('This Code Is By S O B B A')
      .setImage(message.author.displayAvatarURL())
      .setColor(15844367)
      .setFooter(message.author.tag,message.author.displayAvatarURL());
    message.channel.send(embed);
  }
});
``` @earnest phoenix
lyric mountain
#

is that favela lang
@opal plank yk, I could report u for being xenophobic

#

just saying

stuck compass
#

you can use

embed = discord.Embed(colour=something)
embed.set_image(url=message.author.avatar_url)```
opal plank
#

Eu tambem falo portugues vacilao

stuck compass
#

and then just send that embed

lyric mountain
#

teu cu

earnest phoenix
#

br xinga nn br

opal plank
#

imagine, either way, keep english here

earnest phoenix
#

krl kkkkkkkkk

#

os gringo fingindo q รฉ br

quartz kindle
#

@north hollow you just gave javascript code to someone who's using python

earnest phoenix
#

q dizer

#

br fingindo q รฉ gringo

north hollow
#

o

opal plank
#

English

cloud vortex
#

@gleaming glen Nasฤฑlsฤฑn iyimisin

earnest phoenix
#

colour=???

stuck compass
#

whatever you want it to be

#

so 0xffb5f7 is a colour

#

just use the colour you had before

#
embed = discord.Embed(colour=0x22a7f0)
embed.set_image(url=message.author.avatar_url)```
earnest phoenix
#

may God reward you

#

โค๏ธ

stuck compass
#

๐Ÿ’ž

pure lion
#

What are the main differences in syntax between js and py?

tame shuttle
#

Whitespace matters

pure lion
#

Ah

slender thistle
#

{} are only used for sets and dictionaries in Python

stark abyss
#

anyone know database where i wouldn't have to download anything

stuck compass
#

I dont think that's possible

placid cairn
#
var a;
var b;

setInterval(() => {

if(srv.getServerStatus){

if(b){
return a = false
} else {
return channel.send("โœ…Status Originales RP: ON!โœ…"), b = true, a = false
}

} else {

if(a){
return b = false
} else {
return channel.send("โŒStatus Originales RP: OFF!โŒ"), a = true, b = false
}
}

}, 5 * 1000)

})```
Hello, look I need help with this code, the function that I want to do is that every 5 minutes I send a message that if the server is ON or OFF but what happens is that when it is ON it sends the message and when it is OFF it sends the same ON message, and something I want to do is that if the answer is the same one you just sent, don't send it
earnest phoenix
#

:0

#

i know the problem

#

i didnt return it

opal plank
#

omg

#

dude, addFIELDS(with s), accepts an array of fields so you dont have to set them manually

#

5 if's its good to use switch

#

@earnest phoenix

earnest phoenix
#

wyere ?

#

fields

#

where

#

no there is a difreent things

opal plank
#

addFields([field1, field2])
rather than
addfield(1)
addField(2)
...

earnest phoenix
#

ye maybe with s is better

#

ye

#

:))

misty sigil
#

tim has arrived
i did fix my webhook tim

opal plank
#

just to do some cleanup on the code

earnest phoenix
#

@misty sigil dude he is not ur sec Stackoverflow

#

Google it

misty sigil
#

i didn't want that

#

i was telling him i fixed it mmulu

quartz kindle
#

@placid cairn why not ```js
let status = srv.getServerStatus;
setInterval(() => {
if(srv.getServerStatus !== status) {
status = srv.getServerStatus;
channel.send(status ? "Status is ON" : "status is OFF")
}
}, 5000)

opal plank
#

Tim, you use express?

quartz kindle
#

nope

opal plank
#

or nginx?

earnest phoenix
quartz kindle
#

i use nginx as a reverse proxy

earnest phoenix
opal plank
#

hmmm just wondering if theres a way to listen to outside events without port fowarding using nginx

earnest phoenix
#

why

opal plank
#

cuz listening to port 80 sounds sketchy af

misty sigil
#

8080?

opal plank
#

url defaults to 80 iirc

misty sigil
#

isnt 8080 https?

quartz kindle
#

you can set node.js to privileged ports if you run it as admin/root, but thats not recommended

opal plank
#

hmmm not sure actually, i think its 80 from the research ive done

quartz kindle
#

forwarding is the recommended way, but you dont need nginx

#

you can use anything else, or even iptables

opal plank
#

problem is, my iSP doesnt allow port fowarding

#

even if i open the ports on the router they are listed an closed when i ping them

#

so im trying to circumvent that

quartz kindle
#

port checkers dont always work

#

many times it will show as closed but it works

opal plank
#

any recommended way for me to check them that isnt locally?

quartz kindle
#

you're trying to self host at home?

opal plank
#

yeah

misty sigil
#

i'd not recommend

modest maple
#

its alright

opal plank
#

was going to host a webserver but without ports i cant use oauth since it requires a callback

quartz kindle
#

just run a basic node express on like port 3000, and tweak your router until it works

modest maple
#

might cost $$$ in electricity

#

buts its pretty G

opal plank
#

my servers already run 24/7

#

i'll try on 3000

quartz kindle
#

but like

#

you will need forwarding anyway

opal plank
#

thats the thing, im sure i cant port foward them

quartz kindle
#

nvm, you can use DNS if you have a domain

opal plank
#

cuz i even had technicians from the ISP come here and tell me the same

quartz kindle
#

but then you also need a static ip

opal plank
#

its dynamic

modest maple
#

but like

quartz kindle
#

if you dont have a static ip, you will need a dynamic dns service

modest maple
#

port forwarding

#

isnt a isp thing

#

its something you need to config on your router

opal plank
#

idk what the heck they did, it just wont work

#

i triple checked

modest maple
#

which every router will have

misty sigil
#

if you dont have a static ip, you will need a dynamic dns service

pale vessel
#

noip

opal plank
#

i used to open ports quite often, soon as i switched to the new ISP, it wouldnt work anymore

#

same router too

#

configs were kept

modest maple
#

what router?

opal plank
#

lemme check

#

GDB10R-02

stark abyss
#

would using json files instead of creating a database be a bad choice?

opal plank
#

actually holdup, that might be the decoder

misty sigil
#

yes

modest maple
#

i think its the decoder

misty sigil
#

yes yes yes yes yes yes yes use a db

opal plank
#

thats all i got info from it

paper wolf
modest maple
#

@opal plank what provider

stark abyss
#

oh

#

why would it be bad? @misty sigil

opal plank
#

NET , HUMANX

misty sigil
#

why?

#

JSON is very prone to corruption

stark abyss
#

corruption?

paper wolf
#

how can i add mops to my serverpandasad

stark abyss
#

erwin what's your opinion?

misty sigil
#

mops???

paper wolf
#

bot

modest maple
#

@opal plank go to where you port forward on the router's page and send a ss

misty sigil
#

well

#

get an oauth link

#

and sign in

#

and select the server

#

by OAuth link I mean the bot's invite link

paper wolf
#

it says only bot owner can add this bot to server

opal plank
misty sigil
#

well

#

its private

paper wolf
#

hmm

opal plank
#

@modest maple

stark abyss
#

hm?

opal plank
#

last i checked on this router, it needed a virtual server and trigger to port foward it

paper wolf
#

hm?
@stark abyss ok

stark abyss
paper wolf
modest maple
#

you shouldnt?

#

tho that is a very weird setup they have there

opal plank
#

indeed

#

theres no port foward option

modest maple
#

virtual server is normally port forwarding anyway

opal plank
modest maple
#

you want Virtual servers

quartz kindle
#

you shouldnt need port triggering

#

you only need virtual servers

modest maple
#

^^

opal plank
#

yes im aware, most routers have port fowarding as option

#

though this one doesnt, so i went for virtual servers

modest maple
#

yh

opal plank
#

tried a basic test with a minecraft instance

quartz kindle
#

virtual servers and port forwarding are basically the same thing

modest maple
#

you should be able to just add a port to forward

opal plank
#

they are already added

modest maple
#

can you send a ss of their configs?

opal plank
#

since my ip isnt public, its fine posting my opened ports

modest maple
#

which port is for dbl?

opal plank
#

its local

quartz kindle
#

do you have a static local ip address?

opal plank
#

hmmm i think i do

quartz kindle
#

cmd -> ipconfig

opal plank
#

ipv6?

quartz kindle
#

ipv4

opal plank
#

yes

#

i do

quartz kindle
#

which one is it?

modest maple
#

is your provider ip dynamic tho

opal plank
#

.89

#

its dynamic, yes

quartz kindle
#

so if you add a new rule directing port 3000 to 192.168.0.89

#

you still cant see your express server?

#

from your.external.ip.address:3000

modest maple
opal plank
#

lemme give it a try

modest maple
#

check that the port is open first

opal plank
#

i'll try something simplier, holdon

quartz kindle
#

then you launch an app that requests a port, windows firewall should show up asking you if you want to allow of deny

#

so just allow that and you shouldnt have problems with any internal firewall

opal plank
#

lemme retry it

quartz kindle
#

(unless you have a 3rd party firewall such as some antiviruses come with)

opal plank
#

antivirus shouldnt be an issue

pure lion
#
[2020-07-15T18:16:50.407Z] Rate Limited {
  timeout: 6500,
  limit: 2,
  method: 'get',
  path: '/gateway/bot',
  route: '/gateway/bot'
}

um

modest maple
#

you are ratelimited

#

gj

pure lion
#

:(

opal plank
#

aight, 5 mins and this should work

#

well, not work, but i'll be able to test it

earnest phoenix
#

How do I mention someone in the avatar

lusty quest
#

@quartz kindle are there breaking changes with D.js-light v3?

opal plank
#

okay, locally i can see it

#

now its a question of: can i ping it?

#

ports opened

#

no shit

#

@modest maple

quartz kindle
#

@lusty quest yes, check the release tag on github for changes

lusty quest
#

ok thx

earnest phoenix
#

How do I mention someone in the avatar?

coral lichen
#

wym

#

wdym avatar

earnest phoenix
#

what?

opal plank
#

im clueless as to what is clogging on my network tbh

coral lichen
#

better_sqlite3.node is not a valid Win32 application

#

it seems

#

hold on

opal plank
#

any ideas Tim?

coral lichen
#

reinstall quick.db?

strong tundra
#

is your os 32 bit

#

is your node install 32 bit

#

did you copy his node modules

#

oh

quartz kindle
#

thats the problem

strong tundra
#

delete node_modules and reinstall

#

You have to build node-sqlite3 on Windows if you want it to work on Windows. Your system (where you build it) has to meet nw-gyp's requirements (which are the same as node-gyp's requirements); the Python's directory also has to be in your PATH (both lists of requirements omit this important part).
https://github.com/mapbox/node-sqlite3/issues/267#issuecomment-39309328

quartz kindle
#

you will probably need to do npm install -g windows-build-tools before you can install quick.db

#

the node_modules folder doesnt matter

#

the entire folder is generated when you install modules from npm

#

but modules are system specific

#

on every system you put your bot in, you have to reinstall all modules

#

if you run npm install it will reinstall all modules from your package.json file

#

and create the node_modules folder for you

strong tundra
#

it says to use it yeah

quartz kindle
#

no

#

the -g option means its a global install

opal plank
#

tried a couple other things, none worked unfortunately

#

thats why i was trying to see if it could use port 80 to listen to it, since its necessarily open

tulip ledge
#

So I'm trying to make a NodeJS app that will allow me to change the color of my mouse using the command line (i will be making to so I can change the LED colors of all my things at once) My mouse's software can have things like import and export profile, would I create a profile using my NodeJS app and then import it in some way?

#

Or maybe make a way to automatically select a profile

#

The only way I can do this is probably by seeing what packets are being sent through the USB to my mouse and basically send my own packets to it

#

(as my mouse has an SSD that stores all the profiles)

pure lion
#

So you're using the driver? Then yes, create it as a new profile

tulip ledge
#

Ok

#

The issue is

#

Importing the profile

#

It's a .bkm

#

I first need to see how it works

pure lion
#

There's gotta be a file location

#

Yea do that lol

tulip ledge
#

As opening it in VSC shows alot of unicode characters

pure lion
#

It probably stores RGB values

tulip ledge
#

I think it's encrypted

copper cradle
#

it's a binary

#

which means

tulip ledge
copper cradle
#

it's a binary

#

have you ever worked with compiled langs?

tulip ledge
#

No

copper cradle
#

or you just know those shitty ass dynamic typed, interpreted langs

tulip ledge
#

Nope

copper cradle
#

hmmhmhmg

magic jackal
#

Hey is there any way I can pull get the role names from guildMemberUpdate instead of the role IDs? Or should I just query each role ID everytime there is an update?

returns an array of the roles under newMember._roles

[ '732729959453556787', '732647439324151838', '732619879554875543' ]

tulip ledge
#

@copper cradle Do you know a way so I can actually get it to readable

#

So I can actually edit it?

copper cradle
#

not really

#

what's the file extension

pure lion
#

.bullshit

copper cradle
#

what

pure lion
#

.bkm

copper cradle
#

aight

pure lion
#

Btw I need help

#

With canvas

amber fractal
#

we need a .bullshit file format tho

pure lion
#

I'll do it