#development

1 messages ยท Page 1588 of 1

quaint wasp
#

ya?...

broken matrix
#

i wasnt sure if i could

quaint wasp
#

๐Ÿ™‚

#

ur welcome.

broken matrix
#

Its this selector right

.bot-card 
unkempt ocean
#

like adding a background img?

broken matrix
#

yes

unkempt ocean
#

as far as i know you cannot change the card with css code or smth, just edit your bot and there's a section that asks for imgur link for your bot's card

drowsy grail
#

are external url links not supposed to work in iframes put in the bot description?

broken matrix
unkempt ocean
broken matrix
#

oh i see thank you for the help

unkempt ocean
#

anytime ๐Ÿ‘

quaint wasp
#

-botinfo 743292394237329440

gilded plankBOT
#
Bot info
ID

743292394237329440

Username

SMUGY FUGY

Discriminator

1928

Short Description

A bot to make your life with moderation on Discord.com easier than it ever was. It has many commands and is really good at helping mods.

Library

undefined

Prefix

++

Total Upvotes

1

Monthly Upvotes

0

Server Count

No server count

Owner(s)

@quaint wasp

Links
drowsy grail
quaint wasp
#

๐Ÿ™‚

unkempt ocean
quaint wasp
#

alr.

lament rock
#

reaction menus are quirky

broken matrix
#

Once again im back where do i change the icon for the bot

quaint wasp
#

And I get this error:

#

TypeError: command.run is not a function

mellow kelp
#

well looks like your command doesn't have a run function

#

i guess it's because you're using client.aliases.get

quaint wasp
#

I just cahged get to cache

mellow kelp
#

which probably returns a string, am i right?

quaint wasp
#

yes..

mellow kelp
#

a string doesn't have a run method

quaint wasp
#

wait

#

Whats a string were talkin' about?

mellow kelp
#

client.aliases.get(something)

quaint wasp
#

oh

#

yes.

mellow kelp
#

so you get a string

#

which doesn't have a run method

#

hence "command.run is not a function"

quaint wasp
#

its a command tho..

mellow kelp
#

it's a string

#

not a command

quaint wasp
#

uh..

#

ok?

mellow kelp
#

a run method is not going to magically appear on the string just because it's a command name

quaint wasp
#

Then how do I see if a member that is blacklisted ran a command?

mellow kelp
#

no idea

#

that's up to you

quaint wasp
#

bruh

lost mirage
#

and if they did run a command, you can just return and not run anything after that

quaint wasp
glossy spoke
#

if (message.author.id == "id");

lost mirage
#

wdym detect if they ran it

#

lmfao

quaint wasp
#

Like..

opal plank
#

check type too

#

never hurts to

quaint wasp
#

If the typed ++help

lost mirage
#

first off do u have a command handler

#

or are u doing everything in index.js

quaint wasp
#

Command handler.

#

each cmd has its own file.

glossy spoke
lost mirage
#

exactly what nickname did

quaint wasp
#

but the id is in the database...

#

alr.

lost mirage
#

then u need to get it from the database

#

prob using a path to the file or a require if ur using mongo or smth

quaint wasp
#

I am using mongo..

glossy spoke
#

Then check if the author's id is in the database

lost mirage
#

^

#

get the database
check if message.author.id is in the database
and if it is, then you just return so it run anything else within the command

vagrant grove
#

Return

quaint wasp
#

bruh

#

I got this:

#
  const blacklist = require('./models/blacklist')


    if (!message.content.startsWith(prefix)) return;
    blacklist.findOne({ id : message.author.id }, async(err, data) => {
        if(err) throw err;
        if(!data) {
            if (!message.guild) return;
            if (!message.member) message.member = await message.guild.fetchMember(message);
            const args = message.content.slice(prefix.length).trim().split(/ +/g);
            const cmd = args.shift().toLowerCase();
            if (cmd.length == 0) return;
            let command = client.commands.cache(cmd)
            if (!command) command = client.commands.cache(client.aliases.get(cmd));
            if (command) command.run(client, message, args)
           } else {
            message.channel.send('You are blacklisted!')
        }
    })```
#

and I cant think of anything else.

#

I'll go to sleep...

#

see ya in the morning... I hope.

lyric mountain
#

Dude

lost mirage
#

...

crimson vapor
opal plank
#

@crimson vapor indeed

crimson vapor
#

you been working for a while?

opal plank
#

when it comes to data, im probably some of the biggest trackers here

#

i track almost everything the bot produces

#

and im going to be adding more

#

since i changed lib, i can query some more stuff now

#

like each shards individual time avarage to startup

#

and a couple other things

#

@crimson vapor indeed, i made a lot of new files

sturdy dock
#

is there any reason to use external sharding over internal sharding with 1 core?

opal plank
#

by splitting the shards, you split all the processing power, this prevent from overusing a single processor

#

lets say, you have all 2500 in each shard

#

and you doing intensive stuff like image generation like i am

#

in the single shard, you'd be using all shards into a single core, that would be your bottleneck, since a single core can only do SO much

#

in the latter, when you shard into multiple processes, you will be splitting each 2500 chunk of guilds(shard) into differnt processes

#

so when a guild requests images, simultaneously, you'd be processing stuff on different cores/threads

#

so you wouldnt bottleneck a single core

#

thats the basic gist of it, theres a couple more advanced features you can abuse of by having a multi core bot, but thats as far as you'll need to understand them

sturdy dock
#

Ahh my bad, I mean that I only have access to one core for now

#

Sorry

#

But that's interesting I'll keep it in mind if I decide to scale up my servers

opal plank
#

remember, you dont NEED to shard until you get to 2500 servers

sturdy dock
#

Right

#

But I'm nearing it

#

So i'm just wondering if there's any reason not to internally shard

opal plank
#

though sharding is good for either intensive stuff or a lot of server count

sturdy dock
#

I'm not doing any heavy work, just querying a mysql db

opal plank
#

theres none, unless you wanna split the workload to make sure you arent bottenecking 1 shard

sturdy dock
#

I gotcha

#

Thanks sm for the help

opal plank
#

np โค๏ธ

sturdy dock
#

<3

opal plank
#

im also getting awfully cvlose to sharding

#

well, i did shard

#

but im getting close to being required to shard

#

erm, how many sevrers

#

road to 1900

#

in 2 months

zenith terrace
#

dam in 2 months

sturdy dock
#

mine's rather slow and sitting at ~1300... but when i get there i'll get there

opal plank
jolly mortar
#

how do i get a webhook secret

sturdy dock
# opal plank you got some room to breath then

yeah... believe it or not i used persistent arrays to store all my user data at one point... once i realized i had to shard i spent a good 20 hrs refactoring my entire codebase to use mysql LMAO

jolly mortar
#

rip

earnest phoenix
#
const client = new discord.Client();
const alexa = require("alexa-bot-api");
var chatbot = new alexa("aw2plm"); //free access key for Mewtwo Machine channel (provided by CTK WARRIOR)
client.on("ready", () => {
  console.log("Ready for chatting!| Bot by 0_0");
});
client.on("message", async message => {
  if (message.author.bot) return;
  let content = message.content;
  chatbot.getReply(content).then(r => message.channel.send(r));
});
bot.login(token);
earnest phoenix
#

chat bot codes

#

๐Ÿ˜˜

#

enjoy it

opal plank
#

pls stop spamming that

earnest phoenix
#

oh

#

๐Ÿ˜›

#

sorry

opal plank
#

if you ACTUALLY got a problem with developemt, post it

earnest phoenix
#

again

opal plank
#

otherwise keep it to yourself

cold swallow
#

Can I transfer fully bot owner from another account to this on top.gg?

zenith terrace
#

by deleting the bot from queue and readding it to queue

solemn leaf
#

Check if the server has a set channel for bots messages > if true > get the channel id > message.guild.channels.cache.get(channelID) > send the message in there

#

to set it us soemthing liek quick db

#

this is assuming you;re using javascript

sturdy dock
#

right

#

i only want a super simple thing for my server lol, so id prob just match strings

#

but thanks for the hepl

solemn leaf
#

what

crude light
#

-botinfo 767624993507901470

gilded plankBOT
#
Bot info
ID

767624993507901470

Username

Atla

Discriminator

8495

Short Description

An all-purpose bot with powerful moderation tools, giveaway hosting and an EXCLUSIVE Demon Slayer game ! (Many more features coming soon !)

Library

undefined

Prefix

t

Total Upvotes

85

Monthly Upvotes

40

Server Count

59 Servers

Owner(s)

@crude light

zenith terrace
crude light
#

oops

earnest phoenix
opal plank
#

@earnest phoenix sdk

#

kinda sad people are copying it but okay

marble juniper
#

and jade the next

opal plank
#

meh its fine, as long as its not blatant copy its fine, i didnt develop the SDK, i just brought the idea to ad the bot in status with it

marble juniper
#

lol

opal plank
#

also mine is dynamically upating every couple seconds

#

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

zenith terrace
#

inb4 a server thinks someone is self botting and gets banned

marble juniper
#

kekw

opal plank
#

i already cleared with some discord devs

#

i had some people in my dms claiming it was mods

marble juniper
#

its not selfbotting you don't even use a token you use a client id

zenith terrace
#

lol

marble juniper
#

lol

opal plank
#

im not even kidding tho

#

they went to dm discord staff to ask about it

zenith terrace
#

well that user isnt 100% a staff member lol

opal plank
#

thought most people using RPC and not SDK, and RPC is depreacted

zenith terrace
#

staff on the server yes

opal plank
#

nono

#

Enterprise IS staff

#

he's one of the most active in ddevs

#

he and advaith are prob the most active

#

bunny active af too

zenith terrace
#

you say discord staff as if they are an actual discord staff member

opal plank
#

they are tho

#

kinda

zenith terrace
#

close enough

opal plank
#

i dont think they are actual employeed, but idk how the hierarchy works interally

stable sonnet
#

Ya they are

opal plank
#

advaith isnt employed, but he's not mod either

stable sonnet
#

Oh

zenith terrace
#

Enterprise is only a mod, actual discord employees have the admin role

opal plank
#

yeah, still a big figure in regards to it though

#

the point stands, i've had some people call me out in dms telling me i was using client mods cuz of my presence

zenith terrace
#

yea

marble juniper
#

kekw

#

I mean

cinder patio
#

Client mods can only seen by the client, lmao

marble juniper
#

if it is client mods

#

how can they see it

cinder patio
#

Exactly

#

stoopid people all around

opal plank
marble juniper
#

I mean client mods are all client side

#

lol

opal plank
#

i had to go there to clarify

#

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

#

cuz apprently me pointing the docs out wasnt enough

#

its that small of a feature

zenith terrace
#

people are too thick in the brain to realise

opal plank
#

theres barely anyone using it

#

thats why i still get a bit protective over it

#

i've ever only seen 2 people use it

#

advaith being one of them

#

so when i see people using it to advertise bots like i did, i kinda get a bit bummed out cuz it takes away the uniqueness

marble juniper
#

sadly nothing will stay unique

#

just like ideas for bots

opal plank
#

but thats purely my ego speaking

#

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

marble juniper
#

lol

cinder patio
#

If I had a bot to advertise I would probably do it too

marble juniper
#

same

#

I would advertise my bot with only a ping command

opal plank
#

@slender thistle they copying my status, bean them, my ego cant take it

slender thistle
#

Poggers who

zenith terrace
#

time to copy Erwin status

#

but with my bot

magic cove
#

Lol

zenith terrace
#

I'll prob get stuck halfway through

magic cove
#

ฮจ

opal plank
#

309816286572183552 @slender thistle

grim shoal
#

Why doesn't the HTML <style> tag work on my description?

marble juniper
#

lol

zenith terrace
#

@opal plank is the team part necessary in the sdk part or optional

marble juniper
#

erwin's ego can't take it

#

ego moment

opal plank
#

and you dont need to verify either

#

you can run it locally and still get the presence

zenith terrace
#

ok

#

good cause I cant add my bot to a team lol

opal plank
#

just dont copy my status and we clear

#

my ego wont screech with people advertising their servers

zenith terrace
#

no

cinder patio
#

The server and user count?

opal plank
#

just generally advertising bots in status

#

dont think there has been an instance of that happening before me

#

with SDK at least

cinder patio
#

Odds are there probably was but you just didn't see it

opal plank
#

indeed, but im in quite a fwe servers, most of them are huge

marble juniper
opal plank
#

specially on my alts

marble juniper
#

lol

opal plank
#

there were very few people who used SDK for presence like this

#

and to find someoene who was advertising bots ontop of it was a rare find

marble juniper
#

im gonna spread the word

#

watch me do a youtube tutorial

cinder patio
#

yeees

marble juniper
#

kekw

#

erwins ego is gonna kill me

opal plank
#

but like i said, it was mainly my ego talking there, i personally dont like people copying me, but im also old enough to understand nobody is unique as long as its on the internet

#

im not that big of a crybaby

#

@slender thistle bean them

marble juniper
#

kekw

delicate zephyr
#

tbf Erwin, MultiRPC is blowing up because of it now KEKW

marble juniper
#

and ego kicks back in

delicate zephyr
#

even tho its deprecated

opal plank
#

LMAO

marble juniper
#

yes

opal plank
#

legit tho luke?

delicate zephyr
#

and i think Builder is planning to move anyway

opal plank
#

HAHHAHAHAH

marble juniper
#

I saw a video about rpc stuff

#

even tho its depreceated

opal plank
#

im fairly certain discord will remove it in the future

#

i DID use stuff for that in the past

delicate zephyr
#

yea but even then

opal plank
#

i used both RPC and SDK

delicate zephyr
#

he'll prolly move to the SDK soon enough

opal plank
#

SDK is current, but i used RPC before it was deprecated

#

i used to make rich presence for some games without it

blissful coral
#

uh oh

opal plank
#

also, thats blatently ads, if someone doesnt like it, just let me know

#

but its on topic

marble juniper
#

just wait for someone to do a youtube tutorial on how to advertise ur bot in ur rich presence

#

or status

#

whatever you wanna call it

delicate zephyr
#

@opal plank i dont think people will stop calling it RPC

zenith terrace
#

k I give up already im too lazy lol

delicate zephyr
#

still technically rich presence

marble juniper
#

wait im gonna hit up a youtuber I know who likes to do clickbait to make the video for me

#

hehe

opal plank
#

i used to mess with rich presence a lot before i messed with bot development

#

so its an area im familiar with

delicate zephyr
#

I mean technically its not, client side wise since the SDK uses the same front end elements, it just uses a different backend now

marble juniper
#

using the sdk seems like pain

delicate zephyr
#

its called Game SDK for a reason

opal plank
#

its not nearly as bad as you think

delicate zephyr
#

lol

marble juniper
#

kekw

opal plank
#

its supposed to be used for games

#

not for some skid to advertise his genshin bot

#

though i made good use fo it

marble juniper
#

lol

#

Please tell me I can use it with js

opal plank
#

sdk, no

#

well

#

technically yes

#

you can use napi to use c langs

#

@quartz kindle might be able to help with it

#

he constantly uses napi for his module

slender thistle
#

@opal plank shush and come cuddle with me instead

cinder patio
marble juniper
#

thank god

#

lol

marble juniper
#

I see how it is

solemn leaf
stray moat
#

Hi i have a bot that has recently seen a boom and crossed the 100 servers.The commands are behaving a lot slower.Will verification and whitelisting solve the issue?
I dont see any issue at server end where cpu usage is around 30% on an average.

rocky pulsar
#

hi

#

i need help

#

with my bot

rustic nova
#

just ask

restive furnace
#

my bot which is in 20 guilds and has 5 shards (don't ask why) uses only like 1-2 percent of my ONE vcpu

pearl trail
slender thistle
#

Your code is definitely doing something weird if it's slowed down with the guild count

restive furnace
slender thistle
#

Are you doing any heavy processing?

#

RAM ain't the problem here, I'm prone to believe

pearl trail
solemn jolt
#

Hello

stray moat
#

Its a music bot

solemn jolt
#

I need a good host and the host support github

restive furnace
#

oh then it's normak

#

you just need to buy better server and optimize your code if you're using your own implementation

stray moat
restive furnace
#

music bots need cpu power

pearl trail
#

yes

earnest phoenix
#

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

stray moat
restive furnace
#

what about internet speed

#

on debian based distro: sh $ sudo apt install speedtest-cli $ speedtest-cli

stray moat
#

2048 MB RAM

restive furnace
#

well run those commands then

#

to see ur internet speed

stray moat
#

ya cool ..thanks

earnest phoenix
#

cache.get?

pale vessel
#

message.client.queue.cache is undefined

#

no because you can't get a property of undefined

cinder patio
#

how do you define message.client.queue

pale vessel
#

maybe you accidentally added cache?

#

why did you add it

#

check how you defined it

#

like feud said

fluid basin
#

queue no cache?

pale vessel
#

check your code, again

#

don't just assume or make up property names

#

no cache

cinder patio
#

that's not how you define message.client.queue, though

pale vessel
#

wha-

#

It's your code

fluid basin
#

ask your code

pale vessel
#

you coded it

fluid basin
#

you wrote this code right?

#

not me, not flazepe

pale vessel
#

You would know what message.client.queue is if you coded everything by yourself

fluid basin
#

so either you need to show us the part you created the .queue

summer acorn
#

@summer torrent so, I found out why the commands didn't work. Apparently, it was because I was running 2 functions at the same time to check whether to run a staff command or a normal command, which apparently the dedi didn't like (it worked locally). So I made it so that it'll only run the normal command handler, but if the normal command doesn't exist, it'll try running the staff command handler instead, which made the normal commands work on the dedi but not the staff commands, which still worked locally. I get no errors, I even tried to force an error by doing throw new Error("test") where it's supposed to go, but that literally did nothing, I didn't receive any errors from that either, so apparently it doesn't even try to enter the staff command handler, it still only returns whilst working locally with the exact same code.

    if (!command) {
        try {
            var { staffCommandHandler } = require('./staffCommandhandler.js');
            staffCommandHandler(client, message).catch(err => {throw new Error(err)});
        } catch (err) {
            throw new Error(err);
        } finally {
            return;
        }
    }
fluid basin
#

or we can't really help you

pale vessel
#

love that var

fluid basin
#

vars are for boomers

pale vessel
#

๐Ÿคฆ

fluid basin
#

well simple solution: show us your main bot code

drowsy epoch
#

pretty much everything is my own

#

I'm currently working on music commands

fluid basin
summer acorn
#

I am sure yes

fluid basin
#

hrm

#

then the file isnt loaded tldr

summer acorn
#

the dedi automatically pulls from the repo and restarts the bot whenever I push

drowsy epoch
summer acorn
#

and if it wasn't loaded

pale vessel
summer acorn
#

node would've given an error

#

about the file not being found

fluid basin
pale vessel
#

that's not where you defined it

summer acorn
#

I've been using var for ages, never run into any issues with it

pale vessel
#

Check where you defined your client

fluid basin
#

or bot

#

if your using bot

cinder patio
summer acorn
#

I don't always use it

#

I use it for important variables

fluid basin
summer acorn
#

I mean, the var isn't the issue

fluid basin
#

yeah it may not be the issue

summer acorn
#

I literally tried to throw an error to see if it even went into that part of the code when on the dedi

#

and it doesn't

#

it doesn't enter the try

fluid basin
#

which means theres some problem even higher

summer acorn
#

it only enters the finally

#

but it works locally

#

that's the thing

fluid basin
#

also dont mix sync and async code

summer acorn
#

it works perfectly when hosted locally, but then on the dedi, it doesn't

#

all my code is async

fluid basin
#

uh, in the code you showed earlier there is try catch which is sync and .catch which is async

summer acorn
#

I see, well, that's one thing, but the thing is that it doesn't even enter the try

#

but I suppose I'll try removing the try catch

#

seen as the command handler is already async

fluid basin
#

yeah so where the client.queue = part

summer acorn
#

and that didn't make any difference

fluid basin
#

which means there some other issue higher up the hierarchy

#

no, I'm asking what is client.queue

#

where is it created

#

the list

earnest phoenix
#

Is there a way to get if a user accepted the Rule screening?

fluid basin
earnest phoenix
#

discord.js

fluid basin
#

pretty sure its in the docs

#

you're using v12 right?

earnest phoenix
#

ya

#

Help

valid forum
#

Hi I am new๐Ÿ˜„

earnest phoenix
unkempt ocean
fluid basin
#

@earnest phoenix ok so I just checked, the membership screening is available only in master

summer acorn
#

apparently I messed up the capitalization of the file, but it ignored that locally

#

so that makes me even more confused

#

on why it ignored the capitalization locally

fluid basin
near dew
#

Hi, does anyone please know in what form I should put the channel ID in the message?

fluid basin
near dew
analog tinsel
#
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require('./config.js');

client.login(config.token);
console.log('im ready!')

app.get("/api/bot-data", (req, res)=>{
  res.send({ members: client.guilds.reduce((a,b) => a + b.memberCount,0).toLocaleString(), guilds: client.guilds.length });
});
#

im trying to make member+server count web api but i got error "app is not defined" how can i solve?

unkempt ocean
#

Where's your app and express defines?

#
const express = require('express')
const app = express()
analog tinsel
#

oh thanks

unkempt ocean
#

no worries

velvet jolt
#

any pythoner knows how i could costum the header of a aiohttp request?

fluid basin
#

whats costum

#

pretty sure you can

fiery locust
#

does anyone know how to make it so if you vote for the bot it dms you thanking you

cinder patio
#

(assuming you're using node.js, for python see top-gg/python-sdk)

cedar cosmos
#

s?i

#

hฤฑmm

cinder patio
#

Note that the sdk only creates a middleware that you can use - it doesn't handle everything for you. You'll have to create an express server, and set the endpoint you want to act as the webhook at top.gg/bot/id/webhooks

fiery locust
#

Oki

earnest phoenix
#

How do u change the entire bot color page?

unkempt ocean
#

try to use .entity-wrapper selector for that

frank hinge
#

I want to create a discord bot that will write specific text when email comes a letter. Tell me how) And is it really possible to do it?
I looked in the documentation, found nothing.
I am writing in Python. But JS is fine too.

cinder patio
#

so you want to send a message to a channel when you receive an email?

marble juniper
#

yes

#

use ifttt

#

and a discord webhook

#

ifttt is ez to use

#

no coding required either

#

even available as app

#

or as a website

#

lol

cinder patio
marble juniper
#

ifttt would be the easier route

fluid basin
#

you can't

#

yes

#

but it is possible

#

yes, through the audit log

#

you will need audit log perms for that

#

once the bot joins the server and does the guildjoin event, pull the audit logs and check for the entry

midnight spoke
#

What I can do if my friend is doing some fake servers to make my bot get verified ? He doesn't understand that servers needs to be real

modest maple
#

Joining / creating invites of a server your bot joined is a massive breach of privacy

fluid basin
#

Discord will likely flag your bot for "suspicious growth"

modest maple
#

Just let him learn the hard way

#

He aint getting a badge from it 002_shrug

midnight spoke
#

How I can stop him ?

restive furnace
#

by just leaving the guilds that he invited ur bot in

#

if (guild.owner == ur friend) leave

modest maple
earnest phoenix
#

const client = new Discord.Client({ fetchAllMembers: true, disableMentions: 'everyone' }); When I try fetchAllMembers bot didn't work does anyone have an idea (i have server members intent)

restive furnace
#

don't please fetch all members in any case

#

it just rips ur ram and processing power

#

and fetchAllMembers is removed in djs master and will be removed in djs 13

earnest phoenix
#

Hmm

outer perch
#

does VPS give a domain?

restive furnace
#

no

fluid basin
#

some companies do, but most don't

#

you'd usually get one with web hosting, but not vps hosting

#

though some providers also sell domains

outer perch
#

aight

restive furnace
#

namecheap is the cheapest way to get a domain

fluid basin
#

freenom if you want a free domain

earnest phoenix
#

No errors, just not wanting to work, lol

fluid basin
#

is MessageEmbed defined?

restive furnace
#

no

earnest phoenix
#

Oh no, it isnโ€™t lol

fluid basin
#

there you go, you found your problem

earnest phoenix
#

Lemme fix that, lol

#

Bruh my IQ is 0 sometimes

#

@fluid basin still not working

fluid basin
#

hm

#

the async run isn't a property or any part of the object

earnest phoenix
#

Who have code nuke for dbd / DBD.js

fluid basin
earnest phoenix
#

Dbd.js whatโ€™s that LOL

#

Brh u didnt know what is dbd.js

#

F

#

Whatโ€™s that?

#

Whatโ€™s the full name for it

slender thistle
#

What do you mean by "nuke"

earnest phoenix
#

I need code nuke

umbral zealot
#

dbd.js is literally a wrapper around discord.js so you just need to know what that is "in discord.js"

earnest phoenix
#

For my bot

umbral zealot
#

What's a "nuke"

#

What does your imaginary nuke command do?

earnest phoenix
#

Yed

#

LOL

umbral zealot
dusky sundial
#

Pretty sure nukes are against ToS if it's what I'm thinking of

slender thistle
earnest phoenix
#

Ohhh, woah never heard of it

#

@umbral zealot nuke is like purge but 1 channel in 1 command

#

Like p!nuke

#

nuke

#

Ahh I see not bad

umbral zealot
#

Ok so that's basically:

  • Clone the channel
  • Delete the old one
#

super simple

#

channel.clone().then(() => channel.delete())

#

literally that simple

earnest phoenix
#

Try invite bot bolt

#

Then >nuke

umbral zealot
#

How about instead of that you explain to us why what I just said isn't what you need?

#

using words.

earnest phoenix
#

He means like, it purges a full channel and then yea no messages left

#

Oh u all mean i said nuke is like word

#

No errors, just not wanting to reply

#

What this code u send

slender thistle
#

Use "purge" instead of "nuke" next time for that

fluid basin
slender thistle
#

because the traditional definition of "nuke" in Discord bots is different from "re-creating" a channel

earnest phoenix
#

Yes, but thatโ€™s how my bot works, all of my commands have run @slender thistle

#

U all mean i said nuke is like word ?

umbral zealot
#

Every person is different when they talk about "nuke" that's why we had to make sure of exactly what you needed

#

But the only way to remove all the messages in a channel is to clone it and then delete it. This is the way.

earnest phoenix
#

Ye

#

I need the code

umbral zealot
#

I already gave you the code.

earnest phoenix
umbral zealot
earnest phoenix
#

Hi

#

does anyone know how to use react-switch on a ejs file?

#

Is code nuke for dbd

umbral zealot
#

dbd is a discord.js wrapper, so it's the same thing

cinder patio
umbral zealot
frail token
#

Sa

umbral zealot
earnest phoenix
#

๐Ÿ‘

#

yea.. it s an npm module that is using react, but i don t really know how to use it... so yea

umbral zealot
#

you can't use react.js things with EJS

#

That's like trying to use a nitro injector on an electric car

earnest phoenix
#

oh

fluid basin
#

nice analogy XD

#

EJS and react are completely different frameworks

#

(well if EJS is even considered one)

umbral zealot
#

Seriously those are 2 completely different technologies. React.js is fully 100% front-end, EJS is a back-end template generator

earnest phoenix
#

soo

umbral zealot
#

So take your whole EJS project

#

And chuck it in the garbage

#

And start learning react.js

fluid basin
#

vue is also great

#

but well your choice

earnest phoenix
#

how could i get the statement of a switch button?

umbral zealot
#

Oh yes Vue.js is absolutely great, too

earnest phoenix
#

i set*

umbral zealot
#

You mean with EJS? You don't. EJS is back-end before it's sent to the front-end, it doesn't do back and forth interaction

earnest phoenix
#

Who have code nuke for dbd / dbd.js

#

Dm

#

Or idk

umbral zealot
#

IF you want to know how to integrate that specifically into dbd.js, maybe just ask on their discord server

earnest phoenix
umbral zealot
#

yes

earnest phoenix
#

Oh k

umbral zealot
#

Continuously asking here won't magically turn this answer into a full blown dbd.js command code - go ask on their server if you need that

naive heron
#

sa

willow inlet
#

Hello.

Is it true that itโ€™s not allowed to have a changing status, that changes every 5 seccons?

unkempt ocean
earnest phoenix
#

Should I add anything else?

lament rock
#

If you're using that command to gauge statistics, you should add memory usage

#

also, change the Server: field to be Users:

earnest phoenix
#

Hmm why?

lament rock
#

Server: client.users.cache.size

#

lol

earnest phoenix
#

OHHH, LOL

#

LMAOOO

restive furnace
#

and also make creator dynamic

earnest phoenix
#

the max frequency is once every 15-ish seconds

unkempt ocean
earnest phoenix
#

that's for the game sdk

#

no?

unkempt ocean
#

don't think so

dusky sundial
#

I read that the general rate limit for the Discord API is 10k requests per10 minutes

earnest phoenix
#

im fairly certain it is for the game sdk

#

the presence ratelimit was tested

#

it's around 5/60

dusky sundial
#

I'm assuming that was done with a library that doesn't handle rate limits for you then?

earnest phoenix
#

don't know

dusky sundial
#

Cool, just making sure. But yea it 5/60 sounds reasonable

earnest phoenix
dusky sundial
#

Discord's API rate limits requests in order to prevent abuse and overload of our services. Rate limits are applied on a per-route basis (meaning they can be different for each route called) and per-account performing the request

slender thistle
earnest phoenix
#

make sure that your presence actually changed

#

it's a gateway request so it won't error out

#

like a REST one would

dusky sundial
#

Clients are allowed to send 120 gateway commands every 60 seconds, meaning you can send an average of 2 commands per second.

modest maple
#

cuz you're just gonna hit the ratelimit and d.py is just silently re-scheduling it

modest maple
slender thistle
dusky sundial
slender thistle
#

I mean, there would be some delay in the requests if I was actually ratelimited, no?

earnest phoenix
#

no

modest maple
#

no

earnest phoenix
#

it isn't a REST request

slender thistle
#

oh well I cba to set up a logger rn KEKW

earnest phoenix
#

best way to test this is to track presence updates via an event

#

the thing is, it modifies its presence cache after sending the requests. So, the real presence doesn't actually change.

warm bolt
#

Those stars^

#

I dont have there name anymore or something

#

I thought they were .entity-header_star

#

But they ain't anymore?

#

More fitting

zenith terrace
#

No it isnt

#

Its about CSS/HTML, so here is more relevant

warm bolt
#

Okay

#

what's the name of the stars then

zenith terrace
#

Idk im not on my laptop, use inspect element

warm bolt
#

I did but cant find them lmao, I'll keep looking then

restive furnace
#

find a gray one

#

and try changing it and if it changes the stars then it is that

warm bolt
#

Well I searched in the page

#

And the only thing with stars

#

Was my css

#

no where else did it specify stars

#

maybe I'll remove the css and see if it appears

warm bolt
#

Oh its stars

#

I think

#

I was using star

#

entity-header_stars

modest maple
#

they moved the class identifiers blobpain So now its way more difficult styling

warm bolt
#

RIP ye

#

It isnt entity-header_stars ๐Ÿ˜”

earnest phoenix
#

Hey yall

#

Told to come here to ask about hosting

#

Anyone have experience using VPS to host the bot and web interface?

umbral zealot
#

A lot of people are but you're going to have to be a bit more specific in your question

earnest phoenix
#

Sure

modest maple
#

the stars are so shit now blobpain

earnest phoenix
#

Itโ€™s a node.js bot to fetch RSS feeds only. Iโ€™m also looking to host my website and the web interface on the same VPS

#

Iโ€™m just not sure what my hardware specification should be

umbral zealot
#

There's no real answer to that beyond "Whatever it needs" unfortunately

#

look for a VPS provider that you can grow with, start small, see if you need more power, upgrade if you do

earnest phoenix
#

I see

#

Iโ€™m trying to be as cheap as possible since Iโ€™m hosting it for my server only

warm bolt
#

still cant seem to find what the stars are called

umbral zealot
#

I've literally hosted 5 bots + 2 websites on the cheapest ovh.com VPS so... I don't think you should quite worry about that right now

warm bolt
#

It's not entity-header_star and it isnt entity-header_stars

#

So idk what it could be

modest maple
earnest phoenix
#

Iโ€™m looking at 1 core, 2gb RAM and 1 mbps speed with 40gb SSD

modest maple
#

not that you can change their color anyway blobpain

warm bolt
#

So we can't change stars colours?

umbral zealot
earnest phoenix
#

Might start with that as itโ€™s the cheapest option for me right now

modest maple
#

well

#

StarRating__StyledPath-sc-14c4h6v-0 rLJyx is your class

#

but you have no way of knowing if the star is filled or not

earnest phoenix
umbral zealot
warm bolt
#

Were on abt making the stars custom colours

umbral zealot
modest maple
#

and just hope no one questions why your bot has a 5 star rating ๐Ÿคฃ

umbral zealot
#

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

modest maple
warm bolt
#

F it didnt work

modest maple
#

I wonder if we can forcefully override the var

umbral zealot
#

I'm pretty sure if I wanted to I could do this wihtin a few minutes of googling

#

let's see.

#

"How to change SVG color with css"

warm bolt
#

I was using this
<style> .entity-header__star{ background: -webkit-linear-gradient(0deg, #058BF2, #4AC3E8 , #00F2FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; } </style>

#

But yk

#

๐Ÿ˜”

#

why do top.gg have to make it harder to customise... one of the 7 wonders of the world

modest maple
#

--contrast-light lets see if we can override this

#

oh well

#

we can

#

but

umbral zealot
#

there's literally a class="star" you can use

modest maple
warm bolt
#

so it's just .star?

modest maple
#

so you're 4 star bot will look like its 5 stars mmLol

#

hence the pain

#

cuz we lost the active star class blobpain

#

not entirely sure though why my yellow is being turned to transparrent

warm bolt
modest maple
#

pithink Can we litterally not override these vars

quaint wasp
umbral zealot
#

you're right, sorry ยฏ_(ใƒ„)_/ยฏ

#

Clearly there's a missing feature in the css for that

quaint wasp
modest maple
#

aye!

#

we managed to override teh vars

warm bolt
#

Ooo how

modest maple
#

No idea why the vars are diffrent for the two star sections though blobpain

umbral zealot
modest maple
#

i cba

umbral zealot
#

Well, suffer, then.

modest maple
#

this site means vvv little to me lol

quaint wasp
#

๐ŸŸก

modest maple
#
    :root {
        --contrast-light: 255,255,255
    }    
    .entity-header__stars > span:nth-child(1) > span:nth-child(1) > span > span:nth-child(1) > svg:nth-child(1) {
        width: 20px;
        height: 20px;
        fill: rgba(var(--contrast-light), 1);
    }```
#

should make them 20px x 20px with the changable color

modest maple
#

the opacity isnt changing though which is pithink

#

oh targeting the wrong thing

warm bolt
#

So where would I put my
<style> .entity-header__star{ background: -webkit-linear-gradient(0deg, #058BF2, #4AC3E8 , #00F2FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2; } </style>โ€‹
In the mix

#

or should I just scrap that^

modest maple
#

blobpain Okay nvm cant change the opacity without changing it for all stars

#

ffs

#

rLJyx, SFFgH

#

heres hoping these class names dont change

umbral zealot
#

They will Kek

modest maple
#

would suprise me

umbral zealot
#

They literally will, they're dynamic.

modest maple
#

some of the stuff is mindbogglingly enough

umbral zealot
#

This is a web framework, those styles are dynamic and based on a hash of the styles or something

modest maple
#

pithink Thanks for the lecture lmao

umbral zealot
#

which means any tiny change breaks them. If they're even stable enough between rebuilds of the site in the first place, which I doubt they are tbh

modest maple
#

thats generally pretty bad in industry lol

umbral zealot
#

No it's not. It's specifically a thing you don't like because you're trying to modify a style but that's the one place where that's a problem

modest maple
#

now for the stars bellow blobpain

umbral zealot
#

In terms of generating dynamic websites using contemporary modern framworks, dynamic styles is extremely common.

modest maple
#

pithink Very rare to see dynamic css linked class names lol

umbral zealot
#

Not in react, vue, and angular builds.

modest maple
#

pithink no?

umbral zealot
#

You and I have very different experiences with web development then.

modest maple
#

thats not dynamic styles though

#

they're just using random class names and linking it to some amount of css cuz derp

warm bolt
#

Well I did it but its white, I want blue, changing the rgb to blue breakes it lmao

modest maple
#
    :root {
        --contrast-light: 255, 153, 0
    }    
    .entity-header__stars > span:nth-child(1) > span:nth-child(1) > span > span:nth-child(1) > svg:nth-child(1) {
        width: 20px;
        height: 20px;
    }    
    .rLJyx { /* Filled Stars */
        fill: rgba(var(--contrast-light), 1);
    }
    .SFFgH { /* UnFilled Stars */
        fill: rgba(var(--contrast-light), 0);
    }```
#

this is it atm

#

change to what ever flavor you feel like

#

The review stars are

#

even more cancer blobpain

#

mm ig the best way to not make the whole site css just janked is to make a new var and use that

modest maple
#

yeah

#

one might say

#

its a small issue

#

change the var name

#

to not override everything

#

my css is custom enough to where it doesnt really effect me

#

but you'll probably wanna change that

#

--star-colour or smth

warm bolt
#

alr

modest maple
#

excusemewtf css .SFFgH, .bGrTHK { fill: rgba(var(--contrast-light), 0); stroke: rgb\(var(--contrast-light); stroke-width: 2px; }

#

oof

#

\

warm bolt
#

f

#

Changed the name now it broke

modest maple
#
    :root {
        --star-colour: 255, 153, 0
    }    
    .entity-header__stars > span:nth-child(1) > span:nth-child(1) > span > span:nth-child(1) > svg:nth-child(1), .star > svg {
        width: 20px;
        height: 20px;
    }    
    .rLJyx, .cIdQeE { /* Filled Stars */
        fill: rgba(var(--star-colour), 1);
        stroke: none;
    }
    .SFFgH, .bGrTHK { /* UnFilled Stars */
        fill: rgba(var(--star-colour), 0);
        stroke: rgb(var(--star-colour));
        stroke-width: 2px;
    }```
#

veld gonna get a stabbing if those random names change blobpain Although the css is changing again in a month so just prepare

warm bolt
#

Oh dope that one works, and yeah cant wait for another name change!

#

they change the names so they can watch us suffer looking for them

modest maple
#

mhmm

#

lets start a riot!

#

rights for a sane class name!

timber fractal
misty sigil
#

what are the 2 errors

timber fractal
misty sigil
#

dont call mongoose.connect multiple times

#

and tag obviously isnt a constructor

timber fractal
#

i dont see it twice

#

or more

misty sigil
#

other files count too

#

:p

timber fractal
misty sigil
#

can i see your tag file

timber fractal
#

and?

#

@misty sigil found a solution?

misty sigil
#

nah

timber fractal
#

somebody else?

outer perch
#

message.react() isn't working, but there's no logging errors either

lyric mountain
#

Did u pass any param to it?

outer perch
#

maybe I don't need await, but that's not the problem for sure

lyric mountain
#

Did u modify default intents for your client?

outer perch
#

no

#

I only have it like this

const bot = new Client();
crude light
lyric mountain
#

Sadly idk what could cause reaction failure without errors, maybe someone with more djs experience could help u

outer perch
#

yea, ty for trying

mellow kelp
#

@outer perch maybe the code isn't executing?

outer perch
#

IMAGINE

#

I just found that

#

๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

mellow kelp
#

wait

outer perch
#

I started botDev.js

mellow kelp
#

where drip jolyne at

outer perch
outer perch
mellow kelp
#

ah yes, development issues

outer perch
#

cuz I wanna test the main one with the other's client

outer perch
mellow kelp
#

o

outer perch
#

locally, bot.js is tested with Dev's token sometimes

#

depends one what I want to test

mellow kelp
#

makes sense

#

i almost always test with a dev token

leaden valley
#

ฤฑam Kodur

broken matrix
#

Can i edit the vote page of my bot

near dew
#

Hi, I've already asked for a name tag, but does anyone please know in what form should I include the emoji ID in the message?

pale vessel
#

No

#

You need both ID and name of the emoji

#

and use <:name:id> and <a:name:id> (for animated emojis)

near dew
#

Ok, thanks!

fair axle
#

I made a tag system which add tags to new members on server. But sometime it doesn't work and there is no error message.

stable snow
#

does &lt and &gt work on top.gg?

lusty quest
#

like this is also your issue.

#

i would suggest using one file to make your MongoDB connection and then export it either by attaching it to your client or by requiring it in each file you need it

tulip ledge
#

So... I'm using SQLite for my discord bot, now I have a second type of bot wich basically is a minecraft bot and I need to access that SQLite databse in there, my friend told me SQLite only supports 1 session meaning I can't access the db from my minecraft bot, so he told me I'd have to make an API with express I looked up how to do it but it doesn't show how to access the API if you get what I mean, cuz I suppose that node-fetch isn't used to access an API the same system

earnest phoenix
#

Can anyone help me?

placid iron
earnest phoenix
#

I want to create embeds in Module

#

But Idk how

#

i need help with translating python again, this is array indexing, right, what does the minus do

#

i'm taking a guess that it's accessing the array backwards

pale vessel
#

gets the second last element?

#

yeah

earnest phoenix
#

got it

#
    name: "servers",
    category: "info",
    description: "Returns latency and API ping",
    run: async (client, message, args) => {
        client.guilds.cache.forEach(guild => {
            const embed = new client.MessageEmbed()
                .setColor("RANDOM")
                .setDescription(`${guild.name} | ${guild.id} > ${guild.owner}`)
            message.channel.send(embed);
        })
    }
}```
#

MY code

pale vessel
#

okay?

earnest phoenix
#

Error: (node:6332) UnhandledPromiseRejectionWarning: TypeError: client.MessageEmbed is not a constructor

pale vessel
#

you get MessageEmbed() from require("discord.js"), not client

misty sigil
#

oh god

#

that is bad

earnest phoenix
#

So what do I need to change?

earnest phoenix
crimson vapor
#

bro

misty sigil
#

the command idea is shite

crimson vapor
#

imagine if you could access it backwards injs

misty sigil
#

dont display all your guilds

crimson vapor
#

shit would break

misty sigil
#

and you send an mebed for each of them

#

kekw

tulip ledge
earnest phoenix
#

This is a example

earnest phoenix
# misty sigil and you send an mebed for each of them
    name: "av",
    category: "info",
    description: "get Avatar",
    run: async (client, {author, channel}, args) => {
        let embed;
        embed = new client.MessageEmbed()
            .setColor("RANDOM")
            .setImage(author.displayAvatarURL())
            .setFooter(author.username, author.displayAvatarURL);
        await channel.send(embed);
    }
}```
misty sigil
#

require("discord.js").MessageEmbed

earnest phoenix
# misty sigil require("discord.js").MessageEmbed
    name: "av",
    category: "info",
    description: "get Avatar",
    run: async (client, {author, channel}, args) => {
        let embed;
        embed = require("discord.js").MessageEmbed()
            .setColor("RANDOM")
            .setImage(author.displayAvatarURL())
            .setFooter(author.username, author.displayAvatarURL);
        await channel.send(embed);
    }
}```
#

Like this?

pale vessel
#

try it and see

earnest phoenix
earnest phoenix
# pale vessel try it and see

(node:11740) UnhandledPromiseRejectionWarning: TypeError: Class constructor MessageEmbed cannot be invoked without 'new'

pale vessel
#

Right

misty sigil
#

right

pale vessel
#

can you try guessing the fix?

#

actually, you don't have to guess, try reading the error

misty sigil
earnest phoenix
pale vessel
#

Yes

earnest phoenix
restive furnace
#

that's why i like negative array indexing

misty sigil
misty sigil
#

would you rather

#

const {MessageEmbed} = require('discord.js')

new MessageEmbed()

vestal rampart
#

Is there a way to get a list of every server your bot is in?

pale vessel
#

no

#

{ embed: { image: { url } } }

earnest phoenix
#

Can you also tell me how to get all the servers into one embed? @pale vessel

misty sigil
#

you dont

pale vessel
#

No, sorry

earnest phoenix
misty sigil
#

its bad to do that

jade zodiac
#

yep

earnest phoenix
#

Is a command for me

jade zodiac
#

no

pale vessel
#

Yes

earnest phoenix
#

@jade zodiac how to get Bot Developer roles?

jade zodiac
#

oof..

sudden geyser
#

make bot and get approved on dbl

glossy spoke
jade zodiac
earnest phoenix
#

add me on your

jade zodiac
#

never

sudden geyser
#

5head

earnest phoenix
#

@jade zodiac send your bot link

jade zodiac
#

no

tulip ledge
#

lol

#

whats happening

earnest phoenix
#

@jade zodiac please

modest maple
#

๐Ÿ‘€

glossy spoke
earnest phoenix
glossy spoke
#

??

glossy spoke
#

3%

jade zodiac
#

you have 3% i block you if you ping me again

mellow kelp
#

how many pings have you gotten in these last 5 minutes

crimson vapor
#

how do I sent ``` inside of a code block?

misty sigil
#

\

crimson vapor
#

can you

#

show that then

#

at least in code

pale vessel
crimson vapor
#

ty

misty sigil
#
\`\`\`

\`\`\`
#

ah

#

shite

earnest phoenix
#

is someone else having trouble with bots?

#

my bot isnt replying to any command i didnt change anything and there is no errors

#

ty

#

help needed

jolly mortar
#

how can i add a .catch to my codes beacuse i get a rejection warning in the console every time someone runs a command

pale vessel
#

add .catch(fn) to methods that return a promise

jolly mortar
#

ok

earnest phoenix
#

How to make Chat code?

pale vessel
#

you can log the error without having node to yell at you js method(something).catch(console.error);

earnest phoenix
#
    name: "kick",
    category: "moderation",
    description: "kick user",
    run: async (client, {author, channel}, args, message) => {
        const member = message.guild.members.cache.get(args[0]);
        if (!message.member.hasPermission('KICK_MEMBERS'))
            return message.reply('Sie haben keine Berechtigung, diesen Befehl zu verwenden!');
        if (args.length === 0)
            return message.reply('Bitte geben sie eine ID an!');
        if (member) {
            member
                .kick()
                .then((member) => message.channel.send(`${member} wurde gekickt.`))
                .catch((err) => message.channel.send('Ich kann diesen User nicjt kicken :('));
        } else {
            message.channel.send('User nicht gefunden!');
        }
    }
}```