#development

1 messages Β· Page 1344 of 1

earnest phoenix
#

@earnest phoenix u know css language i don't know

viscid gale
#

o..k

earnest phoenix
#

css is not a language
it is hell

viscid gale
#

css isnt a lan

#

took the words

rapid shuttle
#

where do I find twitter bots?

earnest phoenix
#

Programing language

viscid gale
#

straight from my keyboard

earnest phoenix
#

where do I find twitter bots?
@rapid shuttle we dunno where but you won't find any here

#

πŸ˜„

viscid gale
#

if u want twitter bots

#

make one

#

xd

reef carbon
#

Does anyone know why my static files aren't showing in Django? I'm using django and apache2. For some reason when I go to the link, it shows the default apache2 ubuntu page. It's supposed to show the static files. I have my port as 443 in my .conf file. This started once I set my port to 443. I have port 80 before, but my new domain wouldn't work on it for some reason. I changed the port to 443 and it works, but it's not showing my static files.

viscid gale
#

apache setup i guess

#

bruh..

#

@earnest phoenix u ghosted a dude

#

in case anyone comes asking me :l

fluid basin
#

you need to setup apache

#

to point to your django server

earnest phoenix
#

@earnest phoenix u ghosted a dude
@viscid gale those my friend

fluid basin
#

when the page is accessed

#

@reef carbon

drifting wedge
#
            if(collection.count_documents({}) == 0):
                user_info = {"_id": reporter, "coins":'0'}
                collection.insert_one(user_info)
            
            if(collection.count_documents(reporter) == 0):
                user_info = {"_id": reporter, "coins":'0'}
                collection.insert_one(user_info)

            reportercoins = collection.find(reporter)
            for reportercoins1 in reportercoins:
                coins = reportercoins1["coins"]``` can any1 tell me whats the issue with this?
#

its giving me a huge error

viscid gale
#

uh...

#

what/

fluid basin
#

the filter must be an object

viscid gale
#

oh... ok here's some more context

reef carbon
#

@fluid basin I have everything set up. Everything worked fine but my new domain wouldn't work for some reason. So I changed my port in the .conf file to 443 for https. And now it shows the default apache2 page instead of my static files.

drifting wedge
#

the filter must be an object
@fluid basin an object

#

as in a var?

fluid basin
#

make sure the apache server config for both default and ssl have your config inside

viscid gale
#

the error code info just got deleted owo

fluid basin
#

wait whats the error again @drifting wedge

reef carbon
#

make sure the apache server config for both default and ssl have your config inside
@fluid basin I only have 443

royal cove
#

self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000)where we find the password and the dblwebhook?

fluid basin
#

inside your sites-available folder

#

there should be a 000-default and a default-ssl

pale vessel
#

@royal cove you decide the password

fluid basin
#

make sure both have config for django

#

I think you only configured the 000-default

earnest phoenix
#

how do i select an element INSIDE a D3 selection?

viscid gale
#

did u google that exact phrase before u came herre?

earnest phoenix
#

no
because you guys are better than google

royal cove
#

where we had to define the password?

viscid gale
#

d3.js homepage looks kinda comical tbh xDDDD

#

"fork me on github"

pale vessel
#

should be under the webhook section in your bot edit page

royal cove
#

ah okay

viscid gale
#

d3.js seems like nodejs version of chrome class document

#

interesting

pale vessel
#

how do i select an element INSIDE a D3 selection?
@earnest phoenix why

royal cove
#

and the dblwebhook? ?

pale vessel
#

why not just select under one selector

viscid gale
#

declarative does look mentally easier(since it's shorter) but in my opinion, imperative is more comprehensive than delclarative because it doesnt try as hard to determine what u wanna do off the bat

#

im gonna get knowlegded on d3 still tho

#

since i guess ppl might begin moving with d3.js

earnest phoenix
#

why not just select under one selector
@pale vessel wait so d3.select("<first selection> <second selection>") will work?

#

that works in CSS

pale vessel
#

yes

earnest phoenix
#

awesome

pale vessel
#

no shit lmao

#

it's like css

#

ok sorry

earnest phoenix
#

can you iterate over a D3 selection?

pale vessel
#

log it and see

earnest phoenix
#

ok you can

#

awesome

#

I have this: .
@earnest phoenix ok

fluid basin
#

betterdiscord detected

earnest phoenix
#

@pale vessel ran into a problem with your method

viscid gale
#

huh.. it will get tedious if u try to make more commands like that

pale vessel
#

:O

#

what are you trying to do anyway

earnest phoenix
#

so umm
<selection>.element()??

pale vessel
#

select what in what

viscid gale
#

what are you trying to do anyway
yea what r u trying to do

earnest phoenix
#

what are you trying to do anyway
@pale vessel my goals are beyond your understanding spinningwink

pale vessel
#

welp

viscid gale
#

:l

#

i bet u trying the d3 version of document.all

earnest phoenix
#

i bet u trying the d3 version of document.all
@viscid gale yeah

viscid gale
#

just use document.all

#

:l

#

i had a suspicion

earnest phoenix
#
d3.select(".dropdown").selectChild

this exists yay

#

just use document.all
@viscid gale if it was that easy D3 wouldn't exist

pale vessel
#

what is the child called

viscid gale
#

now u understand y i wonder it does

earnest phoenix
#

karen

pale vessel
#

thats the mom

viscid gale
#

everything is possible, they just made it more declarative

earnest phoenix
#

and quicker

#

and easier

viscid gale
#

quicker.. not really

#

easier, maybe

earnest phoenix
#

CSS transitions are fucking easy with D3

viscid gale
#

but not in all situations

#

lemme explain

earnest phoenix
#

literally turned the whole thing to three lines of code

viscid gale
#

:l

#

can u wait

pale vessel
#

just type faster 4head

drifting wedge
#

is better discord allowed?

pale vessel
#

no

drifting wedge
#

o ok

viscid gale
#

the thing is, i gonna try to explain the equivalent in real life model
if someone listens to less of what you say to do something, yes u dont have to waste your voice as much, BUT, if u have a tricky task, the dude who listens slowly and carefully with long sentences will be the winner

#

it's like if u had a pack of functions to do certain stuff(and u make em short and intuitive)

#

it will work for those specific situations, but when it comes down to real tricky stuff, the comprehensive thing that existed before would be better

#

*in my opinion

ionic dawn
#

transition : .4s; Kanna_pog_FB

earnest phoenix
#

it's not like i never use normal vanilla DOM stuff
i only use D3 to do stuff quicker
it literally adds no new features it's just to make things easier

viscid gale
#
var paragraphs = document.getElementsByTagName("p");
for (var i = 0; i < paragraphs.length; i++) {
  var paragraph = paragraphs.item(i);
  paragraph.style.setProperty("color", "blue", null);
}```
D3 employs a declarative approach, operating on arbitrary sets of nodes called selections. For example, you can rewrite the above loop as:

```js
d3.selectAll("p").style("color", "blue");```
#

that what u mean?

earnest phoenix
#

yes

viscid gale
#

p=document.getElementsByTagName("p")
Object.keys(p).forEach(a=>{p[a].color="blue"})

earnest phoenix
#

@viscid gale if you don't wanna use d3.js don't

viscid gale
#

im not telling u dont use it bruh im not fiting u down

#

im legit trying to see how short i can make imperative code

#

i gotta admit, it made the chit really short

earnest phoenix
#

im not telling u dont use it bruh im not fiting u down
@viscid gale then please explain the purpose of this unnecessary talk

viscid gale
#

boredom

#

eek.. and then there was silence

#

ite cya

earnest phoenix
#

lmao

sick fable
#

:kthnxbai:
@earnest phoenix be naice to everybody instead of sending these weird emojis lol

drifting wedge
#

totalid = makeid() make id is a function that returns an str

earnest phoenix
#

yeah?

drifting wedge
#

why would it say NameError: name 'makeid' is not defined

#

in python

#

    def makeid():
        id1 = random.randint(1, 9)
        id2 = random.randint(1, 9)
        id3 = random.randint(1, 9)
        id4 = random.randint(1, 9)
        id5 = random.randint(1, 9)
        id6 = random.randint(1, 9)
        id7 = random.randint(1, 9)
        id8 = random.randint(1, 9)
        id9 = random.randint(1, 9)
        totalid = f"{str(id1) + str(id2) + str(id3) + str(id4) + str(id5) + str(id6) + str(id7) + str(id8) + str(id9)}"
        return totalid``` this is makeid
earnest phoenix
#

idk python bye

sudden geyser
#

Python is read top-to-bottom.

#

Are you trying to call the function before it's been defined in the scope.

drifting wedge
#

lol

#

no

pale vessel
#

is it a question or a sentence

drifting wedge
#

i specify func above

#

is it a question or a sentence
@pale vessel what?

pale vessel
#

nothing xd

drifting wedge
#

Are you trying to call the function before it's been defined in the scope.
@sudden geyser i define it v4

sudden geyser
#

can you share your code via hastebin

earnest phoenix
#

in minecraft we can do /execute as <entity>
can you do the same in js?

sudden geyser
#

yes

#

make whatever context you have about the user point to some other user

quartz kindle
#

you're comparing a game's scripting engine against a programming language? lmao

sudden geyser
#

yeah bad comparison as wwell

earnest phoenix
#

you're comparing a game's scripting engine against a programming language? lmao
@quartz kindle not really a scripting engine more like a RAGE INITIATOR AAAAAAAAAAAAAAAAAAAA
why is bedrock's command system, redstone, EVERYTHING fucked

quartz kindle
#

lmao

#

programming languages have no "can i do this in [insert language]"

#

they have "how can i do this in [insert language]"

earnest phoenix
#

lemme rephrase my question:
can you execute a function as a different object

#

even better example: this keyword is tied to that object and not the current

quartz kindle
#

yes

earnest phoenix
#

sudo, the phrase you're looking for is sudo

#

sudo, the phrase you're looking for is sudo
@earnest phoenix all this time i thought it was just a phrase linux bash ripped off of sumo wrestlers...

quartz kindle
earnest phoenix
#

thx

quartz kindle
#

there are three methods that override this

#

call, apply and bind

earnest phoenix
#

there are three methods that override this
call, apply and bind
@quartz kindle
call calls a phone number through the specified telephone object
apply applies a CSS style to that object
bind joins together the bonds in a protein

quartz kindle
#

yes

earnest phoenix
#

also you know what I'm gonna use the call thing for?

for (let ctn of d3.selectAll(".dropdown")) {
myfunc.call(ctn);
}
#

loading Meister is typing...

tired panther
#
client.shard.broadcastEval(`this.channels.cache.has("${remind.bumpchannel}") ? this.channels.cache.get("${remind.bumpchannel}").send({
            embed: ${JSON.stringify(remindmessage.toJSON())}}) : null`).then(console.log);
            
```  ‴️ this code does not work error:  [#development message](/guild/264445053596991498/channel/272764566411149314/) @quartz kindle  do u know why? since your code was right
earnest phoenix
#

wrong

quartz kindle
#

@tired panther idk looks right

#

try console.log the entire string to see if it looks right

#
console.log(`this.channels.cache.has("${remind.bumpchannel}") ? this.channels.cache.get("${remind.bumpchannel}").send({
            embed: ${JSON.stringify(remindmessage.toJSON())}}) : null`)
tired panther
#

okay

earnest phoenix
#

or is callback hell bad

sudden geyser
#

some spacing could help

#

some of it doesn't look correct either

earnest phoenix
#

bruh you can't iterate over a d3 selection and get selections

#

wait can you pass html object in d3.select?

sudden geyser
#

like you use .call() in which the first argument will be the this value, so the parameter elm shouldn't have a value

earnest phoenix
#

:| ...why did i add .call anyways?

sudden geyser
#

who knows

#

it doesn't look like you need to wrap it in a function to then call it in the first place

earnest phoenix
#
Uncaught TypeError: Cannot read property '#<HTMLPreElement>' of undefined

the file

[ elm.node() , elm.selectChild(".dropdown-content").node() ].forEach(...)
mystic violet
#

What would this error mean? (node:11996) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 192.168.0.8:1226 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16) Its for an overinternet database

#

could it be ratelimits?

earnest phoenix
#

@mystic violet congrats you just leaked your IP and port

mystic violet
#

lmao

#

yes

#

very gud

earnest phoenix
#

if your internet database has an open port DEAD

#

lmao are you even gonna edit your message now mate

mystic violet
#

no

#

because its a local IP mate

#

πŸ˜‚

#

DDoS it I dare you

#

just change the port to 80

#

and the 8 to a 1

earnest phoenix
#

the same line logging the element is the same line saying it can't read the property

#

if i remove the logging it becomes Uncaught TypeError: Cannot read property '#<HTMLPreElement>' of undefined

#

i got it

#

fixed

ebon kelp
#

[you] congrats you just leaked your IP and port
@mystic violet KEKW he doesn't know

earnest phoenix
#

imagine removing the ping in the quote but forgetting to remove the ping below the quote

#

Hello

ebon kelp
#

imagine removing the ping in the quote but forgetting to remove the ping below the quote
@earnest phoenix was on purpose

tulip ledge
#

Nani

#

Did this kid leak his ip

#

LMAO

ebon kelp
#

192.x.x.x

#

Local

tulip ledge
#

oh yeah

#

I just noticed

ebon kelp
#

But this kid thought it was his IP

tulip ledge
#

DDoS it

pale vessel
tulip ledge
#

haha

ebon kelp
tulip ledge
#

imagine DDoSing a local IP

ebon kelp
#

200 IQ

#

Making a DDoS website which kids will search, but instead of DDoSing the filled in IP it will DDoS the IP it came from (yourself)

errant perch
#
if (args[2].toLowerCase() == "upper") var greaterorless = ">"
if (args[2].toLowerCase() == "lower") var greaterorless = "<"
if (10 greaterorless 5) {console.log("true")}``` anyone know how to solve this stupidity
earnest phoenix
ebon kelp
#

@errant perch because you use <> as a string

earnest phoenix
errant perch
#

brhudude

earnest phoenix
#

if (args[2].toLowerCase() == "upper") var greaterorless = ">"
if (args[2].toLowerCase() == "lower") var greaterorless = "<"
if (10 greaterorless 5) {console.log("true")}
anyone know how to solve this stupidity

hollow sedge
#
if (args[2].toLowerCase() == "upper" && 10 > 5) console.log("true")
if (args[2].toLowerCase() == "lower" && 10 < 5) console.log("true")
#

i solved it

#

give me my prize

ebon kelp
#

That's one way of doing it

errant perch
#

πŸͺ

#
if (args[2].toLowerCase() == "upper" && 10 > 5 || args[2].toLowerCase() == "lower" && 10 < 5) console.log("true")```
#

that ought to work lmao

hollow sedge
#

too unreadable tho

lost cove
#

Is the api having trouble? My bot is timing out when connecting to shards

hollow sedge
#

@errant perch what lang for the syntax highlighting

#

nvm its css

errant perch
#

ye

slender thistle
#

Why the 10 > 5 in the first place

steady anchor
#

if I have an unhandledRejection, the bot stops and restarts, because of my .sh script. How can I say, that the bot doesn't stop?

hollow sedge
#

Why the 10 > 5 in the first place
@slender thistle dont question the ways of Woogie

slender thistle
#

This server makes me want to cry my soul out.

hollow sedge
#

lol

errant perch
#

thanks im glad i can make you feel that way

ebon kelp
#

This server makes me want to cry my soul out.
@slender thistle not only this server

hollow sedge
#

@errant perch

if (args[2].toLowerCase() == "upper") var greaterorless = ">"
if (args[2].toLowerCase() == "lower") var greaterorless = "<"
eval(`if (10 ${greaterorless} 5) {console.log("true")}`)
#

for js

earnest phoenix
#

@errant perch just make it all a single line statement

errant perch
#

@errant perch yea man wtf

fluid basin
#

you don't need to use eval wtf

hollow sedge
#

bro its a joke

ebon kelp
hollow sedge
#

the code is obviously a joke

ebon kelp
#

Meh

errant perch
#

😏

fluid basin
#

as far as possible, this channel is for helping others and not joking around

#

plz

errant perch
#

ok NitRo BoOstEr

earnest phoenix
#
args[2].toLowerCase() == "upper" ? greaterorlower = ">" : greaterorlower = "<"
#

donr

#

duh

hollow sedge
#

@fluid basin ??? think of it as a challenge then

errant perch
#

like i say let me be dumb in peace

hollow sedge
#

no one was asking for help when we were talking anyway

ebon kelp
#

That's not the same @earnest phoenix

hollow sedge
#

@errant perch dont be salty, admit i beat u with the eval

earnest phoenix
#

πŸ‘οΈ

errant perch
#

that eye isnt symmetrical

fluid basin
#

neither is yours

errant perch
#

of course

upper elm
#

so I'm trying to add mongodb to my bot

#

and I'm not really sure how it works, do I need to install mongodb from the mongodb website? i have the npm installed

#

ping with answer

still merlin
#

I'm not sure but I do have a link on setting up mongodb

earnest phoenix
#

First of all, are you planning to use mongodb or mongoose

#

Both are wrappers around mongodb API

still merlin
#

I thought I had the link saved, But I don't, sorry.

#

Nevermind, I found it in search history, https://glitch.com/edit/#!/mongodb

ebon kelp
#

Check the documentation on NPM

upper elm
#

ok

reef carbon
#

I'm using django and I'm trying to look at the static folder in filezilla but it doesn't show because of permissions
When I go to my website, it shows the html code but it doesn't show the css
I think the html folder can't access the css files (which is in the static folder) because of permissions
does anyone know how to fix this?

still merlin
#

does anyone know if i'd be able to use https://dual.pw for my radio command (d.js)? what i'm doing is;

    execute(message, args) {
        const broadcast = client.voice.createBroadcast();
        const dispatcher = broadcast.play('https://www.radio-uk.co.uk/au/totally-radio-hits ');``` but i dont think my bot could play it because there is a 'click to listen' when you load the page
drifting wedge
#
    def makeid(self):
        id1 = random.randint(1, 9)
        id2 = random.randint(1, 9)
        id3 = random.randint(1, 9)
        id4 = random.randint(1, 9)
        id5 = random.randint(1, 9)
        id6 = random.randint(1, 9)
        id7 = random.randint(1, 9)
        id8 = random.randint(1, 9)
        id9 = random.randint(1, 9)
        totalid = f"{str(id1) + str(id2) + str(id3) + str(id4) + str(id5) + str(id6) + str(id7) + str(id8) + str(id9)}"
        return totalid``` i have this function and it makes a str of 7 integers, ```py
totalid = self.makeid()

            isused2 = collection.find(totalid)
            for isused1 in isused2:
                isused = isused1["_id"]``` and i have this which basically looks in the mongo db for the id, and it should make the var the _id of it and it returns ```    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: filter must be an instance of dict, bson.son.SON, or any other type that inherits from collections.Mapping```
hollow sedge
fervent goblet
#

so I'm using lavalink and i ran into a small issue and was wondering if there a way to prevent the song from stopping midway through? I mean it doesn't stop it just not playing through the bot.

still merlin
#

Thanks

earnest phoenix
#

can someone personally help on making pages of embeds?

#

a lot of people suggested using from discord.ext import menus, but I don't understand how to use it

full mortar
#

im looking for a vps, which one do you recommend?

earnest phoenix
#

which provider? check the pins, there's a few good ones

midnight quarry
#

but on the visual studio code when i insert import discord
from discord import *

@bot.event
async def on_ready():
print("Bot Online.")

@bot.command()
async def Hi(ctx):
await ctx.send(f"Hello {ctx.author}")

bot.run("||YOUR BOTS TOKEN HERE||") this then i insert then how it come online

slender thistle
#

@drifting wedge make {"_id": totalid} the search filter

drifting wedge
#

i got it working

#

thanks

#

yep

#

i did just that!

#

thanks

slender thistle
#

aye noice

drifting wedge
#

see im learning

midnight quarry
#

but on the visual studio code when i insert import discord
from discord import *

@bot.event
async def on_ready():
print("Bot Online.")

@bot.command()
async def Hi(ctx):
await ctx.send(f"Hello {ctx.author}")

bot.run("||YOUR BOTS TOKEN HERE||") this then i insert then how it come online
@midnight quarry

#

?

slender thistle
#

@midnight quarry dear lord please don't do from x import *

drifting wedge
#

youre gunna fucking import cocklord69 from discord

#

just import what you need

slender thistle
#

from discord.ext import commands
bot = commands.Bot

#

P.S. you are using bot when it's a file and not the bot class

midnight quarry
#

so or something @earnest phoenix

earnest phoenix
#
@bot.command()
async def se(ctx, emoji: discord.Emoji):
    em = discord.Embed(title="", description="", colour=ctx.author.colour)
    em.set_image(url=f"https://cdn.discordapp.com/emojis/{emoji.id}.png")
    await ctx.send(embed=em)```

how can i get this to pull other Emotes? it keeps saying 

```fix
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 790, in invoke
    await self.prepare(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 751, in prepare
    await self._parse_arguments(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 670, in _parse_arguments
    transformed = await self.transform(ctx, param)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 526, in transform
    return await self.do_conversion(ctx, converter, argument, param)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 479, in do_conversion
    return await self._actual_conversion(ctx, converter, argument, param)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 425, in _actual_conversion
    ret = await instance.convert(ctx, argument)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/converter.py", line 444, in convert
    raise BadArgument('Emoji "{}" not found.'.format(argument))
discord.ext.commands.errors.BadArgument: Emoji ":Cute_Heart:" not found.```
hollow sedge
#

@midnight quarry bro..that's a .cs (C#) file not a .py (Python) file

#

Also thats not VS Code

merry spruce
#

How to create my bot for my server

earnest phoenix
#

thats VS

merry spruce
#

How to create my bot for my server
@merry spruce plz tell

midnight quarry
#

yes

hollow sedge
merry spruce
#

Plz tell anyone

#

@merry spruce plz tell
@merry spruce plzzzzzzz telll

#

How to make my bot for my server

#

How to make my bot for my server
@merry spruce plzzzzz tellllllll

earnest phoenix
#

@slender thistle halp

drifting wedge
#

how do i dm a user in discord py?

#

like with their id?

slender thistle
#

user = get_user
user.send

merry spruce
#

Plzz

drifting wedge
#

o ok

#

and in a command?

merry spruce
#

How to get my bot for my server plz tell

drifting wedge
#

its fine

#

thanks shiv

merry spruce
#

How to get my bot for my server plz tell
@merry spruce plzzzzzzz

slender thistle
#

the command invoker? ctx.author.send

hollow sedge
#

Omg

midnight quarry
drifting wedge
#

o ok ty tho

hollow sedge
#

Can someone address this guy

drifting wedge
#

do ppl like dms?

prime frost
#

How to set uo welcome bot

drifting wedge
#

rn im making a bug system for bug reports

#

like would ppl prefer msg in server or dm?

hollow sedge
#

do ppl like dms?
@drifting wedge if I remember correctly, you have to ask if they are ok with it before dming them

slender thistle
#

well depends on the context

#

not in commands

merry spruce
#

I am leaving

drifting wedge
#

but on resonse?

midnight quarry
#

one of this
@midnight quarry ??

merry spruce
#

DΒ₯/$

prime frost
#

How to set uo welcome bot
@prime frost any one tell

merry spruce
#

Mc

hollow sedge
#

@midnight quarry ??
@midnight quarry yes

merry spruce
#

M c

slender thistle
#

-wrongserver @prime frost

gilded plankBOT
#

@prime frost

Hey! We think you have our server mistaken. We do not provide support, help, or advice for any bot. You need to click on the "Support Server" button on the bot's page, not the "Join Discord" button at the top of our website. If there isn't a button that says Join Support Server, then we can't help you. Sorry :(

hollow sedge
#

Can someone mute this guy

merry spruce
#

Mute me

hollow sedge
#

You're just spamming

merry spruce
#

Anyone is not helping me

hollow sedge
#

Because you asked such a general question

prime frost
#

Ok

earnest phoenix
merry spruce
#

Ok

hollow sedge
#

That's a rip

midnight quarry
#

@midnight quarry yes
@hollow sedge but who of this

hollow sedge
#

@hollow sedge but who of this
@midnight quarry any of them

quartz kindle
#

@merry spruce making a discord bot requires knowledge of programming and coding

#

Do you have any knowledge about programming?

midnight quarry
stoic girder
#

That's a rip
@hollow sedge lmao

drifting wedge
#

user = get_user
user.send

#

@slender thistle get user (id)

#

?

midnight quarry
#

now?
@midnight quarry ?

slender thistle
#

user

#

yes

#

ID must ve integer

drifting wedge
#

ok ok

#

so i can do (int(id))?

hollow sedge
midnight quarry
#

yes but in the powershell

drifting wedge
#

user = get_user(int(reporter))

#

would this work?

#

it said get_user not defined

#

reoorter is a str passed in the command

#

but its a number

#

aka the user id

slender thistle
#

rtfd

#

plz

drifting wedge
#

?

slender thistle
#

Read the fucking docs

drifting wedge
#

me? alr

full mortar
#

which provider? check the pins, there's a few good ones
@earnest phoenix sorry for not answering i was looking at the pins and i think im good with that but thanks

hollow sedge
#

yes but in the powershell
@midnight quarry

  1. Open Command Prompt
  2. Type python path_to_pyfile
slender thistle
#

ctrl+f -> enter get_user

#

Boom you see which class the method belongs to

drifting wedge
#

oh lmao ok ty

pale vessel
#

funny thing is it even says in the docs url

#

god bless rtd

slender thistle
#

Amen

full mortar
#

πŸ™

drifting wedge
#

can i search mongo with a int?

midnight quarry
#

yes ok but it come > python path_to_pyfile
File "<stdin>", line 1
python path_to_pyfile
^
SyntaxError: invalid syntax

python path_to_pyfile
File "<stdin>", line 1
python path_to_pyfile
^
SyntaxError: invalid syntax

drifting wedge
#

or just str?

full mortar
#

amen

pale vessel
#

search? what do you mean

slender thistle
#

spooxico why are you trying to create a Discord bot without knowledge of a programming language

drifting wedge
#

if(collection.count_documents({"_id": reporter}) == 0):

#

if reporter is a int

slender thistle
#

Depends on what your field is set to

#

if it's integer in the database, search with int

#

Though

#

However

drifting wedge
#

hmm

hollow sedge
#

spooxico why are you trying to create a Discord bot without knowledge of a programming language
@slender thistle @midnight quarry

slender thistle
#

For IDs PLEASE use strings in the database

drifting wedge
#

oks oks

slender thistle
#

And convert them to int in the code when you need it

drifting wedge
#

o ok

#

wait so i could have done get_user(int(var))?

#

if var is a int str

#

its a int as a str

slender thistle
#

uhh

#

I got even more confused by the explanation

drifting wedge
#

lol

#

ok so the var is a str

slender thistle
#

is it a str or an int in the code

drifting wedge
#

but its a number

#

like im passing it as a str

slender thistle
#

var is something like '123'?

drifting wedge
#

yes

slender thistle
#

Then yeah using int() on it makes sense

drifting wedge
#

o ok

#

oh lmao

hollow sedge
#

For IDs PLEASE use strings in the database
@slender thistle I know this is late, but why?

drifting wedge
#

async def ba(self, ctx, bugid:str, reporter:int, approvedarg:bool, *,reason:str): would this work? like they are all one arg each

#

but reason is multiple args

slender thistle
#

IDs go past 53 bit integer

drifting wedge
#

would this work?

slender thistle
#

OR int64, I'm very unsure

hollow sedge
#

I'm storing it as a int in mongo, it's working fine

slender thistle
#

in any case I had issues manually entering IDs into my databases

#

Sure, code-wise it's fine but you'll be unable to edit it manually properly

hollow sedge
#

I see

storm knot
#

how come i can't use channel.members anymore?

#

only returns the bot as a member

hollow sedge
#

I think you need to declare the members intent

storm knot
#

Could you clarify a bit please

hollow sedge
storm knot
#

just default intents then?

#

with intents.members = True?

hollow sedge
#

Depends on what you need

#

Do you want a high accuracy member cache?

storm knot
#

aye

hollow sedge
#

You need a privileged intent then

#

It tells you how to enable it in the docs

earnest phoenix
#

OK I am under big pressure. My teacher has asked me to write a code (in any language) such that there a bunch of colors that come together and form a painting. It can be pretty simple. What language should I use and how should i do it?

pale vessel
#

if your bot is verified, it needs to be whitelisted for it

storm knot
#

if your bot is verified, it needs to be whitelisted for it
@pale vessel for intents?

#

surely you can query members without being whitelisted? (I am whitelisted by the way)

pale vessel
#

for the guild members and member presences intent

#

only query

#

you can't fetch them all in one call without it

#

so if your bot doesnt need that then its fine

storm knot
#

my bot needs to grab member ids unfortunately for a given channel

celest schooner
#

The problem stems from
redirects[cmdObj.category]

which has this error
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ misc: string; }'.

,
I wanted to add types to the values in the obj cmdObj is referring to
I thought that it was by using an interface
so I reconstructed the obj in an interface but the obj has a require() inside of it
I dont know the type for that
im using typescript
https://ramen.is-inside.me/X0RB6Vsp.png

hollow sedge
#

OK I am under big pressure. My teacher has asked me to write a code (in any language) such that there a bunch of colors that come together and form a painting. It can be pretty simple. What language should I use and how should i do it?
@earnest phoenix not sure if that's relevant to this channel..but you could use a canvas (HTML, JS)

storm knot
#

why are they making this api so damn convoluted

earnest phoenix
#

which api

#

discord's?

storm knot
#

yes

earnest phoenix
#

discord's entire development team is a mess

slender thistle
#

@earnest phoenix PascalABC

earnest phoenix
#

a side effect is that the public api suffers from bad design

slender thistle
#

Ah, a painting

#

Well a barebones train isn't hard to make in it

storm knot
#

its just pretty stupid that you are limiting peoples uses that aren't in 75 or more servers, but the people who don't have that are limited with what the API can actually do possibly making their bots useless

earnest phoenix
#

it was put in place because there were a fuckton of bots scraping and stealing data in a huge amount of guilds

drifting wedge
#
            user = get_user(reporterid)``` this is what i do to get the "reporter" user object?
#

reporter is intially a str

earnest phoenix
#

they also plan on integrating bots with slash commands in the client so they're putting restrictions in place

drifting wedge
#

that is passed on in the cmd

hollow sedge
#

it was put in place because there were a fuckton of bots scraping and stealing data in a huge amount of guilds
@earnest phoenix yeah, as your bot becomes bigger, there's more regulation. that's just how the world works, not even just discord lol

pure lion
#

Can I configure nginx to have separate domains go to different site on the same IP?

storm knot
#

yes ^

pure lion
#

Then hOw

storm knot
pure lion
#

Ah

storm knot
#

I still can't manager to get the members in a given channel using channel.members

#

even with the intent or whatever

earnest phoenix
#

are you using djs?

storm knot
#

intents = discord.Intents.default()
intents.members = True

earnest phoenix
#

oh dpy

#

give me a moment

storm knot
#

cheers

low swan
#

hello i have a problem with my python bot if there is anyone can help me about how to send photo logs at a specific channel after message deleted i will appreciate it (pm me for help ) πŸ™‚

earnest phoenix
#

then you can access all members

storm knot
#

I need to fetch them for a specific channel

earnest phoenix
#

yeah i'm aware

#

members are in a guild, the property on the channel just filters out members that can't view the channel

storm knot
#

okk I'll have a look

#

cheers

#

members are in a guild, the property on the channel just filters out members that can't view the channel
@earnest phoenix Sorry mate I am still confused - in my function I call the specific channel and loop through gathering the member.ids so I know who can view that channel - what do I need to do for that to work again as all I can see in the channel.members is the bot

earnest phoenix
#
await guild.fetch_members()
' now you do your channel code here

this should work

#

note that there's a default limit of 1000

storm knot
#

any no limit methods?

earnest phoenix
#
await guild.fetch_members(limit=None)

to get all members in a guild

storm knot
#

πŸ˜‰

#
await guild.fetch_members(limit=None)

to get all members in a guild
@earnest phoenix For the life of me I cannot get this to work - this is my code that I had prior to the channel:

    channel = ctx.channel
    for member in channel.members:
        print(channel.members)
        memberIDs.append(member.id)
earnest phoenix
#

you just put the line i sent above that snippet

#

your function need to be async ofc

storm knot
#

of course

#

this is one small part of it

#

but its definitely not getting the members

celest schooner
#

I have a problem that stems from
redirects[cmdObj.category]

which has this error
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ misc: string; }'.
,
I wanted to add types to the values in the obj cmdObj is referring to
I thought that it was by using an interface
so I reconstructed the obj in an interface but the obj has a require() inside of it
I dont know the type for that
https://ramen.is-inside.me/X0RB6Vsp.png

#

Does anyone know the type for that

tulip ledge
#

@boreal iron @quartz kindle @earnest phoenix (sorry if I pinged in a weird time for u) but if u wanna continue the competition @ me

earnest phoenix
#

I wonder what would be the easiest way to apply syntax highlighting on some kind of code on a image made from canvas

tulip ledge
#

wait so u wanna highlight code on a picture?

earnest phoenix
#

Yea like i got a codequiz command but people cheat by evaluating it easily and answering by copying so i want to put the code on a image so they can't easily copy and but i need to highlight it's syntax as well

tulip ledge
#

wdym with highlighting the syntax?

#

cuz I'm visualizing it in different ways

earnest phoenix
#

Like apply syntax highlighting to the code on the image?

#

For example

tulip ledge
#

u just mean like

let
const
function

etc

#

Like these colors?

earnest phoenix
#

If we don't apply syntax highlighting to code in the image it will appear like this

let bruh = "moment";```

But if we apply syntax highlighting to it, it should appear like this as an example
```js
let bruh = "moment";```
tulip ledge
#

yeah ok

#

I get u now

tight plinth
#

crabrave ytdl is gone crabrave

earnest phoenix
#

What happened to ytdl-core?

tight plinth
#

repo got deleted

boreal iron
#

Sry no time today, back on the road again

#

Guess Tim has won the race

low swan
#

can anyone help about how to take the bot image attachment and log it in discord.py ??

sudden geyser
#

What is the bot image attachment? What do you want to log about it (metadata, url, buffer, etc.)? Can you be more clear?

low swan
#

i made a bot that reupload users image that send i a specific channel and the bot delete their message and reupload the content as the bot

#

but i want to make logs for it

hollow sedge
#

whats the point in saving the attachment?

low swan
#

basically because the bot delete the message and reuplod it i want to log what users send the photo or the message

sudden geyser
#

Around where you create a discord.File instance, you probably want to log there (e.g. print(...)). If you want to get the user, message.author may interest you, which is user in your case.

hollow sedge
#

yes, but you do not need to save the attachment as a file on your computer or vps

earnest phoenix
#

?av

#

!avatar

sudden geyser
earnest phoenix
#

how do

sudden geyser
#

And like Cloud said, you shouldn't need to save it as a local file. You should be able to load it in-memory.

earnest phoenix
#

does anyone know where i can find a pyline for a command to restart a bot from a channel

#

i was told i needed heroku

#

to do that

low swan
#

the thing is that i want the attachment url

hollow sedge
#

@earnest phoenix what is a pyline?

sudden geyser
#

pyline like grep?

hollow sedge
#

"Pyline is a grep-like, sed-like, awk-like command-line tool for line-based text processing in Python."

#

guess you're right

low swan
#

i want to delete the authors message get the url and upload it again as bot and log it on the discord

#

if i save it on the memory it will not appear correct

hollow sedge
#

use the requests module to get the file from the url

#
file_request = requests.get(attachment_url)```
#

actually idk if that'll work

#

something like that

low swan
hollow sedge
#

..where is it breaking?

sudden geyser
#

You'll also have the attachments object you have in-memory, so I don't see what won't work about it. You save it in-memory so you have the image without saving it to a local file via fetching the image (something like aiohttp since discord.py recommends it for async work).

As for your error, see the documentation on how to create a file object out of a binary: https://discordpy.readthedocs.io/en/latest/api.html#discord.File

hollow sedge
#

^ that sounds more like it mb

drifting wedge
#

wut can i use as a replacement for ytdl core?

earnest phoenix
#

@drifting wedge check these ^

sudden geyser
#

discord-player relies on discord-ytdl-core, which relies on ytdl-core

hollow sedge
#

^

drifting wedge
#

im just putting a MUSIC ISNT WOKRING untill next update

#

when i move to lavalinj

sudden geyser
#

but does it work?

drifting wedge
#

?

sudden geyser
#

are you able to play music

drifting wedge
#

oh

#

rn no since i cant get ytdl core

hollow sedge
#

can someone explain how ytdl-core is illegal but lavalink isnt

pure lion
#

Something something lisence something

#

Ytdl downloads from YouTube

#

For free

#

Normally you need to pay

hollow sedge
#

i see

#

thanks

copper cradle
#

lavalink has nothing to do with youtube

earnest phoenix
#

its a music player

hollow sedge
#

@copper cradle it can play videos from yt tho?

#

it supports*

copper cradle
#

yes, but it just streams them

#

it doesn't download the video at all

earnest phoenix
#

Can someone tell me how to create giveaway command with requirements?

#

I use Discord.JS

#

I am first time making gw command so idk how to do it.

blissful coral
#

Discord?

split hazel
#

that's normal

earnest phoenix
#

@split hazel Wait speedy ur here?

blissful coral
#

K making sure

earnest phoenix
#

Didnt realize

split hazel
#

discord asks each shard to reconnect every once a while

earnest phoenix
#

Speedy

#

Can you help me?

eternal osprey
#

hey guys this is the first time of me scraping a website using request-promise and cheerio. I have looked at examples, docs etc. None of them tell how to actually enter the data you want to scrape

#

i want to scrape those 'eggs'

#

how would i know what they are named to eventually scrape them?

solemn leaf
#

Im having issues with my chrome extension Could I get some help with an error that not even vltrex can do :pog:

earnest phoenix
#

@eternal osprey try using xpath to select your elements

blissful coral
#
user.send(`You cannot start another game while you have one going!`).catch(err => console.log(err))
#

This should work to catch if it can't dm a user right?

earnest phoenix
#

Yes

#

You shouldn't log those errors though, because you already know what the errors will be OMEGALUL

blissful coral
#

True

#

Just .catch(err) then

proven lantern
#

catch(console.log)

blissful coral
#

Uh no that catches no matter what

earnest phoenix
#

just .catch(() => undefined)

proven lantern
#

What?

earnest phoenix
#

Just

solemn leaf
#

mans coulds I gets help lmao

earnest phoenix
#
Promise.prototype.catch(() => {})```
proven lantern
#

@solemn leaf I made a chrome extension a couple months ago. What's your question?

faint prism
#

What a well worded request for help

#

To bad they deleted it

earnest phoenix
solemn leaf
#

@proven lantern

#

Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

#

what the fuck is this ^^^ above my message

proven lantern
#

I've never seen an error like that with my chrome extension

solemn leaf
#

Can I screen share in dms

proven lantern
#

My DMs are broken

#

More people will see it here

solemn leaf
#

br

#
let port = chrome.runtime.connect(null, {
name: "mychannel"
});

document.addEventListener('DOMContentLoaded', function() {
    document.getElementById('button').addEventListener('click', onclick, false)
    
    const evalText = document.getElementById('evalText');
    
    const div = document.createElement('div')
    div.textContent = evalText.value
    document.body.appendChild(div);
    
    function onclick() {
        chrome.tabs.query({
            currentWindow: true,
            active: true
        }, tabs => chrome.tabs.sendMessage(tabs[0].id, evalText.value, sendCode));
    }

    function sendCode(code) {
        evalText.value = code;
    }
    
}, false);
#
let _port;

function testConnect() {
    _port.postMessage({
        msg: "hello from popup"
    });
}
chrome.runtime.onConnect.addListener(port => {
    console.log("connected to: ", port.name);
    _port = port;
    _port.onMessage.addListener(processMessages);
    _port.postMessage({
        msg: "hello from popup"
    });
});
(() => {
    document.addEventListener("DOMContentLoaded", () => document.querySelector("#testConnect").addEventListener("click", testConnect));
})();
#
chrome.runtime.onConnect.addListener(port => chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => {
    let evaled = eval(request.toString());
    if (evaled instanceof Promise) evaled = await evaled;
    return sendResponse({
        code: evaled
    });
}));

chrome.runtime.connect();
#

@proven lantern there

eternal osprey
#

hey guys

#

why does my code refuse to work?

#
const request = require('request-promise');
const Discord = require("discord.js");
const cheerio = require('cheerio');

(async () => {
    
    
const url = 'https://nycpokemap.com/gym.html';

const response = await request(url);

const $ = cheerio.load(response);

let title = $('div[class="leaflet-popup-content"] > b').text();

console.log(title);
    
 
})```
#

it does not when i debugg it.

#

it just quits seconds after.

solemn leaf
#

bcs yur formattingis trash

eternal osprey
#

thnx

solemn leaf
#

np

eternal osprey
#

could you maybe rather be a bit more helpful?

solemn leaf
#

why you async nothing

eternal osprey
#

i saw in the docs that cheerio needed async functions

#

and the async wraps the whole function

#

and i am using await

#

which can only be used in async function

sudden geyser
#

@earnest phoenix I may be dumb, but is it because you're doing client.emit("ready", client); at the top of auto-message.js?

solemn leaf
#

could I get sme help

proven lantern
#

@solemn leaf what does the manifest.json look like?

solemn leaf
#
{
    "name": "Test",
    "version": "1.0",
    "description": "h",
    "manifest_version": 2,
    "content_scripts": [
        {
            "matches": ["http://*/*", "https://*/*"],
            "js": ["content.js"]
         }
    ],
    "browser_action": {
        "default_popup": "popup.html",
        "default_title": "Testing"
    },
    "background": {
        "scripts": ["background.js"]
    }
}
proven lantern
#

is background.js the script using chrome.runtime.connect?

solemn leaf
#
chrome.runtime.onConnect.addListener(port => chrome.runtime.onMessage.addListener(async (request, sender, sendResponse) => {
    let evaled = eval(request.toString());
    if (evaled instanceof Promise) evaled = await evaled;
    return sendResponse({
        code: evaled
    });
}));

chrome.runtime.connect();
proven lantern
#

i think only background scripts have access to chrome.runtime

solemn leaf
#

I wouldnt know

proven lantern
solemn leaf
#

stop trying

#

that didnt fix anything

hollow sedge
#

Wow

blissful coral
#
client.on(`messageReactionAdd`, async (reaction, user) => {
#

When I react

hollow sedge
#

He's trying to help you and you say "stop trying"?

blissful coral
#

Partials are enabled

proven lantern
#

lol

blissful coral
#

WHAT DE FUCK

hollow sedge
#

Maybe because you need to get the reaction and the user?

#

Nvm

#

That's weird

#

Why is it a string tho

blissful coral
#

Why is id a string?

#

That is in console

hollow sedge
#

Nvm forget I said that

#

Also

blissful coral
#

wtf

sudden geyser
#

The ID is too large for JS to accurately represent as a number btw.

blissful coral
#

I console log at the top

hollow sedge
#

That is weird

#

The ID is too large for JS to accurately represent as a number btw.
@sudden geyser ah I see

blissful coral
#

and it outputs the ID

#

The scopes aren't messed up

#

I literally console.log the line above and it works

#

hmm

sudden geyser
#

When you do console.log(user.id), is that's whats undefined? Could you reiterate your situation

blissful coral
#

Cannot read property 'id' of undefined

#

I console.log(user.id) right above that line and it outputs the ID correctly.

proven lantern
#

change to arrow function

blissful coral
#

?

#

That isn't the problem?

proven lantern
#

function() => ()=>

#

scoping works differently

#

vars are hoisted with function

blissful coral
#

Same thing

proven lantern
#

dang

blissful coral
#

Not the problem

proven lantern
#

did you change the function that is passed to the first connection.query?

blissful coral
#

Yes

sudden geyser
#

@blissful coral could it be coming from reaction.message.id or reaction.guild.id?

blissful coral
#

I checked lines

#

It is the line I showed you

#

It isn't a partials error

#

hmm

#

Weirdest error I have ever had ngl

sudden geyser
#

If you were able to log the user ID at the top, it's not coming from user.id where you're pointing at.

blissful coral
#

Look at line # s

#

That is the whole event

#

Top to the error

#

I found it

#

wtf

#

is this

solemn leaf
#

error handler cough cough

blissful coral
#

Yeah yeah

#

I don't have it yet on this bot

#

lmao

solemn leaf
#
if (error) {
    error.fix()
}.catch((error) => {
    error.fixHarder()
});
proven lantern
#

you promise you changed the function on line 82 to an arrow function?

solemn leaf
#

@blissful coral boom error fix

blissful coral
#

lmao

#

@proven lantern reverted to see something

#

I found the error anyway

solemn leaf
#

ben keep giving me links I already looked at 5 hours ago

blissful coral
hollow sedge
#

Wow you treat the people who try to help you very nicely

solemn leaf
#

Who tf asked you

hollow sedge
#

People are not obligated to help you

solemn leaf
#

ik they arent

hollow sedge
#

So be thankful that someone wanted to help you

#

Who tf asked you
@solemn leaf wow I haven't heard that one before

sudden geyser
#

@blissful coral was the error reaction.guild.id

blissful coral
#

We don't talk about my dumbass not looking at col #

#

Sorry for wasting time <3

drifting wedge
#

how do i send 2 embeds as one message? dpy?

tired nimbus
#

Why is it that when I create a new column in my better-sqlite3 table

stmt.run();

The value can be changed to integer or a string

sudden geyser
#

0Exe I don't think you can do that unless you're using a webhook.

blissful coral
#

How do I remove a reaction from a certain user in the reaction event

#
reaction.remove(user.id)```
is not correct
tired nimbus
#

its in docs

blissful coral
#

I couldn't find the correct one

placid iron
#

await it?

tired nimbus
#

it tells you properties in a reaction

placid iron
#

await reaction.remove(user)

blissful coral
#

That removed all reactions.

tired nimbus
#

its in docs

blissful coral
#

Link

placid iron
#

i dont understand why it removed them all

#

that only removes one

blissful coral
#

Yeah ik

placid iron
#

so your code must be messed up

blissful coral
#

.>

tired nimbus
#

you use discordpy?

blissful coral
#
client.on(`messageReactionAdd`, async (reaction, user) => {
await reaction.remove(user)
}```
#

No

#

Djs

tired nimbus
#

reaction.users.remove

earnest phoenix
#

How do I make an array to ban the ids?

sudden geyser
#

Add each ID to the array, then iterate over every element banning the list of users you want.

earnest phoenix
#

how were they doing xd? @sudden geyser

sudden geyser
#

wot

earnest phoenix
#

As arrays are created, never use .-.

#

take highlightjs code and adapt it to image generation

#

bruh How's that gonna be converted into an image so it can be highlighted

#

i

#

i didnt mean that lol

#

i said adapt it for a reason

#

take the logic that recognises language syntax and adapt the coloring to be done in image generation instead of html elements

#

there's also the lazy way of just screenshotting a page that has hljs with puppeteer

#

OMEGALUL Well puppeteer doesn't work on my host

#

thinkingLol Well lemme try something

inner badger
#

Hi

faint prism
#

Does anyone else immediately decode any base64 hashes they run into

karmic arrow
#

My bot's presence has disappeared (e.g. "Playing on X servers"). Any ideas why this happens and how i can fix this? I use discord.js and set the presence every time the bot joins a new guild. Also, is it not recommended to update the presence on every guild join?

faint prism
#

@karmic arrow I just do a setInterval every 4 hours once the bot gets the Ready event

stoic girder
#

My bot just hit 75 guilds, I submitted the application for verification. Now it's already at 79. What if it hits 100 before it gets approved?
Will it be able to join more servers?

karmic arrow
#

@faint prism ok thank you, i was thinking of doing something similar. Does the status disappear if not regularly updated after 4 hours, or is there another specified time limit?

faint prism
#

I just found that 4 hrs seemed to be a good amount of arbitrary time. Since my status would disappear sometimes twice a day

hollow sedge
#

@earnest phoenix idk if you found an answer yet but you may be able to use highlight.js

#

its a huge stretch

#

idk that might be a terrible way of doing it

boreal iron
#

I just found that 4 hrs seemed to be a good amount of arbitrary time. Since my status would disappear sometimes twice a day
@faint prism Just to show u a different way...
I’m using a timer every 60s calling my updatePresence function.
Instead of updating the presence every 60s the function compares the current amount of guilds to a var.
This var got it’s initial value in the READY event (guilds.length)
If current amount of guilds = my var the function just returns.
Only two events will change the value of my var:
GUILD_CREATED (var++), GUILD_DELETED (var- -)
At the end the timer will update the bots presence every 60s only if the amount of guilds has changed (after the ready event)

#

My bot hasn’t lost his presence ever, not within a few hours or days/weeks of runtime

#

(Watching XXX server)

faint prism
#

Or I do it every four hours. It's just a help prefix for mine, so eh

boreal iron
#

Sure it’s just a different way to keep the status up to date just in time.

alpine basin
#

if your looking for something free

lilac gorge
#

..

alpine basin
#

The only option is kinda heroku

#

But

blissful coral
#

No

alpine basin
#

Its not good

blissful coral
#

Heroku is horrible

alpine basin
#

If your willing to pay

#

Digital ocean

lilac gorge
#

.

#

what da hell is dis

blissful coral
#

Use galaxy gate cheapest vps

lilac gorge
#

this isnt among us-

blissful coral
#

Ofc not?

alpine basin
#

It is not

blissful coral
#

Lol

alpine basin
#

you are right

lilac gorge
#

Use galaxy gate cheapest vps
@blissful coral Are you talking to me?

blissful coral
#

No

alpine basin
#

Use galaxy gate cheapest vps
@blissful coral wtf is that

lilac gorge
#

mmm ok

alpine basin
#

I've never heard of it

#

is it actually food?

blissful coral
#

The best vps

lilac gorge
#

.

alpine basin
#

im 12 years old i cant pay lol
@loud geyser and uh

#

Ya mind

#

reading discord tos

lilac gorge
#

o.O

blissful coral
#

Free ban

lilac gorge
#

mhmmmmmm

blissful coral
#

No you didn’t

alpine basin
#

you sure?

blissful coral
#

Your trying to cover it up

lilac gorge
#

😐 ive seen 8 year olds on here its not as bad

alpine basin
#

Im allowed to ping staff for this right?

blissful coral
#

@drowsy crag

#

No

#

Just mention a single one

#

No you said 12

alpine basin
#

Thats what I meant lol

lilac gorge
#

@lilac gorge bruh do u even know what it is
@loud geyser can u stfu thanks

blissful coral
#

Stop toxicity

alpine basin
#

Time to waiot for mods Ig

lilac gorge
#

soryyyyyyyy

blissful coral
#

Already aware pinguin

#

Penguin* sorry

lilac gorge
#

Turtles

#

okay back to coding i go

blissful coral
#

Should follow tos :)

lilac gorge
#

..

alpine basin
#

Ye

#

Probably

#

Rip he got ban

blissful coral
#

Handled

#

:)

lilac gorge
#

is python the best coding language

blissful coral
#

Preference

#

Preferably, for discord bots JavaScript is the best

lilac gorge
#

ok

blissful coral
#

ease of use is python

lilac gorge
#

wAlP

sudden geyser
#

There's no one best programming language.

lilac gorge
#

i got tomato juice on me nooooooooo

sudden geyser
#

A language has its pros and cons.

blissful coral
#

Hence why I said preferably

#

lol

lilac gorge
#

doesnt yag bot use python

blissful coral
#

yag.xyz? or whatever it is

lilac gorge
#

ye

blissful coral
#

pdb or something

#

Can check

lilac gorge
#

rip

blissful coral
#

Not on top gg

lilac gorge
#

okay i shall finish coding and my tomatos

blissful coral
#

hm

lilac gorge
#

they took it off i think

blissful coral
#

Yes it is python

lilac gorge
#

hehe alr

#

ohhh

#

yag isnt on top gg because it has its own website 😐

deep hearth
hollow sedge
#

yag isnt on top gg because it has its own website 😐
@lilac gorge it could still be on top.gg

lilac gorge
#

Ik

hollow sedge
#

As in they could still list it with their website connected to their bot's page

lilac gorge
#

Ik but, they didnt want it on the website

hollow sedge
#

Where did they say that

lilac gorge
#

Are you in the support server 😐

hollow sedge
#

Nope

still cliff
#

YAGPDB.xyz is not built with Python. It's built with Go.

tame kestrel
#

Anyone got any optimized ways of checking a deep dif on two objects?

#

js?

trim saddle
#

@tame kestrel instanceof lol

tame kestrel
#

wot

solemn leaf
tame kestrel
#

like what I'm trying to do is compare two objects and get the differences in properties

// input
const a = { prop1: 2, prop2: 2 };
const b = { prop1: 3, prop2: 2 };
// output
// {prop1: [2, 3]}```
solemn leaf
#

hmm

tame kestrel
#

At the moment I can just loop and manually check, which I guess is the best way

solemn leaf
#

Wait

#

make a fucntion

tame kestrel
#

well yeah @solemn leaf

solemn leaf
#

function Compare(prop1, prop2, prop3, prop4) {

}

#

?

#

you in ts

tame kestrel
#

ye

#
function deepDif(first: Role, second: Role) {
    Object.keys(second).filter((roleProp: string) => {
        return !isDeepStrictEqual((first as any)[roleProp], (second as any)[roleProp]);
    });
}```
solemn leaf
#

cool

tame kestrel
#

Let me strip it of ts real quick

solemn leaf
#

lmao

tame kestrel
#
function deepDif(first, second) {
    Object.keys(second).filter((property) => {
        return !isDeepStrictEqual(first[property], second[property]);
    });
}```
#

is there any better way of doing this?

hollow sedge
#

did you..even look at the link i sent?

tame kestrel
#

I was getting around to it

solemn leaf
#

yeah do

tame kestrel
#

The idea behind it is similar, looking for the intersection of keys

#

it basically follows that I wrote, so I guess what I have is about as good as it gets

solemn leaf
#

gl

hollow sedge
#

seems to be different from the other ones

tame kestrel
#

I think the efficiency comes from doing the list with the least amount of properties, but because I am not using intersecting keys, I have to do every property

#

If anything, both objects are expected to have the same amount of properties, just changed values

drifting wedge
#

For dpy on member leave or on member remove, what difference

#

?

#

For member leaving

sudden geyser
#

the guild member leaving via Leave Guild vs. being removed via kick/ban/etc.

drifting wedge
#

I don’t think so

#

Not In my experience

#

It’s just been on member remove

#

But my logs broke

slender thistle
#

there's no on_member_leave

drifting wedge
#

So I’ll need to check again tmr

#

Oh lmao

#

Makes sense

#

On member remove then?

waxen tinsel
#

Yes

slender thistle
#

Mhm

hollow sedge
#

@sudden geyser on_guild_remove is when you are removed from the server

drifting wedge
#

It’s just removed or leave

#

You need audit logs

sudden geyser
#

Safe I don't think trying to pick the one with the least amount of properties will help as it should short-circuit as soon as one field isn't equal

drifting wedge
#

To check that

slender thistle
#

either by manually leaving or being kicked/banned

#

Correct 0Exe

drifting wedge
#

Ok ok

#

Thanks

waxen tinsel
#

You cannot specifically determine if a user left or was kicked via the event alone

#

Sadly

drifting wedge
#

U need audit logs

#

Shiv you do flask?

waxen tinsel
#

Thats one way to do it

slender thistle
#

A bit

waxen tinsel
#

I run a flask app

sudden geyser
#

@hollow sedge there's only on_guild_join and on_guild_leave and those only apply to the client, not a user.

drifting wedge
#

IMO python is the best, its ez to get a hang but can go a long way

hollow sedge
#

@sudden geyser no? there is on_guild_remove

tame kestrel
#

Safe I don't think trying to pick the one with the least amount of properties will help as it should short-circuit as soon as one field isn't equal
@sudden geyser The goal is to weed out objects with non equal properties

drifting wedge
#

Yes but no on guild leave

sudden geyser
#

yeah cloudfox I made a mistake

#

meant remove

hollow sedge
#

??

#

oh ok

#

the way you said that makes it sound like i made a mistake

sudden geyser
#

bad wording of mine notlikenoot

slender thistle
#

xd bad Lite

drifting wedge
#

Why isn’t this server partnered?

waxen tinsel
#

Huh

drifting wedge
#

Like it could,def be

#

Also verified

slender thistle
#

Retention requirement not met, also #general mmLol

drifting wedge
#

O ok

earnest phoenix
trim saddle
#

send is undefined

earnest phoenix
#

I did not understand how that is

pale vessel
#

read

#

change message to collect

earnest phoenix
#

understood thanks

wheat temple
#

Haha

trail orchid
#

hi I'm trying to think of a place where I can host a webhook server for free in order to receive webhooks from the dbl api

#

does anyone have any suggestions?

#

right now I'm thinking of using an ngrok server on heroku, where my bot is currently hosted

#

I am not sure if that would work though

fiery sierra
#

if you haven't registered for AWS before you can run that for free for a year. if you use the free tier ec2 instance

trail orchid
#

hm okay