#development

1 messages · Page 1302 of 1

open rune
#

xd

cosmic forum
#
const http = require('http');
var express = require('express');
var app = express();
const server = http.createServer(app);

app.use(express.static(__dirname + '/'));
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
app.set('views', __dirname);

app.get('/', function(req, res) {
    res.render('public/index.html');
});

server.listen(3000);
dark kestrel
#

OMG DUDE

cosmic forum
#

You can use it to render the page where your bot is hosted

dark kestrel
open rune
#

why don't u add socket @cosmic forum

dark kestrel
#

dude i already have it

cosmic forum
#

Ok

#

Then to add the dashboard feature

tired panther
#

Heroku?

#

Hobby or profi dyno?

dark kestrel
#

im am asking you, what is your idea ?

#

about Dashboard

#

How u can gonna connect the bot

tired panther
#

use the same db?

cosmic forum
#
app.use(express.urlencoded());
app.use(express.json());

app.post('/purge', function(request, response) {
    const purgechannel = bot.channels.cache.get(`${request.body.purgechannel}`);
    const purgenumber = request.body.purgenumber;
    const logchannel = bot.channels.cache.get('727578852544610401');

    purgechannel.bulkDelete(purgenumber).catch(error => logchannel.send(`Couldn't purge messages because of: ${error}`));

    response.render('public/commands.html');
});
dark kestrel
#

im done

open rune
#

why no json ;-;

dark kestrel
#

im leaving

#

BYE

tired panther
#

or run ur code on the bot code

cosmic forum
#

Example for a purge dashboard command

#

Make a form and set the action to /purge for it

mild flower
#

@blissful coral TypeError: user.displayAvatarURL is not a function

dark kestrel
#

@open rune dude im crying

mild flower
#

.setAuthor(`test`, wuser.displayAvatarURL({dynamic:true}))
this is the code

dark kestrel
#

he don't listen to me

open rune
#

msg.author.displayAvatarUrl()

#

xd

mild flower
#

bruh

cosmic forum
#

he don't listen to me
@dark kestrel sigh, what?

mild flower
#

.setAuthor(`test`, wuser.displayAvatarURL({dynamic:true}))

dark kestrel
#

@cosmic forum i just ask the idea

blissful coral
#

What is wuser??

dark kestrel
#

not code

mild flower
#

nvm that

#

let wuser = message.mentions.members.first();

blissful coral
#

Well displayAvatarURL needs to pull from a user

#

wuser is a guild member

dark kestrel
#

btw u can run express and ur bot together ?

blissful coral
#

So do wuser.user

dark kestrel
#

in a same node process

lucid prawn
#

its code

open rune
#

note for discord.js v12 use cache message.mentions.members.cache.first()

tired panther
#

in a same node process
@dark kestrel Another Idea:
Maybe make a Interval in which fetch. If the site is requesting something. The request will be sent in db and then fetch by your bot code and processed

dark kestrel
#

thx but i already thinnk about that

mild flower
#

k worked thanks

open rune
#

xd

lucid prawn
tardy hornet
#
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]) {
 message.channel.send("what you want the prize to be?")
} else {
 message.channel.send(giveaway2).then(msg => reactEmojies(msg, [':tada:']))
}
    
  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:')
  
break;

not working

tired panther
#

What is not working?

hazy sparrow
#

You are defining giveaway2 after you are sending it

open rune
#

@lucid prawn I guess client.once("reconnecting") doesn't exist

dire obsidian
#

Is php that bad?

open rune
#

yes

#

I am migrated

drifting wedge
#

java.lang.UnsupportedClassVersionError: lavalink/server/info/AppInfo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 i get this error when i try runnig lavalink?

open rune
#

to golang

lucid prawn
#

@open rune not getting a error

drifting wedge
#

anyone can explain?

open rune
#

@lucid prawn oh ok, idk... it's just didn't work on me

lucid prawn
#

ok

tired panther
#

Node.js ❤️ this works every time!

compact echo
vernal rivet
#

Your runtimes are different @drifting wedge

drifting wedge
#

Your runtimes are different @drifting wedge
@vernal rivet wdym?

#

like one is one version tehe other is another?

#

im deleting java

#

and reinstalling it

vernal rivet
#

Not needed

#

What idk are you using?

dark kestrel
#

OMG guys

#

i know how to make a webdashboard

vernal rivet
#

Jdk

dark kestrel
#

using 2 express servers

tardy hornet
#

You are defining giveaway2 after you are sending it
@hazy sparrow now its giving me errors if im not typing !giveaway and not something after the prize

vernal rivet
#

Do you know what scopes are doctor?

tardy hornet
#

no

vernal rivet
#

I highly recommend you learn what they are.

mild flower
#

hey do i get this hd avatarurl

compact echo
#

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

mild flower
#

yes

#

but notice the difference between those two

#

the second one is lower resolution

earnest phoenix
#

set the image as a png or something

open rune
#

yes @mild flower

mild flower
#

???

open rune
#

it's different

earnest phoenix
#

set the image as a png or something
@mild flower

mild flower
#

uh

earnest phoenix
#

<GuildMember>.user.displayAvatarURL( { dynamic: true } ) @mild flower
this would just make it a gif if they have an animated pfp

mild flower
#

i need to download the image to send it as a png right?

earnest phoenix
#

No

mild flower
#

?

#

then?

earnest phoenix
#

<GuildMember>.user.displayAvatarURL( { format: 'png' } )

mild flower
#

ah thanks

#

a lot

mild flower
#

one more thing

#

.createdAt gives me the time and the local timezone

#

how do i get rid of that

earnest phoenix
#

format it

mild flower
#

i would if i knew how

earnest phoenix
#

and it displays local time for everyone

#

it changes per client to match each users time

mild flower
#

ah ok

soft sedge
#

Anyone here good with nginx as my website isn’t getting the css/js files and I’m getting 404 error.

drifting wedge
#

what java version does lavalink work with?

earnest phoenix
#

Anyone here good with nginx as my website isn’t getting the css/js files and I’m getting 404 error.
@soft sedge please just asm the question instead of someone experienced with nginx to come

we're not gods here

soft sedge
#

@soft sedge please just asm the question instead of someone experienced with nginx to come

we’re not gods here
@earnest phoenix well my index won’t load css/js files and when I go to the file on the website it’s a 404 error.

earnest phoenix
#

Can you hastebin the code?

solemn leaf
#

My vsc broken

#

it doesnt show my rich presence anymore

drifting wedge
#

what version do i use lavalink in? like java version?

tranquil tinsel
#

How to make bot please tell me

drifting wedge
#

wuts the tag?

#

ummmm

#

-bot

slender thistle
#

You can't use tags or faq command

#

-faq 3 @tranquil tinsel

gilded plankBOT
#

@tranquil tinsel

Frequently Asked Questions 📜
drifting wedge
#

@slender thistle wut version of java do i use for lavalink?

slender thistle
#

Some supported one

drifting wedge
#

wow, i thought i needed a unsuported one

#

ive been trying for a ton of time lol

#

just wut java sdk version?

blissful coral
#

If he knew he would tell you

#

Look it up

hard kettle
#

java 13

#

just looked it up

vernal rivet
#

java 11 is standard, java 14 is current

slate oyster
#

I don't really like saving code that has errors, it's a pet peeve of mine, but I want to refactor my rewrite some, so it's a necessary evil

drifting wedge
#

do i need java re to use jsdk?

stable eagle
#

Is there a way to make a setTimeout function, not end/clear itself when your bot is restarting?

vernal rivet
#

no you don't need JRE, you should only need JDK. Java sdk is JDK

sterile lantern
#

hey guys

#

is there a list of swear words

#

i sworn i saw a list before

#

in the following format

earnest phoenix
#

how many people can a bot dm before getting ratelimited

sterile lantern
#

"hi", "bye", "etc"

slate oyster
#

@stable eagle You would have to store the end timestamp in your DB, and then, when your bot starts up, look through tasks with an associated time stamp
You won't be able to save the actual function to DB, so you will need a way to load those back up

sterile lantern
#

where the words hi bye etc are cuss words

vernal rivet
#

in a array?

sterile lantern
#

yes

vernal rivet
#

you can probably find it online

sterile lantern
#

hmm lemme try again

#

oop found it thanks

vernal rivet
#

np

solemn leaf
#

Can I get help on my top.gg page

vernal rivet
#

wrong place to go to. and your bot isn't approved yet. so you will need to wait till it is approved

solemn leaf
#

No

#

The html code

#

I'm bad with html

vernal rivet
#

shrug why didn't you say that in the first place. but still wrong place technically, this is more for bot development.

solemn leaf
#

I mean

drifting wedge
#

in the PATH do i add java/bin or just java?

solemn leaf
#

I kinda just finished my bot

vernal rivet
#

should be java/bin

solemn latch
#

You can ask html questions here

solemn leaf
#

And don't think I don't see people getting help for twitch and other stuff ehre

drifting wedge
#

thanku

solemn latch
#

Mods point people here 🤷‍♂️

vernal rivet
#

fair

solemn leaf
#

What all can we do with the html

#

can we change the background or is there limits

solemn latch
#

Mostly anything you want

#

No preventing ads

vernal rivet
#

isn't there a markdown function?

solemn latch
#

No nsfw

#

Yeah markdowns allowed

solemn leaf
#

I don't wanna do markdown

solemn latch
#

No overly flashy stuff

vernal rivet
#

yea

solemn leaf
#

I have common sense

vernal rivet
#

wheres w3school so i can throw that in here

solemn latch
#

Yeah, you'd be surprised the number of people who don't have common sense here

#

Lmao

solemn leaf
#

I mean thats not really helpful

vernal rivet
solemn leaf
#

wait

#

can we insert images and videos

slate oyster
#

Software Architecture is hard :/

vernal rivet
#

yes

drifting wedge
#

java.lang.UnsupportedClassVersionError: lavalink/server/info/AppInfo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 I added java 13 to path

#

WHY!!!!!!!!! like whyyyyy is this happening

solemn latch
#

Yeah @solemn leaf

solemn leaf
#

OWO

solemn latch
#

You can even iframe if you want

#

Pretty much unlimited power

solemn leaf
#

Can I change the background of the website

#

and leave the box

vernal rivet
#

whats an iframe milk_think

solemn latch
#

Yeah

pale vessel
#

inline frame

vernal rivet
#

I guess you do need JRE

solemn latch
#

Let's you put your webpage or javascript in page.

vernal rivet
#

that is probably going to be a question that someone might have

solemn leaf
#

How can I change the background

vernal rivet
#

inline css

misty sigil
#

no

#

just css

solemn latch
#

Sideline css ;p

vernal rivet
#

i mean either one works dogekek

#

the beauty of html and its relationship with css

solemn leaf
#

so

#

examples bcs I dont know css

vernal rivet
#

nomnomnom best answer to that question

solemn leaf
#

No it isnt

misty sigil
#

yes it is

#

r e a d

solemn leaf
#

I dont know how to get css in html

vernal rivet
misty sigil
#

<style> tags

vernal rivet
#

all are answers to that question

solemn leaf
#

So I have this right

#

body {
background-color: lightblue;
}

vernal rivet
#

ok

open rune
#

yes

misty sigil
#

seems valid so far

#

yes

solemn leaf
#

<style>
body {
background-color: lightblue;
}
</style>

misty sigil
#

yes

vernal rivet
#

mhm

#

that simple

sudden geyser
#

Are intents required now

misty sigil
#

uhh

sudden geyser
#

or is there still some time

misty sigil
#

idk

pale vessel
#

it is required

#

since api v8

vernal rivet
#

o,o we are api v8 now

solemn leaf
#

its loading forever

vernal rivet
#

what is?

sterile lantern
#

wait so

#

currently i have a swear list

#

but it deleted the word pass

#

since the word is there

#

how can i make it so

#

its just that word

#

like say hi is the badword

#

it deletes hia!

#

?

solemn leaf
#

How can I replace this stuff

open rune
#

wait...

misty sigil
#

pog linesplits

#

ngl

sterile lantern
#

huh

sonic lodge
#

are you using regex

solemn leaf
sterile lantern
#
client.on('message', message => {
  if(config.FILTER_LIST.some(word => message.content.toLowerCase().includes(word))){```
#

this is what i have rn

vernal rivet
#

^^^^^

sonic lodge
#

you need to do a whole word search instead

sterile lantern
#

wut

#

what i fi just do

vernal rivet
#

if you want to make it where it is the only the word, then you just check if the content is exactly equals to that word, instead of checking if it contains the word

sterile lantern
#

message.content === word

#

or smth

remote shuttle
#

i jack off to the bots

sonic lodge
#

someone can type "[curse]." (with a period) and it doesn't pass your filter

sterile lantern
#

how would i put that i kinda forgot lel

#

it does

#

it deletes pass

open rune
#

<message>.replace('<replace>', ' ') like this?

sonic lodge
#

turn each of your words in your filter list into regexes that look like \bcurse\b, \banothercurse\b, etc.

#

test the message content against those regexes instead

sterile lantern
#

i have like 400 words

#

eek

#

is there no

#

api

#

that has all the swear words

misty sigil
#

do it automatically

vernal rivet
#

^^

sonic lodge
#

or you could make the regexes inside of .some

mild vortex
#

Ok i need some help

#

i want to Mention the user who used the command, i searched online and i only found how to display their nickname but i want to mention.

remote shuttle
#

i jack off to the bots
@remote shuttle im done

sterile lantern
#

wait i have a regexp.js file

#

if(config.FILTER_LIST.some(word => message.content.toLowerCase().includes(word))){

#

how to reword that

mild vortex
#

Can i have help on that

i want to Mention the user who used the command, i searched online and i only found how to display their nickname but i want to mention.

sterile lantern
#

cant you just use

#

message.reply

pale vessel
#

isn't that member.mention?

remote shuttle
#

console.log ; 'ur all gay'

sterile lantern
#

well thats for .js

#

idk py

sonic lodge
#

if(config.FILTER_LIST.some(word => new RegExp(create_a_regex_for_the_word).test(message.content.toLowerCase()))){

mild vortex
#

I wanted py.

#

for py library

sterile lantern
#

wait whats a regex for the word

#

what do i put in the ()

pale vessel
solemn leaf
#

is there a way to scale an image to fit the webpage

pale vessel
#

it is <member/user>.mention

sonic lodge
#

the regex is just the word, surrounded by \b

mild vortex
#

@pale vessel is that for py lib?

sterile lantern
#

yeah i have that

#

in a regexp.js

#

file

#

so would that line above work

mild vortex
#

ok

#

thanks a lot!

pale vessel
#

all g

solemn leaf
#

is there a way to scale an image to fit the webpage

slender thistle
#

i want to Mention the user who used the command, i searched online and i only found how to display their nickname but i want to mention.
@mild vortex ctx.author.mention

#

Or message.author.mention

#

Whichever you are using.

mild vortex
#

oh thanks a lot! i'll try that!

solemn leaf
#

is there a way

#

to

#

scale

#

a

#

image

misty sigil
#

please just ask normally

solemn leaf
#

is there a way to scale an image to fit the webpage?

misty sigil
slender thistle
#

You don't have to send
a single message
per word
to ask your question
like a mature person.

sterile lantern
#

if(config.FILTER_LIST.some(word => new RegExp(create_a_regex_for_the_word).test(message.content.toLowerCase()))){
@sonic lodge it says it cant find .some

#

some error like that

surreal sage
#

const logChannel = message.guild.channels.find(f => f.name === "logs") doesn't work in d.js v11 anymore. What's the correct way to use it in d.js v12?

sterile lantern
#

i think you need to use cache

#

one sec

pale vessel
#

yes

surreal sage
#

what way do i use it

pale vessel
#

channels.cache.find(), roles.cache.find(), etc.

#

managers

sterile lantern
#
 let logchannel = await message.guild.channels.cache.get(process.env.logchannelid);```
#

thats how i have it

#

oh its just

#

message.guild.channels.cache.get

surreal sage
#

ah

#

i see thanks

pale vessel
#

if you have an id that is

sterile lantern
#
const logChannel = message.guild.channels.cache.find(f => f.name = "logs")```
surreal sage
#

or just find a channel on name cache.find

sterile lantern
#

that should work

surreal sage
#

yeah

#

Ik

#

Thanks

sonic lodge
#

.some is not a function?

winged anchor
#

Hi

surreal sage
#

i hate d.js now, it would be fine if they released v11 but with the gateway support

sterile lantern
#

oop

#

thats the error i mean

solemn latch
#

V12 is better than v11

#

Even without the gateway stuff

sonic lodge
#

you changed something in your code that caused config.FILTER_LIST to become undefined

solemn latch
#

More consistent

pale vessel
#

indeed

sterile lantern
#

well the repexg.js

#

regexp.js*

#

doesnt have FILTER_LIST

#

thats why

#

but idk how to find it

#

never used regexp

sonic lodge
#

i'm confused

#

what's your file structure and why do you have a regexp.js file

sterile lantern
#

/\b(4r5e|5h1t|5hit|

#

i have that so

#

it doesnt delete

#

"pass"

#

wait

#

so

#
var badwordsObject = require('badwords/object');```
#

i have a package now

#

but how would i make it delete

#

the words listed in that repo

sonic lodge
#

apparently that package comes with a regular expression, so use it

pale vessel
#

that looks so slow does it not

sterile lantern
#

so if i use the regexp

#

how would i implement it

#

into client on ready

#

in index.js

sonic lodge
#

<RegExp>.test(string)

pale vessel
#

like require('badwords/regexp').test(string)?

sterile lantern
#

just that?

pale vessel
#

that's about it

sterile lantern
#

var badwordsRegExp = require('badwords/regexp');
client.on('message', message => {
require('badwordsRegExp').test(string)
console.log(message.content)
message.delete()
})

#

idk

#

i dont think thatd work

livid lichen
#
    if (msg.content === "e") {
      msg.reply("E");
      if (msg.content === "what is my avatar");
      {
        msg.reply(msg.author.displayAvatarURL());
      }
      if (msg.content === "hello");
      {
        msg.reply("Hi!");
      }
    }
    if (msg.content === "hi");
    {
      msg.reply("Hello!");
  }
}); ``` My bot worked but too well. It spammed saying @ USERNAME_EXAMPLE, Hello! when no one said anything. Anyone know how to fix?
sterile lantern
#

maybe add

#

await

#

await msg.reply("hello!");

livid lichen
#

Ohhhh

sterile lantern
#

thats probably not the issue tho

sonic lodge
#

you're requiring it again

livid lichen
#

Thanks, I will try that.

#

?

sonic lodge
#
var badwordsRegExp = require('badwords/regexp');
client.on('message', message => {
require('badwordsRegExp').test(string) // <--
#

you already have the regex, badwordsRegExp

sterile lantern
#

so the first and second line are fine

#

but what do i write in the third line

sonic lodge
#

dont require() it
badwordsRegExp.test(string)

sterile lantern
#

will it delete

#

if its

#

a bad word

#

?

livid lichen
#

Didn't work :(

sterile lantern
#

are you hosting the bot on multiple instances

livid lichen
#

I onlu have it on one server for testing.

sterile lantern
#

i have message.delete

sonic lodge
#

it returns true if the string was matched by the regex

sterile lantern
#

no i mean

#

should i make it string.delte

sonic lodge
#

if it's true, just run your message deletion logic

sterile lantern
#

delete*

livid lichen
#

wait wjhat

sterile lantern
#

are you hosting it on multiple servers

#

try restarting your bot

livid lichen
#

I did node .

sonic lodge
#

string is just the message content

livid lichen
#

but It didn't work

#

I mean

#

it restarted the bot but things still didn't work

sterile lantern
#

it gives me an error, string is not defined @sonic lodge

sonic lodge
#

string is a placeholder for the message content

#

you need to replace it with whatever the message content is

sterile lantern
#

"whatever the message content is" wdym

#

the curse words?

sonic lodge
#

the content of the message

#

message.content

sterile lantern
#

message.content

#

o

livid lichen
#

Anyone know what ; means?

solemn latch
#

End

sterile lantern
#
client.on('message', message => {
badwordsRegExp.test(message.content)
    console.log(message.content)
    message.delete()```
#

would that work

livid lichen
#

Well that makes sense

sterile lantern
#

but eh i need to make it so it finds if its true

#

for the msg to delete

#

if message.content === true

#

?

#

i dont think thatd work

#

maybe 'test'

#

¯_(ツ)_/¯

sonic lodge
#

check if badwordsRegExp.test(message.content) returned true

#

if so, delete the message

sterile lantern
#

return if true then

#

?

solemn leaf
#

How can I scale css background images

sterile lantern
#

that makes no sense doe

solemn latch
#

What doesn't make sense 🤔

#

If statements?

sterile lantern
#

"return if true then"

#

that wouldnt work

solemn leaf
#

you stupid?

sonic lodge
#

i did not say "return if true"

solemn latch
#

If(true) message.delete();

#

🤔

sterile lantern
#

o

sonic lodge
#

if (regex_test_returned_true) message.delete();

sterile lantern
#

why does it sya

#

unhandled error

#

one sec

solemn latch
#

Gotta give the whole error

sterile lantern
#

oh thats a different cmd

#

nvm

#

but that didnt solve my problem

#

the regex

#

since it still deletes pass

solemn leaf
#

How can I scale css background images?/

#

this is what I have rn

#
        body {
              background-image: url("https://cdn.discordapp.com/emojis/728961325081952266.png?v=1");
             background-repeat: no-repeat;
      background-position: center;
              background-attachment: fixed;
        }
sterile lantern
#

background-size

#

?

solemn leaf
#

would auto scale it up until it fits the webpage?

sterile lantern
#

There are four different syntaxes you can use with this property: the keyword syntax ("auto", "cover" and "contain"), the one-value syntax (sets the width of the image (height becomes "auto"), the two-value syntax (first value: width of the image, second value: height), and the multiple background syntax (separated with comma)

#

i think u can do auto

#

idk

#

background-size: auto;

solemn leaf
#

How can I remove all these dots

solemn latch
#

Dots?

solemn leaf
#

the things that look like playstation buttons

solemn latch
#

Display: hidden;
On the element id

#

Or something close to that

solemn leaf
#

how

open rune
#

what r u trying to do?

#

list-style: none

#

to remove the dots of li

#
li {
  list-style: none;
}
#

@solemn leaf or try on 'ul' instead of li

solemn leaf
#

would that go in body

pale vessel
#

i think it's nicer with the dots though

solemn leaf
#

I have a image which is lots of black squares that fade

open rune
#

anyway, you can customize the dots

solemn leaf
#

ok cool hiow

open rune
#

ul {
list-style-image: url('image.gif');
}

pale vessel
#

@solemn leaf in the <style> tag or <ul style="here">

open rune
#

yes, if you want to combine the html with css, do with style=""

#
<ul style="list-style-image: url('image.gif')">
  <li>something here</li>
</ul>
solemn leaf
#
<style>
        ul {
            list-style-image: url('image.gif');
        }

        body {
            background-image: url("https://cdn.discordapp.com/emojis/728961325081952266.png?v=1");
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }
    </style>
open rune
#

u wanna fulfill the image into the body? Thonk

solemn leaf
#

?

open rune
#

background-size: contain;

solemn leaf
#

I was testing

open rune
#

hopefully the image doesn't cause seizure

#

oh

#

testing, ok...

solemn leaf
#

didnt work

open rune
#

try on li

solemn leaf
#

hmm

open rune
#

tf that's image is too big

solemn leaf
#

wdym

#

im testing with it

open rune
#

Oh, ok that's good so far

#

but...

#

think I know it...

solemn leaf
#

the dots are still there

open rune
#

the dots are still there
@solemn leaf where?? ur image display no dots

solemn leaf
#

YOU FUCKING BLIDN

open rune
#

tf that dotsssss

solemn leaf
#

the playstation buttons

open rune
#

hold a sec... u r trying to remove that dots. that seems funny

valid frigate
#

that is a weird thing to put on the website

solemn leaf
#

yeah

#

I dont wanna them

valid frigate
#

set .shapes-background .shapes-1 to display: none !important

pale vessel
#

!important troll

valid frigate
#

honestly it doesnt fit in with the site and ugly

#

smart to remove it

solemn leaf
#

^^

valid frigate
#

puking

open rune
#

isn't it an image?

sterile lantern
#

is there something wrong with this

#

const channel = member.guild.channels.cache.find("name", "discussion");

valid frigate
#

no

#

yes

#

find is a function isnt it

sterile lantern
#

yea

valid frigate
#

so

solemn leaf
#

So where

#

would I put that

valid frigate
#

??

solemn leaf
#

display: none

valid frigate
#

add an inline style in the bot description

solemn leaf
#

<p>
display: none;
</p>

open rune
#

Aki, first I need to know if that you're trying to remove is an image or not?

#

because, you can't remove image with only list-style: none;

sterile lantern
#

i forgot

solemn leaf
#

wdym

sterile lantern
#

isnt it like

#

icon

sudden geyser
#

thumbnail

solemn leaf
#

oml

#

samm

#

why you a bot dev

sterile lantern
#

ah i see

#

idk tbh

#

i forgot everything

#

last bot i coded was a whole year ago

#

lel

solemn latch
#

if you have an approved bot you get the role

#

you can get the role even if you have no programming experience really.

earnest phoenix
#

😭

solemn leaf
#

+I mena you can just steal a bots code

open rune
#

aki, in your image try style='position:absolute; z-index: 1000 !important'

solemn latch
#

or just use a bot creation software

solemn leaf
#

true LOL

#

@open rune wdym

earnest phoenix
#

@solemn latch im still in the same predicament as last time

onyx hare
#

Or tutorialsaeyes

earnest phoenix
#

😭

#

.

solemn leaf
#
<head>
    <style>
        body {
            background-image: url("https://cdn.discordapp.com/emojis/728961325081952266.png?v=1");
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }
    </style>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="master.css">
    <title>Not-Chan</title>
</head>

I mean tutorials count

solemn latch
#

ngl i forget last time already @earnest phoenix

onyx hare
#

It’s how I got where I am rn through tutorials I mean it was a B***h to do when I first got into it I slowly got a small understanding

earnest phoenix
#

F

solemn leaf
#

@open rune ?

earnest phoenix
#

trying to get sql stuff

solemn latch
#

ah

earnest phoenix
#

trying to get the check working

leaden lake
#

I got a problem. How to filter out DMs and bot messages ? because I want to DM a guy if his status is offline (when he send a guild message) but I got this error :Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\Shaal0wFR\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 333, in _run_event await coro(*args, **kwargs) File "C:\Users\Shaal0wFR\Desktop\Bot Discord\test on Atom.py", line 42, in on_message statut = user.status AttributeError: 'ClientUser' object has no attribute 'status'
my code is this one : https://mystb.in/MatchedCambridgeKeyword.python

open rune
#

@solemn leaf try not to use body

solemn latch
karmic compass
#

how does ```js
thing.function(etc)

#

what is thing, how do you make function, etc.

#

wait

solemn leaf
#

I mean you could use google

karmic compass
#

i mean how do yo uinclude a function in whatever thing is

#

fair

solemn leaf
#

man im so smart

karmic compass
#

idk if googling thing.function(etc) will yield positive results

solemn leaf
#

how do you make function in js

karmic compass
#

no i know that

#

but similar to ```js
client.on()

pale vessel
#

eventemitter?

open rune
#
<html>
<body>
  <div style="position:absolute; z-index:1 !important; width:100%; height:100%; background-size: cover; background-position: center; background-repeat: no-repeat; background-image: url('https://cdn.discordapp.com/emojis/728961325081952266.png?v=1');">
  </div>
</body>
</html>

@solemn leaf

solemn leaf
#

want the link @karmic compass

solemn latch
#

kek

pale vessel
#

that's not what they were asking though

solemn latch
#

i feel like 5 different questions got asked in his two messages

glad charm
#

With the Discord bot update I can't grab from guild.members object right?

pale vessel
#

client extends eventemitter, which is why you can use .on

karmic compass
#

ah,

#

what about other functions such as login?

glad charm
#

Does anyone know if D.js is updated to add intents?

pale vessel
#

yes

solemn latch
#

client is a class iirc

glad charm
#

Is it through the constructor options?

karmic compass
#

oh it's a class?

pale vessel
#

through clientoptions

solemn latch
#

so i think your question is more about classes

karmic compass
#

might be

#

looking at some code rn

solemn leaf
#

@open rune

<html dir="ltr" lang="en">
<head>
<body>
  <div style="position:absolute; z-index:1 !important; background-size: cover; background-position: center; background-repeat: no-repeat; background-image: url('https://cdn.discordapp.com/emojis/728961325081952266.png?v=1');">
  </div>
</body>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="master.css">
    <title>Not-Chan</title>
</head>
karmic compass
#
class whateverIWant {
  this.functionName() = {
      //codez
  }
}
```?
pale vessel
real loom
glad charm
#

@pale vessel which option would it be? Am I blind?

pale vessel
#

client.options.ws.intents

glad charm
#

OH ws

#

Thanks.

quartz kindle
#

from the guide website

open rune
#
<html dir="ltr" lang="en">
<head>>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="master.css">
    <title>Not-Chan</title>
</head>
<body>
  <div style="position:absolute; z-index:1 !important; background-size: cover; background-position: center; background-repeat: no-repeat; background-image: url('https://cdn.discordapp.com/emojis/728961325081952266.png?v=1');">
  </div>
</body>
</html>

@solemn leaf never add <body> inside <head>

solemn leaf
#

oh

open rune
#

it's just human, having <head> <body>

dark kestrel
#
fetch('http://localhost:3000', {
        method: "POST",
        headers: {
            'Content-Type': 'application/json'
            // 'Content-Type': 'application/x-www-form-urlencoded',
        },
        body: {
            "name": "thinh",
            "id": "bla bla"
        }
    })
SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at parse (/home/thinh/Programming/Shinoneko/node_modules/body-parser/lib/types/json.js:89:24)
    at /home/thinh/Programming/Shinoneko/node_modules/body-parser/lib/read.js:121:18
    at invokeCallback (/home/thinh/Programming/Shinoneko/node_modules/raw-body/index.js:224:16)
    at done (/home/thinh/Programming/Shinoneko/node_modules/raw-body/index.js:213:7)
    at IncomingMessage.onEnd (/home/thinh/Programming/Shinoneko/node_modules/raw-body/index.js:273:7)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
#

help meh

solemn leaf
#

I dont think anything changed

pale vessel
#

use JSON.stringify(object) for body

open rune
#

have u add width and height yet?

dark kestrel
#

ok

pale vessel
#

you can't provide a raw object

solemn leaf
#

wdym

pale vessel
#

body accepts a string

dark kestrel
#

it works

#

yey

open rune
#
<div style="position:absolute; z-index:1 !important; width:100%; height:100%; background-size: cover; background-position: center; background-repeat: no-repeat; background-image: url('https://cdn.discordapp.com/emojis/728961325081952266.png?v=1');">
</div>

try add width and height

pale vessel
uncut mirage
#

@solemn leaf How to make the bot description like yours
with all invite and commands info

solemn leaf
#

@open rune so wait
<head>
<body>
<legs>
<footer>

open rune
#

<feet> LMAO
it's <footer>

#

no legs

solemn leaf
#

IMMA COMPLAIN

solemn latch
#

you are missing the head

pale vessel
#

footer should be inside body

open rune
#

no hands, it's disabled human

glad charm
solemn leaf
#

IMMA TALK TOT HE MANAGER OF html

#

grrr

open rune
#

lol

solemn leaf
#

we need legs

open rune
#

we need hands of course

#

xd

solemn latch
#

<html>
<head>
<body>
<arms>
<hands>
<legs>
<ankles>
<feet>
<toes>

open rune
#

@solemn leaf u r just ruining your page lol

solemn leaf
#

lol ik

#

I have a copy of a working verison

open rune
#

imagine that <section> is a breast of html

solemn latch
#

this is the way to teach html

solemn leaf
#

no

#

this isnt removing the squares

glad charm
#

Sorry to bother @pale vessel, do I need to do anything else like in dev portal?

pale vessel
#

if you need to use privileged intents, you have to enable them in developer portal

glad charm
#

I have a bot kinda like luca for one server so I need guild member stuff, I assume this would cover it. (added members)

solemn leaf
#

Im testing my bass speakers

open rune
#

this isnt removing the squares
@solemn leaf if you're forcing html css to remove that square, add margin-top: -50px; inside <div style="">

solemn leaf
#

I think they broken

#

nope

#

ow my ears

pale vessel
#

that's enough i guess

solemn leaf
#

wha

pale vessel
#

your bot doesn't need any whitelisting since it's under 100 servers so you just have to toggle the intent

glad charm
#

Via the client right? Not through dev portal? I do have a 500server bot I need to fix too since it's a role giving bot Dx

pale vessel
#

both actually iirc

sudden geyser
#

@solemn latch you forgot the ears

glad charm
#

I think Discord said dev portal will be updated NEXT week for intent toggles.

solemn latch
#

@sudden geyser its modeled after someone asking for help here, they dont listen anyway

solemn leaf
#

@open rune

#

the more I do what you say

#

the more my page gets fucked

open rune
#

xD

late hill
#

So uhhh one of my bots can't access the api because it exceeded some rate limits.

  message: 'You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discordapp.com/developers/docs/topics/rate-limits to prevent this moving forward.' }```
Is there any way for me to actually know which ratelimit?
solemn leaf
#

@late hill tip

#

dont spam api

#

ez pz

late hill
#

That's not helpful at all

solemn leaf
#

sure it is

#
<html dir="ltr" lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="master.css">
    <title>Not-Chan</title>
</head>
<body>
<div style="margin-top: -50px;">
</div>
</body>
</html>

@open rune

solemn latch
#

you dont get told.
the easiest way is to track what commands are run(so you can see the most running) and look at every api request and command and see what has the most requests

#

reaction menus can use a lot of api requests.

late hill
#

That's incredibly stupid

#

But alright

#

fun times

solemn latch
#

its not on discord to prevent you from hitting the ratelimit, its on you 🤷‍♂️

open rune
#

wtf

late hill
#

Well

solemn leaf
#

idek

solemn latch
#

most libs do what they can to help prevent it

open rune
#

@solemn leaf where are all the style u inserted before?

solemn leaf
#

gone

late hill
#

You can't actually be 100% certain that it is a "me" issue to begin with

solemn leaf
#

I was hungry

solemn latch
#

whatcha mean?

pale vessel
#

is this new?

#

the toggle visibility i mean

solemn latch
#

it came around the time intents got supported iirc

#

oh

#

not sure 🤔

solemn leaf
#

ok

late hill
#

Ah yes, we don't need debugging tools, just make code without bugs

solemn leaf
#

i added back

late hill
#

ok buddy

solemn leaf
pale vessel
#

it used to be toggleable i think

open rune
#

ah, that feels ok @solemn leaf

pale vessel
#

maybe you can't change anything after you get whitelisted

solemn latch
#

you are supposed to make the debugging tools @late hill
pretty standard api stuff

solemn leaf
#

I jUstS mkeh aiufgw809oulodq

solemn latch
#

🤔

solemn leaf
#

want the

#

play station controller buttons

#

out of my life

solemn latch
#

dude stop leaking my password

I jUstS mkeh aiufgw809oulodq

pale vessel
#

vysion gave you the solution

solemn leaf
#

SORRY

late hill
#

I think you missed the point I was trying to make.

#

I was trying to explain that a debugging tool, has no actual use when you make no mistakes.

earnest phoenix
#
ypeError: 'str' object is not callable
connor@Connors-MBP Yandere copy % python3 OwO.py
OwO.py:183: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
  BlacklistedUser_IDs = ("Blacklisted_IDs"("user_id"))
Traceback (most recent call last):
  File "OwO.py", line 183, in <module>
    BlacklistedUser_IDs = ("Blacklisted_IDs"("user_id"))
TypeError: 'str' object is not callable``` 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭 😭
solemn leaf
#

how do I applly what

#

that

late hill
#

Yet you'd still agree that debugging tools are good to have

#

Same thing as discord not replying properly in their errors

#

They don't have to, sure, but it would be very nice if they did.

solemn latch
#

wait discord errors are not replying properly?

late hill
#

They aren't informative*

solemn latch
#

do you mean your libs errors are not informative?

pale vessel
#

discord.js's rateLimit event is nice to have

solemn latch
#

because status codes are all you need to debug web errors mostly

late hill
#

Did you forget the previous topic

solemn leaf
#

@open rune how would I add set .shapes-background .shapes-1 display: none !important

late hill
#

I exceeded a limit

#

It doesn't tell me which

#

It could tell me which

pale vessel
#

you should learn css

late hill
#

It doesn't have to tell me which

#

It would be nice if it did

pale vessel
solemn latch
#

ratelimits are made of multiple requests 🤔

late hill
#

Yes

#

?

open rune
#

@open rune how would I add set .shapes-background .shapes-1 display: none !important
@solemn leaf wait, what?

pale vessel
#

what library are you using? @late hill

solemn latch
#

your first ratelimit can happen on something but be caused by something else

#

which is why its on devs in 99% of api's afaik

late hill
#

Eris

solemn leaf
#

@open rune iuawhd qadajsndwabfjknafhbfa

solemn latch
#

eris is a lib not made by discord

solemn leaf
#

leaked password ^

late hill
#

I know

open rune
#

@solemn leaf hold on, I am making an ultimate remover xDD

late hill
#

Jesus why don't you understand anything I say

solemn latch
#

???

#

what are you saying

solemn leaf
#

oh god

#

guys this is my password

#

••••••••••••••••••••••••••••••

late hill
#

look

#

when i use

#

a literal regular request

pale vessel
#

you should have listened to debug events like rawREST and debug, they could give more information

late hill
#

it replies with the message i posted

#

it's not a library message

open rune
#
<style>
page shapes-1 shapes-background {
  display: none !important;
}
</style>

@solemn leaf put it inside <head> KEKW

pale vessel
#

.shapes-background .shapes-1

late hill
#

the message is a very vague description that's not very helpful to me

#

there's room for improvement there

pale vessel
#

debug.

solemn latch
#

what do you want it to say?

late hill
#

more information about what limits I've exceeded?

pale vessel
#

there are events for that

solemn latch
#

lol...

#

exactly

pale vessel
#

please don't ignore me

late hill
#

how are those events helpful to me right now

pale vessel
#

that's the problem

#

you weren't using them

#

your fault

solemn latch
#

its on you to do things properly

solemn leaf
#
<html dir="ltr" lang="en">
  <head>
    <style>
    page shapes-1 shapes-background .shapes-1 {
      display: none !important;
    }
      </style>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="master.css">
    <title>Not-Chan</title>
</head>
</html>
pale vessel
#

people are ignoring me

late hill
#

That doesn't disregard that it would be helpful if it did reply in a more meaningful way?

solemn latch
#

no it doesnt, but its standard to make devs be responsible for their own problems.

sudden geyser
#

Is it not the developer's responsibility to debug what is causing the error?

tardy hornet
#

@solemn latch , do you mind checking your DMs? \🙏

late hill
#

If you're the one reporting the error

#

It should be very doable to make the error as clear as possible

#

It should totally be your responsibility to have your errors be as meaningful as they could be

#

the fuck are you saying

solemn leaf
#

wdym

solemn latch
#

the error is clear?

#

you sent an api request, you track the response to that request.

sudden geyser
#

The report is you got rate limited. The error is very clear. What you want is what caused the error (aka what you did/API request endpoint which got you rate limited). You debug it through watching the requests.

solemn leaf
#
    page .shapes-background .shapes-1 {
      display: none !important;
    }
pale vessel
solemn latch
#

everything you need was given to you.

open rune
#

it's actually will never works, it refuses style lol

pale vessel
#

it's .page

solemn leaf
#
    .shapes-background .shapes-1 {
      display: none !important;
    }
late hill
#

I've already agreed on that

pale vessel
#

but you can exclude that

#

yes, try that

late hill
#

I'm saying it could include more helpful information

compact oriole
#

it is not that hard people ffs

solemn latch
#

that info was provided, you just didnt listen for it.

open rune
#

well, try fix my mistake....
it's actually .page .shapes-background .shapes-1

#

@solemn leaf

sudden geyser
#

I don't think it can get more clear than that as you have everything else you need to debug it, but we can agree to disagree.

compact oriole
#
.shapes-background {
  display: none !important;
}
#

it is as simple as that

pale vessel
#

do you need !important?

compact oriole
#

not sure

#

but doesn't matter

open rune
#

just make it sure it works at once

solemn leaf
#

lets go

open rune
#

😄

solemn leaf
#

ok

#

now what should I do to make my page look sexy

compact oriole
#

use css

solemn leaf
#

can I remove the dark mode button

pale vessel
#

you should learn css, in fact

solemn leaf
#

and make it always dark mode

pale vessel
#

yes you can

solemn leaf
#

is it allowed

pale vessel
#

yes

#

just don't hide ads or buttons

open rune
#

yes

pale vessel
#

the navbar might stay blue for some users though

solemn leaf
#

actually imma put a lock on it

pale vessel
#

don't

solemn latch
#

i wouldnt do that

pale vessel
#

just make you page dark

#

don't hide the button

solemn leaf
#

no

solemn latch
#

some people have vision issues and cannot see well on dark mode webpages.

solemn leaf
#

so I cant do this

solemn latch
#

probably can, I wouldnt

solemn leaf
#

honestly

#

this is kinda funny

earnest phoenix
#

i know rainbow roles are against tos

#

but how much against tos are they?

solemn leaf
#

I mean

solemn latch
#

100%

solemn leaf
#

its the same amount as all of the tos

#

like disrespecting furries

earnest phoenix
solemn latch
#

api abuse is api abuse Thonk

solemn leaf
#

what if you dont do api abuse

#

and make it follow api rules

pale vessel
#

still can't

solemn leaf
#

every hour it changes the color

#

lmao

pale vessel
#

nope

solemn leaf
#

every decade

pale vessel
#

yes

solemn leaf
#

ez zp

pale vessel
#

since discord would die already

solemn latch
#

f discord.

solemn leaf
#

LOOL

#

every 1hour 30 mins it changes the color value by 1

#

#000001

#

#000002

open rune
#

@solemn leaf is it looks better than before?

solemn leaf
#

wdym

open rune
#

the image

#

r o u n d

solemn leaf
#

yeah I dont like the box

open rune
#

xd

solemn leaf
#

I know how to make it round

#

just not how to change

open rune
#

yes, it's looked more flat

solemn leaf
#

just delete it

open rune
#

like flat-designed web

#

tf xd

solemn leaf
#

ez pz

tardy hornet
solemn leaf
#

bcs its local

tardy hornet
cosmic forum
#

i know rainbow roles are against tos
@earnest phoenix Rainbow roles?

pale vessel
#

i don't think mentions are supported in field names

#

only values

solemn leaf
#

witch

open rune
#

try using message.author.username

#

yes?

solemn leaf
#

how do I delete a node

open rune
#

idk

solemn leaf
#

this one

#

the ugly one

edgy matrix
#

so i have some bots just made with bot making applications because i dont have enough time to learn code. Is there any type of code that can be learnt easily?

harsh blade
#

How do i change my bot's status

earnest phoenix
#

@edgy matrix python

open rune
#

this one
@solemn leaf do you mean the border?

edgy matrix
#

ok

solemn leaf
#

yeah

edgy matrix
#

i know a bit of python

tardy hornet
edgy matrix
#

i could go off that

tardy hornet
#

i want it to mention

#

not to send the name

open rune
#

not the image, but the class bot-img make it !important

pale vessel
solemn leaf
#

so

pale vessel
#

addField("\u200b", content)

open rune
#

@open rune
it send that:
@tardy hornet yes coz that's only for username, you can use message.author.tag

#

so
@solemn leaf I bet you round the <img>

harsh blade
pale vessel
#

read your library's documentation

open rune
#

<style>
.bot-img {
border-radius: 100% important;
}
</style>

tardy hornet
#

@open rune

quartz kindle
#

The way you had it before is the correct way to mention: <@userid>

dark kestrel
#

can i access vps express using his IP ?

quartz kindle
#

If it doesnt mention is because mentions are not supported in the place where youre putting it

dark kestrel
#

like my IP is 34.122.XXX.XX:3000

#

can i access it with a simple express server

pale vessel
#

my ip is 127.X.X.1

solemn latch
#

192.168.1.1

solemn leaf
#

‫ gay ‫you

dark kestrel
#

help

solemn latch
#

i trust you not to ddos me

solemn leaf
#

LMAO

quartz kindle
#

@dark kestrel can you explain better?

solemn leaf
#

‫ just ‫did

dark kestrel
#
module.exports = (client) => {
    const app = new express();

    app.use(bodyParser.urlencoded({ extended: true }));
    app.use(bodyParser.json());
    app.use(bodyParser.raw());

    app.post('/', (req, res) => {
        User.findOne({ username: req.body.username }, (err, user) => {
            if (!user) return res.json({
                "code": "200",
                "status": false
            })
            else if (user) {
                if (user.username != req.body.username) return res.json({
                    "code": "200",
                    "status": false
                })
                else if (user.username == req.body.username) {
                    bcrypt.compare(req.body.password, user.password, function (err, result) {
                        if(result == false) return res.json({
                            "code":"200",
                            "status": false
                        })
                        else if(result == true) return res.json({
                            "code":"200",
                            "status": true,
                            "user": JSON.stringify(user)
                        })
                    });
                }
            }
        })
    })

    app.listen(process.env.PORT || 3000, () => {
        console.log("server is running on port 3000")
    });
}

This code is running on a VPS

#

so i will get IP of that VPS

#

and go to search bar

#

type

#

IP:3000

#

and it is not working

quartz kindle
#

Yes, you can access it, but not with a browser

dark kestrel
#

i can't fetch

quartz kindle
#

Because browser uses GET, and ypur code is using POST

lucid prawn
#

-bots]

solemn latch
#

not here plox

dark kestrel
#
router.post('/login', (req, res, next) => {
    fetch('http://xx.xxx.xxx.xx:3000', {
        method: "POST",
        headers: {
            'Content-Type': 'application/json'
            // 'Content-Type': 'application/x-www-form-urlencoded',
        },
        body: JSON.stringify(req.body)
    })
        .then(result => result.json())
        .then(data => {
            if (data.status == false) return res.send("Wrong username or password");
            else if (data.status == true) {
                return res.render('home', { name: req.body.username })
            }
        })
        .catch(e => console.log(e))
})
solemn latch
dark kestrel
#

this is not working

gilded plankBOT
solemn latch
#

just said not here man

dark kestrel
#

@quartz kindle help

tardy hornet
#

why isnt it mentioning?

pale vessel
#

mentions aren't supported in field names

dark kestrel
#

<@!{message.author.id}>

pale vessel
#

put it inside the value/description

open rune
pale vessel
#

please

#

i should mention people more

open rune
#

@solemn leaf how about this?

#

this child game makes me feel younger

earnest phoenix
#

Hello I need help with something disboard isn't working for me soo I found a link for help

solemn leaf
#

LOL