#development

1 messages ยท Page 1565 of 1

blissful coral
#

Just because you are maxed

#

Doesn't mean you unlock it

#

You can be denied by discord for it once your bot is verified/reviewed by them

#

It will be included in the email they send you upon reviewal

outer perch
#

it's verified

solemn latch
#

actually i think dsl got denied for one of the intents

outer perch
solemn latch
#

verified doesnt mean you get all the intents.

pale vessel
#

yeah it got declined for guild members intent

#

they had to do workarounds

raw ledge
#
const Discord = require("discord.js");
const client = new Discord.Client();
client.chat = require("./index.js");

client.chat.ChatBot(client, {
  cleverUser: "cleverbot.io/keys user",
  cleverKey: "cleverbot.io/keys key",
  cleverNick: "session name",
  enableTyping: false,
  ignoredServers: ["427239929924288532"],
  ignoredChannels: ["441425044351090689", "441393041824022528"],
  watchName: false,
  watchMention: false```
blissful coral
#

Uh you don't even fulfill your syntax

#

And that isn't really customizable for per server use

#

Also, I am pretty sure at least 3 people recommended you to learn how to make a basic discord bot before trying to use a AI

mellow kelp
#

oh cleverbot has an api?

#

pog

solemn latch
#

i chose impossible

earnest phoenix
#

Hey can I use mangodb to store users data ๐Ÿ˜€

#

Is mangodb good to store database

umbral zealot
#

yes.

summer torrent
#

i don't know mangodb, but mongodb is good

misty sigil
#

you don't store your data in mangoes genetic sequencing?

lyric mountain
#

Mango
Man go
Man go where?

drifting wedge
#

pinapledb

jaunty trout
#

appledb

opal plank
#

pineapple-pendb

blissful coral
#

userSchema.js

const { Schema, model } = require(`mongoose`)

const schema = new Schema({
userID: String, //User's ID
guildID: String, //That guild's ID so the data for the user is per guild if wanted just remove this line to not have it
//ata: String, Array, Boolean, Map, Number... Whatever
})

module.exports = model('userSchema', schema)

Your file you find it:

const userSchema = require(`../models/userSchema`) //Change to your directory obviously

userSchema.findOne({ userID: user.id, guildID: guild.id }, function(err, data) {
  console.log(data)
})```
earnest phoenix
#

.

#

what i need to correct ?

tribal siren
#

language?

#

code?

#

what do i do with this?

#

this is your error

#

here you go

earnest phoenix
#

python

#

@tribal siren

tribal siren
#

that one line shows nothing about the error

gilded olive
#

snipe_message_author is what?

earnest phoenix
#

ok

#

wait sending whole

tribal siren
#

oof why do you waste time on that

gilded olive
#

Is this copied?

tribal siren
#
you could just
send the code like that
tribal siren
gilded olive
#

You dont define any of the variables that you have there

#

snipe_message_content is message.content

earnest phoenix
#

ya this was copied a little ๐Ÿ˜†

gilded olive
#

But I don't see that being defined

#

bruh

tribal siren
#

lmao

#

a little

gilded olive
#

Weren't you the same guy a few days ago saying you want to stop copying

#

Wherever you copied this from gave you NameError's

earnest phoenix
#

got it

#

i saw the above code and understood

broken matrix
#

Im trying to learn python and im stuck. I need a command to add to one of my numbers in the data base but i dont know how to do it. Sorry for my lack of knowledge on terms. Im using sqlite3

tribal siren
#

what is your initial language

earnest phoenix
#

use mangodb or asyncpg for database ?

#

right ?

solemn latch
#

i like mangos, so id use mangodb

earnest phoenix
#

or no ?

broken matrix
#

I cant for this

earnest phoenix
earnest phoenix
#

I haven't used v12 that much since I was focused on java, although this .cache thing is hard to wrap my head because I cant fetch a user anymore without it being cache.

#

What new method could I use to fetch a user without them being cached.
Basically what I'm asking

pale vessel
#

users.fetch()?

earnest phoenix
#

fetch != get

pale vessel
#

fetch is not a cache operation

#

Although it does look in cache first

solemn leaf
#

How can I make a field be liek a place holder

pale vessel
#

elaborate

solemn leaf
#

red boxes are fields

earnest phoenix
#

invisible unicodes

pale vessel
#

you need to use blank inline fields

#

use \u200b for the name and value

solemn leaf
#

okay

#

do I make it inline?

pale vessel
#

yes

solemn leaf
#

okay

pale vessel
#

I wouldn't recommend doing it since it will look real ugly on mobile

earnest phoenix
#

doesn't that make a blank inline field thoughout the whole section?

pale vessel
#

only the third part of the section

earnest phoenix
pale vessel
#

assuming they have three inline fields next to each other

earnest phoenix
#

like how v11 offered #Client.fetchUser()

pale vessel
#

yes?

#

it's client.users.fetch()

earnest phoenix
#

.fetch() has no arguments.

pale vessel
#

it does

#

provide the id

earnest phoenix
#

never mind

#

i put user instead of users

#

thanks.

solemn leaf
#

flaze

#

I needs help with canvass

crimson vapor
solemn leaf
#

How can I make my bot leave all vcs it is connected to when it is started

crimson vapor
#

I don't think you can leave a vc without a connection

#

when you restart the bot, all connections are stopped

#

but I could be wrong

pale vessel
#

Try client#voice#connections

#

it's probably like million said

crimson vapor
#

thats why bots stop playing but stay connected when you restart them (with ytdl)

mellow kelp
#

i tried that many times

#

didn't seem to work tho

#

client.guilds.cache.forEach(guild => guild.me.voice.channel?.leave())

half seal
#

Iโ€™ve been thinking about creating my own discord bot, I have already learned a little bit about the discord developer portal and the code I want to use is Python, where should I start?

mellow kelp
#

by learning python

pale vessel
sudden geyser
#

If you already know Python, you can start by using the discord.py library

#

It has documentation and guides on how to create one

half seal
#

Alrighty, thank you so much for the assistance

mellow kelp
#

np

pale vessel
#

Now that I think of it, is there another popular discord library in Python?

mellow kelp
#

oh hold up

#

just in case

sudden geyser
#

I think there was one.

mellow kelp
#

nvm

sudden geyser
#

I'm not in Discord API anymore so I can't check

mellow kelp
#

there's one called disco

tribal siren
solemn leaf
#

learn python by making a library for discord and use that library

mellow kelp
#

big brain move right there

earnest phoenix
#

you're rather going to check yourself in to a mental hospital before finishing the lib

crimson vapor
#

making a basic lib isn't bad

#

once you need to add voice support and maintain the changes

#

thats when the pain comes in

earnest phoenix
#

the gateway is a pain in the ass

#

especially designing it with intents in mind

mellow kelp
#

there's no better way to describe it

#

imagine if discord libs didn't exist ๐Ÿ˜ณ

earnest phoenix
#

imagine if discord still allowed userbots ๐Ÿ˜”

mellow kelp
solemn leaf
#

ay yes

#

user bots the best

#

make them talk to each other

#

its fun on other chat apps

lunar citrus
#

When my bot will get approved

#

9 days passed

solemn leaf
#

someone explain this error from ytdl

#

Error: This live event will begin in 44 hours.
at Object.exports.playError (C:\Users\Owner\Desktop\Not-Chan\node_modules\ytdl-core\lib\utils.js:124:12)
at downloadFromInfoCallback (C:\Users\Owner\Desktop\Not-Chan\node_modules\ytdl-core\lib\index.js:72:19)
at C:\Users\Owner\Desktop\Not-Chan\node_modules\ytdl-core\lib\index.js:20:5

sacred aurora
#

This live event will begin in 44 hours.

#

maybe the video is not aired yet

left pasture
#

how can i make the bot quote other messages? (new reply feature i mean)

#

djs

pale vessel
#
client.api.channels[<channel id>].messages.post({
    data: {
        message_reference: { message_id: <message id to reply to> },
        content, embed
    }
});```
willow mirage
#

:0

#

oh my good

#

djs 13 released ?

pale vessel
old cliff
#

Gifencoder

pale vessel
#

cursed

#

gifencoder is poop

old cliff
#

what else can I use ?

earnest phoenix
#

that's some hardcore compression

old cliff
#

name a package xD

#

omggif ? @pale vessel

#

oof its 8 year old

pale vessel
old cliff
#

What can I use instead ?

final lava
old cliff
#

Flaz help me or u qt

pale vessel
#

idk tbh

lament rock
old cliff
#

English ?

lament rock
#

That is english

old cliff
#

it is actually not retaining the color of previous frame

lament rock
#

You're possibly using a global color map

old cliff
#

idk I am just using a package

lament rock
#

Then consider using a different package

tardy hornet
#

im trying to do that the bot will send the message i sent in another channel and i did, but when i send images or gifs

#

it does that

#

for gifs:

#

image:

earnest phoenix
#

no

#

you need a direct url to the image

#

the link you have right now is a link to the entire website

viscid thistle
#

Oh yea

#

It should end with .gif

pale vessel
earnest phoenix
#

oui oui baguette

solemn leaf
#

@old cliff what package

pale vessel
#

gif-frames + gifencoder + canvas????

solemn leaf
#

Lmao

#

That is what I'm doing

#

Lmfao

pale vessel
#

it's not that uncommon

earnest phoenix
#

imagine not using imagemagick

solemn leaf
#

It does the black dots on some gifs I have tested so far

pale vessel
solemn leaf
#

What

#

What is this you rant

earnest phoenix
pale vessel
#

ok now that's not fair

solemn leaf
#

What

#

This is the only gif I have got that gets the mixed pixels

old cliff
old cliff
#

add that in gif-frames

#

options

solemn leaf
#

Im on mobile

#

Cumulative true

#

How do I do that

old cliff
#

where you add the url in gif-frames

solemn leaf
#

Whag ever ill prob figure out tmr

#

Thanks thou

earnest phoenix
#

can anyone help me in detail on client.guilds.cache.size

#

used to count goild count of my bot

marble juniper
#

yus ik how to add it to your command

earnest phoenix
#

help me pls

marble juniper
#

you know how to use variables in node.js right

#

or in js in general

earnest phoenix
marble juniper
#

do you know how to use variables in js

#

lol

earnest phoenix
#

maybe nope

marble juniper
#

oh my god

earnest phoenix
#

i know m noob

marble juniper
#

please learn javascript and then come back

earnest phoenix
#

read this

marble juniper
#

great place to learn stuff

earnest phoenix
marble juniper
#

no

earnest phoenix
#

i know a bit of javascript

marble juniper
#

I can't because

  1. idk your code I can't see it
  2. I don't spoonfeed
#
  1. please just learn js
earnest phoenix
#

i know how to create a variable in javascript

#

var x = 5;

#

example

marble juniper
#

then you surely know how to use it right

earnest phoenix
#

yes

tardy hornet
#

how can i get a picture that was sent URL? but the long one, the discord with the ids

marble juniper
#

*image

tardy hornet
earnest phoenix
marble juniper
#

Idk I use a regex to get the urls from a string

old cliff
#

its already defined Thinking

earnest phoenix
marble juniper
# tardy hornet yeah

there are probably better ways but my way to do it would be with the get-urls module

tardy hornet
marble juniper
#

I think its this

tardy hornet
#

kk

#

ty

old cliff
#

@earnest phoenix

message.channel.send(`I am in ${client.guilds.cache.size} guilds!`)
fluid basin
#

tbh you can get the image using message embed generated by discord

#

either ways they work

marble juniper
#

yeah

earnest phoenix
#

oky thanks

old cliff
#

lol

marble juniper
#

@earnest phoenix I still suggest you to read this btw

#

lol

old cliff
#

lol

#

btw @marble juniper who am i ?

marble juniper
#

just another weeb

old cliff
#

old name ?

marble juniper
#

big brain answer ik

#

no idea

#

also this is for dev support

#

lol

old cliff
#

Jag

tardy hornet
#

o and i have a general question, in the URLs

#

the left id is the channel id

#

what is the right one?

old cliff
#

left guild id

#

right channel id

tardy hornet
#

o oki

old cliff
#

maybe idk not sure

marble juniper
#

I think they have something like attachment id's

earnest phoenix
#

sorry to disturb, but one more variable i need

tired panther
marble juniper
earnest phoenix
#

dislaying the name of servers it is in

marble juniper
#

you shouldn't add that in a public command

earnest phoenix
#

i got to know hot to use it

old cliff
#

read the docs

marble juniper
#

unless its a command only you can use

#

cuz privacy breach

old cliff
#

@earnest phoenix

message.channel.send(message.guild.name);
marble juniper
#

he meant multiple guilds

#

lol

old cliff
#

ok wait

marble juniper
#

no

#

don't

#

they shouldn't put that in a public command

old cliff
#
message.channel.send("I copy-pasta stuff");
marble juniper
#

I like spoons

tired panther
#

spoon - feed xD blobnook

marble juniper
#

baby spoonfeeding is ok
developer spoonfeeding is not

tired panther
old cliff
tired panther
earnest phoenix
#

to see it

marble juniper
#

ok ig

#

but first

#

read this

#

and use one of the guides then come back

#

k thanks

earnest phoenix
#

ok bro, m a biggenner

marble juniper
#

yeah the guides help you learn more is

#

*js

#

and let you go from a beginner to advanced

earnest phoenix
#

ok thanks

#

but for now please tell me

marble juniper
#

no

tired panther
marble juniper
#

no spoonfeeding

#

again

tired panther
#

@earnest phoenix What do you wanna no lol?

earnest phoenix
marble juniper
#

all you are asking for is the code

#

thats asking to be spoonfed

tired panther
earnest phoenix
old cliff
#

message.channel.send(message.guild.delete()) ?

old cliff
#

does it work ?

earnest phoenix
cobalt spruce
earnest phoenix
tired panther
cobalt spruce
#

ok

tired panther
#

and will leave the server

earnest phoenix
solemn leaf
#

@tardy hornet just copy the guilds id which ever one matches dont use

cobalt spruce
tired panther
earnest phoenix
marble juniper
#

do you like spoons?

tired panther
cobalt spruce
earnest phoenix
tired panther
old cliff
#

@earnest phoenix ok now no jokes

WE DON'T SPOONFEED CODE!!! WE CAN FIX ERRORS BUT CAN'T WRITE CODE FOR YOU!!!

solemn leaf
#

Who is creating all this noise

#

About spoon feeding

tired panther
marble juniper
#

you are supposed to write the code not we

solemn leaf
#

Come on walk them through

#

Dont just yell

earnest phoenix
solemn leaf
#

Smh

cobalt spruce
tired panther
#

@earnest phoenix we provided, how to do it, now you know it

old cliff
#

ok here u go again

marble juniper
#

im gonna explain it step by step on how you can do it

solemn leaf
#

What we doing

old cliff
#

@earnest phoenix

client.guilds.cache.map(guild => guild.name).join("\n")```
solemn leaf
#

Dont think you are allowed to do that

marble juniper
#

first you acces the guilds from the client and then the cache property from the guilds property and then you use the map function and have a guild object parameter and then you pass in the guild name and use the join function and make it a new line

marble juniper
#

congrats

old cliff
#

thank you
mention not

tired panther
solemn leaf
#

Okay nice

marble juniper
#

thats exactly what should not be done

#

lol

old cliff
#

I know

marble juniper
#

he asks for the spoonfeed and you gave it

tired panther
#

First time its okay, but next time, they should learn themselves

old cliff
#

but he will learn

marble juniper
#

yes

old cliff
#

while changing stuff in that

marble juniper
#

not if you spooooonfeeeeeed

rustic nova
#

They wont change stuff in it, trust me

tired panther
old cliff
#

lol

marble juniper
#

if you spoonfeed them and any error appears they will ask here again cuz they know they can milk out this chat dry and have to do nothing for it

tired panther
#

lol, send a link of your server ๐Ÿคฃ

cobalt spruce
#

i only drop mozila docs

#

lol

old cliff
#

Bye guys....Have to do work now....
||btw this is JAGUAR#0240||

tired panther
marble juniper
#

lol

old cliff
#

its me bruh

tired panther
marble juniper
#

if you spoonfeed they will remember that and try to abuse that just so you know as a reminder

old cliff
#

I know

tired panther
#

They will be a pull stack Developer ^^

marble juniper
#

yes

old cliff
old cliff
marble juniper
#

ur never gonna be a real good dev if you are a pull stack developer

#

lol

tired panther
old cliff
tired panther
#

html one of my things I never tried to learn sadblob

solemn leaf
#

Spoon feed me your token

tired panther
#

maybe I will make a repo, where all spoonfeed codes on top.gg are 1037_hehepepe

tired panther
#

HERE U GO

solemn leaf
#

Yeah

old cliff
#

Confession: ||I learnt 50% things like classes and promises by seeing prewritten code||

solemn leaf
#

Meister fr

solemn leaf
#

I got a huge bot full of random commands I could put on that

tired panther
solemn leaf
#

But it seems short

#

Prob fake

cobalt spruce
tired panther
cobalt spruce
#

YES

#

wait

#

@tired panther now

tired panther
cobalt spruce
#

no homo

rustic nova
#

Bruhh

tired panther
rustic nova
#

Thanks for that fucking seizure

tired panther
#

lol

cobalt spruce
cobalt spruce
#

SPOONFED

tired panther
marble juniper
#

giant spoon

old cliff
cobalt spruce
solemn leaf
#

Looks like shit but sure

marble juniper
#

lol

old cliff
solemn leaf
#

Yes

old cliff
#

whats bad ?

solemn leaf
#

Light mode made me sneeze

cobalt spruce
solemn leaf
#

Assests classes

#

So many folders

#

Clean it up

#

Commands

#

Like what

#

Chill on the new folder here

#

Util

earnest phoenix
#

๐Ÿ˜‚

solemn leaf
#

Some of the stuff there

earnest phoenix
#

Whats going on here

old cliff
#

idk

solemn leaf
#

Is the same definition as the other things

#

That you have named

#

Assests what is that for

#

Talk to me

marble juniper
old cliff
solemn leaf
#

Funny I am a java dev

#

Okay

marble juniper
solemn leaf
#

Well

cobalt spruce
marble juniper
#

just use a text ai to detect swears

#

lol

cobalt spruce
marble juniper
#

people can mix up the word

#

bruh

old cliff
#

I also have a regex swears list

solemn leaf
#

@marble juniper java sucks ass btw good lang just bad setup all the time

cobalt spruce
old cliff
#

copied it from somewhere Thinkeng

solemn leaf
#

Weeb

#

Just

marble juniper
solemn leaf
#

Another

#

Make sub folders

#

For stuff

marble juniper
#

java is just so old

solemn leaf
#

Still its so powerful

cobalt spruce
#

jkjkjkjk

marble juniper
#

people rather wanna use something like c++ or c# or javascript or python

solemn leaf
#

Uh

#

Javascript and pyhton

marble juniper
#

javascript is the most popular language on github atm

solemn leaf
#

Why would you bring them up

#

Js and py are higher levels

marble juniper
#

yeah so

solemn leaf
#

We are talking about mult core

#

Not single

marble juniper
#

you can run node.js multicore

#

wdym

rugged cobalt
#

Is there a way you can nest document x in document y in MongoDB? So that if I call on document y, there will be document x nested and I can access it (like in GuildMember you can access User)

cobalt spruce
#

idk

solemn leaf
#

โšช

#

New dot tect

#

Cant catch me alive mod

grizzled raven
rugged cobalt
#

Yeah

#

And then you just find by id and add that object to the query

sacred trout
#
    embed.add_field(name="Members", value=len(ctx.guild.members))
#

it just shows 1 member

#

how do i fix this?

modest maple
#

you dont have the intents or dont have the cache enabled

slender thistle
#

guild.member_count ๐Ÿ˜›

modest maple
slender thistle
modest maple
#

btw i wonder if anyone can off a bit of incite into wtf might be causing this to not show up

#

should be display above said video

#

issue: they dont

scarlet stratus
#

no actual member count

modest maple
#

blobpain And god am getting annoyed

earnest phoenix
#
C:\Users\DELL\OneDrive\Desktop\YesBot.js\commands\country.js:5
const track = new NovelCovid()
              ^

TypeError: NovelCovid is not a constructor
    at Object.<anonymous> (C:\Users\DELL\OneDrive\Desktop\YesBot.js\commands\country.js:5:15)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\DELL\OneDrive\Desktop\YesBot.js\bot.js:11:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)```
#

why it is happening?

scarlet stratus
sacred trout
#

but i use client

#

not bot

scarlet stratus
#

then use client in it

#

๐Ÿ˜„

modest maple
zenith terrace
sacred trout
#

I am

#

still error

earnest phoenix
honest perch
#

NovelCovid is not a constructor

earnest phoenix
#

wasnt it

honest perch
pale vessel
#

why do people use wrappers for such a simple thing

#

isn't it just a GET request

honest perch
#

it is indeed

earnest phoenix
honest perch
earnest phoenix
#

my friend didnt mention about it

pale vessel
#

don't always rely on wrappers

earnest phoenix
#

get request

#

ok

#

then how can i do without wrapper?

#

get request

earnest phoenix
jovial nexus
#

if i make a web, how can i changue the color of the embed that discord shows when someone sends the link?

honest perch
pale vessel
#

use the theme-color meta tag

jovial nexus
#

like <meta name="theme-color", content="#FFFFF">?

pale vessel
#

TIAS

jovial nexus
#

that worked, thanks, and for a logo?

pale vessel
#

favicon

#

<link rel="icon" href="favicon32.png">

jovial nexus
#

i have <link rel="shortcut icon" href="assets/favicon.png" type="image/x-icon">

pale vessel
#

<link rel="icon" if you want the favicon on the tab

jovial nexus
#

and og:image?

pale vessel
#

i believe that's for embed

#

not sure thumbnail or image

#

it's for thumbnail

scarlet stratus
# sacred trout still error
@client.command()
async def memberscount(ctx):
  await ctx.send(ctx.guild.member_count)
``` for me it works but without embed
sacred trout
#

thanks

#

does anyone know sqlite

eternal osprey
#

holy shit i just got a really strange ringtone

#

on discord

#

idk did they change it?

sacred trout
#

please help with this code

#

@pale vessel

pale vessel
#

any errors?

sacred trout
#

yea

#

it doesn't send the message

#

it stores in the sqlite file as well

pale vessel
#

it doesn't output anything in the console?

sacred trout
#

nop3

#

please ping me if you can gelp

#

help

#

@pale vessel

silent cloud
#

hey guys

#

why when i try to search my bot, i doesnt see it ...

#

thats all

#

where is my

#

i have approved around 2 years

#

my bot

#

try to find it with search bar

#

you cant

earnest phoenix
#

probably because you have the emoji

#

and dbl has shit fuzzy search

pure lion
#

that

#

when i type in my bots name (with the correct case and everything) nothing pops up

#

very stup

silent cloud
earnest phoenix
#

im just speculating fyi

#

best to ask a web dev directly

silent cloud
#

ye

#

thats heped

#

helped

sacred trout
#

@pale vessel

slender thistle
#

Don't pester users for help

#

Print what member.split("#") returned

gaunt yarrow
#

Hello guys is there any api which counts in how many server the bot is in currently

quartz kindle
#

how many servers you bot is currently in?

quartz kindle
#

you have that information inside it already

gaunt yarrow
quartz kindle
#

which library?

#

discord.js?

gaunt yarrow
#

Like Playing in 3 servers

gaunt yarrow
quartz kindle
#

client.guilds.cache.size will give you the number

gaunt yarrow
#

okk

#

lemme try

#

thanks

#

๐Ÿ˜„

quartz kindle
#

so you can for example ```js
client.user.setActivity(playing in ${client.guilds.cache.size} servers)

gaunt yarrow
#

thanks for the help @quartz kindle ๐Ÿ˜„ ๐Ÿ™Œ

sacred trout
#

can anyone help me with sqlite stuff

slender thistle
#

A separate connection on each command

#

Yeah no chief

earnest phoenix
#

toggle off code grant requirement on the developers page

misty sigil
#

Code grant is enabled

#

chances are, if you donโ€™t know what a code grant is, you donโ€™t need one

earnest phoenix
#

clicks switch without knowing what it does
wHY thIS HAPPEn?=???!

gilded olive
toxic raptor
modest maple
#

and yet people still eat tide pods

outer perch
pale vessel
#

You can't request the intent for that feature

#

It needs to be original

earnest phoenix
#

still waiting for the day presence comes to REST

pale vessel
#

i don't think that's happening

earnest phoenix
#

like the other 90% of features they promised on discord-api-docs repo

lyric mountain
#

oh, wait, did a quick fix

#

now it's perfect

misty sigil
#

Beautiful

outer perch
lyric mountain
#

like, you need a genuine reason to request those gateways

earnest phoenix
#

intents*

#

but yes

#

presence isn't necessary for your whois command to function

#

you need a valid reason as to why your bot should have it

outer perch
#

aight

#

time to delete the command

pale vessel
#

Yes

#

delete it

earnest phoenix
#

I did request it for trivial things and they approved it kekw

lyric mountain
#

depends on how trivial it is

earnest phoenix
#

Basically just needed spotify presence for a card command KEKW

pale vessel
#

Worked for me and you but not Voltrex

#

He had to add "Spotify lyrics command"

earnest phoenix
#

Lmao

outer perch
#

I guess I just applied for bot verification only

#

thought it was including intents

earnest phoenix
#

But eventually he got it

outer perch
#

that one u get asked for when u have it in 76+ servers

#

one thing. If I want to bulk-give roles in a server, I'll need GUILD_MEMBERS right?

quartz kindle
#

if you have the member's ids no

outer perch
#

imagine it's the first time doing it

quartz kindle
#

you need GUILD_MEMBERS to receive guildMemberAdd events and to fetch all members

#

you dont need it for actually assigning roles

outer perch
#

aight

earnest phoenix
#

Can't you just gradually assign roles as they send messages?

quartz kindle
#

you can

earnest phoenix
#

That's what I do, but might not suit your case

quartz kindle
#

imagine you want to add a role when they join, you can require them to send a message in an entrance channel to get the role instead

outer perch
#

hmm, I used to store the Owner ID each time the bot entered a guild

misty sigil
#

GUILD_MEMEMBERS

quartz kindle
#

the owner id doesnt need to be stored, its always available

outer perch
#

but at one point, I couldn't retrieve any value

quartz kindle
#

MEMEMBERS

outer perch
quartz kindle
#

xD

outer perch
#

but I guess I can do a hidden command for that

quartz kindle
#

ye you can simply fetch it when you need it

#

guild.members.fetch(guild.ownerID)

outer perch
#

idk, like, someone having problems or something in that server, I need the Owner ID to check if the one asking for support is the owner

quartz kindle
#

guild.ownerID always exists

#

unless

#

they change ownership

outer perch
#

a prefix or language error

outer perch
#

doesn't the ID change according to the new owner?

quartz kindle
#

oh wait, ownership changes is GUILD_UPDATE not MEMBER_UPDATE

#

so it will work yes

outer perch
#

ye

tribal siren
#

hi tim

quartz kindle
#

hi

outer perch
#

so, in which situations I'd need to have GUILD_MEMBERS?

tribal siren
#

like a hell lot situations

outer perch
#

describe some frequent ones

quartz kindle
#

i posted this yesterday

tribal siren
#

goddamn i was about to write it

outer perch
#

well, thx

quartz kindle
#

i didnt mention the side effects of not receiving those events

cinder patio
#

fetch members with presences can't they just not send the presence object with the response? Having that intent enabled just to be able to fetch members with presences doesn't sound right

quartz kindle
#

but they include member roles, usernames, nicknames and memberCount not updating automatically

quartz kindle
#

if you dont have the intent, you cant request members with presences

cinder patio
#

That's stupid

quartz kindle
#

they should at least allow it to work without the gateway intent

#

like, if you had the priviledge enabled in the dev portal, but not the actual intent in the code, you should still be able to fetch presences

#

but no

earnest phoenix
#

exposing presence through rest when, wait, is it even beneficial

quartz kindle
#

you have to have the actual intent and be bombarded with millions of presenceUpdates just so you can fetch them on demand

#

yes, they stupid

quartz kindle
earnest phoenix
#

remember that privileged intents and bot verification were meant to prevent scraping member data

#

....yeah they didn't prevent that at all

#

you get the member object on TYPING_START

#

lol

misty sigil
#

smart.

quartz kindle
#

i mean

#

you can get them from typing start the same way you can get them from messages

#

and typing implies they will send a message

earnest phoenix
#

good point

quartz kindle
#

its different from fetching all offline members and shit

misty sigil
#

what if they donโ€™t wanna send a message

#

they type but then donโ€™t send anything

quartz kindle
#

if anything, sending member data on typing is a waste of bandwidth and cpu

earnest phoenix
#

and the fact that you can query members defeats the point of privileged intents... because you can still download member data that way

quartz kindle
#

yes, but you are much more limited

earnest phoenix
#

true

quartz kindle
#

you can only query by username and by id

#

so it requires you to have some knowledge already

#

and only 100 at a time

#

doesnt stop you from doing fetch({query:"a"}) fetch({query:"b"}) fetch({query:"c"}) lmao

#

but it wont be enough on large guilds plus its way more annoying

vague lake
#

Someone help me, I wanted to separate the commands from my bot inside the commands folder, like inside the commands folder to have the administration folder, fun and so on, does anyone know how to organize like this?

#

Please help me

tired panther
#

@vague lake look in djs guide, they made a pr on this

vague lake
dusky sundial
#

Then what @tired panther said will probably help you

vague lake
#

Because my bot has a lot of commands, there it is difficult to move everything, and so on.

tired panther
#

one sec

vague lake
#

Ok

sinful lotus
earnest phoenix
#

inb4 how would i do that in code

tired panther
sinful lotus
#

on the second round of readdir, since you know this is your command files, just do a make sure check using dirent.isFile() to make sure what you are loading is a file then do your command loading stuff

cinder patio
#

Or you could use recursion

quartz kindle
#

delicious

cinder patio
#

The code in the tutorial will become harder to maintain when you want to add more sub-folders

tired panther
split sand
#

can anyone help me??
i want to be a bot developer can anyone tell me what i need to do???

ok!
! **1st ** learn Programming languages and then????can anyone tell me ๐Ÿ™‚

sinful lotus
#

then make the bot

tired panther
sinful lotus
#

if you know the program language, you can start creating a basic bot, then after you get the gist, make a more advanced one

#

also it doesn't need to be Discord.JS

#

you can learn any programing language you want

tribal siren
sinful lotus
#

don't be confined on what anyone says, and try languages that interest you instead

quartz kindle
#

make a bot in C

tribal siren
#

choose carefully

sinful lotus
#

KEKW pass

tribal siren
#

i started with python and i failed so i moved to javascript

quartz kindle
#

better yet, make a bot in C using n-api and run it in node.js

cinder patio
misty sigil
#

ooooh noooo

misty sigil
#

await console.log

cinder patio
#

Imagine using that instead an eight line function

tired panther
split sand
#

which language i need to learn first?? ๐Ÿค”

tired panther
cinder patio
#

It's your personal choice

#

You can start with any language

earnest phoenix
#

As people say, pick what interests you

split sand
split sand
#

ok

earnest phoenix
#

why not?

sinful lotus
split sand
#

i am interesred in python and js

cinder patio
#

There isn't a limit on how much languages you can learn, lmao

tired panther
earnest phoenix
#

Might be easier to focus on a language first though, if you're really new.

split sand
#

Hello world

sinful lotus
#

that also doable

#

tho I'm using async counterparts for fs operations for runtime operations

earnest phoenix
#

you are just scaring with your solution

sinful lotus
#

the thing I hate about javascript is the single thread nature, so I'm really picky on what I do

earnest phoenix
quartz kindle
#

you can always use worker threads

sinful lotus
#

and most stuffs I do is offload the processing to an api

cinder patio
#

You are loading all the files only once during startup, so it doesn't matter

quartz kindle
#

its also better as it insures all files are ready before the connection starts

sinful lotus
#

depends on use case, I use the same functions for some commands like a global reload

#

and I dont want to do 2 functions

quartz kindle
#

imagine you start receiving message events while the commands are not even loaded yet

sinful lotus
#

and I also make sure before you login, I got additional securities, that renders the bot useless until my custom ready is done

#

so those are not my problems since I already thought of those before hand

#

but yeah, one function that does the same stuff throughout is better, as I dont need to do 2 functions while ensuring nothing breaks on startup

quartz kindle
#

if i were to do it, i would do something like this ```js
(function load(folder) {
readdirSync(folder, { withFileTypes: true }).forEach(entry => {
if(entry.isDirectory()) load(${folder}/${entry.name})
else client.commands.set(entry.name, require(${folder}/${entry.name}))
})
})("./commands")

lament rock
#

I thought readdirSync returns Array<string>

quartz kindle
#

not with withFileTypes

sinful lotus
#

if you supplied it with, options like that, it would return fs.dirent

lament rock
#

Mmm. I see

earnest phoenix
#

Is there a way to see which servers use my bot?

quartz kindle
#

in what way?

#

just check guild ids in your commands

earnest phoenix
#

What?

#

How..

cinder patio
#

client.guilds.cache is a Collection with all guilds your bot is in

earnest phoenix
#

Ahhhh

#

Thanks!

#

I would like to meet the server owners lol

quartz kindle
#

yes, ask them why the fek do they use your dumbo bot

#

:^)

earnest phoenix
#

P

sinful lotus
#

becareful

#

some guildowners hate to get invaded

earnest phoenix
#

Oh uh

sinful lotus
#

make sure you announce beforehand, or put something on your bot that lets them opt out

#

if they dont want

quartz kindle
#

for a minute i though you were matthew lmao

earnest phoenix
#

Lol

misty sigil
#

did someone say matthew

slender thistle
#

I have that same issue

earnest phoenix
misty sigil
#

damn I lurk at all the right times

earnest phoenix
sinful lotus
#

on where you have a reference of your client

quartz kindle
#

just read the discord api docs lol

earnest phoenix
#

client.guilds.cache where do I even put this?

quartz kindle
#

lol

sinful lotus
#

on where you have a reference of your client

#

I clearly answered you

crimson vapor
#

I didn't know you could do that

quartz kindle
earnest phoenix
#

Sure

crimson vapor
sinful lotus
#

in this case, message.client

quartz kindle
quartz kindle
#

thats all

earnest phoenix
#

Oh thanks, but I have to put this before client.guilds.cache right?

sinful lotus
#

message.client.guilds.cache

#

then do whatever you want to do on cache

earnest phoenix
#

Oh Alr, and then console log

#

Thanks!

quartz kindle
#
console.log(`this command was run in ${message.guild.name} (id: ${message.guild.id})`)
#

you dont need client.guilds

earnest phoenix
#

Thanks, lol

quartz kindle
#

unless you want to list all guilds, or get a total number of guilds

sinful lotus
#

wait where is the talk started on guild.cache

earnest phoenix
#

Alrighty!

sinful lotus
#

thats what I was answering KEKW

earnest phoenix
#

Lol

quartz kindle
#

id

#

k

earnest phoenix
quartz kindle
#

lmao

sinful lotus
quartz kindle
earnest phoenix
#

discord is ๐Ÿ’ฉ

#

@quartz kindle and how can I even join the server by Id lol?

quartz kindle
#

you cant

trim saddle
#

integration?

earnest phoenix
#

Damn

umbral zealot
#

Bots can't join servers on their own.

earnest phoenix
#

Yes, Iโ€™m asking how I can lol...

umbral zealot
#

You shouldn't be joining servers your bot is on.

trim saddle
#

there's a scope that allows you to add a user via oauth

umbral zealot
#

Creating an invite and joining servers is considered a breach of privacy, don't do it.

quartz kindle
#

you need to either access or generate a guild invite using your bot, which is pretty much a privacy breach and against the TOS, or send a dm to the guild owner and ask them

trim saddle
#

that uses the server id

earnest phoenix
#

Alr, sure. I wonโ€™t do it if itโ€™s against TOS.

trim saddle
#

i feel like i'm just being ignored

earnest phoenix
#

Nonono. Iโ€™m listening @trim saddle

sinful lotus
#

you mean, generate an invite link, then join their guild without the owner knowing?

earnest phoenix
quartz kindle
#

its not

umbral zealot
#

What you're saying is technically correct, skull, but it's still against the ToS to create invites and randomly join servers.

earnest phoenix
#

No, lol...

trim saddle
#

the oauth method isn't against tos

earnest phoenix
#

Really?

trim saddle
#

yes

quartz kindle
#

if you set up an integration and the user strictly allows it, then you can

trim saddle
#

but the user would have to set that up themselves

#

not you

earnest phoenix
#

Alr!

#

Sure.

quartz kindle
#

but thats not what clarckson here wants

earnest phoenix
#

Lol

quartz kindle
#

what you want to do is to send a dm to the guild owner and ask them for an interview

earnest phoenix
#

Sure LMAO

quartz kindle
#

or for permission to join

sinful lotus
#

and yes, dont just generate an invite link

#

without the owner knowing

#

then join their guild

#

I think they can get you suspended or application revoked for that?

#

not sure

earnest phoenix
#

I see.

quartz kindle
#

you can 1: use your bot to get the owner's username and tag, then send them a friend request yourself
or 2: dm them with the bot itself

earnest phoenix
#

I would just like to meet them and thank them, lol..

#

your bot should only respond to actions a user triggered with the intention to get a response from your bot

sinful lotus
#

for example I added your bot in one of my secret guilds, then you suddenly joined my guild, I won't feel very happy if I am the owner of that guild

umbral zealot
#

We've had bot owners join a testing server where we were trying the bot - that literally gets them insta-denied and banned, if that gives you any indication of whether or not you should do it ๐Ÿ˜›

earnest phoenix
#

Ohh, true

#

Yea.. I wonโ€™t do it then, too dangerous...

sinful lotus
#

since I didn't specifically told the bot to generate an invite link

#

and let you join

earnest phoenix
#

Alr thanks!

quartz kindle
#

LOL

earnest phoenix
#

LOL

umbral zealot
sinful lotus
earnest phoenix
#

would it be bad to assume it was a turk

umbral zealot
#

The Verification Center doesn't have create invite perms, but we sometime tests commands in other servers (for commands we think might destroy channels and roles and such). A couple times I've had bot owners join and try to mansplain their bot to me or just say hi.

earnest phoenix
#

Damn, I wanna be a bot reviewer... would be fun testing bots. If I had a chance I would do it..

quartz kindle
#

lmao

sinful lotus
#

depends, it could be tiring or enjoyable depending on your mindset

#

for me if I'm reviewing bot's that aren't one of the languages I know its very tiring

earnest phoenix
#

Is there a way I can apply for it?

sinful lotus
#

dbl opens apps from time to time if they need it

quartz kindle
#

you apply when apps are open

sinful lotus
#

other than that no other way

earnest phoenix
#

Ah, ok.

#

Alrighty, thanks

quartz kindle
#

is there a minimum number of bots you have to review to keep your position as a reviewer?

earnest phoenix
#

I think so yeah, probably. since if you are inactive why would they need you lol.

deft lark
#

hi

quartz kindle
#

hmm thats not too bad

earnest phoenix
#

how long does it take to review one bot? (considering It's not offline and etc)

sturdy dock
#

weird question but are discord user ids 100% random? (ie equal chance of starting with 1-9)

summer torrent
earnest phoenix
#

hey can anyone help me with node.js variable for purge command

#

let variable = "purge command"

earnest phoenix
#

that'll be $99.50 + tax

sturdy dock
earnest phoenix
#

i mean how should i add this command to my bot, as i tried coding but was unsuccessful

summer torrent
umbral zealot
#

tbh the only real answer is "as long as it takes".

#

depends on the bot, its features, etc.

earnest phoenix
#

hey can anyone help me with node.js variable for purge command
i mean how should i add this command to my bot, as i tried coding but was unsuccessful

cinder patio
#

if you can't, learn how

umbral zealot
earnest phoenix
umbral zealot
#

Ok so what have you tried

cinder patio
#

Is there a specific problem or are you expecting to be spoonfed?

earnest phoenix
#
case 'clear':
            if(!args[1]) return message.reply ('Error, please define second argument')
            message.channel.bulkDelete(args[1])```
#

i tried this

umbral zealot
#

That most definitely looks like it would work

#

assuming args[1] was a number between 2 and 100

earnest phoenix
cinder patio
#

with what input did you try the command

earnest phoenix
#

.clear

umbral zealot
#

ok and did that return please define the second argument?

earnest phoenix
#

bot giving no response to this command

umbral zealot
#

then it means that code isn't running at all