#development

1 messages · Page 1719 of 1

vivid fulcrum
#

yeah

#

are you sure you're requiring the right file?

opaque acorn
#

`const Discord = require("discord.js");
const client = new Discord.Client();
const config = require("./config.json");

client.commands = new Discord.Collection();
client.event = new Discord.Collection();

["command_handler", "event_handler"].forEach(handler => {
require(.handlers/${handler})(client, Discord)
});

client.login(config.token);`

vivid fulcrum
#

did you edit the config.json in notepad by any chance

opaque acorn
#

no

vivid fulcrum
#

hm

#

it should be perfectly valid

opaque acorn
#

SyntaxError: C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\config.json: Unexpected end of JSON input
at parse (<anonymous>)
at Object.Module._extensions..json (node:internal/modules/cjs/loader:1135:22)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\index.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)

#

3 16

vivid fulcrum
#

hm

#

try programatically printing out the file content with fs

#

require fs at the top

#

comment out the config.json require

#

and console.log(fs.readFileSync("config.json", "utf8"));

opaque acorn
#

fs

#

ok

vivid fulcrum
#

lmk what it prints out

opaque acorn
#

nothing

#

same

vivid fulcrum
#

are you sure the file is there and is saved

opaque acorn
#

wait

#

@vivid fulcrum PS C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO> node .
node:internal/modules/cjs/loader:927
throw err;
^

Error: Cannot find module 'handlers/command_handler'
Require stack:

  • C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\index.js:9:5
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\index.js:8:38)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\Users\MagiK\Desktop\BOT SENGOKU NADEKO\index.js' ]
#

now what

vivid fulcrum
#

you have no file named command_handler

#

inside of the handlers folder

opaque acorn
#

ye

quartz kindle
#

you didnt save the file

opaque acorn
#

a

#

done

#

thx

zenith knoll
#

In Mariadb/MySQL what is the datatype for storing a list of things such as IDS/Strings

zenith knoll
opaque acorn
#

a

#

i didnt see it

#

but thx

sage bobcat
compact echo
#

Totally didn't spend 10+ min wondering why my code didn't work when I didn't save the file Detectivedoggo

zenith knoll
#
CREATE TABLE Guilds (
    guildID VARCHAR NOT NULL PRIMARY KEY,
    guildPrefix VARCHAR NOT NULL,
    guildOperator VARCHAR NOT NULL,
);

``` It says syntax error, any ideas?
vivid fulcrum
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

lyric mountain
zenith knoll
lyric mountain
#

if you're using mysql, I recommend VARCHAR(191)

zenith knoll
#

yeah i can just use varechar(MAX)

#

how come?

lyric mountain
#

mysql has a reeeeeeally weird bug

zenith knoll
#

i use mysql2 for npm but the db is mariadb ;)

lyric mountain
#

if you input any utf-8 character (like emotes) and the length is higher than 191 it goes haywire

#

like data not being saved, being saved wrong or being fakely saved

zenith knoll
#

kk

vivid fulcrum
#

mysql garbage db anyways lol

lyric mountain
#

also prone to corruption for absolutely no reason

zenith knoll
#

I mean I believe IDs are 18 chars always

lyric mountain
#

rule of thumb is: anything that comes from oracle is shit

zenith knoll
#

i said

lyric mountain
#

oracle java = shit

zenith knoll
#

i use mariadb

vivid fulcrum
#

i love how mysql has utf8mb4 and still has a stroke with some 4 byte chars

lyric mountain
#

open jdk = god

lyric mountain
zenith knoll
#

maria is a fork from mysql

#

"a drop in replacement"

#

by the Maria Foundation

lyric mountain
#

oh nvm

#

innodb is the engine

#

maria is an actual db

#

but still

zenith knoll
#

and java isnt all that bad

lyric mountain
#

java isnt

zenith knoll
#

i mean android is made in java

lyric mountain
#

oracle jdk is

zenith knoll
#

ok well it depends what jdk u use

lyric mountain
#

I don't mean java the language, I mean oracle jdk

#

oracle

#

or

zenith knoll
#

i use oracle since its the default lmaoooooooooooooooooooooooooooo

lyric mountain
#

acle

#

who said?

#

default is openjdk actually

zenith knoll
#

oh maybe im using that then

lyric mountain
#

which is the best thing after cheddar

lyric mountain
zenith knoll
#

windows ye

#

i use eclipse as IDE

lyric mountain
#

99% sure you're using oracle's

zenith knoll
#

for java

#

yea i told u i am

lyric mountain
#

change

#

there's no light there

zenith knoll
#

when i install java i instal the one from oracle website

lyric mountain
#

let me guess, java 1.8?

zenith knoll
#

yea

#

i only use java for coding mc plugins for my server lol

lyric mountain
#

you're missing like THE WHOLE java

zenith knoll
#

i use js for discord bots

lyric mountain
#

1.8 is way too outdated

zenith knoll
#

and py for small projects

#

I mean

#

1.8 is what mc uses

#

so i use whats best with it

vivid fulcrum
#

it doesn't

lyric mountain
#

mc uses the most recent version you have

zenith knoll
#

oh

vivid fulcrum
#

it doesn't

zenith knoll
#

welp

#

maybe im dumb

#

but thats why im not a java main lol

vivid fulcrum
#

mc comes with a prepackaged java distribution in the launcher

#

idk what version it is

zenith knoll
#

okokokokokokkkkkkkkkkk

#

i get it im using a bad jdk

vivid fulcrum
#

but i know that 1.17 drops support for java 1.8

lyric mountain
#

look, there are two jdks

vivid fulcrum
#

and 1.15 and 1.16 show warnings it's going to drop support

leaden kestrel
#

okay i need help making a warn command

lyric mountain
#

the stinky greedy garbage that is oracle's

zenith knoll
#

I use 1.8.8 paper since my server is a pvp based one

lyric mountain
#

and the selfless humble god that is openjdk

zenith knoll
#

...

#

and i thought 1.8 java is best with 1.8.8

#

since well

#

idk

leaden kestrel
#

my bot crashes and i have npm i everything again

lyric mountain
#

openjdk doesn't have a fancy installer that tells you java is used in 1.6 billion devices

zenith knoll
#

LMAO

zenith knoll
leaden kestrel
#

yes

#

when i do it

zenith knoll
#

send the error here please

lyric mountain
#

but the extra work is worth it

leaden kestrel
#

okay

vivid fulcrum
lyric mountain
#

exactly

leaden kestrel
#

i cant

lyric mountain
#

I wouldn't be surprised if oracle was behind most negative global events

leaden kestrel
#

my visual studio crashes with it

#

its weird

zenith knoll
#

lmao

#

uh

#

are you using some like old pc that crashes on everything?

zenith knoll
lyric mountain
#

here my boy

#

free yourself

zenith knoll
#

UX is WAYYYYYYYYYYYY better imo

lyric mountain
#

from oracle's grasp

#

don't give your blood type

zenith knoll
#

i dont usually even use java lmao

lyric mountain
#

to that organization

zenith knoll
#

do you code discord bots in java?

leaden kestrel
#

first time project

zenith knoll
#

Can you send us the code?

#

if its ok with you

lyric mountain
#

yep

#

full java here

#

full except for her website

vivid fulcrum
#

imagine using java in 2021 when there's .net 5.0

zenith knoll
#

who??

lyric mountain
#

my bot

zenith knoll
#

oh

#

sorry

lyric mountain
#

she self-identifies as a loli

zenith knoll
#

wait what

#

but

lyric mountain
#

(someone didn't watch ngnl)

zenith knoll
#

tos moment

#

(/^w^\)

zenith knoll
lyric mountain
#

but anyway

zenith knoll
#

ok

#

moving on

lyric mountain
#

tldr: oracle is shit, everything they touch becomes shit

#

reverse midas

earnest phoenix
#

Is the invite manager broken?

vivid fulcrum
#

the

zenith knoll
#

because if you need help on a specific bot go to their support server

leaden kestrel
#
module.exports = {
    name: 'ban',
    aliases: [],
    category: 'Moderation',
    utilisation: '{prefix}ban [member] <reason>',
    description: 'Bans the users if the author have the permissions',

    async execute(client, message, args) {

        if (!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send({
            embed: {
                color: 'BLUE',
                author: { name: 'Ban' },
                footer: { text: 'Error' },
                fields: [
                    { name: `${client.emotes.error} - ERROR:`, value: `You do not have permissions to ban members`, inline: false },
                ],
                timestamp: new Date(),
            },
        });


        const member = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));

        if (!member) return message.channel.send({
            embed: {
                color: 'RED',
                description: `${client.emotes.error} - Please specify a user`,
                }

            }).then(msg => { msg.delete({ timeout: 2000 }) });

        if (member.hasPermission('VIEW_AUDIT_LOG')) return message.channel.send({
            embed: {
                color: 'RED',
                description: `${client.emotes.error} - This user can not be banned`,
                }

            }).then(msg => { msg.delete({ timeout: 2000 }) });

        const reason = args.slice(1).join(" ") || 'No reason provided';

        await message.guild.members.ban(member.id, { reason: reason, days: 7 }).then(member => {
            message.channel.send({
            embed: {
                color: 'GREEN',
                description: `${client.emotes.success} - **${member.tag}** was banned for **${reason}**`,
                }

            }).then(msg => { msg.delete({ timeout: 2000 }) });
        })

    },

};
#

this is my ban command

zenith knoll
leaden kestrel
#

no

#

look for it

zenith knoll
#

what

leaden kestrel
#

ban command

zenith knoll
#

so your saying it crashes on startup?

leaden kestrel
#

yes

#

and when i deleted the commands

#

works

zenith knoll
leaden kestrel
#

yes

#

when i do +warn

zenith knoll
#

show the warn cmd then

#

not the ban cmd

#

you said it crashes on staartup

leaden kestrel
#

oh i did

zenith knoll
#

not the warn

leaden kestrel
#

ik

zenith knoll
#

so send

#

the

#

warn

#

cmd

#

you cant expect us to help you when you dont give the info lol

leaden kestrel
#

ik'

sage bobcat
#

One message removed from a suspended account.

leaden kestrel
#

wait

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

compact echo
#

I can't say if that's smth I would be excited about.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

compact echo
#

oh your talking bout discord

zenith knoll
compact echo
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

sage bobcat
zenith knoll
#
i like how for javascript there is not just ONE highlighting but 2

js and javascript

also i like spamming if if if if if firififi fifii if if because im using ighlighting for something not js```
sage bobcat
#

One message removed from a suspended account.

zenith knoll
#

it is forme

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

compact echo
#

hmm wth

zenith knoll
#
require()
compact echo
sage bobcat
#

One message removed from a suspended account.

zenith knoll
#

mines red

#

but i am windows user

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

zenith knoll
#

ik

sage bobcat
#

One message removed from a suspended account.

zenith knoll
#

'thats why i said im on windows

compact echo
#

that's sad

zenith knoll
#

cri

leaden kestrel
#
require 
compact echo
#

they should just release highlighting for everything at once

#

rather than just release it one by one

zenith knoll
#

unless u dont want help anymore

leaden kestrel
#

nvmi fixed it

compact echo
#

istg the most types of errors with discord.js is with someone using a command handler but putting the wrong names for the parameters

zenith knoll
#

lmao

#

yea

compact echo
#

lmfao your name is just so right

zenith knoll
#

for some reason statics problem was so bad that the cmd not only stopped the bot but also vs lmao

zenith knoll
#

ill buy nitro when i change it again

compact echo
#
const learnJS = {whyDoesThisNotWork: "That's cause you didn't learn javascript"}
if (iDontKnowJs) return {learnJS}```
zenith knoll
#

new member: does this work?

Regular helpful dude: checks code. yep, probably

TOPGG USERS: pepowot https://tryitands.ee 🤔

compact echo
#

lmfao so true

zenith knoll
#

dot

compact echo
#

making an api with express is quite easy think

zenith knoll
#

i cant code so

#

if i eval'ed my nickname id return

#

i even used discord bot maker to get bot dev and topgg approved

compact echo
#

lmfao imagine using discord bot maker tho

zenith knoll
#

nah

#

i just cant code

#

my 'c' key broke because of the copy pasta i did to make a bot

compact echo
#

O.o

zenith knoll
#

im using the c key n the laptop built in keyboard since the on on my actual keyboard broke

lament rock
# zenith knoll new member: does this work? Regular helpful dude: *checks code*. yep, probably ...

Not everyone has the time to completely dedicate their focus into others' code bases to help them solve a problem. Asking if something will work is kinda pointless unless it's too expensive to test normally.
Although, understanding logic and being type safe helps everyone out in the long run and will prevent errors from occurring in the first place. I can't remember the last time I ran into an error that was actually my fault

lament rock
#

it seemed like an insult to some

quaint wasp
#

umm

#

how can run events folder

#

all the time

#

?

#

I forgot..

#

I used to remember it

#

but after a long break forgot it.

odd stratus
#

You could do something like

fs.readdir("./Events/", ... other stuff here) in index.js, similar to how you load your commands folder @quaint wasp

tepid agate
#

Why can't VScode read the ID, how do i fix it?

quaint wasp
#

o

#

ok.

odd stratus
#

It shows it’s unsaved

summer torrent
#

just enable auto save smh

tepid agate
ancient gulch
#

my bot is on my 100k member server, but when i do client.users.cache.size it return 1416 does someone know why

summer torrent
#

do you have guild_members intent

ancient gulch
#

yes

#

i think

#

let me check

summer torrent
#

did you enable it in your code

ancient gulch
#

yes i have it

#

no

#

i don't

odd stratus
#

Like all lowercase

ancient gulch
summer torrent
#

what lib

#

wait discordjs

#

add it to client options

#

let me send guide link

ancient gulch
#

okay

tepid agate
summer torrent
ancient gulch
#

can i do that?

const { Client, Intents } = require('discord.js')

const client = new Client({ intents: Intents.ALL});
#

now it say 800 users

earnest phoenix
ancient gulch
#

yes

#

but still get 800 users with client.users.cache.size

#

and everytime i restart the bot i get a new number

opal plank
#

@ancient gulch cuz you arent requesting all users on startup, as the name says cache, its only users cached, djs by default will lazily load them

#

i wouldnt recommend doing it, but if you have the ram to spare, you can request ALL members from the guilds. You need intents enabled for MEMBER_CHUNKS though

#

d.js highly likely has an option for it on the client startup, but i dont remember. you can always do this too tho ts for(let guild of client.guilds.cache.values()) await guild.members.fetch()

ancient gulch
#

oh yeah it's "fetchAllMembers: true"

lyric mountain
#

Ram nuke

opal plank
#

mine doesnt use that much tbh on detritus

#

i could run it without the members

#

1.2GB with 700k+ members

earnest phoenix
#

What host is that?

quaint wasp
#

why

opal plank
compact echo
#

as the package name

quaint wasp
#

o

#

alr.

#

thanks

compact echo
#

you could also hover over the error and read it

earnest phoenix
opal plank
#

wholesaleinternet

long crow
#

wholesalemarket sound better

earnest phoenix
#

Is it a VPS

quaint wasp
#

umm

#

can there be

opal plank
quaint wasp
#

small capital letter in .env file?

#

Or all have to be capitilaized?

#

hi?

#

please help.

#

Its important.

odd stratus
#

Idk I’ve always used all capital letters in an env file lol

#

For example TOKEN= and DB_PASS=

compact echo
#

Same

#

It's just like a habit

opal plank
#

its a good habit, cuz thats how you're suppose to do it

#

capitalised is the norm

compact echo
#

I don't use .env often tho lel

odd stratus
#

Should I use MySQL or PostgreSQL for this levelling bot Thonk

opal plank
#

either should be fine

quaint wasp
#

but... if you like

#

already got 17 things in jason

opal plank
#

postgres is fun cuz it has a lot more advanmced stuff

quaint wasp
#

and want to transform it

compact echo
#

^

opal plank
#

though i dont think you'll be using them

quaint wasp
#

do you have to go back

#

and change it all?

#

to caps?

opal plank
lyric mountain
#

Smol, quick and simple

opal plank
#

^^ something lighter is also a good choice

lyric mountain
#

Sqlite is a mystery

#

Powered by a singularity

opal plank
#

then djs is a blackhole? THINKING

lyric mountain
#

Djs is a whitehole

opal plank
#

but it sucks ram

quaint wasp
#

bruh

lyric mountain
#

All the space sqlite saves goes to djs hog

quaint wasp
#

answer me pelase

opal plank
#

answer what?

quaint wasp
#

do you have to capitilize letters in .env?

opal plank
#

no

compact echo
#

no

opal plank
#

should you? yes

compact echo
#

It's just a best practice

quaint wasp
#

like
topken=tafasoiudfsannidfsabldgybcsadf

compact echo
#

good*

opal plank
#

its standard to capitalise it

compact echo
#

You aren't forced to capitalize it.

quaint wasp
#

alright, it will still work, right?

compact echo
#

Yuh

odd stratus
opal plank
#

in all honesty member count isnt an accurate representation of ur usage

#

i assume tis a normal exp bot

#

where you get exp when you type

lyric mountain
#

Constants = SNAKE_CAPS
variables = camelCase
Class = PascalCase
Project = kebab-case

opal plank
#

message/m is a much better way to see how much you should be concerning yourself with

odd stratus
opal plank
#

that'll tell you how many calls/changes are being done on ur bot

#

i do it myself

lyric mountain
quaint wasp
lyric mountain
#

Since it use very primitive types

opal plank
quaint wasp
#

did you make it?

#

WOW

opal plank
lyric mountain
opal plank
#

its using grafana and prom

opal plank
#

thats it

#

its a single integer

lyric mountain
#

One day I'll make a stats panel

#

One day

opal plank
#

thats what we always say

#

theres more on the bottom part

#

but its not finished so i wont show

lyric mountain
#

I mean, I already store stats and have a chart command

opal plank
#

fuck!

lyric mountain
#

But...I'll leave a live panel to another time

opal plank
#

i keep coughing and it sounds like a rubber duck squeaking

lyric mountain
#

Still have to finish my card market screen in the site

quaint wasp
#

what do I do here?

#

Guids say that it should ask me

#

my email password ect

#

?

old cliff
#

Why would anyone use heroku git?

quaint wasp
#

because

quaint wasp
old cliff
#

Install heroku

quaint wasp
#

what, exactly?

#

I got ICL

old cliff
#

Add its path to env

quaint wasp
#

?

#

?????

old cliff
#

Add the heroku executable path to system environmental

#

variables

quaint wasp
#

how do you do that?

old cliff
#

Qhat exactlt are yoy trying to do?

#

If you just wanna host it there

quaint wasp
#

(I do)

old cliff
#

Then just upload your peoject your project to github

quaint wasp
#

I dont use girhub.

old cliff
#

And link your github with heroku

quaint wasp
#

gut hub.

#

git hub*

#

o

old cliff
#

And enable auto deploys for the repo

#

You must use any git client in order to use heroku

#

You can even use heroku git

quaint wasp
#

ya

#

thts what I am trying to use

#

heroku git

#

lol

tacit sequoia
#

?

tropic whale
#

Can someone help me make a discord bot please 🙏🙏🙏🙏

quaint wasp
#

sure

#

I am sure its usal that a Hoister helps you program lol

tropic whale
#

Dm me and we can talk about it

quaint wasp
#

...

#

alr.

umbral zealot
#

Oh you mean you want osmeone else to do the bot for ya

#

ok

quaint wasp
#

I guess...

#

wai

#

t

#

No spoon feeding tho.

tropic whale
#

Ya he is right

quaint wasp
#

wait

tropic whale
#

I need someone to do it for me

umbral zealot
quaint wasp
#

o

#

welp

#

then I guess I cant help.

#

I dont spoon feed.

umbral zealot
#

if you don't want to do it yourself I know exactly where you can find one

quaint wasp
#

OO

umbral zealot
#

It's a great site

dusky sundial
quaint wasp
#

pay. Lol pay your developers.

umbral zealot
#

Best site ever

quaint wasp
#

Idk how to spell fevver

tropic whale
#

We can someone make me a website for the bot

quaint wasp
#

a WEBSITE?

#

dude

#

make bot first

#

THAN website.

umbral zealot
#

Those services are thing you're gonna have to pay for

tropic whale
#

I did

dusky sundial
#

No one is going to develop anything for you for free

quaint wasp
#

HMMM

#

really? You already made it?

tropic whale
#

Tell me the site or app I can do it on

#

Yep

quaint wasp
#

VSC.

#

Visual Studio Code.

#

Notepad++

#

GitHub

tropic whale
#

Thx

quaint wasp
#

Heroku

#

I think

umbral zealot
#

@dusky sundial -needdev 😉

quaint wasp
#

notpad (normal)

#

also..

dusky sundial
umbral zealot
#

oh shoot! That's right, sorry.

dusky sundial
#

tags are broken for trial mods lol

umbral zealot
#

didn't mean to put you on the spot there!

quaint wasp
#

@tropic whale You dont have to do it, you can pay me Ill do it for you!

quaint wasp
umbral zealot
quaint wasp
#

OH

#

THATS HOW YOU SPELL fiverr

#

damn it.

umbral zealot
#

feiverererer

quaint wasp
#

tf

tropic whale
#

I don’t like paying for bots/websites I’d dumb

quaint wasp
#

ya same thing here

umbral zealot
#

discord blocked by fiverr that's so funny

umbral zealot
quaint wasp
tropic whale
#

My

#

Can someone help me with my server and get it ready for my bot please 🤞🤞🙏🙏🙏🙏

umbral zealot
#

nope

tropic whale
#

Bruh

umbral zealot
#

not gonna happen

tropic whale
#

Are u the owner of this server bro

quaint wasp
#

look

#

@tropic whale

umbral zealot
#

we're the guardians of the galaxy

quaint wasp
#

I make servers too btw lmao

tropic whale
#

Yes pls

quaint wasp
#

Click the botton named join and will start. 🙂

umbral zealot
#

At this point @quaint wasp you're basically advertising

tropic whale
#

But not that Mutch god

quaint wasp
#

alr..

#

I deleted it

umbral zealot
#

I get the joke though 😛

quaint wasp
#

But look at the link in my stats

tropic whale
#

Leave the homi alien

quaint wasp
#

lol

tropic whale
#

Alown

umbral zealot
#

@tropic whale no one is going to do this shit for you for free.

quaint wasp
#

lol yes I agree no one will.

#

Well

tropic whale
#

Why u gotta be so mean yo

umbral zealot
#

If you can't manage your own servers, hiring a rando is a great way to get the server deleted

quaint wasp
#

some... Supper duper nice people that have litilary lots of free time

#

I dont

umbral zealot
#

Or at least nuked

quaint wasp
#

because I am a weeb

#

so I watch netflex 500 minutes a day

umbral zealot
#

IF you can't make your own bots and don't want to pay, there's 100% definitely the bot you want on top.gg already

tropic whale
#

I have Netflix

umbral zealot
#

you do'nt even need to do anything, just invite the bot

quaint wasp
#

yes.

#

plus

#

that will support the developers. 🙂

#

It will make someone happy.

#

And I dont mean gay here.

umbral zealot
#

a lot of these bots even have dashboards too ("websites")

tropic whale
#

Is not online I need someone to put it online

umbral zealot
#

not your bot. someone else's bot

quaint wasp
#

lmao

umbral zealot
#

a bot made by someone competent

tropic whale
#

I’m not a coder

umbral zealot
#

So go to top.gg and find a bot that does what you want

#

and use it

quaint wasp
#

what kind of bot are you looking for?

#

moderation?

#

Economy?

#

fun?

umbral zealot
#

music?

quaint wasp
#

anime?

#

music?

#

dashboards?

tropic whale
#

Banimg someone in my server that has about 100k people in it

quaint wasp
#

advertisers? (like the ones that send your server ads to other)

umbral zealot
#

Great, so literally any moderation bots

tropic whale
#

Yep

quaint wasp
#

lol

umbral zealot
#

any of them. they all have a ban command.

quaint wasp
#

get mee6

tropic whale
#

Levels

umbral zealot
#

mee6 has levels

tropic whale
#

Logs

quaint wasp
umbral zealot
#

mee6 has logs

quaint wasp
#

yse

#

ugh

#

umm

tropic whale
#

Welcomed

quaint wasp
#

get SMUGY FUGY

tropic whale
#

Leaving

umbral zealot
#

So everything you need, mee6 has. Get it

#

that's it

quaint wasp
#

🙂

umbral zealot
#

Or look for one of the other "multi-purpose bots" out there

quaint wasp
#

lol

tropic whale
#

Tf

#

Nope

umbral zealot
#

again, stop trying to advertise your shit

quaint wasp
#

lol

#

cmon

tropic whale
#

Lol

quaint wasp
#

it is the site

#

lol its just a specific thing in the cite.

tropic whale
#

Lol ya right

umbral zealot
#

Doesn't matter, linking your own bot is advertising, everyone knows this

quaint wasp
#

fine.

dusky sundial
#

@quaint wasp let's not try to advertise alright?

quaint wasp
#

ok.

#

Umm

tropic whale
#

OML busted

quaint wasp
#

I got a question @dusky sundial

umbral zealot
#

Anyways back to the point: Literally all the multipurpose bots have the things you need.

quaint wasp
#

will this count as an advertisment?

#

yes?

umbral zealot
#

Absolutely no programming involved.

quaint wasp
#

no?

dusky sundial
#

No?

quaint wasp
#

alright,.

#

lol Ill keep that in mind.

tropic whale
#

No server helping

#

That is just rude

umbral zealot
#

We're giving you the help you need, not the one you want.

quaint wasp
#

so wait what are you looking for? I am confused... Server staff? Server templates? Bots?

umbral zealot
#

everythign. They want everything for free right now.

#

obviously

quaint wasp
#

lol..

#

I remember times of me beeing like that

#

when Idk.. I was like 10 those years

umbral zealot
#

we all do , smug kekface

tropic whale
#

I need staff in my server and what ever I need for my server🙏🤞🤞🤞

zenith terrace
quaint wasp
#

ofc that accoutn got banned and I was litilary waiting in the bed wating till I am going to be 13 and now im here lol

umbral zealot
tropic whale
#

I’m in your website boi

#

So that is not begging

dusky sundial
#

Top.gg isn't a "looking for server staff" website

tropic whale
#

🥺

quaint wasp
ancient gulch
#

How can i define multiple variable with an array
I mean my array is

const array = ['ban', 'kick', 'role']

for(var all of array) {
const all = ...
}
quaint wasp
#

then choose one and they probobly got one

#

where you can ask to get staff

#

EZ.

#

At least thats what I do.

#

and it works perfectly.

tropic whale
umbral zealot
quaint wasp
umbral zealot
#

or rather what are you looking to do with the array elements

tropic whale
#

Some one tell me what they thing about my new server I just made

quaint wasp
#

dude

#

stop

#

chill

#

dont even try to send a link.

dusky sundial
#

Now, let's swap channels unless you need development help

tropic whale
#

I am

quaint wasp
#

alright.

#

umm

ancient gulch
#

i need to get a module on my database, but i don't want to do

const ban = await client.getModule(message.guild, 'ban')
const kick = await client.getModule(message.guild, 'kick')
const role = await client.getModule(message.guild, 'role')

Each time

quaint wasp
#

I cant login

tropic whale
quaint wasp
#

to heroku

quaint wasp
dusky sundial
umbral zealot
ancient gulch
#

how

tropic whale
#

Sorry I need help god

#

Welp

umbral zealot
#

Are you looking to define things like global modules or what?

quaint wasp
#

Even tho we told him to go to places like https://fiverr.com, and top.gg/servers/ and then there look for servers to ask for staff, ect, and he just doesnt want to do those things.

umbral zealot
#

what do those things do? why do you need to define them in a loop instead of just one after the other?

tropic whale
#

Brb imma show u the bot I made

quaint wasp
#

lol..

#

probobly ghost bot host

#

or smth like that

#

?

#

o

#

yes.

#

welp..

#

Imma head into my bed now.

#

bye

#

thanks, good night.:)

umbral zealot
# ancient gulch how

As a developer with a lot of experience, I'll tell you this: just leave the separate lines, don't do the loop, it's not really worth it

ancient gulch
#

Hm okay, thanks you for help :)

umbral zealot
#

^_^

zenith knoll
tropic whale
#

@umbral zealot is someone going to Approve the bot I made 🤔🤔🤔🙏🤞🙏🙏

zenith knoll
#

stop asking

tropic whale
#

Why

zenith knoll
#

because they will most likely mute or ban you

#

and if you get banned

#

you cant upload bots

umbral zealot
#

If you actualy submitted a bot, the wait time is up to 2 weeks, so, just keep your shirt on.

tropic whale
#

Pls don’t ban me

#

@umbral zealot yes sir

#

Lol

umbral zealot
#

no problem, madam.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

tropic whale
#

@umbral zealot imma put u as the bot dev helper on the website

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

tropic whale
sage bobcat
#

One message removed from a suspended account.

tropic whale
#

Ya that is what I thot

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

zenith knoll
#
CREATE TABLE Guilds (
    guildID VARCHAR(18) NOT NULL PRIMARY KEY,
    guildPrefix VARCHAR(10) NOT NULL,
    guildOperator VARCHAR(18) NOT NULL,
);
``` syntax err how i hate it
#

apparently the ); is wrong

sage bobcat
#

One message removed from a suspended account.

tropic whale
#

Mhm I am

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

zenith knoll
fresh verge
sage bobcat
#

One message removed from a suspended account.

zenith knoll
sage bobcat
#

One message removed from a suspended account.

zenith knoll
#

You are "new to discord"

fresh verge
zenith knoll
#

are you trying to pull a pickle on us

sage bobcat
tropic whale
#

Lol

icy patio
#

I can ask something

#

my code have error

#

client.on('ready' , async () => {
client.user.setActivity(STATUS+ '😎');
let channel =
client.channels.cache.get(CHANNEL) ||
(await client.channels.fetch(CHANNEL));

if (!channel) return;
const connection = await channel.join()
connection.play(ytdl(LIVE));

});

#

Who can help fix this

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

acoustic citrus
#

amazing

icy patio
sage bobcat
#

One message removed from a suspended account.

acoustic citrus
#

yea

sage bobcat
#

One message removed from a suspended account.

acoustic citrus
#

smh my head

#

Anyway I was wondering what its called when a string in js uses var in a string like this `${client.guilds.cache.filter(g => g.available).size} Servers` cause i need to convert a normal string into that type but literally dont know what its called i cant even google how to do it

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

sick cloud
#

dumb question prob but are there any npm packages or stuff on github to make interactive prompts in djs easier
currently my code to ask questions, validate them etc is just callback hell and i hate it

sage bobcat
#

One message removed from a suspended account.

fresh verge
#

How does one use dictionary, and or list manipulation?

lavish bramble
#

How can I test my welcome command?

delicate shore
#

hey fellow developers

#

I am currently using query based authorisation in my api

#

I want to use header based

#

using header token thingy or whatever it's called

#

I am using NodeJS (express package) for my api

#

any idea how I can do that

fleet radish
#

helo

lusty quest
sick cloud
#

has djs not provided types or something thinKappa i can't ever get auto code to pop up

marble juniper
#

lol

#

if the types still dont show up

#

add the types to the parameters

#

of ur function

sick cloud
#

i have no idea how to even do that

#

i just want it to show all the vars like if i type .channel it shows type, nsfw, etc

marble juniper
#

are you using typescript

sick cloud
#

no, just js

marble juniper
#

rip then

#

lol

#

in javascript ur parameters will just be any types

#

in typescript you would actually get the auto complete

sick cloud
#

oh, ok

marble juniper
#

lol

#

also btw

#

any javascript is also perfectly valid typescript

#

since typescript is just a superset

#

so uh if you really insist on the auto complete

next steeple
marble juniper
#

use typescript

#

I suppose

next steeple
#

I definitely understand

#

I'm 13 with a 1 year old brain

#

Very smart

sick cloud
#

i don't really want to use ts

#

i tried to get the grasps of it but i just don't really get it, and then i have to go compile code every time

#

not quick to just reload

pale vessel
#

it is quick, use tsc -w and your reload commands work just fine

cinder patio
#

and set up an npm script

#

Alao you do get autosuggestions when uaing javascript but not when your function is in a different file

#

You won't get em even with typescript without explicitly providing the types

earnest phoenix
#

My server ping is high weirdsip

cinder patio
earnest phoenix
#

i'm wondering if i enable intents, get verified but don't apply for intents, will i still be able to use the intents and get verified but just be limited to 100 servers?

cinder patio
#

Right above the functions

sick cloud
#

like up here? @cinder patio

#

doesn't seem to work

cinder patio
#

Right above the run function

sick cloud
#

ohh

#

ohh that works cool ty @cinder patio

#

its two stars btw

#

/** not /*

earnest phoenix
#

Does anyone knows this icon and color theme?

still sky
lavish bramble
#
const lmm = new MessageEmbed()
	.setTitle("Member Remove")
	.setDescription(`${member} Goodbye :wave1: :bye: !! We will miss you! If you wanna join then here is the link : `)
	.setFooter("We Are not satisfied 😒 with this ! || From Gamers Point")
	.setThumbnail(member.guild.iconURL())
	.setTimestamp()
	
	const mm = new MessageEmbed()
	.setTitle("Member Removed")
	.setDescription(`Dm Successfully to ${member.user.tag}`)
	.setTimestamp()
	
	member.send(lmm).then(
		client.channels.cache.get("835389487134932992").send(mm)
		)
})

Error could not dm that user

lavish bramble
#

Nope

earnest phoenix
lavish bramble
#

Its human

earnest phoenix
#

Hm?

waxen bough
#

what

earnest phoenix
#
let embede = new Discord.MessageEmbed()
.setTitle(`Title`)
.setDescription(`Description`)


message.channel.send(embede)
let s2 = await message.channel.send("Voici les paramètres de la commande Embed:")
s2.react("📝")
s2.react("📣")
const filter = m => m.author.id == message.author.id;

                let stopDEB = s2.createReactionCollector((reaction, user) => user.id === message.author.id);
                stopDEB.on("collect", async(reaction, user) => {
            
                    if(reaction.emoji.name === "📝") {
                        let ad = message.channel.send("Veuillez rentrer la description de l'embed:")
                        s2.channel.awaitMessages(filter, { max: 1, time: 300000, errors: ['time'] })
                        .then(async collected => {
                            const description = collected.first().content
                            embede.edit(Discord.MessageEmbed()
                            .setDescription(description))

                            
                        }).catch(collected => {
                            message.channel.send("Temps écoulé :x:");
                            return;
                        })
                    }```
How do I edit just part of the embed? I make a command to make the custom embed
delicate shore
#

like this?

#

and read its value

#

and like this

lusty quest
#

Try and see. Cant give you better instructions, wiped windows due to be flaky again

earnest phoenix
#

How do I edit just part of the embed? I make a command to make the custom embed

lusty quest
#

you have to edit the entire embed and add the stuff you want

#

if you keed the old informations the same it will work

waxen bough
#

is it js

#

if it is i will show you what i do

earnest phoenix
#

dn

#
if(reaction.emoji.name === ":white_check_mark:") {
                        let ad = message.channel.send("Veuillez rentrer le salon où envoyer l'embed:")
                        s2.channel.awaitMessages(filter, {max: 1, time: 300000, errors: ['time'] })
                        .then(async collected => {
                         const channel = message.mentions.channels.first() || message.guild.channels.cache.get(args[0]);
                         console.log(channel)
                         channel.send("hey")

                            
                        })```
https://media.discordapp.net/attachments/223867697312694272/835421321583919104/unknown.png
#

@earnest phoenix Le système fonctionne normalement sinon?

#

Le problème est que peut-être c’est un message en privé

#

du coup il renvoie ce message

#

mmmh

#

Ou bien alors il ne trouve pas le salon

#

bah

#

il trouve pas le salon

#

Tu as le soucis quand tu mentionnes le salon ou quand tu met l’identifiant du salon?

#

@earnest phoenix ?

#

la mention

#

Ok, alors

#

du coup j'essaie ça

#

ou alors ceci:

#
if(reaction.emoji.name === "✅") {
                        let ad = message.channel.send("Veuillez rentrer le salon où envoyer l'embed:")
                        s2.channel.awaitMessages(filter, {max: 1, time: 300000, errors: ['time'] })
                        .then(async collected => {
                         const channel = collected.first().mentions.channels
                         console.log(channel)
                         channel.send("hey")

                            
                        })```
#
const getChan = message.mentions.channels.first() || args[0];

const channel = message.guild.channels.cache.first(getChan.id);
if(!channel) // Il trouve pas le salon
else // sinon, si il trouve le salon, il fait l’action```
#

psk en gros message.mentions.channels.first() c’est juste une mention, sa récupère pas les données du salon

#

déjà essayé

#

mais en mieux: const channel = message.mentions.channels.first() || message.guild.channels.get(args[0]);

#

ah mmmh

#

Ah nan att

#

faut metrte collected

#

qlq part

#
let getChan;
let mention = message.mentions.channels.first();
if(collected === mention) getChan = mention.id;
else getChan = message.guild.channels.cache.get(collected).catch(e => { return e;})```
#

@earnest phoenix essaye sa pour voir?

#

@earnest phoenix

#

mmh

#

avec la mention sa fonctionne ?

#
let getChan;
let mention = message.mentions.channels.first();
if(collected === mention) getChan = mention.id;
else getChan = message.guild.channels.cache.get(collected);
if(!getChan) // trouve po le salon```
#

euh jfais avec mention

#

Sa a l’air d’etre un truc tout con mais j’arrive pas a résoudre ptdr

#

là nn plius

#

:/

pale vessel
#

Get-chan~

slender thistle
#

no

graceful shore
#

can someone explain how my bot is checking guildMemberAdd without intents

pale vessel
#

Impossible

graceful shore
pale vessel
#

You need the guild members intent for it lol

graceful shore
#

i know, it wasnt working before today

#

i dont even have the intents

#

im so confused XD

vivid fulcrum
#

inb4 discord did a fucky wucky uwu

pale vessel
#

Probably because you used API v7 or something

vivid fulcrum
#

nah still

graceful shore
#

im just using client.on('guildMemberAdd', async member => {

vivid fulcrum
#

you won't receive the event at all without the intent on all gateway versions

vivid fulcrum
#

did you apply for intents or something

pale vessel
#

It's greyed out so I guess they didn't

graceful shore
#

yes but they arent showing on the discord applications website

#

unless it takes time to show?

pale vessel
#

Your bot is verified, no?

graceful shore
#

my bot is verified

pale vessel
#

Then you need to contact support

graceful shore
#

i did that

pale vessel
#

and they granted you access?

graceful shore
#

i mean maybe but it isnt showing on the website

pale vessel
#

If they did then the intent would have been toggled and grayed

graceful shore
#

the intent is toggled off

pale vessel
graceful shore
pale vessel
#

Because Discord.js uses API v7 and it doesn't require you to use intents

#

So it just silently not trigger the event

pale vessel
graceful shore
#

nope

#

nothing

pale vessel
#

I guess you have to wait for a bit

cinder patio
#

maybe try clearing your browser cache idk

graceful shore
#

its strange because it wasnt working before today

graceful shore
delicate shore
#

Hello guys

#

I am shit at Oauth2

#

I was wondering how I can make a user join my server
by their consent ofc

cinder patio
#

and you're done

delicate shore
#

like

#

just a min

#
{ message: '401: Unauthorized', code: 0 }

sad

#

why get error :CCC

#

I also press authorise

vivid fulcrum
#

did you exchange the code for an access token

delicate shore
#

wait

#

lemme check

#
            const oauthResult = await fetch('https://discord.com/api/oauth2/token', {
                method: 'POST',
                body: new URLSearchParams({
                    client_id: clientID,
                    client_secret: clientSecret,
                    code,
                    grant_type: 'authorization_code',
                    redirect_uri: `http://localhost:${port}`,
                    scope: 'identify',
                }),
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                },
            });

            const oauthData = await oauthResult.json();

            const userResult = await fetch('https://discord.com/api/users/@me', {
                headers: {
                    authorization: `${oauthData.token_type} ${oauthData.access_token}`,
                },
            });
#

I am getting the authorization_code

#

it works fine

#

but problem is at fetching user data

vivid fulcrum
#

what does oauthData.token_type return

#

also I'm fairly certain that Authorization has to have a capital A, not entirely sure

pale vessel
#

headers are case-insensitive

earnest phoenix
#

Yeah

delicate shore
#

ohh

#

Thanks

delicate shore
# vivid fulcrum what does oauthData.token_type return

I get this response when authorising in first place

  size: 0,
  timeout: 0,
  [Symbol(Body internals)]: {
    body: PassThrough {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      [Symbol(kCapture)]: false,
      [Symbol(kTransformState)]: [Object]
    },
    disturbed: false,
    error: null
  },
  [Symbol(Response internals)]: {
    url: 'https://discord.com/api/oauth2/token',
    status: 400,
    statusText: 'Bad Request',
    headers: Headers { [Symbol(map)]: [Object: null prototype] },
    counter: 0
  }
}```
#

Bad request

delicate shore
boreal pewter
#

Is it possible & best practice to have multiple processes for same shards?
What I mean is, lets say I have two commands.
I want 2 bot processes (python) running, one with each command, connected to the same shard.
This way I can separate functionality.

Is this sustainable long run, and is there a better way?

lusty quest
#

if you run 2 processes you get stuff like the bot answering mutiple times to the same command.
the only way to have stuff running on mutiple processes directly is with sharding

delicate shore
#

Actually I just figured out most of it

#

            const userResult = await fetch('https://discord.com/api/users/@me', {
                headers: {
                    authorization: `${oauthData.token_type} ${oauthData.access_token}`,
                },
            });            
    
            console.log(await userResult.json())

This is my code

#

{ message: '401: Unauthorized', code: 0 }

#

Error ^

#

even tho I have token

#

and toke type

vivid fulcrum
#

@delicate shore did you get the token exchange working

delicate shore
#

yes

vivid fulcrum
#

okay so there is no token_type probably

#

just use Bearer in the string

#

`Bearer ${access_token}`

delicate shore
#

there is

vivid fulcrum
#

thonk

#

how come it returns undefined then

delicate shore
#

it doesn't

#

before it did

vivid fulcrum
#

oh

delicate shore
#

now it doesn't

pale vessel
#

log the token

delicate shore
#

I did

#

it logs it

#

maybe it's node fetch messing up

#

like not putting the headers

boreal pewter
#

sharding is just for split load between servers

#

i mean like running 1 process that only listens to command !help and one that listens to !about (just a silly example)

#

both running on all shards

lusty quest
#

you could break down the Bot into Microservices, then it would be relatively easy to have mutiple processes handling commands, but there are no frameworks for this iirc

vivid fulcrum
#

and check if it's node-fetch or something else

boreal pewter
#

i dont need a framework for this tbh

#

whats iirc btw

vivid fulcrum
#

if i remember/recall correctly

boreal pewter
#

ah

#

just looking for best practice in python

#

my bot just grown quite alot in the last few days and I am having some tech difficulties

lusty quest
#

idk about microservices, have no bot that would be large enough to require it

boreal pewter
#

i just have a command that takes 10-20 seconds sometimes (its ok)