#development

1 messages · Page 1049 of 1

crimson jetty
#

You are trying to get a token from config variables while it is not on heroku

slender wagon
#

do not use heroku nor glitch
@earnest phoenix they work so there is no problem

earnest phoenix
#

how do you know if you didnt log it

crimson jetty
#

I'm using Heroku though @earnest phoenix

earnest phoenix
#

no they do not

slender wagon
#

but i've done it before and it did work

crimson jetty
#

@slender wagon I guess that you use your token with config variables on Heroku

slender wagon
#

how do you know if you didnt log it
@earnest phoenix i do log in if i just put the token in there

crimson jetty
#

Like using process.env

earnest phoenix
#

they both made statements they're going to start removing projects using uptimer bots to keep the project alive

slender wagon
#

u can't use uptimers on heroku

#

stop the nonsense

crimson jetty
#

If so, configuration variables are only accessible when on Heroku

sudden geyser
#

Heroku is not meant for hosting Discord bots. It's meant for websites, similar to Glitch.

slender wagon
#

umm i'll give it a try but i remember it working very well on my pc

crimson jetty
#

So if you don't have your keys in process.env, it won't retrieve them

earnest phoenix
#

@earnest phoenix i do log in if i just put the token in there
@slender wagon
how do you not understand that all you need to do is log the token variable

crimson jetty
#

@sudden geyser But at least it is free

sudden geyser
#

free is cool but not always

crimson jetty
#

@slender wagon Yea because you had your token written in the code

slender wagon
#

no i didn't

crimson jetty
#

Weird

earnest phoenix
#

im really wondering how are these people making bots and getting bot dev roles without knowing language fundamentals 💀

crimson jetty
#

@earnest phoenix wdym

slender wagon
#

im really wondering how are these people making bots and getting bot dev roles without knowing language fundamentals 💀
@earnest phoenix go wonder somewhere else

#

stop being toxic

crimson jetty
#

Anyone can make whatever he wants

sudden geyser
#

Grainger did you try logging your .TOKEN property/variable to see if the token actually exists

crimson jetty
#

You make a bot using a programming language = you're the dev of the bot

slender wagon
#

Grainger did you try logging your .TOKEN property/variable to see if the token actually exists
@sudden geyser that's all i needed thank you gonna try that out

sudden geyser
#

yes that's what cry has been telling you

earnest phoenix
#

not like i told you to do that 3 times

slender wagon
#

yeah didn't understand it in the first place

earnest phoenix
#

which means you lack knowledge of language fundamentals

#

we love seeing a good help vampire

slender wagon
earnest phoenix
#

i am well aware

#

do not throw rules at me when you yourself do not know your language basics and then you're getting passive agressive because someone wants you to do a bit of logical thinking

#

but you do you

crimson jetty
#

Btw is there python developers here?

earnest phoenix
#

i guess

#

there are

#

a ton

crimson jetty
#

yea but online rn

pure lion
#

sup so how do i make a message reaction edit a message? it updates when the collector closes (using awaitReactions)

slender wagon
#

do not throw rules at me when you yourself do not know your language basics and then you're getting passive agressive because someone wants you to do a bit of logical thinking
@earnest phoenix not understanding what u said doesn't mean i don't know the "basics" now stop the "you are dumb" thingy

earnest phoenix
#

you do you boo

#

i never said you were dumb

crimson jetty
#

Which language? @pure lion

slender wagon
#

Token comes out as undefined

crimson jetty
#

Yea so that's why @slender wagon

earnest phoenix
#

im telling them to log their token in order to see if it exists in the first place
@earnest phoenix

crimson jetty
#

you don't have your token in process.env for now

earnest phoenix
#

if it does then you know the file is being read properly and you can progress onto comparing the token to the actual token on the developers page
@earnest phoenix

crimson jetty
#

If you had put them in config variables on Heroku you should deploy to Heroku and see if it works

#

Or put the token in the code while you're developing it

pure lion
#
        help.awaitReactions((reaction, user) => user.id == msg.author.id && (reaction.emoji.name == '👈' || reaction.emoji.name == '👉'),
        { max: 5, time: 30000 }).then(collected => {
                if (collected.first().emoji.name == '👉') {
                    help.edit(helpembedPG2)
                    console.log('working')
                } else if (collected.first().emoji.name == '👈') {
                    help.edit(helpembedPG1)
                    console.log('works')
                }
        })

this boi

#

it works only when the collector closes

crimson jetty
#

Sorry don't know about discord.js

pure lion
#

fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

slender wagon
#

chill budy

earnest phoenix
#

doesn't the collector have events

pure lion
#

uhhh

sudden geyser
#

They're probably looking for .createReactionCollector

#

and yes events for that thing

pure lion
#

im gonna go docs

slender thistle
#

Btw is there python developers here?
@crimson jetty what's up

crimson jetty
#

@slender thistle Can we run our bot in another thread?

#

Like I wrap all of my bot in a function and I do threading.Thread(targer=the_bot)

slender thistle
#

bs guess from someone who never played with threading, I'd say yes you can

crimson jetty
#

Hmmm

slender thistle
crimson jetty
#

Or if there is another way of running two bot at the same time?

slender thistle
#

client.login

#

instead of client.run

crimson jetty
#

Ooow

#

It will run the bot and be non-blocking?

slender thistle
#

Last time I tried it worked fine (which was 3 years ago)

#

login isn't blocking, run is

crimson jetty
#

Ok nice

#

Lemme try and I'll come back

#

(In fact I was looking for dark multiprocessing stuff to make it run so if I just need to change client.run to client.login it would be great)

slender thistle
#

declare

client1
client2

client1.login
client2.run

#

probably

crimson jetty
#

Yep that's exactly what I'm trying

#

Well I have my two bots wrapped (in two separate files) in a function

#

In the first one I have client.login()

#

The second one client.run()

#

And I'm running them both from an external script

quartz kindle
#

@marble juniper there should be

marble juniper
#

there isnt

#

its just undefined

#

using your discord.js light btw @quartz kindle

pure lion
#

ok basic rundown:
mongoose xp system
schema: (per user)

const userSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: {type: String, unique: true, index: true},
    userID: String,
    xp: Number,
    level: Number,
    enabled: Boolean
})

what i want:
to be able to derive an xp/levelling system with a leaderboard BUT im not sure of how i would get that kind of info using that^

quartz kindle
#

@marble juniper works for me, what version and what client options?

marble juniper
#

uh

#

wait

gray zealot
#
if (message.content === `${prefix}start`) {
        const channel = client.channels.cache.get("731314888835727490");
    if (!channel) return console.error("The channel does not exist!");
    channel.join().then(connection => {
        // Yay, it worked!
        console.log("Successfully connected.");
    }).catch(e => {

        // Oh no, it errored! Let's log it to console :)
        console.error(e);
    });

is there a way it could join by channel name? not id?

#

:d

pure lion
#

what is the context of this

gray zealot
#

joining a vc

#

if u type start

pure lion
#

do you have a db?

gray zealot
#

nopee

#

lol

pure lion
gray zealot
#

ok?

pure lion
#

check the pins in #quick.db

#

do da shit

#

come back here

crimson vapor
#

You don’t need a db if you aren’t storing any data

pure lion
#

shhhh

#

its for ease of access when they want to expand across guilds

crimson vapor
#

It is VERY good to have one but it’s unnecessary

pure lion
#

better do it now than later

crimson vapor
#

True

pure lion
#

ik

#

not gonna use it for the command x)

#

just filter by name == messsage content

#

eg aa!start testing-2

tulip ledge
#

Is Tim still here?

pure lion
#

tim has ascended

tulip ledge
#

Damnit I wanted to show his boss I made 😦

pure lion
#

what

tulip ledge
#

I'm working on an RPG Game Bot Thing and I made a boss out of some discord members here

#

And Tim is one of them

pure lion
#

ohh thats epic

#

can i see?

tulip ledge
#

Well I'm trying to

#

But the thing is

#

My bot requires you to party up with at least 1 user

#

And the other user is not accepting

#

So if he accepts I'll show

pure lion
#

il be the other user?!

#

oh ok

tulip ledge
#

The project is still "secret" like in only a select few are allowed to test

#

I'm sorry 😦

pure lion
#

its fine i understand :D

tulip ledge
#

We are going into closed beta soon tho so if ur interested DM me 😉

pure lion
#

:o

#

So um

#

ok basic rundown:
mongoose xp system
schema: (per user)

const userSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: {type: String, unique: true, index: true},
    userID: String,
    xp: Number,
    level: Number,
    enabled: Boolean
})

what i want:
to be able to derive an xp/levelling system with a leaderboard BUT im not sure of how i would get that kind of info using that^

tulip ledge
#

He finally accepted

pure lion
#

LMAO THATS PERFECT

tulip ledge
#

it's kinda messed up it should say Tim Big Brain lost 500 HP

#

No pls dont

#

Dont starboard it

#

I told u it was a "secret" project

pure lion
#

o ye sorry

tulip ledge
#

I deleted it

pure lion
#

<><><><

marble juniper
#

u should do nothing

#

in that section

#

you can ignore OAuth2

#

as well as Rich Presence and App Whitelist

#

Just ignore those

#

@earnest phoenix no to add the bot to your server you don't need OAuth2

#

use this

celest schooner
#

Rip free hosting

marble juniper
#

you will need the client id

#

@celest schooner just buy a vps the cheapest ones are mostly 4.99 or 3.99

earnest phoenix
#

OmAr GooD GaMe❤#0323

#
The Prefix Is #

Requested By : @marble juniper

#

OmAr GooD GaMe❤#0323

marble juniper
#

you can try using contabo as thier offers are pretty good

celest schooner
#

Ik but I’m just saying

earnest phoenix
#
The Prefix Is #

Requested By : @iron tendon

#

OmAr GooD GaMe❤#0323

#
The Prefix Is #

Requested By : @iron tendon

restive hound
#

lol

celest schooner
#

I’m just running my computer 24/7 rn

marble juniper
#

@flat pelican we have a selfbot

celest schooner
#

yooooo

#

self bot

flat pelican
#

lol

#

Marco more speedy sadcowboy

celest schooner
#

#help

#

lol self bot

marble juniper
#

marco has sbeed

crimson jetty
#

Ok it didn't work

marble juniper
#

@crimson jetty what didn't work

crimson jetty
#

@slender thistle

misty sigil
#

What

#

why did you ping Shiv

celest schooner
#

I’m gonna probably get digital ocean

crimson jetty
#

No talking about something else @marble juniper

marble juniper
#

can you just give context then we help idk

crimson jetty
#

I succeeded now so it's fine

#

Found another solution

marble juniper
#

so why did you ping

misty sigil
#

no

celest schooner
#

uh that’s why you don’t copy code

crimson jetty
#

@marble juniper Was talking about putting a bot in another thread

marble juniper
#

@earnest phoenix no nobody will code it for you you just gotta learn

misty sigil
#

uh that’s why you don’t copy code
@celest schooner ^

earnest phoenix
#

link you fucker

crimson jetty
#

So that I can run two bots at the same time

marble juniper
#

@earnest phoenix what the fuck do you want

earnest phoenix
#

yes

celest schooner
#

rem and ram

marble juniper
#

what

#

yes

crimson jetty
#

@earnest phoenix Then learn

marble juniper
crimson jetty
#

There is plenty of tutorials on the internet

#

Nooo

celest schooner
#

dude

marble juniper
#

Use the one I sent you since it eplains everything and is up to date @earnest phoenix

celest schooner
#

Code ur own commands

marble juniper
#

read it

#

then come back

crimson jetty
#

@celest schooner Yea you right

marble juniper
#

for questions incase you have some

#

@celest schooner he is just learning lol

celest schooner
#

ig but copy and pasting not gonna help

marble juniper
#

and then I already see the common stuff

#

copy paste

#

and then most importantly

pure lion
#

ok basic rundown:
mongoose xp system
schema: (per user)

const userSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: {type: String, unique: true, index: true},
    userID: String,
    xp: Number,
    level: Number,
    enabled: Boolean
})

what i want:
to be able to derive an xp/levelling system with a leaderboard BUT im not sure of how i would get that kind of info using that^

marble juniper
#

he fucking asked someone to code his bot

#

smh

crimson jetty
#

yea bruh

pure lion
#

h e p l

marble juniper
#

if he wants to have someone code it for him he can pay money if he wants to

#

incase he has a lot

celest schooner
#

ok basic rundown:
mongoose xp system
schema: (per user)

const userSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: {type: String, unique: true, index: true},
    userID: String,
    xp: Number,
    level: Number,
    enabled: Boolean
})

what i want:
to be able to derive an xp/levelling system with a leaderboard BUT im not sure of how i would get that kind of info using that^
@pure lion Try first?

crude cedar
#

.

celest schooner
#

Wait nvm

pure lion
#

@celest schooner i know its not going to work-

celest schooner
#

I read the last sentence

#

I’m supposed to be learning MongoDB but I’m golfing

pure lion
#

fuck

slender thistle
#

@crimson jetty what's up

celest schooner
#

the sky

pure lion
#

i want to learn mongodb because """""reasons""""" (aka nosql so i understand data structures)

celest schooner
#

I want to learn MongoDB so I can stop using enmap

pure lion
#

giant steps

#

from the simplest and smallest to literally overkill * 7

#

what

tight plinth
#

whats the best way to somehow implement premium to a bot?

pure lion
#

as in a subscription?

tight plinth
#

ye

#

i tried with patreon but i dont understand anything

pure lion
#

ok basic rundown:
mongoose xp system
schema: (per user)

const userSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: {type: String, unique: true, index: true},
    userID: String,
    xp: Number,
    level: Number,
    enabled: Boolean
})

what i want:
to be able to derive an xp/levelling system with a leaderboard BUT im not sure of how i would get that kind of info using that^
@pale vessel

#

okay i need to go to mobile rn brb

pale vessel
#

just use updateOne with the upsert option

pure lion
#

I know how to implement the xp

pale vessel
#

mkay

pure lion
#

I'm just confused as to how I would get a leaderboard

strange trout
#

You want to get a leaderboard from the database?

#

Ah

pure lion
#

Yeah

#

Map by guild ID?

#

But then how would I do it properly :////

strange trout
#

Select all the users from that guild and order by xp ascending

pale vessel
#

use find(filter)

#

something like find({ guild: guildID })

#

that would return an array of members from that guild

#

you can then map them

pure lion
#

So I create a "profile" for each user that holds exp, levels, the user ID and guild ID

pale vessel
#

yeah

pure lion
#

So document for each user?

pale vessel
#

mhmm

pure lion
#

And the data structure looks good enough?

pale vessel
#

yep

pure lion
#

Because I'm not sure if I had to use the user ID as a second index when I wanted to add exp to the user

#

Ok thanks flaz

crimson jetty
#

@slender thistle Succeeded by running them asynchronously (I tried before but definitely didn't do the right things) as suggested on a GitHub Issue

#

I'm dumb I kept searching 'discord.py on another thread' on Google instead of simply 'running two bots with discord.py'

slender thistle
pale vessel
#

@pure lion yes, you need to have user id as second index so that you can find it

#

find({ guild: "264445053596991498", member: "590455379931037697" })

#

unless your leaderboard is global

pure lion
#

Na it's not

pale vessel
#

then you would only need user id

pure lion
#

Yeah I got that

pale vessel
#

you're set then

pure lion
#

So I just make both guild ID and user ID the unique and index thing?

pale vessel
#

yeah

pure lion
#

Okokokok

#

If it's unique wouldn't I lose the ability to add the same member to multiple guilds?

crimson vapor
#

I’m not sure exactly what you are talking about but I assume since you are using guild and user ids, you wouldn’t lose the ability

pure lion
#

Okay, thanks

digital ibex
#

@tight plinth if ur still trying to figure it out, use stripe

tight plinth
#

stripe?

digital ibex
#

yeah

tight plinth
#

does it work without any cc tho

digital ibex
#

im not sure if they take a percentage or anything, but i've heard its good and companies use it

#

not sure

#

companies like discord i believe

pure lion
#

Hey lost, just wanna say thank you for your contributions to this server, it's really helped me become a better developer in the long run :>

digital ibex
#

:D

pure lion
#

:D

tight plinth
#

@digital ibex k so i created my stripe acc & stuff (created a product) but i dont see any button for api docs nekohmm

pale vessel
tight plinth
#

and i dont get how should people actually pay

digital ibex
#

1 sec, i've never used it so i'll have a look into it

#

ok im back, @tight plinth you're using js right?

tight plinth
#

Yes

#

You're lucky I'm still awake lol

digital ibex
#

what in particular u tryna do?

tight plinth
#

When someone donate, I store their discord data into a db and then do things with it

#

I mean, like every bot premium function does

digital ibex
#

oh alright

#

@tight plinth ^^

earnest phoenix
#

I want list of all bots to join them into my server <@&304313580025544704>

slender thistle
#

Disgrace

modern sable
#

ty for muting

slender thistle
#

Ty Parm for the great mute

proven lantern
#

when our bots are approved are they automatically added to this discord server?

earnest phoenix
#

Yes, also that question would best go in #support

#

anyone else use Google cloud to host by chance and would happen to know how to get FFmpeg onto it? 😂 it wont run ! CryNerds

proven lantern
#

how are you trying to do it now? i use google cloud

sonic lodge
#

hi, my bot has a command that takes a few seconds to run because of a lot of processing behind the scenes

#

unfortunately while this is happening, my bot ignores any other commands you enter until the first command has finished, which i think will get a lot worse when my bot joins more and more serverso

#

what do i do to fix this?

earnest phoenix
#

if the language you're using is multithreaded - offload it to another thread

sonic lodge
#

is this possible with node

#

i'll look it up ig

earnest phoenix
#

its possible but a pain

sonic lodge
#

oh lords

earnest phoenix
#

yeah node is singlethreaded

sonic lodge
#

are there any other options i have?

earnest phoenix
#

other than using another language which takes use of multithreading, i suggest doing research on worker threads

sonic lodge
#

ooh that seems quite useful

#

thanks for the advice, i'll take a look

limber swan
#

Im tryint to do a dashboard.
Using passport express discordjs
How can I get the user profile avatar in ejs

sick cloud
#

so i have this div here that i push content into
when it hits the end and has to scroll, how do i force it to stay in the div and make the div have a scrollbar, instead of the actual entire page having to scroll

pine falcon
#

Hi I am juice wrld

sudden geyser
#

hello

woeful void
#

Hello

valid frigate
#

ok so basically guys i am making a bot in rust and i am trying to figure out how to iterate over commands in an array and call a function from it

this is my main.rs

    fn message(&self, ctx: Context, msg: Message) {
        let cmd_text = match remove_first(&msg.content) {
            Some(t) => t,
            _ => {
                return
            }
        };
        match cmd_text {
            "ping" => {
                PingCommand::r(&ctx, &msg)
            },
            "bruh" => {
                BruhCommand::r(&ctx, &msg)
            },
            _ => {
                return
            }
        }
    }
#

and this is one of the commands

pub struct PingCommand;

impl CommandRun for PingCommand {
    fn return_details() -> Command {
        Command {
            name: String::from("ping"),
            description: String::from("Ping the bot")
        }
    }
    fn r(ctx: &Context, msg: &Message) {
        if let Err(why) = msg.channel_id.say(&ctx.http, "Pong! (from ping.rs)") {
            println!("Problem sending ping command: {:?}", why);
        }
    }
}
#

this is the definitions for Command and CommandRun

pub struct Command {
    pub name: String,
    pub description: String
}

pub trait CommandRun {
    fn return_details() -> Command;
    fn r(ctx: &Context, msg: &Message);
}
#

only problem is when i try to do this something weird happens

#

actully same goes for ::

#

so question is how can i make return_details and r available in this for loop

earnest phoenix
#

So

#

@earnest phoenix No the files aren't visible to the owner. but if they were previously comitted. they need to be deleted. as I'm pretty sure git will still pay attention to them

#

well i made a .gitignore file

#

didnt hide the files

#

and discord went all crazy on me

#

say I comitted the file index.js right. But later on add it to gitignore that index.js would stil be tracked

#

i see

#

You have to delete it. commit the change. then you can create the file again, and it wont be tracked

#

the gitignore right? I cant update it?

#

No, You can update that all you wanna

#

im confused then, why isnt my files being hidden

#

config.json
src/lib.js
src/Constants.js
src/Helper.js
commands/owner/*
node_modules/*
src/*

#

this is whats inside it

#

added src/* for gitignore to update, didnt work

#

It should be. weird

#

Try deleting src. comitting it. then add it back

#

ill first delete gitignore since i created it first then added the files

#

if not, ill do your method

#

imma eat so brb

lusty quest
#

if you use node.js Math.random() is maybe then thing you look for

earnest phoenix
#
Math.floor(Math.random() * maxNumber)
#

You can make a notepad and type this:

echo off
cls
echo Starting Bot
node .
pause
#

Then rename the notepad file to whatever you want and add .bat

#

No

#

You got an error

#

Show me the code your error come from

warm marsh
#

That's not how to make a random int.

sudden geyser
#

What are you trying to do with {{ randint 8 }}

warm marsh
#

Learn JS?

sudden geyser
#

I am the one and only Lite.

crimson vapor
#

we gave him Math.floor(Math.random() * 100000) in testing 1

warm marsh
#

It's working.

#

You've got a code problem, Nothing to do with .bat file.

dusky marsh
#

Learn how to actually code before coming here looking for free handouts. You obviously don't know what you are doing. Can't help copy pasters

#

Then learn else where, we are not teachers, we are merely support. There a multitude of places to learn on the internet

#

No here is gonna hold your hand, it's against the rules to spoon-feed :)

sudden geyser
sick cloud
#

uuuuh
i have some dumb code at the moment (see below)
are there any good modules for random id gen that aren't huge and poorly made

opal plank
#

uuid

#

v4

sick cloud
#

isn't uuid a fairly big library

opal plank
#

¯_(ツ)_/¯

sick cloud
#

but i was wondering if there's anything smaller

opal plank
#

prob is, but its rather good and practical

#

thats my go-to

lusty quest
#

i use crypto for generating random IDs

warm marsh
#

nanoid is another.

ember lodge
#

How do I get the best ping?

#

My bot's server are from SFO

viral nimbus
#

Well, there’s a few simple ways, lower the amount of devices and intensity of those devices using the connection, it’ll help when your bot is peaking and to place it on an optimal server setup, a good computer that can dedicate an appropriate amount of resources to decrease its own time in the equation.

#

However, I’m not professional and I’m sure someone can provide a much better explanation

lusty quest
#

what ping did you currently have?

ember lodge
#

@viral nimbus thanks, but my bot haves a good VPS with good RAM and space

lusty quest
#

its not really hardware bound, its location bound

ember lodge
#

I have 72.3

lusty quest
#

thats pretty decent for a Bot

#

i have about 100

ember lodge
#

I saw some bots with 23

lusty quest
#

to get it lower you need to know where the nearest Discord API server is

#

then try and get a VPS in a nearby datacenter in best case in the same

#

so you can get a lower ping to the API

ember lodge
#

Where are the servers located?

lusty quest
#

idk

ember lodge
#

Thanks

earnest phoenix
#

How to make command but only owner

pale vessel
#

compare author id

earnest phoenix
#

can someone help me

pale vessel
earnest phoenix
#

@pure lion

#

can sumone help me with discord py

pale vessel
#

did you just

#

please just ask otherwise no one would answer you

clever vector
#

Yo guys

pure lion
#

Why did you ping me of literally everyone in the server

clever vector
#

No?

pure lion
#

@pure lion
OrientedCub#5181

clever vector
#

Ohh

vernal vapor
#

How does one make a setchannel command on PY so that if the user sets the says !setchannel #development then it can only be used in that specific channel

pure lion
#

Do you have a database

vernal vapor
#

Yes

pure lion
#

Is it sql or nosql?

vernal vapor
#

sqllite

pure lion
#

Okay all you wanna do is store the command name and a channel ID, and maybe a true/false value checking if it's only enabled in that channel.

vernal vapor
#

O ok ty

earnest phoenix
#

How to send an http request?

restive furnace
#

use http client

#

like axios, get, http(s), request (deprecated) or any other. (i assune you're using node)

earnest phoenix
#

i tried http.get but it throws an error

#

Yeets an error

#

Not throw

#

Cool kids

restive furnace
#

just use other client

spare mirage
#

I bet dice gets the most pings lmao

pure lion
#

I do

#

Jk it's Tim x)

#

3k for him, 700 for me

#

Lol

blazing ravine
#

who can help me with args

pure lion
#

Args[0] = command name

blazing ravine
#

oh i need use 1

pure lion
#

Yeah

blazing ravine
#

why quick.db not work in heroku its not possible to edit db file from github ?

mystic fulcrum
#

can sumone help me with discord py
@earnest phoenix i can

lusty quest
#

quick.db is a sqlite Database and it stores everything in a sql file. If you restart heroku iirc everything gets deleted and pulled from github again @blazing ravine

glossy elk
#

How do I get the custom status of a user reply with mention kk thanks

blazing ravine
#

yes

#

deleting

#

its no way to safe them ?

mystic fulcrum
#

I use json as database lmao

marble juniper
#

buy a vps lol

lusty quest
#

i guess you need to download the sql file every time before your stop or restart

#

or use a Proper database like MongoDB or mysql

marble juniper
#

wdym by proper

blazing ravine
#

@marble juniper

#

i buy u pay ;ddddd

marble juniper
#

no

blazing ravine
#

yes yes ;d

marble juniper
#

you can get a vps for like

#

3.99

lusty quest
#

i dont consider SQLite Databases as a fully usable database solution its just a more stable Json DB

marble juniper
#

k

blazing ravine
#

@marble juniper expensive

marble juniper
#

its not

#

3.99 a month

#

thats nothing

lusty quest
#

@blazing ravine you can get a Free MongoDB database

blazing ravine
#

how

glossy elk
#

How do I get the custom status of a user reply with mention kk thanks
@glossy elk

lusty quest
#

google it

blazing ravine
#

but i dont know how to use

lusty quest
#

well you can learn it

glossy elk
#

@lusty quest wdym google it

lusty quest
#

not you

glossy elk
#

I was about to say

#

This channel exists for a reason

#

Not just to “google it”

lusty quest
#

this channel here also has to follow some rules

glossy elk
#

No

blazing ravine
#

@marble juniper can u send me link for vps

glossy elk
#

We have to follow the rules

marble juniper
#

check the pins

glossy elk
#

Not the channel

marble juniper
#

also wait gimne a sec @blazing ravine

blazing ravine
#

oki

marble juniper
#

I suggest this

glossy elk
#

There is a free VPS with 350 MB

marble juniper
#

for people who are broke this is good

glossy elk
#

If you want

marble juniper
#

lol

lusty quest
#

@glossy elk you can get the presence of a Guild member

#

over this the activity

glossy elk
#

Library of code

marble juniper
#

I recommend the 4.99 vps

#

but you can also use the 3.99 one ofc

glossy elk
#

If he is break af then he should use the free one

lusty quest
marble juniper
#

k

glossy elk
#

Which would be library of code

#

If you want the link just dm me @blazing ravine

marble juniper
#

still I suggest buying one if ya got the chance

blazing ravine
#

thanks

marble juniper
#

it really helps

#

lol

#

to have a vps

glossy elk
#

@lusty quest 👍

blazing ravine
#

@marble juniper

#

i have a problem

glossy elk
#

🤔

#

Please just state the problem

#

Without clarifying that you have it

marble juniper
#

@blazing ravine just say the problem bruh

blazing ravine
#

ads links xd

glossy elk
#

One question

#

Who asked?

blazing ravine
#

i cant buy bcs minimum 5$ for withdraw

pure lion
marble juniper
#

you know this is for development right

#

I see you developing backwards

glossy elk
#

^

#

And I see my brain cells

#

Getting removed

blazing ravine
#

i see

pure lion
#

Developing into a retard

blazing ravine
#

nasa

#

satellite

lusty quest
#

the braincell thing is normal in this channel here

glossy elk
#

Don’t

pure lion
#

Yeah I'm developing 8)

glossy elk
#

Don’t try to explain

#

The mene

#

Meme*

marble juniper
#

Just don't

pure lion
#

M e n e

marble juniper
#

M e n e

#

kinda sadie

glossy elk
#

Did you just become my auto correct

pure lion
#

Yes

glossy elk
#

Dum ping

#

😭

restive pebble
#

kek

glossy elk
#

Cum ping

pure lion
#

Dum oing

glossy elk
#

Fuck

restive pebble
#

kek

marble juniper
#

cum

wet dove
#

Please keep this channel on-topic.

restive pebble
#

read up

glossy elk
#

Shit

#

Fatina came in

#

And the party was over

#

Back to what I was saying

pure lion
#

xp systems

glossy elk
#

No

pure lion
glossy elk
#

Stop dive

#

Dice

#

Use a database

pure lion
#

No

#

I am

#

Using a database

glossy elk
#

Which

pure lion
#

Mongoose

#

Because I'm not a scrub

#

8))

restive pebble
#

off

glossy elk
#

I rather use a simpler fb

#

DB

#

For levels

pure lion
#

I wouldn't

restive pebble
#

json

#

x)

glossy elk
#

I use SQLite

#

😆

pure lion
#

x)

#

More like slowlight amiright

glossy elk
#

No but fr I use it for levels

pure lion
#

Ok

glossy elk
#

And yh

#

So use SQLite

pure lion
#

I only want one dB for my project 😄

lusty quest
#

JsonDB is bad for level systems bcs of the on of Writes and reads

glossy elk
#

I’m

#

Yes

pure lion
#

Hello yes

lusty quest
#

sqlite is fine but gets annoying on larger servers

glossy elk
#

If you want a simple db

#

Just use firebase

pure lion
#

No

glossy elk
#

It’s super simple and easy

pure lion
#

I'm using mongoose

#

.

glossy elk
#

And

pure lion
#

You can't change my mind

glossy elk
#

Holds tight for once you get larger

marble juniper
#

Is this gonna be a conversation about which db to use again

pure lion
#

Yes

glossy elk
#

No

#

I’m explaining what I’ve chosen

marble juniper
#

k

pure lion
#

LALALAALALAL NOSQL IS THE BEST (imo)

earnest phoenix
#

anything is fine as long as it isn't a file collation

marble juniper
#

im excited for the heat

glossy elk
lusty quest
#

firebase is NOSQL btw @pure lion

pure lion
#

Idc

wet dove
#

Stop fighting on which database to use.

#

Last warning, keep this channel on-topic.

pure lion
#

Okay

marble juniper
#

yes smh

glossy elk
#

I was explaining what db I use and why I like it

#

Smh

pure lion
#

im just waiting for a package to install it's been like 5 minutes

glossy elk
#

Either way

gray finch
#

That's why nosql sux

pure lion
#

You do you 😄

gray finch
#

Well the true is

#

I never heard of it

pure lion
#

...

glossy elk
#

what I have done is put my levels to SQLite and I’ve mapped each user and ordered it from uh higher to lower

marble juniper
#

did you order it from iq

glossy elk
#

🤔

pure lion
#

Yeah I got it, just search for the guild ID and map the user ID => username + xp

#

:D

clever vector
#

Can I invite my bot here???

pure lion
#

Do you have 4 weeks to spare?

clever vector
#

??

glossy elk
#

@clever vector yes you can but what he is trying to say that the process will take a bit

clever vector
#

Ohh

#

So

glossy elk
#

Short answer: yes

clever vector
#

I'm free

#

Like almost a day

#

Everyday

wet dove
#

-faq 1 -c if you wanna know how to add it

gilded plankBOT
glossy elk
#

But you should probably ask this in #support as this is a channel for developers to discuss development

wet dove
#

and keep this channel on topic

glossy elk
#

I never knew that command existed

#

@pure lion how exactly did you do that

pure lion
#

@glossy elk what

earnest phoenix
#

Hi, I want to delete a value from json. But it doesn't work. I using:

let json = require('./json.json')
let data = "hello"
delete json[data]```
and json is:
```json
{
"hello": {
"world": "hello"
},
"hi": {
"world": "world"
}
}```
slender thistle
#

re-save the file after you delete the value

earnest phoenix
#

Let me try, thanks

pure lion
#

Also why am I the person that gets randomly pinged now :/

pale vessel
#

it's better to use fs to read the file and JSON.parse() to parse it rather than requiring it since requiring caches the file, even if you require it again (you'd have to clear the require cache)

pure lion
#

@earnest phoenix are you using json as your database?

earnest phoenix
#

Yes

#

@slender thistle it worked thanksss ❤️ ❤️

pure lion
#

You really don't wanna do that, it's slow and corruptible

#

I'll give you the benifit of the doubt but you should consider switching to a proper db

earnest phoenix
#

It is not my bot, code sharing server's website.

#

My bot using mongodb

pure lion
#

Oh

#

Ok good u smort

#

*pat pat*

earnest phoenix
#

😄

golden condor
#

Hi, I'm tryna use my rpi for hosting something, but it keeps closing the ssh connection. Any idea why this might be?

fathom peak
#

botu nasıl 24 saat çevrimiçi yapabilirim ben denedim olmadı siz nasıl yaptınız

golden condor
#

Burada Türkçe yok.

fathom peak
#

ok

fringe axle
#
        case 'addsong':
            async function execute(message, addsong) {
                const args = message.content.split(" ");
              
                const voiceChannel = message.member.voiceChannel;
                if (!voiceChannel)
                  return message.channel.send(
                    "You need to be in a voice channel to play music!"
                  );
                const permissions = voiceChannel.permissionsFor(message.client.user);
                if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
                  return message.channel.send(
                    "I need the permissions to join and speak in your voice channel!"
                  );
                }
              }

Version: Visual Studio Code v12
Error: Not responding

tender ferry
#

Belli :p

earnest phoenix
golden condor
#

@fringe axle why are you doing a fucntion

fringe axle
#

¯_(ツ)_/¯

#

Good question

#

@golden condor any ideas how to fix it?

golden condor
#

Don't use a function

fringe axle
#

Okay

#

Still not responding @golden condor

#

Working

#

:D

#

I forgot to save xD

golden condor
#

Np

pure lion
#

supppppppppp

#
function xp(msg) {
  const Gdata = await Guild.findOne({guildID:msg.guild.id})
  if (Gdata.XP == false) return
  var prefixes;
  if (Gdata == null) {
    prefixes = 'aa!'
  } else {
    prefixes = Gdata.prefix
  }

  const newUser = {
    _id: mongoose.Types.ObjectId(),
    guildID: msg.guild.id,
    userID: msg.author.id,
    xp: 0,
    level: 1,
    enabled: false
  }

  const Mdata = await GuildMember.findOne({guildID:msg.guild.id, userID:msg.author.id})
  const newLevel = Mdata.level * 500
  if (msg.content.startsWith(prefixes)) {
    return
  } else {
    var randomInt = Math.floor(Math.random() * 10) + 15
    if (!Mdata) {
      const db = new GuildMember(newUser)
      db.save()
      console.log(db)
    } else if (Mdata) {
      Mdata.updateOne({xp: Mdata.xp + randomInt})
    } else if (Mdata.xp > newLevel) {
      Mdata.updateOne({level: Mdata.level + 1})
    }
  }
}

this is what i have for my xp func so far, is it condensable in any way?

quartz kindle
#
const prefixes = Gdata ? Gdata.prefix : "aa!";
if(msg.content.startsWith(prefixes)) return;
const Mdata = await ....findOne(...);
if(!Mdata) {
  const newUser = {...}
  const db = new GuildMember(newUser)
  db.save()
  return;
}
...
``` id do it more like this
slender thistle
#

Thanks Tim I'll blindly copy that and not edit anything and then come here to complain that it doesn't work

pure lion
#

Shiv are you trying to predict what I'd do because it's definitely not that bloblul

#

Also thanks tim

slender thistle
#

You get used to it

earnest phoenix
quartz kindle
#

looks normal

earnest phoenix
#

xd

pure lion
#

Lol I'm procrastinating launching the xp system because I'm worried

lime pumice
#

actually my bot detects the channel name how can i set it to detect channel topic?

pure lion
#
        const data = await Guild.findOne({ guildID:msg.guild.id });
        ^^^^^

SyntaxError: Unexpected token 'const'

DAFAQ

client.commands = new Discord.Collection()
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
  const command = require(`./commands/${file}`);
  client.commands.set(command.name, command)
}

AAAAAAAAAAAAAAAAAAAAAAAAAA

quartz kindle
#

show the code where you have const data

pure lion
#

i fixed it

#

just forgot to include the contents of an if statement

#

shard 0 connected... wish me luck

#
        if (!args[1] || args[1] !== 'enable' || args[1] !== 'disable') {
            msg.channel.send('Please choose wether to `enable` or `disable` `messages` or `xp`')
        } else if (args[1] === 'enable' && args[2] === 'xp') {
            data.updateOne({XP: true})
        } else if (args[1] === 'disable' && args[2] === 'xp') {
            data.updateOne({XP: false})
        } else if (args[1] === 'enable' && args[2] === 'messages') {
            data.updateOne({XPmsg: true})
        } else if (args[1] === 'disable' && args[2] === 'messages') {
            data.updateOne({XPmsg: false})
        }

this is NOT working do not stack else ifs like this its stupid please help

summer torrent
#
<Model>.updateOne({find query}, {update query})```
pure lion
#

i mean

#

it always sends 'Please choose wether to enable or disable messages or xp'

quartz kindle
#

console.log(args)

#

also, you can better divide that in sections

pure lion
#

yes please i want to do that

quartz kindle
#
if(args[1] === "enable") {
  if(args[2] === "xp") { update xp }
  else if(args[2] === "messages") { update messages }
} else if(args[1] === "disable") {
  if(args[2] === "xp") { update xp }
  else if(args[2] === "messages") { update messages }
} else {
  please chose one
}
pure lion
#

args btw

[ 'xpconfig', 'enable', 'xp' ]
quartz kindle
#

you could also use switch cases, or you can also setup some smart object relational map

pure lion
#

also why didnt i think of that

earnest phoenix
#

wtf has happened to quick.db npm install quick.dbis giving a heckload of errors

quartz kindle
#

show full logs

earnest phoenix
#

one sec

quartz kindle
#

including what comes before the errors

earnest phoenix
quartz kindle
#

python is not installed

earnest phoenix
quartz kindle
#

npm install -g windows-build-tools

tight plinth
quartz kindle
#

i wrote this a while ago to explain it```js
// get approximate CPU usage of the current proccess over a given amount of time in milliseconds
async function cpuUsage(time) {
// store current cpu timings
let startTime = process.hrtime();
let startCPU = process.cpuUsage();

// wait for a defined time in ms
await new Promise(r => setTimeout(r,time));

// get timings difference
let elapsedTime = process.hrtime(startTime);
let elapsedCPU = process.cpuUsage(startCPU);

// calculate high resolution milliseconds from process.hrtime()
let milliseconds = elapsedTime[0] * 1000 + elapsedTime[1] / 1000000;

// calculate high resolution milliseconds of CPU activity
let timings = elapsedCPU.user / 1000 + elapsedCPU.system / 1000;

// calculate percentage from cpu time and total time
let percentage = 100 * timings / milliseconds;

// return approcimate percentage of cpu used by this process
return percentage;

}

tight plinth
#

hm

#

i'll take it

#

(time set to 2000 ms)

lusty quest
#

if you add toFixed(2) to the return percentage you get only the first 2 decimals

earnest phoenix
#

python is not installed
@quartz kindle it is now

#

and npm i quick.db is taking forver

lusty quest
#

it depends on your hardware and your network speed

earnest phoenix
#

smh python and stuff wasn't on glitch and still worked fine

#

but i am temporarily self hostign the bot

lusty quest
#

they have a different way to install the needed packages

earnest phoenix
#

with my better than glitch non-boosted apps pc

#

they have a different way to install the needed packages
@lusty quest they linux me windows 7

lusty quest
#

?

earnest phoenix
#

my glitch project is using ubuntu
and my pc is windows 7

#

don't wanna upgrade to windows 10

#

wtf i needed to press enter and that's why it was stuck

#

and now more errrrrrrrrrrorrrrrrrrrs

#

F quick.db

quartz kindle
#

show errors

earnest phoenix
#

closed console

#

cloning the package.json from my github

#

and then running npm i

#

you want screenshots of those?

#

@quartz kindlep i n g o

pure lion
#

does findMany mean i can get all the documents that pass the test (aka i wanna make a leaderboard/rank system)

earnest phoenix
#

i installed python twice but it still says python isn't there

pure lion
#

also i like how ive been here for like 4 months and have a just under third of the amount of pings tim has

slender thistle
#

findMany({'id': 'mylovelystring'}) should return an array of all documents found with id key and mylovelystring value

pure lion
#

sickkkk thanks shiv

slender thistle
#

i installed python twice but it still says python isn't there
where are you installing Python

earnest phoenix
#

the windows installer

slender thistle
#

Are you adding Python to PATH

earnest phoenix
#

lemme screenshot my console

#

Are you adding Python to PATH
@slender thistle no

#

lemme resintall

slender thistle
#

There you go

earnest phoenix
#

and i also ran npm i python

slender thistle
#

... python isn't an npm package, is it?

earnest phoenix
#

idk

#

smh

pure lion
#

YOOOOOOOOOOOOO MY XP SYSTEM DOES||NT|| WORK

earnest phoenix
#

it installed

slender thistle
#

yeah no that's not a Python interpreter

earnest phoenix
#

YOOOOOOOOOOOOO MY XP SYSTEM DOES||NT|| WORK
@pure lion YOOOOOOOOOOOOOOOOO MY ECONOMY SYSTEM WORKS BUT QUICK.DB DIES EVERY FIVE SECONDS

#

removing the entire python installation and i swear i will kill myself if i forget to add it to PATH

#

@slender thistle am i doing this right

slender thistle
#

maybe

#

Screenshot the installer

earnest phoenix
#

wtf

quartz kindle
#

is it the same python not found error?

earnest phoenix
#

i haven't reinstalled yet

#

i don't get this why does a javascript library quick.db require python

#

i am scared of snake languages

#

pretty_sure_everybody_writes_python_like_this

slender thistle
#

I mean, it's down to preferences

earnest phoenix
#

you want the screenshot

slender thistle
#

but for consistency, I use snake case

earnest phoenix
#

i uninstalled then i'm halfway through installing with adding to PATH

#

and what is PATh ❓

#

Why if i run the prefix command the bot don't respond but data is being created everytime in db?

Code :

#

allow me to fix dis

slender thistle
#

path to system variables so if you do python, the command prompt will search for python.exe somewhere

earnest phoenix
#

if you write non-english sorry but i can't help

slender thistle
#

instead of you having to run C:\Users\Program Files\xxxxxxxxxx\python.exe

quartz kindle
#

quick.db requires better-sqlite3, which is built on top of the SQLite3 database. SQLite is made in the C language, so it requires a compiler, to be built specifically for compatibility with your machine

#

node.js uses node-gyp as the compiler, to build these programs that are made in C and C++

delicate shore
#

hey

#

i wanna allow

quartz kindle
#

and node-gyp is built on python

delicate shore
#

specific commands

quartz kindle
#

thats why installing quick.db requires python and windows build tools

earnest phoenix
#

python is a snek vibe

delicate shore
#

in only the servers

#

which i set

earnest phoenix
#

your message is split in three

delicate shore
#

i wanna allow few commands
in only the servers
which i set

earnest phoenix
#

thats why installing quick.db requires python and windows build tools
@quartz kindle wait windows build tools

slender thistle
#

in commands, use if message.guild.id === "ID OF YOUR GUILD"

delicate shore
#

no

#

i wanna enter

#

in bulk

earnest phoenix
#

why

delicate shore
#

because

#

it's premium feature

slender thistle
#

a global array to use .includes(message.guild.id) on

earnest phoenix
#

quick.db is gud

#

lemme type it all out

delicate shore
#

k

#

thanks

#

for typing all pout

#

out*

slender thistle
#

no spoonfeeding

delicate shore
#

lmao

#

hmmm

earnest phoenix
#
//You run npm i quick.db in the console before hand
const db = require("quick.db");
//when something happens
db.push("premiumGuilds.guilds",GUILD ID THAT YOU GOTTA FIGURE OUT BOY);
if (db.has("premiumGuilds.guilds",message.guild.id) {
    //smth
} else {message.reply("you need premium buddy")}
#

no spoonfeed i did

#

only explained what you asked

delicate shore
#

o

#

ok

#

so

#

i wanna make a command that creates data in that

#

it will be like this

earnest phoenix
#

?

#

deleted

#

also no spoonfeed

#

just ask for methods of doing stuff not "hey can you do this"

#

show me your code

delicate shore
#
if(command === "activate"){
 const owners_id = ["587663056046391302"];
    if (!owners_id.includes(msg.author.id))
      return msg.channel.send("You not owner boi");
    let premium = db.get(`premium_${msg.guild.id}`)
 db.set(`premium_${msg.guild.id}`, args[1])
  await msg.channel.send(`This Server id is now has access to premium features : ${args[1]}`)
    }
}```
#

i will do server id

#

like

#

s!activate server id

earnest phoenix
#

const owners_id will stay only till your bot is on. PS you are resetting it to ["587663056046391302"] every time someone runs it

delicate shore
#

const owners_id will stay only till your bot is on. PS you are resetting it to ["587663056046391302"] every time someone runs it
@earnest phoenix what?

earnest phoenix
#

wtf why are you using variables for quick.db KEKW you can straight do db.get

delicate shore
#

hmmm

earnest phoenix
#

explain me what you're trying to say lol

delicate shore
#

ok

#

so

#

i am saying like u pay me 3 dollars for premium

#

i go to your server

#

and then copy your server id

#

then do s!activate server_id

earnest phoenix
#

wtf why are you using array for const owners_id you are the bot owner

delicate shore
#

ys

pure lion
#

@delicate shore there's a much better and easier way to do this

earnest phoenix
#

then do s!activate server_id
@delicate shore basically you die in dms if your bot blows up in popularity i hope so

#

lemme tell you a better method

delicate shore
#

ok

earnest phoenix
#

what the...?

#
//You run npm i quick.db in the console before hand
const db = require("quick.db");
//when something happens
db.push("premiumGuilds.guilds",GUILD ID THAT YOU GOTTA FIGURE OUT BOY);
if (db.has("premiumGuilds.guilds",message.guild.id) {
    //smth
} else {message.reply("you need premium buddy")}

@earnest phoenix what???

#

what the...?
@earnest phoenix IM NOT SPOONFEEDING

pure lion
#

I don't know...

earnest phoenix
#

oh

#

I didn't ask it

#

nvm

pure lion
#

I mean I do know but w h y

earnest phoenix
#

your code is wrong

#

lemme make it easier to understand

#

no

#

i explained it wrong

#

yes

delicate shore
#

lemme tell you a better method
@earnest phoenix ok?

earnest phoenix
#
=> //when something happens
is supposed to be
//when someone buys premium
pure lion
#

It's literally two lines :/

earnest phoenix
#

@earnest phoenix ok?
@delicate shore one sec

delicate shore
#

ok

pure lion
#

Youre storing a guild ID?

earnest phoenix
#

accidental shift + enter

delicate shore
#

yes

#

guild id

pure lion
#

Just the guild ID?

#

Nothing else????

delicate shore
#

yep

#

p

pure lion
#

2 lines

misty sigil
#

im just gonna check for a role in my discord server on a premium role keklol

delicate shore
#

ok

spare mirage
#

anyone know what to do when a company doesnt reply to an api request ?

delicate shore
#

anyone know what to do when a company doesnt reply to an api request ?
@spare mirage Murder them

#

as simple as that

spare mirage
#

hmm

#

"simple"

delicate shore
#

yes

#

which company u talking about?

spare mirage
#

whats the best way to murder ubisoft? or Blue Mammoth Games

pure lion
#

let guildID = args[1]
db.set(premium, guildID)

delicate shore
#

hmm

#

m

#

m

#

o

pure lion
#

O

delicate shore
#

whats the best way to murder ubisoft? or BMG
@spare mirage 911

#

O

spare mirage
#

I dont think that will work

delicate shore
#

it should

spare mirage
#

aight imma try

delicate shore
#

this should help

#

i found it online

#

lol

still badge
#

i need music commands -_-

delicate shore
#

noice

still badge
#

-_-

delicate shore
#
spare mirage
#

nop didnt work... Should I just nuke ubisoft

spare mirage
#

what api should I use for a music bot?

still badge
#

@delicate shore wats that?

delicate shore
#

YT_SEARCH

#

or YTcore

spare mirage
#

whats better

delicate shore
#

i use YT_Search

#

and it works fine for me

spare mirage
#

nobt ytdl

#

?

delicate shore
#

The other one has rate limits

#

and i got rate limited oftenly

#

so

earnest phoenix
#

You need to first install quick.db through npm i quick.db in the console

const db = require('quick.db`);
//SOme code that runs when someone buys premium that you gotta figure out. It needs to run this next:
db.push("premiumGuildsArray.theArray",whateverTheGuildIDWasThatYouNeededToSToreINtoAVariableAndReplaceThisWIthIt);
if (command === "poopimages") {
    if (db.has("premiumGuildsArray.theArray",message.guild.id) {
        message.channel.send(":poop:");
}  else {
    message.reply("YOU NEED TO BUY PREMIUM!!! SO YOU CAN YELL IN CAPS");
}
}
delicate shore
#

i don't use it anymore

earnest phoenix
#

typed it all out

rose isle
#

anyone here trying to help me in discord.js?
I want to make my bot to send message when a certain member comes online

spare mirage
#

lmao why

delicate shore
#

Thanks

misty sigil
#

lmAO WHY

spare mirage
#

small servers

rose isle
#

yall taking to me?

delicate shore
#

yes

#

yes

#
const db = require('quick.db");
let premiumservergay = //code here
db.push("premiumGuildsArray.theArray",${premiumservergay});
if (command === "poopimages") {
    if (db.has("premiumGuildsArray.theArray",message.guild.id) {
        message.channel.send(":poop:");
}  else {
    message.reply("YOU NEED TO BUY PREMIUM!!! SO YOU CAN YELL IN CAPS");
}
}```
@earnest phoenix will this work?
misty sigil
#

no

earnest phoenix
#

Yea

slender thistle
#

GUILD_MEMBER_UPDATE should be the event you want, Nuvin

earnest phoenix
#

It will work

misty sigil
#

no for one key reason

delicate shore
#

what?

rose isle
#

anyone here trying to help me in discord.js?
I want to make my bot to send message when a certain member comes online
its a just funny thing i want my bot to do

misty sigil
#

the ' doesn't end

earnest phoenix
#

ohsorry

slender thistle
#

GUILD_MEMBER_UPDATE should be the event you want, Nuvin

earnest phoenix
#

one sec

rose isle
#

GUILD_MEMBER_UPDATE should be the event you want, Nuvin
@slender thistle
like when the person comes online on DC the bot has to send a message

earnest phoenix
#

You need to first install quick.db through npm i quick.db in the console

const db = require('quick.db');
//SOme code that runs when someone buys premium that you gotta figure out. It needs to run this next:
db.push("premiumGuildsArray.theArray",whateverTheGuildIDWasThatYouNeededToSToreINtoAVariableAndReplaceThisWIthIt);
if (command === "poopimages") {
    if (db.has("premiumGuildsArray.theArray",message.guild.id) {
        message.channel.send(":poop:");
}  else {
    message.reply("YOU NEED TO BUY PREMIUM!!! SO YOU CAN YELL IN CAPS");
}
}
#

this is correct now

slender thistle
#

Yes, when that event is fired, check if the member's status changed from offline to online

rose isle
#

ok

spare mirage
#

@delicate shore how do u play the music in the bot?

earnest phoenix
#

How do i make my bot wait for me to reply with SMTH and it stores it into let userInput? Basically replicate process.stdin

#

help

#

me

#

die

delicate shore
#

@delicate shore how do u play the music in the bot?
@spare mirage YT_Search

spare mirage
#

how do I make the music play in the voice channels xD

earnest phoenix
#

I GIVE UP I WILL JUST WAIT A DECADE FOR GLITCH TO FIX MY BOT INSTEAD OF SELF HOST IT TEMPORARILY

delicate shore
#

how do I make the music play in the voice channels xD
@spare mirage ok

#

I GIVE UP I WILL JUST WAIT A DECADE FOR GLITCH TO FIX MY BOT INSTEAD OF SELF HOST IT TEMPORARILY
@earnest phoenix i also use glitch

earnest phoenix
#

cool

#

they got a second wave of discord IP bans

delicate shore
#

i have bought the premim

earnest phoenix
#

my bot included

delicate shore
#

they got a second wave of discord IP bans
@earnest phoenix wym

#

what

earnest phoenix
#

discord blocked a hell lot of their servers from using the APi

delicate shore
#

o

#

why

earnest phoenix
#

npm is killing my pc

pure lion
#

How

earnest phoenix
#

why

#

How
idk smh hogging my RAM

delicate shore
#

i have to shift to vps as soon as my premium membership finishes

#

of glitch

#

can anyone recommend fun commands???

earnest phoenix
#

meme 8ball blackjack coinflip dice roll dog pics (i have a lot of em) cat pics (them too)

pure lion
#

Alexflipnote api

spare mirage
#

why is YT_SEARCH so damn complicated

delicate shore
#

it is easy

pure lion
#

It's not hard

earnest phoenix
#

add me to your server PGamerX

delicate shore
#

meme 8ball blackjack coinflip dice roll dog pics (i have a lot of em) cat pics (them too)
@earnest phoenix i am unbale to add

#

the

pure lion
#

Also why not use an api

delicate shore
#

cats

#

and dog

#

pics

#

😦

earnest phoenix
#

super simple

delicate shore
#

how