#development

1 messages ยท Page 1301 of 1

carmine summit
#

while .includes only searches the....

#

the

solemn latch
carmine summit
#

thing

#

btw is .has by discord.js or by default

sonic lodge
#

map.includes isn't a thing

solemn latch
#

has is a part of maps iirc

#

collections just extends map

fervent goblet
#

how do i play links with lavalink?

lucid prawn
#

its code

solemn latch
#

please use hastebin ๐Ÿค”

lucid prawn
solemn latch
#

sure its okay, too much code really for anyone here to do much more than a quick scan on it.

lucid prawn
#

ok i'll wait

carmine summit
#

is it risky to download .txt files

earnest phoenix
#

is it risky to download .txt files
@carmine summit Nope

#

Text files can't be executed

#

They're only for humans to read

carmine summit
#

Is it possible to put special code in txt files that the system will mistakenly treat as an executable and runs itself?

solemn latch
#

That question i feel is extremely hard to give a 100% zero risk response to.
If you open a file in something like notepad, there's a very very little chance anyone can do anything with that.

If you open an exe thinking its a text file things can happen.

fervent goblet
#

it still cant be executed tho without it being deliberately ran. And your computer will only look for files in a specified location not randomly

earnest phoenix
#

yo

#

How to replace them

#

in requirement.txt to

#

pyproject.toml

cosmic forum
#

By that, I mean msg.content = ...
@sudden geyser So how would I "re-assign" it?

earnest phoenix
#

Is it possible to put special code in txt files that the system will mistakenly treat as an executable and runs itself?
@carmine summit rename the file with the js extension done

hasty mulch
#

How do I install Python 3.8 on Raspberry Pi?

indigo flax
#

Hey

#

my bot goes offline every once in a while and i get that error

tardy hornet
#

can someone remind me whats the code for nothing

#

is it /2 and something right?

cinder patio
#

the code for nothing? what do you mean?

restive furnace
#

@hasty mulch sudo apt install python3

silver lintel
#

@tardy hornet what do you mean code for nothing? you can do return; or if you want to send an empty message do message.channel.send('_ _');

hasty mulch
#

@restive furnace TY

tardy hornet
#

like

#

in a .addfield()
there is a thing that you need to put : , ' and then a new thing'
i want it to be empty

restive furnace
#

then do

#

.addField("\u200b", "\u200b")for empty field

tardy hornet
#

yes

#

thats the code

#

ty

restive furnace
#

np

hasty mulch
#

@hasty mulch sudo apt install python3
@restive furnace I already have 3.7 installed

restive furnace
#

it's latest in rpi repo then ยฏ\_(ใƒ„)_/ยฏ

#

you gotta download it manually

earnest phoenix
earnest phoenix
#

I want to embed my timer command but i don't know how to embed... Can anyone help me

misty sigil
#

What library

earnest phoenix
#

Py

earnest phoenix
#

Thank you so much

#

โ˜บโค

earnest phoenix
#

What does the error mean?

bleak glacier
#

bruh

earnest phoenix
#

I am trying to run a GitHub Source code

bleak glacier
#

did you put your bots token

earnest phoenix
#

Ye

bleak glacier
#

client.run('TOKEN')

#

Is it in this format

#

huh?

#

-_-

fluid basin
#

did you read the setup instructions in Github?

#

if there wasn't any, then good luck

#

well if you read the error you should be able to tell

bleak glacier
#

ye

earnest phoenix
#

oo

#

No instruction

#

XD

#

I made a file database.json

#

before its not there

#

after I made that

#

that shows

slender thistle
#

blup

earnest phoenix
#

๐Ÿ˜

slender thistle
#

blup blup

#

I'm a fish that shall tell you something

#

Loading a JSON out of an empty file is impossible

carmine summit
#

What does JSON stands for?

cinder patio
#

Javascript object notation

fluid basin
#

(J)ava(S)cript (O)bject (N)otation

ashen yarrow
#
client.on("presenceUpdate", newPresence => {
  const array1 = newPresence.activities
  const spotify = array1.find(activity => activity.name === "Spotify")
})``` how do I do something when I play spotify
fluid basin
#

depends on what do you want to do?

carmine summit
#

Why is there no "Array" in "JSON"?
KEKlaugh

ashen yarrow
#

add a role when someone is playing and remove it when its not

fluid basin
#

typeof [] === "object"

carmine summit
#

First of all

#

Its not playing

#

Its LISTENING

ashen yarrow
#

That doesnt matter

carmine summit
#

Second, you didn't put oldPresence

ashen yarrow
#

I didnt feel I woulde needed it yet

#

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

carmine summit
#

You need it to remove users when they stopped listening

ashen yarrow
#

oh

#

ur right

#

ok fixed

carmine summit
#

So when oldPresence is undefined, The user started streaming and must be given the role

earnest phoenix
#

oldPresence can't be undefined

carmine summit
#

Hmmm

#

Ok bye

ashen yarrow
#

lol..

earnest phoenix
#

There's 2 parameters returned from the event, if the old presence doesn't have the activity you wanted and new presence has it, give the role

#

If the old has it and new doesn't, remove

ashen yarrow
#

There's 2 parameters returned from the event, if the old presence doesn't have the activity you wanted and new presence has it, give the role
@earnest phoenix how?

#

Would I use array#some?

#

or array#find

carmine summit
earnest phoenix
#
<client>.on("presenceUpdate", (oldPresence, newPresence) => !oldPresence.activities.find(a => a.type === "LISTENING" && a.name === "Spotify") && newPresence.activities.find(a => a.type === "LISTENING" && a.name === "Spotify") ? newPresence.member.roles.add(<Spotify Role>) : oldPresence.activities.find(a => a.type === "LISTENING" && a.name === "Spotify") && !newPresence.activities.find(a => a.type === "LISTENING" && a.name === "Spotify") ? newPresence.member.roles.remove(<Spotify role>) : undefined);
// Explanation:
/*
In this event we bind it an arrow function, and in it's body, we use a conditional operator to check if the activities contain the activity we want by using `Array#prototype#find()` and if so, give role, if not, remove
*/```
#

@ashen yarrow โ†‘

ashen yarrow
#

makes sense

#

how would I define the role?

#

cuz this obviously wont worklet role = message.guild.roles.find(r => r.name === "Role Name");

earnest phoenix
#

newPresence also returns a guild property

#

newPresence.guild.roles.cache.find(r => r.name === <Role Name>)

ashen yarrow
#

oh

earnest phoenix
#

newPresence is just a UserPresence

ashen yarrow
#

... waitWhat it is

#

still getting errors :/

#

unexpected token const waitWhat

carmine summit
#

DUUUUDEEEEEEE

#

Alrigt.

#

First of all

#

You need to replace Spotify Role with your role id as a string

#

So instead of roles.add(Spotify Role), make it roles.add('123456789')

#

@ashen yarrow

twilit rapids
#

Seems like they defined a role on the second line, so replace Spotify Role with spotifyrole on the roles.add() function

solemn jolt
#

Unable to connect to the Mongodb database. Error:MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/

#

What's this error?

valid frigate
#

white list your ip

solemn jolt
#

I add my ip to whitelist

valid frigate
#

o

solemn jolt
#

๐Ÿ˜…

sick fable
#

I am having a problem with my codes

#

Lemme send the code

#

Wait

#
@commands.has_permissions(ban_members=True)
async def unban(ctx, *,member):
		banned_users = await ctx.guild.bans()
		member_name , member_discriminator = member.split('#')
		
		
		for ban_entry in banned_users:
			user = ban_entry.user
			if (user.name , user.discriminator) == (member_name , member_discriminator):
				await ctx.guild.unban(user)```
#

I want to write that if someone tries it(Who doesn't have perms). I want my bot to send "Error! You don't have perms". I also tried doing it but there's a Problem

#

Identation error

#

:(

ashen yarrow
#

and will the array newPrsence.activities work in my message function?

#

But Peep what are u trying to do? I want to make a !np command (now playing

earnest phoenix
#

@ashen yarrow LIGHT MODE AND GLITCH AAAAAAAAAAAAAA

#

๐Ÿ“Œ

#

See pins

ashen yarrow
#

repl

#

I am on a chromebook so I cant host from that thing

#

because its not in dev mode

#

fkn school ;3

tardy hornet
#

need help

#
case 'giveaway':
  if (!message.guild.me.hasPermission(["ADMINISTRATOR"])){
    return message.channel.send('I dont have permission to do that, please give me "`ADMINISTRATOR`" permission.');
  }
      if(!message.member.hasPermission("ADMINISTRATOR")){
        return message.reply('you dont have the premissions to use this command!');
        
    } 
    if(args[1]) return 
    message.channel.send(item.question).then(m => {
      setTimeout(() => {
        m.delete()
      }, 32000)
      }).then(() => {
      message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time']})
        .then(collected => {
          message.channel.send(giveaway2)

        })
        .catch(collected => {
          message.channel.send('time out!.').then(m => {
            setTimeout(() => {
              m.delete()
            }, 10000)
            })
        })
      });
    
  const giveaway2 = new Discord.MessageEmbed()
  .setColor('EC1F0A')
  .addField(args.slice(1).join(' '), `host: ${message.author}`)
  .addField('react with :tada: to join',  "\u200b" )
  .setTitle(':Yay: new giveaway :Yay:')
  message.channel.send(giveaway2).then(msg => reactEmojies(msg, [':tada:']))

break;

this is the command, and i want that if they type only: !giveaway it will ask them what the prize should be and if they can answer.

#

someone?

#

@solemn latch sorry for the ping, you are just one of the best i know

fluid basin
#

wheres the filter

tardy hornet
#
[
    {
        "question": "do you want to send the `best color quiz?`",
        "answers": ["yes"]
        
    },
    {
        "question": "what is the prize?",
        "answers": [""]
    }

]
carmine summit
#

How do I send a message if a user typed something like ?ping?

#

For example:

tardy hornet
#

check dms

carmine summit
#

If i typed:

tardy hornet
#

bro

#

check dms

carmine summit
#

Ok wait

#

No DMS

#

!!

sick fable
hearty wren
carmine summit
#

Discord.js

tardy hornet
#

@carmine summit ok ok. send here the code,

#

so i will see how you make your commands

#

in cases?

#

or what?

carmine summit
#

There is no code

tardy hornet
#

oh lol

carmine summit
#

My bot is offline

#

It won't go online

tardy hornet
#

you need to make it go online

carmine summit
#

How

glass nexus
#

I want to setup bots how to setup it from android

tardy hornet
#

first paste that:

const Discord = require('discord.js')
const bot = new Discord.Client();
const token = 'your bot token'
const prefix = 'your prefix'
#

@carmine summit

carmine summit
#

Ok then?

#

Where do i paste it

tardy hornet
#

in the code.

carmine summit
#

What code

tardy hornet
#

bro

wraith cipher
#

F

carmine summit
#

Please help

tardy hornet
#

watch that

carmine summit
#

No. I think thats outdated

#

I think that is v11

tardy hornet
#

its not

#

just do what he do

#

thats how to make a bot

carmine summit
#

Ok now its online

#

But it says nothing if i press ?ping

warm marsh
#

You need to implement that.

carmine summit
#

How

warm marsh
#

Listen for the message event

tardy hornet
#

ok i will send you something

#

paste it

warm marsh
#

do your checks and then boom

#

Copying and pasting is bad.

carmine summit
#

What checks?

warm marsh
#

if content is x do

carmine summit
#

What?

warm marsh
#

OMFG

#

Learn to CODE.

carmine summit
#

I am trying

tardy hornet
#
bot.on('message',  message=>{
  if(!message.content.startsWith(prefix)){return}
  if (message.author.bot) return;
  if (message.channel.type === 'dm') return message.author.send('sorry, i dont respond in DMs. please type my commands in a channel.')
    let args = message.content.substring(prefix.length).split(" ");
switch (args[0]) {








}
})
bot.login(token)
#

paste that

carmine summit
#

Your missing something

tardy hornet
#

just do

carmine summit
#

It must be bot.on
Not ot.on

#

Wait

tardy hornet
#

right,

#

my bad

#

now

carmine summit
#
  if(!message.content.startsWith(prefix)){return}

Also, no need to put curly braces in here

tardy hornet
#

but i did

carmine summit
#

Or you can simply that by putting ||

tardy hornet
#

so now you know cods aren't you

carmine summit
#

It acts as "or"

#
  if(!message.content.startsWith(prefix) || message.author.bot) return
#

There we go

tardy hornet
#

so now you know cods aren't you
@tardy hornet
@carmine summit

#

it was a troll isnt it?

carmine summit
#

Hmm?

#

I done copy paste it

#

Now what?

tardy hornet
#

see in the middle?

carmine summit
#

Yeah

tardy hornet
#

there is nothing right?

carmine summit
#

Yes

tardy hornet
#

what you want the command to do, and what is the name of the command?

carmine summit
#

?ping

tardy hornet
#

and what the command will do?

carmine summit
#

Send something like Pong!

tardy hornet
#

ok

#

so

#
case '?ping':
message.channel.send("Pong!")
break;

case 'name of the command':
what the command will do
break;

#

you done need to paste the part that out of ```js
that

carmine summit
#

Also, switch is a bad practice.
You should make something like

const args = message.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
#

Then ater that you should just add if statements

#
if (command === 'ping'){
}
#

That should make the code a lil cleaner

#

@tardy hornet

#

Plz i ned mor help

fluid basin
#

switch is better than if

carmine summit
#

IMO

tardy hornet
#

stop trolling us @carmine summit

carmine summit
#

Plz help me

tardy hornet
#

youre a pro codder

carmine summit
#

No

tardy hornet
#

yes

carmine summit
#

Im a newbie

tardy hornet
#

no youre not

carmine summit
#

Plz help

#

How to send messages

tardy hornet
#

i showed you

#
case '?ping':
message.channel.send("Pong!")
break;

case 'name of the command':
what the command will do
break;

carmine summit
#

Where am i gon put it?

tardy hornet
#
bot.on('message',  message=>{
  if(!message.content.startsWith(prefix)){return}
  if (message.author.bot) return;
  if (message.channel.type === 'dm') return message.author.send('sorry, i dont respond in DMs. please type my commands in a channel.')
    let args = message.content.substring(prefix.length).split(" ");
switch (args[0]) {



herehereherehereherehereherehereherehereherehereherehereherehere




}
})
bot.login(token)
carmine summit
#

switch is better than if
@fluid basin imo, if is better than switch, its because of variable scoping and much more

fluid basin
#

switch also has, if you use braces

carmine summit
#

TypeError: herehereherehereherehereherehereherehereherehereherehereherehere is not defined

#

Help

tardy hornet
#

im done, you are a pro, idk why im still helping you lol, idk why but i will still help you

#

i will still help you,

carmine summit
#

TypeError: herehereherehereherehereherehereherehereherehereherehereherehere is not defined

tardy hornet
#

but i know that youre a pro

carmine summit
#

Helppp

tardy hornet
#
bot.on('message',  message=>{
  if(!message.content.startsWith(prefix)){return}
  if (message.author.bot) return;
  if (message.channel.type === 'dm') return message.author.send('sorry, i dont respond in DMs. please type my commands in a channel.')
    let args = message.content.substring(prefix.length).split(" ");
switch (args[0]) {



case '?ping':
message.channel.send("Pong!")
break;



}
})
bot.login(token)
carmine summit
#

Alright lemme test it

tardy hornet
#

@carmine summit whats your yt channel?

carmine summit
#

Its says that token is not defined

#

HELP

tardy hornet
#

on top of everything

#

put that:

carmine summit
#

@carmine summit whats your yt channel?
@tardy hornet im not a youtuber?

tardy hornet
#

first paste that:

const Discord = require('discord.js')
const bot = new Discord.Client();
const token = 'your bot token'
const prefix = '?'
carmine summit
#

Ok wait

tardy hornet
#

wait

#

dont

carmine summit
#

?

tardy hornet
#

see the place i typed 'your bot token'

carmine summit
#

Yeas

tardy hornet
#

go to google

#

and go to your application

#

and and copy the bot token

#

and paste that there

carmine summit
#

What application?

tardy hornet
#

select your app

carmine summit
#

Ok now what

tardy hornet
#

click that

#

click copy

#

and paste it where i told you

#

noo

#

delete that

#

dont paste it here

#

fast

#

go to your application

carmine summit
#

Ok

tardy hornet
#

and click regenerate

#

never show your token

carmine summit
#

What does it do?

tardy hornet
#

people can make your bot do stuff, like different commands

carmine summit
#

Yeah?

tardy hornet
#

ok

carmine summit
#

Now what

tardy hornet
#

go all the way up

#

first paste that:



const token = 'your bot token'

#

see that line?

carmine summit
#

Yeah

tardy hornet
#

put the token where i typed 'your bot token'

carmine summit
#

Ok

#

It still says that my token is undefined

tardy hornet
#

hmm

#

bro

#

delete

#

fast

#

and i saw the problem

#

you need to put the token

carmine summit
#

Yeah?

tardy hornet
#

in ' '

#

but

carmine summit
#

Owh alright

tardy hornet
#

regenerate the token

carmine summit
#

Ok ok

tardy hornet
carmine summit
#

Ok done

#

Now what

tardy hornet
#

see that line

#

oh wait

carmine summit
#

Yeah

tardy hornet
#

first

#

click

#

Ctrl+s

#

to sav

#

e

carmine summit
#

Alright

tardy hornet
#

do that everytime you change something in the code

carmine summit
#

Ok next

tardy hornet
#

now see the line i showed you?

carmine summit
#

Yeah

tardy hornet
#

click terminal

carmine summit
#

Then?

tardy hornet
#

new terminal

carmine summit
#

Ok.

tardy hornet
#

and click on the terminal and type node .

carmine summit
#

Ok

earnest phoenix
#

@tardy hornet please send stuff in a single message instead of multiple messages you're flooding chat

tardy hornet
#

ok sorry

carmine summit
#

It gave me an error, says that no module found

tardy hornet
#

hmm

#

show me please

earnest phoenix
#

It gave me an error, says that no module found
@carmine summit it's the modules installed inside the node_modules of the current directory

carmine summit
#

Hi guys,
I have a question
How do I make an auto message on a guild create on any text channel?
@balmy anchor API ABOOZZZZ

earnest phoenix
#

No

balmy anchor
#

d.js

earnest phoenix
#

Not API abuse

tardy hornet
#

@carmine summit sorry bro, need to go eat, i could help you when im back

carmine summit
#

Ok sure

tardy hornet
#

good luck

carmine summit
#

@earnest phoenix help me auPepegrin

earnest phoenix
#

Aaaaaaaaaaaaaaaaaaaa nitro

carmine summit
#

Oof your nitro just expired?

earnest phoenix
#

two hours ago

#

also #general stop discussing about my nitro expiring I might cry

carmine summit
#

Can you help meM

#

I wanna create a ping cimmand

earnest phoenix
#

hmmm

carmine summit
#

Sorry im on mobile auPepegrin

earnest phoenix
#

A simple ping command would just return (the current time according to the VPS' computer ) - (timestamp of the message)

#

Date.now() returns the current time

carmine summit
#

Ok

versed shoal
#

Ping me if you need help

carmine summit
#

@Yusuf#0666

earnest phoenix
#

lemme see the docs for message timestamps

carmine summit
#

message.createdTimestamp

#

I think

versed shoal
#

what is the problem

carmine summit
#

iirc

#

I need help creatin oing command

earnest phoenix
#

message.timeCreatedTimestamp
@carmine summit no it's message.createdTimestamp

carmine summit
#

message.createdTimestamp - Date.now()

earnest phoenix
#

So basically this should be your ping command:

User: <prefix>ping
Bot code:
Send(current date - message created timestamp)
Bot: Pong! <Smth> ms
carmine summit
#

Yeah

versed shoal
#

or

#
client.ws.ping
earnest phoenix
#

what the fuck

carmine summit
#

client is not defined

earnest phoenix
#

that exists

carmine summit
#
client.ws.ping

@versed shoal this exists?

versed shoal
#
const client = new Discord.Client();
carmine summit
#

All i know was

bot.uptime
earnest phoenix
#

It exists

#

Ignore the first error that's from a typo

carmine summit
#

Omg it exists

versed shoal
#

you need to define

earnest phoenix
#

He named client as bot

versed shoal
#
const client = new Discord.Client();
client.ws.ping
carmine summit
solemn leaf
#

wha

#

bot.ws.ping

#

cant believe until I see it

carmine summit
#

Yeah me too

earnest phoenix
#

@carmine summit why the fuck are you making stuff like Skyblock bot and Among Us bot
discord bots are way NOT interactive games

solemn leaf
carmine summit
#

Uh

#

For the badge

#

Ppl seem to like it

solemn leaf
#

I tried making tetris

earnest phoenix
#

@carmine summit you can't get the badge anymore

versed shoal
#

don't you really know that?

carmine summit
#

And i own a server with 15k ppl

versed shoal
carmine summit
#

@carmine summit you can't get the badge anymore
@earnest phoenix i know, vut its for fun

#

And also a ?meme command

#

That gets stuff from reddit

#

Yeah

solemn leaf
#

that is simple

earnest phoenix
#

Also those kinds of bots probably won't be popular
I am 100% sure no MineCrafter or Among User will type TEXT to play the games on DISCORD

carmine summit
#

And i own a server with 15k ppl
I made a command that let users change the name of their VC to their room code... Ez matchmaking

solemn leaf
earnest phoenix
#

I'm gonna go play Among Us now bye

carmine summit
#

There we go

versed shoal
#

Does anyone need help?

solemn leaf
#

and what if a user changes the name to fuck

carmine summit
#

It can't be

#

I made a filter

#

Filtering out words that is

#

Ehh

#

And by using regex

#

/[.]{6}/

solemn leaf
#

You know that discord thing

#

its like spotify

#

but an among us code

#

Have them to

#

?AmongUsVC

carmine summit
#

?????

solemn leaf
#

they look like this

carmine summit
#

Ok

#

That only works on PC

#

But if you host a game

solemn leaf
#

Okay

#

then check the users client

carmine summit
#

And clicked the + button

solemn leaf
#

and if it shows mobile

carmine summit
#

You know

#

Near the message

solemn leaf
#

have them be able to send a code

carmine summit
#

Box

#

You cannot do that on mobile

solemn leaf
#

I dont play among us so I dont know

carmine summit
#

Its only a pc feature

solemn leaf
#

dude

#

check their client

carmine summit
#

Wut

solemn leaf
#

message.author.presence.clientStatus.mobile

#

something like that

#

that returns a boolen

earnest phoenix
#

not this image this is code

solemn leaf
#

?

earnest phoenix
carmine summit
earnest phoenix
#

why?

solemn leaf
#

What verison of djs you usin

carmine summit
#

If someone please

#

Get me a knife

solemn leaf
#

Cyber regen your token n maybe

carmine summit
#

Stab me on my back

earnest phoenix
#

Guy!I aam a started

carmine summit
#

Then report it

#

After you report it accuse soneone else

earnest phoenix
#

r

#

I am a starter

carmine summit
#

const Discord = require('discord.js')

#

Then

#

const embed = new Discord.MessageEmbed()

#

IIRC

solemn leaf
#

^^^

carmine summit
solemn leaf
#

Dont let erwin seeing you using embed builder

earnest phoenix
#

Just tell me what is wrong

carmine summit
#

THIS IS WRONG

#

THIS IS VERY WRONG

solemn leaf
#

Dont spoonfeed

#

they can read the spoonfeeding docs

carmine summit
#

That is Wronger than the meme that started ages ago that 2 + 2 = 5

earnest phoenix
#

SO WHAT SHOLUD I MAKE

carmine summit
#

const Discord = require('discord.js')

solemn leaf
#

No

carmine summit
#

const embed = new Discord.MessageEmbed()

solemn leaf
#

dont

#

help them anymore

earnest phoenix
#

thx

carmine summit
#

Oh cow

#

Im low batteryc

solemn leaf
#

@carmine summit

carmine summit
#

Cyaaa

solemn leaf
#
    if (message.author.presence.clientStatus.mobile) {}
    if (message.author.presence.clientStatus.web) {}
    if (message.author.presence.clientStatus.desktop) {}
carmine summit
#

Put else

#

Before the thing

#

After the thing

solemn leaf
#

ik i was giving example

carmine summit
#

Ok bye

#

helo gais im back

sudden geyser
#

@sudden geyser So how would I "re-assign" it?
@cosmic forum ... you re-assign the value of the property. That's a fundamental for JavaScript, so I recommend you search it up for more info.

dark kestrel
#
.discord-icon-links{
    display: inline;
    position: fixed;
    margin: -0.5rem -3rem;
}
carmine summit
#

why fixed

#

make it relavtive

#

then add top: 100px;

#

something like that

#

@dark kestrel

#

if top made it worse, maybe bottom:

dark kestrel
#

thx it works

carmine summit
#

np.

#

i deleted some of my css files in my brain tho.

#

my brain is getting full

#

due to the low quality of storage space KEKlaugh

dark kestrel
#

LoL

solemn leaf
#

I compressed my brain into a files

#

I dont have a decompressor thou

blissful coral
#

My FileZilla stopped connecting to my brains IP so currently sitting with the same files as before

faint prism
#

Sounds lethal

ionic dawn
#

How can I use a specific emoji from a guild in an embed?

pale vessel
#

can you elaborate on that

#

oh

ionic dawn
#

sry my eng goes brr

pale vessel
#

use it normally as you would inside a normal message

#

grab the emoji and use `${emoji} text`

solemn leaf
#

Help

ionic dawn
#

But how do I get the emoji?

solemn leaf
#

google it

pale vessel
#

you can use guild.emojis.cache.find() or get()

ionic dawn
#

Can you link me docs or somthn? I didnt find a thing

solemn leaf
#

my bot thinks images are commands

ionic dawn
#

@pale vessel ty

craggy lotus
#

Im looking for a developer for my Discord.JS dev (cuz im thinking of implementing a web-dashboard but idk Oauth2 stuff) (DM me if wanna join)

pale vessel
#

if it's not inside the guild, use client.emojis or you can straight up use <:id:name>, assuming the bot is in the emoji's guild

solemn leaf
#

^

slow umbra
#

Xd

ionic dawn
#

<client>.guilds.get() or <client>.guilds.cache.get() ?

craggy lotus
#

If in V12 then its with cache @ionic dawn

restive furnace
#

<client>.guilds.fetch(id)

#

thats better

blissful coral
#

Cache

#

Use cache

restive furnace
#

fetch uses cache too

pale vessel
#

fetch is better

blissful coral
#

Ah yes

restive furnace
#

but if it doesnt find it, then fetch it

blissful coral
#

Ye

#

Oopsie

cosmic forum
#

@cosmic forum ... you re-assign the value of the property. That's a fundamental for JavaScript, so I recommend you search it up for more info.
@sudden geyser I know, but what value would I re-assign it to ?

solemn leaf
#

oppies

dark kestrel
ionic dawn
#
const server = client.guilds.cache.get('GUILD_ID');
const emoji = server.emojis.cache.get('EMOJI_ID');
``` like that?
blissful coral
#

?

dark kestrel
#
.box-future-image{
    display: inline;
    position: relative;
    top: 200px;
}
ionic dawn
#

i tried that and server is undefined

still merlin
#

Iโ€™m making a bot in discord.js and I just finished my purge command, But I want to make another command called allpurge to bulk delete 100 messages by the mentioned member, is that possible?

solemn leaf
#

Yea

#

check docs

still merlin
#

I have, I canโ€™t find it, Hence why I asked here

blissful coral
#

i tried that and server is undefined
@ionic dawn what is server defined as

blissful coral
#

@still merlin you will fetch messages and use a filter with the users ID

#

Then delete them

#

emoji

carmine summit
#

@still merlin you will fetch messages and use a filter with the users ID
@blissful coral how do i do that exactly?

blissful coral
#

Message.member.messages.fetch(filter)

#

Define your filter

#

And set it to only that user

#

Check docs for further questions

carmine summit
#

wait

dark kestrel
#

@carmine summit help meh

carmine summit
#

i think i can estimate on when is my apporval

pale vessel
#

is that fixed

carmine summit
#

so in ratio, 16:9 is the bots added; bots verified

#

so

#

hm

dark kestrel
#

@pale vessel nope

carmine summit
#

16:9 KEKlaugh

dark kestrel
#
.box-future-description {
    font-size: 1rem;
    text-align: left;
    margin-top: 2rem;
    color: rgb(177, 177, 177)
}

.box-future-image {
    display: inline;
    position: relative;
    top: 200px;
}
pale vessel
#

that's fixed

#

use percentages for width maybe

open rune
#

what r u trying to make @dark kestrel

dark kestrel
#

text and image side by side

open rune
#

make it like grid

dark kestrel
#

but on mobile will be trash

open rune
#

r u using bs?

dark kestrel
#

bs = ?

open rune
#

bootstrap

dark kestrel
#

bostrap

#

oh

#

no

#

i dont

open rune
#

ok, lemme see

carmine summit
#

so uh

pale vessel
#

is that public?

carmine summit
#

average is 53 days

dark kestrel
#

@pale vessel nope it is local

pale vessel
dark kestrel
#

@carmine summit help meh

open rune
#

use display: flex

dark kestrel
#

but that make image to left

carmine summit
#

which i calculated and didn't view the recent bot verified and searched the id of it then get the date then translated it into days

blissful coral
#

Thatโ€™s not how it works

#

Lol

#

There isnโ€™t a set time just estimated

carmine summit
#

.image{
position: relative;
left: 100px;
}

#

welp, im rather excited or paranoid on whats gonna happen tommorow

#

its because im on 52 days now

ionic dawn
#

forreal... why cant I get the guild by using client.guilds.cache.get(guildID)

dark kestrel
#

how i can check does Body width is less then 500px

pale vessel
#

did you try it?

#

@dark kestrel media queries

open rune
#
.box-future-description {
    width: 50%;
    font-size: 1rem;
    text-align: left;
    margin-top: 2rem;
    color: rgb(177, 177, 177);
    position: relative;
}

.box-future-image {
    width: 50%;
    display: inline;
    position: relative;
    top: 200px;
}

@dark kestrel try add width 50%

dark kestrel
#

which one

#

image or desc

open rune
#

both

dark kestrel
#

uh ok

pale vessel
#

wrap them inside one media query

open rune
#

^

ionic dawn
#

did you try it?
@pale vessel I did, it returns undefined, even tho my bot is in that guild with full perms

solemn latch
#

The mods don't like when I tell people this(doctors hate this one trick)
But you can see when the most recently reviewed bots got submitted @carmine summit
#mod-logs look at the most recently denied bot and look when those where submitted

dark kestrel
#

OMG

#

it works

pale vessel
#

can you show me what you did and are you sure that's the correct id?

blissful coral
#

Wrong channel

#

Lmao

pale vessel
#

and try fetching the guild if so

raw silo
#

Hi, ive got a question. Haven't manage to find anything on the internets that worked. I need to set up a bot to only work in a specific channel. Is there a way to do that?

blissful coral
#

Yes

solemn latch
blissful coral
#

Just have a if statement

#

Oh Iโ€™m dumb lmao @solemn latch your right

ionic dawn
blissful coral
#

Do emoji

#

Pretty sure thatโ€™s what docs said when I checked

#

Because if you are using .get you are getting one

#

@ionic dawn

pale vessel
#

don't create a new client on each command

#

plus the way you're creating it is wrong (it would be new Discord.Client())

blissful coral
#

That to^

pale vessel
#

use message.client instead

#

message.client.guilds.cache.get()

blissful coral
#

The way you export in your handler doesnโ€™t include client so do that

raw silo
#

@raw silo if(message.channel.id === โ€œchannel idโ€)
@blissful coral but that means it will be listening to all messages, quite inefficient. Is it possible for the bot to join just the specific channel?

pale vessel
carmine summit
#

OMG

#

my bot hosting died

#

and my bot is offline now

#

holy cow im shaking

#

im just gon self host it

kindred ledge
#

Hello

#

Im new

blissful coral
#

@raw silo only way is to deny permissions to the other channels and revoke permissions to see them

open rune
#

@carmine summit migrate to vps ๐Ÿ˜„

blissful coral
#

@carmine summit for testing just test on client side

#

Also use a vps a lot better

ionic dawn
blissful coral
#

Hm

#

Code

raw silo
#

@raw silo only way is to deny permissions to the other channels and revoke permissions to see them
@blissful coral How would you do that. I can not see anything specific in either server or channels settings

carmine summit
#

omg

#

its back up

#

lol

tired panther
carmine summit
#

alr im buying a VPS

#

recommend me\

blissful coral
#

@raw silo just remove its perms to see channels

#

Channel settings

#

@tired panther css

tired panther
#

ahhh

carmine summit
pale vessel
#

i'd recommend galaxygate

blissful coral
#

Galaxy gate

#

Is what I use

#

Never gone offline

#

And itโ€™s cheap

#

@carmine summit

carmine summit
#

my payment option is not on the list

#

i need otherrrr

blissful coral
#

Dmed you a invite to there support server, ask them there

solemn leaf
#

where is erwim

#

erwin

blissful coral
#

Probably doing something lol

solemn leaf
#
process.on('uncaughtException', async (err) => {
    let me = await bot.users.fetch("485987127809671168")
    if (!err.length >= 100) {
        let buf = new Buffer.from(`${err}`)

        me.send({ files: [{ attachment: buf, name: 'err.txt' }] });
        return
    }
    me.send(err);
}).on('unhandledRejection', async (err) => {
    let me = await bot.users.fetch("485987127809671168")
    if (!err.length >= 100) {
        let buf = new Buffer.from(`${err}`)

        me.send({ files: [{ attachment: buf, name: 'err.txt' }] });
        return
    }
    me.send(err);
})

would this work?

thick gull
#

probably sleeping

#

or busy

#

or a combination

solemn leaf
#

no they arnt in the disc

#

try pinging them

thick gull
#

theyโ€™re offline

#

discord wonโ€™t show you all offline users in a "large" server

blissful coral
#

Aki have you tried running the code

#

?

thick gull
#

which is 250+

solemn leaf
#

I mean its my index

honest plover
#

Hi how would i go about setting up the api so when someone votes it sends an embed to a channel?

blissful coral
#

I canโ€™t help if you donโ€™t have a error because I donโ€™t see anything wrong atm

thick gull
#

#topgg-api ; but you would receive info with a webhook and then post

blissful coral
#

@honest plover gotta wait to get api key until after approval but ask questions in #topgg-api api

#

Docs are linked in pins

honest plover
#

Ahh is there no way to send an embed when you vote for the support server?

thick gull
#

There are some existing bots to do that

#

you can try searching for a vote listener on the site

honest plover
#

I want it on my bot

#

Is there no way to do that?

thick gull
#

you have to open a port and have the webhook post to that

blissful coral
#

You connect to the api and on the event of a โ€œvoteโ€ you can do vote.user

#

And send a message to a specified channel

solemn leaf
#

I dont think it worked

blissful coral
#

@solemn leaf I canโ€™t see your error so

#

Your silencing it

#

When you do the err.length

solemn leaf
#

?

blissful coral
#

Your not getting a error?

#

Right?

solemn leaf
#

Yeah

blissful coral
#

Hm

ionic dawn
#

it works

#

but I made the works practice ever

#

I created a single server with only one emoji

#

and use guild.emojis.cache.array()

solemn leaf
tight plinth
#

so im trying to make my own embed constructor, but i have an error that i can not explain, any idea why this happens?

#

this.author is set to {} in the constructor

dark kestrel
#

help me

#

css is not applying

solemn leaf
#

I like your website

#

the css isnt aplling to what?

dark kestrel
#

the website

solemn leaf
#

?

dark kestrel
#

no

#

the main /

#

it doesn't have css

solemn leaf
#

I dont know much about websites

#

owo whats this

dark kestrel
#

heroku

open rune
#

@dark kestrel what's wrong with it?

dark kestrel
#

not anymore

#

i made css to internal

#

not external anymore

open rune
#

anyway, it doesn't support mobile

dark kestrel
#

@open rune omg dude

#

there are a mobile mode

calm swan
#

How I made bot online 24/7?

#

๐Ÿค”

dark kestrel
open rune
#

@open rune omg dude
@dark kestrel that's always been developer problem

solemn leaf
#

@calm swan vps

calm swan
dark kestrel
calm swan
#

Tysm for tell meh

calm swan
#

Ooo, Tysm

open rune
#

@dark kestrel it is same... just resized, and doesn't fit with mobile

dark kestrel
#

im done

#

wait imma cehck on my phone

earnest phoenix
#

you cant make css internal lol

#

css and html is always going to be exposed

#

anyways

dark kestrel
#
<style>
</style>

earnest phoenix
#

make your font sizes responsive

dark kestrel
#

@earnest phoenix cuz my css doesn't reload

earnest phoenix
dark kestrel
#

huh

earnest phoenix
#

also yes that's inlined css it's accessible through html lol

open rune
#

that's ok but..

thick gull
#

looks fine on my end

earnest phoenix
#

you can't hide css and html

#

also it looks fine cause your phone displays are large enough of a resolution

cinder sandal
#

how make bot online 69/420?

earnest phoenix
#

go troll somewhere else you're not funny

dark kestrel
#

now i know how to get more unique visitors

#

:))

thick gull
#

you have a typo

dark kestrel
#

yey the nav bar is back

thick gull
#

where you said

#

powerful

solemn leaf
#

@dark kestrel You should photoshop the images

slender thistle
#

Hey cry wanna abusively OBFUSCATE some HTML? ๐Ÿ˜ก

dark kestrel
#

@solemn leaf ik

#

but nvm

open rune
#

@dark kestrel how about this?

#

is it good-looking right?

dark kestrel
#

uh how did u do that

thick gull
#

inspect element

solemn leaf
#

lol

open rune
#

it's default style for mobile

dark kestrel
#

yes ik

open rune
#

for sample

thick gull
#

โœจinspect element โœจ

open rune
#

I am using paint to edit it

thick gull
#

the magic

#

oh

#

ok

open rune
#

inspect element just wasting time

dark kestrel
#

dont tell me that u use <br>

#

<br> is not good

open rune
#

no

#

in css use @nimble skya

#

wtf

earnest phoenix
#

it isnt a waste of time if you know how to actually work with html/css and not just randomly slap properties hoping it works

open rune
#

I mentioned someone?

dark kestrel
#

nah im done with css

open rune
#

it isnt a waste of time if you know how to actually work with html/css and not just randomly slap properties hoping it works
@earnest phoenix nah, paint is just faster for me xd

dark kestrel
#

css make my brain explode

open rune
#

I am a kind of slow typer

earnest phoenix
#

use a flexbox for alignment, it's super good and works out of the box with all screen sizes

dark kestrel
#

@earnest phoenix but good design right ?

earnest phoenix
#

it's ok

#

the color palette is really nice

open rune
#

yes, so far your website is good, just need some touch like parallax xd

dark kestrel
#

it is color from my bot pfp

#

@open rune now come the hardest part

#

dashboard

#

:((

blissful coral
#

Fuckin dashboards

#

Annoying

solemn leaf
#

poor you lol

blissful coral
#

๐Ÿ’ฉ

open rune
#

@dark kestrel and one more thing, use webp and ... I forgt it

#

webp and ...

#

ahh..

tired panther
#

when should u start to make sharding and how long does it take?

dark kestrel
#

i have to connect my bot database with website database

#

and bla bla

open rune
#

when should u start to make sharding and how long does it take?
@tired panther when u reach 2000 server

solemn leaf
#

no

#

500 server

dark kestrel
#

that why i need a whiteboard

#

to write the methods

solemn leaf
#

2000 is a little late

tired panther
#

no
@solemn leaf Already more then 500 xD

#

How long does it take?

dark kestrel
#

@tired panther 1ms

solemn leaf
#

wdym

dark kestrel
#

or 2h of code and reading docs

earnest phoenix
#

1500 is recommended to start sharding, you have to shard at 2500 otherwise you can't login

tired panther
#

to add sharding

#

edit code

#

....

earnest phoenix
#

that's a dumb question

solemn leaf
#

Lol bot gets into 2000 servers in one hour

dark kestrel
#

it is like:
how long it take to start my bot

tired panther
#

yes I am dumb, ur right

solemn leaf
#

well shit

tired panther
#

Lol bot gets into 2000 servers in one hour
@solemn leaf how?

earnest phoenix
#

it's like asking a mechanic "how long will it take me to fix my car by myself"

#

i dont fucking know, it's your code and your skills

tired panther
#

not so long

solemn leaf
#

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

tired panther
#

Is it ur bot? @solemn leaf

earnest phoenix
#

also i didnt say you were dumb dont degrade yourself lol

solemn leaf
#

?

tired panther
#

are u the owner of it

dark kestrel
#

that was dumb

solemn leaf
#

of what

dark kestrel
#

akinator

solemn leaf
#

-bots @solemn leaf

gilded plankBOT
dark kestrel
#

maybe

tired panther
#

of the bot?

dark kestrel
#

@tired panther dude ur weird

tired panther
#

okay xD

dark kestrel
#

asking question that nobody can't answer or understand

solemn leaf
#

Owner of what im confused

tired panther
#

of the discord bot

#

xD

dark kestrel
#

smh

solemn leaf
#

what discord bot?

tired panther
#

Which reachen in 1 hour 2000 guilds

solemn leaf
#

no that was fucking joke

blissful coral
#

Bruh

dark kestrel
tired panther
#

Where can u see the stat?

dark kestrel
open rune
#

@tired panther you can also get your analytic graph at edit bot page > analytics tab

tired panther
#

thx . Just wanted to know from MR.VAlder because he had a another look.

mild flower
#

i cant figure out a way to set the avatarURL in the title

tired panther
#

new edit look

#

@mild flower that is not allowed to copy a bot

mild flower
#

?

#

im not copying

cosmic forum
#

dashboard
@dark kestrel need help?

tired panther
#

and the name mee6 is copy right protected

mild flower
#

i just gave an example

tired panther
#

probably

dark kestrel
#

@cosmic forum how u make it

mild flower
#

that is the real mee6

dark kestrel
#

dashboard

mild flower
#

๐Ÿคฆ

dark kestrel
#

tell me the idea

#

pls

solemn leaf
#

@tired panther copyright is free

tired panther
#

@mild flower then it would be verified

mild flower
#

that is the real mee6 i took a screenshot of and gave yo you as an example

#

bruh

tired panther
#

@tired panther copyright is free
@solemn leaf wdum? free to apply?

mild flower
#

itS the mee6 webhook

#

bruh

#

can you help me instead of accusing me of things im not doing

cosmic forum
#

@cosmic forum how u make it
@dark kestrel Is your website pure HTML, CSS, and JS?

solemn leaf
#

I mean CopyRight works by protecting your work

dark kestrel
#

@cosmic forum yes bro

blissful coral
#

@mild flower .setAuthor(โ€œtextโ€, โ€œimage link โ€œ)

cosmic forum
#

@cosmic forum yes bro
@dark kestrel Ok, is your bot using nodejs?

dark kestrel
#

ye

cosmic forum
#

Ok, then you can move your site over to where your bot is hosted, and render the html page using express and ejs

dark kestrel
#

no

#

i mean the dashboard idea

mild flower
#

bruh

dark kestrel
#

not the way to host the wbesite

crimson vapor
#

you want to host a site in the same process as your bot?

mild flower
#

how am i supposed to get the link

#

of the person i warn

dark kestrel
#

i already have the websote

mild flower
#

can i do ${user.avatarURL}?

cosmic forum
#

Yeah, in order for the dashboard to work, you need to have it connected to your bot

crimson vapor
#

that seems inefficient and prone to people getting information they arent supposed to

mild flower
#

something like that

dark kestrel
#

Yeah, in order for the dashboard to work, you need to have it connected to your bot
@cosmic forum THE problem is HOW

#

what is ur idea

cosmic forum
#

Give me a sec

crimson vapor
#

I would use an api on the bot so you don't have to deal with any security breaches

open rune
#

use json dw

blissful coral
#

@mild flower <user>.displayAvatarURL({dynamic:true})

open rune
#

or connect it directly to webhost

crimson vapor
#

like GET /db/id and gives your db data

tired panther
#

@dark kestrel did u make the look urself? looks nice

dark kestrel
#

ye

cosmic forum
dark kestrel
#

smh

cosmic forum
#

You can set up something like that

dark kestrel
#

dude im not that stupid

tired panther
#

xD

dark kestrel
#

look my website

cosmic forum
#

Ok, and then to render the page

dark kestrel
#

look my website

open rune
#

I am watching

dark kestrel
#

not u