#development

1 messages ยท Page 1315 of 1

blissful coral
#

It can't read what you are defining

solemn latch
#

user doesnt even seem to be a promise here

vernal rivet
#

read what scopes are

gritty bolt
#

pretty much I'm trying to get the user object of the user who reacted

solemn latch
#

thats already there

#

bot.on('messageReactionAdd', async (reaction, user) => {

waxen rover
#

hey

blissful coral
#

lol

vernal rivet
#

you are reinit the object, with the exact value, as it did have before

waxen rover
#

so

gritty bolt
#

oh shoot

#

it works

solemn latch
#

and awaiting it for ???

waxen rover
#

im not good at coding

gritty bolt
#

legit took the const outta there

#

i made this code a while ago and have been fixing everything

waxen rover
#

um

vernal rivet
#
gritty bolt
#

it's a mess

solemn latch
#

should just delete the line

waxen rover
#

is there anyway to first

#

make my bot online?

gritty bolt
#

i changed it to just await the user

#

make my bot online?
@waxen rover No, it needs code to run

solemn latch
#

the user isnt a promise tho

gritty bolt
#

oh

#

well then I guess that does nothing

waxen rover
#

do you have the code?

#

or is the code

solemn latch
#

you have to make it

waxen rover
#

diff

#

oh

#

welp

#

time to learn to code

#

i guess

solemn latch
#

gl

gritty bolt
#

this is such a mess of code

vernal rivet
#

take a look at the link i sent gimmy, that will be some help in your journey

waxen rover
#

ok

gritty bolt
#

i havent even hit the database part yet

waxen rover
#

all i knwo is color codes

#

and how to make text

vernal rivet
#

hex

waxen rover
#

bold

#

italics

gritty bolt
#
        const collector = user.DMChannel.createMessageCollector(filter, { time: 600000});

How do I actually make a message collector in a user's DMs

waxen rover
#

cursive

#

etc

gritty bolt
#

because i know that isnt it

solemn latch
#

its the same as any other channel afaik

earnest phoenix
#
<User>.dmChannel.createMessageCollector(<filter>, <options>)```
gritty bolt
#

oh wait was it just a caps issue?

earnest phoenix
#

I think so

waxen rover
#

so

vernal rivet
#

shrug i suggest taking a look into javascript. you can do python as well, but javascript uses discord.js as its library, which is what most people use, so it will benefit you more, if you use something that majority of people use to get help gimmy. but you can try other languages, and libraries, but discord.js and discord.py is your best options

waxen rover
#

what to i need to learn first

#

ok

gritty bolt
#

it was

#

ok im gonna be here a lot for the next 30 mins or so trying to fix this disaster

vernal rivet
#

docs are going to be your best friend

gritty bolt
#

@waxen rover i'd totally recommend discord.js, I use it and lots of people are familiar with it

#

the docs are also pretty good

#

and theres plenty of tutorials and explainers to help get you started

vernal rivet
#

i mean i would recommend discord.NET, but thats just me. shrug , but for beginners, javascript or python is going to be better than doing C#, Java, Rust, or Cpp

waxen rover
#

ok

blissful coral
#

MOVE_MEMBERS includes disconnecting right?

earnest phoenix
#

Js*

waxen rover
#

so

blissful coral
#

Alright

#

Start here

waxen rover
#

when i run my bot

#

do i

blissful coral
waxen rover
#

use the script when im done

#

or in the beginning

#

@blissful coral

vernal rivet
#

?

blissful coral
#

?

waxen rover
#

then if i wany

#

*want

#

to make my bot

vernal rivet
#

what is the question

waxen rover
#

lock the server

#

which script should i learn first

vernal rivet
#

script?

waxen rover
#

idk

#

im a beginner๐ŸŽƒ

pearl trail
#

change the role perm

waxen rover
#

i did

#

made it owner

vernal rivet
#

you have to do this in your program.

gritty bolt
#

okay would anybody be willing to help me bug check a large chunk of code

vernal rivet
#

having the bot overwrite the channel perms, and turn the permission to speak in the channel for the @ everyone role.

gritty bolt
#

im suffering a lot right now and im not sure if im catching everything

waxen rover
#

so...

#

i need to learn what type of code?

#

to make it lock

#

the server

gritty bolt
#
collector.on('collect', m => {
            global.schedulecollectedTime = m.content.first(); //This needs to be the content of the collected message
            if(m.content === "cancel", "Cancel", "Cancel.") {
                let cancelEmbed = new discord.MessageEmbed()
                .setTitle("Cancelled.")
                .setColor("#FF0000");
                user.send(cancelEmbed)
                console.log("User cancelled collector.");
                return;
            }
            console.log(`Collected ${m.content}`);
            collector.stop();
        });```
This keeps spewing out
```Error: val is not a non-empty string or a valid number. val=undefined
    at module.exports (C:\Users\Samst\Desktop\RemindMe\node_modules\ms\index.js:34:9)
    at Client.<anonymous> (C:\Users\Samst\Desktop\RemindMe\core.js:43:22)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)```
#

can anyone help?

waxen rover
#

???

vernal rivet
#

which is line 34?

gritty bolt
#

thats not what it's pointing to that takes me into the module thats giving the error

#

pretty much the error is saying that what im putting into the function isn't a number

waxen rover
#

hello

sonic lodge
#

show line 43 in core.js

gritty bolt
#
        let msTime = ms(global.collectedTime)
sonic lodge
#

so global.collectedTime is returning undefined

gritty bolt
#

yup

#

i should clarify

waxen rover
#

so...
@waxen rover
i need to learn what type of code?
@waxen rover
to make it lock
@waxen rover
the server
@waxen rover

gritty bolt
#

i understand the error

waxen rover
#

๐Ÿ˜

#

||help||

gritty bolt
#
collector.on('collect', m => {
            global.schedulecollectedTime = m.content.first();
            if(m.content === "cancel", "Cancel", "Cancel.") {
                let cancelEmbed = new discord.MessageEmbed()
                .setTitle("Cancelled.")
                .setColor("#FF0000");
                user.send(cancelEmbed)
                console.log("User cancelled collector.");
                return;
            }
            console.log(`Collected ${m.content}`);
            collector.stop();```
#

i need to get the content

#

of the collected message

#

but i dont know how to do that

sonic lodge
#

m.content

vernal rivet
#

i think you do not fully understand gimmy

gritty bolt
#

m.content
@sonic lodge i had that

sonic lodge
#

also, this condition isn't doing what you think: m.content === "cancel", "Cancel", "Cancel."

gritty bolt
#

same error

#

oh

#

what is it doing?

waxen rover
#

@waxen rover
@waxen rover
@waxen rover
@waxen rover
@gritty bolt @vernal rivet @blissful coral

#

oops

vernal rivet
#

also yea, you should be use OR operator to do that

waxen rover
#

so...
@waxen rover
i need to learn what type of code?
@waxen rover
to make it lock
@waxen rover
the server
@waxen rover

pearl trail
waxen rover
#

help

sonic lodge
#

it checks if m.content === "cancel", then it returns "Cancel."

pearl trail
#

javascript, the best code i've ever use christmasthink

waxen rover
#

alr

gritty bolt
#

oh

vernal rivet
#

||when someone calls javascript a code not a language||

gritty bolt
#

fixed that

pearl trail
#

ah

blissful coral
#

@waxen rover ??

pearl trail
#

||when someone calls javascript a code not a language||
@vernal rivet Thonk

gritty bolt
#

but how do I fix getting the content of the collection?

blissful coral
#

Why are you spam pinging yourself and pinging me

gritty bolt
#

i think he's a little confused

drifting wedge
#

can any1 help me setup lavalink?

sonic lodge
#

what are you using the global object for

waxen rover
#

this is what im working with

vernal rivet
#

milk_think code is referring to the source code. language is what you are programming in. its also a pet peeves when people say coding than programming. its like yes both are correct, but professional it would be referred as programming.

waxen rover
drifting wedge
#

For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath

#

how do i do this?

#

its giving me an error

pearl trail
#

:milk_think: code is referring to the source code. language is what you are programming in. its also a pet peeves when people say coding than programming. its like yes both are correct, but professional it would be referred as programming.
@vernal rivet pepowot

waxen rover
#

what to do

vernal rivet
#

shrug idk man, i haven't worked much with lavalink. but kotlin is fun

waxen rover
#

???

pearl trail
#

aight

blissful coral
#

Not going to spoon feed you

#

Read the docs

waxen rover
#

wut

blissful coral
#

Guide*

waxen rover
#

i dont need the code

blissful coral
vernal rivet
#

first learn programming first, then read the docs.

waxen rover
#

alr

blissful coral
#

^please

waxen rover
#

but idk

#

if that will help me lock servers

blissful coral
#

Hence why you learn

waxen rover
#

ill read anyway

quartz kindle
#

what do you mean with lock servers? make all channels read only?

vernal rivet
#

learning how to program is going to help you do that.

#

lockdown the server command

gritty bolt
#

can anyone help me get the content of the message I'm collecting

 collector.on('collect', m => {
            global.schedulecollectedTime = m.content
            if(m.content === "cancel") {
                let cancelEmbed = new discord.MessageEmbed()
                .setTitle("Cancelled.")
                .setColor("#FF0000");
                user.send(cancelEmbed)
                console.log("User cancelled collector.");
                return;
            }
            console.log(`Collected ${m.content}`);
            collector.stop();
        });
        let msTime = ms(global.collectedTime)```
#

i cant figure out what i've done wrong

vernal rivet
#

so that answers the second question, which answers the first one tim

quartz kindle
#

what does the console.log show?

vernal rivet
#

is global.schedulecollectedTime a property or a function?

gritty bolt
#

variable

#

what does the console.log show?
@quartz kindle it isn't showing anything actually

#

which is why im confused

waxen rover
#

oof

quartz kindle
#

not even "Collected"?

waxen rover
#

i dont even know where to put the code

#

when i learn to make it

gritty bolt
#

nope

quartz kindle
#

then there's something wrong with your collector filter

gritty bolt
#

it's true === true

#

dummy filter

#

thats probably it isn't it

waxen rover
#

um

quartz kindle
#

true === true? lmao

waxen rover
#

so

#

where would i put the code

#

im on dev portal

gritty bolt
#

@waxen rover you need a code editor

quartz kindle
#

@waxen rover a discord bot is a program you make by yourself and run in your computer

vernal rivet
#

PandaSouless doesn't the d.js guides explain where

gritty bolt
#

go download Visual Studio Code

quartz kindle
#

you need development tools in your computer

vernal rivet
#

or atom

quartz kindle
#

you dont put code in the dev portal, the dev portal only gives you a bot account

vernal rivet
#

or notepad ++ PandaDevil

quartz kindle
#

you need to create a program that logs in to this bot account

gritty bolt
#

ok im gonna go try and get a better filter

quartz kindle
#

and then listens to messages and executes commands

gritty bolt
#

so this thing works

quartz kindle
#

can you show your current filter?

waxen rover
#

anything for a chromebook i can use?

#

to add the code?

vernal rivet
#

both are web browser based IDEs

solemn latch
#

F1 micro

sick cloud
#

how do you set up a custom email on a domain

vernal rivet
#

or you can enable linux console, i forgot the settings name, but you can do the other way, and install vscode through there

quartz kindle
#

chromebooks can be used for development, but its a bit tricky to install certain development tools due to compatibility

vernal rivet
#

^^^

quartz kindle
#

however as pointed out above, there are a few websites that offer you an all-in-one experience, they contain all the development tools you need built in and run the code for you

#

they have some limitations tho

vernal rivet
#

glitch ๐Ÿคฎ

quartz kindle
#

@sick cloud with cpanel/other or without anything

unique nimbus
#

I mean

#

I used postfix

#

and then also used roundcube

#

I hate the setup

sick cloud
#

my mum wants to buy a domain and have an email

#

but she wants to pay as little as possible

unique nimbus
#

postfix and roundcube is free

quartz kindle
#

best option would be a dedicated email hosting service

unique nimbus
#

yea

#

self-hosted

quartz kindle
#

they cost as little as $1-2/mo

unique nimbus
#

mmm

#

Tim you can make your own also

quartz kindle
#

self hosted is a pain to setup

unique nimbus
#

it is

#

but you have no limits

#

and all that jazz

quartz kindle
#

if you use the email for work, dont self host

unique nimbus
#

I mean on a VPS

quartz kindle
#

you will have trouble with spam filters and shit because your machine is not in a verified-safe ip address and/or worse

unique nimbus
#

yea

#

I setted up my one and my domain goes into spam

#

but oh well

sick cloud
#

can you suggest one then tim

quartz kindle
#

zoho mail is pretty popular

waxen rover
#

so..

#

i used this code

#

in the guide

#

added my token

#

and got 7 errors

solemn latch
#

Only 7?

waxen rover
#

yes

#

why do i havve errors?

solemn latch
#

What code did you use?

quartz kindle
#

namecheap also offers email hosting, 10 bucks per year

waxen rover
#

client.once('ready', () => {
console.log('Ready!');
});

client.login('your-token-goes-here');

#

and put the tokeen

#

where it goes

#

what happended?

solemn latch
#

And that's everything you used?

waxen rover
#

no

#

just ran it to see what would happen

solemn latch
#

You need to define client

waxen rover
#

oh

solemn latch
#

Client needs the djs lib required

waxen rover
#

um

#

djs lib?

quartz kindle
#

@waxen rover where are you working atm? on glitch?

waxen rover
quartz kindle
#

ah ok

#

so on the left side

#

there is a menu for packages

#

open it

#

and from the search bar, type discord.js

#

and install it

waxen rover
#

ok

#

this was all i got "org.webjars.npm"

#

@quartz kindle

quartz kindle
#

you have to create a repl with node.js, if you didnt, go back and create a new one

waxen rover
#

oh ok

#

crap

#

just a message

#

when saying !ban

#

like tf

#

did i do sum wrong

#

thecode is like 20 charcters

unique nimbus
#

bruh

waxen rover
#

what???

#

i did sum wrong

#

didnt i?

#

@quartz kindle

unique nimbus
#

Gimmy do you know how to program in Javascript?

waxen rover
#

not really

unique nimbus
#

Do you know how to read errors?

waxen rover
#

um

unique nimbus
#

Do you know to read and fix errors in Javascript?

waxen rover
#

not fix

#

and alittle read

#

im not very good at coding

#

i have gudes

#

*guides

#

in a few tabs

unique nimbus
#

From what it looks like, you are just trying to make a command without a token or anything

#

you are just running into nothing

waxen rover
#

oh

unique nimbus
#

Please look at the docs

#

you are not reading it properly

waxen rover
#

oh

#

well

#

time to read

#

again

unique nimbus
#

and even then I do recommend you learning how to read/fix basic errors before learning to make discord bots

waxen rover
#

copied the token

#

now im gona paste it

#

in the code

edgy stump
#

Hey guy's can u help my bot reach 100 server's

waxen rover
#

this is code i put

#

(message.content === '!ban') {
message.channel.send('No banning dummy.');

#

where do i put the token?

solemn latch
#

You need the client login stuff from before

#

That you had

#

I would really read the guide

unique nimbus
#

yea

waxen rover
#

this?

solemn latch
#

F

unique nimbus
#

yea but now renew it

#

thats the token

#

but dont post it in public because it is private info

waxen rover
#

shi

#

alr

#

sorry

#

it auto regen

solemn latch
#

yeag

#

i just made discord reset it

#

by posting it on github.

waxen rover
#

ok

#

i reset

#

lmfao

solemn latch
#

token leaks can be very very bad

#

btw

waxen rover
#

oops

#

thanks then

gritty bolt
#

does anyone know a good dummy filter for a collector

#

that actually works

#

i dont need a filter

solemn latch
#

message

#

or if reaction collector
reaction

gritty bolt
#

message collector

solemn latch
#

just checking if the thing your collecting exists

gritty bolt
#

how

solemn latch
#

message

#

๐Ÿค”

gritty bolt
#

m => m?

solemn latch
#

yeah

gritty bolt
#

oh

#

ok

#

thanks

waxen rover
#

an example of what i have so far tell me whats wrong

solemn latch
#

lol

waxen rover
#

not to token

#

random letter

#

s

solemn latch
#

Nowojdwjodjwdosawd

waxen rover
#

whats wrong with it

solemn latch
#

i feel like you posted your real token with random letters at the begining

#

you should read the guide

waxen rover
#

um

#

the expired 1

solemn latch
#

because i think you misunderstand

waxen rover
#

lmao

#

oh

#

um

#

ok

solemn latch
#

you need this at minimum to get the bot to login

const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
    console.log('Ready!');
});

client.login('your-token-goes-here');
#

at the very minimum

earnest phoenix
#

did gimmy just post his token

#

twice

waxen rover
#

no

#

lmfao

earnest phoenix
#

the second one looks fake

waxen rover
#

it is

solemn latch
#

the second one looks real with the first few chars replaced with random chars

#

which is also unsafe

#

sadsdadasdckbuddy69

#

still able to figure out what it says

waxen rover
#

check again

#

lmao

solemn latch
#

after you edited it

#

i have the non edited version still

#

discord does too

waxen rover
#

wtf

solemn latch
#

since edited messages are saved

waxen rover
#

how?

#

dlete time

solemn latch
#

if it is the thing edited i would reload the token again

waxen rover
#

bruh

#

its expired anyway

#

i hope that means

#

its safe

solemn latch
#

the guide does end up going into config files so you can paste code without leaking tokens

#

on like the third page

waxen rover
#

so all this

#

and the token

#

inside

#

const Discord = require('discord.js');
const client = new Discord.Client();

client.once('ready', () => {
console.log('Ready!');
});

client.login('your-token-goes-here');

#

?

#

thats it?

solemn latch
#

yeah, thats the absolute minimum

waxen rover
#

oh

#

damn

solemn latch
#

the guide goes on in the next section to explain responding to messages

waxen rover
#

ok says ready

#

now

#

add the message code

#

that i deleted?

earnest phoenix
#

MTIxOTE5NDQ5OTk2NDYwMDMz.bG9s.aGFoYSBubw

solemn latch
#

yes, i really suggest reading the guide and the explinations for it

waxen rover
#

(message.content === '!ping') {
// send back "Pong." to the channel the message was sent in
message.channel.send('Pong.');
}

#

this

#

then what i want

#

right?

solemn latch
#

you skipped ahead

#

๐Ÿค”

waxen rover
#

how?

solemn latch
#

the previous section explains a section of code your missing

waxen rover
#

oh

solemn latch
#

READ

#

everything needs to be read

#

skipping means missing important sections

waxen rover
#

start the bot first?

solemn latch
#

this section

waxen rover
#

nvm

#

my bot is up

#

your reaction

#

when i accedentally posted my toke

#

F
@solemn latch

#

lmfao

solemn latch
#

lol

#

it happens a lot

#

ive posted maybe 30 tokens to github

waxen rover
#

oof

solemn latch
#

@earnest phoenix posted a fake token up above, posted it anyway KEKW

earnest phoenix
#

@solemn latch see what happens when you base64 decode that boye

solemn latch
#

ah

#

lmao

waxen rover
#

broken

#

when i saw

#

*say

#

!ban

#

nothing comes

#

i ran it

solemn latch
#

we cant see what that link is for

waxen rover
#

its even online

#

toinvite the bot

solemn latch
waxen rover
#

oops

solemn latch
waxen rover
#

lmfao

solemn latch
#

why do you have such long invite links

waxen rover
#

idk

#

its auto generated

solemn latch
#

^ much better for making links

#

whats your code look like?

#

everything except the client.login line please

waxen rover
#

smaller link

#

oh

#

so far

#

im adding more

#

thats it

#

so far

slender thistle
#

๐Ÿ™„

solemn latch
#

it wasnt a real token

slender thistle
#

Can you at least not include racial slurs in censorship?

solemn latch
#

oop

earnest phoenix
#

anyone wanna play among us rn?

shy turret
#

ptero 1.0 out yay

earnest phoenix
#

none of my friends r online rn :P

left patrol
#

Lmao kkkkkkkkkkklkkkkkkk

#

๐Ÿ‹

#

Kkkkkkkk

earnest phoenix
#

:p

#

Lol wut?

shy turret
#

@earnest phoenix wrong channel

left patrol
#

Nรฃo entendo vc

vague kite
#

What permissions does a bot need to see when users join/leave/change channels??

solemn latch
#

Like voice channels?

vague kite
#

Yeah

solemn latch
#

I think its the view channel perm

vernal rivet
#

Should be view

#

Either that or the bot has administration enabled then it will allow it to bypass the channel perms

solemn leaf
#

Okay

#

So py

#
intents = discord.Intents.default()
#

what deos your bot do?

torn ravine
#

does anyone know what the name of the npm package for creating a progress bar?

#

is it string-toolkit?

solemn leaf
#

idk

#

google works good

sudden geyser
#

It shouldn't be too hard to implement yourself though

solemn leaf
lone wyvern
#

hello help me please

sudden geyser
#

explain your issue please

blissful coral
solemn leaf
#

f

lone wyvern
#

code : give money

solemn leaf
#

@lone wyvern wdym,

blissful coral
#

??

solemn leaf
#

db that stores money?

lone wyvern
#

give money command

blissful coral
#

Not going to give you a command

#

That's straight up spoon feeding

sudden geyser
#

it probably wouldn't work anyway

blissful coral
#

^ lol

torn ravine
#

give money command
@lone wyvern we don't do spoonfeeding here

sudden geyser
#

We can't give you code for you, but we can explain the logic behind something. You need to help us by helping yourself.

solemn leaf
#

@lone wyvern You got to give money for the money give command

#

(for illegal reasons that was a joke)

blissful coral
solemn leaf
#

@lone wyvern I'd love to walk to thou it

blissful coral
#

That's straight up spoon feeding
@blissful coral

solemn leaf
#

Walking them thou it isnt

blissful coral
#

Ehhh

#

If you just give them every step

#

Kinda is

solemn leaf
#

No

#

watch

#

Get args check perms store new money with

#

math

#

easy math

#

value + value

sudden geyser
#

that's extremely vague

solemn leaf
#

Who said it had to be good?

sudden geyser
#

It's a channel for helping peeps ยฏ_(ใƒ„)_/ยฏ

desert hazel
#

yo

hot crest
#

sup

desert hazel
#

yea it will fuck my code up

#

because its in YTDL and FFMPED

#

Mpeg

hot crest
#

yea it took me a while to switch

desert hazel
#

so i gotta change like 5 commands

#

maybe more

#

which is cukked

hot crest
#

you basically change everything

desert hazel
#

yes

#

and im not doing that

#

brain said. have 10 tokens

#

and switch

#

one person uses one, go to nezst

solemn leaf
#

what

hot crest
#

but that is cheating ish

desert hazel
#

so its in a cycle

solemn leaf
#

tokens for what

desert hazel
#

yeah i applied for 100k quota

#

YOUTUBE api

solemn leaf
#

@desert hazel Oh

#

Use youtube-search

desert hazel
#

bro idfk what that shits

#

is

solemn leaf
#

its simple

#

af

#

No qouta

desert hazel
#

im not doing that rn i got too drunk

hot crest
#

Lavalink annoying af but better

desert hazel
#

bro what baoutn playing songs

solemn leaf
#

it uses website scrapping

desert hazel
#

about

#

*(

solemn leaf
#

It gets the link

desert hazel
sudden geyser
#

scraping is more of a double-edged sword

desert hazel
#

Bro wtf are you on about

#

we on about bots

solemn leaf
#

npm i yt-search

hot crest
#

Imagine scraping kek

solemn leaf
#

no qouta

desert hazel
#

your on about fucking minecraft

solemn leaf
#

I not sure if it scraps

desert hazel
#

sweeping edge sword and that

sudden geyser
#

on one hand a lot of devs only have that as their option, but on the other they may just block you. Anyway I don't think scraping has to do with this as they mentioned the youtube quota, which would mean they're using the official API

solemn leaf
#

Im trying to help you

#

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

desert hazel
#

not you kai

#

aki

#

this litew kid

solemn leaf
#

Kid?

desert hazel
#

i might just make a changing api key

#

thats smarter

solemn leaf
#

No

#

its not

desert hazel
#

makes my bot more unique\

sudden geyser
#

wouldn't you just hit the quota again

solemn leaf
#

bcs qouta doesn;t work like that

hot crest
#

"Veiws" kek

desert hazel
#

no becuase i get 10x the limit

#

10k x10

#

someonse work that out

#

1 trillion api

#

yea

sudden geyser
#

doubt

desert hazel
#

and my 35 servers aint gonna hit that

#

but yea

solemn latch
#

1 trillion api?

desert hazel
#

1trill is alot

solemn latch
#

not enough api

hot crest
#

pathetic

solemn leaf
#

Just use yt-search

desert hazel
#

yeah 10x yoube api keys

solemn leaf
#

or lavalink

desert hazel
#

BRO I DONT WANNA CHANGE MY CODE

solemn leaf
#

but lavalink suck bcs you need servers

#

dude

desert hazel
#

i have servers

solemn leaf
#

videos.forEach(function (v) {
const Embed = new Discord.MessageEmbed()

solemn latch
#

you should have servers anyway

#

๐Ÿค”

solemn leaf
desert hazel
#

what the fuck is that @solemn leaf

solemn leaf
#
videos.forEach(function (v) {
connection.play(ytdl(v.url, { filter: "audio" }))
});
desert hazel
#

bro if i sent you all my bot, can youn change it foir me

solemn leaf
#

if you paid me

desert hazel
#

BRO im not made of more

#

money

solemn leaf
#

watch

desert hazel
#

ill buy you nitro tho

#

want nitro?

solemn leaf
#

deal lmao

desert hazel
#

you dont have to do my coee

#

code

solemn leaf
#

But not gonna get bean

sudden geyser
#

what is even going on with this discussion at this point

desert hazel
#

ill just get oyu nitro

solemn latch
#

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

hot crest
#

idk anymore

solemn latch
#

not the place to discuss this anyway

solemn leaf
#

yeah different server

desert hazel
#

accept my friend aki

#

na

solemn leaf
#

Ill ping you soemwhere else

desert hazel
#

general

solemn latch
#

pm if you wanna discuss this

desert hazel
#

#$genal

solemn latch
#

mods will tell you not to talk about it there either

desert hazel
#

na its general

#

general chat

#

so we can talk

solemn leaf
#

Yeah

solemn latch
#

lol

desert hazel
#

aki go general

solemn leaf
#

no development tyalk in gen

#

Im not getting beaned

#

lol

solemn latch
#

they still will tell you to talk about it in pm's

desert hazel
#

im smart you see

#

bs

#

lets talk about it in general and we will see

solemn latch
#

discussing payment for stuff isnt really allowed here

solemn leaf
#

you're saying your plan out loud

desert hazel
#

im not paying him to do shit

#

im just buying him nitro

#

not to do my code

solemn leaf
#

ez pz

desert hazel
#

he would want more

#

aki accept friend

opal plank
#

how bad of an idea is to spawn 500 child processes in one go?

solemn latch
#

probably a perfect idea

opal plank
#

he said it fellas, im doing it

#

hold him responsible

#

be back in 10 ish when i cache all necessary queue streams

fast trench
#

does anyone have any leads on how to begin coding a sticky command?

opal plank
#

define a sticky command

fast trench
#

ok so you use the command and it makes the bot send a message...but then I send a message after that...the bot auto deletes the message it sent and resends it...that way its like a sticky note at the bottom of the chat and is always the last message sent...it's mainly used for announcements or used as a temporary pinned message for channel rules

opal plank
#

so you want a command that would fire and re-send its message to make sure its the most recent one?

fast trench
#

yes exactly

opal plank
#

js?

fast trench
#

also I code in JS

opal plank
#

d.js?

fast trench
#

yep lol

opal plank
#

as far as that goes, you will need 2 things

fast trench
#

I've looked everywhere on github...npm.com...and google and can't find anything

#

I know you would have to fetch the old message ID, delete it...then resend it's contents

#

but I'm not the best at fetching and stuff like that

opal plank
#

first, you'd need to store the message content somewhere
second, you'd need to listen to 'message' event and check if the message channel is in a channel you want it to be bottom most

to put it bluntly
map the new message + send it
on 'message' => if message channel = previous message { oldmessage.delete() message.channel.send(message) }
else => continue normal code

hot crest
#

z

opal plank
#

its better to store it rather than fetching it

fast trench
#

ok I'll check that out

opal plank
#

@fast trench i'll give you an example code, DO NOT COPY IT as it WONT WORK, this is the framework for your command

let map = new Map();
command =>  message.channel.send(embed); map.set(message.channel.id, embed);


bot.on(_'message' => {
if(map.has(message.channel.id)) {message.channel.send(map.get(message.channel.id))}
else {your normal code}
})

@fast trench

#

thats a REEEEEALLLLYYY mowed down, but it should give you a VERY BASIC idea of what to do

#

also remember that im biased in JS since im addicted to MAPS and FOR loops, there ARE better options, though i enjoy maps and for loops myself

#

you can use sets, arrays, or databases, it goes by preference

#

i enjoy maps due to their indexing nature

outer niche
opal plank
#

intents arent based on libs, its based on your code

outer niche
#

I have literally been told so many different things

opal plank
#

are you verified? which intents do you need? did you request priviledged intents? theres plenty of things to check on

#

its based on what YOU need

solemn latch
#

intents are the things discord sends you

opal plank
#

first, is your bot verified?

outer niche
#

I have been told so many times today that if I don't have it for discord.py the bot Will not work properly

solemn latch
#

if you require messages and guild changes, you can request to get jus tthose

outer niche
#

And yes I am verified

opal plank
#

which gateway intents did you request on verification?

#

priviledged ones

outer niche
#

I have not yet I don't even know what I need

opal plank
#

it depeneds on what you want the api to give you, unless someone reviews your code thoghrougly , you should be the one to know that

#

are you using presence?

#

are you using member updates?

#

are you using voice updates?

#

you, as the owner of the bot, and as a developer, should know what your bot needs, as you are the one coding it

outer niche
#

Which is the one that lets you see the users do not disturb online and idel

opal plank
#

the intents you need is required based on YOUR needs(witch exemption from priviledged ones, whcih requires verification)

outer niche
#

I'm verified

#

Which privilege intent let you see the members status

opal plank
#

its like,
rather than:
GIMME EVERYTHING
you say:
Gimme A, B, C and E, i dont need anything else

#

intents is what you tell the api to provide to you rather than recieving everything

#

its based on what your code does and what you need

outer niche
#

Where can I find what they are

opal plank
#

thats why its so hard to give you a concrete answer

solemn latch
#

the dev page has them

opal plank
#

what i CAN give you is a list of all intents so you see which ones you are using

opal plank
outer niche
#

Isn't guild_member one

opal plank
#

like i said, its up to YOU which ones YOU ARE USING

outer niche
#

I don't even know what any of these do

opal plank
#

its highly optional, you could just leave them all blank, but its you'd have limited functionality

solemn latch
#

most imo are self explanitory

outer niche
#

All I know is I have my commands don't work anymore

opal plank
#

its based on what YOU use, the best person to say what you use, is, well, YOU

#

since you are the developer

solemn latch
#

what are those commands, what do they do.

opal plank
#

what you could do as a patch to revert the changes is call all Non priviledged intents

faint prism
opal plank
#

its a blunt way of saying 'gimme all you got' from the gateway

outer niche
#

The main command that we're trying to get working is one that tells you what moderators are on and offline and it also gives you their status

solemn latch
#

iirc, thats privlaged info

opal plank
#

that likely requires priviledged member update intents

#

which is guild presences

#

dont quote me on that though, i havent played with enough to know for certainty there isnt another available option to get a user status

solemn latch
#

if this is a small personal bot(which i think you said its verified so its probably not?)
You can still request all the mods info still afaik

outer niche
#

It is verified and has over a thousand servers

solemn latch
#

or just get verified for the guild_presences

opal plank
solemn latch
#

which i think the solution was to contact discord.

quartz kindle
#

you likely need both GUILD_MEMBERS and GUILD_PRESENCES

opal plank
#

just to be certain, request guild presences

#

request everything

#

and void as needed lmao

outer niche
#

Yeah but I can't request it if I don't even know what it does and if I don't provide reasoning and code proving that I need it they won't give it to me

opal plank
#

be a crackhead and just take everything

outer niche
#

I'm trying but they won't

opal plank
#

correct, you need to prove you need em'

#

give an example command that says you need that specific intent

solemn latch
outer niche
#

So I have presences rn then I need to apply for

quartz kindle
#

you said you want to show the status of members, in order to receive status updates, you need GUILD_PRESENCES, without it you dont receive any status from anyone

opal plank
#

^^^^

trim saddle
#

remember when discord had a flag for more emojis in a server

outer niche
#

Yes I know I need that one now

opal plank
#

Tim likely knows a lot better than me in that regard, like i explained, i havent played enough with guild intents yet

outer niche
#

Ok

trim saddle
#

@quartz kindle if you know so much

#

how do you get a girlfriend

opal plank
#

IF

#

how dare you doubt the lords knownledge

quartz kindle
#

no idea, havent had one for 6 years

trim saddle
#

6 years? damn

outer niche
#

Lol

opal plank
#

Tim is too smart for a gf, not many of them can keep up with his superior knowledge

outer niche
#

I think I need to go through and see what commands don't work

quartz kindle
#

LOL

opal plank
solemn latch
#

it can be a bit hard to know if a command works just running it sometimes.
If you run a command in the test server, and the bot already cached everything from other sources, it still will work.
iirc presence data is sent with message events(tim correct me if im wrong) so if your the only mod, and cached it may work.

quartz kindle
#

presence data is sent with presenceUpdate events only

opal plank
#

yeet everything to the voind

solemn latch
#

i stand corrected

opal plank
#

i legit am concerned about presence data tbh

#

i agree with it being priviledged

solemn latch
#

I dont think it being priv really helps

opal plank
#

ever since i started coding i wondered about sketchy shit that could be done with datamining it, so i think its fair only verified and accountable bots have access to it

outer niche
#

So if I have a command that deletes a channel I know that is an intent which one would it follow under presences or or the other one

solemn latch
#

i forgot how to spell privilaged privalaged privleged? idk im drunk aparently

opal plank
#

that data can be sold for advertisers

#

now, luckily, its accountable for

solemn latch
#

I feel like to reliably delete channels without error you need the GUILDS intent

quartz kindle
#

@outer niche intents are not about what you can or cannot do, intents are about what you receive

opal plank
#

Discord itself isnt selling your data to third party apps, so shouldnt bots

solemn latch
#

since the channel could be deleted

outer niche
#

Ooo ok

solemn latch
#

you wouldnt know

quartz kindle
#

in order to receive messages, you needs GUILD_MESSAGES

opal plank
#

i would

#

i got a close circle of friends with a couple devs

outer niche
#

So if the bot needs to receive a message it needs guild messages

quartz kindle
#

yes

#

or DIRECT_MESSAGES if you want to receive dms

opal plank
#

one thing discord is, is that its transparent with users

#

though they get a lot of uncalled for shit they didnt do

#

got nothing but respect for em

quartz kindle
#

discord bought by facebook when

outer niche
#

So if I have something like what is the message you need to send to the developer is that guild message

solemn latch
#

isnt facebook potentially getting sued for being too big

#

and might have to break up the company(instagram and some other sites)

opal plank
#

if discord gets bought by facebook, its ff

#

gg*

solemn latch
quartz kindle
#

facebook is threatening to leave europe over new regulations (that forbid companies to sell data to the US)

opal plank
#

which is completely right

#

let the boomers out of EU

solemn latch
#

lmao

opal plank
#

dont abide by the laws? fuck off

outer niche
#

So if I have a message that's coming from the guild I need guild messages

quartz kindle
#

yes

solemn latch
#

yeah

outer niche
#

So safe it's asking me for a message that would count

opal plank
#

you should likely request both from what i understood tbh

#

theres only 2 priviledged intents as of now

outer niche
#

Yeah but I'm trying to find one of my commands that needs the second one

opal plank
#

guild MEMBER?

outer niche
#

Yes I'm trying to find a command that would fit into that

opal plank
#

wouldnt caching be a valid excuse or maybe voice commands?

quartz kindle
#

do you have a welcome message? when a member joins

opal plank
#

you'd need to listen to guild member updates for voice

outer niche
#

No tim

quartz kindle
#

you only need GUILD_MEMBERS if you use guildMemberAdd, guildMemberRemove or guildMemberUpdate

#

or if you use fetchAllMembers

outer niche
#

What type of command would be used for guild member update

quartz kindle
#

send a message when a user changes their username or nickname

#

send a message when a member role is added/removed

opal plank
#

wouldnt my case apply for when a user change state over voice?

outer niche
#

Well I have that

quartz kindle
#

send a message when a user joins/leaves a guild

outer niche
#

I have a command that will add roles to member

quartz kindle
#

no not that

outer niche
#

Oo

quartz kindle
#

a command comes from a message

#

you dont send an auto message if someone changes their roles

outer niche
#

True

opal plank
#

tim, what about voice updates?

outer niche
#

So it's stuff like audio messages

opal plank
#

that still comes packed with guild member?

#

or voiceUpdates?

outer niche
#

So stuff like voice updates and voice messages are what guild member uses

quartz kindle
#

for voice you need GUILD_VOICESTATES

opal plank
#

hmmm interesting,i assumed the way d.js handled it would be with members

#

since it brings new and old member states

solemn latch
#

what about GUILD_INTEGRATIONS

#

what do

#

:p

slow fable
#

should i normally ignore dm commands

opal plank
#

actually

#

my bad

#

it does indeed bring voiceState not member

quartz kindle
#

voice states do include member data

opal plank
#

yeah i just checked the type declaration for it

#

thats interestintg

#

i assume it'd come packed with member

#

as voice updates is partial of member status

quartz kindle
#

@solemn latch when a guild adds/edits/removes an integration

outer niche
#

I don't know if I need the second one because I don't think my bot uses any of that considering I don't even know what it is and can't figure it out lol

solemn latch
#

OH

#

im over here trying to figure out what integrations are

#

lmao

quartz kindle
#

stuff related to oauth2, twitch, youtube, acounts, etc i believe

solemn latch
#

yeah

opal plank
#

aight, time to go drink more and fuck around with sharding

#

cya fellas

solemn latch
#

๐Ÿ‘‹

opal plank
quartz kindle
#

i go sleep

opal plank
#

gn then

solemn latch
outer niche
#

Gn

solemn latch
#

gn lads

opal plank
outer niche
#

So if I'm gathering server info for a command do I need a intent For that?

#

Or user info

#

@opal plank ^

opal plank
#

pong

#

ngl, the only thing you need to worry about is priviledged intents

solemn leaf
#

erwin

opal plank
#

i dont remember the back of my head the intents for everything

solemn leaf
#

I got nitro again

opal plank
#

nice[

solemn leaf
#

what do I make my pfp

opal plank
#

@outer niche depends on how you do it, if you getting it directly from the API, none

#

like i said, you should only concern yourself with priviledged intents for now, unless you REEEALLLLY optimizing your code

#

which i assume you arent

outer niche
#

I have just requested that one

opal plank
#

no, like i said, its only related to priviliedged intents rn

#

you can request all other ones withoput a problem

#

priviledged means, only verified bots

#

so, you neeed to request them on verification if you need em'

outer niche
#

I'm pretty sure my server info command needs it because it only says one for online members and the amount of members

opal plank
#

Tim would be a much better person to tell you about that, im aware of my shortgivings, and intents is one of those

outer niche
#

And he went to sleep

opal plank
#

indeed, its probably best to wait for someoen with the same experience as him to get you an answer

outer niche
#

Ok

opal plank
#

thats a field im not too keen/comfortable with to give a definitive answer

#

i CAN give some general instructions, but im not gonna rule something that isnt part of my knowledge

solemn latch
#

The way I determined what intents I needed was by only enabling one i knew I needed.
Went through each command and checked if it worked, if it didn't I would find the intent by looking at the list and add it.

#

most of them are self explanitory

opal plank
#

i just got everything and about to ask for intents

#

i got the clyde message about a month and a half ago

#

but i keep leaving guilds due to their inactivity

#

so i dip down below the 75 guilds often

#

im not interested in low count servers[

earnest phoenix
opal plank
#

my bot is for streamers, if you have a bot hell, im not interested in it, sorry

earnest phoenix
#

do i have to put something here?

solemn latch
#

you dont have to, but youd be wise to

earnest phoenix
#

also

#
self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000, autopost=True)
#

what about webhook_path, webhook_auth

opal plank
#

website/path

solemn latch
#

path can remain default, you can change it if you dont like it

opal plank
#

auth is the password

solemn latch
#

^

opal plank
#

to make sure the request is coming from DBL and not some other website

solemn latch
#

you can just spam random letters and copy paste it over tbh

opal plank
#

its one extra security measure

earnest phoenix
#

and same in webhook_auth

#

?

solemn latch
#

yeah, the same one in the webhook_auth as that box

earnest phoenix
#

how to i get the data who voted the bot

solemn latch
#

the webhook sends it

#

the docs cover it

earnest phoenix
#

so i dont need to do anything?

solemn latch
#

it will send it to the listener as shown in the docs

hot crest
#

How would I style the header?

earnest phoenix
#
import discord
import dbl
from discord.ext import commands, tasks
from dhooks import Webhook, Embed
import asyncio
import json

class TopGG(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        self.token = f"{self.bot.top_gg_token}"
        self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='my_password', webhook_port=5000, autopost=True)

    @commands.Cog.listener()
    async def on_guild_post(self):
        print(f"Posted guild count: {len(self.bot.guilds)}")

    @commands.Cog.listener()
    async def on_dbl_vote(self, data):
        print("Received a test upvote:", "\n", data, sep="")


def setup(bot):
    bot.add_cog(TopGG(bot))
#

im testing it but nothing is posted via webhook

solemn latch
#

did you put the correct url in the top.gg page?

#

on your bots page

earnest phoenix
#

yup

solemn latch
#

if this is running at home youll need to port forward

mild flower
#

let winner = m.reactions.cache.get('๐ŸŽ‰').users.cache.random()

TypeError: Cannot read property 'users' of undefined
why this hapen GWsetmyxPeepoCry

solemn latch
#

if its on a server it needs to be let past the firewall

earnest phoenix
#

currently im hosting it at home ill update on vps when it will be done with it

solemn latch
#

okay, then youll need to portforward it

#

windows has a firewall too if your on windows

#

so itll need to be let past that

#

port forwarding depends on your router

#

its diffrent for every single one

#

letting stuff past the windows firewall youll have to google, I havent ever done it tbh

earnest phoenix
#

so ill just leave it

#

will it work if i update on vps now?

#

or on vps also i have to do that?

solemn latch
#

if you have a firewall on your vps you will.

#

you wont have to port forward however

earnest phoenix
#

bruh im so confused lol

#

where do i get webhook_port from

solemn latch
#

any port number you want

#

thats not currently being used

hot crest
#

How would I style the header on top.gg ? SadChamp

earnest phoenix
#

so ill let it be 5000 only

solemn latch
#

5000 is perfectly fine.

earnest phoenix
#

what webhook format does it sends?

solemn latch
dire obsidian
#

Woo

solemn latch
#

hello

dire obsidian
#

What is your main programming lang?

solemn latch
#

js

dire obsidian
#

Ohok

solemn latch
#

I'm not sure, not a py dev tbh KEKW

#

was hoping shiv would magically know someone has a question about his lib

dire obsidian
#

Oh senpai

#

Hes sleeping

solemn latch
#

๐Ÿ˜ฆ

#

I feel like he wakes up in like an hour

dire obsidian
#

I just want to make feel good and relaxed

earnest phoenix
#

i updated it on vps still its not working

#

should i copy webhook url with discordapp or just discord?