#development

1 messages Β· Page 1433 of 1

stark abyss
#

hm ok

umbral zealot
#

We're not going to stop talking so you might as well get used to it πŸ˜›

verbal swift
#

guys

#

can you help me ?

pastel grail
#

I have a game in the bot which needs to show everyone (min 5 people. max 10 people) their role in the game. Is there a way to distribute all the roles without getting denied for api abuse?

earnest phoenix
#

you can also wrap the callback methods with promisify

leaden cliff
earnest phoenix
#

they follow the error first pattern i think

stark abyss
#

elaborate

umbral zealot
#

Technically yes but that's complicated for nothing tbh.

earnest phoenix
#

produces cleaner code πŸ€·β€β™‚οΈ

umbral zealot
#

I bet there's already a promise-based pgsql moduile

#

No point in re-writing history

stark abyss
#

pg-promise npm i found

verbal swift
#

How do I send a message including external api?

earnest phoenix
#

what does that even mean

leaden cliff
earnest phoenix
#

shut up

verbal swift
#

lmao

#

yes but I don't understand how to connect it if you would give me a hand ..

earnest phoenix
verbal swift
umbral zealot
#

you can't "include an api" in a message

#

so you'll have to be a bit more descriptive.

earnest phoenix
#

why do people ask their questions as if they're keeping nuclear launch codes

stark abyss
#

are you trying to post request an api thinkingLol

umbral zealot
#

because their bot is going to be doing something literally no one has ever done before and they don't want their idea stolen. Like, getting images from a reddit API for memes. That's super secret. πŸ˜„

stark abyss
#

lmao

earnest phoenix
#

✨

lusty quest
#

maybe he found a api that steals nuclear launch codes

stark abyss
#

I am still unsure what I am supposed to do

near cipher
#

No, there is no error message.

umbral zealot
#

mmmkay, are you sure the events are triggered?

#

did you try adding console.log()?

verbal swift
umbral zealot
#

well we dont know what your api is, what it does, how it works, or what language you're using, or what library you're using, or what you're trying to do

#

You're going to have to be a lot more helpful in your question if you want assistance.

royal jackal
#

guys

stark abyss
#

@verbal swift you connect to your api using node-fetch

#

there

royal jackal
#

somebody was trying to make a bot with lua?

stark abyss
royal jackal
#

by luvit >3

#

?

stark abyss
#

no clue

lusty quest
#

there are actual lua bots

royal jackal
#

i was making

#

i always have problem with web

lusty quest
#

but its less popular to make one in lua

opal plank
#

is there a way to get if the bot has a verified tag? d.js

earnest phoenix
#

selfbots mmLol

opal plank
#

what?

royal jackal
#

@lusty quest yeah javascript = more functional

earnest phoenix
#

js isn't functional

royal jackal
#

you can do a lot with js

lusty quest
#

js is just way easyer

royal jackal
#

no

#

lua is easier

#

for me

earnest phoenix
verbal swift
earnest phoenix
# opal plank what?

i was kidding because i'm fairly certain you can only get that on a user account

earnest phoenix
#

nevermind

royal jackal
#

How to get bot developer rank there?

lusty quest
#

here? apply a bot

royal jackal
#

Oh

lusty quest
#

if accepted you get the role

royal jackal
#

I'm getting

opal plank
royal jackal
#

I made for the bot

opal plank
#

theres this but its not, well, working

royal jackal
#

Css page

#

with html

opal plank
#

oh, right i can decode user flags

#

ty @earnest phoenix

stark abyss
#

can't you also use the top.gg api πŸ€”

opal copper
#

my bot has a bug that i don't why it do that, the messageDelete event is triggered 1-2 minutes after and send false informations

lusty quest
stark abyss
#

hold on

#

wait that would only work if it's verified on top gg ASfacepalm nvm

lusty quest
#

even then it wont work lol

#

he talks about discord verification

hollow sedge
#

grab the amount of servers and see when it was listed and predict if it's verified or not πŸ˜›

earnest phoenix
#

do a ✨ houdini ✨

stark abyss
#

i wasn't able to find the top gg portal docs api whatever it's called but i do remember it allowed to see/get other bots information

earnest phoenix
#

cpu monitor complete finally

eternal osprey
#

hey guys look at my function. My bot only sends out phrase1. Phrase2, 0, and 3 are not being logged or sent. These are the logs i am getting the info from: 22:49:11 | Player "kardooma" (id=14708AD8E49F09EDEB137DDAE29B223E1A7E9CFF pos=<13360.6, 6258.1, 6.0>)[HP: 97.0226] hit by Infected into RightArm(17) for 7.5 damage (MeleeZombie)

restive furnace
eternal osprey
#

could anyone have a look at it? Thanks!

earnest phoenix
stark abyss
#

certifiedBot yeah

pine yew
#

How do I know how many people invited my boat

umbral zealot
#

what library do you use, and what programming language

restive furnace
#

Name ends with .js, so we can assume d.js + he didn't mention so another thing how we can assume it. But let him respond tho.

hollow sedge
#

You should probably ask the captain that question

pine yew
#

How do I know how many people invited my boat pls say

sand condor
#

<Client>.guilds.cache.size

restive furnace
#

@sand condor don't assume thanks.

#

@pine yew say your lib + language.

sand condor
#

he didn't answer the initial question

#

name ends with .js

hollow sedge
#

You can use client.guilds.cache.size

restive furnace
#

yeah, but still.

sand condor
#

if there's a problem with the code he can tell me

pine yew
#

Botumu kac kisi davet etmis onu nerden bile bilirm,

pale vessel
#

You can use len(bot.guilds) since your name ends with js. /s

hollow sedge
#

Lol

umbral zealot
sand condor
#

dOnt aSsUmE tHaNks @umbral zealot

umbral zealot
#

unless you can answer the questions we ask that's all you're going to get

pine yew
#

client.guilds.cache.size

hollow sedge
pale vessel
hollow sedge
#

?

earnest phoenix
hollow sedge
#

hewo pwogam

earnest phoenix
#

pwease count bot guiwds uwu

hollow sedge
#

remember guys you always have to use tank u <3 to signify the end your script in TS

#

the pretty plieas just makes it skip all errors and continue running

pale vessel
#

that's not good

restive furnace
#

what about really making a lib in LOLCODE

hollow sedge
#

I kind of want to actually try that now

#

Isn't it amazing that repl.it has LOLCODE support

earnest phoenix
opal plank
#

cuz thats for types

#

fs comes shipped with node modules

#

do npm i @types/fs

earnest phoenix
#

oh ok

#

ty

opal plank
earnest phoenix
#

so i need types for each module?

opal plank
#

not really

restive furnace
#

@types/node

#

and some modules ship with them

opal plank
#

you just wont get intelisense

#

which is a big feature you missing out

jaunty surge
#

Hi, can y'all help me with translate command, I try to run the bot with this code below and it show me this error without any explain UnhandledPromiseRejectionWarning: Error

    if(message.content.startsWith(`${PREFIX}quicktranslate`) || message.content.startsWith(`${PREFIX}qcktr`))
    {
        if (!args[1]) return message.reply(" please input a language that I translate to ")
        if (!args.slice(2).join(" ")) return message.reply(" please input a text or a paragraph for me to translate")
        try
        {
            gtranslate(args.slice(2).join(" "), {to: args[1]}).then(res => 
            {
                const gembed = new Discord.MessageEmbed()
                .setTitle("Translating. . .")
                .setColor("RANDOM")
                .setDescription("Detect any languages to translate to other language of your choice")
                .addField("Result: ", res)
                .setFooter(`Requested by ${message.author.tag}`)
                .setTimestamp()
                return message.channel.send(gembed);
            })
        } catch(err)
        {
            return message.reply(err)
        }
    }
     ```
earnest phoenix
#

find out what the error is πŸ€·β€β™‚οΈ

#

we know less than you do

jaunty surge
#

it just say error

earnest phoenix
#

πŸ€”

opal plank
#

console log it instead

earnest phoenix
#

which lib are you using lol

opal plank
#

since you get a trace

earnest phoenix
#

oh yeah

#

it sends the error object

jaunty surge
#

@earnest phoenix I use google-translate-api
@opal plank yeah I tried it too but nothing happen

opal plank
#

its not suppose to happen
its suppose to log the whole error

earnest phoenix
#

that lib is abandoned

opal plank
#

or do JSON.stringify(error)

jaunty surge
#

yeah it doesn't log error

#

ok

earnest phoenix
opal plank
#

2017 oof

pine yew
#

!invite

opal plank
hollow sedge
#

probably shouldnt run that anyway

#

you'll probably get 100 other replies

opal plank
#

common prefixes arent allowed here

#

wont even reply

earnest phoenix
#

are you implying they're smart enough to understand what you're saying

opal plank
#

watch

hollow sedge
#

oh good

opal plank
#

common prefixes dude

#

not a single reply

#

czu they all muted/yeeted out of here

hollow sedge
#

tbf bots shouldnt even be here

#

theres no point in testing here

opal plank
#

there is

#

this is a huge server, its good to test bot stability with big traffic

#

and try some very stressing commands to check stability too

#

its just that 99% of the skids just add it here to get easy 100k users

#

without proper reason to actually be here

hollow sedge
#

i see that but yeah most people dont need that

earnest phoenix
#

because they inflated it with dbots and top.gg

opal plank
#

wait what?

earnest phoenix
#

a fuckton of devs do that

opal plank
#

putting users in guild count?

earnest phoenix
#

oh no

#

for example, how bots usually use "in n guilds", shitty bots would use "n users" in their activity instead

opal plank
#

i do both tho

earnest phoenix
#

because the user count is about a hundred thousand times bigger

opal plank
#

i rotate them

hollow sedge
#

yeah people do, do that

opal plank
#

i dont do what you are saying though, replacing users for guilds

restive furnace
opal plank
#

for example Wacthing 246000 guilds

earnest phoenix
#

no no, just only displaying your users because they're inflated and then bragging about how many users are using your bot

lusty quest
#

having this amount of guilds is scary

hollow sedge
#

whats the point though

#

you can just lie about it anyway

earnest phoenix
#

when behind that it's actually like 50 guilds

opal plank
hollow sedge
#

oh

opal plank
#

fairly certain theres a you cant fake stats rule

#

dont remember which though

hollow sedge
#

hold on i need to update my bot

#

jk

opal plank
earnest phoenix
#

i mean

#

honestly, guild count and member count don't matter as much

#

it's the engagement

opal plank
#

just make good bots and they going to be popular u scribs

hollow sedge
#

fake

opal plank
#

healthy organic stats from a non verified bot

hollow sedge
#

make trash bots that get popular because they are based around whatever is popular at the time (like among us)

lusty quest
#

ahh yes grafana. had the idea to make a panel too. but then looked into the influxdb docs and decided to wait

opal plank
#

< prometheus

hollow sedge
#

thats really cool but why is uptime in spanish

earnest phoenix
#

localization

opal plank
#

well

lusty quest
#

now i will probably wait again bcs i probably start to recode the bot in C# in the next weeks

hollow sedge
#

but the other words are in english

pale vessel
#

it's based of ip or something in grafana which is stupid

opal plank
#

Browser is in english
Browser localization is in Canada.
Everything english.
Except the OS language(which unfortunately is a single version windows), and its pulling from THAT out of all the places

#

infuriating as fuck

#

its not even ip based

#

i have a vpn

#

it legit pulls ur OS language

hollow sedge
#

lol

opal plank
#

grafana legit pulling a middle finger

#

i need to get ELK setup soon too

junior anvil
#

uhh

#

how do i make my bot go online 24/7?

lusty quest
#

use a vps

junior anvil
#

ok

jaunty surge
#

@opal plank @earnest phoenix thanks y'all

haughty mirage
#

Something.host is vv good if you want hosting either free or cheap

lusty quest
#

free is never good

jaunty surge
#

I have one last question, it's about the message attachment, I seen people putting a small image next to a title in an embed, how do I write a code to attach an image link like it

pale vessel
#

That's the author icon

jaunty surge
#

ohh yeah I just figured

#

oops

frank crescent
#

HELP

#

I've made my bot, I'm hosting it on heroku

#

Some commands send new data to a file, but after like 24 hours

#

all the data in the file, I think, gets wiped

#

how do I fix

earnest phoenix
#

by renting a vps

#

heroku uses ephemeral storage

lusty quest
#

dont use heroku

frank crescent
#

Good idea

#

What should I use

lusty quest
#

check pins i guess

earnest phoenix
#

there's a few good providers pinned, ^

lusty quest
#

but some well known hosters like AWS,GCP,DO,OVH;Vulture

frank crescent
#

i dont have money

#

B[

lusty quest
#

well then i suggest use a external database, can recomend MongoDB or Firebase

#

(they offer free Databases)

frank crescent
#

How would that work

lusty quest
#

you connect your bot to the External Database and store your data there

frank crescent
#

I don't think heroku support external databases

crystal sedge
lusty quest
#

well you have to code it yourself

crystal sedge
lusty quest
#

they allow external DBs

frank crescent
#

I mean, I'll have to import the commands to connect to the database right?

#

I think you gotta pay for that feature though, on heroku

#

I was considering using an external DB

crystal sedge
#

yeah you can use cloud mongo

#

also why are you hosting it on heroku, it's against their tos

frank crescent
#

I'll give it a try

#

what

crystal sedge
#

yeah

frank crescent
#

Oh damn

#

they wont mind

lusty quest
#

until they ban your account

crystal sedge
#

you can use something like repl, but it has too many restarts. I use bluefoxhost, it's free same plans are repl and hardly restarts so pretty fine for my bot

lusty quest
#

or get a raspberry pi / banana pi / nas to run it locally at your home

frank crescent
#

to host your bot, right?

#

o

#

I was planning to get a raspberry pi

#

Not that I have any idea how to use one

lusty quest
#

get a starterkit with included SD card and then its just ARM based Linux

crystal sedge
#

there's a guide on anIdot'sGuide on hosting a bot on rasp pi

frank crescent
#

I will look into all these options

#

ty guys

earnest phoenix
#

renting a vps is probably going to be more profitable than buying an rpi

lusty quest
#

for the first 10 months at max

#

the electicity they pull off the wall is way below what you pay for a VPS per month

timber fractal
#

how can i make a would you rather command

#

does anyone know a package or something

lusty quest
pale vessel
#

Pretty sure that's only against Glitch's ToS

hollow sedge
#

yeah ^

#

you still shouldnt be doing it though

opal plank
quiet topaz
#

is there a way to change a bots tag?

tired panther
frank crescent
#

ok

#

ill try the database thing out

opal plank
#

heroku isnt event meant to be hosting bots dude

#

its terrible for bots

#

heroku and glitch are meant for webservers and websites

timber fractal
#

if i use my 8ball command it says this but how can i make it so it cuts 'h!8ball' at the 'your question'

quiet topaz
#

is there a way to change a bots tag?

timber fractal
quiet topaz
#

i mean a normal discord bot

timber fractal
# opal plank need more info

ehm my code is

  
const { MessageEmbed } = require("discord.js");
module.exports = {
  name: "8ball",
  description: "There is a big chance I insult you!",
  category: "fun",
  run: async (bot, message, args) => {
    let question = message.content.slice();
    if (!question)
      return message.channel.send(`Please specify a question!`);
    else {
      let responses = [
        "Yes",
        "No",
        "Definetly",
        "Absoloutely",
        "Not in a million years",
        "Never",
        "Definitly not",
        "NOPE",
        "Do you expect yes?"
      ];
      let response =
        responses[Math.floor(Math.random() * responses.length - 1)];
      let Embed = new MessageEmbed()
        .setTitle(`8Ball!`)
        .setDescription(`Your question: ${question}\nMy reply: ${response}`)
        .setThumbnail(`https://media.discordapp.net/attachments/756172813965983842/785216848479387648/unknown.png`)
        .setColor(`RANDOM`);
      message.channel.send(Embed);
    }
  },
}
opal plank
#

these?

quiet topaz
#

yes

timber fractal
#

ehm

opal plank
#

no

#

you cant

timber fractal
#

if its verified there comes a βœ…

timber fractal
#

sorry im new

#

😊

opal plank
#

you really should learn js before makign a bot

timber fractal
#

uhuh

#

ok

#

but

#

answer?

opal plank
#

Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:

  • proper syntax
  • debuging code
  • basic features (vars, arrays, objects, functions)
  • read and understand docs
  • nodejs module system

As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.

Here are good resources to learn both Javascript and NodeJS:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/

Please take a couple of weeks/months to get acquainted with the language before trying to make bots!]

#

i did give you the answer

timber fractal
#

ok

quiet topaz
opal plank
#

CUSTOM_STATUS doesnt work

quiet topaz
#

why

opal plank
#

its either WATCHING/STREAMING/PLAYING

#

its not a valid status type

quiet topaz
#

*listening

opal plank
#

wrong

quiet topaz
#

it is

pale vessel
#

COMPETING too

opal plank
#

listening is not available iirc

pale vessel
#

It should be

#

Wait nah

opal plank
#

i remember going on that a while back, one sec

pale vessel
#

I'm not sure

#

But I used it before

#

It could have changed

stark abyss
#
        pool.query(`SELECT * lotterystats WHERE ID = ${message.author.id}`, (err, res)=> {
          if(res == undefined){
            pool.query(`INSERT INTO lotterystats(id, gold, common, uncommon, sr, ur, raidpasses, exp, stamina, rare, bought)VALUES(${message.author.id}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);`, (err, res) => {
              if(err) return console.log(err)
              return console.log(res.rows)
            })    
          }
          let lotteryObj = res.rows[0]
          pool.query(`INSERT INTO lotterystats WHERE id = ${message.author.id}(${value}, bought)VALEUS(${number}, ${getValues(message.author.id, lotteryObj, value)})`, (err, res)=> {
            if(err) return console.log(err)
            console.log(res.rows)
          })
        })```
kek the fuck is wrong with my code it's undefined but it still goes throughreturn and onto let lotteryObj
haughty mirage
#

anyone know what is causing this?? bot is not responding to any commands and reboot isnt fixing

opal plank
#

nvm listening is available

timber fractal
#

@opal plank i fixed my problem

opal plank
#

nice

stark abyss
#

does anyone know what I am doing wrong

umbral zealot
stark abyss
opal plank
#

callback hell

umbral zealot
#

What you're doing wrong is using a callback-based library πŸ˜‰

timber fractal
#

let question = message.content.slice(prefix.length + 6); i made this instead of let question = message.content.slice();

earnest phoenix
#

@earnest phoenix

opal plank
#

its not even thgat

#

it SUPPORTS callbacks

earnest phoenix
#

@earnest phoenix yes

opal plank
#

pg doesnt require callbacks

stark abyss
#

The fuck am I doing wrong then

opal plank
#

lacking basic js knownledge

#

second is not using await

stark abyss
#

really?

umbral zealot
#

what yor'e doing wrong is using callbacks

#

lol

opal plank
stark abyss
#

i tried using await and it gave same response

opal plank
#

which is what you want, its outside of callbacks

#

parse it from there

#

async/await

stark abyss
#

ok

quiet topaz
umbral zealot
#

@stark abyss instead of using callbacks you need to use promises. You can't do the second argument with (err, res) => basically

stark abyss
#

don't think that's true

umbral zealot
#

look at the very first examples

#
const { Client } = require('pg')
const client = new Client()
await client.connect()
const res = await client.query('SELECT $1::text as message', ['Hello world!'])
console.log(res.rows[0].message) // Hello world!
await client.end()
#

that's how you do it

stark abyss
#

oh

umbral zealot
#

You can use callbacks, but yo'ure going to be in callback hell if you need to use more than one query

stark abyss
#

i see

umbral zealot
#

callback hell is the worst hell for programmers

stark abyss
#

alright ty I think I understand more now

umbral zealot
#

If you need more info on how promises work check out https://js.evie.dev/promises πŸ™‚

haughty mirage
timber fractal
#
const Discord = require(`discord.js`); 
const { MessageEmbed } = require("discord.js");
 
module.exports = {
    name: `wyr`,
    description: `Would you rather generator`,
    async run (client, message, args) {
        let responses = [
            `:a:Lose the ability to speak \n :b: Lose the ability to read`
        ]

        let wouldyourather =
            responses[Math.floor(Math.random() * responses.length - 1)];
        const wyr = new Discord.MessageEmbed()
        .setTitle(`Would You Rather`)
        .addField(`${wouldyourather}`)
        .setFooter(`React below with a or b`)

        message.channel.send(wyr)
    }

}
```so i made this (its not done yet) but if i use it it sends this
earnest phoenix
#

addField takes two params

#

also why the - 1

#

does anyone know how to add roles though a mentioned meber

umbral zealot
timber fractal
earnest phoenix
#

like

#

this

#

i mean exactly what i said

timber fractal
earnest phoenix
#

let addrole = message.guild.roles.find(r => r. name === "muted");

#

this is old

#

tho

#

...which you copypasted from somewhere and you don't understand what it actually does

#

got it

#

πŸšΆβ€β™‚οΈ

timber fractal
#

i did not copypasted

#

i made that by myself in my 8ball command too

umbral zealot
timber fractal
#

i tried with that now

umbral zealot
#

πŸ‘

earnest phoenix
#

ok

timber fractal
#

@umbral zealot it worked thx

umbral zealot
earnest phoenix
#

can i avoid having to provide a time parameter for awaitReactions and just let it listen until my message has disappeared

sullen silo
#

how to show servers on my bot joined...

hollow sedge
pale vessel
earnest phoenix
#

oh really..

timber fractal
#

but it works fine

#

so im not gonna change

#

HEHE

hollow sedge
#

you could just try it..

#

and if it doesnt work revert it

pale vessel
#

Both responses and wouldyourather can be a constant

timber fractal
#

if i use this js message.channel.send(wyr) .then(() => message.react('πŸ…°οΈ')) .then(() => message.react('πŸ…±οΈ')) it reacts to my own message how to fix that?

hollow sedge
#
let j = 0
array = ["a", "b", "c"]
for (let i=0; i < array.length;i++){
    if (i == j){
        if (array[i] == array[j]){
            console.log(array[i])
        }
    }
    j += 1
}

I guess i should keep this since it works fine

earnest phoenix
#

kakakaakkak

timber fractal
earnest phoenix
#

moji euribek iszhroak

timber fractal
opal plank
#

cuz you are reacting to message

#

which is the original one

mild valley
#

you should create a const before

#

and react to that const

opal plank
#

pass a value on the function

#

unrelated to const

#

send() returns a value

earnest phoenix
#

melka qzure aytya

opal plank
#

pass that new messgae onto it

opal plank
hollow sedge
pale vessel
#

You can't chain it like that though

#

Since message.react() returns a MessageReaction.

crystal wigeon
#

does anyone know ytpl? im trying to play songs from a playlist but i keep getting the error that list query is url is null

#

[MV] IU(μ•„μ΄μœ ) _ BBIBBI(삐삐)

*English subtitles are now available. :D
(Please click on 'CC' button or activate 'Interactive Transcript' function)

[Notice] 1theK YouTube is also an official channel for the MV, and music shows will count the views from this channel too.
[곡지] 1theK YouTubeλŠ” MVλ₯Ό μœ ν†΅ν•˜λŠ” 곡식 μ±„λ„λ‘œ, 1theK에 μ—…λ‘œλ“œλœ MV 쑰회수 λ˜ν•œ μŒμ•…λ°©μ†‘ μˆœμœ„μ— λ°˜μ˜λ©λ‹ˆλ‹€.

::...

β–Ά Play video
opal plank
#

@timber fractal topics:

  • proper syntax
  • debuging code
  • basic features (vars, arrays, objects, functions)
  • read and understand docs
  • nodejs module system

As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.

Here are good resources to learn both Javascript and NodeJS:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/

Please take a couple of weeks/months to get acquainted with the language before trying to make bots!

crystal wigeon
#

this is my playlist

#

trying to add that playlist

pale vessel
#

oh my

crystal wigeon
#

im doing a regex match

pale vessel
#

who do you stan for

crystal wigeon
#

to check if its a playlist or a normal link

hollow sedge
#

why do you have to do a regex search for that

crystal wigeon
#

to check if its a playlist?

earnest phoenix
#

koas ir menety irojs jaizas

hollow sedge
#

yes

opal plank
crystal wigeon
#

what do you recommend

hollow sedge
#

why cant you just use includes()

crystal wigeon
#

okay but ytpl stil says the url is null?

opal plank
#

thats n.tag prefixes in #commands , but it shows a couple examples of how poorly efficient regex is

crystal wigeon
#

the playlist url

opal plank
#

dont use it unless its necessary

crystal wigeon
#

got it

#

checking the playlist thing is okay, but

earnest phoenix
#

ointment for pain in the ass

hollow sedge
opal plank
#

@scenic kelp ^^ random troll

#

just spamming

hollow sedge
#

yeah

earnest phoenix
#

Π΄Π°ΠΉ ΠΌΠ½Π΅ ΠΊΡƒΠ²ΡˆΠΈΠ½ Π²ΠΈΠ½Π°

crystal wigeon
#

umm

hollow sedge
#

@green kestrel

dull bramble
#

So, I've got this command:

else if(message.content.startsWith(prefix + "purge ")){
    const args = message.content.slice(prefix.length).trim().split(' ')
    if(message.member.hasPermission('MANAGE_MESSAGES')){
      message.channel.bulkDelete(args[1])
      const channel = client.channels.cache.find(channel => channel.name === "epic-logs")
      const logEmbed = new Discord.MessageEmbed()
      .setDescription(args[1] + " messages purged by " + message.author.tag + " in <#" + message.channel.id + ">")
      .setColor(15105570)
      .setFooter("Bot made by THE Epic Boy#0001", "https://cdn.discordapp.com/avatars/764215200055427102/f6182edce0365fd49a1b412cd6e94cbd.png?size=128")
      channel.send(logEmbed)
    } else if(!message.member.hasPermission('MANAGE_MESSAGES')){
      message.reply("![Shocked](https://cdn.discordapp.com/emojis/784881846117859348.webp?size=128 "Shocked") You need the Manage Messages permission for that command!")
    }
  }```
Would there be a way to check if the command included no arguments? I've tried but it doesn't work.
pale vessel
#

Check if args[1] exists

dull bramble
#

Lemme try that

boreal iron
#

args[1] needs to be undefined

#

oh

pale vessel
#

args[0] is purge

boreal iron
#

only slicing the prefix's length

#

...u saw nothing

timber fractal
#

how to make my bot react to his own embed and not to the command?

pale vessel
#

Get the sent message and react to it

#

Don't react to the original message

dull bramble
pale vessel
#

Yeah

dull bramble
#

Where would I put it?

boreal iron
#

Better use undefined

restive furnace
#

i recommend !args?.[1] just incase

opal plank
restive furnace
#

node v1.14 feature?

sudden geyser
#

if args is not undefined access the first element in the array

#

and then the negate operator

opal plank
#

array.[0]

#

really?

sudden geyser
#

yes

#

?. is the syntax

#

it's ugly

#

should've just removed the .

opal plank
#

i dont think you both understand what i mean

sudden geyser
#

then what do you mean

opal plank
#

is it clearer now that that syntax is plain WRONG?

pale vessel
#

It's not?

#

It's correct

restive furnace
#
let thing = undefined;
thing?.[0] // => undefined, fine
thing[0] // => UnhandledPromiseRejectionError
opal plank
#

iwait what

#

holdup

sudden geyser
#

.? no

pale vessel
#

?.

sudden geyser
#

yes

opal plank
#

yes ?.

dull bramble
#
else if(message.content.startsWith(prefix + "purge ")){
    const args = message.content.slice(prefix.length).trim().split(' ')
    if(message.member.hasPermission('MANAGE_MESSAGES')){
      message.channel.bulkDelete(args[1])
      const channel = client.channels.cache.find(channel => channel.name === "epic-logs")
      const logEmbed = new Discord.MessageEmbed()
      .setDescription(args[1] + " messages purged by " + message.author.tag + " in <#" + message.channel.id + ">")
      .setColor(15105570)
      .setFooter("Bot made by THE Epic Boy#0001", "https://cdn.discordapp.com/avatars/764215200055427102/f6182edce0365fd49a1b412cd6e94cbd.png?size=128")
      channel.send(logEmbed)
    } else if(!message.member.hasPermission('MANAGE_MESSAGES')){
      message.reply("![Shocked](https://cdn.discordapp.com/emojis/784881846117859348.webp?size=128 "Shocked") You need the Manage Messages permission for that command!")
    } if(!args[1]){
      message.reply("![Shocked](https://cdn.discordapp.com/emojis/784881846117859348.webp?size=128 "Shocked") You need to specify the amount of messages you want purged!")
    }
  }```
So is this right? Because it doesn't work. I put the `if(!args[1])` thing at the bottom. Why isn't this working?
opal plank
#

my bad, ignore me

pale vessel
#

Check it first lol

opal plank
#

i was fairly certain you couldnt do property of array like that

pale vessel
#

if statements are read from top to bottom

#

so it will still try to use args[1] until that last if

#

Now what the hell

boreal iron
#

message.channel.bulkDelete(args[1])

What's the sense of checking if args[1] doesn't exist but is needed as parameter? wtf...

pale vessel
#

I think you can just move that if statement to top

#

Before member.hasPermission()

boreal iron
#

Would there be a way to check if the command included no arguments?

return your error message or your function will continue

tardy hornet
#

when i restart my heroku project, the new datas on the db doesnt save

earnest phoenix
#

rent a proper vps

crystal wigeon
#

anyone know how to play mixes on discord bot?

earnest phoenix
#

storage on heroku is ephemeral

earnest phoenix
crystal wigeon
#

so apparently i found out that my link was a yt mix and not ytpl

#

this url

#

is a yt mix

#

and not a playlist

#

which wont work in ytpl

broken sentinel
#

How can i grow up my Bot's server some ideas?

rustic nova
#

get rid of the &start_radio=1

earnest phoenix
#

it's still a playlist

rustic nova
#

and try again

crystal wigeon
#

hmm

earnest phoenix
#

if it has a &list param, it's a playlist

river thistle
#

when getting an user's spotify activity, how can I get the player position ?

#

nvm im kinda dumb theres timestamps

crystal wigeon
#

"Mixes are not supported"

#

i got rid of the &start

#

ytpl says its a mix tho

earnest phoenix
#

oh

#

is that a mix from your account

crystal wigeon
#

yeah

earnest phoenix
#

iirc mixes generated for youtube accounts are private

#

they're only accessible to the person who it was generated for

crystal wigeon
#

so how does rythm play it?

#

i use the same link with rythm and it works

earnest phoenix
#

πŸ€·β€β™‚οΈ

crystal wigeon
#

even groovy in that case

earnest phoenix
#

@crystal wigeon do rythm and/or groovy have the same songs in the queue as the mix

crystal wigeon
#

yes

earnest phoenix
#

hm

stark abyss
#
          const res = await pool.query(`SELECT * FROM lotterystats WHERE id = ${message.author.id}`)
          console.log(res.rows)
          if(!res.rows){
            console.log("USER DOESN'T EXIST -- INSERT AND UPDATE")
            pool.query(`INSERT INTO lotterystats(id, gold, common, uncommon, sr, ur, raidpasses, exp, stamina, rare, bought)VALUES(499434394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)`, (err) => {
              if(err) return console.log(err + " undefined res err")
            })    
          }

even if res.rows is empty it won't do the thing -- doesn't console log

sudden geyser
#

add a console.log above the query to see if the block is being run

stark abyss
#

well it runs the content after that if statement, so it is being triggered

opal plank
#

bruh.... genshin's api is so insecure holy shit

stark abyss
earnest phoenix
#

hype it up

opal plank
#

legit though

#

the amount of flaws im finding are insane

#

its so easily bypassable

stark abyss
opal plank
#

too bad they dont like devs for their products

craggy plaza
#

hello πŸ™‚

opal plank
#

they make everything secure, but then get email leaks, password leaks, hackers and all that nasty stuff

#

good job

craggy plaza
#
 client.on('ready', () => {
  setInterval(() => {
      dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
  }, 1800000);
});```
opal plank
#

and then stoopid people like me actually find even more flaws

craggy plaza
#

i have this command and i want to show the shards in top.gg

#

but show only servers what is problem

opal plank
craggy plaza
#

client.shards.total

opal plank
craggy plaza
#

ya

earnest phoenix
opal plank
#

you need total iirc

#

let me check my docs

stark abyss
#

the problem is you didn't share code

craggy plaza
#

@earnest phoenix are you hacking nasa?

hollow sedge
#

Lol

craggy plaza
#

events.js

opal plank
#

actually that should be working

craggy plaza
#

@opal plank

opal plank
#

hmmmm

craggy plaza
#

here will be show the shards

#

i think

pale vessel
craggy plaza
opal plank
#

wait a second...

craggy plaza
#

ok mate

opal plank
#

im not sure if it displays it tbh

craggy plaza
#

what are code u use

opal plank
#

what are what?

craggy plaza
#

πŸ˜‚

#

javascript?

#

just ask

opal plank
#

Ts, but yes

craggy plaza
#

ok

#

lemme see

tacit sundial
#

why does my code suddenly give an error: ctx is a required argument that is missing ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)

@use.command()
async def banana(self, ctx):
    number = self.newplayer(ctx.message.author.id)
    if int(number[1][8]) == 0:
        e = discord.Embed(colour=discord.Colour.dark_blue(), description=":error~1: You don't "
                                                                         "have that item yet")
        await ctx.send(embed=e)
    else:
        e = discord.Embed(colour=discord.Colour.dark_blue(), description='Used banana: That was delicious!')
        await ctx.send(embed=e)
        amount = int(number[1][8]) - 1
        database.connection.connect()
        sqlq = "UPDATE Economy SET banana = {} WHERE id = {}".format(amount, number[1][0])
        database.cursor.execute(sqlq)
        database.connection.commit()
        database.connection.close()
#

indents is a bit effed

#

I thought ctx.send was enough

#

like 90% of my other code does

crystal wigeon
#

so no solution to play mixes?

hollow sedge
opal plank
#

i am 80% sure dblapi-js is deprecated in favor of the SDK btw

#

@craggy plaza

craggy plaza
#

im trying rn

opal plank
#

which reminds me i should probably switch mine

#

not like theres much need rn tbh

hollow sedge
pale vessel
#

Yeah, pretty sure that is still prone to SQL injections

tacit sundial
#

hmm

#

let me remove the sql thing

#

and see if that works

#

nope

#

still there

pure lion
#

is there a way to exit node process without calling process.exit()?

tacit sundial
#

it doesnt work wth ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)

@use.command()
@commands.cooldown(1, 3, commands.BucketType.user)
async def banana(self, ctx):
    number = self.newplayer(ctx.message.author.id)
    if int(number[1][8]) == 0:
        e = discord.Embed(colour=discord.Colour.dark_blue(), description="![error](https://cdn.discordapp.com/emojis/741756417144389637.webp?size=128 "error") You don't "
                                                                         "have that item yet")
        await ctx.send(embed=e)
    else:
        e = discord.Embed(colour=discord.Colour.dark_blue(), description='Used banana: That was delicious!')
        await ctx.send(embed=e)
#

I removed the SQL query

#

still there

stark abyss
#

error?

tacit sundial
#

the same error: ctx is a required arghument that is missing

#

I did this now and still same error ```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)
async def use(self, ctx):
if ctx.invoked_subcommand is None:
e = discord.Embed(colour=discord.Colour.dark_blue())
e.add_field(name='Item Usage', value='Do /use <item>, to use the item.')
await ctx.send(embed=e)

@use.command()
async def banana(self, ctx):
    await ctx.send("test")
hollow sedge
#

i told you

#

it wasnt the SQL query, that was another problem i saw

#

what line

tacit sundial
#

the await ctx.send("test")

#

so when I do use banana, it gives that error

#

when I do use, it works

#

or

#

can you only have 1 command group in the same Cog?

hollow sedge
#

no

tacit sundial
#

cuz there are 2 and the other one works fine

robust blade
#

how do i check how many servers is my bot in top.gg

#

is it ${bot.guilds.cache.size}

tacit sundial
#

same parameters and same use of decorators

#

referring to my problem

robust blade
#

oh

hollow sedge
#

it's not passing the context for some reason

#

not really experienced with command groups

tacit sundial
#

yeah its weird

#

let me remove the other command group

#

and see if that fixes it

robust blade
#

how do i check my bot stats in top.gg

hollow sedge
#

why would that be the problem

#

this chat is for help, you dont need to say that

earnest phoenix
#

just use the api

tacit sundial
#

YEAH wth

#

that worked

robust blade
#

???

tacit sundial
#

removing the other command group

hollow sedge
#

thats weird

tacit sundial
#

made the other command group work

earnest phoenix
#

you should know what you posted to top.gg in the first place though lol, but top.gg has an api

robust blade
#

is there an website for top.gg guide

earnest phoenix
robust blade
#

THAT IS THE WEBSITE I WAS LOOKING FOR

#

THANK YOU

hollow sedge
#

nvm im dumb

midnight blaze
#

I didnt do djs for a while, can someone help me with this?


        message.channel.send("`||PING||`").then(m =>{
            let ping = m.createdTimestamp - message.createdTimestamp;
          
            setTimeout(() => {
              m.edit(`**πŸ—ΏThe Ping Is: **\n  ${ping}ms`);
            }, 1000);
            setTimeout(() => {
              m.edit(`**πŸ—ΏThe <3 of Bot Is: **\n  ${message.client.ws.ping}ms`).then(m => m.react('❌')).then(r => {
                r.awaitReactions((reaction, user) => user.id == message.author.id && (reaction.emoji.name == '❌'),{ max: 1, time: 30000 }).then(collected => {
                    if(collected.first().emoji.name == '❌'){
                        collected.delete({reason:"test"});
                        client.destroy();
                    }
        
                })
              })
            }, 4000);            
            })
#

I do not get an error

#

it simply doesnt delete it

earnest phoenix
#

debug it πŸ€·β€β™‚οΈ

pure lion
#

is there a way to exit node process without calling process.exit()?

#

i'm testing matts remote eval to see how many ways i can break it

earnest phoenix
#

call a kernel function

#

but i think you need to build a native dep for that

#

since it has to use cpp

robust blade
#

what is an example of an top.gg token?

pure lion
earnest phoenix
#

a really long string of random letters and numbers

robust blade
pure lion
#

make an app

earnest phoenix
#

it literally says how to on the docs page

hollow sedge
#

They already have the role

earnest phoenix
#

it even shows an example of a token

#

lol

robust blade
#

eek

earnest phoenix
robust blade
#

ohh

#

ok

#

thank you

tacit sundial
#

anyone knows how you can implement 2 command.groups in a single cog? discord.py

#

because its not passing the context. It gives an error on one command.group: ctx is a required argument that is missing, and the other command group works fine

#

this is the decorator for both groups```python
@commands.group()
@commands.cooldown(1, 3, commands.BucketType.user)

earnest phoenix
#

you might have more luck asking in the dpy guild

tacit sundial
#

I did, its a bit ded atm

earnest phoenix
#

oh

tacit sundial
#

I'll ask again since my question got ignored

#

nope

#

still no answer lmao

lunar umbra
#

@tacit sundial you made sure to include self in the commands group right? I have tons of command groups inside one cog

@commands.group(name='test')
@commands.cooldown(1, 3, commands.BucketType.user)
async def test(self, ctx):
    # idk put stuff here
wraith haven
#

^

tacit sundial
#

yeaah @lunar umbra

#

I have that included

#

look

#

This is the first command.group

    @commands.group()
    @commands.cooldown(1, 3, commands.BucketType.user)
    async def use(self, ctx):
        #stuff

    @use.command()
    async def banana(self, ctx):
        #stuff

This is the second one, which works

    @commands.group()
    @commands.cooldown(1, 3, commands.BucketType.user)
    async def buy(self, ctx):
        #stuff

    @buy.command()
    @commands.cooldown(1, 3, commands.BucketType.user)
    async def banana(self, ctx):
        #stuff
#

only one of them works

#

when I disable the working one

#

the other one works

#

I dont understand

lunar umbra
#

OH

#

u have two functions with the same name

#

both command groups have a function named banana

tacit sundial
#

but how do I avoid that

#

since its necessary

#

because I cant change the item banana

lunar umbra
#

@buy.command(name='whatever')

tacit sundial
#

but the name="test"
do you invoke it by doing /test ?

lunar umbra
#

then you can change the function name to whatever

#

yeah

tacit sundial
#

uh

#

so how do I make sure that people can do /buy banana and /use banana

#

if command.groups doesnt work like this, then I have to remove the group and then make it manually detectable, by checking the message content after the command invoke

lunar umbra
#
@commands.group(name='test')
async def test(self, ctx):
    pass

@test.command(name='banana')
async def test_banana(self, ctx):
    # do stuff
tacit sundial
#

ah for real?

lunar umbra
#

so it invokes when you do /test banana

#

the test_banana function name can be changed to whatever you want

tacit sundial
#

ah nice, thank you :D

lunar umbra
#

np

drifting wedge
#

from cogs.quest.freewalk_txt.generation import catacombs_floor_entrance py

#

then gives module not found

#

its not a module

#

its a file

young flame
#

uh

#

hol on

earnest phoenix
#

because you don't return anything

#

so the return value is not defined

young flame
#

how would i return it

earnest phoenix
#

take a guess

young flame
#

not using the return

#

i have it so when i use a command it gets the date it was used

#

and its like 00/00/00 at 0:00

earnest phoenix
#

okay...?

#

why would you not use return

#

it's literally for returning

#

like the name says

tranquil drum
#

all you did was define 2 objects lol

young flame
#

well its not really for me-

earnest phoenix
#

okay...?

slender thistle
#

Why not use return?

young flame
#

h nvm

#

i said nvm

grizzled raven
#

just remove "var dateStr =`

#

yeah it's pretty obvious but i don't see why you can't give them the answer

earnest phoenix
#

brain exercises

#

there's a reason why i say take a guess lol

grizzled raven
#

well

#

they couldn't mmLol

earnest phoenix
#

or rather wouldn't

#

"take a guess"

explains what they're doing
explains for who it is

young flame
#

i didnt need to guess

grizzled raven
#

hm?

#

well now you have your answer

young flame
#

i already knew what the issue was, it was a question to view other methods which is why i said without a return.

earnest phoenix
#

that is what's confusing

#

why would you not use it lol

grizzled raven
#

return doesn't work in eval anyway if they're not using a function

earnest phoenix
#

good point

slender thistle
#

inb4 redirect stdout to a Discord channel

grizzled raven
#

basically just add return ... and then remove return so it's just ... bigbrain

#

oh now i know what they mean

#

they want to use that date string in an actual place, so they don't want to use return because that'll exit the command or whatever

#

maybe it's just me that's slow but yeah

earnest phoenix
#

xyproblem 🧠

grizzled raven
#

so yeah declarations don't return the value of the variable, they return nothing

#

i don't even need to say any more lol why am i here pepeRun

tired nimbus
#

TreeMap can only store Objects that implement the Map interface right in java

sudden geyser
#

I don't think so.

valid grotto
#

If you're unable to provide that info on your own, you'll want to find a partner you can trust to help you verify your bot. This can be a parent, a legal guardian, a business associate, or anyone else you would trust enough to add to your bot's team.

So, uhh πŸ‘‰ πŸ‘ˆ .. anyone?

past needle
young flame
#

what exactly is the problemo

#

and it has nothing to do with coding lol

slender thistle
#

Then again, I doubt a random person will trust a stranger with their personal sensitive information.

earnest phoenix
young flame
#

probs lol

slender thistle
#

The way it's done is via an iframe element

#

So, use the HTML iframe element in your detailed description on your bot's page.

earnest phoenix
#

Oket thanks ^^

#

i wonder if you could force the use of js or conditional rendering

#

by putting an iframe to an SSR'd website

#

Hummm I didn't get it πŸ˜…

earnest phoenix
#

Thanks I managed ^^

valid grotto
earnest phoenix
#

integrated my old youtube downloader into my bot, instead of using it in python, i just turned it into a command line operation in async

valid grotto
sudden geyser
#

It technically could fit this channel, but it's better to ask elsewhere for that kind of request.

earnest phoenix
#

thank

inland pulsar
earnest phoenix
#

shhh nah KEKW

fathom nymph
#

Like mee6's dashboard
You can disable levels
but now how can i disable levels?
with command

QUICK.DB

#

Discord.js

sudden geyser
#

have some setting for if levels are enabled and toggle it on/off in the database, get it from the database to see if it's enabled or not

sudden geyser
#

I don't use Quick.db myself, but it should be simple setting and getting.

fathom nymph
#

aww

#

I tried searching it

#

None shows up

sudden geyser
#

searching for what

fathom nymph
#

The Disable levels

#

!disable Levels

sudden geyser
#

You don't need to search for the feature itself.

#

You need to search how to do the logic behind the feature.

fathom nymph
#

ohh

#

LOGIC

#

I get it

sudden geyser
fathom nymph
#

thx

stable nimbus
#

How do I get a mentioned users display name? When I do user.displayName I get an undefined

#
if(results[0].afk === 1) {
                            await message.channel.send(`${user.username} is AFK! \nReason: ${results[0].afkreason}`);
                        }

This is for checking if someone is set to be AFK.

pale vessel
#

Users don't have display name, members do

#

You can't add a nick to users

stable nimbus
#

duh.... Shite.

earnest phoenix
#

djs actually has a displayname property?

#

wow

stable nimbus
#

So member.displayName would work.

pale vessel
#

Yes

stable nimbus
#

Yes it does.

earnest phoenix
#

must be hard to type nickname ?? username

copper cradle
#

inb4 they just rename the variable to member

stable nimbus
past needle
#

why no one is asking for discord.js help 😭

sudden geyser
#

they got scared of monday

past needle
#

oooooooh

shy steeple
#

Is anyone else experiencing issues with images?

earnest phoenix
#

discord is having a stroke

wicked nova
#

p cikadap

past needle
#

oof

silent cloud
#

Hey tim

#

You know about discord.js-l doesnt working with opusscript

#

It have an error

#

HUGE error

#

I tried to do all true in Discord.client settings

#

But nothing

#

Error

#

I cant now sent it sry, bcs deleyed now it

pale vessel
#

Why are you using opusscript

#

Use @discordjs/opus

tardy hornet
#

its not letting me

#

to turn them on

pale vessel
#

Is your bot verified?

tardy hornet
#

yes

pale vessel
#

You need to create a support ticket requesting for those intents

small prairie
#

a normal development question.....
How can i make an image unrecognizable with OCR
Easiest way so that users wont face any problems reading that too...

agile lance
#
    return message.channel.send(":x: You aren't the bot owner. The bot owner(s) are: August#6565 and Completely Average Alien#3034.")
  }```

Why am I still not allowed to use the command?
dusky sundial
#

@small prairie look up CAPTCHA technology

small prairie
#

That seems to make it hard for humans too lmao

#

some humans are.... dumb

#

to say the least

dusky sundial
#

@agile lance you're checking if the ID of the author is NOT that equal to "705731402972528690" or "737918277866487928". I assume that's not what you want to do?

agile lance
#

I want to check if the id of the author IS either 1 or 2

dusky sundial
#

So use only ==

small prairie
#

do &&

dusky sundial
#

not !==

small prairie
#

No spax

#

hes using ||

agile lance
#

!== compares types

small prairie
#

it will never be both of those IDs atonce

agile lance
#

== doesnt

small prairie
#

Oh wait

#

my bad

dusky sundial
#

What language are you using Zephaniah?

agile lance
#

Javascript

small prairie
#

Nevermind im correct

#

use &&

regal creek
agile lance
#

&& worked

small prairie
#

this will always result true

#

As an ID will never be both of them

#

Awesome!

dusky sundial
#

My bad, thought it was python for some reason

#

I'm too tired

small prairie
#

Haha i get it

pure lion
#

How do I make an image embed through a link in discord? Can't find anything (and I don't mean sending an embed through a bot)

dusky sundial
#

And yeah, I get what you mean by captcha not being readable to some. I geuss just figure out a way to manipulate letters in a way that wouldn't make sense to an OCR

pale vessel
pure lion
earnest phoenix
regal creek
#

Oh

small prairie
#

Oh Damn this seems interesting

pure lion
#

Ah

small prairie
#

So this is how these stupid embeds work

#

Insane

earnest phoenix
#

yup

#

iirc for embed colors it uses a theme-color meta tag

dusky sundial
#

One solution might be to use a very weird font that's still readable to humans. But the more readable it is, the easier for a bot to read it too NPCMechanicShrug

earnest phoenix
small prairie
dusky sundial
#

I guess you'll have to live with some people not being able to read it haha, maybe add a feature to re-generate the picture until they can read it?

earnest phoenix
#

use recaptcha 🧠

#

/s

small prairie
#

lmfao

earnest phoenix
#

it would be nice if discord allowed embedding recaptcha with the changes to rule channels and all

#

but recaptcha is paid now

#

so

#

doubt it

dusky sundial
#

They always find a way to squeeze money out of things people need huh

small prairie
#

If its paid i think they could actually add it lmfao

#

maybe a server boosted feature

#

reach 50 boosts and get captcha for your server

#

Easy money for discord lmao

dusky sundial
#

Would be great for the bigger servers, I'm tired of being spammed by self-bots trying to invite you to their minecraft server

small prairie
#

Exactly

earnest phoenix
#

10 INVITES = FREE NITRO!! NOT AN IP LOGGER!!

small prairie
#

100% VOUCH ^

dusky sundial
#

According to wikipedia the only thing a captcha is, is just a distorted text with a slight gradient background.

earnest phoenix
#

used to be in 2006

#

nowadays proper captchas are everywhere, but silent

#

they track your behaviour

#

sites you visit

#

cough google

#

they track your cursor movement

dusky sundial
#

Oh google knows more about me than I do

earnest phoenix
#

true that

small prairie
dusky sundial
#

Wouldn't be surprised if they have a sample of my DNA somwhere

earnest phoenix
#

fun fact

#

data is worth more than oil

silver lintel
earnest phoenix
#

you got ratelimited

#

you need ip rotation

silver lintel
#

how do i do that

earnest phoenix
#

buy a ton of proxies and shuffle through them every time you get ratelimited

silver lintel
#

;-;

#

how long does the ratelimit ban last for

earnest phoenix
#

unknown

#

youtube doesn't expose it

silver lintel
#

oof

earnest phoenix
#

at least i don't think so

silver lintel
#

where do i get proxies

earnest phoenix
#

you can search around on google, i wouldn't be able to recommend some because i never bought them

silver lintel
#

is there another way?

earnest phoenix
#

bc im too lazy to retype i'm just going to quote what i said about a week ago lol

honestly small scale music bots are fucked
youtube placed such restrictions that small bots can't afford to go around them
while older bots which grew bigger had enough time to profit enough to be able to afford everything erwin stated

#

also, no

#

ratelimits are ip based

#

therefore you need to change your ip

small prairie
#

change your host everytime you get banned big brain

dusky sundial
#

I mean, you could prevent the ratelimit by reducing the amount of requests right? Will probably make the bot suck though.

earnest phoenix
#

correct

#

however youtube is as decisive as a middle aged woman in a mall

#

they place ratelimits whenever they want to based on your patterns and whether they found out you're a bot or not

small prairie
#

making music bots is literally useless now

earnest phoenix
#

this tbh

small prairie
#

the big ol' bots are dominating these areas

#

Unless you have some really unique feature or just wanna do a custom bot, Dont do it

remote nova
#

hey can someone help like when i just git pull in my vps then my bot automatically restart how can i disable it

river thistle
#

is your bot running with nodemon ?

remote nova
#

no

#

its pm2

gentle lynx
#

how can i make an async for loop

dusky sundial
#

In what lang?

gentle lynx
#

javascript

dusky sundial
#

Ah sorry, not very good with that. Maybe make an async method with the for loop inside of it?

verbal gull
#

i wish i could get that bot developer badge