#development

1 messages ยท Page 1120 of 1

pure lion
#
    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_pass http://127.0.0.1:9000;
        include    nginxconfig.io/proxy.conf;
    }
#

i feel like i did something wrong^^

quartz kindle
#

you dont put them in the same location obviously

pure lion
#

akdjhgsdkhbkjbksakghsidkgh

quartz kindle
#
location / {
  proxu_pass http://localhost:8080;
}
location /peer/ {
  proxy_pass http://localhost:9000;
}
#

like this, every request for /peer/whatever you receive, will be sent to port 9000

pure lion
#

am i supposed to do something else for it to listen?

#

just went to /peer

#

nothing was logged

quartz kindle
#

now if you add the /peer path as an option

#

in your peerjs configuration

pure lion
#

o h

quartz kindle
#

it should generate a /peer/unique-id-here url

pure lion
#

u h

opaque seal
#

Can I add a try catch to this event.bind so that I don't have to put it in every event file?
else client.on(name, event.bind(null, client));

pure lion
#

oh no

#

im back to the mime typing error

#

even though i already have the static folder set up

#

timWatDo?

#

its looking for ale-bot.xyz/peer/script.js

quartz kindle
#

@opaque seal the only way would be something like this ```js
client.on(name, async (...args) => {
try {
await event(...args)
} catch(e) {
// do something
}
});

pure lion
#

im so confused and tired

#

aaa

quartz kindle
#

make a peer folder and put script.js in it

pure lion
#

o

#

in public

quartz kindle
#

yes

#

although it wont work if the file is being served by pot 8080

pure lion
#

oh hey guess what

#

ssl error

#

eyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

#

although it wont work if the file is being served by pot 8080
thats my node app tho-

quartz kindle
#

you have 2 node apps

#

8080 and 9000

#

or is it the same node app, just 2 ports?

pure lion
#

yes

#

when i do node server.js it starts both servers

quartz kindle
#

check this

pure lion
#

Can I listen on more than one port at once?

misty sigil
#

yea

quartz kindle
#

not the same port

misty sigil
#

not on the same app no

pure lion
#

Yeah I saw or

#

So I'm cumfused

#

Do I need to make a separate app?

faint prism
#

@earnest phoenix tysm for that suggestion. The whole private channel for links, and linking in a command that returns an embed with the link looks great!

summer torrent
#

how can I rotate specific image with canvas

earnest phoenix
#

might help

summer torrent
#

lemme fix that LUL

earnest phoenix
#

nice lool

wanton mauve
#

uhhh so question

#

what website/etc do yall recommend for creating a bot?

honest perch
#

Vs code

dire obsidian
#

Website? Why?

wanton mauve
#

i wanna attempt to make a bot ๐Ÿ‘‰ ๐Ÿ‘ˆ

honest perch
#

Then learn a language

dire obsidian
#

Yes

wanton mauve
#

huh-

#

what do you mean uhoh

honest perch
#

Do you know what programming is?

dire obsidian
#

Dont make like me, i make a bot in a program but now im coding the bot

#

Is funny

wanton mauve
#

no not really

#

im new to all of this

honest perch
#

You need to learn a programming language

wanton mauve
#

link please ._.

dire obsidian
#

Try java script

wanton mauve
#

mk

honest perch
#

JavaScript is a beginner friendly one

dire obsidian
#

look some tutorial and then look discord.js

wanton mauve
#

oh

honest perch
#

Just google learn javascript

wanton mauve
#

okay

dire obsidian
#

Poor guy, i recomed all world patience

#

First months are the worst

wanton mauve
#

owo

dire obsidian
#

Meh, also im new coding bots

#

But no copy code, use as examples but never copy

#

Just make you more dumb

#

Also dont use programs

wanton mauve
#

lol

dire obsidian
#

And websites...

wanton mauve
#

ee

dire obsidian
#

Like botghost etc

#

But yes

#

Ill recomend you all luck of the world

#

๐Ÿ‘

wanton mauve
#

i tried botghost once and i just kinda sat there wondering what to do

#

lmfao you to! ^^

dire obsidian
#

:)

wanton mauve
#

do you like k-pop?

dire obsidian
#

Korean pop?

wanton mauve
#

yea!

vernal basin
#

how do I check my discord.js version?

wanton mauve
#

idk

dire obsidian
#

Well i dont hear but i cant say is bad

#

how do I check my discord.js version?
@vernal basin check package.json

#

Then search discord.js

wanton mauve
#

so you never listened to it?

dire obsidian
#

Well yes

vernal basin
#

okay so my hunch was right

#

I'm somehow still on v11

wanton mauve
#

oh

vernal basin
#

and no matter how many times i reinstall it won't download v12

dire obsidian
#

Npm i discord.js

#

Oj

#

I hate write on cellphone

vernal basin
#

it just keeps updating to v11.6.4

surreal notch
#

How to update servers in top.gg

slender thistle
#

-servercount

gilded plankBOT
#

To have your bot's server count displayed on DBL, please read the documentation on server/shard posting. Click here to see the docs.. You may also find #312614469819826177 useful; however it is strongly discouraged as most of the examples are extremely outdated.

wanton mauve
#

idk

#

wait

#

i forgot-

strange trout
vernal basin
#

wait

#

yeah it says 12.2.0 now

#

but my package.json clearly said 11.6.4

strange trout
vernal basin
#

message.guild.members.cache.find(mem => mem.id == user.id); is a v12 thing right

solemn latch
#

Managers are a v12 thing yes

vernal basin
#

because it's telling me .cache is undefined

solemn latch
#

The djs guide has a page for breaking changes, i reccomend taking a look

vernal basin
#

I'm so bamboozled right now

#

okay

#

hm

#

nothing there seems to fit my issue

dire obsidian
#

Delete the line eho says discord.js

#

Then reinstall it

#

Maybe work

earnest phoenix
#

Guys u got any idea on how to disable case sensitive web api?

#

On node js

dire obsidian
#

Like data - Data

#

Idk what is sensitive

earnest phoenix
#

If i put lol works if i put LOL doesent

#

Instead on google chrome works either way

strange trout
#

Then convert it to lowercase

solemn latch
#

^

earnest phoenix
#

Non sense because some terms are uppercase and some lowercase

strange trout
earnest phoenix
#

So

#

Lets say i need to search "lol" on dictionary but the correct term to search is "Lol" its annoying that it doesent work

#

But on chrome does work

placid iron
#

Then convert it to lowercase

dire obsidian
#

Letter per letter if is posible

vernal basin
#

okay so I'm still baffled as to why this no longer works

collector.on('collect', (reaction, user) => {
  if (!user.bot && !playerArray.includes(user)) {
     guildMember = message.guild.members.get(user.id);
  }           
})

guildMember is turning up null, I've tried message.guild.members.cache.find(mem => mem.id == user.id) but none of these work

earnest phoenix
#

Letter per letter if is posible
@dire obsidian u mean use the api with all the possible ways?

dire obsidian
#

Nono, data required

#

Lile

#

Emm

#

Data.Url

earnest phoenix
#

The fact is that only with this api does this

#

With other works just fine

dire obsidian
#

And this api is...

earnest phoenix
#

okay so I'm still baffled as to why this no longer works

collector.on('collect', (reaction, user) => {
  if (!user.bot && !playerArray.includes(user)) {
     guildMember = message.guild.members.get(user.id);
  }           
})

guildMember is turning up null, I've tried message.guild.members.cache.find(mem => mem.id == user.id) but none of these work
@vernal basin
you're just looking through the cache, use the fetch method on the manager

#

Urban dictionary unofficial api because the official one is quite shit as links are put in brackets

slender thistle
#

You mean it returns multiple results

#

or in a JSON format

earnest phoenix
#

Json

#

lol

#

The problem isnt the output but the input

vernal basin
#

wait I've never used a manager, can you direct me to where in the docs the fetch method is, I cna't seem to find it under guildmanager

slender thistle
#

How is it "shit" though

#

Ah

vernal basin
#

ahaha wait guildmember manager, nvm

earnest phoenix
#

you're using it in that snippet relay

#

yeab

#

How is it "shit" though
@slender thistle ill show u wait

#

yeah

dire obsidian
#

args.join("+")?

harsh moon
#

How do I use a ping to get a user?

solemn latch
#

Message.mentions

harsh moon
#

for say "!id @harsh moon "

earnest phoenix
#

fuck]?","thumbs_down":240},{"definition":"It's original definition was "Laughing out loud" (also written occasionally as "[Lots of Laughs]"), used as a brief acronym to denote great amusement in chat conversations.\r\n\r\nNow, it is overused to

#

U see the brackets

harsh moon
#

..

earnest phoenix
#

welcome to REST apis

#

Lol

#

we use JSON in modern api development

#

it's not 2008 anymore

solemn latch
#

I wish it was 2008

earnest phoenix
#

Thats why i told u its shit

#

to you it's shit because you're incompetent to understand what is JSON or what REST even is. JSON is a standardized info exchange format in REST

#

as to where it comes from - js

#

Then to me its shit i guess lol

vernal basin
#

okay wait I'm actually still bamboozled

message.guild.members.fetch(user.id);
throws an error saying .fetch is not a method

am I being bamboozled by my version somehow?

earnest phoenix
#

thonk

#

So u got the way to remove the brackets ?

placid iron
#

message.guild.fetch_member(Id)?

earnest phoenix
#

As they are annoying

#

parse the JSON

#

I'll try tomorrow

vernal basin
#

yeah, it's an id

#
                collector.on('collect', (reaction, user) => {
                    if (!user.bot && !playerArray.includes(user)) {
                        guildMember = message.guild.members.fetch(user.id);
                    }
                })
earnest phoenix
#

@placid iron don't blindly suggest things you're doing the opposite of helping

placid iron
#

Damn sorry

vernal basin
#

I think there might be an issue with the user part of the reaction collector

#

because the bot itself is making it past the !user.bot condition

earnest phoenix
#

reinstall d.js i guess

#

fetch shouldn't be undefined

#

it's a part of v12

vernal basin
#

ye

earnest phoenix
#

I mean

#

It's original definition was "Laughing out loud" (also written occasionally as "[Lots of Laughs]"), used as a brief acronym to denote great amusement in chat conversations.\r\n\r\nNow, it is overused to the point where nobody laughs out loud when they say it. In fact, they probably don't even give a shit about what you just wrote. More accurately, the acronym "lol" should be redefined as "Lack of laughter."\r\n\r\nDepending on the [chatter], its definition may vary. The list of its meanings includes, but is not limited to:\r\n1) "I have nothing [worthwhile] to contribute to this conversation."\r\n2) "I'm too lazy to read what you just wrote so I'm typing something useless in hopes that you'll think I'm still paying attention."\r\n3) "Your statement lacks even the vaguest trace of humor but I'll pretend I'm amused."\r\n4) "This is a pointless acronym I'm sticking in my sentence just because it's become so engraved into my [mind that] when chatting, I MUST use the meaningless sentence-filler 'lol.'"\r\n\r\nSee: lmao, lmfao, rofl, [lawl], heh, haha, [lolol], and 120 for similarities.

#

This is the parsed

slender thistle
#
{
    "key1" : "value1",
    "key2": "value2"
}

After parsing the JSON, json["key1"] to get value1

opaque seal
#

I use event.bind to assign my functions to the events of discord.js and it was suggested to remove dublicate event listeners, how can I remove the default event listener?
client.removeListener('channelDelete', null);

cyan mulch
#

Look

#

Something wrong

earnest phoenix
#

damn that sucks

cyan mulch
#

Yeah

#

I don't know why this happened

leaden shoal
#

Can anyone help me with making a HTML description for my bot please

vernal basin
#

okay I'm now running into an issue where it seems like my powershell is running a previous version of the code? I've tried deleting and recreating the file but it keeps running a piece of code that no longer exists, and throwing an error on it

eternal flame
#

how does one connect a web api to a .xyz website

#

@ me if u got a response

vernal basin
#

wait, I'm actually being BSed now

I've copied the entirety of the code into a new file under a completely different name, and it's still throwing an error at a nonexistent spot in the code

#

a spot in the code that has never existed because this is essentially a new file

#

I'm so confused

#

(I have tried reinstalling discord.js and it still is being a pain)

eternal flame
#

can i see?

#

dm

vernal basin
#

it used to be there from an old thing that i copypasted

#

then when i updated, it stopped working for some reason

#

so i remove it

#

and then when i try to rerun it still thinks it's there

#

(ping me if someone has anything please)

lucid pasture
#

does anyone know how to make a bot delete channels? making a bot that will implement server templates

vernal basin
#

channel.delete pretty sure

eternal flame
#

ye

lucid pasture
#

ight ill test that

eternal flame
#

and also relay

#

im not sure

#

and im not trying to be rude

#

but have you looked for an error within the token of your bot?

earnest phoenix
#

arent server templates already a thing

eternal flame
#

yes

#

but have you looked for an error within the token of your bot?
@eternal flame @vernal basin

vernal basin
#

it's not a token thing

eternal flame
#

ah

vernal basin
#

the location in the code currently isn't even a bracket

solemn latch
#

Just to make sure(it happens more than you'd think)
Did you save the file?

vernal basin
#

yes

#

it's even in a new file under a new name

lucid pasture
#

yo, just channel.delete didnt work, i need to imput a command in a channel and have it delete that certain channel

cyan mulch
#
let questions = [
{
title: "Trivia command",
options [Javascript/Typescript","Python","Rust","Ruby","],
correct: 1
},
{
title: "Trivia command",
options: ["int.engine","ms","ws","discord.js"],
correct: 3
}
]
module.exports={
name: "Trivia",
description: "Testing",
category: "fun",
run: async(bot, message, args)={
    let q = questions[Math.floor(Math.random()*(questions.lenght))];
    let i = 0;
    const Embed = new MessageEmbed()
    .setTitle(q.title)
    .setDescription(q.options.map(opt=>{
    i++;
    return `${i} - ${opt}/n`
}))
    .setColor(`WHITE`)
    .setFooter(`Reply to this message with correct answer! You have 20 seconds.`)
    message.channel.send(Embed)
    
    try}
       let .msgs = await message.channel.awaitMessages(u2=>u2.author.id, { time: 20,max 1, ["time"]})
       if(parsInt(msgs.first().content)==q.correct){
            return message.channel.send(`You got it. Nice bro!`)
}else{
    return message.channel.send.(`You got incorrect lol! Try again next time.`)
}catch(e){
     return message.channel.send(`You did not answer what a noob!`)
}
}
}```
#

How to work this?

vernal basin
#

@lucid pasture message.channel.delete

#

?

lucid pasture
#

ok

#

ill try

#

nope

#

ill just look it up

vernal basin
#

have you tried reading the docs?

#

yeah do that first

radiant kraken
#

also replace lenght with length

clever vector
#

Anybody help?

#

my bot in trouble

#

Please

vernal basin
#

can you at least attempt to provide details

clever vector
solemn latch
#

His bot is in trouble theres no time for details

clever vector
#

Please

#

Its error

#

But i dont know where it came from

vernal basin
#

could you at least provide a link

surreal notch
#

Can anyone pls give me code which is used to update server count in top.gg

solemn latch
clever vector
#

@vernal basin is spammer

vernal basin
#

firstly

#

why do you think you're entitled to my help

clever vector
#

Dude

#

Please

#

Im just a beginner and you is bot dev

vernal basin
#

you haven't answered my question

radiant kraken
vernal basin
#

you came in here, begged for help, spammed me with "please help no time for chit chat", and quite frankly it's not worth my time helping someone who acts like that

clever vector
#

Dude

#

If people dont need your help

#

why they ask you

#

because they need your help

radiant kraken
#

i know but you don't send your repl.it link

vernal basin
#

^

#

we can't help you if you don't even attempt to show your code or give us a spot to start helping

solemn latch
#

Our magic mind reading powers are not that great

placid iron
#

XD

vernal basin
#

^

#

btw @solemn latch do you know if the node_modules folder somehow saves source code and runs that instead?

#

I've tried doing complete clears of all my file folders

#

issue still persists

solemn latch
#

You can delete your node_modules entirely if you want

vernal basin
#

ye i tried that

#

I'm not sure what might be left that's somehow linking it

solemn latch
#

You've restarted the program since you changed your code right?

vernal basin
#

yes

solemn latch
#

Maybe a bit silly, but have you restarted the system

vernal basin
#

i believe so, but i will try again

#

okay it did not fix the issue @solemn latch

solemn latch
#

What command are you running to start your project?

vernal basin
#

node

solemn latch
#

Node .
?

vernal basin
#

node filename.js

solemn latch
#

And the file is empty?

vernal basin
#

the file is not empty, it does have code i nit

#

in it*

#

but not the code that it's throwing an error for

still badge
#

does my bot have to be hosted before they review it?

vernal basin
#

it just has to be online

still badge
#

can they dm me asking to put it online or if its not online will they skip ut

#

it

vernal basin
#

they will skip it if it's not online at time of review

still badge
#

oh ty

#

ok*

vernal basin
#

skip as in it gets rejected so you'll have to wait in queue again

still badge
#

yeah

#

ok

#

ty

vernal basin
#

btw Woo, I moved out any other files that might be interfering with it, and the isolated file itself still throws that error

solemn latch
#

And the error is giving the correct file?

errant perch
#

how do i get if my bot has a certain permission using discord.js

solemn latch
#

The file your running

vernal basin
#

yes

#

it is identifying the correct file

solemn latch
#

Whats at the line the errors at?

vernal basin
#

line 8, column 15

solemn latch
#

Guild.me.permissions.has iirc

errant perch
#

ok

vernal basin
#

ah wait

#

it might not be finding the correct file

errant perch
#

it says cannot read property of me undefined

solemn latch
#

Guild you have to get yourself

errant perch
#

oh ok

#

ez pz

solemn latch
#

Is discordjs erroring out? Lol

#

Lemme look at the djs github

vernal basin
#

because the } catch { is definitely my code

#

and I don't know anyone else who writes spaghetti code like I do

#

so I don't think it would be an issue with a file that isn't mine

solemn latch
#

Yeah I just was making sure

earnest phoenix
#

are you sure you reinstalled d.js?

#

like uninstall then install again

solemn latch
#

๐Ÿค”

#

Line 41 of client.js

#

Is } catch {

vernal basin
#

i've reinstalled like 3 times now

earnest phoenix
#

which node version are you on

vernal basin
#

and I've tried various ways, like deleting node_modules completely

#

12.2

queen moss
#

ok so weird thing

#

I deleted my travis cache for a github site right

#

well the issue is, i go to have it build a new commit and its pulling from a cache I deleted

#

has anyone had this happen, if yes, how the hell did you solve it, i've been sitting here for almost 30min trying to figure it out

amber fractal
#

weird, that should work in node 12

#

but, tbh, it's normally


}catch(err){

}```
solemn latch
#

node โ€v

vernal basin
#

wait

#

now it's telling me it's v8.11.3

#

wtf

amber fractal
#

well yeah, that would be the issue then

vernal basin
#

and in package.json, version is empty

#

wtf

amber fractal
#

node version has nothing to do with package.json

#

oh you were looking at discord.js's version

#

yeah d.js is on version 12

#

to run it you need to be on node 12 or later

vernal basin
#

I think I am on node 12...?

solemn latch
#

When you did node -v ?

vernal basin
#

everytime i reinstall it says + discord.js@12.2.0

amber fractal
#

That's d.js's version

solemn latch
#

Node is not discordjs

vernal basin
#

but node-v tells me 8.11.3

solemn latch
#

Two seperate things

amber fractal
#

yes, node has a different version than d.js

vernal basin
#

ah wait

opal plank
#

isnt node 8 fucking museum stuff?

solemn latch
#

Apt install node will give you an old version

#

Yeah

opal plank
#

i think im on node 15 or something

solemn latch
#

Its what apt install node gives you

opal plank
#

14.6 *

summer torrent
#

discord.js v12 requiring node.js 12.0.0 or higher btw

amber fractal
#

I'd use node version manager

#

allows you to easily manage multiple node versions

#

like how python has stuff for python3 or 2.7

solemn latch
#

For some reason it stopped getting updated, so people often show up with v8

vernal basin
#

what's the command to reinstall node?

amber fractal
#

because both are still often used

summer torrent
#

use nvm

opal plank
#

just update to latest and fix what breaks heeheh

solemn latch
#

you have to do several commands

vernal basin
#

what's the first one

solemn latch
#

Depends on your machine and method iirc

summer torrent
solemn latch
#

Good to know that's what djs does when outdated versions of node is used

earnest phoenix
#

Yi

#

Yo

summer torrent
#

is this your code

crisp geyser
#

Any idea about this? (discord.js)

0|zbot     |  1: 0xa08900 node::Abort() [/usr/bin/node]
0|zbot     |  2: 0xa08d0c node::OnFatalError(char const*, char const*) [/usr/bin/node]
0|zbot     |  3: 0xb7ef5e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
0|zbot     |  4: 0xb7f2d9 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
0|zbot     |  5: 0xd2ba45  [/usr/bin/node]
0|zbot     |  6: 0xd2c0d6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/bin/node]
vernal basin
#

@summer torrent uh the commands they provide to download the script both don't work for me for some reason

earnest phoenix
#

you ran out of memory

sage bobcat
#

One message removed from a suspended account.

summer torrent
#

"heap out of memory" @crisp geyser

earnest phoenix
#

like the error says

summer torrent
#

dude just read the error

#

@vernal basin any errors

sage bobcat
#

One message removed from a suspended account.

vernal basin
#

"bash" is not a recognizable cmdlet

crisp geyser
#

-.-, I know what it says

vernal basin
#

or script

sage bobcat
#

One message removed from a suspended account.

vernal basin
#

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

summer torrent
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

vernal basin
#

ah i c

#

this is going to be a long rabbit hole

crisp geyser
#

I'm trying to ask if anyone knows how to increase the heap memory

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

crisp geyser
#

hm, you sure that's the issue? I have 4gb ram and I'm using 3.1

queen moss
#

oh my god

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

queen moss
#

3.1gb

sage bobcat
#

One message removed from a suspended account.

queen moss
#

how big is your bot

sage bobcat
#

One message removed from a suspended account.

crisp geyser
#

2k guilds

sage bobcat
#

One message removed from a suspended account.

queen moss
#

thats a shit ton for 2k

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

summer torrent
#

2K guilds and 3.1 GB ????

solemn latch
#

How did you use 3.1gb with 2k guilds

queen moss
#

you should be using at most at most 750mb

sage bobcat
#

One message removed from a suspended account.

solemn latch
#

500k users per guild

summer torrent
#

use intents

queen moss
#

even with d.js thats a lot

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

queen moss
#

either you have a memory leak, or your code is really shitty

crisp geyser
#

I think I'm storing too much data in cache to avoid querying mysql

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

use a different library / use a more performant language / upgrade your server specs

#

or

summer torrent
#

use intents

earnest phoenix
#

optimize your code

summer torrent
crisp geyser
#

Read on medium that node.js processes are limited to 512mb ram

#

Is that possible?

#

(that could be increased with --max-old-space-size=1024)

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

crisp geyser
#

thanks for the useful info dad

sage bobcat
#

One message removed from a suspended account.

vernal basin
#

that quote was from john adams btw

crisp geyser
#

sorry mom

vernal basin
#

my bot finally turned on

#

๐ŸŽ‰

delicate shore
#

Your making a new paragraph with a class
@solemn latch then how to do it

vernal basin
#

not like i had to reinstall node.js 5 times

surreal notch
#

how to get info in support server whenever someone votes the bot

radiant kraken
#

how to get info in support server whenever someone votes the bot
@surreal notch use DBL Webhooks

surreal notch
#

How

#

what to put in auth.

crisp geyser
#

anything you want

#

that will be a password

surreal notch
#

Wot

#

Ok

delicate shore
#

wooo

surreal notch
#

now i will recieve whenever someone votes @crisp geyser ?

radiant kraken
#

yeah, try testing it first

#

click the test button

surreal notch
#

I did but didnt recived anything yt

crisp geyser
#

You added a discord webhook there? lol

surreal notch
#

yet

#

yes

#

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

#

channel webhook

#

why

delicate shore
#

bruh

#

r u

#

l

surreal notch
#

โ˜น๏ธ

delicate shore
#

what is id

#

of short des

#

to edit it in css

solemn latch
#

Short description doesn't have an id iirc

#

But a class

delicate shore
#

o

#

then i cannot use #?

solemn latch
#

You use . For class

surreal notch
#

someone can tell me what to put in url section

delicate shore
#

o]

solemn latch
#

The url to your webhook server

#

Not to a discord webhook

surreal notch
#

wht is a webhook server

#

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

delicate shore
#
.bot-description{
  text-align: center;
  color: red;
}
#

woo like this?

#

in style

solemn latch
#

If thats the class for short description

#

Yes

delicate shore
#

yes

#

it is

#

k

#

how can i make it bold tho

solemn latch
#

I am not good at css, id just google it

surreal notch
#

and what to do with token there @solemn latch

delicate shore
#

i ccannot use <h1> either to make it's size bigger

#

ok

#

thnx

#

for ur help

solemn latch
#

Tokens are not really used for top.gg webhooks

radiant kraken
#

how can i make it bold tho
@delicate shore css font-weight: bold; i think

delicate shore
#

op

#

lemme try

#

thnxx

radiant kraken
#

np

surreal notch
#

@solemn latch so could u pls explain me

#

coz i m new

solemn latch
#

The docs explain things pretty well imo

surreal notch
#

i cant understand docs

#

I tried

delicate shore
#

api

surreal notch
#

Oof

delicate shore
#

i can help u

#

there

surreal notch
#

can someone tell me what is this url and what to put in it

delicate shore
#

url

surreal notch
#

which url

#

I want votes notification in server channel

radiant kraken
#

i think you should move to #topgg-api , this channel is for bot development

delicate shore
#

ultron

#

i gave u answer

surreal notch
#

ok

wanton anvil
#

hi

delicate shore
#

i did my first css overwrite

#

is it good?

wanton anvil
#

I've run this code
elif data.startswith('imperio'): if len(message.mentions) > 1: await message.channel.send(f'You can only curse one person at a time {message.author.mention}') elif magic.user in message.mentions: await message.channel.send(f'You can\'t curse magic becuase magic itself is curse, {message.author.mention}') elif not message.mentions: await message.channel.send(f'Mention somebody to curse {message.author.mention}') else: for member in message.mentions: name = member.name avatar = member.avatar_url memberid = member.id break Ctx = data.replace('imperio '+'<@'+str(memberid)+'> ','') await message.channel.create_webhook(name=name) await discord.Webhook.send(Ctx,username=name,avatar_url=avatar)

#

but it is throwing an error Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\Manoj Kumar\AppData\Roaming\Python\Python37\site-packages\discord\client.py", line 312, in _run_event await coro(*args, **kwargs) File "G:\Innovations\Magic\Hogwarts\Discord\magic.py", line 308, in on_message await discord.Webhook.send(Ctx,username=name,avatar_url=avatar) File "C:\Users\Manoj Kumar\AppData\Roaming\Python\Python37\site-packages\discord\webhook.py", line 756, in send if self.token is None: AttributeError: 'str' object has no attribute 'token'

#

does anybody know about this

#

@everyone please somebody help me out

vernal basin
#

that everyone ping tho

wanton anvil
#

sorry for pinging everyone

earnest phoenix
vernal basin
#

how do permission overwrites work? do they just completely reset the permissions before making changes? If so, how can i keep the current permissions and just edit

wanton anvil
#

will this work
Overwrite = discord.Permissions.overwrite
Overwrite.read_messages = True

vernal basin
#

I'm using discord.js so I don't think so

delicate shore
#

me too

dire obsidian
#

guys there isnt any good command handler bot on github or something, youtube dont help

#

also the discord.js guide

#

and yes, im on this like 2 days

solemn latch
#

The djs guide command handler is fine

dire obsidian
#

yes, but i want make a ./events

#

also ./commands/other

#

like that

#

because

solemn latch
#

The difference here isn't the command handler, but the way things are structured

#

Id look at fs, rather than looking for djs specific solutions

wanton anvil
#

do anybody have link for permissions overwrite py documentation

delicate shore
#

Woo can we change button

#

color as well?

gilded dawn
#

Hey everyone!

So recently my discord.py bot hosted on Heroku for many years went offline suddenly. I hadnโ€™t changed anything about the code (that had been working with Heroku for many years before) leading me to believe that it was an issue with Heroku.

I reached out to their support and got this message.

Iโ€™m not really sure how to interpret this. Please let me know if any of yโ€™all have any advice on what to look into.

I can also send pictures of the error log if needed.

Thank you all so much!

solemn latch
#

Everything on the page can be @delicate shore

wanton anvil
#

@gilded dawn which buildpacks did you use??

#

@gilded dawn you need to upgrade your buildpack

delicate shore
#

Everything on the page can be @delicate shore
@solemn latch by same mehod

solemn latch
#

Yeah pretty much

delicate shore
#

ook

#

@solemn latch i know how can i change color of button but to select that class same method only ?

gilded dawn
#

@wanton anvil Iโ€™m using the python build pack on Heroku if thatโ€™s what you mean. How would I go about updating that?

solemn latch
#

Whatcha mean? Like all the buttons under the same class?

delicate shore
#

are they?

wanton anvil
#

@gilded dawn change the version number of discord in requriements.txt

solemn latch
#

Some buttons share classes

delicate shore
#

ook

#

what Manoj

solemn latch
#

Tags and a few title buttons are different

delicate shore
#

kk

wanton anvil
#

nothing

surreal notch
#

Error - node:729) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined
Code -

  name: "slowmode",
  category: "utility",
  description: "Set the slowmode for the channel!",
  run: async (bot, message, args) => {
    if (!args[0])
      return message.channel.send(
        `You did not specify the time in seconds you wish to set this channel's slow mode too!`
      );
    if (isNaN(args[0])) return message.channel.send(`That is not a number!`);
    let reason = message.content.slice(
      bot.prefix.length + 9 + args[0].length + 1
    );
    if (!reason) {
      reason == "No reason provided!";
    }
    message.channel.setRateLimitPerUser(args[0], reason);
    message.channel.send(
      `Set the slowmode of this channel too **${args[0]}** with the reason: **${reason}**`
    );
  },
};```
solemn latch
#

You can edit multiple selected things like this
.class1, #id {

}
Would modify .class1 and #id with the same css

delicate shore
#

length is undefined

#

ook

surreal notch
#

ik but how to define it

delicate shore
#

;-;

surreal notch
#

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

delicate shore
#

how u want to

#

bruh

#

i am done

#

did u even try

gilded dawn
#

@wanton anvil this is what I have right now for the version number. discord.py==0.16.12

delicate shore
#

to read

#

your own code

wanton anvil
#

@gilded dawn is that latest version??

surreal notch
#

yes i tried

gilded dawn
#

where can I see where the latest version is for discord.py?

wanton anvil
#

just a sec please

gilded dawn
#

ok thanks

solemn latch
#

The docs will typically tell you all versions, or atleast the most recent

delicate shore
#

what the heckklk

wanton anvil
#

@gilded dawn I've got that error once I upgraded my package it seems to work properly now but I am not getting the version now

delicate shore
#

wtf

#

if i search dank memer

opal plank
#

erm, not the right channel, i guess

delicate shore
#

o

gilded dawn
#

@wanton anvil this code is from two years ago. should I update to the latest version?

wanton anvil
#

yes of course

gilded dawn
#

@wanton anvil @solemn latch

viral iris
#
{name: "something", value: `Click here [link here]`}
#

is it clickable ?

delicate shore
#

o

viral iris
#

@delicate shore its not

#

fixed

trim saddle
#

@viral iris [Click Here](Link Here)

wanton anvil
#

how to get a webhooks Id

#

and token

#

with discord.utils.get()

trim saddle
#

you can't really get webhook data in d.py unless you can create a webhook object

gilded dawn
#

Hey thank you so much guys. I tried updating discord.py but it seems that my other requirements aren't compatible with discord.py. this is what I have in requirements.txt rn. how do I figure put what are the most recent versions of everything and what requiriments.txt should look like?

wanton anvil
#

@trim saddle I created a webhook already

trim saddle
#

remove the versions and try again

wanton anvil
#

how to access it now

#

webhook

trim saddle
#

a webhook link has the info

wanton anvil
#

how to get it

gilded dawn
#

what should I remove

wanton anvil
#

versions

#

It will automatically sets the latest versions of them

gilded dawn
#

ok so I should just have discord.py in that page? and none of the other stuff?

trim saddle
#

also if you really want to know

gilded dawn
#

like this?

trim saddle
#

yeah, but don't list the same requirement multiple times

gilded dawn
#

oh okie

#

i will let y'all know if it works

wanton anvil
#

what should I do after copying webhooks url

gilded dawn
#

ok so I did that but i got this error when I was deploying it not sure why

#

one sec gonna send pic

pine aspen
#

Hi. I need help with setting up the DBL voting webhook

#

No wait wrong chat.

#

Might aswell, anyone know how to improve response times with Lavalink?

delicate shore
#

guys

#

my bot

wheat jolt
#

your bot

torn ravine
#

my bot
@delicate shore what about it

pine aspen
#

@delicate shore

#

very usful

#

Might aswell, anyone know how to improve response times with Lavalink?

delicate shore
#

ok

#

who pinged me

#

everyone did

#

@delicate shore what about it
@torn ravine my bot || is a bot ||

|| i wa supposed tiosay it in #general ||

torn ravine
#

oh

delicate shore
#

but u asked

#

so i replied here

#

only

#

otherwise i was going to off. topic

summer saddle
#

โ€œ Code is like humor. When you have to explain it, itโ€™s bad.โ€ lol

sinful sorrel
#

does anyone wanna send me level system Quick.db code?

pine aspen
#

no

#

i could send you mysql

#

but i wont

sinful sorrel
#

if u doesnt wan its ok

#

im not force people

pine aspen
#

no

#

it's against rules

#

i think

sinful sorrel
#

wait

#

let me read again

pine aspen
#

a. Donโ€™t spoon-feed or attack beginners.

sinful sorrel
#

owh

verbal ferry
#

help

strange trout
#

Help

pure lion
#

You just posted cringe

#

What is the issue

small prairie
#

dont ask for asking

#

just say how you want help lmao

surreal notch
#

Python is ๐Ÿšฎ

torn ravine
#

Thatโ€™s opinionated @surreal notch

#

al languages are good as long as you know how to utilize it

restive pebble
#

how to set color in discord embeds i have tried many things it throws error saying invalid form body

pale vessel
#

use decimal number or hex (0xffffff)

restive pebble
#

ok

#

thx

pale vessel
#

why is color an object

restive pebble
#

wait

#

its not

pale vessel
#

ok good

restive pebble
#

still same

pale vessel
#

you did something wrong

#

not a string

#

that's invalid

restive pebble
#

what string

pale vessel
#

color

#

is a number

#

color: 0xffffff

restive pebble
#

k

#

wait

#

ok i have to change definition also

pure lion
#

Is that dpy

restive pebble
#

k works

pale vessel
#

@pure lion no

restive pebble
#

thx

pure lion
#

Eris?

restive pebble
#

own idot

pale vessel
#

idot

pure lion
#

O w n

restive pebble
#

base

pale vessel
#

ya, connect to the ws directly

pure lion
#

O shitttt

restive pebble
#

one thing

pure lion
#

I wanna do that now x)

restive pebble
#

is white allowed?

pale vessel
#

ya

lusty quest
#

iirc white is bugged

restive pebble
#

it became no color

pale vessel
#

makes sense because discord

restive pebble
#

ok leme try something else then

pure lion
#

Just do something really close to white

pale vessel
#

like 0xeeeeee

#

e

pure lion
#

#fcfcfc

restive pebble
#

yes blue worked lul

lusty quest
#

time to make a stupid workaround for a stupid thing bcs the thing that should work doesnt work

pure lion
#

Wait

#

There's no colour diff

#

fffffe

#

Last char is something to do with hue

lusty quest
#
for (var j = 0; j < array.length; j++) {
        datasetValue[j] = [
        {
            label: `Option ${j+1}`,
            data: [0,array],
            // The color of the line (the same as the fill color with full opacity)
            borderColor: "rgb(61,148,192)",
            // Fill the line with color
            fill: true,
            // Blue color and low opacity
            backgroundColor: "rgba(61,148,192,0.1)"
        }];
        }
``` this gives me a Configuration for Chart.js (wanted it to be dynamic) the Output is correct but chart.js doesnt take it. time to make a stupid workaround
green kestrel
#

was there an api outage last night?

lusty quest
earnest phoenix
#

HaLPPP

#

I am CPPP

green kestrel
#

yeah that says all was ok

#

but one of half my shards were down since 4am

lusty quest
#

wired

#

no self healing implemented?

restive furnace
#

I am CPPP
its cpp

#

rEeeEeEeeeEeeEEEEeEeEeeee

pure lion
wanton anvil
#

how can I send a message from a user in channel without mentions if there are mentions in it

#

like I sent @Manoj Kumar hi

#

but bot should only return hi

wanton anvil
#

please somebody help

earnest phoenix
#

Hmm

wanton anvil
#

hmm?

earnest phoenix
#

So if I was like

@rauxs hi @rauxs
the bot would return hi?

wanton anvil
#

yeah

#

how?

earnest phoenix
#

Just make it so it deletes mentions ๐Ÿ˜

wanton anvil
#

that's what I am asking how

earnest phoenix
#

I am not good at coding but in basics that seems like the most obvious choice

#

ahhh

#

I have no clue my friend. You can try looking at https://discord.js.org/#/docs/main/stable/ to find if anything there caters to your need, sorry I couldn't help more

wanton anvil
#

I am a Pythonist

#

thanks anyways

restive pebble
#

@wanton anvil teams can be made from discord developer portal

wanton anvil
#

ok

#

thanks

#

with bots??

earnest phoenix
#

can anyone help me with building a bot server?

#

for my bot?

#

@earnest phoenix Could you elaborate on that?

coarse hearth
#

i got this what is it?

winter basalt
#

your bot has been added

#

and is now on the queue

coarse hearth
#

oh

#

it will be added to this server too?

winter basalt
#

yes, but next time go to #support for questions like this

coarse hearth
#

owh sorryt

delicate shore
#

Hello peeps

#

Is it correct channel to get some advice

#

it will be added to this server too?
@coarse hearth Only if it get's approved

lusty quest
#

yes finnaly i know why ive had this issues with chart.js and barcharts

delicate shore
#

ok

#

Is it correct channel to get some advice

for things related to top.gg?

lusty quest
coarse hearth
#

@delicate shore so the link is not workiing right

delicate shore
#

#support
@lusty quest it's related to my bot page

#

@delicate shore so the link is not workiing right
@coarse hearth it's not

#

#support
@lusty quest and for suggestions andidea

#

ideas

coarse hearth
#

oh ok

lusty quest
#

who tf did you now wanted to answer with this?

#

suggestion and ideas idk. ask in support

delicate shore
#

ok

restive willow
#

๐Ÿคข

delicate shore
#

:(

golden condor
#

You should make it a bit more readable

delicate shore
#

ook

lusty quest
#

maybe he likes light mode

delicate shore
#

the bg?

#

or text

crystal socket
#

^, yeah i can't read it

golden condor
#

The bg

delicate shore
#

ook

golden condor
#

Change the green to a bit darker

#

:+1:

thick gull
#

or jus

#

not have a gradient

#

like that ;w;

golden condor
#

That's also possible

thick gull
#

please it is not 2009 anymore

#

:(

delicate shore
#

thanks

#

for

#

suggestion

lusty quest
#

now i have some fancy poll results

thick gull
#

what

#

i am confused here

#

if I tap on it the results just vanish on mobile

restive willow
#

transparent

lusty quest
#

need to change the colors. a little more alpha to see them better

delicate shore
#
<html>
<head>


<style>
body  {
background-image: url(https://cdn.glitch.com/d627e943-fbaa-4cab-abab-a4178d6f915d%2Fcool-background%20(1).png?v=1596702655930);
}

.bot-description{
  text-align: center;
  color: white;
  font-weight: bold;

}
.bot-name{
  text-align: center;
  color: white;
  font-weight: bold;


}


.atag{
color: black;
}
.botpagebutton{
color: black;
}
</style>


</head>
<body>


//rest code```
#

the code is not working

#

what am i doing wrong

#

and don't worry about name

#

and desc

#

i corrected it alredy

pure lion
lusty quest
#

?

#

the message is pretty much out of context

split hazel
#

-dotpost

gilded plankBOT
#

Please do not post dots to clear your messages/get attention. It adds absolutely nothing to the conversation and just causes spam.
If you need to get attention, then say hello everyone. If you need to clear your messages, then press the Esc key. If you do not follow these instructions you will be muted.

delicate shore
#

This is new

boreal mural
#

hey guys im using the discord bot maker app how do i make it so that for example i command something and i want the bot to give me a option where i say A or B which has a certain following message. i want to make a story like this, almost like a type game yaknow?

ashen shard
#

hello everyone

delicate shore
#

hi

ashen shard
#

how can i make a program that will detect user inputs from one machine and transfer (andd execute) the input. And vice versa (even simultaneously)

#

i just want you guys to tell me where to start, to have some of an idea about what/where to research

#

or if saidd program already exists

#

what i have in mind is teamviewer without the screen sharing, and it works both ways

earnest phoenix
#

Asd

mild flower
#

How do I split input into two variables?

Example : ;vote lmao choice 1 | lmao choice 2
I want to split it into two variables by |

radiant kraken
#

@mild flower what library do you use?

mild flower
#

js

radiant kraken
#

@mild flower use .split("|");

restive furnace
#

spoonfeed...

mild flower
#

that wasnt what i wanted but ok

restive furnace
#

i soon feed you with my spoon

mild steppe
#

What do you want then?

restive furnace
#

" | " is another option

mild flower
#

i want it to be stored in two different variables

#

not in an array

boreal mural
#

how do i make it temporarily (so yes and no can be used later again) command message to my answer

radiant kraken
#

you can use by iterating the array

mild steppe
#

variable = array[0]

restive furnace
#

.split("|")[0] for example

radiant kraken
#

like array[0], array[1], etc

mild flower
#

oh

wanton anvil
#

@ministry.command() async def create_team(message,Name): Overwrite = {message.guild.default_role: discord.PermissionOverwrite(read_messages=False), message.guild.me: discord.PermissionOverwrite(read_messages=True)} Author = ministry.get_user(message.author.id) await message.channel.last_message.delete() await message.guild.create_text_channel(Name,overwrites=Overwrite) Channel = discord.utils.get(message.guild.channels,name=Name) await Channel.set_permissions(Author,read_messages=True,send_messages=True) await Channel.send(f'Welcome to {Channel.mention}') can anybody say me what's wrong with my code

mild flower
#

let votechoice = message.content.split('|')
this work?

cerulean venture
#

Hey hey, I got a MySQL question (once again).
This is my mysql query: INSERT INTO birthday (bdUser, bdDate) VALUES (?, ?) `, [message.author.username, editedmessage]);

I wanted to replace bdDate if bdUser already exists (tried with ON DUPLICATE KEY UPDATE but I couldnt get it to work)

ashen shard
#

hey guys

#

i just want a little info that's all

mild flower
#

wait how do i use args from an array

radiant kraken
#

wdym

restive furnace
#

that badic j

mild flower
#

pchoice1 = Array.votechoice[1]
or
pchoice1 = votechoice[1]

#

i cant find on internet

restive furnace
#

w3

#

we aint spoonfeeding you

mild flower
#

...

ashen shard
#

me?

radiant kraken
#

did you sign the array to a variable

restive furnace
#

go to w3schools @mild flower

mild flower
#

can u say if it was correct?

#

rather tahn wasting both our time

restive furnace
#

avtually we aint wasting ur time, you need to learn

mild flower
#

was it correct tho

delicate shore
radiant kraken
#

are you new to js?

ashen shard
#

guys does the software i mentioned above exists in some form? or do i need to write it?

restive furnace
#

@radiant kraken yes he is

radiant kraken
#

try learning javascript programming first before jumping to discord.js

mild flower
#

ok i found it

ashen shard
#

guys i need a software that can detect my mouse/keyboard movements/inputs and execute them on another

#

and vice versa

mild flower
#

...

ashen shard
#

kinda like teamviewer but two wayss

#

does this exist already?

golden condor
#

That exists iirc

ashen shard
#

i searched but couldn't find

mild flower
#

why are you chatting in bot development tho

golden condor
#

You can use your mouse and keyboard across on another pc

ashen shard
#

i once had an issue about something other than bots and some mod told me to write it in development @mild flower

#

@golden condor but does it support vice versa, and does it send the screen like teamviewer etc?

golden condor
#

Uh

#

I'm not too sure

ashen shard
#

guys i just want to find/make teamviewer that does not send the screen (so saves a huge lot of internet) and that can work both ways?

#

can you tell me if said software exists already (i couldn't find it) and if not

#

can you tell me what do i need to know/learn to code such program

golden condor
#

I think TeamViewer or anydesk supports it

ashen shard
#

do they have an option to do connect without sharing the screen?

mild flower
radiant kraken
#

you can use .replace(a, b)

golden condor
#

Split it at "vote"

radiant kraken
#

.split('vote')[1] also works

tight plinth
#

split with spaces, removze the first element of the array and re join

golden condor
#

.split('vote')[1] also works
^^^

mild flower
#

doesnt seem to be working

radiant kraken
#

you forgot to reassign that as a variable

mild flower
#

wdym

lusty quest
#

i work currently on a Poll bot Too, to fix this i use a different aproach

pure lion
#

Suuuup

#

Peerjs isnt working please help me basically idk the issue

#

There are no errors and I'm pretty sure I set it up correctly

lusty quest
#

if it doesnt work and there are no errors its usually a setup issue

pure lion
#

Also I'm passing da shit

#

Through nginx (and the port it uses)

#

But when I try to go to ale-bot.xyz/peer it redirects to /peer/ and says "cannot get /peer/" so more confuse

delicate shore
#

npm giving this error

#

when i search for packages

#

any idea

mild flower
#

if(args[0]) return message.channel.send(stuff)
why dis sending everytime even when the args are not 0?

pure lion
#

Args[0] = usually command name

misty sigil
#

unless you're me

pure lion
#

Cleremy any ideas of my issue?

misty sigil
#

no

pure lion
#

Fuck

misty sigil
#

im not a web dude

#

i just slap some express code

#

and it works i dunno

pure lion
#

How to website by Jeremy Clarkson

#

i just slap some express code
and it works i dunno

finite bough
#

I use bootstrap

mild flower
#

bruh its args

#

not Args

#

and the problem still persists

pure lion
#

Broo really? :O

finite bough
#

better than learning html and css

pure lion
#

Show the def of args

mild flower
#

if(votechoice[0]) return message.channel.send(Evote)

#

same thing happen when i use a var

pure lion
#

What is args

radiant kraken
#

use .length

mild flower
#

um

#

that wont work

radiant kraken
#

have you tried it?

mild flower
#

ys

#

cus votelengh will always be 4

#

at the least

#

but why isnt args[0] working

pure lion
#

Console log args and you'll know

delicate shore
pale vessel
#

just wait for a while

#

it'll be fixed by itself