#development

1 messages · Page 984 of 1

earnest phoenix
#

i have command handler

#

and created command that gets channel name

lusty quest
#

should work @dapper lynx

solemn latch
#

why does a command handler have anything to do with getting something for a specific command?

lusty quest
#

@earnest phoenix either get some sort of database to store the channel name in or get a config file where you store it

solemn latch
#

command handlers do general tasks, commands do specific tasks

dusky mist
#

How can the bot knows when someone reacts to one of its messages?

dapper lynx
#

Bruh i forgot to add node push to package.json and buildpack

earnest phoenix
#

ok ill try

solemn latch
#

@dusky mist depends on the library

dusky mist
#

Discord.js

dapper lynx
#

@lusty quest where do i find the node push github repo?

solemn latch
#

reaction collectors

dusky mist
#

Which is the statement?

#

Or idk how to say it in english xD

lusty quest
#

how did you push it to github?

#

i use the desktop client for my projects

#

or you can use VSC

dapper lynx
#

Wait will the node push thing just auto work without having to add buildpack to heroku?

solemn latch
lusty quest
#

i never used heroku so idk but if they use the Github API it should if you push to your repo

tepid canyon
#

If you have automatic deploys enabled on heroku, it will automatically push to heroku if you push to master

dapper lynx
#

Wait what do i put for const?

lusty quest
#

line?

old hinge
#

Hello how can I delete a specific role on a server? i am using discord 12.2

lusty quest
#

const fetch = require('node-fetch');?

dapper lynx
#

Yeah that's what i meant

#

Like at the top of my code so the command will work

lusty quest
#

yes

dapper lynx
#

Do i need a module? If so where can i find the github repo for module?

solemn latch
lusty quest
#

but idk if heroku will install the module itself

#

i would just run npm i node-fetch

old hinge
#

OK thanks

lusty quest
#

then it should be in your package.json

dapper lynx
#

Need that for heroku buildpack

tulip ledge
#

Anyone knows how to fix this?

Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

I can't connect to my mysql database any ideas how to fix?

lusty quest
#

did you whitelisted your client in the database?

dapper lynx
lusty quest
#

or you need to allow external connections

dapper lynx
#

I get that in build log

lusty quest
#

well this is why i dont like free Hosting sites

#

you loose stuff

tulip ledge
#

Its not free lol

dapper lynx
#

That's not that problem

lusty quest
#

wtf?

#

ohh not you @tulip ledge

dapper lynx
#

The problem is, apparently node-fetch "isn't compatible with buildpack"

tulip ledge
#

Oh

#

So what do I have to do?

lusty quest
#

allow external connections

solemn latch
#

@tulip ledge do you have anything listening on port 3306 on your server?

tulip ledge
#

idk

lusty quest
#

its a external server i think

solemn latch
#

127.0.0.1 is localhost

plush escarp
#

Is BOT_OWNER a permission

#

?

lusty quest
#

nope

plush escarp
#

So what is it?

lusty quest
#

but you can set your id as a value in a config

tulip ledge
#

I have no idea @solemn latch like I told you my friends have the vps

plush escarp
#

Oki @lusty quest

solemn latch
#

then your friend should be the one helping you.
theres nothing we can do @tulip ledge

lusty quest
#

then call the id in the stuff where you need a bot owner only thing

tulip ledge
#

they don't know either

#

We've been trying to fix it for like 4 hours

solemn latch
#

then you should buy your own VPS

tulip ledge
#

Nothing works

solemn latch
#

🤔

lusty quest
#

mariadb or mysql?

tulip ledge
#

mysql

dapper lynx
#

Is anyone able to help with my issue?

lusty quest
#

get a better host

dapper lynx
#

That isn't the issue..

solemn latch
#

whos your host?

dapper lynx
#

Heroku

lusty quest
#

its incompatible with buildpack right? is it a thing your Host adds?

dapper lynx
tulip ledge
#

@lusty quest u have an idea on how to fix my issue?

lusty quest
#

it can be a simple thing or something way more complex

solemn latch
#

if you cant provide us with details, we cant help.

lusty quest
#

either a blocked port

earnest phoenix
lusty quest
#

or you need to whitelist ips

#

the port is used

tulip ledge
#

ok but its localhost

earnest phoenix
#

no not using.

tulip ledge
#

How do I unblock the ports?

solemn latch
#

you need something on localhost to be on the port you are requesting

lusty quest
#

@earnest phoenix the error message say its already used

#

did you have 2 instances running?

tulip ledge
#

@solemn latch wdym?

merry grove
#

regen token then replace old token with new try that

dapper lynx
#

Does anyone know of a repo for a heroku buildpack compatible node-fetch?

solemn latch
#

your requesting a connection to something, but you dont know if anything is there @tulip ledge

#

something has to be there, thats expecting your request

tulip ledge
#

Appartently the port is in use in a diff bot

earnest phoenix
#

@lusty quest no i didnt

lusty quest
#

try changing the port

solemn latch
#

^

earnest phoenix
#

are u sure?

lusty quest
#

the error says the port is in use

solemn latch
#

only one thing can be listening to a port at a time @tulip ledge

#

ay two people with the same problem at the same time

#

what are the odds

earnest phoenix
#

Worked..

#

well

dapper lynx
#

Does anyone know of a repo for a heroku buildpack compatible node-fetch?
@dapper lynx is anyone able to help?

earnest phoenix
#

My vote system not working fuu

#

How can i change hostname ?

lusty quest
#

server?

dapper lynx
#

I need help from someone who knows anything about Heroku..

lusty quest
#

if you can afford it get a Digitalocean droplet or a AWS vps or a google vps

dapper lynx
#

I am not going to swap

hushed jungle
#

Could also go for a raspberry pi if it's a light resource bot

dapper lynx
#

I am perfectly fine using Heroku, i just need a way to get my reddit command to work, i know there is a way because someone who also hosts on Heroku has done it

solemn latch
#

id try a heroku support community, for heroku support

hushed jungle
#

Weird that heroku doesn't support node-fetch

lusty quest
#

you could use fetch i think

#

node-fetch is the updated version of it

dapper lynx
#

They could support node-fetch i just haven't found a link for it to work with buildpacks

lusty quest
#

or contact the Heroku support and ask what is supported

dapper lynx
#

They might not support it but idk

solemn latch
#

then ask them think

lusty quest
#

usually asking is free

dapper lynx
#

How do i contact heroku support?

solemn latch
#

this is a development support channel

#

but probably their website

tulip ledge
#

My phpmyadmin is saying this tho

solemn latch
#

my suggestion, click "find out why"

tulip ledge
solemn latch
#

ay

#

there ya go

#

i bet if you click "create" it says how to do that

tulip ledge
#

Don't have privelages

#

🤷‍♂️

solemn latch
#

then contact the vps owner

#

or buy your own vps

tulip ledge
#

Parents don't allow me

solemn latch
#

then wait until your of age, and buy your own

long yew
#

can someone help me?

#

how do i make it so if i do .purge 1 it deletes the message .purge 1 and 1 message?

#
client.on('message', async message => {
      let args = message.content.substring(prefix.length).split(' ');
      if (!message.member.permissions.has('MANAGE_MESSAGES'))
      return message.channel.send('You need the "Manage messages" permission to use the delete command')
      switch(args[0]) {
        case'purge':
        message.channel.bulkDelete(args[1])
      }
    })
solemn latch
#

increase the purge amount by 1

golden condor
#

message.delete()

long yew
#

@solemn latch how?

#

@golden condor i already tried

golden condor
#

Delete the message

#

It's easier

solemn latch
#

message.channel.bulkDelete(args[1] + 1)

golden condor
#

What

solemn latch
#

its an extra query

golden condor
#

Why would you do tbat

long yew
#

@solemn latch ty

solemn latch
#

because he is purging anyway

#

it will be deleted aswell

golden condor
#

It just means you get more rate limits

long yew
#

@solemn latch ty so much i've been trying for a hour

solemn latch
#

why? bulk delete is one query

#

sending message.delete and bulkdelete is two

long yew
#

@solemn latch how many can it delete at once?

solemn latch
#

i think its 50

long yew
#

ok

solemn latch
#

i havent checked the limit tbh

long yew
#

ok

#

how do i increase it?

solemn latch
#

youd have to run multiple bulk deletes if i remember right

#

i think discordjs.guide covers that

long yew
#

can you send me a link?

solemn latch
#

the max is also 100, not 50

long yew
#

@solemn latch help

#

instead of deleting 1 message

#

it deletes all

#

from less than 14 days

solemn latch
#

the only diffrence between what i did, and the guide was not having parseint

dusky mist
#

Is someone more having troubles with glitch?

solemn latch
#

const amount = parseInt(args[0]) + 1;

long yew
#
client.on('message', async message => {
      let args = message.content.substring(prefix.length).split(' ');
      if (!message.member.permissions.has('MANAGE_MESSAGES'))
      return message.channel.send('You need the "Manage messages" permission to use the delete command')
      switch(args[0]) {
        case'purge':
        message.channel.bulkDelete(args[1]+1)
      }
    })
#

that is the code

#

i used

solemn latch
#

wheres the check for if a user is doing a command?

#

🤔

tulip ledge
#

@solemn latch Created the phpmyadmin database but didn't do anything

dusky mist
#

In the switch case i guess

solemn latch
#

but thats an on message statement

#

it would be running any time any message is recived

#

oh nvm

#

duh

#

switch

dusky mist
#

@long yew i recommend u to rewrite this code because most of it is wrong

#

U check if the user have permissions before u enter the switch case

long yew
#

@dusky mist how should i order it all?

north hollow
#

i need help how to set up private dm for discord.js v12.2.0

solemn latch
#

user.send()

dusky mist
#

First of all i recommend u to use command handler instead of switch case

solemn latch
dapper lynx
#

Does anyone know of a Heroku compatible node module i can use for a reddit meme command?

#

I'm having a lot of trouble finding one..

solemn latch
#

I would contact heroku support

north hollow
#

@solemn latch no i need the code

#

the hole code

dapper lynx
#

I can't seem to be able to contact i don't exactly know how, plus that could take ages and there is no guarentee at all that they can help.

solemn latch
#

i doubt youll get your answer any quicker by asking every 10 minutes for an hour 🤔

#

esp in an unrelated community

dapper lynx
#

I've asked twice just to double check if anyone could help

earnest phoenix
#

why not make your own

#

you don't need a module for everything

dapper lynx
#

Make my own what?

dusky mist
#

^^

earnest phoenix
#

reddit api client

solemn latch
#

api's are fun

dapper lynx
#

I literally would not know where to begin or how to implement to my bot

earnest phoenix
#

research!

dapper lynx
#

Like i genuinely wouldn't have a clue how to

#

And i can't find any way to get anything to work with Heroku

long yew
#

@dapper lynx what you trying to do?

dapper lynx
#

Except already compatible modules

earnest phoenix
#

when you get assigned an assignment at school, do you just give up and say "i don't know this, give me an F" or do you do research on the subject

dapper lynx
#

I'm trying to implement a command for my bot which gets a meme from r/memes but i can't manage to make one that also works with Heroku

#

@dapper lynx what you trying to do?

north hollow
#

@solemn latch so like this

#
client.on('message', message => {
    if (message.content === Prefix + 'JoinBot') {
      const embed = new Discord.MessageEmbed
        user.send()
        .setTimestamp()
        .setTitle('This Is the Bot Link')
        .setAuthor('This Code Is By Xp And P O U T I N E')
        .setDescription('https://discord.com/api/oauth2/authorize?client_id=721775900949086240&permissions=8&scope=bot')
        .setColor(15844367)
        .setFooter(message.author.tag,message.author.displayAvatarURL());
      message.channel.send(embed);
    }
  });
solemn latch
#

well, are you trying to send a pm to the user who did the command?

north hollow
#

ya

solemn latch
#
client.on('message', message => {
    if (message.content === Prefix + 'JoinBot') {
      const embed = new Discord.MessageEmbed
        .setTimestamp()
        .setTitle('This Is the Bot Link')
        .setAuthor('This Code Is By Xp And P O U T I N E')
        .setDescription('https://discord.com/api/oauth2/authorize?client_id=721775900949086240&permissions=8&scope=bot')
        .setColor(15844367)
        .setFooter(message.author.tag,message.author.displayAvatarURL());
      message.author.send(embed);
    }
  });
north hollow
#

thx

solemn latch
#

np

#

heres an entire heroku support page

dapper lynx
#

Is there any way to make a pre-existing node module compatible with heroku buildpacks?

solemn latch
#

id look at that support page

dapper lynx
#

Because that support link doesn't say anywhere how to

solemn latch
#

🤔

dapper lynx
#

I already looked over it for like half an hour and i can't find anything relevant to my issues

north hollow
#

and no dm

solemn latch
#

there are entire sections for installing packages

dapper lynx
#

It doesn't really explain how to get a non compatible module working with it though

solemn latch
#

uh im not sure @north hollow

dapper lynx
#

Idk

solemn latch
dapper lynx
#

Or "heroku-postbuild": "ng build --prod" // this will be run on Heroku

#

I literally have no clue

solemn latch
#

then your best bet is contacting their support

#

because the other option, is i contact their support BalanceKek

warm marsh
#

Your whole question is whether there is a compatible meme api?

earnest phoenix
#

have you considered not running on trashy ass hosts

dapper lynx
#

I am physically unable to pay for stuff like google cloud and stuff, even though they do a free trial i think

#

I don't exactly have a lot of money currently

warm marsh
#

It costs 0 for a year of GC or AWS

earnest phoenix
#
const results = await youtube.searchVideos(search, 1);
        songInfo = await ytdl.getInfo(results[0].url);
        song = {
          title: songInfo.videoDetails.title,
          url: songInfo.videoDetails.video_url,
          duration: songInfo.videoDetails.lengthSeconds
}
#

Cannot read property 'title' of undefined

solemn latch
#

theres also the option of doing basic work for people, make a fiver account and do a few jobs, in two jobs you can get a years worth of VPS

dapper lynx
#

I can't do that currently either, i can probably later in the year but still

#

I'm just trying to see if i can get everything working on Heroku, once i know for sure it's a no go i will start trying to work my ass off to pay for good hosting

solemn latch
#

my hosting provider is like $30 a year.
There are people who make $30 a week grinding gp in runescape pikathink

dapper lynx
#

But honestly for the time being i don't see a point in paying for a good host if my bot is only currently in 5 servers which 3 of them are my servers anyway and i don't really have good reputation for bot making or a bot that stands out just yet

solemn latch
dapper lynx
#

My bots current main feature is music so not a good start

earnest phoenix
#

im guessing you have no machines you can selfhost on

dapper lynx
#

Hence i'm trying to implement reddit memes

solemn latch
#

heroku seems like a terrible platform, i would just wait until something makes more sense

dapper lynx
#

I technically do have a machine i can self host but only my pc or laptop which is not ideal

north hollow
#

i need help how to set up private dm for discord.js v12.2.0

earnest phoenix
#

elaborate on set up

dapper lynx
#

Who were you asking? If you asked me, selfhosting on my pc or laptop honestly isn't practical at all for me

#

Laptop is a chromebook with 4GB ddr2 ram i believe, i think more likely ddr3 but i am not sure, it would run via linux which would be better than windows probably, but it's slow when using linux stuff and it would require i use an unfamiliar coding app on a laggy machine

#

And pc just sucks up too much power

warm marsh
#

"unfamiliar", What do you currently use?

dapper lynx
#

VS Code, can't get it for Linux

#

I have already tried

warm marsh
#

Yes you can.

dapper lynx
#

Well not on my Chromebook i can't

warm marsh
#

Depends, If you're directly use chrome os then maybe not

dapper lynx
#

Plus my other statement would still stand, it would be very laggy

warm marsh
#

4GB should be fine for most tasks.

dapper lynx
#

It's honestly not a very powerful machine whatsoever

#

The cpu is not good at all

#

And 4GB ddr2 isn't fast

solemn latch
#

4gb ddr2 really doesnt mean much

#

most bots dont use much ram

#

nor much cpu

dapper lynx
#

I'm on about the machine in general, not running the bot

bitter harness
#

Can someone help me with a bot

solemn latch
#

most discord bots really use no resources

dapper lynx
#

Linux apps crash a lot so i could lose a lot of unsaved progress

solemn latch
#

practically no resources

digital ibex
#

wut

bitter harness
#

No its with creating a bot

still merlin
#

How does one host a bot on a rasbery pi?

bitter harness
#

I made the bot but i need help with adding commands

solemn latch
#

what language @bitter harness

bitter harness
#

Wdym

solemn latch
#

what language is the bot in

still merlin
#

Go learn how to code

bitter harness
#

English why

still merlin
#

..

solemn latch
#

i would like to code in english

still merlin
#

@bitter harness be serious what langue

pale vessel
#

i'm sure most programming languages are in English

sudden geyser
#

Written in English™️

skyblock4life, what programming language are you using

digital ibex
bitter harness
#

ENGLISH

dapper lynx
#

Yeah just like
If your command is hello
the bot says hello back

#

Love to code like that tbf

solemn latch
#

english is the language you speak, not the programming language

sudden geyser
#

Search up "Programming language" pls

still merlin
#

Ok thanks @digital ibex

bitter harness
#

How do i check language

solemn latch
#

a programming language would be, javascript, c++, python, etc

still merlin
#

@bitter harness Don't make a bot if you don't even know what a lanague is

sudden chasm
#

I code in czechoslovakian

solemn latch
#

^ thats impressive

sudden chasm
#

🤣

bitter harness
#

Can i code on phone

sudden chasm
#

I code on windows 98 tablet

#

so theoretically

bitter harness
#

How

digital ibex
#

why are you guys making fun of a guy who doesn't know what a language is? at one point we didn't know what it was.

sudden chasm
#

yes

bitter harness
#

Pls tell .e

copper cradle
#

@bitter harness yes, but it's not good

#

don't try to code on a phone

#

and google up what a programming language is and what they look like

bitter harness
#

A language is whut someone speaks like chinese or spanish

copper cradle
#

no

still merlin
#

no

copper cradle
#

that's a language

still merlin
#

yes

copper cradle
#

a programming language is another kind of language

sudden geyser
#

Skyblock do you have any knowledge on programming

copper cradle
#

hence the word programming

sudden chasm
#

take some courses on coursera or youtube.

#

and please og search it up

bitter harness
#

No i dony lite

sudden chasm
#

and then come back

#

because this is just annoying by now :-;

sudden geyser
#

youtube courses are a double-edged sword

copper cradle
#

yeah

bitter harness
#

Huh

copper cradle
#

watch socratica's python course

still merlin
#

Okay I will give you some examples-

js
var hello = 'hello world'
console.log(hello)

py
print("Hello world")

css
<p>
<button onclick="location.href='0';">
Top.gg
</button>
</p>

Json
"Hello": "World"

sudden geyser
#

You should try learning a programming language before asking.

copper cradle
#

it's pretty fun to watch

bitter harness
#

Can u dm me link zsnails

dapper lynx
#

In simple terms: Programming language is like a language that computer "speaks" so you choose a programming language e.g. javascript, c++ etc and you code using said language

copper cradle
#

@bitter harness I can't atm

earnest phoenix
#

tldr
are you bad at maths or anything related to logical problems? if so, programming is not for you

digital ibex
solemn latch
bitter harness
#

Ok thx

solemn latch
digital ibex
dapper lynx
#

They should teach programming languages on Duolingo 🤣

digital ibex
#

codecademy just confused me lul

earnest phoenix
#

get an exception and they'll kill your family

solemn latch
#

codecademy is the place you go when your unsure what a language is pikathink

#

it covers extreme basics

digital ibex
#

it was very hard for me

#

when i was starting

solemn latch
#

ye

digital ibex
#

so i used sololearn

sudden geyser
#

There are many places you can learn programming from. Codecademy is kind of gross but I learned Kotlin on Hyperskill (which won't be as good in a few months)

digital ibex
#

imo, its easier and you progress more

solemn latch
#

🤔

halcyon galleon
#

@dapper lynx you didn’t practice your JavaScript code today Alabama do it or the bird will come to your House

solemn latch
#

i suggested the one that explains stuff like what programming languages are, scope, and what syntax means

pale vessel
#

that ain't no css

halcyon galleon
#

Dude has to start somewhere

solemn latch
#

ye

#

i feel like it would be a good resource as the first step

dapper lynx
#

@dapper lynx you didn’t practice your JavaScript code today Alabama do it or the bird will come to your House
@halcyon galleon Oh no, i am sorry 😳

#

Lmao

digital ibex
#

i fucking hate computer science

earnest phoenix
#

:>(

#

stop making so many requests

sudden geyser
#

How and why are you making so many requests.

earnest phoenix
#

im not making so many requests!

#

computers don't lie

#

i dont know how its happening

sudden geyser
#

Well let's see it's coming from dblapi.js

earnest phoenix
#

yes.

sudden geyser
#

So you somehow got rate limited from the API (which lasts like an hour to my knowledge)

earnest phoenix
#

What can i do?

solemn latch
#

every time that error comes up, its a new request, how often is it coming up?

earnest phoenix
#

EVERYDAY

#

what are you doing with dbl's api

solemn latch
earnest phoenix
#

vote lock commands?

#

what can i do else with dblapi

#

you're probably checking for votes too often

#

also votelocking 🤢

#

yeah :/

#

so what i need to do?

solemn latch
#

do it less

earnest phoenix
#

i can't fix this?

#

either stop votelocking because that's scummy or cache vote data

#

or i will do it less

solemn latch
#

you can send 60 requests a minute,
ideally, youd do much less than that

earnest phoenix
#

yeah i think so

#

thanks

#

NodeJS help
How do I do that if args[1] has 2+ letters and not 1 letter return something

#

(Node JS)

solemn latch
#

i dont understand the question

earnest phoenix
#

like if (args[1] == 2 letters or more) {.........

cunning gorge
#

Question for github webhooks to discord, do u need to make two different webhooks for two different repositories or can you use the same webhook url? Please ping if you have an answer

earnest phoenix
#

you can use the same url

solemn latch
#

if (args[1].length >= 2)

earnest phoenix
#

it's 2 +

#

like more

#

then do >

hollow ermine
#

oop

#

what language do you guys think i should learn first?
python or java

solemn latch
#

python is popular right now

trim saddle
#

you didn't know?

hollow ermine
#

alr

short siren
#

I don't like python :p JS is sicko

devout wagon
radiant estuary
#

What do you think about hosting a small bot on a Raspberry Pi 3?

spark breach
#

its an good investment from what i heard

radiant estuary
#

Okay. And the 1 GB ist enough?

#

Ram

spark breach
#

it probs isnt

fleet mason
#

1.5k servers/gb ram

radiant estuary
#

Ok

#

Thx

fleet mason
#

So for a private bot its enough

spark breach
#

wait

#

youre gonna use it for private use?

radiant estuary
#

Yes

fleet mason
#

Then yea

#

its more than enough

#

you will prob see around 300-500 being used

radiant estuary
#

Okay thank you

spark breach
#

yeah, you could even use a free hosting server then tbh

#

if youre planing to make it public don't tho

radiant estuary
#

I used glitch. But they are bad

spark breach
#

yeah

#

I'm using heroku atm

fleet mason
#

paying for a cheap vps is good

spark breach
#

^

fleet mason
#

i recommend hetzner or ovh

misty sigil
#

how do i make sure my bot can ban a member

fleet mason
#

you can do a catch after the ban if you use discord.js

#

then log the error

misty sigil
#

how do i compare roles

#

like in the hiarchy

solemn latch
#

you should send as few bad requests as possible, otherwise so many will have your bot banned from the api temporarily

#

.bannable on a member will tell you if the user is bannable by the bot

misty sigil
#

how do i set a member

solemn latch
#

message.mentions.members.first()

#

this will get the first mention in the message

misty sigil
#

yup

#
const user = message.mentions.members.first()
fleet mason
#

you should send as few bad requests as possible, otherwise so many will have your bot banned from the api temporarily
@solemn latch I have never experienced this / maybe discord.js will check it first idk

solemn latch
#

its a lot of requests to get blocked

#

its better to do it without sending bad requests

#

if you can

paper phoenix
#

1.5k servers/gb ram
@fleet mason - I've got bots in 1.5K+ that average 130MB RAM :-/

fleet mason
#

how XD

#

tell me the secret

misty sigil
#

but how do i set the user that's being checked

paper phoenix
#

I don't cache members

fleet mason
#

How do you stop caching members?

misty sigil
#

if (!message.guild.member(user).bannable) return message.reply('You can't ban this user because you or the bot has not sufficient permissions!');​

#

that returns SyntaxError: Invalid or unexpected token

plush escarp
#

f

paper phoenix
#

I don't use presence/member intents for one

tepid canyon
#

just do !user.bannable

wicked pivot
paper phoenix
#

If a message is sent to a guild, it'll have a member property.

wicked pivot
#
fs.readdir('./commands/', (err, files) => {
    if (err) console.log(err);
    let jsfile = files.filter(f => f.split('.').pop() === 'js');
    if(jsfile.length <= 0) {
        console.log('Je ne trouve pas la commande');
        return;
    }
    jsfile.forEach((f, i) => {
        let props = require(`./commands/${f}`);
        bot.commandes.set(props.help.name, props)
    })
    console.log(jsfile.length + ` commande, à bien été charger`)
})```
paper phoenix
#

message.member - member of who sent it

digital ibex
#

for a user which isn't in the server, how can i get their presence info?

#

in eris

#

can't find anything in the documentation but i do know its possible, any ideas?

solemn latch
#

dont bots that do that get denied?

fleet mason
#

do you use discord.js or something else

paper phoenix
#

in eris

digital ibex
#

no they don't

fleet mason
#

i guess its better at memory optimization?

digital ibex
#

its better for a lot of things, not just that

earnest phoenix
#

first reply of a fun bot command i'll add to my bot

misty sigil
#

cat pictures

earnest phoenix
#

okay

#

gifs or just pictures?

misty sigil
#

that provides both

earnest phoenix
#

okay i normally use giphy and tenor

misty sigil
#

how do i get the highest role

#

of a guild member

earnest phoenix
#

what on?

earnest phoenix
#

@west raptor is it possible to DM you since you declined a bot I'm a second owner on?

misty sigil
#
if(user.bannable){
    user.ban(banReason).then(() => {
    const banConfirmationEmbed = new Discord.MessageEmbed()
    .setColor('#' + randomColor)
    .setDescription(`✅ ${user.tag} has been successfully banned!`);
    message.channel.send(banConfirmationEmbed); // Sends a confirmation embed that the user has been successfully banned
})}
if (user === message.author) return message.channel.send(`You can't ban yourself`) // Check if the user mention or the entered userID is the message author himsmelf
if (!user.bannable || !message.guild.permissionsFor(message.guild.me).has("BAN_MEMBERS")){
const banConfirmationEmbed = new Discord.MessageEmbed()
.setColor('#' + randomColor)
.setDescription(`This person has not been banned, probably something to do with permissions.`);
message.channel.send(banConfirmationEmbed); // Sends a confirmation embed that the user has been successfully banned
}```It always returns "this person hasnt been banned"
west raptor
#

@earnest phoenix sure

earnest phoenix
#

Alright, I believe your DMs were blocked when I tried originally

west raptor
#

try now

prime cliff
#

Why do you have the ban checks after the ban command WaitWhat and no checks for user/bot perms

misty sigil
#

i have

#

just not in that code

#

but actually i just moved that

#

for fitting it in discord

earnest phoenix
#

Is it the database CPU or the server CPU that caused the database delay? I need to know which to upgrade.

pale vessel
#

database CPU? wdym

round garden
#

How do I get pm2 logs to show colour?

torpid juniper
#

pm2 start my-app.js -- --colors

halcyon ember
#
      async function run(){
        await message.author.send(embed)
      }
      run()
    } catch (error){
      message.channel.send("I wasn't able to DM you.")
    }```
#

it doesnt catch the error

pale vessel
#

what are you doing

#

why are you making a function

sudden geyser
#

^ The try statement still won't catch it since it's async.

#

You'd need to await run()

#

Or you could just use .catch directly on .author.send()

halcyon ember
#

i fixed it

#

my thing isnt in a async so i cant do that

#

just made a async function with the try inside

#

how do you check if message author has a certain role

sudden geyser
#

You'd need to check the message member/guild member's .roles.cache.

halcyon ember
#

oh ok

tame anvil
#

h

#

I am waiting for my bot to get approved

#

yes

#

yes

#

kinda

#

yes

#

k

#

cool

#

have fun

paper phoenix
#

(Assuming they have the permission)

ripe latch
#

anyone know how to get the sentry API working with discord.py

#

if you do ping me pls

static trench
#

Can someone help me with Vultr VPS? I try to install discord.py as a dependencies

#

What do i do?

wicked pivot
#
client.messages = new Enmap({name: "messages"});
client.voice = new Enmap({name : "voice"})
const key = `${message.guild.id}-${message.author.id}`
    client.messages.ensure(key, {
        user: message.author.id,
        guild: message.guild.id,
        messages: 0,
        mentions: 0,
        images: 0,
        lastSeen: new Date()
    })
    client.messages.math(key, "+", 1, "messages");
    if(message.mentions) client.messages.math(key, "+", 1, "mentions");
    if(message.attachments > 0) client.messages.math(key, "+", 1, "images");
brittle copper
#

Okay so I wanted to know what core features a bot should have. I know there's a lot of things, but it's hard to just think of what literally every bot does, so I'd appreciate some input/a list of features a good/decent bot should have

earnest phoenix
#

there isn't a standard

#

bots are like art

#

they are art

#

do whatever you want and what you feel like your bot is supposed to be

#

build from your imagination

amber fractal
#

and you can make shit and it'll still be worth hundreds of thousands

earnest phoenix
#

can vouch

#

find the right audience and you can make hundreds of bucks lol

brittle copper
#

Yeah but like

#

what do most bots do

amber fractal
#

that's exactly what people dont want, a rehash of a bot that already exists wont get very far

#

a lot of the stuff that most bots already do is done and it's done really well

#

that's why you gotta make up your own stuff

acoustic kiln
#

Hello

#

How to crop a specific size in a embed

#

I'm getting like that

earnest phoenix
#

you cannot control how anything is displayed on end user's screen

acoustic kiln
tepid canyon
#

That is just a display error

acoustic kiln
#

Can I increase the size of pictures or whatever

earnest phoenix
#

you can but it won't do anything

acoustic kiln
#

Coz the 2nd one looks neat

earnest phoenix
#

the client will always resize it relative to the screen size

acoustic kiln
#

Ok thanks

round garden
#

Why do people make Discord webhooks to announce people who voted?

#

Is it possible to put headers in the Discord webhook URL, maybe they just point it to their API?

#

How would I make it execute a Discord webhook?

earnest phoenix
#

you need a middleware to receive webhook data from DBL and reformat it appropriately for a discord webhook

#

that requires having an active webserver

arctic juniper
#

Hi

turbid pivot
#

How to use puppeteer? im trying to make a screenshot command, but i dont know how to send the message of the screenshot gotten

summer torrent
earnest phoenix
#

database CPU? wdym
@pale vessel my MongoDB database has a separate CPU and doesn't use the hosting server's CPU

raw ravine
#

can anyone tell me good resources from where I can master bot development, (from starting till end)...?

earnest phoenix
#

@raw ravine what language do you use or wanna use?

raw ravine
#

@earnest phoenix brother, i am really confused between .js and .py.
Both are good but I want to know which has better customizable options and with resources to master them

spare lintel
#

For bots you'll probably have to go for what you find easier because they all just get info from the discord API which means it's most likely the same thing but just different languages which means something could be easily done in one but not the other but they both just get stuff from discord API

earnest phoenix
#

they are legit the same in functionality

raw ravine
#

ok so for now good resources for discord.js?

earnest phoenix
#
#

idk why but i just feel like putting yt as one of them feels just right

raw ravine
#

thanks a lot brother... means to much for me!

earnest phoenix
#

you're welcome!

feral aspen
#

Hey

#

In here.. he putted a video in his discription.. does anyone have the script so i can make one the same but different video?

lusty quest
#

you can use markdown and HTML/CSS to edit your page

feral aspen
#

Yes.. I usually do..

#

but Idk how to insert the video.. so do you have a script for it.

#

I want to insert the video like the top same size.

lusty quest
feral aspen
#

if someone has the script.. please kindly do let me know by pinging.

earnest phoenix
feral aspen
pine aspen
#

How'd I get the ping of a MongoDB database?

#

JS.

surreal sage
#

how to like jump back on a script

#

like

#
function aaaa() {

}
if(a === b) {

}
lusty quest
#

did you want to have the code run mutiple times? or did you want to execute something in your function?

surreal sage
#

well i have a giveaway command but idk how i prevend from the bot of winning

restive furnace
surreal sage
#

@restive furnace that looks for it, it doesnt delete it

#

right?

#

show me an example please

restive furnace
#

kk

surreal sage
restive furnace
#
let ids = ["132", "822", "013"]; // lets say that "132" is our client id
let filteredIds = ids.filter(id => id !== "132");
console.log(filteredIds) // Output: [822, 013]```
#

you can try filtering 822 or 013 too

surreal sage
#

how will i do that in my case

restive furnace
#

and see its working

#

i literially just said

surreal sage
#

alr lemme look

#

Works thx

raven nova
#

Why my bot can not get guild.owner of this server? It is always null when my bot receive MESSAGE event.

slender thistle
#

Owner is not cached

raven nova
#

Well, that helps a lot! THX! Can I fetch guild.members manually? I know I can get the owner ID from guild.ownerID.

plush escarp
slender thistle
#

fetchUser sounds like what you want

blissful kestrel
#

Hello

raven nova
#

Hi

earnest phoenix
#

full script

#

discord.js

#

working embeds

#

and commands

#

feel free to use

pale vessel
#

uh what?

#

that's like spoonfeed

earnest phoenix
#

english

plush escarp
coral trellis
#

Is that supposed to be a message edit event?

wheat valve
#

Can someone that knows a decent amount of discord.js DM please? I prefer talking in DMs if that isn't an issue, its about a purge/clear command btw

worn niche
#

I have problem

#

this stupid vsc

#

is saying identifier settings has already been declared

#

and I can't do anything about that

#

SyntaxError: Identifier 'settings' has already been declared
←[90m at Module._compile (internal/modules/cjs/loader.js:872:18)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:790:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:703:12)←[39m
←[90m at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)←[39m
←[90m at internal/main/run_main_module.js:17:11←[39m
[nodemon] app crashed - waiting for file changes before starting...

#

this is error

earnest phoenix
#

how to add an enter?

slender thistle
#

Press enter twice

earnest phoenix
#

oh tysm

plush escarp
#

@coral trellis Yep it is!

#

What's the error?

coral trellis
#

Why are there three arguments being passed with the event and the first being message

plush escarp
#

message, oldMessage, newMessage

#

@coral trellis

#

...

#

(sry for the ping)

coral trellis
#

Yes but what is message defined as cause the event should only provide old message and new message

sick comet
#

I'm starting to feel like I'm hitting my breaking point just trying to figure out how tf to run discord.js properly on Linux and its driving me CRAZY.

earnest phoenix
#

golden tip here

pale vessel
#

aren't those optional packages

honest perch
#

Mhm

earnest phoenix
#

@sick comet lol what are all those files

plush escarp
#

@coral trellis I removed the message but its still not working

earnest phoenix
#

Can someone tell me what the presence intent and server members intent actually do and are responsible for?

earnest phoenix
#

can anyone tell what is the ping command in python...I tried everything but it is now working

quartz kindle
#

@earnest phoenix without presence intents, you will not receive presenceUpdate events, not be able to fetch members with presences, not receive initial presences at login, not be able to access user's statuses and activities
without guild members intent, you will not receive a list of members at login, you will not receive guildMemberAdd/Remove/Update events, you will not be able to fetchAllMembers

earnest phoenix
#

thank you for explaining 🙂

#

appreciate it @quartz kindle

pure lion
#

Can someone help me with weather-js

#

I wanna send the 'current' result but I'm not entirely sure how this works

hasty sparrow
#

Show the code you have written so far

pure lion
#

Okay

#
    case 'weather':
      weather.find({search: 
        msg.content.slice(8),
        degreeType: ('C')
      }, function(err, result) {
        if (err) console.log(err);
        let resultSTR = (JSON.stringify(result, null, 2));
        let location = 'location';
        var locationR = resultSTR[location];  
        console.log(locationR)
        msg.channel.send(locationR)
      });
      break;
surreal sage
#

how can i do like
i have a json and i want the ${} in it from ` in the json strings and i want my script to read

#
{
"a": "`${client.user.tag}`"
}
#

for discord.js

devout wagon
#

backtick

surreal sage
#

i know now

devout wagon
#

You need to remove the "

#

or just not use interpolation at all

#

in this case

surreal sage
#

replacing the " with ` wont change

#

that will make an error

#

or y i know

#

thanks

#

i understand

#

wait nvm

devout wagon
#
`${client.user.tag}`
```yields what error exactly?
#

What aren't you allergic to

#

I'm not a JS or node dev either

surreal sage
#

@devout wagon this is a seperate json file btw

devout wagon
#

that's no surprise then

#

the backtick and string interpolation is not a thing in json

surreal sage
#

owk

devout wagon
#

no, this won't work in a pure json file

quartz kindle
#

a json file is purely for data storage, it is not javascript and has no access to javascript variables or functions

#

the only way to have dynamic data stored in a json file is to use placeholders, and replace them when you load the file

#

for example ```js
// json
{
"a":"%%USERNAME%%"
}

// script
json = require("myfile.json")
json.a = json.a.replace("%%USERNAME%%", client.user.tag)

earnest phoenix
#

How can i make an api with express like .../sos?text=asjobojs?

quartz kindle
#

should be in req.query

devout wagon
#

oh confused url and query parameter there

#

but it's both explained there

earnest phoenix
#

req.query?

quartz kindle
#

yes

devout wagon
#

req.query.yourparam

earnest phoenix
#

req.query.text

#

?

quartz kindle
#

yes

earnest phoenix
#

Ok i will try thx

earnest phoenix
#

Not working anything. - WORKED!

#

i was creating my database with mongoose

#

this is my code

#
module.exports = {

  init: ()  => {
  const dbOptions ={
  useNewUrlParser: true,
  autoIndex: false,
  reconnectTries: Number.MAX_VALUE,
  reconnectInterval: 500,
  poolSize: 5,
  connectTimeoutMS: 10000,
  family: 4
};
mongoose.connect('mongodb://localhost:27017', dbOptions);
mongoose.set('useFindAndModify', false);
mongoose.Promise = global.Promise;

mongoose.connecotion.on('connected', () =>{
console.log('Mongoose connection successfully opened!');
});

mongoose.connection.on('err', err => {
console.error(`Mongoose connection error: \n ${err.stack}`);
});

mongoose.connection.on('disconnect', () => {
console.log('Mongoose connection disconnected!');
});

}
};
#

and it shows this error

#
                     ^

TypeError: Cannot read property 'on' of undefined
    at Object.init (C:\Users\PC\Desktop\DsBot\util\mongoose.js:18:22)        
    at Object.<anonymous> (C:\Users\PC\Desktop\DsBot\index.js:110:17)        
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47```
lusty quest
#

connecotion -> connection

earnest phoenix
#

omg ty im blind

lusty quest
#

gg api is dying again

earnest phoenix
#

lol

hearty breach
#

question: is there some tutorial or sth like that about using Discord to log in on a web page? I'd like to create a dashboard, but I've got no idea how or where to start (not a web developer, but only client so far)

quartz kindle
#

search for OAuth2

hearty breach
#

alr

#

and another question: is it recommended to run bot and webserver on the same server instance or rather split them?

quartz kindle
#

running them together is probably easier, but if the bot is down, the website will also be down

#

so having separate processes with a shared database is usually the way to go

hearty breach
#

yeah def separate processes. I was wondering about the "physical" instance of a server, like a gcloud compute engine instance.

#

thx, I'll look around the web and see what I can find 👍

quartz kindle
#

nothing wrong with having them both in the same machine, unless the scale is huge

hearty breach
#

nah, it's on 121 guilds now and pretty specialized (obtain info from some game's API), so I guess it won't have to scale that much. Other bots serving a similar purpose are at max on 150 guilds rn.

quartz kindle
#

yeah, having separate machines is only needed if your bot is like in 100k+ servers

hearty breach
#

dang I guess I won't ever reach that 😄

#

(not that I would like to)

quartz kindle
#

at that point you start getting frustrated at your own growth instead of happy lmao

long yew
#
client.on('message', async message => {
      let args = message.content.substring(prefix.length).split(' ');
      if (!message.member.permissions.has('MANAGE_MESSAGES'))
      return message.channel.send('You need the "Manage messages" permission to use the delete command')
      switch(args[0]) {
        case'purge':
        message.channel.bulkDelete(args[1])
      }
    })
``` When using this and doing .purge 1 it only deletes the command how can i make it delete a message and the command i put in?
hearty breach
#

You could delete the message with the command first. That's how Dyno does it.

long yew
#

so where would i put the command message.delete() ?

hearty breach
#

right before js message.channel.bulkDelete(args[1])I guess

quartz kindle
#

right before bulkDelete

#

but you need to await it

long yew
#

so js await message.delete()

#

?

quartz kindle
#

yes

long yew
#

ok thanks i'll try that

royal granite
#

How can i delete a channel, or delete all channels in a discord server

earnest phoenix
#

K

long yew
#

do you know how i can increase the purge limit from 100 to 1000?

earnest phoenix
#

You can't... Even if you can, it's api abuse... Api abuse is not good

tawny cape
#

Hello everyone ,I was having trouble figuring out how to remove all reaction from a message I tried alot of thing none of them worked can someone help me ?

long yew
#

@earnest phoenix dyno does 1000

tawny cape
#

I tried it :/ I guess my bot didn't have the permission to use it i'll try again thank you ! 😄

quartz kindle
#

@long yew the only way is to run bulkDelete multiple times in a row until the target number is reached

long yew
#

ok

#

how would i do that?

quartz kindle
#

with a loop and a bit of math

long yew
#

ok

#

thanks

earnest phoenix
#

You can't... Even if you can, it's api abuse... Api abuse is not good
@earnest phoenix api abuse?

#

Yea

#

Dyno does?

#

It uses tactics and ways to prevent api abuse... Waits until it purges the first 100 messages by bulkDelete then does Another bulkDeletes one by one as it avoids api abuse by it @earnest phoenix

#

hm ok

cinder patio
#

How can I check if a number in javascript is odd without using the remainder operator. The dumber the solution is the better

lusty quest
#

function isOdd(n) {
  return n == parseFloat(n) && !!(n % 2);     
}
``` try this
cinder patio
#

Without checking the remainder

hearty breach
#
function isOdd(n) {
  n = Math.abs(n) // to make it work for negative numbers as well
  while (n > 0) {
    n -= 2
  }
  return n == 1
}```
#

Is this dumb enough? 😄

long yew
#

anyone have any ideas of good commands to have on bots?

slender thistle
#

What's wrong with just doing !(n % 2)

lusty quest
#

@long yew the less is better. having a ton of commands can be a bad thing. If you can try to specalize on one thing

mental spade
#

Could someone help me with why my role changes are only showing 1 role not affected by a role change in my guildMemberUpdate code:

https://pastebin.com/34TsKAXR

Trying to get it to list when a person is added or removed from a role

Currently it detects when someone is added, but it doesnt show the role the person is added to.

Discord.js v12

long yew
#

can anyone help me clean up the brackets? because a few are missplaced

hasty sparrow
#

Editor/IDE already underlines the incorrect brackets

long yew
#

thanks lol

#

i fixed it now

hasty sparrow
#

@mental spade Why are you saying a role has been removed whenever the newmember contains the oldmember's role?

lusty spade
hasty sparrow
#

The oldMessage probably isn't cached

lusty quest
#

^

#

from where did you export the oldMessage?

lusty spade
#

everytime i tested it i make sure to send a fresh message and edit it

#

from my index.js

lusty quest
#

did you restarted the bot between the tests?

hasty sparrow
#

How are you registering the messageUpdate listener?

lusty spade
#

i am using nodemon which restarts everytime i save

#
    require('./events/messageUpdate')(message, oldMessage, newMessage);
});
hasty sparrow
#

messageUpdate only has 2 parameters, old and new

lusty spade
#

so i must remove message?

robust moth
hasty sparrow
#

Log the token

robust moth
#

All are ok

earnest phoenix
#

@robust moth can you show the part above that?

#

Above 27th line

robust moth
#

Ok

lusty spade
earnest phoenix
#

Literally Wondering what can be wrong there

#

Guys how i can add a domain to nodejs server

robust moth
#

What's wrong is I changed the token and used the new token

summer torrent
#

@earnest phoenix use nginx or apache

earnest phoenix
#

ok thx

#

but apache is for php ?

summer torrent
#

idk

split hazel
#

It's not only for php

#

You can use plain html and js too

earnest phoenix
#

but i want to use a nodejs server

hasty sparrow
#

@lusty spade Check whether the message author is a bot

split hazel
#

I dont really use them, my idea of a Web server is express/fastify for nodejs

earnest phoenix
#

yes

lusty spade
#

but i cant use message so how?

earnest phoenix
#

but express but gives me port

#

not domain

trail finch
#

Hello

earnest phoenix
#

and it is local host

hasty sparrow
#

Domains need to point to the IP of your server

earnest phoenix
#

yes

torn ravine
#

I wanna make some of my features toggle-able

#

using a db

hasty sparrow
#

@lusty spade oldMessage?

earnest phoenix
#

so how i can point it

trail finch
#

hello Umm there is a sqlite error what should i do.....?

hasty sparrow
#

Have you got a domain?

earnest phoenix
#

yes

trail finch
#

Hm

#

domain? what is it?

hasty sparrow
#

Maybe tell us what the error is?

lusty spade
#

oh ok thanks

earnest phoenix
hasty sparrow
#

Have you also got a hosting solution?

trail finch
#

kk

earnest phoenix
#

yes

hasty sparrow
#

Go to your hoster's dashboard and set it up

earnest phoenix
#

ok

trail finch
#

its paid 😱

#

well because of the error i cant use a single cmd of that bot

trail finch
#

wait lemme

#

wait nvm its fixed but now the problem is with the catch cmd

#

anyone...

hasty sparrow
#

Hang on, asking my crystal ball what your error could be /s

spark breach
#

is there a way you can only allow yourself to do a command? if yes how? I can't seem to find it anywhere (I'm using discord.js)

trail finch
#

Hm

brave apex
#

is there a way you can only allow yourself to do a command? if yes how? I can't seem to find it anywhere (I'm using discord.js)
@spark breach yep

trail finch
#

its easy

hasty sparrow
#

Check whether the message author's id is your id

brave apex
#

yes

trail finch
#

hm

spark breach
#

ohhhh oki, ty

trail finch
#

so i was asking that how to do the catch command...?

acoustic kiln
#

@spark breach im a js dev and how to set datas for each pokemons and enable catch command as im making a pokemon bot

lusty quest
#
try{
//do stuff

}catch(error){console.error(error)}
hasty sparrow
#

What "catch" command?

acoustic kiln
#

in where dude

trail finch
#

hm

acoustic kiln
#

the pokemon catching

trail finch
#

i mean like catch <pokemon name>

#

why we have the same ques???

acoustic kiln
#

oo u too making pokemon bot??

hasty sparrow
#

Cause everybody seems to be creating pokecord clones rn

trail finch
#

yeh

acoustic kiln
#

yeah

spark breach
#

so for example this: (or did I do something wrong?)
if(!message.author.id('553649764177149972')) return message.channel.send("Sorry you can't use this command!");

acoustic kiln
#

im just creating for my server

trail finch
#

hm

#

me too lol

hasty sparrow
#

@spark breach Try it out, but looks good

acoustic kiln
#

so i need some helps in it

spark breach
#

@spark breach Try it out, but looks good
kk I'll make a command real quick

split hazel
#

message.author.id isn't a function

spark breach
#

wHy DiD i PiNG mYsElf

trail finch
#

i tried to find it on google but failed

spark breach
acoustic kiln
#

ooo

hasty sparrow
#

Oh derp, missed that

spark breach
#

what do I need to do then?

acoustic kiln
#

cmon someone help plz

trail finch
#

Hm

hasty sparrow
#

It's a property, use good old ===

trail finch
#

i am in the next line after beauver maybe

acoustic kiln
#

kek

spark breach
#

It's a property, use good old ===
ah oki

brave apex
#

😉

acoustic kiln
#

i ve got some ffrnds here but they arent cming

spark breach
#

if(!message.author === '553649764177149972') return message.channel.send("Sorry you can't use this command!");
so this?

trail finch
#

Hm

#

aint*

hasty sparrow
#

Not quite

trail finch
#

hm

hasty sparrow
#

Negate the equality comparison

spark breach
#

oh oki

trail finch
#

Hm

hasty sparrow
#

Also, you are still checking the id, not the author object

#

@trail finch Stop it please, makes helping others difficult

trail finch
#

ok sorry

spark breach
#

Also, you are still checking the id, not the author object
oh makes sense yeah

earnest phoenix
#

@spark breach use !==

trail finch
#

when it will be my turn can you plz ping me ;|

lusty quest
#

what is your issue?

earnest phoenix
#

if(message.author.id !== '553649764177149972') return message.channel.send("Sorry you can't use this command!");

hasty sparrow
#

Don't spoon feed please

earnest phoenix
#

:d?

spark breach
#

if(message.author.id !== '553649764177149972') return message.channel.send("Sorry you can't use this command!");
I'll try it, ty

trail finch
#

umm i want to make a pokemon bot so i need the catch command help

earnest phoenix
#

np

lusty quest
#

define catch

sacred wraith
#

Do shards have their own API limits?

hasty sparrow
#

Not try-catch, the catch command

trail finch
#

umm like pokecord after the pokemon spawns then the catch command to catch the poke

hasty sparrow
#

Write the command

trail finch
#

which one

hasty sparrow
#

The one you need

trail finch
#

catch

acoustic kiln
#

is it like

lusty quest
#

get a idea how you want to aproach it and then write the code for it

trail finch
#

like?

hasty sparrow
#

Keep track of what pokemon spawns and use the command's parameter to do your checks

acoustic kiln
#

const catch ={catch}

trail finch
#

maybe i tried tht one

#

but is it enough? i dont think so

acoustic kiln
#

cmon i aint a dev

trail finch
#

xD nvm

lusty quest
#

maybe its a to large project for you RN. try to learn some more before you start bigger stuff

hasty sparrow
#

Learn the basics before making a bot

trail finch
#

umm ok

eternal adder
#

Does anyone know an easy way to get a default server image based on the name?

lusty quest
#

you have the server name and want to get the image of the server?

earnest phoenix
#

hey guys how do i change the background colour? html <body style ="background-color:lightblue"> this doesn't seem to work

hasty sparrow
#

Top.gg page or your own HTML page?

heavy anchor
earnest phoenix
#

Top.gg page or your own HTML page?
top,gg

slender thistle
#

Use CSS

hasty sparrow
#

The above link shows how to customize the body using CSS

earnest phoenix
#

yep thanks guys

#

i use css example but the background did not work

#

you have to overwrite existing classes

#

find them with inspect element

#

ight ill try that

#

@earnest phoenix Hey, you should make a video on how to change top.gg colour. It would be supper useful

digital ibex
#

hi, im having a little issue with css

#

anyone got any ideas?

tepid canyon
#

Change the padding?

digital ibex
#

i change the padding and it moves the text instead of the blue bit

earnest phoenix
#

Can anybody tells me ping command for python

#

Because I tried many thing and it doesn't work

quartz kindle
#

@digital ibex text-align:center on parent, display:inline-block;background:blue on child

inland aurora
#

anyone know how to discordjs v1.12 create roles with admin perms

digital ibex
#

kk

earnest phoenix
#

ok so now what?

solemn latch
#

Depends on the library you use @earnest phoenix

inland aurora
#

anyone know how to discordjs v1.12 create roles with admin perms
@inland aurora when the bot has admin perms too

solemn latch
#

@inland aurora bots shouldnt have admin perms

inland aurora
#

cool

#

it does

earnest phoenix
#

what is library

#

I think js

solemn latch
#

Your bot won't be approved here if it does @inland aurora

inland aurora
#

ok

#

not here

#

but in a different server

#

I want to know how to create roles

earnest phoenix
#

@inland aurora just in General?

inland aurora
#

yeah

#

not here

#

on a different server

winter basalt
#

Your bot won't be approved here if it does
@solemn latch uh pretty sure admin perms are allowed unless im misunderstanding, but mods doesnt tolerate of for example, needing admin perms just to send messages.

vale garden
#

hi

#

in embeds

#

along with the author text

inland aurora
#

like a moderator command that is !createrole admin perms: 8

vale garden
#

you can only add a link

#

for the image next to it

#

so how do i add the author's pfp there

#

anyone knows?

inland aurora
#

@inland aurora can you help me?
@earnest phoenix I don't know what you mean, when you said "Hey, how can I make a command who is create a channel as Username’s-apply and with selected perms?"

quartz kindle
#

you want to change the pfp of the bot?