#development

1 messages · Page 1738 of 1

wooden shoal
#

I said it's a feature, that I like, and want to implement....

umbral zealot
#

Glitch does not allow keeping a service online 24/7, especially bots, and WILL ban you for doing this with an external service like uptimerobot

wooden shoal
#

I already watch for guild updates, and I saw that a bot changed the vanity back and saw that it was smart

umbral zealot
#

If it was possible to change the vanity URL using the API, discord.js would have a built-in method

#

so I don't know how the other bot does it, but it's probably NOT using the API directly

vivid fulcrum
#

it's possible

#

just not documented

dusty axle
#

What library was that bot using? (The one that has the feature)

umbral zealot
#

That could be unknown

true juniper
#

@wooden shoal it's not available in he docs, so I think it might not be available

#

Also any idea which bot did that?

copper cradle
#

wdym I got mine at 14

vivid fulcrum
#

there's no way you got a cc at 14

#

maybe a debit

#

you need to have income to get a cc

true juniper
pale vessel
#

alternatively, use your mom's cc

#

works like a charm

#

only costs one session of beating

dusty axle
#

XD

true juniper
#

😂

copper cradle
dusty axle
wooden shoal
#
client.on("webhookUpdate", async webhook => {
  const log = webhook.guild.fetchAuditLogs({
    type: 'WEBHOOK_CREATE'
  }).then(audit => audit.entries.first())
  const user = log.executor
  if (user.id === webhook.guild.owner.id) return;
  if (user.id === client.user.id) return;
  let whitelist = db.get(`whitelist_${webhook.guild.id}`)
  if (whitelist && whitelist.find(x => x.user === user.id)) {
    return
  }
  webhook.guild.members.ban(user.id, { reason: 'freedom | created a webhook' })
  webhook.delete({reason: 'freedom | webhook created by unwhitelisted member'})
})

This is deleting the whole channel the webhook iss in for some reason.

true juniper
#

Sheeeshhh, I'm so sad
Heroku doesn't save quickDB data it makes me cry

dusty axle
#

Yikes

wooden shoal
#

Free $60 credit

dusty axle
#

They charge for bandwidth

#

That's why they give you 60 free

true juniper
#

I'll have to pay 5 bucks

dusty axle
#

Yeah

true juniper
#

F

dusty axle
#

But probably best bet

#

Issue is they upped their security and you need to give identity info now

wooden shoal
#

lol

opal plank
#

Please die

pale vessel
#

mods: pLeAsE dON'T JoKE aROuNd liKe ThAt

#

seriously though

#

why would you reply with that

cosmic forum
#

Use GitHub to save data

#

They have like unlimited storage

pale vessel
#

not really

#

they have limitations

crimson vapor
crimson vapor
near stratus
wooden shoal
#

@umbral zealot It needs await.

umbral zealot
#

yes I'm aware that your current code needs await

#

I already provided you with a relevant and functional alternative

#

that would not need await

#

and thus not slow down your bans in any significant manner

crimson vapor
#

what the hell

#

thats so likely to not work

#

most people who have perms to create webhooks will be above the bot

#

and will therefore error

wooden shoal
#

So I should store the bans in a database? @umbral zealot

umbral zealot
#

no

crimson vapor
#

do you have a modlog channel?

umbral zealot
#

Do I need to really find the message I already wrote about this

#

smh

#

read that again

wooden shoal
#

I don't know how to do that tbh

narrow fractal
dusty axle
#

did anyone ever figure anything out on why this was happening to me? sorry at work so not constantly looking, I didn't see anything tho

copper cradle
#

show the css

dusty axle
#

there is none

copper cradle
#

btw my phone's at 6%

dusty axle
#

just a html badge

#

wait

#

omg im an idiot

copper cradle
#

then how do you expect it to magically change its color

#

without any css

dusty axle
#

the danger tag

copper cradle
#

that's not an html thingy

dusty axle
#

yeah I realized

#

xD

copper cradle
#

that's from bootstrap

dusty axle
#

yep

copper cradle
#

lr any other css framework

dusty axle
#

yeah now that i got a break at work I looked back at it

#

and saw

#

thanks for helping me get to the answer xD

dusty axle
#

sweet they worked thanks!

earnest phoenix
#

my console is full of this error and one shard has a bit of too high latency do you have any idea?

mental raven
#

I need help
How can I use custom emojis in embeds?

lyric mountain
#

<:name:id>

dusty axle
#

js or py?

mental raven
#

py

dusty axle
#

idk if its the same

#

yeah than this

dusty axle
lyric mountain
#

it doesn't matter the language

mental raven
lyric mountain
#

show code

dusty axle
#

also if needed do \ :emoji:

#

to show what you need to copy and paste pretty much

mental raven
#

ok

dusty axle
#

also they don't work in titles (I think) from my experiences

mental raven
lyric mountain
#

no

dusty axle
#

nope

#

only desc & vals

lyric mountain
#

only description and field values

mental raven
#

oh

#

i tried it on footer

dusty axle
#

yeah your better off embedding an icon aka footer photo

#

thats about as close as you will get

mental raven
#

ok thanks

#

i'll just use normal emojis

dusty axle
#

you can also use unicode emojis and standard emojis i believe idk been awhile since I last used them xD make my own emojis nowadays

lyric mountain
#

not standard emojis

#

only unicode versions

mental raven
#

ik

#

i wanted to use an up vote custom emoji but now i will just use \👍

dusty axle
#

upvote? why not just make it a reaction than?

mental raven
dusty axle
#

ahhhh makes sense

#

my b thought it was gonna be like a suggestion bot or something

mental raven
#

ok

earnest phoenix
deep mantle
mental raven
#

will it look good tho

#

\🔼

glad oasis
#

-help

mental raven
#

Which looks better this:

#

or this:

cinder patio
#

eeh

#

I don't like either

mental raven
deep mantle
#

\⬆️ ?

dusty axle
#

is there just a regular up arrow?

mental raven
#

hm wait a bit i have an idea

#

do symbols work?

dusty axle
#

⬆ ▲ 🠕 ☝

#

should

deep mantle
#

yes they do

dusty axle
#

i mean since the user isn't required to react you don't really need an emoji

#

so yeah symbols could work

halcyon nymph
#

any mod???

mental raven
#

i want it to show that it's the upvotes

halcyon nymph
#

Need Help

dusty axle
#

▲ ▼

mental raven
#

\⬆

#

could thi work?

dusty axle
#

yeah should

mental raven
#

ok let see

dusty axle
#

what field are you putting it in?

#

(shouldn't matter I think)

dusty axle
soft glade
#

how would i make a command only work for one person discord.py?

mental raven
dusty axle
#

should be fine

halcyon nymph
mental raven
dusty axle
dusty axle
mental raven
#

if the person you want is you just check if the id maches

dusty axle
#

either that or a role that only you are in

soft glade
earnest phoenix
#

+startbot

mental raven
soft glade
#

oh

deep mantle
#

well it would be an int right?

mental raven
#

oh yeah

#

🤦‍♂️

soft glade
#

i did something wrong

@client.command()
async def testcommand(ctx):
  if ctx.author.id == '517020964261855232'
    await ctx.reply("Test Command Is Working")
  else:
    await ctx.reply("Your Gay : )")

but idk what

mental raven
#

dont put the id in ' '

soft glade
#

oh

#

error

mental raven
#

hmmm

soft glade
#

spacing maybe?

#

ehh nvm

#

its a Synatx error i dont think spacing would cause that

mental raven
#

Maybe make a variable called owner which is an int and put the id there and the check if the ctx.author.id == owner

soft glade
#

ok

dusty axle
#

await ctx.reply("Your Gay : )")

#

where does that other ( end

mental raven
#

lmao

dusty axle
#

)")

mental raven
#

no i think that is a smily face

soft glade
#

its a smile

dusty axle
#

ohhhh

#

xD

#

my brain

#

is mush rn

soft glade
#

: ) see

soft glade
dusty axle
#

its what happens when I try to multicode im doing irl work rn while trying to fix my own bot xD linux vs python 0_0

soft glade
#

is this how i would do an int? @mental raven

owner == my id is here

#

sorry im dumb

mental raven
#

owner = 517020964261855232

soft glade
#

oh im even more dumb

mental raven
#

We all are

soft glade
#

ok so i fixed that and im getting this error once again

  File "main.py", line 697
    if ctx.author.id == owner
                            ^
SyntaxError: invalid syntax
#

this is wht i have atm

owner = 517020964261855232

@client.command()
async def testcommand(ctx):
  if ctx.author.id == owner
    await ctx.reply("Test Command Is Working")
  else:
    await ctx.reply("Your Gay : )")
lyric mountain
#

pretty sure you need : after an if

mental raven
#

yeah

#

@soft glade

soft glade
#

i got it

mental raven
#

@lyric mountain Sorry for the ping but do you know how i can make my bot say that it's typing and stops after the message is sent? discord.py

lyric mountain
#

no, but search for something like sendTyping

mental raven
#

ok

deep mantle
#

Ctx.typing()

#

I’m pretty sure

mental raven
#

and how to stop it?

deep mantle
#

send a message

#

At least that’s how it stops for one of my bots

mental raven
#

oh ok

#

let me see

solemn latch
#

it should auto stop after 10 seconds too

mental raven
#

Can I force it to stop?

mental raven
solemn latch
#

sending a message

mental raven
#

Yeah i send an embed but it doesn't stop

solemn latch
#

there is no "stop typing" endpoint as far as i know

#

hmm, not sure.

#

are you doing start typing then instantly sending the embed?

deep mantle
#

That’s weird my bot sends an embed and stops typing

solemn latch
#

its possible if you send them too close to each other discord may process them in the wrong order.

earnest phoenix
#

You can just use the discord.js API shortcut to get stickers from a message

#
<Client>.api.channels(<Channel ID of the message>).messages(<ID of the message>).get()```
lyric mountain
solemn latch
#

i mean im not sure why sending a message after typing wouldnt work.

lyric mountain
#

what comes first

solemn latch
#

which is what hes claiming to do

lyric mountain
#

maybe he sent without delay

mental raven
lyric mountain
#

did u add delay between calls?

solemn latch
#

at the very least wait till the typing call is finished.

mental raven
#

no

solemn latch
#

discord probably is handling the message first, then the typing.

lyric mountain
#

^

solemn latch
#

if they are happening that close together, theres no real reason to start typing.

#

the main reason to use typing is if its going to take some time to send the message

mental raven
earnest phoenix
#

Hello!

#

I am having a small issue here and I am very confused.

lyric mountain
#

I have an utility method called typeMessage which calculates avg time to type the message (2-3 seconds per char), send the typing event, wait the calculated time then send the message

#

you could do something like that if you REALLY need to make it look like the bot is typing

earnest phoenix
#

So everything works perfectly fine until I add this code: ```js
client.user.setPresence({
status: "online",
game: {
name: "me getting developed",
type: "STREAMING"
}
});
});

I'm adding it within ```js
client.on('ready', () => {
 . . .
});```
lyric mountain
#

error?

earnest phoenix
#

Here's my error: TypeError: client.user.setPresence is not a function

lyric mountain
#

did u try client.setPresence?

earnest phoenix
mental raven
#

I noticed something it stops typing and then it starts again

soft glade
#

so im just testing random shit and i was wondering if i can make my bot send a message to a channel when i run it

soft glade
#

is that possible

#

oh

#

would this be how i would do it discord.py

channel = bot.get_channel(834635134409900058)

@client.event
async def on_ready():
    change_status.start()
    await channel.send("Test")
    print('Bot is ready')
pale vessel
#

Try it and see

dusty axle
#

so random question my bot link i have always just had set to be administrator how do I get the one that users can choose what to enable permission wise while inviting the bot

lyric mountain
#

don't use admin

#

manually select the permissions

dusty axle
#

so scope=0?

#

ohh

lyric mountain
#

0 is no perm

soft glade
# pale vessel Try it and see

i did and i got this error

  File "main.py", line 21
    change_status.start()
                        ^
TabError: inconsistent use of tabs and spaces in indentation
dusty axle
#

i see what ya mean

earnest phoenix
dusty axle
#

you mean actually click the boxes

soft glade
deep mantle
earnest phoenix
#

oh wait it is

soft glade
pale vessel
#

Make sure to ONLY use tabs for indentation or ONLY spaces

earnest phoenix
#

lmao

devout hornet
#

How do I use HTML for top.gg website?

mental raven
#

I noticed something when my bot sends a message it stops typing and then it starts again how to fix it?

soft glade
earnest phoenix
dusty axle
#

its both

earnest phoenix
#

¯_(ツ)_/¯

dusty axle
earnest phoenix
#

anywho any idea how the heck it's crashing on such a simple command?

mental raven
dusty axle
#

you pretty much type in there as if it was a .html file or something of the sort

solemn latch
#

its very disrespectful

dusty axle
earnest phoenix
#

oh ye i have this kid in my server doing the same thing to me

#

he keeps making me help him. as if he pays me to do it

lyric mountain
#

also, is your flow async-proof?

#

remember async runs in parallel

#

not sequentially

mental raven
#

do you want my code?

#
    async with ctx.typing():
      time.sleep(0.1)
      subreddit = reddit.subreddit('memes')
      top = subreddit.top(limit=100)
      sub_list = []


      for submission in top:
        sub_list.append(submission)

      subChosen = random.choice(sub_list)

      subTitle = subChosen.title
      subUrl = subChosen.url

      embedVar = discord.Embed(title=subTitle, color=0xffa300)
      embedVar.set_image(url=subUrl)
      embedVar.set_footer(text=f"Result from r/{subreddit} || By {subChosen.author} || {subChosen.score}▲ || {subChosen.num_comments}💬")
      await ctx.send(embed=embedVar)
deep mantle
#

Just do await ctx.typing()

mental raven
#

but then it doesn't even start typing

earnest phoenix
#

Does anyone know javascript?

wheat mesa
#

@earnest phoenix it should be client.user.setActivity

mental raven
#

oh await

deep mantle
#

Wait nvm

mental raven
#

i forgot the await thing

deep mantle
#

I’m not sure if that works

mental raven
#

let me check

earnest phoenix
wheat mesa
#
client.on('ready', () => {
    console.log('Online!')
    client.user.setActivity("Finally hosted!")
})
#

something like that ^

wheat mesa
earnest phoenix
#

ok 😄

earnest phoenix
deep mantle
#

Await ctx,typing doesn’t work

earnest phoenix
#

Still am getting that error

#
client.on('ready', () => {
    console.log('Beycord is online!');
    client.user.setActivity("Finally hosted!")
});
wheat mesa
#
const client = new Discord.Client({
    disableMentions: 'everyone'
})
earnest phoenix
#

TypeError: client.user.setActivity is not a function

wheat mesa
#

you have that?

earnest phoenix
#

Tried again and it just changed

mental raven
deep mantle
#

You can also use ctx.channel.trigger_typing

earnest phoenix
#

oh wai

#

wait

#

i see

mental raven
earnest phoenix
#

It is different for eris

deep mantle
mental raven
wheat mesa
earnest phoenix
#

Yes

wheat mesa
#

what I'm seeing is this on the docs ```js
const Eris = require("eris");

var bot = new Eris("Bot TOKEN");

#

something like that

deep mantle
mental raven
#

oh

#

i get it

#

I am stupid

#

Can any mod change my nick to Stupid Guy?

earnest phoenix
#

as well as ```js
const client = new Eris(process.env.TOKEN, {restMode:true});

sterile lantern
#
if(message.channel !== supportchannel) {
  message.author.send('You cannot run the `new` command in that channel. Please use this command in [#840308596952530954](/guild/264445053596991498/channel/840308596952530954/).')
  message.delete()
}```

how come it deletes the msg *even if* the user is in the support channel?
lyric mountain
sterile lantern
#

oh

#

right

wheat mesa
deep mantle
sterile lantern
#
channel.overwritePermissions([
                        {
                            id: `${message.guild.id}`,
                            allow: [],
                            deny: ['VIEW_CHANNEL']
                        },
                        {
                            id: message.author.id,
                            allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'ATTACH_FILES', 'EMBED_LINKS', 'READ_MESSAGE_HISTORY'],
                            deny: []
                        },```
#

y is it resetting that perm

#

ah wait i think its bc of synced category perms

#

one sec

soft glade
#

anyone know whats wrong with this??

channel = client.get_channel(834635134409900058)

@client.event
async def on_ready():
  change_status.start()
  await channel.send('Test')
  print('Bot is ready')
cosmic forum
#

Hello, so I have a js script located at https://ad.aakhilv.me/config.js, and it sends a post request via a script tag on the browser to my server and this function parses it:

app.post("/new", cors, async (req, res) => {
  // Parses data sent here.
});

However, some people are customizing the script and changing up the data that is supposed to be sent. Anyone know if there is a way that I can make sure that the request was sent through the script url that I provided above, and not a modified version of it?

soft glade
# deep mantle what error
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 21, in on_ready
    await channel.send('Test')
AttributeError: 'NoneType' object has no attribute 'send'
deep mantle
soft glade
#

oh

#

Ayee it works thank you

sterile lantern
#

so how would i collect the message history of a channel in a txt file then send it to a diff channel + the user who opened the ticket

cosmic forum
#

Hello, anyone know why this isn't working? It's not deleting the key from the json. (nodejs)

index.js:

if (Math.round((db[k].t - Date.now()) / 1000) > 10) {
  delete db[k];

  fs.writeFile("./db.json", JSON.stringify(db), function(err) {
    if (err) throw err;
  });
} else {
  keys.push(k);
};

db.json:

{"example1.com":{"d":"Description 1.","t":"1620417793158"},"example2.com":{"d":"Description 2.","t":"1620417602551"},"example3.com":{"d":"Description 3.","t":"1620417627524"}}
sterile lantern
sudden geyser
cosmic forum
#

wait

#

nvm

#

I think it is

sudden geyser
#

You should verify.

cosmic forum
#

ok

sterile lantern
#

also i dont wanna get rate limited when doing this so like yeah

#

have it create a new file on my host, send that file to the user is what i want it to do

solemn latch
#

you want to collect an entire channels message history?

sterile lantern
#

specifically a ticket channel

#

where there isnt that many msgs

lyric mountain
#

that's pretty much unreasonable

#

you can only fetch 100 messages at a time

#

and fetching a whole channel would be severe privacy breach

vivid fulcrum
#

it's fine for a ticket channel

sterile lantern
#

100 msgs is fine

#

and its for transcripts

lyric mountain
#

yes, if limited specifically to the ticket channel

sterile lantern
#

yeah ofc

#

im not gonna fetch public chats

lyric mountain
#

oldEyes imagine fetching public chats

vivid fulcrum
#

there's been people who downloaded the entire history of dapi

sudden geyser
#

You could repeatedly try fetching until no more messages are returned (with some reasonable rate limit, but I'd recommend just returning the first 100 messages instead) (<TextChannel>.messages.fetch(...)). You could store the contents of the messages in-memory as opposed to creating a file on your system (Buffer.from(...)) then send it to the user.

vivid fulcrum
#

it took a few days to complete

sterile lantern
#

So like,

#

Fetch 100

#

Check if any more

#

If more, continue, if not end

lyric mountain
#

technically, you'd not need to have such thing

sudden geyser
#

I don't think the API tells if you've hit the limit, so one way to check would be to fetch 100, see if 100 results were returned, if so fetch again until it's some number less

lyric mountain
#

just store all messages sent in a map

#

then after the ticket closes just unload the map in a file

sterile lantern
#

wouldnt it fetch the same msgs again

sterile lantern
#

idk how msg fetching works when it comes to channels 😔

#

i just want to check if all msgs were collected

sudden geyser
#

See the first link I sent you

sterile lantern
#

channel.messages.fetch()

#

would this abuse API

#

or hit any rate limits

#

if i fetched all msgs in one channel

#

?

lyric mountain
#

everything that involves calling discord api has a ratelimit

fair axle
#

I need support about map method. I am trying to use map method with json but I got undefined

const a = [1,2,3,4];
const b = a.map(value => {name: value})
console.log(b);
sudden geyser
#

{} creates a scope

#

You need to wrap it in () so it returns an object

#

aka => ({ name: value })

fair axle
#

Thanks

sterile lantern
#

so if a channel name was ticket-40010, how would i get the bot to print 40010

#

ik its slicing but how would i slice the channel's name

quartz kindle
#

if the name always starts with ticket-

#

you can .slice(7)

#

number of chars before the number

sterile lantern
#

ah

#

alright

#

ty

feral perch
#

Anyone knows how do we check if the user has his DMs on?

sterile lantern
#

try sending a message to the user via dms and catch any errors?

#

i doubt you'd be able to get it without sending a msg via DMs

sudden geyser
feral perch
sudden geyser
#

I believe so.

feral perch
#

checking the docs

quaint wasp
#

How is the command page that you use emojis like arrows to control the page your at called?

lyric mountain
#

There's not

#

What you want is pagination, which you either use a library or create your own handler

weak gyro
#

help mi

#

Help me

#

how do I make ship command

lament stump
#

Hi c:

#

So, a ship command

#

You will need to take the first argument and the second

#

And make a number randomizer

earnest phoenix
#

Cn any one give me working codes or discord rpc

lament stump
#

Again, that is spoonfeeding

earnest phoenix
#

Mean help me

lament stump
#

We only give clues to codes

#

not entire codes

earnest phoenix
#

My codes module cnt found in cmd

#

That's the problem

sudden geyser
#

I'm confused on what you're asking. Could you rephrase the question and provide more context?

lament stump
#

His Discord RPC isn't working because his file cannot be found in terminal

earnest phoenix
#

Hmm right

lament stump
#

What did you do so far?

earnest phoenix
#

Many i use replit

#

So I cnt know about cmd

lament stump
#

Yeah, you can't use repl for that

earnest phoenix
umbral zealot
#

I'm... pretty sure you can't use any OTHER computer for RPC, as it needs to run on the same machine as your client

lament stump
#

afaik yeah

umbral zealot
#

RPC = direct app communication

weak gyro
#

Uh

#

I suck at coding 🙃

lament stump
#

Show us a code example you made

weak gyro
#

just do it for me I will copy it uwuw

earnest phoenix
lament stump
#

No

weak gyro
#

ok

lament stump
umbral zealot
narrow fractal
#

Doesnt work on Replit

umbral zealot
#

It's literally impossible to run RPC from a separate computer

weak gyro
#

ok

earnest phoenix
narrow fractal
#

yikes.

weak gyro
#

..

sudden geyser
weak gyro
#

uhm

narrow fractal
#

is that... a discord bot maker?

weak gyro
#

ok

lament stump
weak gyro
#

yes

lament stump
#

or notepad, that works

weak gyro
#

how

#

do I do this

narrow fractal
weak gyro
#

help

lament stump
narrow fractal
#

oh no

weak gyro
#

yes

narrow fractal
#

noooooo

weak gyro
#

Oh boy

lament stump
sudden geyser
#

Nothing wrong with using a bot maker

weak gyro
#

this is tuff

sudden geyser
#

It's like Scratch but for discord bots

weak gyro
#

yhelp

#

or gay

lament stump
#

yeah it's just a bit "hmm" on our side

weak gyro
#

ok

narrow fractal
#

yea

#

those stuff is like premade

#

like

#

ikea stuff

#

lol

lament stump
#

as long as it is a custom bot / has custom commands it's okay

#

idrk how to make stuff in a bot maker, sorry :c

narrow fractal
#

same

weak gyro
#

;-;

#

I am just gonna go cry to slep

earnest phoenix
#

How mention user in embed

weak gyro
#

cya pepes

narrow fractal
#

And with that stuff only allowing you to run the 'bot' on your phone?

umbral zealot
narrow fractal
#

Kinda eh

earnest phoenix
#

NOW PLAYING
24k mood @VAIBHAV#9662

near stratus
earnest phoenix
#

Like this

umbral zealot
#

yeah either <@id> or just put their user object in a string

earnest phoenix
umbral zealot
#

it will mention but will not ping them

earnest phoenix
crimson vapor
#

it doesn't ping???

earnest phoenix
crimson vapor
#

oh

#

in an embed

#

I see

#

nvm

lament stump
#

${user} afaik

crimson vapor
#

that works in djs

narrow fractal
#

it depends library too

lament stump
#

didn't mention users in embeds forever

crimson vapor
#

because of the stringify method

near stratus
lament stump
#

yeah, djs is still the most popular, i think

narrow fractal
#

im using dpy

#

i did some djs

earnest phoenix
narrow fractal
#

but im more used to dpy ^^"

earnest phoenix
#

Nothing

lament stump
#

again, please don't ping me for every message, you answer to

earnest phoenix
#

Why bot got lag in replit

near stratus
#

Also mentions in embeds are deprecated According to their api server. So it won't cache the user separately

earnest phoenix
narrow fractal
lament stump
earnest phoenix
near stratus
#

That means it might turn out @invalid-user

lament stump
#

yep

narrow fractal
#

true

lament stump
#

nothing you can do about that tho

earnest phoenix
narrow fractal
#

i dont think so

near stratus
lament stump
#

i mean there is heroku and glitch

narrow fractal
#

but for large scaled bots you gotta get a paid service

near stratus
#

glitch dosen't work anymore

narrow fractal
#

imo

earnest phoenix
umbral zealot
#

replit = garbage

lament stump
#

yeah

narrow fractal
#

or get your own vps

#

but its a personal thing

lament stump
#

repl is basically the "best" free one

earnest phoenix
#

Glitch = nothing it's only fucking shit

lament stump
#

ig

narrow fractal
#

but a free hosting service isnt a solution

lament stump
#

yeah

earnest phoenix
#

Glitch cht do hosting why

umbral zealot
#

glitch = garbage

lament stump
near stratus
#

You can get 2yrs on AWS for free with GitHub Student

earnest phoenix
#

Heroku also always have hosting problems

narrow fractal
#

especially when your bot requires databases

near stratus
narrow fractal
#

like Postgresql, MongoDB and MySql

earnest phoenix
sudden geyser
#

have we evolved from sql yet

earnest phoenix
#

I think uptime and replit do good thing for beginners

narrow fractal
#

i used sql for awhile

#

but then i switched to postgres

#

much better

sudden geyser
#

Postgres is still SQL

narrow fractal
#

yea okey

earnest phoenix
#

Guys find trick for how host glitch project in uptimerobot.com glitch ban uptime lol

narrow fractal
#

?

earnest phoenix
#

Glitch ban uptime monitor

lyric mountain
#

yes

sudden geyser
lyric mountain
#

you cant host on glitch anymore

near stratus
sudden geyser
#

Nah more like a year ago

lyric mountain
near stratus
earnest phoenix
lyric mountain
#

all free hosts are garbage

sudden geyser
lyric mountain
#

it's a contest of which one stinks less

earnest phoenix
lyric mountain
#

garbage

narrow fractal
#

garbage

earnest phoenix
lyric mountain
#

but at least that one is recyclable

earnest phoenix
#

Glitch is fucking shit

narrow fractal
#

And Replit

earnest phoenix
#

No replit is good for beginners

narrow fractal
#

hmmm no

sudden geyser
#

any way no one here is getting anything done arguing about free hosting services. this is like shooting tin cans with a spud gun in a patch of wasteland

near stratus
#

Glitch:

  • Gives only 1000 hours
  • Will shut down after 5 minutes
  • No ping revive
  • 10$ for premium (You can get 2 VPS for that)
narrow fractal
#

And you gotta search for awhile to find the right vps that suits the best etc

sudden geyser
#

It's the true definition of shitposting.

earnest phoenix
lyric mountain
#

ig you meant "i sold"

earnest phoenix
#

10$ - 1000 Indian rs

narrow fractal
lyric mountain
#

imagine not stealing ur own kidneys

narrow fractal
#

somehow

earnest phoenix
#

1000 - my pocket money

sudden geyser
#

If you'd sell your kidney for $10 dollars I worry what you'll sell for an apartment

earnest phoenix
#

Like

solemn latch
#

Heroku only has like 21 days of usage per month doesn't it?

sudden geyser
#

that one answer that pops up in my head

solemn latch
#

Google cloud has a free forever vps.

near stratus
narrow fractal
#

@earnest phoenix for how long you've been programming?

near stratus
solemn latch
#

Ah, just get a free debit card and your good

earnest phoenix
narrow fractal
#

Raspberry's are good

earnest phoenix
#

Cn you give me Web link

near stratus
narrow fractal
#

I still wanna get one tbh

#

A friend of mine has one

near stratus
#

3 or 4 ?

narrow fractal
#

It isnt expensive

earnest phoenix
#

Bot vps mean

near stratus
#

Oh,
I have a 4 (4gig)

earnest phoenix
#

Free

narrow fractal
#

Damn

near stratus
narrow fractal
#

xWass take care of ur hands 😠

earnest phoenix
narrow fractal
#

i get it

compact echo
#

Would anyone recommend using coffeescript or just stick with plain javascript TakagiThonk

#

cause coffeescript looks so much better

earnest phoenix
#

Xwass cn you teek how use Google cloud vps

near stratus
#

yea

compact echo
#

ig coffeescript is a bit outdated

earnest phoenix
compact echo
#

last commit was 1 year ago

tight orchid
#

Hmm maybe I should usethre free quotas of aws and gcp

narrow fractal
#

kekw

near stratus
tight orchid
#

I'm on digital ocean atm

narrow fractal
#

im lucky that i got a vps for like 4 dollars a month 8gb crylaugh

tight orchid
#

Yeah first

narrow fractal
#

otherwise uh it would be a bit expensive

earnest phoenix
#

I am new in programming I cnt know how use degital ocean

sudden geyser
#

You can use any JavaScript library with CoffeeScript, so it's not like it's for nothing.

narrow fractal
#

You just gotta do research my guy

sudden geyser
#

But I've seen more people use TypeScript.

tight orchid
#

Yeah true

#

Could save me money

narrow fractal
sudden geyser
#

CoffeeScript would probably be something nice to use on the side and decide if you want to use it in a real project.

narrow fractal
#

So im very lucky

tight orchid
#

Best way to make money is to reduce spending xD

#

Yeah that's awesome

earnest phoenix
#

do you have any idea?

near stratus
narrow fractal
#

I did had Ubuntu

#

Thats also fine

near stratus
compact echo
#

well I mean like there's a few reasons why typescript is op

earnest phoenix
near stratus
compact echo
#

probably cause ur internet is a bit slow?

narrow fractal
#

yea

#

very lucky

compact echo
#

it usually happens when my internet was slow

narrow fractal
#

i asume most people here use JS?

earnest phoenix
near stratus
narrow fractal
#

whenever i say i use python some people hate it

near stratus
narrow fractal
#

but eh i dont see the reason why KEK

tight orchid
# earnest phoenix do you have any idea?

You probably are not catching an error so the program will stop because there is no way of dealing with this error.js is not my main language but that is what it looks like

earnest phoenix
#

Thx who say about Google cloud hosting

#

👍

compact echo
tight orchid
#

Java person here xD

earnest phoenix
tight orchid
#

Although I don't really care about what language

earnest phoenix
#

I learn on knockdown

near stratus
narrow fractal
#

I went from c# to Python

near stratus
narrow fractal
#

And I like Python more

#

But i must say

#

JavaScript is also nice

tight orchid
#

Certain languages for soecific problems. Python is kinda cool tough because of how readable it is.

sudden geyser
narrow fractal
#

Java is interesting tbh

sudden geyser
#

But the type packages look annoying

tight orchid
sudden geyser
#

and in general type safety with javascript looks annoying

narrow fractal
tight orchid
#

You got ts for that

near stratus
sudden geyser
narrow fractal
#

honestly nvm

#

i totaly agree haha

tight orchid
#

If you only tried it for 30 minutes then that's a bit early

#

Discord.js seems popular

near stratus
sudden geyser
#

I know Java.

#

It's not that I can't take its complexity.

narrow fractal
#

probably populair bcs of the youtube tutorials on youtube YouWhat

tight orchid
#

Lol

#

Very likely

narrow fractal
#

atleast if you search how to make a discord bot

sudden geyser
#

It's that I don't like how it takes an extremely dynamic like JavaScript and wraps it in a type-safe environment. I feel it takes away from JS's dynamicness (even with keywords like any).

tight orchid
#

There should be videos on how to grow bots instead of making them. Maybe that would stop 99% of devs making the exact same multipurpose bot.

near stratus
# sudden geyser I know Java.

you can fuggin write public class void null blah blah Main(string[args]) and complain about let Hell:Number () => {}

vivid fulcrum
#

ts is for companies and huge projects where it's useful to catch type errors before runtime, instead of spending hours on end to find that you used a number instead of a string

sudden geyser
#

Yeah TS is useful for that + JavaScript interpolation

#

I'd say it's personally not for me

narrow fractal
#

Alot of tutorials uses JSON as DB pepecringe

#

whats TS?

near stratus
tight orchid
#

Like 1 json file?

narrow fractal
tight orchid
#

Lol

narrow fractal
#

economy bots

tight orchid
#

Let's hope they don't pass the 10 server mark then

sudden geyser
narrow fractal
#

based of dankmemer cmds etc

narrow fractal
near stratus
tight orchid
#

You guys write unit tests or anything like that?

near stratus
sudden geyser
#

I don't

tight orchid
#

I got unit tests with travis setup because it's shiny and students get it for free

near stratus
#

not for discord.js btw

narrow fractal
#

how to make a discord music bot

tight orchid
#

Too much potential in other bots for ne to be making music bots

#

And I gotno clue how to make them

near stratus
vivid fulcrum
#

are you smart enough to understand buffers?
yes -> ffmpeg and lib docs
no -> use a library to do it for you

narrow fractal
#

i had it in my bot

#

and it uses

vivid fulcrum
#

also

narrow fractal
#

a shit ton of ram

vivid fulcrum
#

you really don't need a music bot

sudden geyser
#

The category is well-satured

narrow fractal
#

Music bots takes so much ram

vivid fulcrum
#

they don't

narrow fractal
#

To run them

vivid fulcrum
#

it's just your shitcode

tight orchid
#

My bot generates a lot of images which is becoming an issues because it is growing and using too much memory. When my holiday starts I will fix all that.

#

And my shitcode yes

vivid fulcrum
#

oh i was referring to chizy

narrow fractal
#

All shitcodes

tight orchid
#

No I also have shitcode :p

narrow fractal
#

Yea probably

#

Just the music part is shit

#

I removed it and it just works way better without it

vivid fulcrum
#

i use around 2mb per stream w/o any filters applied

#

4-5 with filters

tight orchid
#

It was supposed to be a small project, then put it up on a few lists and a few months later I noticed it started to become popular. I had no clue until that point.

narrow fractal
#

Yea

#

I had the music part

#

But like only 30 servers out of 9K wasnt really worth it to me

lyric mountain
#

except mine was to practice for my graduation project

earnest phoenix
#

Kuu I need one help how use Google cloud host cn you pls help

#

@lyric mountain

compact echo
lyric mountain
#

never used gcloud

earnest phoenix
opal plank
compact echo
#

Yes but I'm too lazy to type that

#

and it's annoying that like you would have to test if the package has built in types

#

i mean like typescript isn't bad

opal plank
compact echo
#

probably download the community maintained one

opal plank
#

You can also hover over the error and simply click "Fix Issue"

compact echo
#

fair enough

snow vector
#

this help thx

merry bridge
#

hello

#

which one should i choose for rpc

#

i want to create a custom status

umbral zealot
#

Uhhhh bots can't do that.

#

Bots cannot have custom status or use RPC.

twilit hemlock
merry bridge
#

i know

#

i want it for myself

umbral zealot
#

You can't

#

Not with discord.js

merry bridge
#

oh

fringe badge
#

I wanna make my own module cuz of that

umbral zealot
#

That's bot even relevant lol

merry bridge
#

What can do this then?
I found it on the web

fringe badge
umbral zealot
#

Slash commands aren't relevant with RPC at all in any way.

umbral zealot
fringe badge
#

Im just about slash commands in general

#

They’re not released yet

merry bridge
#

node.js?

fringe badge
#

In djs

umbral zealot
#

Ok well you seems to be inserting yourself in the conversation I was having.

merry bridge
#

i guess does things i saw on youtube are scams

#

lol

fringe badge
umbral zealot
#

Ok well... ok, cool, I don't know why you're pinging me about it

fringe badge
#

Anyway imma head out

umbral zealot
merry bridge
#

can node.js do it
?

umbral zealot
#

discord.js cannot and has never been able to do RPC

#

nodejs is a javascript engine not a library MarioFP

merry bridge
fringe badge
#

yarn install nodejs

umbral zealot
#

Then don't look for scripts that do this

#

find applications or software that can do it

merry bridge
#

well never heard of any software's tho

#

u know any?

#

not planning to use that

umbral zealot
#

Ok well we can't help you here then

merry bridge
#

ohk

#

have a nice day and thank u

opal plank
#

npm i nodejs BIGBRAIN

sudden geyser
#

npm install no-one-left-behind

drowsy epoch
blissful coral
drowsy epoch
fringe badge
blissful coral
#

Idk

#

Not too long I don't think

fringe badge
#

Checked like 4 or 5 days ago, they weren’t released yet

#

Gonna take a look

#

Thanks

blissful coral
#

Pretty sure the interactions PR got merged

twilit hemlock
#

bot offline idk how to fix this is bad

#

none

earnest phoenix
#

"module not found"

umbral zealot
#

no idea what modules since you chopped off the useful part of the message.

twilit hemlock
#

ty

solemn wedge
#

you don't need any coding experience for it

#

btw

blissful coral
#

Is it even possible to RPC a bot KEKW

earnest phoenix
#

any one say how host rpc in which soft ware

zenith terrace
blissful coral
#

I don't think it lets you lmao

lament rock
#

If the bot is on the same machine as the Discord client, you theoretically could

blissful coral
#

eh

#

I doubt it

lament rock
#

except, it'd hook into the official client's account

#

not the bot's

blissful coral
#

yeah

#

it would hook into the clienton discord

#

not on the bot

#

the bots just a process lmao not a actual client

lament rock
#

Unless you somehow logged into a bot account on the official client

blissful coral
#

If yk what I mean by that

lament rock
#

the client would not like that at all though

blissful coral
#

That's self bots which is against tos

lament rock
#

I mean an actual bot's account

blissful coral
#

Yeah thats also against tos lmao

lament rock
#

but the official client calls an mfa endpoint which bots cannot call

blissful coral
#

And you can't do it in the actual app you have to do it on some sort of site

#

which constantly gets taken down

#

yeah exactly

earnest phoenix
#

I'm getting this error: TypeError: Cannot read property 'get' of undefined
And here is my code (the commented out code is not working)

let stats = await db.collection("users").findOne({_id: message.author.id}, {});
    if(!stats) return message.reply(`you haven't started the game yet. Please type \`${prefix}start\` to begin the game.`);
    let exp = "You have no active EXP booster.";
    let valtz = "You have no active Valtz booster.";
//    let booster1 = client.expboost.get(message.author.id);
//    let booster2 = client.valtzboost.get(message.author.id);
    let now = new Date();
//    if(booster1) exp = `x${booster1.amt} (${Math.ceil((booster1.time - (now - booster1.start))/1000/60)} minutes left)`;
//    if(booster2) valtz = `x${booster2.amt} (${Math.ceil((booster2.time - (now - booster2.start))/1000/60)} minutes left)`;```
blissful coral
#

what is expboost and valtzboost defined as

#

in the client

lament rock
#

client.expboost does not exist

blissful coral
#

^

lament rock
#

if you assign to the client somewhere, that code wasn't run

blissful coral
#

looks like a collection

lament rock
#

the safest way to assign props to the client is to extend the client class and construct that instead

blissful coral
#

yes

lament rock
#

or just a Map

rocky hearth
#

in react, when a useEffect gets triggered, does the component gets rerender?

prime mist
rocky hearth
#

u mean useEffect's dependencies?

prime mist
#

Pretty much

earnest phoenix
#

Anyone know any other way to update a variable in a status so we don't have to update it's status every 30 seconds or so?

#

I've not found any other way to update it

#

For ${client.users.cache.size}

pale vessel
#

you have to update it, it won't change it automatically

earnest phoenix
#

would allowing the status to change every 30 seconds still be considered API abuse? even if we aren't changing anything in the status itself

pale vessel
#

No

earnest phoenix
#

Just want the property to update

#

how could we do it differently?

#

or is it only in that way

pale vessel
#

you can keep the previous value inside a variable

#

in your interval, compare that value with your current one

#

if it's different, update the presence and change the value to the one you just set

cinder patio
dusty oracle
#

hi

sick apex
#

Do someone know why discord.js library just stop uploading data of video and stop playing I must skip to song so it'll start playing again and when I want to resume music I must resume, pause and resume dispatcher instead of resuming it once.

#

I tried to log debug event error event and all of these events

#

but it seems like it just stops uploading the stream

#

the server's upload rate just goes down

lusty quest
#

its not a fault of d.js i would say

sick apex
#

I desabled all firewalls disconnected from proxy and its not working

lusty quest
#

sounds more like an issue with the way you provide the media

sick apex
#

I am using ytdl-core

#

discord-ytdl-core

#

and exporting from another js file

lusty quest
#

yea, have fun with getting your server pirated

sick apex
#

I enabled all of proxy and firewalls back

#

xd

lusty quest
#

i dont make music bots bcs they are a pain in the ass to maintain, but it sounds like yt-dl makes some stupid stuff

sick apex
#

yeahI have 5 music bots on 1 stupid prefix

#

once I wrote command to wrong category in configs and it wasnt working

#

cuz its 5 bots on 1 app

lusty quest
#

?

#

why

sick apex
sick apex
lusty quest
#

why

sick apex
#

I must reach all 5 bots on one app

#

so algorithm can chose witch bot will be used

#

you can play music in 5 channels on server and controll it by 1 prefix

lusty quest
#

maybe this is your issue?

sick apex
#

no

lusty quest
#

like 5 bots run at once and someone uses a stop command for a different channel

sick apex
#

nope

lusty quest
#

also if all of them run on the same Server, you will get IP banned by YT really fast

sick apex
#

I locked bots for myself

#

used it

#

and it stopped

sick apex
#

I locked it to me

#

and it only downloaded stream and data once

#

as one bot

lusty quest
#

hmm

#

idk like i said i dont do music bots bcs they are a pain to work with

sick apex
#

no if u know how to use voice

#

and how it works

lusty quest
#

since i dont do music bots i dont touch voice stuff since there is no need for me.

sick apex
#

idk maybe Its becouse I am getting stream from data-handler and play.js requires that data-handler

sick apex
#

idk how to do that

#

1 buffer = 1 second

blazing sentinel
#

hey guyz, i recently found a way to get global covid19 stats directly by WHO!
no more API ratelimits! you can get all the data from here -> https://covid19.who.int/WHO-COVID-19-global-table-data.csv
you can save the response as a CSV and use the data with a library that you can parse csv files. like pandas for python or dataframe.js for node.

lusty quest
lusty quest
slender thistle
#

Thanks for bringing it up

blazing sentinel
#

np

lusty quest
#

but covid bots will die quickly next year or so

blazing sentinel
#

i just dont like to use API's and consider about ratelimits.
so i tried to get the data from WHO and succeeded it.

blazing sentinel
lusty quest
#

if it fits your bot then sure.

quartz kindle
#

how often is that file updated tho?

blazing sentinel
#

don't fit the topic of the bot. it is a timetable&reminder bot. but i'll just add

quartz kindle
#

you have to download the whole thing again in an interval to keep it updated

blazing sentinel
lusty quest
#

no