#development

1 messages ยท Page 1244 of 1

delicate shore
#

Oh

#

Ok thanks

#

for webhooks, it's vote.user to get the ID
@slender thistle
Wait
Vote.user gives me id????
I thought it gave me user name #

slender thistle
#

You can have multiple users with the same name

#

adada#0001
adada#0002
and so on

#

then you have two of those users with different unique IDs

#

one's ID is 123, the other's os 101

green kestrel
#

hmm, will this work...

#

trying to have a useful metric of if my bot is trending up or down in a single figure

#

so i have a figure called 7 day retention

#

its worked out by percentage of kicks vs joins, so positive means overall more servers are being added than removed, negative means more are being removed than added

#

100% means nobody is kicking it, -100% means everyones kicking it, 0% means no growth

#

should this be ok? seems to make sense to me

#

i decided to work it out only ever over the last 7 days otherwise the previous weeks and weeks of data will smooth out the average too far

#

i should probably call it 7 day trend not retention though

earnest phoenix
#

is there a way to make a bot use a rich presence?

green kestrel
#

no

earnest phoenix
#

how do you make it the live status instead then

tight plinth
#

@green kestrel
i mean, if you give a little explanation at the bottom that explain what it is, yeah it would be fine
7 day trend is a better name yeah

green kestrel
#

rich presence is for games, via the discord gamedev api library, which tells the client to set the rich presence, iirc

#

you can set just a standard presence @earnest phoenix

earnest phoenix
#

ik but i forgot how to make it live

#

well streaming

#

bro is it just "STREAMING"

#

i swear

quartz kindle
#

for streaming it needs to have a valid youtube or twitch stream url

earnest phoenix
#

yeah but i mean like

#

how do i set it onto the bot

tight plinth
#

depends what lib u use

quartz kindle
#

setPresence or setActivity in discord.js

hazy ingot
#

sa

delicate zephyr
#

@green kestrel you should log / store when your bot joins the guild and if it's instantly kicked / how longs its in the guild before its removed

green kestrel
#

Hmm nice, I'll record that, thanks!

#

Generally the ones that don't keep it run a game and kick it, about 10 mins retention max

delicate zephyr
#

ye but checking the join - leave time would be more accurate, since I've had my bot in guilds for 6 - months and up and it affects the statistics accuracy over time if lots of server do it at once

earnest phoenix
#

@quartz kindle yeah but how

#
client.user.setPresence({
              status: "??",
              activity: {
                  name: ``,
                  type: ""
              }
#

(that's the bit i have

lime gorge
#

Hm, is there a reason why guild.owner doesn't exist on this serv?

earnest phoenix
thick gull
#

Hm, is there a reason why guild.owner doesn't exist on this serv?
@lime gorge p sure its cause cache

#

an alt owns the guild not oliy

earnest phoenix
#

wdym alt

thick gull
#

an

earnest phoenix
#

so youre saying

#

ive been an idiot

thick gull
#

alt account

earnest phoenix
#

i know

lime gorge
#

yup, but still, shouldn't I be able to get the owner without having to loop through the user list?

earnest phoenix
#

but like i thought oliy owned it

thick gull
#

offline users arent cached

#

oliy does own it??

earnest phoenix
#

i mean like

#

nvm

lime gorge
#

I mean, its not a matter of cache, the owner object should be inside to the guild one on its own, without going through the cache.

carmine summit
#

my .htaccess not working

#

help

#


RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]```
lime gorge
#

eg, doing:

const guild = client.guilds.cache.get('264445053596991498');
console.log(guild.owner); // null```
pale vessel
#

the owner isn't cached

#

most likely due to the guild being too big and the client only caches online members

#

you don't need to loop through the user list. you can fetch the owner by id using members.fetch(guild.ownerID)

lime gorge
#

Then discord.js indirectly calls the cache to get the guild owner? Thought the object to be directly attached to the Guild Object

pale vessel
#

it can't get the owner, it's not cached

#

the api for guilds only give the id for owner, discord.js has the guild.owner property that resolves the owner id to a member (at least tries to...)

lime gorge
#

Yes, but my point was that you dont call the cache directly to get the owner. Which makes it unclear where it gets it.

pale vessel
#

wdym

#

it can't directly attached to the guild object. the owner state can change (e.g. their presence, username, discrim etc.), like normal members

#

which makes sense why it should be in the cache along with other members

carmine summit
#

try guild.owner.user

main chasm
#

now canโ€™t get badge developer right ?

carmine summit
#

Y E S

pale vessel
#

try guild.owner.user
that won't work if the owner isn't defined in the first place

carmine summit
#

welp, How do we define guild?

#

what im guessing is to put the guild id

#

7777777.owner.user

#

correct me if im wrong

#

im pretty noob

pale vessel
#

grab the guild from cache (<client>.guilds.cache.get(<id>)) or fetch it

jovial nexus
#

how can i update without restarting my bot?

sudden geyser
#

Update what specifically.

#

And what programming language are you using.

jovial nexus
#

Javascript

#

And like editing a command without restarting the bot

#

or adding new files/commands

sudden geyser
#

You'd need a command handler to separate your commands into separate folders. If you want to reload a command, you need to unload it from your commands collection, clear the required file cache (delete require.cache[require.resolve("./path/to/file.js")]), then require the file and add it to your commands collection again.

See this example: https://discordjs.guide/command-handling/adding-features.html#reloading-commands

#

@jovial nexus

jovial nexus
#

ok thx

eternal osprey
#

Howdy boys and girls!

#

How do I make a command that mutes everyone in the voice channel?

pale vessel
#

voice channels have the members property which is a collection of members inside the vc

earnest phoenix
#

how can i make a progess bar? ;-;

cinder patio
#

For a website? Or for your bot?

earnest phoenix
#

for my bot

cinder patio
#

The general idea: Let's say progress = 70, loop until i is equal or more than progress, and every time increment i by 10. If i % 10 == 0 add a full bar, otherwise add half a bar

earnest phoenix
#

how can i make a progess bar? ;-;
@earnest phoenix You can use my package called string-toolkit for that Definitly not an ad

daring spear
#

is anyone know how to keep our bot 24/7 online

pale vessel
#

use a process manager

sharp thicket
#

Like a vps or hosting service

main chasm
#

vps is free ?

restive furnace
#

no

#

none of good are

main chasm
#

hm

small zenith
#

vps is free ?
@main chasm u can get a good vps for free if u are student

#

Checkout Github Education Pack

#

How can i get total and exact storage of RAM of the vps without any package?

drifting wedge
#

with the github.tech domain thingy, how can i like link it to cpanel?

slate oyster
#

I did it!
I got a singular command to respond on both Discord and Nertivia!
(Not that it actually bans users)

charred geyser
#

how would i let a variable be a mention but if not a mention, the userid that was put instead?

#

like getting arguments of a command

pale vessel
#

with the github.tech domain thingy, how can i like link it to cpanel?
@drifting wedge set the correct nameservers in your registrar panel and add the domain under "Addon Domains" in cPanel

#

the font is scuffed though

slate oyster
#

@earnest phoenix An open source chat client. Basically Discord, minus VC, plus free nitro and pre-boosted servers
Made by Fishie/Pancake

#

Anyways
V4 of my bot will work on both Nertivia and Discord
V3 is only working on Discord
Certain things, like VC stuff, obviously won't work on Nertivia

pliant leaf
#

hey im trying to code my bot to do an embed to list bot commands, im kind of a noob, is there a way to make it send a complete paragraph? because as far as i know i can only do one line of speech as footer or description

misty sigil
#

use \n as a line break

pliant leaf
#

im coding in JS does that work in javascript?

slate oyster
#

Yes

pale vessel
#

not only in javascript mmLol

pliant leaf
#

so could you give me an example of how to use it because im not sure
so would i do : .setFooter('hello')\n or somthing then another sentance?

wide ruin
#

How to check if the user voted MegaThonk

pale vessel
#

use it inside strings

#

"hello\nworld" will return:

hello
world```
pliant leaf
#

Oh cool thanks

wide ruin
#

How to check if the user voted MegaThonk
@wide ruin in top.gg

cerulean salmon
#

How i can receive photo from bot dm?

hardy vector
#
public lava: Shoukaku = new Shoukaku(new Client, nodes, ShoukakuOptions)

i've made a shoukaku client
and i started the lavalink server but when i start my bot i dont get any logging saying the node is connected

grave stone
#

yo does anyone have any experience with cloud servers that could help me, my bot goes offline randomly...

valid frigate
#

check your logs if it goes offline randomly

#

i suspect it has to do with a memory leak

opal plank
#

@wide ruin which language you coding on and also which lib u using?

thin turret
#

What service are you using

opal plank
#

@cerulean salmon just attach the image and send it to yourself

valid frigate
#

with pm2 you can use pm2 logs appname

grave stone
#

i use skysilk

hardy vector
#

ask them

#

or it might be ur bot

valid frigate
#

regardless of vps

grave stone
#

i think its the bot

valid frigate
#

its the language

#

what language si your bot in

grave stone
#

java script

pale vessel
#

space

valid frigate
#

ok

#

how do you keep your bot running

#

rephrase

#

what process manager

opal plank
pliant leaf
#

yo @pale vessel tysm that /n thing worked! my code used to just send 15 messages one after next

opal plank
#

how to get ratelimited 101

pale vessel
#

\n btw

pliant leaf
#

ik

pale vessel
#

don't get confused

pliant leaf
#

i wasnt sure if it would do that to my message so i just switched it

opal plank
#

hmmmm

wide ruin
#

@wide ruin which language you coding on and also which lib u using?
@opal plank js

opal plank
#

this might be a big annoyance

wide ruin
#

Discord.js

opal plank
#

@wide ruin and are you using DBL's lib/

#

i meant library to handle DBL api

#

not DIscord's

wide ruin
#

No pepowot

opal plank
#

start there then

wide ruin
#

Where can I get it

#

Oh ok

modest plaza
#
if(args[0] === `@modest plaza`) {``` Is that even possible? Or how to fix it to make it work?
opal plank
#

well, yeah

#

it works just fine

#

though use ' rather than `

#

compiler expects input with `

#

though what exactly you trying to accomplish/

#

?

modest plaza
opal plank
#

@modest plaza you cant ping inside an embed

modest plaza
#

nah i want .user @modest plaza instead of .user ethxrnity

faint prism
opal plank
#

then check mentions

small zenith
#

How can i get total and exact storage of RAM of the vps without any package? Discord.js

opal plank
#

message.mentions

#

@small zenith process.memoryUsage().rss

small zenith
#

Ok

faint prism
#

Anyone know a good C# lib for drawing text on images?

opal plank
#

canvas

#

jk, i do not

pale vessel
opal plank
#

i actually broke the lib

snow urchin
pale vessel
#

sketchy link

opal plank
#

i just checked,im not ratelimited, i just surpassed the lib ability to handle that traffic

snow urchin
#

url shortner

opal plank
pale vessel
#

v-l.cc is my only trusted url shortener ๐Ÿ˜Ž

misty sigil
#

v-l.cc is a url shortener i want

#

no ip tracking

opal plank
misty sigil
#

its good

#

no its not

opal plank
#

frick

#

now how am i going to handle this?

earnest phoenix
#

Is there a way to get the last msg sent by <user.id> in a textchannel?

pale vessel
#

of course

misty sigil
#

<user>.lastMessage in djs

#

isnt it

sand condor
#

ye

pale vessel
#

that could be from any channel, even outside the guild

#

since it's a user property, not a member property

#

that's why there's both lastMessageID and lastMessageChannelID

opal plank
#

is there an event listener in node for any uncaught rejections/errors?

prisma oriole
#
process
  .on('unhandledRejection', (reason, p) => { console.error(reason, 'Unhandled Rejection at Promise', p)})
#

@opal plank

opal plank
#

aaah ty @prisma oriole

#

needed that

modest smelt
#

hey i have a question

prisma oriole
#

np

modest smelt
#
@bot.command()
async def start(ctx, reason=None):
  for member in guild.members:
    print("Yay")
#

it says that guild is not defined...

prisma oriole
#

idrk d.py but did you even define guild?

modest smelt
#

guild are just servers

prisma oriole
#

yes ik

#

did you define it?

#

idrk really know the exact d.py syntax but something like

guild = message.guild
# or
guild = message.member.guild
#

if you do that and define, they you can access the members property and then iterate over it

modest smelt
#

that won't work for some reason

prisma oriole
#

wdym

#

what part fails to work

modest smelt
#

i did guild = message.guild and it saya that message is not defined

lilac plover
prisma oriole
#

i assume its ctx.message

misty sigil
#

why bother editing it

prisma oriole
#

seems like a d.py thing at that point

#

im looking at the docs give me a sec

lilac plover
#

i'm trying to make a control panel working with reacts

main chasm
#

client.on('message ' , msg => {
if (msg.content.StartsWith ('1') {
msg.react('๐Ÿ˜Š')
// i want add 18 react to messages and 18 max ๐Ÿ˜Š

prisma oriole
#

you want to use different emojis i assume @main chasm ?

earnest phoenix
#

how to i do like where it shows how many servers the bot is in

main chasm
#

no if i send 1 and u send 1 another person send 1 i want max 18 msg donโ€™t react to msg

prisma oriole
#

@earnest phoenix for d.js it would be:

<Client>.guilds.cache.size
#

ohhh

#

so you want to cap that message to have only 18 reacts?

main chasm
#

yes

#

18 max

#

fron 18 end

prisma oriole
#

so

#

I mean the code for the use case would differ but the tl;dr is that:

#
  1. You would need to create a message react add listener
#
  1. Make sure that your filtering the listener to 1 msg (i.e the message you want to cap reactions for)
#
  1. use <Message>.reactions.cache.size to count the number of reactions on the message and then do your if else logic to stop reactions
earnest phoenix
main chasm
#

thank u man for full help @prisma oriole

earnest phoenix
#

๐Ÿค”

prisma oriole
#

<> refers to instance, so whatever you named it

#

so

#
let bot = new Discord.Client();
#

in this case it would be bot.guilds.cache.size

main chasm
#

no bro

prisma oriole
#

or

main chasm
#

wait

prisma oriole
#
let client = new Discord.Client();
#

in this case it would be client.guilds.cache.size

main chasm
#

(${client.guilds.cache.size})

#

sorro

prisma oriole
#

yes and that too

#

you put it in a string

#
(`${client.guilds.cache.size}`);
#

Alternatively:

("Bot is in " + client.guilds.cache.size + " servers");
main chasm
#

or

tawny silo
#

is someone who make bot with web framework like flask(python)?

main chasm
#

help full @earnest phoenix
client.user.setActivity(${client.guilds.cache.size} Servers!, %help,{ type: 'WATCHING' } ,

earnest phoenix
#

thanks

prisma oriole
#
   await client.user.setActivity(`${client.guilds.cache.size} Servers!, %help`,{ type: 'WATCHING' })```
#

use code blocks so you can see `

main chasm
#

right

earnest phoenix
#

thanks guys

main chasm
#

working ?

#

np

stable hearth
#

looking for advice from a video game designer, DM me

main chasm
#

@prisma oriole

#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
       

         
        if(message.author.bot) return
        message.delete()

    
    if(message.content.toLowerCase() === '?start') {
      

        
        message.channel.send(' started successfuly :man_biking:')
      
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);   
     
          
        collector.on('collect', (m, col) => {
            
            
                if(m.content.toLowerCase() === '?stop' && (message.author.id === m.author.id)) {
                    console.log("Stopped.");
                    collector.stop();
                }
                else {
                    let embed = new Discord.MessageEmbed()
                        
                        .setDescription(m.content)
                        
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")
                            
                            
                    })
                
                }
                
                        
            
            
        });
#

i want without ?start auto work suggestion command in channel suggestion how ?!

lilac plover
thick gull
#

<message>.edit()?

flint yew
#

wtf that error

lilac plover
#

<message>.edit()?
@thick gull it doesnt work

restive furnace
#
<channel>#send("hi").then(m => m.edit("hello"));```
#

promisees!!!

thin karma
#

promisees???

opal plank
#

Primisiss

#

promises are nice

thin karma
#

as long as you keep them

main chasm
#

guys who is know from message collector?

sinful belfry
#

-notr

gilded plankBOT
#

ฤฐngilizceden baลŸka dillerde sohbet etmek iรงin #general-int kanalฤฑnฤฑ, top.gg hakkฤฑnda (Tรผrkรงe olarak da) destek almak iรงin #support kanalฤฑnฤฑ kullanฤฑn.
Bu kanalda Tรผrkรงe konuลŸmayฤฑn.

summer torrent
#

@flat pelican ^^

opal plank
#

@main chasm what?

#

assuming you need this

#

cuz very borken ingrish

pliant iron
#

Anyone here familiar with creating npm packages?

main chasm
#

@opal plank i have a question

opal plank
#

@main chasm then ask it

formal agate
#

@pliant iron why do you ask? If you want to learn try google.

pliant iron
#

I am know how, I want to ask a security question regarding it

cobalt spruce
#

what is the new form of client.channels.get is it client.channels.cache.get?

main chasm
#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
       

         
        if(message.author.bot) return
        message.delete()

    
    if(message.content.toLowerCase() === '?start') {
      

        
        message.channel.send(' started successfuly :man_biking:')
      
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);   
     
          
        collector.on('collect', (m, col) => {
            
            
                if(m.content.toLowerCase() === '?stop' && (message.author.id === m.author.id)) {
                    console.log("Stopped.");
                    collector.stop();
                }
                else {
                    let embed = new Discord.MessageEmbed()
                        
                        .setDescription(m.content)
                        
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")
                            
                            
                    })
                
                }
                
                        
            
            
        });

i want code work without command ?start please how ?

opal plank
#

oh god

cobalt spruce
#

what is the new form of client.channels.get is it client.channels.cache.get?

#

@opal plank

digital ibex
#

@pliant iron hm?

main chasm
#

@cobalt spruce yes

formal agate
#

Josh, what kind of security question?

pliant iron
#

So my npm package that I'm making is to get data from my mysql database on my website. Like getting an id of a user then it shows other details about them etc. How would I get it to connect to the MySQL database because if I just insert my MySQL details such as host,user,password etc people can just go in the node_modules file and get info and then login and that would not be ideal at all.

#

Would I have to create an api that it gets info from instead?

digital ibex
#

use functions / classes

opal plank
#

@cobalt spruce yes

digital ibex
#

and make the user input their sql stuff

formal agate
#

Josh, why would you make a package for this?

main chasm
#

@cobalt spruce v12 client.channels.cache.get()

formal agate
#

This seems like a module you would right in your code then just import the main file to use

main chasm
digital ibex
#

are you familiar with classes?

#

@pliant iron ^

opal plank
#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
        if(message.author.bot) return
        message.delete()
    if(message.content.toLowerCase() === '?start') {
        message.channel.send(' started successfuly :man_biking:')
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);
        collector.on('collect', (m, col) => {
                if(m.content.toLowerCase() === '?stop' && (message.author.id === m.author.id)) {
                    console.log("Stopped.");
                    collector.stop();
                }
                else {
                    let embed = new Discord.MessageEmbed()
                        .setDescription(m.content)
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")   
                    })
                }
        });```
#

that spacing was giving me a headache

earnest phoenix
#

wut

#

wdym ?

earnest phoenix
#

and why u don't use event handlers

#

or command handler

pliant iron
#

Josh, why would you make a package for this?
I'm doing it so people can easily get info from it that they can use externally for their bots/websites of their own within a couple lines of code

main chasm
#

i want work code withour commamd brother @opal plank

earnest phoenix
#

oh it is ur code

main chasm
#

yes

formal agate
#

so then make a class like Official said

opal plank
#

the moment you see me using embedBuilders you can bonk me in the head ace

main chasm
#

no one

#

help me

earnest phoenix
#

i just switched all of my events, commands and errors logger to Webhook

#

and i fell the bot is faster

#

@main chasm wat is the problem

main chasm
#

i want my code work without ?start

earnest phoenix
#

start ?

pliant iron
#

Okay thank you for your help. Just to be sure using classes will resolve the issue regarding people being able to get the MySQL login info? I haven't really used classes much in the past and am looking in to it more now.

earnest phoenix
#

wdym

ancient nova
#

async function handleVideo(video = false) {
if (video.duration.hours !== 0) return message.channel.send('โŒ I cannot play videos longer than 1 hour, dummy!');
}

main chasm
#

look my code

ancient nova
#

why doesn't work

main chasm
#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
       

         
        if(message.author.bot) return
        message.delete()

    
    if(message.content.toLowerCase() === '?start') {
      

        
        message.channel.send(' started successfuly :man_biking:')
      
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);   
     
          
        collector.on('collect', (m, col) => {
            
            
                if(m.content.toLowerCase() === '?stop' && (message.author.id === m.author.id)) {
                    console.log("Stopped.");
                    collector.stop();
                }
                else {
                    let embed = new Discord.MessageEmbed()
                        
                        .setDescription(m.content)
                        
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")
                            
                            
                    })
                
                }
                
                        
            
            
        });
opal plank
#

then dont attach it onto message

ancient nova
#

async function handleVideo(video = false) {
if (video.duration.hours !== 0) return message.channel.send('โŒ I cannot play videos longer than 1 hour, dummy!');
}

main chasm
#

@earnest phoenix ๐Ÿ‘†

ancient nova
#

help

#

why doesn't this work

opal plank
#

@main chasm dont attach it on message event then

#

use some other trigger

ancient nova
#

halp

#

help

#

me

#

pls

formal agate
#

@pliant iron you would pass the credentials into the class, and use methods to interact with the db.

ancient nova
#

async function handleVideo(video = false) {
if (video.duration.hours !== 0) return message.channel.send('โŒ I cannot play videos longer than 1 hour, dummy!');
}

#

any help?

main chasm
#

hm

opal plank
#

@ancient nova can you stop spamming?

pliant iron
#

Ah okay thanks for explaining.

main chasm
#

how i can fix it ?

ancient nova
#

sorry I'm just in a hurry

main chasm
opal plank
#

be patient like everyone else

ancient nova
#

alright..

#

so

#

eh

#

does anyone have a solution

formal agate
#

Bae

ancient nova
#

yes?

#
const dispatcher = serverQueue.connection.play(ytdl(song.url))
        .on("finish", () => {
          async function handleVideo(video, message, voiceChannel, playlist = false) {
            if (video.duration.hours !== 0) return message.channel.send(':x: I cannot play videos longer than 1 hour, dummy!');
          }
}
#

this is my entire code

formal agate
#

You need to explain what you want to happen, and what it currently is doing

ancient nova
#

I want to block usage of songs over 1 hour

main chasm
#

i deleted message event but repeat messages when i send one message bot reply 3 message

formal agate
#

ok, also can you please put your code in code blocks from now on?

ancient nova
#

sure

formal agate
#

video.duration.hours !== 0 so if I understand this correctly, this would return true if the duration isn't equal to zero. So to solve this we would need a greater then, less than comparison.

opal plank
#

hmmmm

#

i wonder whats happening here

ancient nova
#

I want this to equal zero since hours would mean if I pasted 1 then it would mean that if over 2 hours play error code

#

if I did

#

< 0

#

wait

opal plank
#

opposite

ancient nova
#

this could work

opal plank
#

if hours > 0 return

formal agate
#

^

ancient nova
#

yeah

#

let me try

opal plank
#

i wonder if its cache doing that gap

green yarrow
formal agate
#

is that your bot?

ancient nova
#

yes

opal plank
#

yeah

ancient nova
#

wait

#

who was the question directed to

opal plank
#

my refresh cache is chunking in 100 requests, so i can see

formal agate
#

diff between total and live?

ancient nova
#

oh nevermind

opal plank
#

but still weird that the count updates like that

#

yeah

#

thats likely on my refresh

#

but i dont clear the cache until i recieved a response

#

so its odd that the count is gong down

earnest phoenix
#

im bad in musics

opal plank
#

and the refresh just updates the value, it doesnt remove it

earnest phoenix
#

so i can't help

#

acttually i dont know anything about music

formal agate
#

maybe your bot reconnected

opal plank
#

nah

#

its on all the time

#

that happened in this gap

#

between the start of the refresh cache and the end of it, that gap appeared

formal agate
#

idk man

#

I never made a production music bot

opal plank
#

that was for bae right?

formal agate
#

my idk man?

opal plank
#

yeah

formal agate
#

no, you

opal plank
#

hmmm

#

fuck

main chasm
#

๐Ÿ˜†

opal plank
#

debugging this is going to be a hassle

formal agate
#

I've only made music bot's in a dev environment

ancient nova
#
if (song.duration.hours > 0) return serverQueue.textChannel.send('โŒ I cannot play videos longer than 1 hour, dummy!');
``` <- I made the code a bit shorter, let's try now
main chasm
#

ddos attack lol

#

๐Ÿ˜†

opal plank
#

dossing who?

formal agate
#

if he was ddos, he has more pressing issues than a music bot

main chasm
#

not erwin vs husky

ancient nova
#

TypeError: Cannot read property 'hours' of undefined

#

I am tierd

opal plank
#

huh?

ancient nova
#

how much is an hour in MS

opal plank
#

wdym me vs husky?

formal agate
#

isn't it video instead of song?

ancient nova
#

I deleted async

main chasm
#

bro @ancient nova you can use .addField("Duration", song.duration, true)

ancient nova
#

so I had to change

#

@main chasm I want to make the bot disable playing songs over 1hour not show the duration of a song

main chasm
#

oh

opal plank
#

fml why debugging on ubuntu so hard?

main chasm
#

sorry

ancient nova
#

don't worry about it, you tried to help

#

(;

#

I'll make it work eventually

#

though i spend my entire free day coding the bot

formal agate
#

uSE wINdoWs as YoUR prOdUCtiOn eNV

ancient nova
#
  • coding one command
main chasm
ancient nova
#

which has made me pretty sad

opal plank
#

lol its on ubuntuon the production

#

my local rig is on windows

#

just slap vsc and run debugger, just like that

#

now on that shit rig, i gotta add a server

#

add debugger

#

open ports

formal agate
#

is it 18.04 or 20.xx

opal plank
#

ssh connect

#

and then i can expose the debugger on chrome

#

its such a fucking pain

#

i have no idea tbh

formal agate
#

ubutnu version?

#

dude

opal plank
#

no clue

formal agate
#

that is something you need to know

charred geyser
#

how would i accurately get all members in a guild?

formal agate
#

also, you should have you bot run in a docker container if you can

ancient nova
#
if (song.duration < 3.6e+6) return serverQueue.textChannel.send('โŒ I cannot play videos longer than 1 hour, dummy!');     
``` lol
formal agate
#

why would you do that?

ancient nova
#

I am too tierd to think

opal plank
#

18.04.2

ancient nova
#

of a different

#

solution

#

:<

formal agate
#

Erwin, to add more to your plans for your bot, you should have your bot run in docker

main chasm
#

my bot play 6h

#

and more

opal plank
#

i'll use docker for this sort of stuff down the line

ancient nova
#

btw I am using ytdl-core npm package to stream music

#

maybe that will help

formal agate
#

I'm very glad I learned docker

flint yew
#

return this.getMember(data.member, guild).user;
^

TypeError: Cannot read property 'user' of undefined

formal agate
#

I forget what I used but it might have been ytdl

flint yew
#

anyone help

opal plank
#

git and vsc have been enough for me rn

formal agate
#

i use all three

#

now what is wrong YK

opal plank
#

i should be seeing another spike now

#

if it does im certain its the cache

ancient nova
#

AbortError: The user aborted a request.

#

what does that mean

earnest phoenix
#

that the user aborted a request

formal agate
#

^

earnest phoenix
#

๐Ÿ˜‚

#

AbortError: The user aborted a request.
@ancient nova the user said "nah"

ancient nova
#

I am slowly dying inside

earnest phoenix
#

ping me if u have solution

#

@earnest phoenix bot.guilds.size returns the number of guilds the bot is in

#

bot.guilds.cache.size @earnest phoenix

#

oh yyeah cache

main chasm
#

i said u

earnest phoenix
#

i said u
@main chasm didnt work

pure lion
#

Is there an array method to put item 0 in the last spot and move all items down by one?

main chasm
#

what is version discord ?

earnest phoenix
#

Is there an array method to put item 0 in the last spot and move all items down by one?
@pure lion array.push(element)

#

adds an element at the end

sonic lodge
#

array.shift(); first to remove the first element, then array.push() to append it to the end

earnest phoenix
#

if you wanna keep the first element in, dont use .shift()

#

else use shift

pure lion
#

Okay

#

But how can I get the shifted element

earnest phoenix
#

array.shift() returns the element that got removed

#

let removedElement = array.shift();

pure lion
#

Ah

steep remnant
#

hello

main chasm
#

bot.user.setActivity(`.help | more commands, ${bot.guild.cache.size}) @earnest phoenix now

earnest phoenix
#

backtick missing at the end

#

haram

main chasm
#

i know

opal plank
#

yup

#

faulty found

main chasm
#

bot.user.setActivity(`.help | more commands, ${bot.guild.cache.size}) @earnest phoenix

})
now

opal plank
main chasm
opal plank
#

definetly when cache restarts

earnest phoenix
#

one sec

main chasm
#

k

#

are u use v12?

earnest phoenix
#

nope dont wor

#

k

main chasm
#

send your code

#

here

earnest phoenix
#

wdym

#

the code you use to set the bots status

#

bot.user.setActivity('.help | more commands soon ');

main chasm
earnest phoenix
#

so you didnt add the client.guilds.cache.size stuff

rancid bramble
#

Hey so I want to close the leveling system using a command in another file, how can I access the file leveling system is in?

opal plank
#

relative path

earnest phoenix
#

Hey so I want to close the leveling system using a command in another file, how can I access the file leveling system is in?
@rancid bramble ./someFileInTheSameDirectory

#

../SomeFileInTheDirectoryAbove

rancid bramble
#

already did that but I forgot a part that's why

#

thanks anyway

#

fixed now

main chasm
#

you are welcome

#

@earnest phoenix use glitch?

opal plank
#

DONT use glitch

#

glitch bad

#

so is heroku

main chasm
#

right

#

glitch not working some code v12

#

i see

earnest phoenix
#

glitch bad

#

get your own host

main chasm
#

badddddd

earnest phoenix
#

raspberry or vps

main chasm
#

f*

earnest phoenix
#

i dont give a damn but DO N O T USE GLITCH

main chasm
#

i want learn vps free

#

i use heroku

#

bad or no?

earnest phoenix
#

heroku is fine to some extent but

#

vps or raspbi is still better

main chasm
#

i want vps free

#

how?

pliant iron
#

Impossible.

earnest phoenix
#

you wont get a free vps

main chasm
#

sure

sonic lodge
#

use your computer

#

although it's not "virtual"

pliant iron
#

They could make a vm ig

main chasm
#

pc can't host 24/7

pliant iron
#

Use like Google cloud, you get something like a year for free

opal plank
#

aws

#

f1 micro

#

danbot hosting

earnest phoenix
#

what other app is like glitch cuz i guess glitch bad

main chasm
#

google cloud fine?

sonic lodge
#

godaddy

earnest phoenix
#

any free hosting is bad

opal plank
#

heroku and glitch arent meant for discord bots

earnest phoenix
#

if you want hosting, get a cheap vps

main chasm
#

@earnest phoenix no heroku not bad

earnest phoenix
#

yes, heroku is bad

opal plank
#

heroku IS bad

main chasm
#

nooooooo

pliant iron
#

I recommend google cloud over aws from my person experience

opal plank
#

f1 micro is always free

earnest phoenix
main chasm
#

i hosted my bot from heroku and not any problem very fast

earnest phoenix
#

whats a app like glitch

pliant iron
#

Use heroku then?

main chasm
#

yes

earnest phoenix
#

and whats wrong with glitch

pliant iron
#

Glitch has many things wrong with it

main chasm
#

@earnest phoenix use heroku

opal plank
#

limited hours? cant store shit locally? limited ram?

main chasm
#

and conect github

pliant iron
#

Mainly that it isn't 24/7 unless you pay

#

But it's understandable from their POV

main chasm
#

heroku 24/7 but 1m restart

earnest phoenix
#

?

main chasm
#

yes

opal plank
#

limited hours? cant store shit locally? limited ram? Need uptimers? Possible token leak? Cant use private repos?

#

i can think of a couple reasons not to use em'

main chasm
#

where can't private repo?

#

heroku?

digital ibex
#

glitch and heroku basically made all free hosts look shit

#

when some arent

#

and retards use glitch and heroku so thank u

main chasm
#

@earnest phoenix how i can use vps

#

can u tell me

opal plank
#

by buying one

main chasm
#

no free

pliant iron
#

I mean if you're in the hosting industry it's very easy to find free hosts, most aren't going to last as long and going to be as reliable though

main chasm
#

lol

opal plank
main chasm
thick gull
#

Check pins

earnest phoenix
#

because of idiots misusing the platform and abusing it for discord bots, glitch and heroku took restrictions on their free tiers and the servers are no longer as powerful as they used to be which sucks for people who actually used them for what they were intended for; websites

thick gull
#

For hosting:)

sudden geyser
#

The most basic way to describe it is as "The wrong tool for the job."

main chasm
#

one my friends hosted bot from glitch and added top.gg lol waitWhatSpin

earnest phoenix
#

he isn't special

#

a lot of other people do it too

#

granted, there's a stereotype for those kind of people

opal plank
#

its like bragging about me running stuff on windows 98. Does it work? sure. Should u use it? no

earnest phoenix
#

the bot is shit and the dev has no clue what they're doing

opal plank
#

'my friend hosts on glitch'

#

its nothing to brag about

#

if anything you should be ashamed of it

#

shows they dont care about where they host theier bots in

thick gull
#

they donโ€™t care about quality/ping is what it shows me

opal plank
main chasm
#
client.on('message' , msg => {
    if(msg.content.startsWith('https://')) {
    msg.author.send("my server link")
    msg.author.send('check')
// i want when user send link to dm bot bot copy tha link and send to another server bot in 
    
}
})
earnest phoenix
#

@main chasm im on the app but idk what to do

#

just because the content starts with https:// doesn't mean that it's a link

thick gull
#

wat

earnest phoenix
#

https://
https:// uwu

thick gull
#

i donโ€™t get it

earnest phoenix
#

are not links

opal plank
#

sending 2 messages

main chasm
#

noooooooo

pliant iron
#

i want when user send link to dm bot bot copy tha link and send to another server bot in
Make it then

main chasm
#

that's partner auto

#

lol

opal plank
#

also http

#

or domains

#

or ips

main chasm
#

i know

opal plank
#

so many things you ignoring

main chasm
#

but

thick gull
#

message.channel.type && regex(perhaps) for links in DMS?

earnest phoenix
#

Any good free hosting sites?

main chasm
#

i want coypy link member and send to another channel

earnest phoenix
#

I know replit and glitch

opal plank
#

short answer

#

no

earnest phoenix
#

Any others

#

Ok

opal plank
#

f1 micro

#

or aws

earnest phoenix
#

Ok I will check them out

#

Thanks

opal plank
thick gull
#

free hosting bad sadness

earnest phoenix
#

amazon free tier

opal plank
#

f1 micro is decent

earnest phoenix
#

"free"

opal plank
#

aws is reallygood

earnest phoenix
#

is actually good

thick gull
#

i have like

opal plank
#

but 1 year

thick gull
#

3 braincells

#

I didnโ€™t read the whole thing

main chasm
opal plank
main chasm
#

not help me

#

?

opal plank
#

still havent figured out whats up with this

earnest phoenix
#

im so confused on heroku

faint prism
#

some are not considered "live"?

opal plank
#

they are offline

faint prism
#

im so confused on heroku
@earnest phoenix Never had any issues not using Heroku

opal plank
#

Auger, check title

#

its steams not guilds

faint prism
#

Auger, check title
@opal plank Non-live streams?
What even is that?

opal plank
#

livestreams that are offline

#

like twitch

faint prism
#

ah

#

gotcha

opal plank
#

apart from that nuicense everything is fine from the looks

#

i patched a couple things i overlooked too

#

its almost 100% done

main chasm
#

nawt chya alan

#

?

#

@half lodge

opal plank
half lodge
#

Yes mr dedo

main chasm
#

lo I speak kurdish

half lodge
#

Nawm alana ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

opal plank
#

english here

half lodge
#

Iknow ๐Ÿ˜„

opal plank
#

you do

#

dedo doesnt

half lodge
#

๐Ÿ˜ถ

main chasm
#

@half lodge baxwa drozni

half lodge
#

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

main chasm
#

you @half lodge have bug hunter

#

?

#

do you lie to me

#

?

half lodge
#

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

#

No it's only joke

main chasm
#

only english please

#

@half lodge i deleted my app and installed fixed

half lodge
#

Aha great ๐Ÿ˜‰

main chasm
#

f*

half lodge
opal plank
faint prism
#

sure does

#

Bet it's more accurate too

opal plank
#

indeed, though im not on all streams

main chasm
#

which time my bot accept it

opal plank
#

currently only at 700

main chasm
#

?

opal plank
#

cache still going up

#

though now i got a funny cache behaviour during the re-cache event

faint prism
#

Is this correct syntax (js)?
let user = message.mentions.users.first() || message.author || message.member;
@fleet hornet why so much redundancy?

#

I don't think message.author would ever be empty

opal plank
#

you are correct about that

#

not even system messages

#

you mean a mention

#

?

faint prism
#

can't ping from an embed

opal plank
#

^^

#

only content

main chasm
#

if(message.mentions.users.size){
let user=message.mentions.users.first()
if(user){

opal plank
#

no needfor first check

#

use conditional chaining

main chasm
#

u need mention another right?

#

ues

opal plank
#

let user = message.mentions.users?.first() || message.author!

main chasm
#

if(message.mentions.users.size){
let user=message.mentions.users.first()
if(user){

opal plank
#

one liner

main chasm
#

#avatar @main chasm

#

and bot show me my avatar

opal plank
#

@fleet hornet
let user = message.mentions.users?.first() || message.author!;

#

use that instead

#

actually im not sure if ! is Typescript sytanx only

#

i would assume not

earnest phoenix
#

It's ts only

opal plank
#

fuck

#

well author is always there

#

no need either way

main chasm
#

not Erwin

opal plank
#

das me

thick gull
#

so whoโ€™s Erwin?

quartz kindle
#

what does that ! mean in ts?

thick gull
#

Fuck Iโ€™m still in development

opal plank
#

instead of checking,it means its always there

earnest phoenix
#

They ask how's not erwin but they never ask how's erwin

opal plank
#

its basically assurance that whatever comes there is always present

earnest phoenix
#

Wait this is development

main chasm
#

i want if i send channel 1 , 2 , 3 ,4 , 5, , .... add react to any number or message and 18 msg or 18 number max not add react can u help me?

opal plank
#

so you dont need to check if it exists or not

#

i didnt even understand a third of that question

faint prism
#

what does that ! mean in ts?
@quartz kindle I assume it's the logical not

main chasm
#

i want msg.react 18 react any msg 1 react and 18 msg max bot not add react

#

1

#

2

#

3

#

18

#

max

#

19

pliant iron
#

Spam?

main chasm
#

not add react

#

?

#

no bro

faint prism
earnest phoenix
#

E n g l i s h

main chasm
earnest phoenix
#

i want msg.react 18 react any msg 1 react and 18 msg max bot not add react
@main chasm I didn't understand one thing from that

#

English please

main chasm
#

whyyyyyyyyyyyyyyyyyyyy

#

i'm english

#

but live in kurdistan iraq

quartz kindle
#

@faint prism i mean this

opal plank
#

its basically assurance that whatever comes there is always present

pliant iron
#

npm i english

opal plank
#

@quartz kindle

#

specially handy with calls

main chasm
#

npm i english v12

#

lol

opal plank
#

or html elements

faint prism
#

oh so like the <object>?.<property> in C#?

main chasm
#

npm i kurdiish v12

opal plank
#

props.getByElement('this')!

that assures that it will return so you dont have to do
if() {}

#

not quite

steep remnant
#

nice

opal plank
#

conditional chaining is different than that

#

i forgot the proper term for it

#

but im familiar with its usage

#

a.b?.c

#

that checks if b is present

#

if it is, it tries c

faint prism
#

right

opal plank
#

else it doesnt(or it would error)

#

with ! you can directly assure the compiler its there

earnest phoenix
#

@main chasm ```js
let collectorMessages = <TextChannel>.createMessageCollector(m => m.content, { max: 18 });

collectorMessages.on("collect", cMRTB => cMRTB.react("๐Ÿ‘"));```

opal plank
#

its used mostly in calls

faint prism
#

then what's the point of it?

opal plank
#

thing.get(value)

if(value) {//run code}

#

thing.get(value)!

//run code

main chasm
#

@earnest phoenix thank u so much you understand me

opal plank
#

see the point?

faint prism
#

The purpose is still eluding me

#

? - is a null-check
!() - is a logical-not
()! - ?

opal plank
#

a

steep remnant
#

what is (!)

faint prism
#

hm

#

if in the latter the database returned null

#

what would b = ?
null, yeah?

earnest phoenix
#

how to make a word command a embed

opal plank
#
var b = database.find('a'); //error database undefined
if(b) console.log(b);
//====================
var b = database?.find('a'); //no error, ? checks if database is present
if(b) console.log(b); //logs undefined/null
//====================
var b = database?.find('a')! //checks if database is avaliable, which isnt here, so it doesnt try find('a')
console.log(b)
//====================
var database = postgres
var b = database?.find('a') //checks if database is abaliable, which is is
console.log(b) //errors, b might be undefined
//====================
var database = postgres
var b = database?.find('a')! //checks if database is abaliable, which is is, then assures a exist 
console.log(b)
#

@faint prism

#

does that make sense?

faint prism
#

Did you mean to have an example where it's database.find('a')! ?

opal plank
#

its just a dummy example

#

you'd like an actual hands down example?

faint prism
#

I mean in your snippet there isn't an example where you don't use just !

opal plank
#

there is

#

does doesnt use it

#

b might be undefined

#

so it errors, though using console for this is bad

main chasm
#

@earnest phoenix bro another question

opal plank
#

cuz console can log undefined

earnest phoenix
#

abaliable

opal plank
earnest phoenix
main chasm
#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
       

         
        if(message.author.bot) return
        message.delete()

    
    if(message.content.toLowerCase() === '?start') {
      

        
        message.channel.send(' started successfuly :man_biking:')
      
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);   
     
          
        collector.on('collect', (m, col) => {
            
            
                if(m.content.toLowerCase() === '?stop' && (message.author.id === m.author.id)) {
                    console.log("Stopped.");
                    collector.stop();
                }
                else {
                    let embed = new Discord.MessageEmbed()
                        
                        .setDescription(m.content)
                        
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")
                            
                            
                    })
                
                }
                
                        
            
            
        });

// i want my code work without use ?start or any command just with name channel can u fix ?

#

when bot ready code work

earnest phoenix
#

Just remove the if statement checking for the command

main chasm
#

when i remove it i send 1 msg bot reply me 3 msg

obtuse jolt
quartz kindle
#

@opal plank so basically its the same as !important in css

#

or something similar

#

like just do that and dont check anything

opal plank
#

kinda

quartz kindle
#

ts is so weird

opal plank
#

check this vid

#

it might provide more insight than me explaining

#

timestamp already on the proper spot

#

just watch the following minute or two

quartz kindle
#

i did

opal plank
#

its that basically

quartz kindle
#

yeah and thats weird lmao

#

i mean

opal plank
#

its good for queries to make sure the compiler knows its there

quartz kindle
#

it makes sense

#

but

opal plank
#

its the same as if(!thing) return

#

ish

quartz kindle
#

its like the language is babysitting you and not allowing you to do anything, so then you have to add workarounds to force it to work

opal plank
#

it's its whole purpose though

#

guarding against human error

quartz kindle
#

thats why i dont like it lmao

opal plank
#

if you oversight something, ts might catch it for you

quartz kindle
#

you may end up spending more time fixing ts than your code

opal plank
#

its like one wise man once said, would you rather silly bugs in development or insanity inducing errors in production?

quartz kindle
#

you learn from your mistakes

proven lantern
#

ts is just a stepping stone to elm

opal plank
#

learning from mistakes in production sounds like a bad idea overall

#

in testing? sure

#

but the whole point of errors is oversight

#

you dont 'expect them'

quartz kindle
#

the worse the error the stronger the lesson

opal plank
#

and thats how you crash a production server

#

kek

quartz kindle
#

millions of people did it before, millions more will do it again

#

its part of life

opal plank
#

true

#

idk,im digging ts quite a bit

#

its also good if i go for strong typed langs

#

got a good habit of typing everything

#

tim

quartz kindle
#

adding types to djslight was a pain

#

lmao

opal plank
#

may i ask you for a favor?

quartz kindle
#

depends what lol

opal plank
#

can you peer my baseCache?

#

i legit cannot find whats causing this

main chasm
#

@earnest phoenix my code fixed>?

opal plank
quartz kindle
#

idk

opal plank
#

so no?

gaunt kestrel
#

a!help

quartz kindle
#

i can look, but idk if i can help

opal plank
#

i know roughly where its at

#

but i cant pinpoint anything

main chasm
#

@opal plank please just help me for one code

opal plank
#

and ubuntu is a pain to attach debuggers on

#

cuz i gotta expose them somewhere, vsc debugger > everything else

main chasm
#
client.on('message', async message => {
    if(message.channel.name == "suggestions"){ 
        if(message.author.bot) return
      
        let filter = m => !m.author.bot;
        let collector = new Discord.MessageCollector(message.channel, filter);   
     
          
        collector.on('collect', (m, col) => {
            
            
                
                    let embed = new Discord.MessageEmbed()
                        
                        .setDescription(m.content)
                        
                        .setTimestamp()
                        .setTitle("Suggestion")
                        .setAuthor(m.author.tag,m.author.avatarURL({format: "gif"}))
                        .setColor('#4f65ff')
                        message.channel.send({embed}).then(embedMessage => {
                            embedMessage.react("751137346422046738")
                            embedMessage.react("751137346585493536")
                            
                })
        })      
}     
});

// now when i send one message bot send 3 message or 4 message why?

opal plank
#

the whole premise of that sounds like a bad thing tbh

#

its 100% spam

main chasm
#

no not spam

#

just suggestion

opal plank
#

it sends a message ervytime amessage is collected

#

therefore its spam

#

let filter = m => !m.author.bot;

#

this is your only filter

#

if the message isnt from a bot, it sends that embed

#

its spam

main chasm
#

but i want work without command

opal plank
#

unprefixed commands = bad

#

is that bot in multiple servers?

#

or is that only for YOUR server?

main chasm
#

no

#

just one

opal plank
#

then its fine

main chasm
#

yes only my server

opal plank
#

spammy, but fine i guess

main chasm
#

but when i send 1 message bot reply with embed send 3 or 4 message i want fix it

earnest phoenix
#

because you're making it sent 3 or 4 messages

opal plank
#

filter should already work but just to be safe doanother bot check inside

main chasm
#

because you're making it sent 3 or 4 messages
@earnest phoenix where

#

?

faint prism
#

Man, reflashing the pi OS, and it's still crashing. Now, it's not even saving mp4 footage anymore either :/
Either the SDcard or the R Pi zero is fugged

earnest phoenix
#

somewhere

main chasm
#

@opal plank do u want know why i removed prefix?

opal plank
#

i know what you trying to do

main chasm
#

cuz i can't use db

opal plank
#

you want a poll like suggesting

main chasm
#

yes

opal plank
#

you CAN use db

main chasm
#

how

opal plank
#

host the databse somewhere in a vps

faint prism
#

or use mongodb atlas

main chasm
#

brothers

#

when bot restarted

#

no need use prefix again
?

#

with datebase

#

?

opal plank
#

no

#

databases are for persistent storage

#

meaning it doesnt lose its values

#

just require those values on startup

obtuse jolt
main chasm
#

yess i want it but mongodb free? cuz i want only my server work

#

thank u for all

#

i understanded

misty sigil
#

mongodb is free

faint prism
#

yess i want it but mongodb free? cuz i want only my server work
@main chasm yep, atlas is

dusk vault
#

Hey, I have a web dashboard for my sharded bot. I have to make requests to said bot for fetching the role ids and names in a particular server for the auto roles section. Currently I'm using broadcastEval to fetch a list of roles of every server that matches the target id on each shard, then filtering out the empty results and grabbing the first value. This works, however if the specific shard for that guild is offline, or hasn't been started yet, it will obviously fail and return undefined for the server. I got around this by making it default to an empty role array.
My question is this. Is there a better way to do this? The ideal would be to have a separate client instance for the dashboard that receives no events, but can still use the api to fetch the roles, etc (no cache). Is there any way to achieve that with a sharded bot?