#development

1 messages ยท Page 655 of 1

slender thistle
#

So

#

did you do anything like async def on_message in your bot's main file

waxen meteor
#

no

halcyon nymph
#

You need a sync

slender thistle
#

wut

earnest phoenix
#

Me too, my problem was lost

halcyon nymph
#

You also need @client.event before the definition as well

earnest phoenix
#

I tried to figure it out meanwhile

waxen meteor
#

I used the @commands.Command() decorator with all my commands, above the async def [command name

slender thistle
#

lowercase c

waxen meteor
#

yes, whatever the syntax is

#

I'm not looking at the code rn so idr

earnest phoenix
#

Nothing came out just more errors because of throwing an async function where it shouldn't be

topaz fjord
#

You were asking about the async thing right?

earnest phoenix
#

Yeah

#

Don't know how to make it an async

slender thistle
#

@waxen meteor Well I'm sure d.py handles responding to bots by default

earnest phoenix
#
let muterole = message.guild.roles.find(r => r.name === "flex taped");
                if(!muterole) {
                    try{
                        muterole = await message.guild.createRole({
                            name: "flex taped",
                            color: "#514f48",
                            permissions: []
                        })
``` this should provide more info
topaz fjord
#

Can you post the whole code in a hastebin

earnest phoenix
#

the whole code for the mute command?

topaz fjord
#

Yes

earnest phoenix
#

alright

waxen meteor
earnest phoenix
#

@livid zodiac

topaz fjord
#

You have to put async in front of the main function

#

I'm assuming all these commands are in the message event

earnest phoenix
#

yes

#

so i have to add the async in front of all the command

#

wait let me see if i got it

topaz fjord
#

no

#

You have to add async in front of (message) => {

#

So it becomes async (message) => {

earnest phoenix
#

ooooooh

stray garnet
#

```client.on("message", (message) => { message.isMemberMentioned(589151834132840480) message.reply('My Prefix is !'); });


i put that code in my bot and at every message it started spamming 10 messages. How to fix this?
weary lark
#

#1 make sure that your bot isnt running 10 times

stray garnet
#

and how to to that?

weary lark
#

aka make sure you dont have 10 instances of the botto

stray garnet
#

d.js @earnest phoenix

weary lark
#

or 10 command promts of node bot.js running

weary lark
#

@stray garnet try dis ```js
client.on("message", message => {
if (message.content.startsWith('@sterile zinc')) {
message.channel.send('lol');
}
});

stray garnet
#

but now i ger error

weary lark
#

show me

#

i might be dumbo

#

oh

#

OH

#

i am

#

wait

#

fixed

stray garnet
#

thx

earnest phoenix
#

@topaz fjord thanks, it works now. It still doesn't "mute" the user, it just gives him the role which has no perms but he can still type, you know. I will figure that out later no worries

west spoke
#

Or have it be custom to the server

earnest phoenix
#

i appreciate

covert kernel
#

Yea I did

#

set up an animation

#

for my text though

weary lark
#

did you do for the background

covert kernel
#

Nope

weary lark
#

thats why

covert kernel
#

ohhh

#

ok

#

lemme try

weary lark
#

xdd

#

kk

high lava
#

@covert kernel section.page

#

Not body

#

If you mean the DBL site

covert kernel
#

It still didnt work

#

oh

#

Yea I do

#

How did you find that?

high lava
#

section.page is for the background of the page outside of the embedded code

covert kernel
#

Or where would that be

#

What is the inside

high lava
#

Inspect element

covert kernel
#

oh

#

you right

high lava
#

Inside you have to give a div an ID or class before changing the color

covert kernel
#

I forgot that exsisted

#

ok

high lava
#

also, try !important sometimes

weary lark
#

^

#
.longdescription .content {
background-color: red;
}
#

this works

earnest phoenix
#

yo guys

#

my bot gives error 429

#

it means too many requests

#

about 50+ people using the bot at the same time, its a music bot

#

everything is up to day

weary lark
#

lmao wait is your bot the spotify bot?

earnest phoenix
#

no

#

youtube!

#

i lied

weary lark
#

oh

earnest phoenix
#

add cooldowns to your commamd

#

command*

weary lark
#

^

earnest phoenix
#

already have

#

4 second

#

cool down

#

its just too many people using the bot

#

how do bigger bots deal with this

#

thats the thing like!!!?

#

they handle ratelimits

topaz fjord
#

Thonk I don't have cooldowns

#

idk if d.js handles ratelimits

earnest phoenix
#

turtle how big is your bot?

topaz fjord
#

2650

earnest phoenix
#

alright

#

node.js?

topaz fjord
#

Yes

earnest phoenix
#

ok, then why am i getting 429?

#

and you are not

tight heath
#

Yes

#

Because you have a sudden increase in requests

earnest phoenix
#

which makes sense but

#

i need a solution

#

handle your ratelimits

#

or, alternatively, use a library which handles ratelimits for you

#

but error 429 is from youtube i think

#

not discord

#

you should probably go make sure where it comes from

#

plus discord.js api handles ratelimits

#

so i think its youtube

#

im assuming you're using the official api

#

wrong channel

#

yes

slim heart
#

Heck sorry

earnest phoenix
#

i personally wouldn't use the official api

#

what would you use instead?

#

it's too restrictive, use alternatives like scraping content

#

you can check out how lavaplayer works

#

you can also use software like youtube-dl

topaz fjord
#

Lavaplayer is for jda

#

You'll need to use lavalink instead

earnest phoenix
#

we are using discord.js and youtube-dl and the youtube api is ratelimiting it heavy

#

Handle your ratelimits is kinda hard

please wait 5 minutes before you can listen to your music as youtube is taking a shit

weary lark
#

lmao

earnest phoenix
#

also doesnt ytdl-core scrape youtube?

broken shale
#

use lavalink

earnest phoenix
#

lavalink is trash

#

it gets rid of the hassle of setting up proper audio but it's trash

weary lark
#

just wondering but is there anything which beats node-opus? lol

earnest phoenix
#

i think not

#

there's opusscript which was made by abal

#

i don't know which one is better in performance

#

api-side they're both pretty close

covert kernel
#

How do you make the longdescription transparent

#

as in there is nothing there

#

no color or anything

topaz fjord
#

css

covert kernel
#

i mean

#

ik

weary lark
#
background: rgba(0,0,0,0);
covert kernel
#

already got it

#

ty though

weary lark
#

np lol

covert kernel
#

Actually

#

How would you blur a background image?

amber fractal
#

take the image into photoshop

#

blur it

#

use it

#

idk if you can do that in css

earnest phoenix
#

you can

#

blur overlay

amber fractal
#

but Im no good with front end

topaz fjord
#

you can use filter()

thin sable
#

Wich Discord Librairy is the most used ?

earnest phoenix
#

probably discord.js

thin sable
#

the best

topaz fjord
#

d.js is easily on the top since most people decide to jump into node

vagrant bison
#

The vps server should be located in France?

#

for hot the discord bot

neat falcon
#

@topaz fjord all them glitch tutorials use discord.js i bet

earnest phoenix
#

js appeals to low iqs because js logic is as messed up as theirs

mossy vine
#

so i guess im low iq for preferring a simple language that can do many things

earnest phoenix
#

did i say that

opaque eagle
#

I mean I'm not a js-hater per se but I hate how ppl try to do too much with js

earnest phoenix
#

or did i say the language appeals to low iqs, i didn't say only

opaque eagle
#

it's meant to be run in the browser for fuck's sake

#

And then node.js came long, making poor performance the industry standard for generations to come

earnest phoenix
#

i mean, following atwood's law, any application that can be written in js will eventually be written in js

#

no matter how unoptimized it is, it will be written in it

mossy vine
#

basically, yeah

#

but then again, it makes sense not having to learn another language for the server

opaque eagle
#

Not really

#

Having separate langs for separate use cases is necessary

#

JS basically runs on a "one-size-fits-all" methodology

mossy vine
#

of course, but should beginners really have to learn a whole (like way more complicated) other language just for the server

earnest phoenix
#

for people who don't care about performance, they won't learn another language and will stick to theirs if possible

#

people who do care about performance, e.g companies will do it in a more abstract and lowlevel language

opaque eagle
#

Imagine writing a desktop app in JavaScript... can't relate

earnest phoenix
#

chromium apps aka ram bullies

mossy vine
#

imagine having to hire 3 times as many developers to build native apps for desktop operating systems

opaque eagle
#

You mean imagine writing a good app?

#

yes, i can imagine that

earnest phoenix
#

i mean, discord has a lot of devs for desktop and they still fail to make an app performant

#

because ๐Ÿ’ธ

opaque eagle
#

Yeah JavaScript and node are hip amongst tech startups

mossy vine
#

plus ui differences, and likely other differences and having to develop for +2 platforms

#

the performance is a tradeoff for ๐Ÿ’ธ and having to deal with less differences

#

it makes sense for the business

opaque eagle
#

It's still much worse than developing with the native lang

#

Xcode and Android Studio are powerful tools for which no equally-competent alternatives exist

mossy vine
#

and much cheaper

opaque eagle
#

Those lame electron devs who can't step outside their comfort zone don't have access to those utilities

mossy vine
#

mobile is already native tho, isnt it

opaque eagle
#

wdym

mossy vine
#

discord for android and ios are already native, made with android studio and xcode, arent they?

opaque eagle
#

Pretty sure it's built with React Native

topaz fjord
#

discord is react-native

#

yes

#

I prefer using native langs

late hill
#

If yall make my bots popular enough for it to matter what language I'm using, I'll gladly switch

west sand
#

guys how can i make a timed command in discord.js

earnest phoenix
#

what does that mean

west sand
#

it mean they have to wait (example. 10 mins) to use this command again

topaz fjord
#

store the timestamp of when the user last executed the command and compare it to the current timestamp

west sand
#

okay i'll try that

inner jewel
#

discord for android is written in java/kotlin

#

ios is react native

topaz fjord
#

it is?

#

I thought they used both

#

React for both

inner jewel
#

android used to be

#

but it was slow as hell so they rewrote it

topaz fjord
#

Oh

astral panther
#

!p Netflix

hybrid ruin
snow urchin
#

This is a new help command I have been working on:
https://pastebin.com/8WnEpQnw

When I go to use it, I get the following error:

(node:10323) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined

at /app/commands/CreatorOnlyCommands/testhelp.js:9:58

    at /rbd/pnpm-volume/2aae3560-c7d1-4c22-8c96-9d911419476a/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/util/Collection.js:483:62

    at Array.sort (<anonymous>)

    at Map.sort (/rbd/pnpm-volume/2aae3560-c7d1-4c22-8c96-9d911419476a/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/util/Collection.js:483:47)

at Object.module.exports.run (/app/commands/CreatorOnlyCommands/testhelp.js:9:10)

at Object.exports.run (/app/events/message.js:128:9)

at Client.<anonymous> (/app/index.js:230:51)

    at Client.emit (events.js:201:15)

    at MessageCreateHandler.handle (/rbd/pnpm-volume/2aae3560-c7d1-4c22-8c96-9d911419476a/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

    at WebSocketPacketManager.handle (/rbd/pnpm-volume/2aae3560-c7d1-4c22-8c96-9d911419476a/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)

What could be causing the error?

amber fractal
#

a.help is undefined

snow urchin
#

ye but how?

steel cloak
#

how many servers should your bot be in before you start to shard?

rapid storm
#

Yo

#

I have a question

#

I made a bot

#

but why do some get denied

haughty rose
#

@steel cloak it's recommend like 2500 before sharding

hybrid ruin
#

Tons of examples

#

A bot responding to "sa" (???), or spamming nonsense upon using commands or just general talking etc

#

Going over the rate-limit, nsfw in non-nsfw areas etc etc

steel cloak
#

@haughty rose ahh okay thanks a lot

haughty rose
#

Np

hushed berry
#

@steel cloak @haughty rose 2500 is the max # of servers any shard can have. 1000 per shard is what discord reccommends

haughty rose
#

Ah thank you

#

I misunderstood

steel cloak
#

yeah thank you too,, you're all good giveen lol

warm marsh
#

So, Does anyone know why I can't use .bind on a module.exports = async() => {} function?

#

nvm, Fixed it.

earnest phoenix
#

Halp?

#

What website is supposed to look like

#

wat do

west spoke
#

@earnest phoenix make iframe height auto

#

That, or have a version of the website specifically for dbl

#

Eg, I have a desktop, and a mobile version of my post site

earnest phoenix
#
<style rel="stylesheet" media="screen" type="text/css">
#

is this okay?

bright spear
#

@earnest phoenix as we have already told you, the bot description in DBL is NOT a full website

#

You shouldn't be pasting a whole website's code into it

earnest phoenix
#

I mean

bright spear
#

If you want to embed a separate website, use an iframe

earnest phoenix
#

I asked
HTML's <style> tag work? I was told yes.
Offered solution for fix? Remove HTML and Body tags

#

Fix the problem? No.

bright spear
#

You aren't using it the way it's supposed to be used

#

You shouldn't paste a whole website into it

honest karma
#

no

#

use an iframe like they said

#

the style tag is for css

bright spear
#

If you want it to show a whole website, use an iframe ^

honest karma
#

let me link a doc

west spoke
#

Question.

#

Will previous links in the form

#

http://

waxen meteor
#

writes documentation on HTML
uses an ASPX document

earnest phoenix
#

Is that how Melmsie did it for Dank Memer?

#

iFrame?

west spoke
#

Still work if its changed to https://

honest karma
#

yes

west spoke
#

K

#

I don't wanna have to change my api

honest karma
#

I can do a quick example if you want a more indepth explanation

#

or you can read the doc I linked

west spoke
#

Nah

earnest phoenix
#

Reading it, thank you @honest karma

honest karma
#

np

#

if you want to remove the ugly border go to the style tag and do iframe{border:none}

bright spear
#

@earnest phoenix yes dank memer uses an iframe

earnest phoenix
#

I'd have to host the website somewhere

bright spear
#

Yeah

earnest phoenix
#

No clue how to ownhost a site yet

bright spear
#

Just use netlify or GitHub pages

#

They're free

earnest phoenix
#

GitHub pages eh?

#

:O

#

SICK

honest karma
#

ywait you can host on github?

bright spear
#

Yes

honest karma
#

holy shit I didn't know that

west spoke
#

But its public I believe

bright spear
#

Only for static html

#

You can't run node or something ofc

earnest phoenix
#

Ye

#

Watching a couple clips rn

west spoke
#

If needed, I can host using the url neko-bot.net/yourwebsitename/html-file.html

#

If you absolutely need it

bright spear
#

@west spoke did u set up cloudflare yet

honest karma
#

I need to code a website for an upcoming bot but it's far from finished

west spoke
#

nu I'm using a AWS-provided certificate

bright spear
#

Is it free?

west spoke
#

Yes

#

I checc

bright spear
#

Cloudflare is free and also makes your site faster and gives ddos protection

#

So pretty much everyone uses it

west spoke
#

Doesnt aws do that too?

#

I mean I don't have anything private.

#

Most private thing there is a little app I made for my parents

bright spear
#

Aws is hosting right?

west spoke
#

Yeh

#

Well, no

#

It's more google console

bright spear
#

Also jake said aws is shit bloblul

west spoke
#

But made by amazon

#

he doesnt have a opinion

#

It's good tbh

bright spear
#

Cloudflare goes in front of your hosting, it doesn't actually host your site

west spoke
#

Meh

#

It would need access to the bucket I think

bright spear
#

DBL, discord, and like a third of the internet uses cf

#

No

earnest phoenix
#

What's the Acceptance Rate for newly added bots?

west spoke
#

But if cloudfare goes down, then so will aws

#

AWS uses cloudfare

amber fractal
#

@earnest phoenix there is no rate

#

just follow the rules

bright spear
#

No it doesn't

earnest phoenix
#

ah

amber fractal
#

and it's 100%

bright spear
#

And cloudflare rarely goes down

west spoke
#

It went down with cloudfare

#

the last month

#

cloudfare died

bright spear
#

It went down a few days ago for the first time in like 6 years

west spoke
earnest phoenix
#

Will I get the certified developer role once it's accepted?

west spoke
#

Ni

#

Just developer

#

Cert takes a while to get

#

I wont be getting it for a while.

#

But when I do I'll have a somewhat decent social media service

bright spear
#

Certified developer is for cert bots, bot Dev is for all approved bots

west spoke
bright spear
earnest phoenix
#

Ah

bright spear
#

Now cert is way harder to get

#

@west spoke the cf outage was on July 2

west spoke
#

Mail it to them

#

That's what I was talking about

#

Fuck I cant talk leave me alone I'm tired

bright spear
#

There was another outage about a week before that but that was Verizon fucking up the interner for everything

earnest phoenix
#

Ah, I guess Multi-Purpose bots get thrown shade lol

west spoke
#

Yeah

bright spear
#

Yeah it's sad

west spoke
#

Multipurpose bots are meh

earnest phoenix
#

ultra sources data from numerous games and outputs it from numerous platforms

#

don't thing anyone has that and that's just one ftr

#

it'd be sad to be looked down on just because it does it all

#

:L

west spoke
#

That's why the only multipurpose ones for mine are some moderation, a few anime commands (based around users posting, so that's a +) and quite literally, a posting command.

honest karma
#

I don't get why people hate them?

west spoke
#

Other than that it doesnt have much.

#

People don't hate them

earnest phoenix
#

Ah, my bot is also highly configurable. Is that unique in this field?

west spoke
#

They just arent very useful.

#

Depends.

#

Mine is too.

earnest phoenix
#

Go on c:

honest karma
#

huuh

earnest phoenix
#

my goal is to make a bot 10x more powerful than everything available then uh

#

make it free

west spoke
#

If by "configuable" only using certian channels, setting different moderation actions to different channels, etc.

hushed berry
#

nice

west spoke
#

Galactic is free btw

earnest phoenix
#

like, entirely free

west spoke
#

Galactic is free

earnest phoenix
#

who's bot is this?

west spoke
#

Lemme find it

earnest phoenix
#

on it

honest karma
#

404

earnest phoenix
#

^ ?

#

this thing?

west spoke
earnest phoenix
#

just read all of its features

west spoke
#

Very surprised that isnt certified

#

Also dyno is free too

earnest phoenix
#

feels, generic

#

not true

west spoke
#

yes

#

how

honest karma
#

dyno is free

west spoke
#

since when has dyno been a paid bot

earnest phoenix
#

all of its features?

#

100% free?

west spoke
#

Yes

honest karma
#

yes??

#

it's been like that for like,,, a year?

earnest phoenix
#

maybe im thinking mee6

west spoke
#

Mee6 is like the only paid bot, and its p useless

earnest phoenix
#

whhops

#

lolol yea

#

that one

honest karma
#

idk why mee6 got into like,, paid sht

#

all of that shit was free

earnest phoenix
#

they've done incredibly well with Dyno

#

looks incredible now

#

webpage, panel, etc. the overall theme is wonderful

west spoke
#

Yeh

earnest phoenix
#

Very happy for em

#

I gotta get going

#

Y'all have a good night!

inner jewel
#

idk why mee6 got into like,, paid sht
because hosting a bot costs money

honest karma
#

ik

#

also green text in 2019

hushed berry
#

someone let me know when y'all are gonna pay for my bot bloblul

honest karma
#

fine premium commands like playing music

bright spear
#

@honest karma @earnest phoenix both mee6 and dyno have some premium features

honest karma
#

oh wow

bright spear
#

pretty much all big bots have premium features

honest karma
#

huh.

amber fractal
#

Dyno is a lot of premium now

#

ok let me rephrase

#

the majority of it is free

#

like an embed editor

copper cradle
#

yeah

bright spear
#

the embed stuff is pretty cool

#

there are also some custom command features that arent mentioned but are premium only

amber fractal
#

@bright spear I meant embed is basic bitch programming

#

It's real easy to do and there are some bots that do this for free ยฏ_(ใƒ„)_/ยฏ

honest karma
#

embeds look nice and there's like an embed genrator if you're lazy

uneven rover
#

Seems fair to those who don't want to code

heady zinc
#

@amber fractal u wat

#

there's no "really dumb features" that aren't worth premium

#

it's a whole set of features, not just one feature hmm

#

also dyno's embed editor is extremely good, intuitive and convenient which definitely makes it premium worthy for most users

amber fractal
copper cradle
#

si

shy rose
#

first link is an 11/10

pulsar mango
#

thanks @slender thistle (sry for mention) yu3

prime cliff
#

@amber fractal 1st link is like hey do you understand json? No? ok bye

earnest phoenix
#

you can pick up json within a minute

#

it has pretty simple rules which follow common sense

prime cliff
earnest phoenix
#

low iqs dont count angeryBOYE

#

/app/node_modules/better-sqlite3/node_modules/bindings/bindings.js:133

throw err;

^

Error: Could not locate the bindings file. Tried:

โ†’ /app/node_modules/better-sqlite3/build/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/build/Debug/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/out/Debug/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/Debug/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/out/Release/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/Release/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/build/default/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/compiled/8.15.1/linux/x64/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node

โ†’ /app/node_modules/better-sqlite3/lib/binding/node-v57-linux-x64/better_sqlite3.node

at bindings (/app/node_modules/better-sqlite3/node_modules/bindings/bindings.js:124:9)

at Object.<anonymous> (/app/node_modules/better-sqlite3/lib/database.js:4:40)

at Module._compile (module.js:653:30)

at Object.Module._extensions..js (module.js:664:10)

at Module.load (module.js:566:32)

at tryModuleLoad (module.js:506:12)

at Function.Module._load (module.js:498:3)

at Module.require (module.js:597:17)

at require (internal/module.js:11:18)

at Object.<anonymous> (/app/node_modules/better-sqlite3/index.js:2:18)
#

What is the problem?

quartz kindle
#

It means Sqlite was not correctly installed

cursive gale
#

hey i wanna keep my token in a .env file

#

how would i do that?

earnest phoenix
#

TOKEN=TOKEN

#

without SPACES or "

cursive gale
#

kk

#

then?

#

any changes to the main file?

earnest phoenix
#

client.login(process.env.TOKEN)

cursive gale
earnest phoenix
#

yes

cursive gale
earnest phoenix
#

yes

cursive gale
earnest phoenix
#

your token is invalid

#

maybe you need to regenerate the token or other

mossy vine
#

try logging process.env.TOKEN to see if it even registers it

cursive gale
#

i just grabbed it

#

kk

mossy vine
#

my guess is that your .env file contents dont actually register as env variables

earnest phoenix
#

if you want

#

you can install npm i dotenv

mossy vine
#

thats exactly what you need tho

earnest phoenix
#

and put this: require('dotenv').config() on the first line of your main file

cursive gale
#

what does it do?

mossy vine
#

it loads the contents of your .env file into process.env

cursive gale
#

kk

#

yup

#

token is unidentified when loged

mossy vine
#

use dotenv

cursive gale
#

kk

#

gotta open cmd now

mossy vine
#

yes

cursive gale
#

ohh it works now tyy

#

:))

cursive dagger
#

We wont spoon feed you, also what do you mean by "premium code"

earnest phoenix
#

@iron lagoon ^

cursive gale
#

hey

#

i got another problem sending pics

mossy vine
#

m is not defined

#

send full code

cursive gale
mossy vine
#

m should be the message.channel.send in the setTimeout, right?

cursive gale
#

yee

#

i'm making an animation thing

mossy vine
#
setTimeout(async function(){
  let m = await message.channel.send(load1)
}, 12000)```
cursive gale
#

ok

#

ty

#

i'll try that

mossy vine
#

does it work like you expected?

cursive gale
#

nope

mossy vine
#

yeah its because of how setTimeout works

cursive gale
#

it's sending load1 then 3 then addedcodeemb then load4

mossy vine
#

yeah

cursive gale
#

yeah

#

looks like a disaster

mossy vine
#

if you want to wait x ms you should instead await a promise that resolves in a setTimeout

cursive gale
#

any better way to do the animation

mossy vine
#

it doesnt block the event loop and wont execute code until its resolved

cursive gale
#

like i want it to send after a few secs

#

so it looks legit

#

so like send load 1 then wait a few secs then 2 then again fe secs and so on

mossy vine
#
function sleep(ms) {
    return new Promise((resolve, reject) => {
        setTimeout(function() {
            resolve()
        }, ms)
    })
}

setTimeout(async function(){
    doSomething()
    await sleep(1000)
    after1SecondThisFunctionWillExecute()
    await sleep(3000)
    after3MoreSecondsThisFunctionWillExecute()
})```
cursive gale
#

hmm

#

i forgot about the sleep

#

i'll try it

#

ty for the help

mossy vine
#

๐Ÿ‘

cursive gale
#

:))

mossy vine
#

is it working?

cursive gale
#

dude

#

ty sooo muchhh

mossy vine
#

yw

#

clean code + async/await

cursive gale
#

i can't thank you enough

#

yeah i use a beautifier

nocturne hazel
#

When mapping a guilds emojis, can you get the bot to send the actual emojis?
Because, message.guild.emojis.map(m => m.name).join(" ") returns the emojis names, but not with the : : in front of them.

drowsy sentinel
#

(m => m.toString()).join(' ');

nocturne hazel
#

Ahh

#

Thanks

#

Did not know toString works for emojis as well

drowsy sentinel
#

Because name only outputs the actual emoji name. While toString will output <:nameofemoji:>

late hill
#

or put ${m}

mellow crown
#

Guys I need help

#

args[0] shows me the first letter not word

#
    const args = nocomma.toString().replace(/,/g, ' ');```
#

Discord.js btw

sacred minnow
#

does anyone have a profile card template or something i could use?

earnest phoenix
#

hello

#

is it only me or are you guys getting error 429 too

slender thistle
#

Ratelimited

earnest phoenix
#

nope doesnt help

slender thistle
#

DBL?

#

Discord?

earnest phoenix
#

youtube

#

it is insane

slender thistle
#

Try later

#

429 is "Too Many Requests"

earnest phoenix
#

i did it works later, i am aware but i am not the only dude

#

this was published 4 days ago

#

and it is true

#

no matter how many we rate limit it still happens

#

we even start caching info still happens

#

we never got something like this before it never happened, till about a week ago

#

till now

restive night
#

may i ask about discord.js here?

	
	msg.react('โซ')
	
	const Filter = (reaction, user) => reaction.emoji.name === 'โซ' && user.id === message.author.id;
	
	const react = msg.createReactionCollector(Filter, { time: 1 * 60 * 1000 });
	
	
	react.on('collect', r => { 
		
		r.remove;
		
		})
	
})```
how to remove user reaction after reacted to message? `r.remove` on my code doesn't work. thanks before.
stray garnet
#

@sacred minnow Make your Own, its easy

sacred minnow
#

i tried but its always shit ;-;

mossy vine
#

r.remove()

#

@restive night

restive night
#

let me try, thanks btw

pale compass
restive night
#

@mossy vine it works but it remove bot reaction, not user reaction :(

sacred minnow
#

instead of react.on('collect', r => { try react.on('collected', r => {

restive night
#

@sacred minnow doesn't work

lofty hamlet
#

Hi, here how i can remove the part of "Nbulus#1859" with splice no ?

    "403159739178942464": {
        "Personne": "Nebulus#1859",
        "Pokemon": "Zeraora (Lรฉgendaire)",
        "Prix": "10000",
        "Sรฉparation": 0
    },
    "403159739178947464": {
        "Personne": "Test#1859",
        "Pokemon": "Pikachu (Lรฉgendaire)",
        "Prix": "1200",
        "Sรฉparation": 0
    }
}```

Remove all of : ```"403159739178942464": {
        "Personne": "Nebulus#1859",
        "Pokemon": "Zeraora (Lรฉgendaire)",
        "Prix": "10000",
        "Sรฉparation": 0
    }```
quartz kindle
#

delete object[id]

lofty hamlet
#

@quartz kindle here i make : delete object[idofuser] ?

quartz kindle
#

yes

lofty hamlet
#

๐Ÿค” Ok i go test this

#

Ok thx he does work

covert kernel
#

How do you make a hovering profile picture

woven zealot
#

a hovering profile picture? You mean a gif avatar?

#

ikr I'm so confused

#

In other news, does anybody have any idea offhand why my mongo keeps

#

deleting itself

#

probs just switch to lowdb ffs

covert kernel
#

No I mean on disbot

woven zealot
#

Oh, as in you want your bot to have a gif avatar? Honestly not sure if that's possible. If you can't upload a gif on you developers page, I don't know if you'd be able to with the API

covert kernel
#

So thats a gif he made?

woven zealot
#

Ohhhhhhh

#

you want to know how to make your own gif

#

Usually it's done in video editing software. You can do it in photoshop and some similar softwares, but it's ridiculously tedious. Most people use something like Final Cut/After Effects/Sony Vegas Pro to make it a short video clip

#

and then they export the video clip in a format that can be converted to gif

#

google things like "simple animation in photoshop" or whatever software you have available to get started, there are countless tutorials

hasty ginkgo
#

That's simple CSS

woven zealot
#

Yeah, as a frontend dev I agree with you

#

Unfortunately discord doesn't allow you to upload stylesheets for your bot lmao

ornate shoal
#

Are there any rules on what you can and can't do there? Like if I wanted to replace the profile picture

hasty ginkgo
#

DBL does

hybrid ruin
#

But the page allows you to use html / css and md

#
<html><style>
.columns .bot-img {
     border-radius: 4px !important;
     overflow: visible !important;
     box-shadow: none !important;
     background: none !important;
     box-shadow: none !important;
}
<p>.bot-img img {
-webkit-animation: mover 1.5s infinite  alternate;
animation: mover 1.5s infinite  alternate;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
border-radius: 50%
}
.bot-img&gt;img {
border: 4px solid #ffbb00;
background-color: transparent;
}
.bot-img img {
-webkit-animation: mover 1.5s infinite  alternate;
animation: mover 1.5s infinite  alternate;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}<br>
@keyframes mover {
0% { transform: translateY(0); }
100% { transform: translateY(-20px); }
}
.columns .bot-img {
border-radius: 4px !important;
overflow: visible !important;
box-shadow: none !important;
background: none !important;
box-shadow: none !important;
}
</style></html>```
#

Makes your icon hover ^

woven zealot
#

Oh I see

#

I was operating under the impression we were aiming for discord and not DBL, that's my bad lmao

#

ignore all my advice

hybrid ruin
#

It's okay

west spoke
#

@hybrid ruin spoonfeed ree

hybrid ruin
#

That's fine

#

He's a bot developer, not a web developer. A small copy / paste for a hovering image can't hurt, right? GWowoHehe

west spoke
hybrid ruin
topaz fjord
#

๐Ÿฅ„

woven zealot
#

...just out of curiosity, what DB's are people using for their bots?

earnest phoenix
#

i'm using mongoose

topaz fjord
#

*mongo

#

mongoose is the client to connect to it

west spoke
#

Mostly plaintext and my AWS s3 db

woven zealot
#

I was using mongoose, but I switched to the native mongodb driver cause for some reason I wanted every guild to be it's own mongo db. Maybe that's my problem.

topaz fjord
#

I use mongodb

#

You shouldn't make every guild its own db

#

It's usually 1 db with many collections

lofty hamlet
#

How can I do kinds of pages with this:

    "403159739178942464": {
        "Personne": "Nebulus#1859",
        "Pokemon": "Zeraora (Lรฉgendaire)",
        "Prix": "10000",
        "Sรฉparation": 0
    },
    "462566800505307136": {
        "Personne": "Nebulus#8919",
        "Pokemon": "Pikachu (Normal)",
        "Prix": "1000",
        "Sรฉparation": 0
    },
    "403152739178947464": {
        "Personne": "Test2#1859",
        "Pokemon": "Vukb (Normal)",
        "Prix": "500",
        "Sรฉparation": 0
    }
}```

For example the first page show the the first 5 ads etc
topaz fjord
#

And each collections holds as much data as you put in it

hybrid ruin
#

I want a Zeraora

lofty hamlet
#

Ahah

hybrid ruin
#

Tons of people use mongodb, I was 1 of them

topaz fjord
#

At least that's I how I do it for mine

hybrid ruin
#

But I moved over to MySQL after a few weeks of realizing MongoDB was yes a bit easier but also yes much slower

#

Would've made you all some noodles in the time I got my profile info

woven zealot
#

Yeah right now my structure is a little messed up tbh, databases are very much not my thing heh.

Every guild has its own db
And then there are like 4 collections per db
one collection is a "settings" collection that's only ever just one document constantly updated

topaz fjord
#

what I would suggest doing is 1 DB -> 4 collections

woven zealot
#

changing my nickname to my dev name for clarity

#

Oh, no nicknames nvm, papa forever

topaz fjord
#

And what you could do is put the guildID in each doc so you could easily find it

small sky
#

Guys How Can Guest My Bot To discordbots

topaz fjord
#

wut

woven zealot
#

I don't understand that question

#

And iirc that was what I was doing with mongoose

topaz fjord
#

oh

small sky
woven zealot
#

I just can't figure out why my data keeps disappearing so I'm desperate for other options. I could give the singular db another shot

topaz fjord
#

The long description must have 300 characters

#

Spaces don't count

#

The brief description can only be 140 characters

small sky
#

oh

#

thnx

woven zealot
#

talk about your bot a lot. List all of your commands. If you're too lazy to do that like I am, make a bullet pointed list of all of your features

topaz fjord
#

And owner/server format should only be id

woven zealot
#

For example, your ID is 558043966663163904

#

if you haven't enabled developer mode you should do that

small sky
#

wow i dont know about that what

#

@woven zealot

woven zealot
lofty hamlet
#

How i can take this "403159739178942464": { "Personne": "Nebulus#1859", "Pokemon": "Zeraora (Lรฉgendaire)", "Prix": "10000", "Sรฉparation": 0 }
In this : { "403159739178942464": { "Personne": "Nebulus#1859", "Pokemon": "Zeraora (Lรฉgendaire)", "Prix": "10000", "Sรฉparation": 0 }, "462566800505307136": { "Personne": "Nebulus#8919", "Pokemon": "Pikachu (Normal)", "Prix": "1000", "Sรฉparation": 0 }, "403152739178947464": { "Personne": "Test2#1859", "Pokemon": "Vukb (Normal)", "Prix": "500", "Sรฉparation": 0 } }

#

object[1] does not work

quartz kindle
#

objects are arranged by keys

#

so you need to use them

lofty hamlet
#

Ok so here :

#

object.keys(1) ?

quartz kindle
#

no

#

object[key]

lofty hamlet
#

Oh no

#

Yes :

#

Ho no wait

#

You can explain me ?

quartz kindle
#
let a = {} // this is an object
a["abc"] = "test" // create new key "abc" with value "test"
// object is now {"abc":"test"}
let b = a["abc"] // get the contents of the key "abc" of object "a"
// b is now "test"```
lofty hamlet
#

So here ?

#

How i can get just the first no with id

#

Example for the first without : 403159739178942464

#

@quartz kindle

quartz kindle
#
let obj = {"key1":"value1","key2":"value2"}
let keys = Object.keys(obj) // ["key1","key2"]
obj[keys[0]] // "value1"```
#

but know that objects do not guarantee the key order

#

there is no guarantee that the value you want will always be on the first key

lofty hamlet
#

@quartz kindle ok thx and with this how i can show just the 10 first

quartz kindle
#

you can also ditch they keys and get only the values

#
let obj = {"key1":"value1","key2":"value2"}
let values = Object.values(obj) // ["value1","value2"]```
lofty hamlet
#

No i want all of this : "403159739178942464": { "Personne": "Nebulus#1859", "Pokemon": "Zeraora (Lรฉgendaire)", "Prix": "10000", "Sรฉparation": 0 }

#

How i can get the first 10 ?

quartz kindle
#

convert it to an array and truncate it

#

but first 10 according to what? what order?

lofty hamlet
#

No order

#

Just the 10 first added

#

The 10 first in the file

quartz kindle
#
let obj = {"key1":"value1","key2":"value2"}
let keys = Object.keys(obj) // ["key1","key2"]
keys.length = 1 // ["key1"]```
lofty hamlet
#

?

quartz kindle
#

you get an array of keys

#

then you truncate the length

lofty hamlet
#

I don't want the lenght i want the first 10 in the file

quartz kindle
#

ie: length = 10, will truncate the array into 10 items, and remove everything else

#

then you use those 10 keys to get the data from the object

lofty hamlet
#

๐Ÿค”

#

How i can make this ?

quartz kindle
#

or you can also use Object.entries

#

same thing

lofty hamlet
#

I have no idea

quartz kindle
#
let a = Object.entries(obj) // [["key1","value1"],["key2","value2"]];
a.length = 1; // a = [["key1","value1"]]```
#

just try it, use Object.entries(yourobject), then cut its length to 10

#

and you'll see what happens

lofty hamlet
#

Hum ok i go test and i come back

#

@quartz kindle i have no idea how i can make this

quartz kindle
#

use your brain

#

also use console.logs or other ways to see what you're doing

lofty hamlet
#

I have no brain today ๐Ÿ˜ข

quartz kindle
#

dont try to do it blindly

#

is you can see what each step does with your own eyes, then its easy

#

do one line, console.log it, see what it did, and continue from there

lofty hamlet
#

I have this for start my cmd :

#
                Showitem = 10*switcher[2]
                message.channel.send("โ— -" + JSON.stringify(GTS).replace(/{/gi, "").replace(/}/gi, "").replace(/"/gi, " ").replace(/ , Sรฉparation :0/gi, " P$**\nโ— -").replace(/Pokemon :/gi, "**__Pokรฉmon :__**").replace(/Personne :/gi, "__Personne :__ **").replace(/Prix :/gi, "**__Prix :__ **").replace(/,/gi, "").slice(0, -3) + "\n" + Object.keys(GTS).length + " Annonces | Page : " + switcher[2] + "/" + Showitem/10)```
#

Now i cant make a page system with the Showitem

#

switcher[2] is : the page 1, 2, 3 the page enter by the user

#

Exemple :

quartz kindle
#

thats a lot of replaces lol

lofty hamlet
#

?gts open 1

#

Yes i know

#

Lmao

quartz kindle
#

why are you using a stringified object?

lofty hamlet
#

Here he say this

#

Because for replace and make good message

quartz kindle
#

thats a very stupid thing to do lmao

lofty hamlet
#

Ouch

#

๐Ÿšฟ

pastel sky
#

if object are in json, just use object.item

quartz kindle
#

i mean, you have a object, use it as an object. objects are made for that

pastel sky
#

^

lofty hamlet
#

Hum okay

#

Here he say all of gts.json but i want make a page system with each page show the 10 first object

quartz kindle
#

you can do something like ```js
let items = []; // create empty array;
for(let item in GTS) {
let text = - ${item} : Personne: ${GTS[item].Personne} Pokemon: ${GTS[item].Pokemon}
items.push(text);
}

lofty hamlet
#

๐Ÿค”

quartz kindle
#

its much better than using a gazilion replaces on a string

lofty hamlet
#

O so i remove my all of replace

#

And i test your system

#

And with this where is the page system ?

quartz kindle
#

this will give you an array of all your items, formatted in the way you want it to show

#

then since you have an array, you can easily make a page system for it

#

@earnest phoenix i dont think there is a way to access console events, you'd need to get them before you log them, like a custom logging function

#

unless there is a way to intercept stdout or something in node

copper crystal
#

How can I create two if conditions for one set of code in discord.js?

woven zealot
#

if (thing && otherThing) or if (thing || otherThing) ?

quartz kindle
#
if(condition && condition) // if both have to be true
if(condition || condition) // if one of them has to be true
if(condition) {
    if(condition) {
        // if they have different types of conditions or depending on the situation
    }
}```
copper crystal
#

Thank you

lofty hamlet
#

Ok now i have my command witheout the page system if (!switcher[2]) return message.channel.send("Mettez une page ร  afficher") if (isNaN(Number(switcher[2]))) return message.channel.send("Une page pas des lettres") var Showitem = 10 * switcher[2] let items = [] for (let item in GTS) { let text = `**[${item}]** - Personne : **${GTS[item].Personne}** | Pokemon : **${GTS[item].Pokemon}**` items.push(text); } console.log(items) var embed = new Discord.RichEmbed() .addField(items) .setFooter(Object.keys(GTS).length + " Annonces | Page : " + switcher[2] + "/" + Showitem / 10 + "") message.channel.send(embed)

#

Now i do make the page system ๐Ÿค”

earnest phoenix
#

So heres my plight, im trying to use express sub domain to route the api router file. App.use('/' seems to be a catchall thoigh so my app.use(subdomain gets ignored

#

Thots?

#

Guys

#

Great news

#

I solved error 429

#

Didn't do rate limiting didn't , didn't do nothing except disable my servers public ip

#

Hope this helps others

amber fractal
#

@earnest phoenix my thought is dont use express

stray garnet
#

how can i make my bot mention someone?

im using d.js

earnest phoenix
#

@amber fractal get with the times

amber fractal
#

@stray garnet you can either use .toString() on a member/user object, or use the member mention pattern <@id> and if they're nicked <@!id>

#

@amber fractal

#

that was @amber fractal

#

@earnest phoenix idk if you cant do simple subdomains is it really the time for express?

earnest phoenix
#

You can do simple sub domaining in express my code structure is just a bit wacky rn

#

Express subdomains is like 2 lines then u got a sub domain router

amber fractal
#

my subdomains arent even code mmLol

#

@earnest phoenix but from the looks of it you'd need multiple routers

earnest phoenix
#

Ive seen the example tarp ya dum dum

amber fractal
#

then fix ya shit

earnest phoenix
#

Index router is taking priority regardless

stray garnet
#

@amber fractal its undefined then

amber fractal
#

wym

earnest phoenix
#

Its fine ill just manually declare the index route so it doesnt catchall

#

Or add some middleware i write

#

That checks for subs

lofty hamlet
#

@quartz kindle how i can make a sort system of pokemon by the enter of user

#

I have make this but he does not work

#

My system other system work

split hazel
#

So i made a message counter that adds 1 to the user in the database which I found inefficient so I made it do it through cache, but my problem is how do i keep the count consistent with the database? All data will be gone when the bot is restarted and an interval update isn't going to be best i feel

quartz kindle
#

most databases are very efficient at incrementing, which db are you using?

#

if you feel that's not enough, the best you can do would be an interval update

woven zealot
#

what I do personally is update the state first, and then at the same time execute an async call to update the database

#

that way the bot has access to the data even if it's still being written

vague heron
#

Hi, I'd like help to make a rather complex system: Make sure that when someone sends a private message to my bot, I receive it on a show from a specific server. And then, since this show, I can answer him as a BOT.

daring sage
#

can some one help me with this issue?

i'm updating my bot with some music commands. the dispatcher does not emit the "finish" event, the bot just go mute and don't play the next queued music.

the 'play' function is this one:

    bot.channels.get(data.queue[0].announceChannel).send(`Tocando agora: ${data.queue[0].songTitle} | Requisitado por: ${data.queue[0].requester}`);

    data.dispatcher = await data.connection.playStream(ytdl(data.queue[0].url, { filter: 'audioonly' }));
    data.dispatcher.guildID = data.guildID;

    data.dispatcher.once('finish', function() {
        finish(bot, ops, this);
    });
}```
warm marsh
#
data.dispatcher.on('end', async function() {

});
sick cloud
#

pretty sure it's only finish on master, otherwise end on stable

warm marsh
#

Yeah, I used it ages ago and was finish but then stopped working and end started working.

daring sage
#

thanks a lot @warm marsh

warm marsh
#

No worries.

honest karma
#

'

naive gull
#

how do i track who voted on my bot?

pale marsh
wide ruin
#

Let's say I wanted to make an ide

#

Is it better to use tkinter like idle does or electron so I can do html?

mossy vine
#

i have used tkinter and hated it

wide ruin
#

Idle uses tkinter and it looks good surprisingly

#

So electron?

pale marsh
#

Use qt, qt

wide ruin
#

Ok thanks

pale marsh
#

Really though, heard a lot of good things about Qt

#

Haven't really used it myself yet but looks pretty good

earnest phoenix
#

I'm getting Error 504 and Error 522

split hazel
#

@quartz kindle sqlite3

slender thistle
#

Disable it for this server if you don't want it to get muted and you're good ablobsquish

warm marsh
#

Why don't you make it hey then your bot name

#

e.g. my bot's called Paradox, prefix: hey Paradox

#

or use mention prefix

#

I know, I gave you an answer.

#

Yeah

slender thistle
#

Sure it can if it's an actual prefix

earnest phoenix
#

How would I make a bot delete a channel you send the message it

#

Discord.js

pale marsh
#

Parse the channel from the parameter
Call the delete method or something

earnest phoenix
#

hey

#

would anyone possibly know of the code for .role (role) (user)

#

to assign a role to a user

topaz fjord
#

what lib

opaque eagle
#

We don't spoonfeed code

#

If you know how to code, then you'll know how to make that command.

warm marsh
#

Check the docs for the library.

amber fractal
#

spoonfeeding directly solves an issue

opaque eagle
#

For that scenario the proper code to give would be for how to add a role to a user, without adhering to the command format .role (role) (user)

#

In D.js for example you could say "hey use GuildMember.addRole()", and that would be the non-spoonfeed answer

#

yeah

#

Well the docs provide example code

mellow crown
#

s

broken shale
#

anyone know how to blur an image with canvas

spare goblet
#

@broken shale ctx.filter?

broken shale
#

is it ctx.filter = "blur(5px)" @spare goblet

#

like that?

drowsy sentinel
#

Yes, blur uses gaussian blur and applies the given pixel length to blur into each other.

broken shale
#

It's not blurring at all GWpingKanyeLUL

spare goblet
#

Iirc yes

drowsy sentinel
#

Because you're not doing it right.

broken shale
#

Then how's it done? @drowsy sentinel Sorry for ping :c

drowsy sentinel
#

How can I do that if I don't have any code to work with.

#

I gotta see what you're trying to do.

broken shale
#
    const canvas = Canvas.createCanvas(500, 500);
    const ctx = canvas.getContext('2d');
    const background = await Canvas.loadImage('./assets/Sprites/Images/Tombstone.png');
    ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
    const avatar = await Canvas.loadImage(msg.author.displayAvatarURL);
         ctx.drawImage(avatar, 120, 200, 200, 200);```
#

blur avatar (msg.author.displayAvatarURL)

drowsy sentinel
#

Did you try blurring before drawing avatar. ๐Ÿ˜‰

broken shale
#

yes?

drowsy sentinel
#

So you loaded the image for avatar

#

then applied ctx.filter = 'blur(5px)';

broken shale
#

Yes

#
const background = await Canvas.loadImage('./assets/Sprites/Images/Tombstone.png');
    ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
    const avatar = await Canvas.loadImage(msg.author.displayAvatarURL);
    ctx.filter = "blur(500000000px)"
    ctx.drawImage(avatar, 120, 200, 200, 200);```
drowsy sentinel
#

...

broken shale
#

I feel like it's wrong

#

Probably is

drowsy sentinel
#

The Gaussian function will take how many pixels on the screen to blend into each other.

#

So tell me how 500000000px would work?

broken shale
#

idk how many pixels

drowsy sentinel
#

Move it down to 5px and try again.

broken shale
#

so just blur()

#

tried 5px

drowsy sentinel
#

Then up it to 10px, 15px, 20px.

broken shale
#

Nope >:(

sick cloud
#

anybody got suggestions on why this would happen?

3|yt  |     at Timeout.setTimeout [as _onTimeout] (/home/tony/youtube/node_modules/discord.js/src/sharding/Shard.js:137:31)
3|yt  |     at ontimeout (timers.js:436:11)
3|yt  |     at tryOnTimeout (timers.js:300:5)
3|yt  |     at listOnTimeout (timers.js:263:5)
3|yt  |     at Timer.processTimers (timers.js:223:10) [Symbol(code)]: 'SHARDING_READY_TIMEOUT' }

(discord.js master/v12)

broken shale
#

pretty sure no change

ember atlas
#

any ideas on why my modmail bot wont respond to any commands, yet it does when i dm it?

broken shale
#

check if it only responds to dms

pale marsh
#

Paste your code here at least

weary zodiac
#

what modmail language are u usinmg

#

theres like 10 diff ones

#

python js

ember atlas
#

its dragorys

#

so its eris/js

weary zodiac
#

thats js if i recall

ember atlas
#

mhm

sick cloud
#

@ember atlas go to the bot's support server

ember atlas
#

?

broken shale
#

you know theres a py one you can use

ember atlas
#

its a self hosted bot?

broken shale
#

it has all instructions for selfhost

ember atlas
#

and yes, i prefer dragorys.

sick cloud
#

oh ok

ember atlas
#

@broken shale listen, its online, just only responds to dms

#

and i was wondering if anyone has ever had an issue with that b4

weary zodiac
#

just use the one thats hosted on someones vps thats in dbl

#

or use the python one

#

its a lot easier

broken shale
#

^

ember atlas
#

so my excuse is run away from it?

broken shale
ember atlas
#

I already setup the self-hosting, just the first time its ever not responded to commands

weary zodiac
#

theres the python one

ember atlas
#

And I have tried that one, but ty anyways

broken shale
#

I just sent it and it works fine for me

#

Not that I fork people's code

drowsy sentinel
#

const canvas = Canvas.createCanvas(w, h);
const ctx = canvas.getContext('2d');
load background
draw background
load avatar
apply filter
draw avatar

ember atlas
#

so what i should do is run away to a shit modmail bot?

weary zodiac
#

what

broken shale
#

Shouldn't be calling it shit if it works better than yours

ember atlas
#

you all are saying use kybers

weary zodiac
#

^^

#

use kybers dude

ember atlas
#

You realize i didnt code it right?

weary zodiac
#

ok

broken shale
weary zodiac
#

lol

ember atlas
#

to see if anyone has ever had this issue b4

weary zodiac
#

well nobody has coded it here

broken shale
#

Go to dragory's support server

ember atlas
#

he doesnt even have one.

opaque eagle
#

Dragory's one uses sqlite

ember atlas
#

ill go somewhere else, peace

opaque eagle
#

whats ur question anywayss

broken shale
#

I've never used sqlite

drowsy sentinel
#

@broken shale What's your background image?

broken shale
#

My avatarURL

#

trying it out now

#

@drowsy sentinel Background has to be loaded first

#

since it's the base

broken shale
#

Just a quick question

#

or apply blur to bg is better

drowsy sentinel
#

Looks fine to me.

broken shale
#

fine != good

drowsy sentinel
#

It's good mate.

broken shale
#

I was gonna use api but key takes soooo long 2 get

grand rapids
#

Hello! Trying to get this bot to post random gifs off of discord's tenor, Do I have to go and download Tenor's API? or is there something in discord that I can already access to do this? I would go look at the Go library on the website but the Github link is down.

odd finch
slow crypt
#

Can anyone help me with discord.js

#

Like i say hey

Bot replys with hey @slow crypt

#

What is the code for that?

copper cradle
#

const spoonfeeding = we.dont.spoonFeed('here');

nocturne hazel
#

Fear#7005 You can do so with a message event in your main bot file

#

Simply detect it the message content is โ€œheyโ€

#

You can use the message.channel.send function to make the bot reply

rain bolt
#

@slow crypt Do you want it to tag?

slow crypt
#

Yea

#

Like i type
Hey
Bot will reply hey @slow crypt

#

I want it to tag abd reply

rain bolt
#

Ok

#

message.reply(", hey");

slow crypt
#

It will tag?

rain bolt
#

Yes

slow crypt
#

Ok

#

Thank u

rain bolt
#

It look will look like this
@slow crypt, hey

slow crypt
#

Can't it look like
Hey @slow crypt

#

?

rain bolt
#

Yes

slow crypt
#

How

nocturne hazel
#

@slow crypt

client.on('message', message => {
if(message.content === "hey") 
{
return message.channel.send(`Hey, ${message.author}`)
}
});
rain bolt
#

message.author doesn't tag @nocturne hazel

nocturne hazel
#

Yes it does

slow crypt
#

Ok

#

I will try both

nocturne hazel
#

Proof it works

copper cradle
#

ew

nocturne hazel
#

what

earnest phoenix
#

An sourceCode For discord bot queue manager

#

I want discord bot queue manager

amber fractal
#

We dont spoonfeed

languid dragon
low wasp
#

looks fancy

proper inlet
#

How can i check if the rights to read messages in the channel discord.js

spare goblet
#

@proper inlet for the bot or for a user?

proper inlet
#

For user

#

read history of messages*

mossy vine
#

<Member>.hasPermission

proper inlet
#

Thx

spare goblet
#

<channel>.memberPermissions(<member>).has("READ_MESSAGE_HISTORY")

^ for a specific channel

proper inlet
#

Thank you very much

#

client.user fit as an argument <member>?

mossy vine
#

no

#

its not a member object

earnest phoenix
#

I want to add my bot to this server, but I don't know how to add it, can you help?

mossy vine
#

if its approved it will be added here

warm marsh
#

<Message>.guild.me @proper inlet

earnest phoenix
#

thanks

proper inlet
#

Thank you very much

earnest phoenix
#

I've been waiting a day, do you have any idea how long I'm gonna wait?

warm marsh
#

A while. Have patience.