#development

1 messages · Page 1874 of 1

brave garnet
#

? what one ?

#

fork

#

saw alr and im not gonna have problems with law cause i know that danny copyrighted dpy

#

sorry

#

lmao. n00b here

#

im not gonna use it, sorry, i heard about even a little more but for the now dpy smh work so i use it yet

#

anyways.

#

why this part doesnt work?

if ctx.guild.role(name="muted") in ctx.guild.roles :
      await ctx.author.add_roles("muted")
    else:
      await ctx.guild.create_role(name="muted")
      await ctx.author.add_roles("muted")
#

(specially cutted for you to not see event listener, cause it works to this moment)

rose warren
brave garnet
rose warren
#

It's open source. It's not illegal to fork and use an open source repo with a license like dpy's MIT license.

brave garnet
#

ikr? but some forks had law problems

modest maple
#

that is

#

completely related to lisences

rose warren
#

Read the license and you'll know what you're allowed and not allowed to do.

brave garnet
#

ikr? i just didnt yet read lic of this and even if. why were talking bout law where question was bout code?

brave garnet
#

ehh. i would get answer to my code faster even on tweeer than here :/

rose warren
#

Well that person tried to help you and you called them a noob for actually having a valid point. If that's the way you treat people who are trying to help you what do you expect?

brave garnet
#

not bout it but i asked for help bout managing roles in discord.py and y'all woke up with switching apis more than helping....

#

sorry, i'll get answer on tweeter (cause got beaned on overflow and its my only place)

rose warren
#

That's a lib not an api

brave garnet
#

anyways - you moved topics. im away

brave garnet
rose warren
#

What have you done?

sage bobcat
#

One message removed from a suspended account.

brave garnet
#

nope, from a few places im not

sage bobcat
#

One message removed from a suspended account.

brave garnet
#

here, one server and mine i made

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral lava
#

What's the suggested amount of time that I should have a domain registered

brave garnet
#

nope, spams, raids and mentioning mods

sage bobcat
#

One message removed from a suspended account.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

Mhmm

sage bobcat
#

One message removed from a suspended account.

astral lava
sage bobcat
#

One message removed from a suspended account.

rose warren
#

You can renew it

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

Or let it go

sage bobcat
#

One message removed from a suspended account.

astral lava
#

How much is the renewal fee

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral lava
#

What's the average

rose warren
#

Depends on your broker and the tld

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

There is no average

astral lava
rose warren
#

Same thing different word

sage bobcat
#

One message removed from a suspended account.

rose warren
#

Namecheap is good too

sage bobcat
#

One message removed from a suspended account.

astral lava
#

I'm deciding between name cheap and pork bun

sage bobcat
#

One message removed from a suspended account.

astral lava
#

hmm

#

Alr

rose warren
#

I'd go with namecheap tbh

sage bobcat
#

One message removed from a suspended account.

rose warren
astral lava
#

ill investigate both and see which is better

rose warren
#

Just compare the price

sage bobcat
#

One message removed from a suspended account.

rose warren
#

They're all the same thing

sage bobcat
#

One message removed from a suspended account.

astral lava
#

alright

brave garnet
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

It really doesn't make a difference which registrar you use. I use like 5 different ones depending on the TLD I want

astral lava
#

Why 3?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral lava
#

why would you need many different registrar's for a single domain

rose warren
#

Just shop around for the best price for your chosen domain

boreal iron
sage bobcat
astral lava
#

Woah, pork bun is so much cheaper than name cheap

sage bobcat
#

One message removed from a suspended account.

astral lava
#

Even renewal

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral lava
#

Less than 10 dollar renewal, wow

sage bobcat
#

One message removed from a suspended account.

astral lava
#

Also why would I need more than 1 registrar

rose warren
#

You don't

#

1 domain = 1 registrar

sage bobcat
#

One message removed from a suspended account.

astral lava
#

but in what situation would one use many different registrars

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

If you want a TLD you can't get with porkbun like .ie then you'd need to register that one with a different registrar.

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

rose warren
#

That's how you end up with domains all over the internet

#

Lol

sage bobcat
#

One message removed from a suspended account.

modest maple
#

I have to use a different registra for .rs

sage bobcat
#

One message removed from a suspended account.

rose warren
modest maple
#

cuz yay for country codes

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

astral lava
rose warren
#

Then get it there

astral lava
#

Alrighty

#

Thanks guys

slender wagon
#

Invalid interaction application command
what could be a reason for me to get this error, it's kinda confusing

#

trying slash commands

brave garnet
#

can i came back with my question or not?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

slender wagon
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

slender wagon
#

i have to

#

ez

sage bobcat
#

One message removed from a suspended account.

slender wagon
#

cuz big project

sage bobcat
#

One message removed from a suspended account.

brave garnet
#

¯-¯

astral lava
#

Also how do you make a rich presence

slender wagon
#

these slash commands are really confusing ffs

brave garnet
#

i can come back with this mine question or not?

#

¯~¯

#

meh :\

rose warren
livid jackalBOT
#

@brave garnet

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

brave garnet
#

and if i ask i wont again have a pseudo-answer with "switch api" and/or "read license of dpy and forks"?

boreal iron
#

Is this some sort of an attention deficit or a hyperactivity disorder? Is it to hard to fucking ask what you wanna need help with?

brave garnet
#

i asked but last time i asked i was asked to change api, and not got real answer, so im asking if i wont have it again

#

dpy...

#

(;⌣̀_⌣́)

#

anyways - bye. ttyl. i go sleep

valid frigate
#

what the fuck happened here

novel snow
#

DiscordAPIError: Unknown Webhook

#

Bru hwhat

#

Code: 10015

#

How

#

Where

#

Why

#

Breh

brave garnet
#

Nothing. Bye. To tomorrow!

wheat mesa
brave garnet
#

I dont think so and BYE

#

i go sleep

wheat mesa
#

asking to ask is essentially saying this

pale vessel
#

Then go to sleep already

boreal iron
#

10th bye of today, dude GO

pale vessel
#

Nobody's forcing you to be here

boreal iron
#

Unbelivable he hasn't got banned yet

pale vessel
#

She

boreal iron
#

Doesn't matter, and I can pretend to be a he/she/it, too or a tree

#

Doesn't change the fact of this annoying attitude

pale vessel
#

Women DoordTroll /s

novel snow
#

What is this bug ;-;

#

Where did I go wrong

boreal iron
#

More context please
Are you just sending a webhook or replying to an interaction for example?

novel snow
#

Lord god, Please he-

novel snow
boreal iron
#

You can do that within a few seconds only or defer the reply

novel snow
#

Wait what do you mean?

stable eagle
#

How to see mongodb connection ping?

boreal iron
#

Do you send that reply immediately after receiving the interaction?

novel snow
#

Yes basically as soon as it recieves it

#

Like how long is the max delay?

#

Maybe code too slow?

boreal iron
#

A few seconds only unless the webhook ID isn’t valid anymore

#

Think it was like 4 or 5

novel snow
#

Guess I will time it

boreal iron
#

You’re using djs?

novel snow
#

Yessir

#

Well timed it and it is roughly like 3 seconds in between

#

But I just tried it in another guild and the command doesn't show up there yet even though I am sure I set most things to global so it should show up there too, Wait we also got the cooldown, Maybe that is the issue?

boreal iron
#

You can use this to “delay” your reply

#

Get the webhook ID of your interaction and use it to send replies after

#

Or simply using editReply() on the interaction

#

deferReply() will cause a "I’m thinking…" note before your message appears

novel snow
#

let my try some tof that

#

Some of*

#

You fucking legend

#

You did it

#

Thank you man!

boreal iron
#

Huh lol np

#

That method is always a good to go if your reply needs time

livid lichen
#

I know they use something like webpack.

earnest phoenix
stable nimbus
#

Does anybody know of any way to get your slash commands from Discord? I make a call to the API and get them but I get an undefined return I think, I’ll double check rq

#

I get an object promise.

boreal iron
#

Which lib, djs?

pale vessel
#

await

stable nimbus
boreal iron
#

client.application.commands.fetch

#

And yeah await the promo

#

*promise

#

Damn auto correct!

stable nimbus
#

Okay. Thank you I’ll give everything a try.

#

Now I have an object map.

boreal iron
#

Yeah

stable nimbus
#

I’m looking to fetch all of them.

boreal iron
#

The collection contains all commands

#

(you successfully registered)

stable nimbus
#

I have one global command to delete, two in testing.

#

Hoping to get ID’s. I think I have a solution.

boreal iron
#

The collection contains the IDs

stable nimbus
#

And names?

boreal iron
#

You need to loop through it

#

Yes anything

#

The whole commandIntetaction

stable nimbus
#

Okay then I’ll forEach it and grab all of it

boreal iron
#

Or use for of before somebody sees you wrote forEach

stable nimbus
#

I used forEach when doing my punishments list, and I don’t usually mess with for of either so I’d need a small walk through

boreal iron
#

It’s a lot faster at least in JS

stable nimbus
#

I mean it worked I got my global command

boreal iron
#

Not that micro optimization is important but looping through bigger objects will be faster, noticeably

#

Yeah it’s just a recommendation

stable nimbus
#

I know. Well since I’m here and kinda talking about it, I’ve been trying to get certain commands in a certain category, like a dynamic help command, but I’m only looking to get a single category such as my administration commands

boreal iron
#

for(const [id, command] of <commands>)

stable nimbus
#

I’ll keep that in mind.

boreal iron
#

id is the key of the element and command it’s values (as object)

stable nimbus
#

Right.

#

Currently, I’m trying to filter through my clients loaded commands for any ‘administration’ commands, and I want to put them inside a message and then send it to the user, I’ve figured out the sending to a user I just can’t figure out how to get the specific commands

boreal iron
#

Command categories don’t exist yet, there’s no sort of nesting for sub commands

stable nimbus
#

Away from slash commands

#

Basic commands

boreal iron
#

You shouldn’t

stable nimbus
#

facepalm lemme try again.

boreal iron
#

They will be obsolete in a few months

stable nimbus
#

I explained it badly anyway.

boreal iron
#

No I was referring to your message before

stable nimbus
#

Oh.

boreal iron
#

Didn’t read your second block yet

stable nimbus
#

I still wanna try and explain and achieve a goal rq.

boreal iron
#

Need to concentrate a little not to hit a tree KEKW

stable nimbus
#

Say I have 3 commands in one folder,
Restart, Reload, ReloadModule, these are administrator specific commands that only approved users can run (Defined in an administrators array),
I'm looking to go into the cache, get the names and aliases, based on them being in a certain category marked as 'Administration'.

boreal iron
#

Nah I’m driving oldEyes

stable nimbus
#

Oh.

boreal iron
stable nimbus
astral lava
#

does anyone know how to make a rich presence

#

custom rich presence*

boreal iron
stable nimbus
#

I think? The priveledged commands are backend access to the bot that allow administrators/developers to restart, or reload commands as need be, allowing them to blacklist users and servers, and remove the bot from servers without needing permissions as deemed fit. These commands should only be definable to bot administrators

boreal iron
#

I would define an array, let’s say let help_fields = [];

Loop though your client’s commands and add them to the array.

If they need a specific permission you basically don’t add them to the array.

At the end you use that array as your embed fields

stable nimbus
#

Okay....

boreal iron
#

Inside your command loop add objects to the array in the valid form the embed supports

#

For example:

stable nimbus
#
let admin_cmds = [];
client.commands.forEach((cmd) => {
  if(cmd.category == 'Administration') {
    admin_cmds.push(`${cmd.name}, ${cmd.aliases}`);
  };
});
#

My thoughts?

boreal iron
#

loop(commands)
{
help_fields.push({ name: command.name, description: command.description});
}

#

Well yeah if you create multiple array for any category that will work as well

#

Check if your admin_cmds is empty after the loop and if so don’t include it in your embed

stable nimbus
#

if(!admin_cmds) return;

boreal iron
#

But since you defined it !admin_cmds will not work but

#

!admin_cmds.length

stable nimbus
#

Makes sense.

boreal iron
#

The array exist but it’s length is zero

stable nimbus
#

Right.

#

Okay I'll give this a try.

boreal iron
#

And if it’s empty you don’t put in your existing embed or message or however you send it to the user

#

Oh I see you’re using embed fields as the categories, aren’t you?

stable nimbus
#

I don't think so.

boreal iron
#

Huh I don’t know how it looks at the end.
Don’t you send an embed?

stable nimbus
#

Alright first try and nothing happens lol.

stable nimbus
boreal iron
#

Ah alright

stable nimbus
#

No data went to the array.

#
const admin_cmds = [];
            client.commands.forEach((cmd) => {
                if(cmd.category === 'Administration') {
                    admin_cmds.push({ name: cmd.name, aliases: cmd.aliases, description: cmd.description });
                }
            });
            client.logger.log('X', 'debug');
boreal iron
#

Is the category using a capital letter? smirk

eternal osprey
#
Sun Sep 12 2021 22:29:36 GMT+0200 (Central European Summer Time)
commands/test2.js:12```how do i ever only get the time?
eternal osprey
#

from message.createdAt

#

instead of the date too

limber mica
#

hmm

boreal iron
limber mica
#

So im trying to find a message by ID and react to it. In discord.js v12

boreal iron
#

Just to make sure

stable nimbus
boreal iron
boreal iron
stable nimbus
#

That is the console log.

#

The client logger just prettifies the console log.

boreal iron
#

How’s your client.commands structure?

limber mica
stable nimbus
eternal osprey
#
Sun Sep 12 2021 22:29:36 GMT+0200 (Central European Summer Time)
commands/test2.js:12```
how do i ever only extract the time from message.createdAt
boreal iron
#

Errr it’s a map of your commands?

stable nimbus
#
const directories = await readdir('./commands/');
    client.logger.log(`Loading a total of ${directories.length} categories.`, 'log');
    directories.forEach(async (dir) => {
        const commands = await readdir('./commands/' + dir + '/');
        commands.filter((cmd) => cmd.split('.').pop() === 'js').forEach((cmd) => {
            const response = client.loadCommand('./commands/' + dir, cmd);
            if(response) {
                client.logger.log(response, 'error');
            }
        });
        client.logger.log(`Loading a total of ${commands.length} commands in ${dir}.`, 'ready');
    });
#

This?

stable nimbus
boreal iron
#

Err not was I was looking for lol

#

Leaving the highway in a few seconds, gonna head back to you later, sorry

royal portal
#

how do you check if a site is using Let's Encrypt or DigiCert?!?!1

eternal osprey
#

how do i get the same thing as message.createdAt, but then when a user reacted to an emoji?

vivid fulcrum
royal portal
#

but am using digicert

green vale
#

in js, can i just .toString() on an AsyncFunction prototype? unlike Function prototypes, running .toString() on an AsyncFunction will return a promise. how can i convert it to a string?

coarse topaz
#

Hi, I don't seem to be able to understand this error I've got, any ideas?

green vale
#

uh well first thing that i see is that discord.com isn't resolving

#

it's probably a DNS issue

coarse topaz
#

So it's not really my fault actually?

solemn latch
#

try changing your dns resolver to something more reliable than default

coarse topaz
#

I didn't even know I had a DNS resolver set to default Cursed_Blockboy

earnest phoenix
#
    const str = beeps.map(x => `-itsoffset ${parseInt(x) / 18} -i ${path.join(__dirname, 'beep.mp3')}`)

    await execa(
        "ffmpeg",
        [
            "-y",
            "-framerate",
            String(fps),
            "-i",
            `frame-%0${frameLength}d.png`,
            '-i',
            path.join(__dirname, 'beep.mp3'),
            ...str.map(x => x.split(' ')).flat(),
            `-filter_complex`,
            `amix=inputs=${beeps.length}`,
            "-c:v",
            "libx264",
            "-pix_fmt",
            "yuv420p",
            output,
        ],
        { cwd: outputDir }
    )

I am trying to play beep.mp3 7 times per second (the variable beeps has an array of the frames in which it is needed), but it only sounds once

proven lantern
#

has Discord said anything official about when the on("message") event listener is going to go away or not give us the message context?

wheat mesa
#

april 2022

lyric mountain
#

it'll make bots blind not deaf

proven lantern
errant flax
#

is there a guide on how to use JsDoc?

slim heart
errant flax
#

ah thx

proven lantern
#

is there a tool like jsdoc that makes slash command docs out of configs? ```json
{
"name": "vote",
"description": "Vote.",
"options": [
{
"name": "up",
"description": "Upvote another player to increase their reputation.",
"type": 1,
"options": [
{
"name": "player",
"description": "The awesome player.",
"type": 6,
"required": true
}
]
},
{
"name": "down",
"description": "Downvote another player to decrease their reputation.",
"type": 1,
"options": [
{
"name": "player",
"description": "The horrible player.",
"type": 6,
"required": true
}
]
}
]
}

pale vessel
#

you can parse it yourself

#

since the structure is consistent

proven lantern
pale vessel
#

It's not hard to do this with code though

#

Since they're literally objects

proven lantern
#

the polish is what is hard

#

jsdocs look nice

#

that's what i'll be making nextr

#

i guess i could make the site to host slash command docs and then put my slash commands there

#

instead of just doing it for my own website

woeful pike
#

describe web development in one picture

hybrid cargo
quartz kindle
woeful pike
#

I can't use constructor names to check for object literals tho

quartz kindle
#

you kinda can

woeful pike
quartz kindle
#

i mean, its not a sure fire way to detect it

#

no i mean this

lyric mountain
#

Isn't Object the common ancestor of everything?

woeful pike
#

I just want pattern matching like a real language.. is this too much to ask for

quartz kindle
lyric mountain
quartz kindle
#

yes

#

instanceof checks all extensions

#

also, a null prototype object breaks everything

woeful pike
#

I was rewriting this stupid script in rust but I realized the js ICU parser and rust ICU parser don't match up properly so I just threw away 1000 lines of code

quartz kindle
#

damn

#

rip

woeful pike
#

so back to this shitty language

sage bobcat
#

One message removed from a suspended account.

woeful pike
#

F# maybe

earnest phoenix
#

Guys is this channel can help me in css , html design ?

I programming my bot dashboard buy my design is 💩
So if i want help in design can i come here?

lyric mountain
#

You want feedback abt ur design?

earnest phoenix
lyric mountain
#

if you want help solving issues no problem, but don't expect whole coding help

proven lantern
earnest phoenix
lyric mountain
#

that's fine ig

#

just ask your questions here

long marsh
#

With slash commands, is sharding still necessary?

proven lantern
long marsh
proven lantern
#

im using aws api gateway + 2 aws lambdas for hosting my slash command api

#

my bot client code is hosted on a vps

long marsh
long marsh
#

Or is that not a requirement?

proven lantern
long marsh
#

One to respond back immediately? One to edit? haha

proven lantern
#

the first one acks and then the second one does a patch api request

long marsh
#

Exactly

#

Couldn't you combine them into one lambda though?

proven lantern
#

nope, once the response is sent it stops the lambda

long marsh
#

Right - but can't you send a response back to discord explicitly without resolving the lambda to a return? If you follow what I'm saying?

proven lantern
#

yes, i tried that

#

the lambdas act funny. let me find the doc about it

long marsh
#

I've used them professionally for about 2 years now - would love to understand your troubles with them.

proven lantern
long marsh
#

Also, do you not have any problems with cold start times on the lambdas? And, on that note, I would imagine it would become super expensive if your bot scales. Although you have a free 1,000,000 invocations each month ... if the bot is in 1,000,000 servers (yikes)

proven lantern
#

$0.20 per 1M requests

long marsh
#

What about compute time?

#

I think you pay per invocation + compute time

proven lantern
#

$0.0000166667 for every GB-second

long marsh
#

That'll add up

#

I'm not criticizing you by any means, it's cool that you did that.

proven lantern
#

it works great

long marsh
#

I bet - I was thinking about doing it as well when they first came out

#

Unfortunately, my bot sometimes has long-running commands that may go for longer than 15 minutes (games)

proven lantern
#

see how i resolve the response and then do stuff after?

#

the stuff after the resolve wont be guaranteed to run

long marsh
#

ah gotcha

#

Enough said 👍

lament rock
#

Any VPS should be sufficient to handle everything you need it to. If you're already leveraging it for other things, that's a better use of resources. Even if you don't want one machine to handle slash commands, you can either have them sent down the socket or reverse proxy to shards

proven lantern
#

whatever that means

#

its always good to keep things separate

proven lantern
proven lantern
proven lantern
earnest phoenix
#

can anyone help

proven lantern
proven lantern
pallid jungle
#

How can i test that it's working from visual studio code?

const Topgg = require("@top-gg/sdk")
const express = require("express")

const app = express()

const webhook = new Topgg.Webhook("your webhook auth")

app.post("/dblwebhook", webhook.listener(vote => {
  // vote will be your vote object, e.g
  console.log(vote.user) // 395526710101278721 < user who voted\

  // You can also throw an error to the listener callback in order to resend the webhook after a few seconds
}))

app.listen(80)
proven lantern
#

and then do npm run start from the terminal in VSC

echo blaze
#

why isn't is writing the error to the file
i purposely changed the API url to the wrong one so it would write the error and it still is not writing the error.

const Discord = require('discord.js');
const fetch = require("node-fetch");
const fs = require('fs')

module.exports = {
    name: 'kiss',
    description: "Gives you a kiss OR the person you mention a kiss",
    async execute(message, args) {
        let kissedUser = 
        message.guild.member(message.mentions.users.first()) ||
        message.guild.members.cache.get(args[1]) ||
        message.author

        embed = new Discord.MessageEmbed()
        .setColor('RANDOM')
        .setDescription(`${message.author} kissed ${kissedUser}!`)
        .setFooter(`Kiss sent by: ${message.author.tag}`, message.author.avatarURL({ dynamic: true }))
        .setTimestamp();

        const {url} = await fetch('https://neko-love.xyz/api/v1/kiss')
        .then(response => response.json())
        .catch(error => {
            message.reply(`**Kiss API** is not responding!`)
            fs.writeFile("./error.txt", error)    //why isn't this writing to the 'error.txt' file?
            return;
        })
        embed.setImage(url)
        message.channel.send(embed)
    },
}
earnest phoenix
#

You were probably looking for writeFileSync

#

Unless you wanna use the callback method which you can easily do by reading the documentation for writeFile

#

I keep getting the error "Unexpected End of Input" Where did I miss?

 const ytdl = require('ytdl-core');
const ytSearch = require('yt-search');
const { joinVoiceChannel } = require('@discordjs/voice');

module.exports = {
    name: 'play',
    description: 'Joins and plays a video from youtube',
    async execute(message, args) {
        let  voiceChannel  = message.member.voice.channel;
 
        if (!voiceChannel) return message.channel.send('You need to be in a channel to execute this command!');
        const permissions = voiceChannel.permissionsFor(message.client.user);
        if (!permissions.has('CONNECT')) return message.channel.send('You dont have the correct permissins');
        if (!permissions.has('SPEAK')) return message.channel.send('You dont have the correct permissins');
        if (!args.length) return message.channel.send('You need to send the second argument!');
 
        const validURL = (str) =>{
            var regex = /(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/;
            if(!regex.test(str)){
                return false;
            } else {
                return true;
            }
        }
 
        if(validURL(args[0])){
 
            const  connection = await joinVoiceChannel;
            const stream  = ytdl(args[0], {filter: 'audioonly'});
 
            connection.play(stream, {seek: 0, volume: 1})
            .on('finish', () =>{
                voiceChannel.leave();
                message.channel.send('leaving channel');
            });
 
            await message.reply(`:thumbsup: Now Playing ***Your Link!***`)
 
            return
        }
 
        
        const {
            joinVoiceChannel,
            createAudioPlayer,
            createAudioResource
        } = require('@discordjs/voice');
#
        const connection = joinVoiceChannel({
            channelId: message.member.voice.channel.id,
            guildId: message.guild.id,
            adapterCreator: message.guild.voiceAdapterCreator,
        });
        const videoFinder = async (query) => {
            const videoResult = await ytSearch(query);
    
            return (videoResult.videos.length > 1) ? videoResult.videos[0] : null;
            const video = await videoFinder(args.join(' '));
        const stream = ytdl(video.url, {
            filter: "audioonly"
        });
    
        const player = createAudioPlayer();
        const resource = createAudioResource(stream);
    
        async function play() {
            await player.play(resource);
            connection.subscribe(player);
        };```

play.js:62
        };


SyntaxError: Unexpected end of input
←[90m    at Object.compileFunction (node:vm:352:18)←[39m
←[90m    at wrapSafe (node:internal/modules/cjs/loader:1031:15)←[39m
←[90m    at Module._compile (node:internal/modules/cjs/loader:1065:27)←[39m
←[90m    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)←[39m
←[90m    at Module.load (node:internal/modules/cjs/loader:981:32)←[39m
←[90m    at Function.Module._load (node:internal/modules/cjs/loader:822:12)←[39m
←[90m    at Module.require (node:internal/modules/cjs/loader:1005:19)←[39m
←[90m    at require (node:internal/modules/cjs/helpers:94:18)←[39m
    at Object.<anonymous> (C:\Users\scott\Desktop\DiscordMusicBot\main.js:15:21)
←[90m    at Module._compile (node:internal/modules/cjs/loader:1101:14)←[39m

is the error.
#

Can we get the full error please

wheat mesa
#

No I prefer having ambiguous errors, sorry misty

earnest phoenix
#

Sorry computor has virus

long marsh
#

For slash commands, which would you prefer?

#

Optional: action = view by default

earnest phoenix
#

Sub command of town is probably better

#

to avoid confusion

long marsh
#

Did you write your bot in Golang?

earnest phoenix
#

Indeed

long marsh
#

I actually had done the same - but converted it to TypeScript pandasad

earnest phoenix
#

I am done with ts

long marsh
#

It worked fine, there were just several more open source libraries for typescript that I could leverage for various purposes

earnest phoenix
#

go better

long marsh
#

I work with golang professionally as well - love it 👍

earnest phoenix
#

yes yes

#

I started learning it a few months ago

#

I already prefer it over ts

proven lantern
#

Typescript is good at handling all the issues it introduces with types

#

there is a good explanation about why strong typing is bad
https://youtu.be/hQVTIJBZook?t=568

Google Tech Talks
Web Exponents
presented by Doug Crockford
February 27, 2009

blog post: http://google-code-updates.blogspot.com/2009/03/doug-crockford-javascript-good-parts.html

JavaScript is a language with more than its share of bad parts. It went from non-existence to global adoption in an alarmingly short period of time. It never h...

▶ Play video
#

what do you think about this organization?

#

i have too many commands

small tangle
#

i'd shorten configurations to config, keeps it simple

proven lantern
#

good idea

#

same with matchmaking

small tangle
#

the organization itself looks good

proven lantern
#

and leaderboard

#

thanks!

small tangle
#

^^

earnest phoenix
#

I dislike js cause it has no type safety

proven lantern
#

type safety hurts more than it helps

earnest phoenix
#

not to me

tulip ledge
#

?

earnest phoenix
#

TS is noice but I don't really use it anymore

tulip ledge
#

I love ts

proven lantern
#

type systems are like training wheels on a bike. it helps you learn

split hazel
#

though you could also say ts takes away the total power of js

#

since it sacrifices some aspects of performance to provide you these dynamically typed features such as arrays and you don't even use them

#

mostly memory usage

proven lantern
long marsh
#

DiscordAPIError: Unknown interaction

#

The slash command works, but yields that error in the console 🤔

proven lantern
#

what endpoint? is that all the error says?

long marsh
#

It doesn't error out on the first command, but it does the rest after. BUT they all still work and send the correct message

#

Also, one more question, does the registering of the REST need to happen outside of the sharding file? I'm assuming so? Does it harm anything to leave it spawned from the ShardManager ?

proven lantern
#

im not sure how it would work inside the sharding. you'd only want one endpoint

#

setup a loadbalancer if you want to do sharding with the api

#

shouldn't the method for the interaciton callback be patch?

#

this is what my responses look like

proven lantern
worthy ivy
#

how do you fetch the option that was clicked on a select menu from a component collector?

#

discord.js btw

pale vessel
#

interaction.values[0]

novel snow
#

Anyone have some good new alternatives to QuickDB?

#

QuickDB was simple as hell but seems to be broken on newest node release

novel snow
#

Oh my god that looks hot

#

Yeah I'll try that,

#

Thank you manno!

split hazel
#

though the author seems to have abandoned it so be careful

#

but as long as the adapters are maintained it'll be fine

novel snow
#

How do the adapters work?

worthy ivy
#

anyways code time

#

so im making a verification command thing

#

theres 3 parts

#

its for our school server

#

1st part is to choose what campus you are from

#

then batch

#

then a checkmark to verify that they read the rules n stuff

#

i already have the 1st part, which is the campus picker

#

i already setted up the collectors and stuff

#

but how can i make it so it fits into one commmand?

novel snow
#

So what fits in 1 command?

worthy ivy
novel snow
#

Like

#

You want

#

Wait elaborate

worthy ivy
#

part 1 is a select menu to choose what campus

novel snow
#

Like I am confused

worthy ivy
#

then it temporarilaly stores into like

#

an array or smthin

novel snow
#

Have it send the collection menu-

worthy ivy
#

yes i already have the select menu collector setted up

#

but how do i fit the other 2 parts into it?

novel snow
#

Make a collector to await the response, Then take the response and send another reply to the interaction with the next part with another collector to catch a button on there that would await the button press shite for the interaction and when that happens go to the next part etc

drifting reef
#
import os as yodada
import discord as santa
from santa.ext import commands as yomama
from dotenv import load_dotenv as you

you()

TOKEN = yodada.getenv("TOKEN")
discord = yomama.Bot(command_prefix = "🎅")

@discord.event
async def on_ready():
    print(f"Logged in as {discord.user}")

discord.run(TOKEN)
```run this
worthy ivy
#

theres a collector timeout right

#

then it would just

#

go to the next one

worthy ivy
#

then go to the next one

swift cradle
#

xD

worthy ivy
#

then nothiing

novel snow
novel snow
# split hazel keyv?

Eh any other things in Keyv that can just easily have a local db? Since I just need a small local db

split hazel
#

sqlite adapter

novel snow
#

Looking at that now

#

Hope it'll work

raw nest
#

Is here someone who has made a bot dashboard with ExpressJS and ReactJS?

drifting reef
lapis yoke
#

um

#

hi

#

how do i make my bot stays online

#

forever

errant flax
#

pay up for a vps

lapis yoke
#

wdym

#

wait afk

worthy ivy
#

so uh

#

i have like

#

16 different options

#

that is hard coded

#

yes i need it to be hard coded

#

in a select menu

#

and its spaghetti code

#

how can i like put it down to a few lines of code?

#

from like 90

pale vessel
#

Yeah

worthy ivy
#

bc i have the setup like this

.addOptions([
                        {
                            label: "1st",
                            description: "1st",
                            value: "first"
                        },
                        {
                            label: "second",
                            description: "secpnd",
                            value: "second"
                        },
                        //repeat for like 14 more times
lapis yoke
#

guys

#

i need help

#

how to make my bot stay online

#

without money

#

it stays in call only but online dont

rose warren
#

Short answer: you can't reliably

lapis yoke
#

wdym

rose warren
lapis yoke
#

is there any another way

#

should i wait for 1 week

#

why ont

#

not

#

to see mine

rose warren
#

When it comes to web hosting you get what you pay for. A free service will always make you their lowest priority.

lapis yoke
#

can u help

#

so

wheat mesa
#

Pay for a vps

#

That’s the only real reliable way to have your bot on 24/7

rose warren
#

There's a list of providers here ☝️ (or in the pins) and I also recommend Pulseheberg

#

You can get a cheap VPS and that'll keep you going for a while

#

Otherwise you're stuck with Replit or Heroku. Google also offer a free tier on their cloud plans but it's limited to one year and better than Replit or Heroku.

wheat mesa
#

Since my bot is just a personal project and is very small, I’m using Oracle’s free tier of hosting until I need to upgrade

#

The best thing is that they’ll never charge you for an overage on anything, because your account has to be upgraded to be used for paid transactions

#

So you don’t have to worry about getting slapped with a random bill you didn’t expect

lapis yoke
#

guys

#

yesterday it was added

#

so 5 days left

errant flax
rose warren
#

Don't you need a CC for Heroku anyway?

errant flax
#

wait u do

#

i dont use heroku

rose warren
#

I did when I started

#

But only for a month KEKW

wheat mesa
#

You don’t need a CC for Heroku

#

Unless you want some more dyno hours for the month

rose warren
#

Yeah but I think you need those extra hours for it to be a viable option

#

It's still free though

wheat mesa
#

Otherwise it’s only up 23/24 days a month

rose warren
#

Yeah

#

I wouldn't recommend Heroku personally 😬

#

Cheap VPS is much better

wheat mesa
#

It’s ok if you’re not willing to spend money and if you don’t have many users

rose warren
#

Yeah

#

Fine if you have a small bot just for your server or something

green kestrel
#

yay discord bot in 6.7mb

#

going to be rolling out premade .deb files with the compiled library in for raspberry pi armhf soon 🙂

#

so people dont even have to build it, just dpkg it

rose warren
#

seggsy 👀

lapis yoke
#

hey

#

guys

#

e

#

my bot can write !!help

wheat mesa
#

Cool

ripe dune
#

Hello

earnest phoenix
#

Heyy can some help with the ping command

lyric mountain
ripe dune
#

sup

wicked pivot
#
if (!message.guild.members.cache.get(UserGet.user.id)) return console.log('ok')

    let arr = message.guild.members.cache.array().sort((a, b) => a.joinedAt - b.joinedAt);

    for (let i = 0; i < arr.length; i++) {
        if (arr[i].id == UserGet.user.id) return console.log(i);
    }```

```    let arr = message.guild.members.cache.array().sort((a, b) => a.joinedAt - b.joinedAt);
                                          ^

TypeError: message.guild.members.cache.array is not a function```
pale vessel
#

They removed caching methods

#

Use [...message.guild.members.cache.values()].sort(...)

wicked pivot
#

it works but how do I do it for my for()?

pale vessel
#

Just do js for (const member of message.guild.members.cache.values()) { if (member.id == UserGet.user.id) return console.log(i); } then

lyric mountain
pale vessel
#

It's an iterable

#

Need to turn it to an array

lyric mountain
#

weird but ic

wicked pivot
#

what I want is to have the position to arrive x)

lament rock
#

Map.prototype.values(): IterableIterator<V>;

cinder patio
#
for (const [, member] of message.guilds.members.cache)
#

also works

lyric mountain
#

like, if arrays are iterables, why not just return an array?

sterile wyvern
#

nerds

lament rock
#

Array extends Iterable

lyric mountain
#

ik, that's why I said "weird"

cinder patio
#

Because I may want my function to work with an iterable, but not necessarily an array

#

Sets are also iterables, and maps

lyric mountain
#

ik

lament rock
#

might be with how the memory would be allocated to the Array. If the sets are large enough, would be chomk. I'm not sure how the iterables work in the cases of Map and Sets, but possibly not allocating the entire entry set to an Array

lyric mountain
#

in java it also returns a Collection, which is the superclass of List and Set

#

you can iterate and use stream methods on it

#

what I find weird is not being able to do <Iterable>.sort(...)

#

or any other methods like that

brave garnet
#

is conversation ended? im back with yesterday question (just got pc)

earnest phoenix
earnest phoenix
outer perch
#

is it against Contabo's TOS to change the VPS's OS?

earnest phoenix
#

If it is, surely it will be on their tos

ripe dune
#

btw

solemn latch
#

@ripe dune no ads please

ripe dune
#

o okay

#

sorry @solemn latch

brave garnet
pallid jungle
#
const Topgg = require("@top-gg/sdk")
const express = require("express")

const app = express()

const webhook = new Topgg.Webhook("auth")

app.post("/dblwebhook", webhook.listener(vote => {
  // vote will be your vote object, e.g
  console.log(vote.user) // 395526710101278721 < user who voted\

  // You can also throw an error to the listener callback in order to resend the webhook after a few seconds
}))

app.listen(80)

the code not working

clear trail
pallid jungle
#

I didn't do anything like that

#

the bot token on visual studio code for another bot for testing

feral aspen
#
setTimeout(() => {
        console.log('Loading... 0%')
    }, 3000);

    setTimeout(() => {
        console.log('Loading... 10%')
    }, 3000);
    
    setTimeout(() => {
        console.log('Loading... 20%')
    }, 3000);

Any faster way to do this? (I know this isn't how loading things work, but I'm new)

earnest phoenix
#

Why would you need to port forward

#

Just make sure port 80 is open

#

and not being used by another application

earnest phoenix
#

i wouldn't mind if the progress bar is off by a second

cinder patio
#
let progress = 0;
const X = setInterval(() => {
   progress += 10;
   console.log(`Loading... ${progress}%`);
   if (progress === 100) clearInterval(X);
}, 3000);
#

you could also check before adding to the progress so you don't get Loading... 100%

earnest phoenix
#
process.stdout.write(`Loading... ${progress}%\r`);
#

so it edits the last line instead of add a new one

brave garnet
#

11 mins of inactivity means free channel or no?

earnest phoenix
#

Yea,but the eaiser question get priortized

brave garnet
#

so channel isnt free, ok, gonna go plaing some slither...

pale vessel
#

What's your issue again?

brave garnet
#

same as yesterday =p

wheat mesa
#

I mean, we have said multiple times that you should just ask your question instead of asking to ask

brave garnet
#

bye, i go play something

wheat mesa
#

Not everyone knows what you were asking yesterday, so it’s best to just repeat your question

brave garnet
#
    if ctx.guild.role(name="muted") in ctx.guild.roles :
      await ctx.author.add_roles("muted")
    else:
      await ctx.guild.create_role(name="muted")
      await ctx.author.add_roles("muted")
#

this was

#

with crash.

#

but if you want to have lib a war. have it. im afd now

wheat mesa
#

I don’t understand what the question is

brave garnet
#

why code doesnt work? lol

wheat mesa
#

Did you get an error?

feral aspen
brave garnet
#

yea, different with different configs

wheat mesa
#

(I don’t know python, but it’s useful to provide an error for those that do)

brave garnet
#

huh? it requires a list for giving roles and i forgot what. continue discussion with @feral aspen , im going play slither. ping me if ya want stream

feral aspen
#

?????

solemn latch
#

you might want to ask on a forum rather than discord if you are going to keep going afk every time someone tries to help.

woeful pike
brave garnet
spark flint
brave garnet
#

:|

#

sadly

#

for 2 months or more

#

to the now i didnt even opened that. lmao

#

even if - answers i can post. i just cant ask

feral aspen
#

Lastly.. is it possible to wait for the setInterval function to finish?

lyric mountain
#

you can use promises

feral aspen
#

Like instead of it running in the background while the other code executes.

feral aspen
pale vessel
#

Create a new promise and resolve on finish

#

Await the promise

lyric mountain
#
let pr = new Promise<Void>();
setInterval(() => {
  pr.resolve(null);
}, 10_000);
await pr;
pale vessel
#

The code after that will execute after it's done

lyric mountain
#

something like this

#

although you're better off using sleep instead

#

oh, js has no sleep

feral aspen
#

Python has a built-in one, iirc.

lyric mountain
earnest phoenix
#

I mean

feral aspen
earnest phoenix
#

you can essentially use sleep

pale vessel
#

timers/promises

lyric mountain
#

you can simulate it with promises

function sleep(ms) {
  await new Promise<Void>(r -> setTimeout(r, ms));
}
earnest phoenix
#

Yea

#

Just about to post that same thing

#

kekw

#

Also what is up with the Promise<Void>

#

unless they are using ts its useless here

pale vessel
#

He's a java programmer

#

Leave him be

earnest phoenix
#

also is Void even correct shouldn't it be lowercase?

lyric mountain
#

idk, I'm used to always state generics' types

feral aspen
earnest phoenix
#

Yea js isn't that cool

#

they dont have types or generics

feral aspen
#

Don't bully JS..

#

:(

earnest phoenix
#

I will bully js cause i've used js

#

and it gave me headaches

feral aspen
#

You will go through me first. 😂 👏

#

Anyways.

earnest phoenix
#

Imagine making functions for something

#

just use repetitive code

#

ez

feral aspen
#
const promise = new Promise();
const loading = setInterval(() => {
    promise.reolve(null);
    if (progress >= 100) clearInterval(loading) && console.log("Hi");
    
    console.log(`Loading... ${progress}%`);
    if (progress === 0 || progress === 67) progress += 33;
    else progress += 34;
}, 1000)
await promise;
#

Did I do this, right?

earnest phoenix
#

Is && even needed?

feral aspen
earnest phoenix
#

I thought you could separate stuff with ; in a one line if statement

feral aspen
lyric mountain
#

if you resolve the promise on the first pass it'll stop awaiting loading

#

it should be ```js
if (progress >= 100) {
clearInterval(loading);
console.log("hi");
promise.resolve(null);
}

feral aspen
#

Just did that. 👍

#
    const promise = new Promise();
                    ^

TypeError: Promise resolver undefined is not a function
pale vessel
#

Read the image you sent

#

It doesn't look identical, does it?

feral aspen
#

Yup.. I'll add the timeout function inside it.

#

Moment...

lyric mountain
#

hm, you can't have empty promises?

earnest phoenix
#
// progress is an event emitter

progress.on("step", prog => prog === 100 ? console.log("Finished!") : console.log(`Loading...${prog}`));
#

I dont think so

lyric mountain
earnest phoenix
#

I wasn't responding to you

#

I was responding to KuuHaKu

drifting reef
#

how do i fix this bug

lyric mountain
#

errr...where tf is that?

earnest phoenix
#

Google error

#

in the browser duh

#

It's a google page

#

But idk which one

lyric mountain
#

🤌

feral aspen
#
let progress = 0

const promise = new Promise((resolve, reject) => {
    if (progress === 100) {
        resolve("Successfull.")
    } else {
        const loading = setInterval(() => {
            if (progress >= 100) clearInterval(loading) && console.log("Hi");
        
            console.log(`Loading... ${progress}%`);
    
            if (progress === 0 || progress === 67) progress += 33;
            else progress += 34;
        }, 1000);
    };
});

await promise;
#

Redone.

lyric mountain
#

redstone

earnest phoenix
#

Remind me why I am a programmer

#

cause idek at this point

earnest phoenix
#

mmm so true

pale vessel
#

Thay only checks progress once

#

You need to check it on every interval

feral aspen
earnest phoenix
#

programmer: writes 200 lines of code for a progress bar
client: man this progress bar is so slow and terrible

feral aspen
#

Moment..

lyric mountain
#

progress += 34 be aware, it'll never be progress === 100

earnest phoenix
#

progress >= 100

feral aspen
#
if (progress === 0 || progress === 67) progress += 33;
else progress += 34;
earnest phoenix
#

works even when the code goes too far and does too much progress

feral aspen
#

Huh. Moment...

lyric mountain
#

like, 3 steps, start at 1 and end in 3

feral aspen
lyric mountain
#

no

#

1 to 3

feral aspen
#

OH

#

Makes sense.

lyric mountain
#

you don't need to use 100 to represent percentages

feral aspen
#

Sure.. I'll do that too.

#

Yes.. makes sense. 👍

lyric mountain
#

if you REALLY need 100 just do current / max * 100 and you'll get a value between 0 and 100

#

well, that as long as 0 >= current <= max

feral aspen
#

Yup..

#

Kind-of looking for something that gives a random number between 0 to 100 till it reaches 100.

#
let progress = 0

const promise = new Promise((resolve, reject) => {
    if (progress === 100) {
        resolve("Successfull.")
    } else {
        const loading = setInterval(() => {
            if (progress >= 100) {
                resolve("Successfull.");
                clearInterval(loading) && console.log("Hi");
            };
        
            console.log(`Loading... ${progress}%`);
    
            if (progress === 0 || progress === 67) progress += 33;
            else progress += 34;
        }, 1000);
    };
});

await promise;

console.log("YAY")
#

I did this..

#

YAY was logged but successfull wasn't. 👀

lyric mountain
#

bcuz ur not logging promise result

feral aspen
#

OH

#

My god.. my knowledge.

#

I logged it after awaiting the promise outside the Promise.

#

.. not sure why it didn't console.log the Hi.

lyric mountain
#

may I ask, why are you using &&?

#

just put one on each line

feral aspen
#

Done.

#

Oh.

#

It cleared the interval before being able to log it.

#

BRUH.

lyric mountain
#

also I'm not sure, but if arrow functions affect this you might be able to do clearInterval(this)

#

removing the need to assign it to a variable

feral aspen
#

I'll try.

lyric mountain
feral aspen
#

Didn't work...

lyric mountain
#

and use return to prevent further code execution

feral aspen
#

Using this doesn't work.. 😐

#

It kept executing..

lyric mountain
#

stay using variable then

feral aspen
lyric mountain
#

it is, to represent enclosing class

feral aspen
#

Yes.

lyric mountain
#

I asked that because in java using this inside lambdas will reference the lambda itself instead of the parent class

feral aspen
#

I don't have much knowledge in Java, so I may take time to understand what you are talking about.

tulip ledge
#

it refers to the function inside the interval

feral aspen
#

Ah.. that's why.

tulip ledge
lyric mountain
#

lambda is literally the slim brother of arrow func

earnest phoenix
#

I have create the little script for detect if an message has 7 or plus capitals letters ( const getCount = message.content.split('').filter(e => e.toLowerCase() !== e).length; ) but how can i detect in plus if capitals letters are together and not separate ?

feral aspen
tulip ledge
earnest phoenix
#

yes but i don't know how to use regex :/

feral aspen
#

He did say the same thing until you talked about how it is about the function inside the set interval.. so yeah. 👌🏼

tulip ledge
#

Me neither lol

lyric mountain
#

play a bit with it there

#

put your testing text on the bottom field and start fiddling with regex on the top

stable eagle
#

who invented regex

earnest phoenix
#

How do i edit button

#

b1.edit(setDisabled()) i want something like that

lyric mountain
#

just recreate all the buttons with this one disabled

earnest phoenix
quartz kindle
#

expressionist art

civic jasper
#

someone know how to fix this error :

earnest phoenix
#

I assume that is similar to a non null constraint error in an sql db

earnest phoenix
#

also i bought solana today

earnest phoenix
wooden kindle
#

tf does this mean

earnest phoenix
#

@wooden kindle the message component type is invalid?

lyric mountain
#

but well, duplicate key issue

#

what db lib are u using?

stray seal
#

Is there any GOOD github code for Bot Dashboard?

#

I don't know tat code.

urban slate
#

yo

#

@lyric mountain do u have any idea why my bot mustve not responded

#

cause the code is like this

lyric mountain
urban slate
lyric mountain
#

did u try those exact words xiuh tried?

urban slate
#

yes

#

i did

#

no issue

urban slate
#

at all like legit

wooden kindle
earnest phoenix
urban slate
#

i even gave it like 10 commands in like 3 seconds so it was not even a ping problem

lyric mountain
earnest phoenix
#

that has happened lol

#

thank god it was my friend

urban slate
earnest phoenix
urban slate
#

but like dont it console log that?

lyric mountain
#

like, maybe the fetch failed resulting in it stopping before sending it

earnest phoenix
#

wait are we talking about http

urban slate
#

http error or something

#

cause it didnt even console log that

earnest phoenix
#

node fetch isn't supposed to throw a promise rejection for anything other than network error, not even 4xx status code

urban slate
#

i am pretty sure it does console logs it

#

oh

earnest phoenix
#

so what happened

#

got it

#

@urban slate the console.log runs before message.channel.send

#

because message.channel.send returns a promise

urban slate
#

does it?

#

but even if it does why did the bot not respond

earnest phoenix
#

promises will finish always after at least the next line of code runs

lyric mountain
#

promises are ran independently of code sequence

#

like, in parallel

earnest phoenix
urban slate
earnest phoenix
#

it is

urban slate
#

oh

earnest phoenix
#

your embed is wrong probably

urban slate
#

how?

lyric mountain
#

maybe the image was too big

urban slate
#

cause this has happened for the first time

earnest phoenix
#

maybe you tried to upload your mom

urban slate
#

but it was only in the test serve

lyric mountain
#

stuck runtime maybe

urban slate
#

cause i did test it then and there in my server and it did respond

earnest phoenix
#

add a .catch(console.error) to the end of message.channel.send(stuff).putItHere

quartz kindle
#

whats your full code?

earnest phoenix
#

im sure it's an issue with the embed

quartz kindle
#

its hard to give suggestions without seeing the full thing

earnest phoenix
#

@urban slate can you show the code for the embed

urban slate
earnest phoenix
#

huh

#

what did you type

#

and can you send the code for the entire command

urban slate
#

one sec

lyric mountain
#

for context

quartz kindle
#

wut

earnest phoenix
#

someone star this

lyric mountain
#

damn

earnest phoenix
#

xiuh exposed

oak cliff
#

Bro

#

I have to try

spark flint
#

quadruple starboard

earnest phoenix
#

question: why add those commands in the first place

urban slate
#

well this is the error

lyric mountain
#

I swear it was for context abt his issue, they're just sussy bakas

urban slate
#

had to censor some stuff

spark flint
#

the entry on starboard is now there 6 times lmao

urban slate
#

sry about that

earnest phoenix
#

@urban slate embed is empty

urban slate
#

they are just strings though

earnest phoenix
#

ill come back from the toilet and explain

urban slate
#

no its not

#

it does respond to -help

earnest phoenix
#

huh

urban slate
#

yea

earnest phoenix
#

embed.anything should return a new object instead of setting the embed object

lyric mountain
#

ur formatting is weird

earnest phoenix
#

or have i missed out on djs updates again

#

check docs for me pls

urban slate
#

it works mate lmao it has worked for like 4 other discord bot lists

#

the first command they do is -help

#

no way my bot went through all of those without working

lyric mountain
#

maybe it's a situational error

urban slate
#

even i have tested it for like 2-3 weeks

urban slate
lyric mountain
#

not all errors happen on a fixed rate

urban slate
#

i still dont get it

lyric mountain
#

like, sometimes there are errors which happen on an extremely specific case

earnest phoenix
#

My discord broke brb

lyric mountain
#

those are the hardest to find until you figure out the exact steps to reach it

urban slate
#

@oak cliff can i get the that channels perms that my bot had

#

that would help me get till the error

oak cliff
#

These and read history

earnest phoenix
#

i guess it's one of:

  • guild command run in dm
  • no send message perms
  • message content intent is here
urban slate
#

thank you soo much

oak cliff
#

Channel perms are the same

urban slate
#

whats the third thing?

#

what do you me by is here?

lyric mountain
#

message content isn't here yet

urban slate
#

ohh

lyric mountain
#

he meant the newest intent discord will add

earnest phoenix
#

AH

urban slate
#

but its there right?

earnest phoenix
#

No paranthesis in message embed

#

could this be the issue?

lyric mountain
#

that'd not even let it compile

earnest phoenix
#

not necessarily

urban slate
earnest phoenix
#

tim said the () is only needed if you wanna run the constructor

lyric mountain
#

could u show gif command?

earnest phoenix
#

even if it's not causing the error you should add it