#development

1 messages · Page 1149 of 1

earnest phoenix
#

Cannot read property 'players' of undefined

const { Utils } = require("erela.js");
const { MessageEmbed } = require("discord.js");

module.exports = {
    name: "play",
    aliases: ["p", "pplay"],
    category: "music",
    description: "Resume  music or queue a song from YouTube/SoundCloud.",
    permissions: "member",
    usage: "[song|url]",
    run: (client, message, args) => {
        const voiceChannel = message.member.voice.channel;
        const checkPlayer = client.music.*players*.get(message.guild.id);
solemn latch
#

where did you set
client.music

final rover
#

What is the app for the script bots?

misty sigil
#

what language?

final rover
#

anu

misty sigil
#

anu?

final rover
#

lol

misty sigil
#

what language do you wanna write your bot in?

final rover
#

oh

#

let me see-

#

metipnable nick?

#

nice

#

mentionable nick?

misty sigil
#

yes

solemn latch
#

usernames that are not alphanumeric suck

misty sigil
#

because your name was a pain in the ass

final rover
#

lol

#

is not

#

is a glich for the name

solemn latch
#

yeah, sucks to mention

#

also, nearly impossible to click on your profile in compact mode

regal jacinth
#

hey so i made a website using flask in python and i made a form in it sooo i want to connect the website to my bot so whenever someone clicks submit the bot will send an embed of the values to a specific channel ```py
from flask import Flask, render_template, redirect, url_for, request
import pyrebase

import discord
from dhooks import Webhook, Embed
from discord.ext import commands, tasks

app = Flask(name)
@app.route('/yami/home/posts')
def posts():
return render_template('posts.html')

@app.route('/verified', methods = ['POST', 'GET'])
async def verified():
if request.method == "POST":
result = request.form
return render_template("verified.html", result = result)```

solemn latch
#

that seems super abuseable

#

is this just for learning?

slender thistle
#

If you want to connect a Flask script to a d.py bot...

#

I'd suggest you use something asynchronous, like Sanic

regal jacinth
#

Sanic?

slender thistle
#

But the way I connected my aiohttp webserver to my bot was loading it from a cog

regal jacinth
#

hmmm

slender thistle
regal jacinth
#

so u made a cog in ur bot where u did @app.route and stuff ?

slender thistle
#

Let me dig up my GitHub repo for the aiohttp.web example

regal jacinth
#

sure and ty

bitter carbon
#

i made a welcome command but isnt working (dont say nothing in the console log ;-; ) ``` client.on("guildMemberAdd", async member => {
const avatar = member.user.displayAvatarURL()
let img = await canva.welcome({ username: ${member.displayName}, discrim: "0001", avatarURL: ${avatar} });
let attachment = new Discord.MessageAttachment(img, "welcome.png");

}```

slender thistle
regal jacinth
#

@slender thistle thank u ^^

slender thistle
#

hmu if you have any further questions

#

I don't remember if aiohttp.web supports templates by default so

misty sigil
#

nice gh pfp btw

slender thistle
#

ty

regal jacinth
#

okay

stoic pulsar
#

Just finished my bot that sends toast to people who ping it 🙂

#

adding it to the list

#

just wanted to share

solemn latch
#

@stoic pulsar

stoic pulsar
#

@solemn latch not me... the bot

solemn latch
#

but your name is ping for toast

stoic pulsar
#

@solemn latch yes. I made this bot so that people who want toast can add the bot to there server... and then ping for toast

sonic lodge
#

i think he's joking

stoic pulsar
#

@sonic lodge no

solemn latch
#

yeah, just being a meme lord

sonic lodge
#

not you lol

stoic pulsar
#

proof

#

ha

stoic pulsar
#

still dont believe? add it to your server... today!

sonic lodge
#

your bot is very fascinating

stoic pulsar
#

yes

solemn latch
#

can you make a toast api too

stoic pulsar
#

Just need to get it on thousands of servers

sonic lodge
#

yes, please make a toast api so we can spread awareness and show our love for toast

solemn latch
stoic pulsar
#

@sonic lodge just addd the bot to your server lol then make a announcment telling everyone about it... then dm all your friends to do the same

solemn latch
#

advertisements are a nono

stoic pulsar
#

oh nono

#

why am I paying to host this thing

sonic lodge
#

a bot that sends exquisite images of toast requires top tier hosting

solemn latch
#

requires a dedi server

stoic pulsar
#

well... dunno how to host it for free

sonic lodge
#

use your computer

stoic pulsar
#

and keep it running all day?

sonic lodge
#

if you can sure

thick gull
#

I want to make a food API

#

but I’m not sure how to make an API

misty sigil
#

database

#

then use some express magik

thick gull
#

teach me

opaque eagle
#

Is there a good source for learning what dependency injection is and how it works in typescript? Most of the ones I've seen gloss over the point of doing it in the first place

stoic pulsar
#

ok. waiting for aprovel

#

as you can see in logs

#

please allow the bot mods 🙂

stoic pulsar
#

nooo

#

I uploaded it on some other sites

sinful belfry
#

this channel is to do with development...

#

not about bot approval

stoic pulsar
#

tru

#

Forget i just said that

#

wait... @sinful belfry just so I dont get my hopes up... is a bot that sends toast pics likely to be approved?

sinful belfry
honest perch
#

I'm just curious why

sinful belfry
#

don't continue it here

stoic pulsar
#

coool!

quasi arrow
#

if lavalink better than using ffmpeg?

earnest phoenix
#

performance? no
accessibility? yes

solemn latch
#

i think as with most things programming, they each have their benefits.

earnest phoenix
#

lavalink is for people who aren't familiar with lowlevel ring of programming

torn ravine
#

imo Lavalink has less draw-backs than ffmpeg + ytdl

earnest phoenix
#

it doesn't

#

you just need to know how to use it properly

torn ravine
#

ytdl is buggy but so is lavalink

earnest phoenix
#

you don't have to use ytdl anyways lol

#

any youtube scraping library works

#

ffmpeg + any performant lib easily outperforms lavalink

torn ravine
#

Lavalink for me is especially useful for its soundcloud + playlist support in general

#

right out of the box

earnest phoenix
#

in .net i use ffmpeg + youtubeexplode, it took me a month to figure out byte manipulation, duplex buffering, piping and shit like that but it was worth it

#

easily outperforms lavalink on all aspects

#

cpu usage and ram usage

torn ravine
#

Lavalink has soundcloud support out the box

earnest phoenix
#

...okay?

#

you can implement soundcloud support too lol

#

like i said

#

lavalink is for folks that don't want to mess around with lowlevel terms and manually parsing everything

#

but in terms of performance, ffmpeg is the way to go

torn ravine
#

yea ik

earnest phoenix
#

you can even make it faster by abstracting the conversion logic from ffmpeg and converting it into your language to keep it contained in code

torn ravine
#

but lavalinks saves the stress of implementing soundcloud and playlist support

earnest phoenix
#

yeah

#

that's why i said lavalink is better in terms of accessibility

#

everything is done for you

#

falls flat in performance

#

it's a webserver made in java

#

just wraps around lavaplayer

oak cliff
#

quick question
in javascript, im trying to get just a portion of a string, using .substr()

let secondmessage = `${allPoolItems.substr(1804, 3400)}`;

if my understanding is correct, it should get the string from the 1804th character to the 3400th character, which would be 3400-1804 = 1,596 characters which is small enough to send in one discord message. however, when i console.log(secondmessage.length) it tells me the length is 2499
am i missing something?

slender thistle
#

Are you sure that's actually what secondmessage is assigned?

oak cliff
#

i dont ever assign anything else to it again

#

this is what im doing:

        let firstmessage = `${pool} Items - \n${allPoolItems.substr(0, 1804)}`
        let secondmessage = `${allPoolItems.substr(1804, 3400)}`;
        let thirdmessage = `${allPoolItems.substr(3400)}`;
        console.log(firstmessage.length, secondmessage.length, thirdmessage.length);
#

and i get (1823, 2499, 903) in console

slender thistle
#

Huh, weird. Can't reproduce it myself

earnest phoenix
#

Anyone recommends a lesson or website to learn python or JavaScript

slender thistle
#

There's JetBrains Academy and Sololearn I'm aware of

earnest phoenix
#

Is it free?

slender thistle
#

Sololearn - yes
JetBrain Academy - give me a second

torn ravine
#

someone that actually wants to learn

earnest phoenix
#

Lol

torn ravine
#

first time I’ve seen in a while

slender thistle
#

last time I checked (a few minutes ago) it was free

earnest phoenix
#

Thx 😄

slender thistle
#

nvm

oak cliff
#

okay so i console.log'd allPoolItems.length and its 4303, so something is messing up here cause 4304-1804 is 2480 which thers no way second message could be 2499 if theres only 2480 characters left :/

torn ravine
#

@earnest phoenix good luck man. Wish you the best

earnest phoenix
#

I’ve thought of a good idea and I wanna do it so I wanna learn

bright meadow
#

guys real quick, if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?

drifting wedge
#

can anyone help me?

earnest phoenix
#

If anyone whiling to help would appreciate it?

drifting wedge
#

the welcome bot isnt sending messages

bright meadow
#

check if DIRECT_MESSAGES is in your gatewayintents 0Exe

drifting wedge
#
async def on_member_join(member):
    db = sqlite3.connect('main.sqlite')
    cursor = db.cursor()
    cursor.execute(f'SELECT channel_id FROM main WHERE guild_id = {member.guild.id}')
    result = cursor.fetchone()
    if result is None:
        return
    else:
        cursor.execute(f"SELECT msg FROM main WHERE guild_id = {member.guild.id}")
        result1 = cursor.fetchone()
        embed = discord.Embed(colour=0x3498DB, description=f'')
        members = len(list(member.guild.members))
        mention = member.mention
        name = member.name
        guild = member.guild
        embed = discord.Embed(colour=0x3498DB, description=str(result1[0]).format(members=members, mention=mention, user=name, guild=guild))

        channel = client.get_channel(id=int(result[0]))

        await channel.send (embed=embed)```
earnest phoenix
#

If anyone whiling to help would appreciate it?
@earnest phoenix @torn ravine if u can can u teach me

bright meadow
#

guys real quick, if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?

torn ravine
#

That’s alot

earnest phoenix
#

?

drifting wedge
#

?

earnest phoenix
#

That’s alot
@torn ravine should I learn JavaScript or python

torn ravine
#

Its up to preference

earnest phoenix
#

there are more languages than just that

bright meadow
#

guys real quick, if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?
pls

earnest phoenix
#

Its up to preference
@torn ravine can u teach me? :3

#

pay them

#

time is money

#

?

#

Do t get involved pls

#

no one is going to teach you for free

#

time is money
@earnest phoenix life isn’t money tho

torn ravine
#

Teaching a language is kinda

earnest phoenix
#

who said anything about life

#

I speak 5 languages wouldn’t be that hard

torn ravine
#

hard. because the way I explain things makes sense to only me

earnest phoenix
#

programming languages are nothing like spoken languages

#

who said anything about life
@earnest phoenix who said anything abt money

#

i did

#

because

#

So ur saying Arabic? Is easy?

#

what the fuck

#

who said that

slender thistle
#

why are codecademy URLs so big

earnest phoenix
#

i said time is money - people value their time, if you want someone to go out of their way to spend their time on you, pay them

#

@torn ravine I mean just basics

torn ravine
#

we’re not talking about spoken languages we’re talking about CODING Language

bright meadow
#

if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?

oak cliff
#

@slender thistle I WAS EDITING THE WRONG FILE SMH

earnest phoenix
#

Thx

slender thistle
torn ravine
bright meadow
#

guys oof

#

need help

earnest phoenix
#

I’ll start tmrrw

torn ravine
#

any resources you want is a google search away

bright meadow
#

if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?
even google didnt help me

earnest phoenix
#

learning a programming language is different than learning a spoken language, you should start with CS basics and then continue to programming languages

drifting wedge
#

@slender thistle

#
async def on_member_join(member):
    db = sqlite3.connect('main.sqlite')
    cursor = db.cursor()
    cursor.execute(f'SELECT channel_id FROM main WHERE guild_id = {member.guild.id}')
    result = cursor.fetchone()
    if result is None:
        return
    else:
        cursor.execute(f"SELECT msg FROM main WHERE guild_id = {member.guild.id}")
        result1 = cursor.fetchone()
        embed = discord.Embed(colour=0x3498DB, description=f'')
        members = len(list(member.guild.members))
        mention = member.mention
        name = member.name
        guild = member.guild
        embed = discord.Embed(colour=0x3498DB, description=str(result1[0]).format(members=members, mention=mention, user=name, guild=guild))

        channel = client.get_channel(id=int(result[0]))

        await channel.send (embed=embed)``````
#

its not working

earnest phoenix
#

too bad

#

find out why

drifting wedge
#

it umm it doesnt send the message

earnest phoenix
#

debug your code

honest perch
#

Ok

slender thistle
#

Define "not working"

honest perch
#

We arent your console

earnest phoenix
#

place breakpoints if your IDE supports it, if not, do the old "printing to console" debugging

drifting wedge
#

like it says an error about member join

honest perch
#

We can't see the error

drifting wedge
#

1 sec

#

wait tho

#

should i have await channel.send (embed=embed)

#

?

#

its not sending an embed

honest perch
#

¯\_(ツ)_/¯

slender thistle
#
str(result1[0]).format(members=members, mention=mention, user=name, guild=guild)

channel = client.get_channel(id=int(result[0]))```
#

these two lines

#

don't make sense to me

#

ffs I hate these x1 x2 variables

#

Can you post the full traceback please

drifting wedge
#

no erros

#

just doesnt send

slender thistle
#

Are you sure you aren't silencing your errors instead

drifting wedge
#

yes

#

@slender thistle

slender thistle
#

Show your full code please

earnest phoenix
#

I need someone’s opinion in smthg but dm me coz it’s private

solemn latch
#

you should be more specific

earnest phoenix
#

It’s about wut kind of thing I wanna do for bot

regal jacinth
#

@slender thistle sorry to ping u but can u recommend me a place where i can learn aiohttp?

slender thistle
slim umbra
#

and yes ill make metadata better

regal jacinth
#

got it

earnest phoenix
#

Can I add my bot here?

regal jacinth
#

thanks

sinful belfry
#

-faq 1 -c @earnest phoenix (this is not the right channel to ask tho)

gilded plankBOT
bright meadow
#

if i insert this into my sql text text <String> text, it becomes text text text (using php mysqli), why and what can i do?

#

ping on answer pls

earnest phoenix
#

bahane

zealous torrent
#

Does anyone know how to make a page with css on top gg

earnest phoenix
#

use the html style tag

zealous torrent
#

...

sinful belfry
#

what can i do about a SHARDING_READY_TIMEOUT i keep getting whenever i start up my bot? (using discord.js-light)

#

i've tried spawning multiple shards but only one ever seems to spawn (and i still get the sharding ready timeout issue)

earnest phoenix
#

How do I check how many guilds my bot is in

sinful belfry
#

library?

earnest phoenix
#

?

sinful belfry
#

what library is your bot using?

earnest phoenix
#

Discord.js?

sinful belfry
#

you can just do .size() on the guild cache and it should give you the number

earnest phoenix
#

Am on my phone

sinful belfry
#

you're programming on your phone?

#

you can still check the link lol

drifting wedge
#

@slender thistle wdym

#

1 sec

earnest phoenix
#

you can still check the link lol
@sinful belfry lol

drifting wedge
#

this is rthe welcome message code

earnest phoenix
#

I don’t understand so I open it then wut?

sinful belfry
#

i suggest you learn how to read documentation, but you do client.guilds.cache.size() to get the guild count

earnest phoenix
#

I don’t have the script on phone

sinful belfry
#

ok, that isn't really my issue. i just answered your question

earnest phoenix
#

...

sinful belfry
#

you can screenshot what i sent and come back to your pc

earnest phoenix
#

Any other way?

sinful belfry
#

im so confused why are you asking if you're unable to do it at the moment?

earnest phoenix
#

Coz am curious

#

i suggest you learn how to read documentation, but you do client.guilds.cache.size() to get the guild count
@sinful belfry after I do this where does guild count appear

sinful belfry
#

just console.log it and you'll see

#

try it on your computer

#

no point asking now if you keep saying you're on your phone

earnest phoenix
#

Got the script

#

Hi

#

ok

#

Would u recommend python or JavaScript for beginner

#

wrong place @earnest phoenix

#

I’ll tell u it in this sense : piss off

sinful belfry
earnest phoenix
#

no

sinful belfry
#

@earnest phoenix can you not?

earnest phoenix
#

Lol I was messing with him

#

Ye sry

#

yeah that's a dick move

#

@earnest phoenix seras en la wrong channel

#

@earnest phoenix lugar errado

#

Falso*

#

Estas*

sinful belfry
#

ok whoever continues to talk here about anything unrelated to development is getting a mute

earnest phoenix
#

uhh isn't that spanish

#

oh sorry

#

Vc fala em português?
@earnest phoenix habillé espanol

sinful belfry
#

wtf

earnest phoenix
#

OMG AUTO CORRECT

sinful belfry
#

literally get out of this channel

#

don't care

earnest phoenix
#

Why French bully me

#

Am trying to communicate and tell him wrong channel

#

Chill bro

sinful belfry
#

i told you to stop

earnest phoenix
#

ok that's nice and all but just be quiet

#

Not even a thank u

#

unless u want to be muted

slender thistle
#

What's the best way to see if I only have, say, 3 characters, left until the end of a string?

trim saddle
#

@slender thistle i can help

slender thistle
#

Would len(string) - 3 >= i work in this case? i being an index of a character

sinful belfry
#

don't start this again, please

trim saddle
#
coolstring = "owo"
thing = 0
for x in coolstring:
    if len(coolstring) - coolstring[x].index():
        print("ok cool")
#

i don't know if this would work or not

#

because i wrote it was a meme

slender thistle
#

What does .index() imply?

trim saddle
#

isn't index like

#

the point in the string?

#

where the letter is at?

slender thistle
#
>>> "ea".index("e")
0
>>> "ea".index("a")
1
#

well, yes

trim saddle
#

oh ok

#

hold on

slender thistle
#

But that doesn't look exactly safe

#

I'm relying on a for-loop in my case

trim saddle
#

it should be safe unless you're misusing the index

slender thistle
#
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
TypeError: string indices must be integers
#

uh huh

trim saddle
#
coolstring = "owo"
for x in coolstring:
    if len(coolstring) - (coolstring.index(x)+1) <= 3:
        print("ok cool")
slender thistle
#

How performant do you think that will be in big strings

trim saddle
#

god awful

#

what are you using this for anyway

slender thistle
#

hence why I don't want to use .index

#

A simple snippet of code for myself to use in the future

trim saddle
#

that's descriptive

slender thistle
#

it is what it is catshrug

trim saddle
#

well...

slender thistle
#

So far I have this

def paginate(string: str, amount_of_chars: int) -> List[str]:
    pages = []
    mi = 0
    for i in range(0, len(string)+1):
        if i % amount_of_chars == 0 and i != 0:
            print("y", i)
            pages.append(string[mi:i])
            mi = i
        elif i >= len(string) - amount_of_chars:
            print("i", i)
            pages.append(string[i:])
            return pages
    return pages
#

But

>>> paginate("yolohateaf", 4)
y 4
i 6
['yolo', 'teaf']
trim saddle
#

you could do map

slender thistle
#

Eh, I'm looking forward to getting a list anyway

#

If I wanted a generator, I'd use map

#

Oh, I think I know how to solve my issue...

trim saddle
#

appendn't?

slender thistle
#
        if i % amount_of_chars == 0 and i != 0 and i + amount_of_chars < len(string):
            print("y", i)
            pages.append(string[mi:i])
            mi = i``` 😂
#

which doesn't fucking work

quartz kindle
#

if thats for pagination, wouldnt it be better to split on spaces? instead of counting characters

slender thistle
#

str.split(" ")?

quartz kindle
#

then for each word, check if the next word exceeds the max length

slender thistle
#

Might be better, but I'm just being a bitch here with counting characters catshrug

quartz kindle
#

i do this but with newlines instead

slender thistle
#

(at 5am, may I add)

quartz kindle
#

split on newlines, add one by one, if the next one makes it exceed the limit, move to a new page and continue

#

since its for my eval code

#

for regular text, spaces would be better

slender thistle
#

Don't know, I somewhat prefer my output to just be "strict"

crystal socket
#

@quartz kindle you're doing god's work helping the whitenames who don't know how to code

slender thistle
#

Might make another template for spaces once I'm done with this, though

quartz kindle
#

well the principle is the same

#

whether with words or newlines or characters

slender thistle
#

yeah, except my code apparently doesn't want to consider 8 % 4 == 0 and 8 != 0 true

#

You know, I feel like a while loop might be better for this

quartz kindle
#

i use a for loop, but you can also use a while

#

i % amount_of_chars == 0 and i != 0: how can i be 0 and not be 0 at the same time

slender thistle
#

That's what I'm asking myself

quartz kindle
#

lmao

earnest phoenix
#

Ahh yes, the wonderful world of programming

#

At least its not JS

quartz kindle
#

its worse than js :^)

earnest phoenix
#

Oh hecc you

#

(╯°□°)╯︵ ┻━┻

slender thistle
#

...okay, now it decides to work?

#

what the fuck?

quartz kindle
#

lmao

#

anyway you can do a simple trick with arrays

#

not sure how to translate this pseudocode to py but this is more or less what i do ```js
array = [""]
for(char of string) {
if(array[array.length-1].length + char.length > someLimit) {
array.push(char)
} else {
array[array.length-1] += char
}
}

slender thistle
#

what would SomeLimit be in this case?

quartz kindle
#

the string length limit per page

slender thistle
#

Oh, array[array.length-1] + char won't return a string?

#

or does JS implicitly get the length of the string?

#

ah there we go

quartz kindle
#

nope mb

#

lmao

slender thistle
quartz kindle
#

its not the first time i forget this exact thing

slender thistle
#

as long as it's fixed :^)

#

Oh I see what that does

#

I'll note it, thanks

#
>>> paginate("yolohateaf", 4)
['yolo', 'hate', 'af']

well that was rather a stupid fix but it's done

#
def paginate(string: str, amount_of_chars: int) -> List[str]:
    pages = []
    mi = 0
    for i in range(0, len(string)+1):
        elem = ""
        if i % amount_of_chars == 0 and i != 0:
            elem = string[mi:i]
            mi = i
            pages.append(elem)
    pages.append(string[mi:])
    return pages
``` this just feels weird
#

ah, obviously

>>> paginate("yolohateaf", 5)
['yoloh', 'ateaf', '']
earnest phoenix
quartz kindle
#

why range 0 to lenght+1?

slender thistle
#

to iterate over the string

#

aka getting indexes

quartz kindle
#

yeah but if you have 10 characters, you're iterating 11 times, no?

slender thistle
#

(P.S. I don't understand why I had to do len(string) + 1)

slender thistle
#

That confuses me too

earnest phoenix
#

Idk let me take a look

#

If my attention span will allow it

slender thistle
#

Oh, wait, no

#

I get it now

#

...no

earnest phoenix
#

What is it then?

#

Or not

slender thistle
#

False hope

quartz kindle
#

you can also use for in in py no?

#

for char in string

slender thistle
#

Yeah

quartz kindle
#

no need for ranges then

slender thistle
#

I don't know, I just feel like indexes are more understandable for me rather

#

I'll pull the "to each their own" card since I cba to change it atm :^)

quartz kindle
#

then according to the internet it should be for i in range( len(string) )

slender thistle
#

That's something I actually don't get

#

it works just fine in the snippet I sent but not in my test script

#
>>> for i in range(0, len(a)+1):
...     print(a[i])
...
y
o
l
o
h
a
t
e
a
f
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
IndexError: string index out of range
#

which is plain weird

#

Python is cursed

quartz kindle
#

remove the +1

slender thistle
#

yeah, works just fine

#

wait what

#

It works with and without + 1

#

oh, wait

#

Yeah, it actually makes sense. "test"[0:10] will still return test instead of erroring out

#

and since that's essentially what happens in my code, it just implicitly works

#

Confirmed. Just tried with + 4 and + 5 and I still the same proper list

faint prism
#

I like that theme

topaz fjord
#

that theme looks like the matrix but res

#

red

slender thistle
#

Fuck easily seeing exceptions by color

faint prism
#

lmao

faint zenith
#

is there any simple guide vedio to design html page for top.gg

faint prism
#

I mean, that's just css isn't it?
Just get creative

faint zenith
#

yes css

earnest phoenix
#

vedio

idle mountain
#

you're not really gonna find any good video guides on HTML, but this is my personal favorite (non-video) guide: https://www.w3schools.com/html/
it's not top.gg specific but it'll help you a lot

slender thistle
#

There's no really guide for top.gg per se, but you would just have to apply vanilla HTML/CSS knowledge and use Inspect Element

faint prism
#

vidya*

faint zenith
#

ohk thanks guys

warped forge
#

some one can help me? i dont can't instal the @discordjs/opus

summer torrent
#

why?

solemn latch
#

iirc, opus gives some warnings while installing. many of these can be ignored

warped forge
#

He are giving error during the installation, and because of that the installation is not being completed

earnest phoenix
#

hey

#

i need transfer this

#

to another website

faint prism
#

||shady link||

earnest phoenix
#

api transfer

solemn latch
#

is this your api?

earnest phoenix
#

yeah its mine

solemn latch
#

then you can just add an a record pointing to the api's server

earnest phoenix
#

how can i do it

solemn latch
#

depends on where you registered the domain at

earnest phoenix
#

any example pls

drifting wedge
#
async def tags(ctx):

    embed = discord.Embed(
        colour = discord.Colour.blue()
        )

    embed.set_author(name='Arch | Welcome Tags', icon_url=f"{ctx.client.avatar_url}")
    embed.add_field(name='Tags', value="{name} says users name\n{mention} says mention user (no ping notification)\n{members} says amount of members in server\n{guild} says server name ", inline=False)
    embed.set_thumbnail(url=f"https://imgur.com/bVHLXC2.jpg")
    embed.set_footer(text=f"{ctx.guild.name}", icon_url=f"{ctx.guild.icon_url}")
    embed.timestamp = datetime.datetime.utcnow()

    await ctx.send(embed=embed)```
sends this errror: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'client'
solemn latch
#

my example of adding a new record will be mostly different than yours

#

just contact your registrar, or look at their faq pages

faint prism
#

any example pls
@earnest phoenix you just want to change the domain?

earnest phoenix
#

@earnest phoenix you just want to change the domain?
@faint prism no i dont wanna change domain

#

they are mine domains

drifting wedge
#
async def welcome(ctx):

    embed = discord.Embed(
        colour = discord.Colour.blue()
        )

    embed.set_author(name='Arch | Welcome Setup', icon_url=f"{ctx.message.author.avatar_url}")
    embed.add_field(name='Setup Commands', value="Available Setup commands: \n\n.welcome channel <#channel>**\n.welcome text <message>\n\nPlease do __.welcome tags__ to see the tags/variables for welcome messages", inline=False)
    embed.set_thumbnail(url=f"https://imgur.com/oSuDPs8.jpg")
    embed.set_footer(text=f"{ctx.guild.name}", icon_url=f"{ctx.guild.icon_url}")
    embed.timestamp = datetime.datetime.utcnow()

    await ctx.send(embed=embed)```
#

sorry this

earnest phoenix
#

i need transfer texts for index.html

#

for another site

solemn latch
#

please use hastebin or something

summer torrent
#

then?

drifting wedge
#

sorry

solemn latch
#

other people are trying to get help too

#

didnt you ask for help for the same exact error a few days ago @drifting wedge

#

the solution in this case is very likely the same exact thing

drifting wedge
#

no

#

its something else

#

wait 1 sec

solemn latch
#

lol?

#

literally same cause

warped forge
#

Can someone help me? I can't install @discordjs/opus. I'm using repl.it to make the bot, and the error is:

solemn latch
#

does repl it support opus?
i know some other similar platforms do not allow opus

split hazel
#

its pointless anyways

#

repl blocks voice connections i believe

solemn latch
#

^ there ya go

earnest phoenix
#

the hosts are too weak to handle music in over 5 guilds anyways lol

split hazel
#

so music bots are a nono on repl

#

most free hosts can barely handle music botums

solemn latch
#

looking at the repl fourms, others are mentioning opus not installing due to the platform.
so that too.

golden condor
#

Host lavalink in one repl and bot in another mmLol

earnest phoenix
#

funny to think you'll be able to run a jvm process without crashing mmLol

solemn latch
#

crashing is part of the fun

#

my bots been crashing once a day this entire week

quartz kindle
golden condor
#

Epic

solemn latch
#

was on 10 days no crashes/errors till i updated

quartz kindle
#

im gonna release an update soon too

#

already expecting shit to go wrong

#

lmao

torn ravine
#

if I wanted to make an AI that ups difficulty in a fnaf game based on how well the player is playing, what’s a recommended language

earnest phoenix
#

py

#

ML is extremely easy in py

torn ravine
#

oh okay

solemn latch
amber fractal
#

wouldnt you also need to remake the game?

#

can you up the difficulty mid game?

quartz kindle
#

propigating

solemn latch
#

shh

#

i dont english well

earnest phoenix
#

mysql sorry i have to puke

solemn latch
#

i like mysql pandasad

quartz kindle
#

i need to put my bot on github, even if in a private repo

earnest phoenix
#

oracleware

quartz kindle
#

all these years i've been working and testing in prod lmao

earnest phoenix
#

use postgres over mysql, performance and open src

solemn latch
#

i cache everything that gets frequently used anyway.
hopefully it wont be a problem before i end up not caring about the project anymore

high ermine
#

Well my bot is acting really weird it’s typing weird stuff on my server and I’m not commanding it

solemn latch
#

token leak?

high ermine
#

Idk

#

I never leaked it

drifting wedge
#

what would be the bots avatar?

solemn latch
#

if your bots doing something extremely unexpected, it could be a token leak

drifting wedge
#

like ctx.client.avatar_url?

#

change token

#

ig

high ermine
#

Well I’m really new to bot developing sorry so I don’t understand what it is and I a smart enough to never leak it

solemn latch
#

🤷‍♂️ there are bot developers with hundreds of thousands of users that have leaked tokens

split hazel
high ermine
#

Oh

#

Ty

drifting wedge
#

what would be the bots avatar? like ctx.client.avatar_url?

solemn latch
faint prism
#

bots pretty dead anyway so db performance doesnt matter pandasad
@solemn latch Damn I should keep stats like that

solemn latch
#

i keep a lot of bot stats

faint prism
#

Is that grafana?

solemn latch
#

yeah

faint prism
#

I see people use that a lot at work

solemn latch
#

its fun to watch as commands get run and whatnot

split hazel
#

i need that

hardy steeple
#

whenever i ask my bot to send am embed it sends this error for some reason, even though it worked yesterday

solemn latch
#

what error

torn ravine
#

@solemn latch how?

solemn latch
#

Prometheus and grafana and too much time

high ermine
summer torrent
#

🤔

solemn latch
#

lol

#

user info hacked?

high ermine
#

I just hate the status

#

user info hacked?
@solemn latch idk this is my bot

summer torrent
#

what is that badges

high ermine
#

Let me tell you

#

The tool badge

#

Is the discord staff badge

solemn latch
#

client mods?

high ermine
#

The infinity one is discord partner

#

The 3rd one is hype squad events

torn ravine
#

thats not the point

high ermine
#

client mods?
@solemn latch idk

torn ravine
#

you’re using malicious client mods

high ermine
#

???

slender thistle
#

Inspect Element

solemn latch
high ermine
#

Well I hate to break it to you but I’m on Mac and Mac I think dosent have inspect element

sudden geyser
#

it does lol

torn ravine
#

command + shift + I

drifting wedge
#

how do you connect grafana with discord bot?

golden condor
#

It's a modded client that lets you use your bot.

summer torrent
#

client mods are against to ToS btw

sudden geyser
#

does anyone really care about modded clients though

drifting wedge
#

and how do you see how many guilds ur bot is in?

golden condor
#

It lets you DM users and message in servers and such

#

My friend did it once to me

summer torrent
torn ravine
#

@drifting wedge client.guilds.cache.size

high ermine
#

command + shift + I
@torn ravine just opens my bookmarks

torn ravine
#

or bot

solemn latch
#

grafana doesnt really store data.
my grafana looks at my prometheus database.

drifting wedge
#

client.guilds.cache.size

solemn latch
#

so, atleast in my case.
its not

torn ravine
#

@high ermine there are ways to open inspect element on mac

drifting wedge
#

my bot is in py

golden condor
#

These are big words I don't understand

drifting wedge
#

does it still work?

high ermine
#

o

summer torrent
#

no

high ermine
#

Well I gotta sleep

torn ravine
#

@drifting wedge not sure

high ermine
#

Cuz

solemn latch
#

prometheus works with any language

drifting wedge
#

is it possible to check the guilds ur bot is in with py?

solemn latch
#

yeah of course

#

docs covers how

high ermine
#

3 am

#

;_;

summer torrent
solemn latch
#

omg

#

bingo

#

but fr, can we get that pinned

summer torrent
#

lol

earnest phoenix
#

im amused how we live in such a tech savvy world and you'd expect the recent generations to know how to take a screenshot but nope

torn ravine
#

lOl

faint prism
#

@solemn latch so that dashboard is for your bot right? Does that mean you have an API? How do you go about reporting data to grafana?

solemn latch
#

prometheus

faint prism
#

Neat. I think I found what I needed, thank you

solemn latch
#

pretty much, in my bot i have a Prometheus client.
the client serves an http server with the bot stats.
every x seconds(i think i have mine on 1 minute) the Prometheus server gets all the data on the bot and stores it.

#

then i just told grafana to ask Prometheus Server for the data

#

the nice thing about it, is it tracks all kinds of stats, about the bot, or the server.
i can even add new clients for Prometheus to scrape in a few minutes and have it available in grafana

faint prism
#

Man, that's pretty sick

#

I was thinking about a quick and dirty attempt at it parsing my log files for metrics and timestamps

glossy elk
#

whoever is good with ytdl

#
error: Error occurred when streaming video: message=Error parsing config: Unexpected token ; in JSON at position 356455, stack=Error: Error parsing config: Unexpected token ; in JSON at position 356455```
#

trying to convert my old project to new

golden condor
#

It's a JSON error, not ytdl

glossy elk
#

it is

#

ytdl

drifting wedge
#

does lavalink work with heroku?

earnest phoenix
#

no

glossy elk
#

i dont thnk so

earnest phoenix
#

but yes

glossy elk
#

heroku is so limited

#

correct me

#

if im wrong

earnest phoenix
#

it disconnects after 5 minutes apparently

drifting wedge
#

?

earnest phoenix
#

the node disconnects after 5 mins

glossy elk
#

hey auric

#

are u good with ytdl

earnest phoenix
#

hmm

glossy elk
#

^^ look above

earnest phoenix
#

damn what happened

#

o the json is corrupt or something

#

try reinstall ytdl-core

drifting wedge
#

if i can get it to not disconnect

#

would lavalink work?

earnest phoenix
#

yes

drifting wedge
#

ok

#

grea

#

great

#

i found some pingers

#

so itll be good

earnest phoenix
#

yeah it won't work like that

#

u also shouldn't use heroku to host a lavalink server

solemn latch
#

^

#

If your on a free host, you should only do relatively light things.

drifting wedge
#

u also shouldn't use heroku to host a lavalink server
@earnest phoenix welp ill try

#

also is a private github rep and heroku safe?

#

like no token leaks?

earnest phoenix
#

yeah

#

its private

earnest phoenix
faint prism
#

curl -LO http://api.avacadobot.pw/

golden condor
#

that ^

#

lol

glossy elk
#

hey guys

#

anyone know commando

#

I tried to disable unknown commands

#

but it still runs

solemn latch
glossy elk
#

ik

#

i did

drifting wedge
#

Does heroku work with SQLite?

slender thistle
#

SQLite is local so no

drifting wedge
#

Ahhhh frick

slender thistle
#

Unless you somehow make/get an API that utilizes SQLite

earnest phoenix
#

it doesn't work with any ephemeral storage iirc

slender thistle
#

Yeah

drifting wedge
#

Would mongodb work ?

slender thistle
#

Hosted remotely

#

anything that uses local flies won't work if ran on Heroku

drifting wedge
#

Is mongo remote?

slender thistle
#

It can be hosted remotely

drifting wedge
#

Is it free?

solemn latch
#

Feels bad trying to get everything free

slender thistle
#

If you manage to get a machine running 24/7 to run it on

#

Or use MongoDB Atlas

earnest phoenix
drifting wedge
#

Is this good?

golden condor
#

Get a vps

earnest phoenix
earnest phoenix
#

what is this

#

i didnt know

solemn latch
#

Unmetered ssd storage is kinda weird for a vps

#

What provider is that @drifting wedge

amber fractal
#

it's not a vps

solemn latch
#

Ah

amber fractal
#

Think of it as one of those "minecraft hosting" sites

drifting wedge
#

What provider is that @drifting wedge
@solemn latch pebblehost

amber fractal
#

they do one thing

#

Heavily restricted

drifting wedge
#

?

solemn latch
#

If your paying, should probably get a vps

amber fractal
#

^

earnest phoenix
#

after what

amber fractal
#

1gb of ram for $3 isnt even worth

sonic lodge
#

wdym after what

earnest phoenix
drifting wedge
#

If I were to use heroku

sonic lodge
#

run it?

drifting wedge
#

How what Dbs could I use?

earnest phoenix
#

i do

solemn latch
#

Any remote database

faint prism
#

curl -LO http://api.avacadobot.pw/
@earnest phoenix connect to the host PC, assuming it's Linux, run the command we sent and it will download the target URL being served on port 80 to a local file

#

If That's not exactly what you wanted, you need to be clearer in your question

drifting wedge
#

Is this legit?

#

It’s free?

solemn latch
#

🤔

slender thistle
#

Why are you trying to search for something free instead of just using a cheap option

#

You won't get anything of good quality for free

drifting wedge
#

My bot is in like 20 servers

#

10 actually

agile solar
#

how can i get added to the bot developer role?

drifting wedge
#

So I’m not worried about getting anything good

solemn latch
#

Have an approved bot by top.gg @agile solar

agile solar
#

its been in there for a week or so, still no approval

#

@solemn latch

solemn latch
#

Your bot won't ever get the chance to grow if its on bad platforms @drifting wedge
I've seen bots go from 5 servers to hundreds in hours on top.gg

By limiting your server stuff, you limit your bot.

agile solar
#

how long does it take for the bot to get approved? @solemn latch

solemn latch
#

The queue is 3+ weeks

agile solar
#

ahh okay

#

thank you

drifting wedge
#

Your bot won't ever get the chance to grow if its on bad platforms @drifting wedge
I've seen bots go from 5 servers to hundreds in hours on top.gg

By limiting your server stuff, you limit your bot.
@solemn latch mine won’t be able to lol

#

I won’t be able to apply for a ton of time

#

So it’ll have to be under 100 servers

#

So I’m not worried abt rescorces

solemn latch
#

🤔

#

100 server restriction isn't applied yet

#

And won't be for a few months

drifting wedge
#

Yes

#

Oh ok

#

Wait tho

#

Yep

#

Well then I gotta get better stuff

#

But I won’t be able to apply

#

Bc my parents wouldn’t let me

golden condor
#

well that's your problem, nothing you can do.

solemn latch
thick gull
#

tempted to install Debian on an old laptop and use that as a host

solemn latch
#

Old hardware can be great for hosting stuff.

thick gull
#

yeah

#

I have a ton of old laptops/PCs

#

the issue is that they’re all old

#

Id need to clean out the decade of dust in some of them

solemn latch
#

Most server tasks don't really need great hardware

thick gull
#

no the issue is the dust and cleaning it

#

there’s a ton of files on them

#

I’ve been procrastinating going through like 3 old windows desktops

#

they’re all like

#

a decade of dust++ now

drifting wedge
#

Wait I have a laptop

solemn latch
#

Honestly. Would get some air cans, take them outside and just blow each one out for like a minute

drifting wedge
#

If I put it on sleep mode

#

Does the code still run?

solemn latch
#

No

drifting wedge
#

As a background task?

thick gull
#

dont put it in sleep mode

#

just like

#

leave it on

drifting wedge
#

If I close the screen?

thick gull
#

no afaik most laptops shutdown network when closed

solemn latch
#

Youd have to change the lid mode

#

Iirc on windows you can disable all those features

thick gull
#

i know this from closing my laptop and being disconnected from minecraft

drifting wedge
#

So if I were to use a laptop as a host

#

What would I do?

#

Install python?

#

Lol

golden condor
#

On that note, I am trying to make Ubuntu suspend on lid close but I couldn't make it work (I've tried everything I could find on the internet)

solemn latch
#

Same as any other host

thick gull
#

I would put it so the actual hardware isn’t on a table, probably on its side for air flow

#

depends on the laptop

#

but it’s not even needed tbh

#

just dont burn down your house

golden condor
#

That's always a good idea

thick gull
#

just leave it running

drifting wedge
#

Like a stand?

thick gull
#

dont close the screen or whatever, you can experiment, your laptop might be different

drifting wedge
#

Also can any damages be done if I leave it on for a long time?

thick gull
#

most damages that could be done is heat if it’s not properly ventilated

#

or fans could die but that takes a while

#

just clean out any dust or whatever might be inside b4

drifting wedge
#

I’d have to open it

#

Wait tho so to ventilate it

#

I could like put it on some books

#

Like sideways

#

So it doesn’t fall but it doesn’t touch the table

thick gull
#

It’s not really necessary though

#

you can try it for a bit and then see if it’s getting too hot

#

just depends on your laptop tbh

drifting wedge
#

Yep

thick gull
#

some will put all air out to the sides

#

some will do it to the bottom#

drifting wedge
#

The fan holes are tiny

thick gull
#

just depends

drifting wedge
#

I mean i don’t wanna waste energy

#

Like if I leave it plugged in

#

If something is plugged in

golden condor
#

What

drifting wedge
#

Ok just forget it

#

It’s cheaper to use a dB

#

Sorry not dB server

#

It would cost 5$ month to keep laptop on 24/7 and also more with heat and other issues

solemn latch
#

🤷‍♂️ you can get an entire vps for $3 a month from galaxygate

wheat jolt
#

dB

#

it is a database, not a decibel

glossy elk
#

is there a thing

#

in connection

#

called

#

setPLP

#

a function*

wheat jolt
#

what

#

wdym

glossy elk
#

is there a function in voiceConnection called setPLP

wheat jolt
#

what lib

#

lol

glossy elk
#

discord.js

trim saddle
#

what

wheat jolt
restive pebble
#

yes there is

glossy elk
#

in what

#

exactly

restive pebble
#

prism

glossy elk
#

the player?

restive pebble
#

prism media option

trim saddle
#

@earnest phoenix what do you want from me

glossy elk
#

oh

#

the dispatcher

restive pebble
#

yes

earnest phoenix
#

uh so

#

skullbite

#

you need to add a temp listener

#

for message reaction add

#

and remove it once it got emitted

pearl radish
#

You can use eris-collectors or you can look at their source to see how they do it

trim saddle
#

ok so now i have this

let pageIndex: number = 0
this.on("messageReactionAdd", (m, e) => {
    if (m !== msg) {}
    else stuffWillGoHere
})
pearl radish
#

So

#

What you should do

#

Is make a function

trim saddle
#

idk

#

@earnest phoenix

pearl radish
#

Like what you are gonna do

#
let pageIndex: number = 0
async function reactionAdd (m, e): Promise<void> {
     if (m !== msg) {}
    else stuffWillGoHere
 })
this.on("messageReactionAdd", reactionAdd)
this.removeListener("messageReactionAdd", reactionAdd)

@trim saddle

earnest phoenix
#

no spoon feeding code

pearl radish
#

It's the same code

#

Just modified slightly so it works

#

Idk what the method to remove a listener is

trim saddle
#

i still don't know what to do next

pearl radish
#

You can just use eris-collector if u are confused

trim saddle
#

i guess i have no choice

weak rain
#
E:\Thunder>node .
E:\Thunder\commands\image\mission.js:3
const AmeAPI = new AmeClient(ame_api);
                             ^

ReferenceError: ame_api is not defined
    at Object.<anonymous> (E:\Thunder\commands\image\mission.js:3:30)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at E:\Thunder\handlers\command.js:19:24
    at Array.forEach (<anonymous>)
    at module.exports (E:\Thunder\handlers\command.js:11:32)

E:\Thunder>```
#
const AmeClient = require('amethyste-api');
const AmeAPI = new AmeClient(ame_api);

module.exports = {
        name: "mission",
        category: "image",
        description: "Shows Mission Passed Respect+ Image",
        usage: "[username | nickname | mention | ID] (optional)",
    run: async (bot, message, args) => {

        let user = await message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.member;
        let m = await message.channel.send("**Please Wait...**");
        let buffer = await AmeAPI.generate("missionpassed", { url: user.user.displayAvatarURL({ format: "png", size: 2048 }) });
        let attachment = new Discord.MessageAttachment(buffer, "mission.png");
        m.delete({ timeout: 5000 });
        message.channel.send(attachment);
    }
};```
#

Its defined

earnest phoenix
weak rain
#

anyone?

thick gull
#

add quotes

weak rain
#

@thick gull wdym

thick gull
#

._.

weak rain
#

;-;

thick gull
weak rain
#

HM OK

earnest phoenix
#

caps

weak rain
#

ignore that

#

xd

spiral tinsel
#

I cant seem, to get masked links to work for example Invite

#

any reason to this?

earnest phoenix
#

https://

weak rain
#

because its

earnest phoenix
weak rain
#

()[]

earnest phoenix
#

oh

#

wyeah

weak rain
#

not

earnest phoenix
#

fuck my brain

scenic kelp
#

it's

earnest phoenix
#

oh yeah

#

fuck my brain

weak rain
#

Lmao i m confused

scenic kelp
#

where are you trying to use them @spiral tinsel?

weak rain
#

invite

#

command

scenic kelp
#

that is not what i mean

spiral tinsel
weak rain
#

wtf

scenic kelp
#

I don't think they work in footers

earnest phoenix
#

<>

#

lol

torn ravine
#

they don’t

spiral tinsel
#

that was when i wa stetsing

weak rain
#

that doesnt work for footer

earnest phoenix
#

also <>

spiral tinsel
#

I used brackets

weak rain
#

Lmao

earnest phoenix
#

.setDescription work

weak rain
#

or fields

torn ravine
#

and fields work

weak rain
#

Yes

spiral tinsel
#

so use fields?

#

ight ty

weak rain
#

u can

scenic kelp
#

it depends on how you want your embed laid out

spiral tinsel
#

but fields u need another argument

#

because name and value

sonic lodge
#

put it in the description

weak rain
#
const AmeClient = require("amethyste-api");
const AmeAPI = new AmeClient("AME_API");

module.exports = {
        name: "mission",
        category: "image",
        description: "Shows Mission Passed Respect+ Image",
        usage: "[username | nickname | mention | ID] (optional)",
    run: async (bot, message, args) => {

        let user = await message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.member;
        let m = await message.channel.send("**Please Wait...**");
        let buffer = await AmeAPI.generate("missionpassed", { url: user.user.displayAvatarURL({ format: "png", size: 2048 }) });
        let attachment = new Discord.MessageAttachment(buffer, "mission.png");
        m.delete({ timeout: 5000 });
        message.channel.send(attachment);
    }
};```
#

still not working

#
const AmeAPI = new AmeClient(ame_api);
                             ^

ReferenceError: ame_api is not defined
    at Object.<anonymous> (E:\Thunder\commands\image\mission.js:3:30)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at E:\Thunder\handlers\command.js:19:24
    at Array.forEach (<anonymous>)
    at module.exports (E:\Thunder\handlers\command.js:11:32)

E:\Thunder>```
scenic kelp
#

you did not save the file

weak rain
#

oh lol

#

It worked

#

ty'

scenic kelp
#

do you have experience working in javascript?

#

I highly reccomend you do some online courses or smaller projects before making a discord bot

torn ravine
#

do hello world

scenic kelp
#

hello world is dumb

torn ravine
#

ik

#

anyone have any experience in python Machine learning/ai?

earnest phoenix
#

machine learning - number generator

#

generate random inout

torn ravine
#

takes data and displays data accordingly

#

basically I want to make fnaf that uses machine learning to make nights harder based on how well the player was doing the previous night

earnest phoenix
#

jsut use fnaf ai cod elol

torn ravine
#

thats not the point lol.

#

I want to use My AI to raise the fnaf ai level

#

and add a little bit of my aspect of chaos

weak rain
#

now bot is just sending PLease wait and logs -->

    at createError (E:\Thunder\node_modules\axios\lib\core\createError.js:16:15)
    at settle (E:\Thunder\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (E:\Thunder\node_modules\axios\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:14260) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
torn ravine
#

as in like playing into the players weakness

#

can we see code @weak rain

delicate shore
#

hey

#

is message.members.user.second()

#

a function?

#

burh

pallid igloo
#

No

delicate shore
#

message.mentions.user.second

#

not members

#

is this a function ^

pallid igloo
#

@delicate shore The message.mentions is stored as a map, so all the methods of map are gonna be valid on it, iirc.

#

except for .set and .delete

delicate shore
pallid igloo
#

@delicate shore The message.mentions is stored as a map, so all the methods of map are gonna be valid on it, iirc.
@pallid igloo

torn ravine
#

@pallid igloo message.mentions is an object for me

pallid igloo
#

Wasn't it a map?

torn ravine
delicate shore
#

o

pallid igloo
delicate shore
#

so what should i do ?

#

to get the second mention

pallid igloo
#

use an index maybe?

low shard
#

@torn ravine tf is the prefux

#

Prefix

pallid igloo
#

lunacord

torn ravine
#

lunarcord

#

the name of the bot

delicate shore
#

bru

low shard
#

Long prefix lol

delicate shore
#

@torn ravine tf is the prefux
@low shard elaborate?

thick gull
#

its probably for this server

pallid igloo
#

@delicate shore I said use an index.

delicate shore
#

how

#

wym

torn ravine
#

lc! is default prefix (soon) but lunarcord is my prefix

sonic lodge
#

or convert the collection to an array, then arr[1]

delicate shore
#

Image being a <@&585528734904352769>

pallid igloo
low shard
#

@low shard elaborate?
@delicate shore wat?

sonic lodge
#

message.mentions.members is a collection object, not an array

delicate shore
#

wha

#

i did or

#

i think i aciidently @grave finch

#

but i wanted to say or

#

i am sry

low shard
#

@delicate shore (O)

thick gull
#

did you just ping nitro boosters KEKW

pallid igloo
#

Yes.

#

It's a collection.

paper cliff
#

// @pallid igloo

pallid igloo
#

I used it bcs it's taking that message itself...

low shard
#

@paper cliff gimme your cute dog

sonic lodge
#

message.mentions.members doesn't necessarily contain the mentions in order as they appear in the message content,

pallid igloo
#

Yeah, they exist in order the user was registered.

sonic lodge
#

so if you're trying to get the second mention you might as well use regex