#development

1 messages · Page 1859 of 1

lyric mountain
#

no

summer torrent
#

I just updated typescript

pale vessel
#

Context?

summer torrent
#

err is try...catch's err

charred pumice
lyric mountain
#

Are you referencing it like the example there?

#

Cuz I don't see it in ur code

charred pumice
pale vessel
lyric mountain
#

Read the page

#

Especially the accepted answer

summer torrent
pale vessel
#

Errors should be any, I dunno why it's unknown

summer torrent
#

i updated it like 5 min ago

pale vessel
#

I just use the one VSC uses

#

Which is latest beta

charred pumice
#
const attachment = new Attachment(captcha.JPEGStream, 'test.jpeg');

       const embed1 = new MessageEmbed()
                            .setAuthor('Error Lounge', "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
                            .setTitle("Anti-Flood Verification")
                            .setFooter("Error Lounge Verification | discord.gg/", "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
                            .setImage('attachment://test.jpeg')
                            .setColor("12ACB2")
        const msg = await member.send({ embed1, files: [attachment]});``` @lyric mountain I did this and it is giving `TypeError: Attachment is not a constructor`
summer torrent
#

4.4.2

pale vessel
#

Today we are excited to announce the beta release of TypeScript 4.4! To get started using the beta, you can get it through NuGet, or use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2019/2017 Following directions for Visual Studio Code and Sublime Text 3.

#

It's unknown instead of any now

summer torrent
pale vessel
#

Just use err: any or Error

lyric mountain
charred pumice
#

Not literally but sort of lol

#

I don't know, I've been trying for like 2 hours and I'm super frustrated

lyric mountain
#

...and in those 2 hours it didn't come to your mind to check the docs?

summer torrent
charred pumice
#

I tried but I haven't used JS in agesss

#

I am kind of lost

#

I don't know how to do it

#

Even after viewing the docs

pale vessel
#

Cast it I guess

#

I just use any, easier

#

Yours looks like it's not an instance of Error, you should probably use error: any too

thorny flume
#

I'm creating an instance of "EventEmitter" in a file and it returns a value that I want to get in another file with another instance, is that possible?

charred pumice
#

But with that said, what am I doing wrong and how do I fix? @lyric mountain

lyric mountain
#

Add the image as a file and reference it using attachments://name.extension

charred pumice
#

Is that not what I did?

lyric mountain
#

No

#

Discord.js changed when compared to that stackoverflow answer

#

You need to see how to properly add an attachment

charred pumice
#
const attachment = new MessageAttachment(captcha.JPEGStream, 'test.jpeg');

       const embed1 = new MessageEmbed()
                            .setAuthor('Error Lounge', "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
                            .setTitle("Anti-Flood Verification")
                            .setFooter("Error Lounge Verification | discord.gg/", "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
                            .setImage('attachments://test.jpeg')
                            .setColor("12ACB2")
        const msg = await member.send({ embed1, files: [attachment]});``` I did this and now its just simply sending the image with no embed?
#

@lyric mountain

#

Like, how am I supposed to get the URL for the attachment?

#

And make sure it doesn't send seperately

lyric mountain
#

You don't need the url, just the name

#

attachments:// refers to attachments in this message

charred pumice
#

My above code is using that though and it doesn’t even send the embed at all?

wheat mesa
#

Don't you need member.send({ embeds: [embed1] }); in v13 now?

charred pumice
#

I’m not even using v13 so I’m not sure

wheat mesa
#

Oh

pale vessel
#

You should be

wheat mesa
#

^^

#

Or just don't use djs at all KEKW

charred pumice
#

I’m trynna get my shit to work before I switch cause it’s just a small private bot for my server

#

And this image stuff is really pissing me off I don’t understand now why it’s not even sending the embed in general

wheat mesa
#

You're using named parameters

#

Should be member.send({ embed: embed1, files: [attachment]});

#

iirc that's how it works

fresh verge
#

How can I check if the owner of a server that a command was ran in is boosting a certain server?

earnest phoenix
pale vessel
#

I use gif-encoder since it has DT typings Apparently both have it

#

It's a little more barebones since it doesn't directly support canvas rendering context, but you can still provide an imageData

lyric mountain
#

Everyone's gangsta until they learn gifs aren't just images

hybrid cargo
obsidian flint
#

@earnest phoenix if it's javascript use cilent.login(insert token here)

earnest phoenix
#

Java is pc right? If so i cant use it for i use iphone

obsidian flint
#

ok wait

#

where are you coding your bot?

#

on an app?

earnest phoenix
#

I used a website for discord bot client

obsidian flint
#

if so find a button for starting the bot if that bot is made on the site

#

if not then ask another person plz I really don't know anything about making a bot on a website ;-;

earnest phoenix
#

I do have it in my dms but i just needed to know how to login with its token

earnest phoenix
#

Yes

#

Bot token

obsidian flint
#

which website?

earnest phoenix
#

Developer portal

obsidian flint
#

uh

#

wait

#

what programming language do you use?

earnest phoenix
#

English

obsidian flint
#

if you haven't code anything you can't do anything

obsidian flint
#

no

#

like

#

in which PROGRAMMING language

#

not english

#

english is talking language ;-;

earnest phoenix
#

I dont know what that is unfortunately sence i joined a month ago

wheat mesa
#

uh

#

You should learn a programming language before developing a bot 😛

obsidian flint
#

you have to have some code for your bot first

earnest phoenix
#

I have it set up i think

#

Revengement#7876

obsidian flint
obsidian flint
#

that's why it's "coding a bot"

earnest phoenix
#

I have the URL for it

obsidian flint
#

before you can fully start it

wheat mesa
#

Well... I'm assuming that he's using one of those crappy bot development websites

#

Wouldn't recommend those

obsidian flint
#

he hadn't code anything

wheat mesa
#

@earnest phoenix learn the basics of your programming language of choice before developing a discord bot. Having a token doesn't give your bot functionality automatically.

earnest phoenix
#

I have gave it some permissions on the website that i used it for Discord.com:developer

#

/developer

wheat mesa
#

That does not matter

#

If you don't know how to use a programming language then developing a discord bot is going to be an extremely difficult task

earnest phoenix
#

Unless you use botghost which is bad

#

Botghost?

#

this then main problem

wheat mesa
#

message.author is undefined

earnest phoenix
#

how do the hell i do this

#

Is there another way that is easier to create a bot?

#

@earnest phoenix templates,github or hire someone

wheat mesa
#

There's shortcuts, but they ultimately end in a messy, inefficient, and generally bad

earnest phoenix
wheat mesa
#

(And by shortcuts I mean "automatic" bot creators)

wheat mesa
#

¯_(ツ)_/¯

earnest phoenix
#

warning this may be big

#

Ive seen someone do a code which said tul!register (name) tuy: text

#
const { MessageEmbed } = require('discord.js');
const { LOCALE } = require("../util/EvobotUtil");
const i18n = require("i18n");

i18n.setLocale(LOCALE);

module.exports = {
  name: "eval",
  aliases: ["evaldev"],
  description: i18n.__("Vote"),
    async execute(client, message, args){
        
    if (message.author.id === '673011572225998856') return;
        const embed = new MessageEmbed()
            .setTitle('Evaluating...');
        const msg = await message.channel.send(embed);
        try {
            ```js const data = eval(args.join(' ').replace(/```/g, ''));
            embed
                .setTitle('Output: ')
                .setDescription(await data);
            await msg.edit(embed);
            await msg.react(':white_check_mark:');
            await msg.react(':x:');
            const filter = (reaction, user) => (reaction.emoji.name === ':x:' || reaction.emoji.name === ':white_check_mark:') && (user.id === message.author.id);
            msg.awaitReactions(filter, { max: 1 })
                .then((collected) => {
                    collected.forEach((emoji) => {
                        switch (emoji._emoji.name) {
                        case ':white_check_mark:':
                            msg.reactions.removeAll();
                            break;
                        case ':x:':
                            msg.delete();
                            break;
                        }
                    });
                });
        } catch (e) {
            embed
                .setTitle('An Error has occured');
            return msg.edit(embed);
        }
    },
};``````
#

@wheat mesa here the code

#

O_O

wheat mesa
#

Show your command handler @earnest phoenix

earnest phoenix
#

idk where to find this rn i am tired and my friend not helping

#
exports.canModifyQueue = (member) => {
  const { channelID } = member.voice;
  const botChannel = member.guild.voice.channelID;

  if (channelID !== botChannel) {
    return;
  }

  return true;
};

let config;

try {
  config = require("../config.json");
} catch (error) {
  config = null;
}

exports.TOKEN = config ? config.TOKEN : process.env.TOKEN;
exports.PREFIX = config ? config.PREFIX : process.env.PREFIX;
exports.YOUTUBE_API_KEY = config ? config.YOUTUBE_API_KEY : process.env.YOUTUBE_API_KEY;
exports.SOUNDCLOUD_CLIENT_ID = config ? config.SOUNDCLOUD_CLIENT_ID : process.env.SOUNDCLOUD_CLIENT_ID;
exports.MAX_PLAYLIST_SIZE = config ? config.MAX_PLAYLIST_SIZE : process.env.MAX_PLAYLIST_SIZE;
exports.PRUNING = config ? config.PRUNING : process.env.PRUNING;
exports.STAY_TIME = config ? config.STAY_TIME : process.env.STAY_TIME;
exports.DEFAULT_VOLUME = config ? config.DEFAULT_VOLUME: process.env.DEFAULT_VOLUME;
exports.LOCALE = config ? config.LOCALE : process.env.LOCALE;```
#

i think this it??

wheat mesa
#

no

#

Where do you invoke your execute() function

earnest phoenix
#

ohhh index.js

#

i just going to remove eval it to much trouble

wheat mesa
#

Or you could attempt to solve the problem

pale vessel
wheat mesa
#

Show the code for your command handler

pale vessel
#

What are you doing

earnest phoenix
#

try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply(i18n.__("common.errorCommend")).catch(console.error);
}
});

#

i cant post all-

pale vessel
wheat mesa
#

And that's your problem

earnest phoenix
pale vessel
#

you're not passing the client

wheat mesa
#

^^

earnest phoenix
#

the client the problem?

pale vessel
#

your function expects a client as paremeter

earnest phoenix
#

so just defult it with a const

wheat mesa
#

What

#

Either pass in client to your command.execute() function, or don't use client in your execute() function in your command

pale vessel
#

I'd say the latter

#

you could use message.client instead

earnest phoenix
#

ok

earnest phoenix
pale vessel
#

huh

#

could you elaborate

wheat mesa
#

Flazepe is saying that you don't need to pass in client as an arg to your function because you can access your client by using message.client

earnest phoenix
#

fix

round cove
lethal trout
#
DiscordAPIError: Invalid Form Body
0.permissions[0].permission: This field is required
    at RequestHandler.execute (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async ApplicationCommandPermissionsManager.set (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\managers\ApplicationCommandPermissionsManager.js:185:18) {
  method: 'put',
  path: '/applications/881018723803201589/guilds/821972674380038164/commands/permissions',
  code: 50035,
  httpStatus: 400,
  requestData: {
    json: [
      {
        id: '881025520064684128',
        permissions: [
          { id: '857324471441293352', permission: undefined, type: 1 }
        ]
      }
    ],
    files: []
  }
}```

this error comes when i put `userPermissions: ["ADMINISTRATOR"],` to a slash command
(ps i am using recons permission handling for slash commands)
if u  need any code ask
proven lantern
#

will i still need to have a open socket connection if my bot only uses slash commands?

#

any good docs for discord.js slash commands

crimson vapor
#

Passing the client through a command handler cringe

#

Message.client FTW

proven lantern
hybrid cargo
#

You cant use message anymore after april 2022 anyways. So ...

crimson vapor
#

So doing that old shitty command handler won’t work anymore

proven lantern
#

will i still need a vps for the socket connection?

hybrid cargo
#

unless you get the message intent and somehow sneak some normal commands in ur bot and not get reported

crimson vapor
#

either way it doesn’t matter

proven lantern
#

if i can host all my commands on an http endpoints i shouldn't need a vps

crimson vapor
#

In theory

proven lantern
#

or do i need the socket connection to show as online

crimson vapor
#

Yeah

proven lantern
#

that's not good

#

what's the point

#

they should just have a health check endpoint. if that returns 200 then the bot is online

crimson vapor
#

You can add slash commands to a server without adding the bot

crimson vapor
#

Just remove the bot scope on the invite

proven lantern
#

interesting

#

so i dont need the bot to be online

#

nice

crimson vapor
#

the average user won’t understand that probably

proven lantern
#

they'll learn by april 2022

#

how are conflicting slash commands handled? like if two different bots want to register the same slash command name

crimson vapor
#

They bot show up under different bots

slender thistle
#

^ it's possible to have 2 commands with the same name

crimson vapor
proven lantern
#

nice

#

i wish it was like this when i first started working on these bots. i couldn't believe they made us setup a socket connection and receive all the chat messages.

hybrid cargo
proven lantern
#

will slash commands support this type of input format?
!record [#PLACEMENT PLAYERS...]... GAME_NAME
!record #1 @player1 @player2 #2 @player3 @player4 Counter Strike

#

!record #1 @imposter1 #1 @imposter2 #2 @crew1 #2 @crew2 #2 @crew3 Among Us

#

is there a limit to the number of slash commands? i have 36 commands currently

proven lantern
#

oh, global level will register the slash commands for any guild that has the bot invited. I'm guessing guild level commands lets you create a commands that is only registered to one guild. probably useful for testing it out before releasing to global

near stratus
#

yes

earnest phoenix
hybrid cargo
earnest phoenix
#

im behind on the times

#

what's a context menu

hybrid cargo
#

Read the dec docs on the application commands. Everything should be specified there

earnest phoenix
#

ty

whole glen
earnest phoenix
#

@whole glen what the heck are you actually trying to do

whole glen
#

just when i say something the bot deletes it and re sends it (only on my server) i wanted to be sure is was ok

earnest phoenix
#

hyperchat bot used to do the same thing and it's accepted

lethal trout
#
C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21
      const err = new MongooseError('Query was already executed: ' + str);
                  ^

MongooseError: Query was already executed: gtn.findOne({ guild: '796358397070540831' })
    at model.Query._wrappedThunk [as _findOne] (C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21:19)
    at C:\Users\sakit\Documents\Fire-Development\node_modules\kareem\index.js:370:33
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  originalStack: 'Error\n' +
    '    at model.Query._wrappedThunk [as _findOne] (C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\mongoose\\lib\\helpers\\query\\wrapThunk.js:25:28)\n' +
    '    at C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\kareem\\index.js:370:33\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:78:11)'
}```
whats this?
charred jetty
#

need help (discord.js)

earnest phoenix
#

it needs at least 16.6

charred jetty
#

ohk

earnest phoenix
wanton flicker
#

if i dm someone when they vote, could it possibly violate tos?

sour anchor
#

Dpy is dead 😦

charred jetty
earnest phoenix
wanton flicker
#

ah ok good

charred jetty
#

bcs few certified bots does it

earnest phoenix
#

do any one help me in bash lang

lethal trout
#
    const err = new MongooseError('Query was already executed: ' + str);
                  ^

MongooseError: Query was already executed: gtn.findOne({ guild: '796358397070540831' })
    at model.Query._wrappedThunk [as _findOne] (C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21:19)
    at C:\Users\sakit\Documents\Fire-Development\node_modules\kareem\index.js:370:33
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  originalStack: 'Error\n' +
    '    at model.Query._wrappedThunk [as _findOne] (C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\mongoose\\lib\\helpers\\query\\wrapThunk.js:25:28)\n' +
    '    at C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\kareem\\index.js:370:33\n' +
    '```
help
shrewd hazel
#

Did you think discord should take over the development of dpy?

vivid fulcrum
#

they won't lol

#

if you aren't mee6, discord doesn't care about you

shrewd hazel
#

Then lets hack mee6 :D

earnest phoenix
#

lmfao

vivid fulcrum
#

cringe

shrewd hazel
#

@vivid fulcrum what its a joke

earnest phoenix
#

i think someone will take over it as theres some big bots that use discord.py

shrewd hazel
#

I pnly jave 1 minute until my cpnnrction completely disconnected

#

Bye

earnest phoenix
#

lol

quartz kindle
#

why the heck would discord develop dpy

rose warren
#

Why would anyone use dpy KEKW

green kestrel
#

you can't read too much into what Danny wrote on that gist

earnest phoenix
#

how i can play the song in discord guys

green kestrel
#

the list of which libs support slash commands in it is inaccurate as to spin a negative viewpoint that everyone must hate where discord is going like he does

#

and there's years of drama behind his personal decision to end development

#

personal arguments with discord devs

#

people are going to think that's the way all lib devs feel and this isn't further from the truth

rose warren
#

Yeah I kinda figured there was a lot of drama behind it. It hasn't changed my opinion. Slash commands and message intent is a good move on Discord's part in my opinion.

green kestrel
#

Danny had never wanted to implement slash commands

near stratus
#

true

green kestrel
#

there was that other gist about how they were crap

#

it's funny my lib was completely left off that list of his along with about 20 others that support slash commands fully, and a lot that it says don't support them do, in their development branches

rose warren
#

Slash commands definitely need to get better, and I think it's very early days yet. They'll definitely become more powerful as the API gets improved.

green kestrel
#

oh well more python devs to convert to C++ I guess soon kek_laugh

rose warren
#

Another dpy lib will spring up I'm sure

hybrid cargo
novel jetty
#

Can anyone help me fix this issue? Im not sure from where its coming from

MongoDB has successfully connected
Ready to serve on 25 servers, for 176393 users.
/workspace/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^
DiscordAPIError: 404: Not Found
    at RequestHandler.execute (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async ChannelManager.fetch (/workspace/node_modules/discord.js/src/managers/ChannelManager.js:114:18) {
  method: 'get',
  path: '/channels',
  code: 0,
  httpStatus: 404,
  requestData: { json: undefined, files: [] }
}
spark flint
#

Anyone here know how i can get data from a JSON in HTML?

#

I have my bots server count hosted on my own (really basic) API and I need it to get the server count from the JSON api.

spark flint
#

no idea how to use this

#

i've never used properly js before

near stratus
spark flint
#

alr thanks

near stratus
quartz kindle
willow mirage
split hazel
#

perhaps

quartz kindle
#

:^)

willow mirage
#

LMAOO

#

yeah I dont see any py questions here

split hazel
#

hold on the repo was archived

quartz kindle
#

yes

#

the owner basically quit

split hazel
#

lmao

#

I don't blame him

quartz kindle
#

he said hes sick and tired of discord's changes and how discord doesnt listen to developer feedback

split hazel
#

it's annoying keeping up with a user base and discords changes

#

yepp

quartz kindle
#

and he doesnt like slash commands

willow mirage
#

lmao

split hazel
#

would totally stand by his decision even if it meant my whole bot would break because of it

willow mirage
#

well maybe someone can fork it and keep going with those shit

split hazel
#

probably

quartz kindle
#

someone probably will, if they didnt already

green kestrel
#

not an issue I need to worry about 🙂

willow mirage
#

lmaoooo

split hazel
#

think it's more of a heat of the moment thing

#

he'll hand ownership to someone else trusted

#

or she

quartz kindle
#

they all declined

willow mirage
#

lmaooo

spark flint
split hazel
#

lmao

quartz kindle
#

xD

spark flint
#

forgot to remove the watermark

split hazel
#

nowadays no one wants to touch discord

#

I don't either

quartz kindle
#

he stated that he offered to give it to all devs he trusted, all of them declined

spark flint
#

oh

#

thats not good

split hazel
#

too big of a responsibility to suddenly have

quartz kindle
#

ye

#

i mean

#

im still gonna do it to maintain my bots mostly

#

and to move out of discord.js

split hazel
#

I just hate discord bots overall now and I'll completely stop developing them soon

#

it used to be fun back in the day

#

but with all the dramatic changes

quartz kindle
#

ye

narrow fractal
split hazel
#

and discord not letting poor devs continue their bots because they can't doxx themselves to stripe and discord

spark flint
#

its sad 😦

spark flint
#

stripe is legit, i used to use them for card processing on my site

split hazel
#

I know but the fact remains the same

spark flint
#

true

#

they refuse to take under 16's ID so i had to get my parents to do it for me

narrow fractal
#

Discord is really making it hard for us Devs

spark flint
#

yup

#

if ur verified already its good

split hazel
#

if that's not their aim they'll soon notice way less traffic towards developing bots

narrow fractal
#

It kinda sucks since I have 2 bots writing in Dpy so i gotta decide if i wanna switch to a diff lang or not

#

And that wont be a easy task since both are in 15K+ guilds

#

And 1 uses OCR

split hazel
#

that's the risk you're always taking with open source libs

#

they can stop being developed any moment

#

or stop being backwards compatible leaving you with a massive workload

spark flint
#

i cba to rewrite 1500+ lines of discord.py into discord.js or something

quartz kindle
#

just fork dpy

#

or use a fork that someone will eventually make

narrow fractal
#

I have no idea how much lines I have write lmao

#

Should be around 40-50K

#

But i'm currently doing a rewrite to make that go small

quartz kindle
#

good luck lel

narrow fractal
dusty abyss
split hazel
#

lmao change org

#

respectfully fuck off they don't make companies do anything

#

if the company officially makes one then sure

dusty abyss
#

but we can at least try

split hazel
#

not forgetting to mention the scummy tactics the website uses

#

glad to see a select few weren't the only ones annoyed by the change

#

even if its not a concern for myself

quartz kindle
#

someone asked about this in the djs server

#

djs maintainers said danny's acting childish

#

lol

split hazel
#

just left their server 😎

quartz kindle
#

lmao

split hazel
#

djs server is a waste of network and ram

#

and cpu

misty sigil
#

and your life

quartz kindle
#

you're not wrong, but i need to see whats going on every now and then to keep djsl updated

#

now they're planning another big change to their caching system

split hazel
#

god forbid

quartz kindle
#

because they figured out the new caching actually sucks

#

and it uses more ram than before

#

lmao

split hazel
#

I'm slowly becoming numb to their drastic breaking changes

#

maybe that's their intent

misty sigil
#

fuck me

#

i'm just gonna write my own lib at this point istg

quartz kindle
#

thats what im doing

misty sigil
#

ourcord was just a practice

#

lmao

quartz kindle
#

lmao

#

rip ourcord

#

you can make ourcord2 using my lib as the backbone xD

misty sigil
#

lmao

#

i've got a lib that i kinda stopped working on in favour for my tictactoe game

pure grove
#

👍

split hazel
#

throwback to the time I made something called oursql on glitch

misty sigil
#

its not even commited to git yet

mint rain
#

Hey

split hazel
#

it's basically sqlite but turned into a server with websockets and resource controls

misty sigil
mint rain
#

How to get role developer?

spark flint
mint rain
#

Ok

eternal osprey
#

how do i remove one specific emoji in djs v12? message.reactions.remove("👍")? (emoji is a unicode)

mint rain
spark flint
misty sigil
mint rain
#

Bot

spark flint
#

ah

#

not sure then sorry

split hazel
misty sigil
#

bot id and client id tend to be the same

#

for new ones

split hazel
#

they were always the same

misty sigil
#

i was told otherwise but

eternal osprey
#

how do i remove a reacted emoji fully? So not only the one of the users, but the bot one's as well

dusky light
#

Hey, I need help, I want to make a command, that fetchs (amount) of Messages, and check, if they are a Link and delete them.
I'm rn stuck at this point here: (Can someone help me out?)

const messagecount = Number(args[0]) > 100
        ? 101
        : Number(args[0]);

        bot.channels.cache.get("849247207990493204").messages.fetch({ limit: messagecount })
        .then(messages => {
            console.log(messages);
        });
timber fractal
#

Hey can someone help me?

#

Im trying to make a moderation bot. I want my bot to fetch the last 20 messages sent by a specific user in the server but i have no idea how. I cant find anything on google so can somebody help me?

eternal osprey
timber fractal
eternal osprey
timber fractal
#

and maybe in the removeAll() you can filter what eoji

eternal osprey
#

does that function take a parameter?

#

ah yeah we can resolve and then filter

#

thnx

timber fractal
#

@eternal osprey js await message.channel.messages.fetch(m => m.author.id === message.author.id, {limit: 20}).then(logger.log(messages.join(",\n"))) referenceError: messages is not defined

#

oh wait nvm

spark flint
#

anyone know how to get the id of the user who invited the bot to your server?

#

i'm trying to get the bot to send a welcome message to them with commands and setup instructions etc

timber fractal
#
await message.channel.messages.fetch(m => m.author.id === message.author.id, {limit: 20}).then(messages => {logger.log(messages)})``` why does this code return `[Object map]`
split hazel
#

this so true

#

its like they think our lives revolve around them in a way

dusky light
#

I'm trying something like you too, just that I want to fetch the links lol

#

and I'm stuck where you stuck xD

timber fractal
#

@eternal osprey can you help us?

pallid jungle
#

Trying to update from v12 to v13

TypeError: settedParent.createOverwrite is not a function
    at E:\C) Developing\Wolfy Djs-13\commands\tickets\ticket.js:54:34
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
                    settedParent.createOverwrite(message.guild.roles.cache.find(x => x.name === '@everyone'),{
                        SEND_MESSAGES: false,
                        VIEW_CHANNEL: false
                    });
split hazel
timber fractal
#

how to fix?

split hazel
#

stringifying objects that cannot be natively turned into a string will produce that output

#

is that a library or your own function

timber fractal
#

own function

split hazel
#

import something called utils first require('util')

#

it contains functions that stringify things that usually cannot be stringified

boreal iron
#

Which is an object oldEyes

timber fractal
#

why

#

only import?

#

or also use

split hazel
#

and on the msg parameter you would run util.inspect(msg, { depth: 1 }) (this is how to fix your logging)

boreal iron
#

He doesn’t even loop through his msg parameter in his function

split hazel
#

though chances are some logs will be too big to fit through the webhook

boreal iron
#

Expecting it to be no collection

eternal osprey
#

why is my code adding that extra \ and "?

#
test[args[0][1]].time = ['"'+test1+'"']```
#

i've even logged it and it shows as:

timber fractal
split hazel
#

where are you getting that data from

cinder patio
#

" "test" "

timber fractal
#

and btw why doesnt my code only get the messages from the message.author?

eternal osprey
cinder patio
#

there's nothing wrong with it in the first place

#

but ok

boreal iron
timber fractal
#

how to do it then?

boreal iron
#

You might wanna take a look at the documentation

quartz kindle
#

there is no way to fetch messages based on author id

boreal iron
#

There are examples as well

timber fractal
#

doesnt help

quartz kindle
#

how doesnt it?

timber fractal
#

the docs

#

dont help

quartz kindle
#

they literally have an example?

boreal iron
#

It does you didn’t read carefully

quartz kindle
boreal iron
#

It contains an example just for your use case

timber fractal
#

i probaly had the wrong page

#

cuz it didnt show anything like that

boreal iron
#

Nah you didn’t read carefully enough

errant flax
pallid jungle
errant flax
#

code?

boreal iron
#

Just log settedParent

pallid jungle
# errant flax code?
    message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}).then(
        (createdChannel) => {
            // when it creates a ticket, it will create a category and name it ticket and put the ticket there
            createdChannel.setParent(categoryID).then(
                (settedParent) => {
                    // setting the perms for the channel so no one can see it
                    settedParent.permissionOverwrites(message.guild.roles.cache.find(x => x.name === '@everyone'),{
                        SEND_MESSAGES: false,
                        VIEW_CHANNEL: false
                    });

                    // setting the perm so the ticket creator can see it and send msgs in it
                    settedParent.permissionOverwrites(message.author.id,{
                        SEND_MESSAGES: true,
                        VIEW_CHANNEL: true,
                        CREATE_INSTANT_INVITE: false,
                        READ_MESSAGES: true,
                        ATTACH_FILES: true,
                        CONNECT: true,
                        ADD_REACTIONS: true,
                        READ_MESSAGE_HISTORY: true
                    });
boreal iron
#

As it’s not supposed to be what u think

errant flax
pallid jungle
#

oh

quartz kindle
#

you can literally set the parent and the overwrites inside the channel create options

#

so you dont need to do 3 separate requests

#

you can do everything in one go

pallid jungle
#

ok

errant flax
#

is there a way to get a user's about me?

quartz kindle
#
message.guild.channels.create("name", {
  type: "bla",
  parent: id,
  permissionOverwrites: [
    {},
    {},
    ...
  ]
})
errant flax
boreal iron
spark flint
eternal osprey
#
let hoppipa = await message.channel.messages.fetch(message.id === ps)```i am trying to get the previous sent embed so that i can react to it
#

but it returns me [[entries]] with a map of 50 arrays?

boreal iron
#

You’re running into the same issue using fetch() wrongly

errant flax
#

how do i get my repl's ip address? in mobile

quartz kindle
#

everything i do is excuses to not work on it

boreal iron
#

lol

boreal iron
quartz kindle
#

why do you need its ip address?

#

there are hundreds of repls with the same ip address, so it wont really help you

boreal iron
#

lol what a great service tho sharing your IP with others KEKW

rose warren
#

What's your API going to be Tim?

boreal iron
#

He probably doesn’t know yet as he’s not willing to spend time on it

rose warren
#

What about an API that tells you if you should procrastinate or not

#

But it always answers yes

boreal iron
#

lmao

quartz kindle
#

its basically a v2 of my bot's api

#

for astronomy calculations and such

rose warren
#

Nice!

quartz kindle
#

the v1 has been in closed beta for like 1+ years lol

#

but i dont think its scalable enough to go public

rose warren
#

Are you going to charge for it?

quartz kindle
#

ye, im planning on going for some kind of tiers

rose warren
#

Nice 👌

quartz kindle
#

theres gonna be a free tier, then paid tiers with higher limits

boreal iron
#

And there we go again… capitalism is spreading

rose warren
#

Hey devs need to eat too

quartz kindle
#

if you hate capitalism that much, stop driving for money :^)

boreal iron
#

What? No that’s why they supposed to sit in front a Pc 24/7

clever agate
#

hey, how change page without loading?
(using ejs/expressjs)

boreal iron
#

No food required

boreal iron
clever agate
quartz kindle
#

Lol

#

i mean, google it, as in, search for SPA on google

rose warren
#

I'd definitely recommend chargebee if you want to do a subscription model

quartz kindle
#

SPA = single page application

clever agate
#

Any examples with this?

vivid fulcrum
#

it's an umbrella term

#

look into frameworks like react or angular

vivid fulcrum
#

what

near stratus
spark flint
#

i've already fixed it 🙂

#

used some different code

near stratus
spark flint
#
<script>
    $.getJSON('http://ip here/details', function(data) {
        
        var text = `Servers: ${data.servers}<br>
                    Users: ${data.users}<br>`
                    
        
        document.getElementById("servers").innerHTML = `${data.servers}`;
        document.getElementById("users").innerHTML = `${data.users}`;
    });
    </script>
    <h1 id="servers" >0</h1>
    <h1 id="users" >0</h1>```
near stratus
#

if it works then it works

clever agate
#

is it possible to use EJS and NextJS at the same time?

quartz kindle
#

possible, probably yes, but... why would you want that?

earnest phoenix
clever agate
#

but saying that, i wanted to use as "oauth"

quartz kindle
#

i've never used nextjs, but im pretty sure it can do everything ejs does by itself

earnest phoenix
clever agate
#

okeh

#

tysm for responding

earnest phoenix
#

Or better for security: Use getServerSideProps for the component that needs oauth

clever agate
#

ok

hollow depot
#

is anyone familiar with termius ssh? i used other ssh clients before but i'm switching to termius, i'm trying to scroll up and down but this is what i get instead of scrolling

quartz kindle
#

have you tried the pgup/pgdown buttons?

hollow depot
#

unfortutately i have a 60% keyboard :P

quartz kindle
#

rip

hollow depot
#

not the best for coding i know

earnest phoenix
#

Hello is dpy is shut down

quartz kindle
#

yes

split hazel
#

but has all the necessary programmer keys:)

#

& backslash ` ~

heady crystal
#

hello

boreal iron
#

👋

heady crystal
#

Which one is better?

#

i am not pro coder btw 😐

boreal iron
#

Uhh god too much text dude

heady crystal
sudden geyser
#

There's a lot of text so it doesn't look good either way.

#

But the second one looks better

heady crystal
split hazel
#

second one, would also be cool if you added an emoji to the more popular games

boreal iron
#

You may wanna use fields and titles

heady crystal
crystal tendon
#

Ping?

boreal iron
#

Game title as field, and infos like the playtime etc as value

boreal iron
#

And you may wanna limit it to the top 10 games for example

quartz kindle
#

i'd put it into a table-like structure

#

with the game names aligned to the left and the time played aligned to the right

split hazel
#

or just make it an image if you know enough about image manipulation lmao

quartz kindle
#

possibly in a code block

boreal iron
#

I'm not fetching game details but take a look at the general structure, using fields

quartz kindle
#
game1          50 hours played
game2 zyx      73 hours played
fgerher        92.5 hrs plyed
#

for example

boreal iron
heady crystal
#

ok

boreal iron
#

considered to waste more space of course

heady crystal
boreal iron
#

whatever u like, the possibilities are endless

boreal iron
#

Using inline fields might be a good idea, too for the account details as I mentioned before

#

which looks like a table

pallid jungle
#

Why not working ?

    const filter = async (button) => {
            if(button.CustomId === '1'){
                if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
                button.reply.send({ embeds: [info], ephemeral: true})
                }
                if(button.CustomId === '2'){
                    if (button.clicker.id !== message.author.id) return button.reply.defer()
                    button.reply.send({ embeds: [search], ephemeral: true})
                }
                if(button.CustomId === '3'){
                    if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
                    button.reply.send({ embeds: [Utl], ephemeral: true})
                }
                if(button.CustomId === '4'){
                    if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
                    button.reply.send({ embeds: [moderator], ephemeral: true})
                }
                if(button.CustomId === '5'){
                    if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
                    button.reply.send({ embeds: [Fun], ephemeral: true})
            }
    }
quartz kindle
#

why do you have button.clicker.CustomId?

hollow depot
quartz kindle
#

lel

near stratus
#

@earnest phoenix nitro scam

earnest phoenix
#

ty hug

near stratus
pallid jungle
# quartz kindle why do you have button.clicker.CustomId?

It was for package my bad i edited the code to this

    collector.on('collect', async interactionCreate => {
        if(interactionCreate.CustomId === '1'){
            if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
            interactionCreate.reply({ embeds: [info], ephemeral: true})
            }
            if(interactionCreate.CustomId === '2'){
                if (interactionCreate.clicker.id !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [search], ephemeral: true})
            }
            if(interactionCreate.CustomId === '3'){
                if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Utl], ephemeral: true})
            }
            if(interactionCreate.CustomId === '4'){
                if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [moderator], ephemeral: true})
            }
            if(interactionCreate.CustomId === '5'){
                if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Fun], ephemeral: true})
        }
})
#

I want to make it without package

quartz kindle
#

why do you have things mixed up?

pallid jungle
quartz kindle
#

you have
interactionCreate.customId
interactionCreate.CustomId
interactionCreate.clicker.id
interactionCreate.clicker.CustomId

#

all mixed up

pallid jungle
#
    collector.on('collect', async interactionCreate => {
        if(interactionCreate.CustomId === '1'){
            if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
            interactionCreate.reply({ embeds: [info], ephemeral: true})
            }
            if(interactionCreate.CustomId === '2'){
                if (interactionCreate.id !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [search], ephemeral: true})
            }
            if(interactionCreate.CustomId === '3'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Utl], ephemeral: true})
            }
            if(interactionCreate.CustomId === '4'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [moderator], ephemeral: true})
            }
            if(interactionCreate.CustomId === '5'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Fun], ephemeral: true})
        }
})
#

Done

quartz kindle
#

now you have
interactionCreate.customId
interactionCreate.CustomId
interactionCreate.id

pallid jungle
#
    collector.on('collect', async interactionCreate => {
        if(interactionCreate.CustomId === '1'){
            if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
            interactionCreate.reply({ embeds: [info], ephemeral: true})
            }
            if(interactionCreate.CustomId === '2'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [search], ephemeral: true})
            }
            if(interactionCreate.CustomId === '3'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Utl], ephemeral: true})
            }
            if(interactionCreate.CustomId === '4'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [moderator], ephemeral: true})
            }
            if(interactionCreate.CustomId === '5'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Fun], ephemeral: true})
        }
})

Dn

quartz kindle
#

interactionCreate.customId
interactionCreate.CustomId

pallid jungle
quartz kindle
#

one has capital C, the other doesnt

near stratus
#

line 3

pallid jungle
#
    collector.on('collect', async interactionCreate => {
        if(interactionCreate.CustomId === '1'){
            if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
            interactionCreate.reply({ embeds: [info], ephemeral: true})
            }
            if(interactionCreate.CustomId === '2'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [search], ephemeral: true})
            }
            if(interactionCreate.CustomId === '3'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Utl], ephemeral: true})
            }
            if(interactionCreate.CustomId === '4'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [moderator], ephemeral: true})
            }
            if(interactionCreate.CustomId === '5'){
                if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Fun], ephemeral: true})
        }
})

dn

quartz kindle
#

according to the docs, customId without capital C is the correct way

pallid jungle
#

oh wait

quartz kindle
#

also, you're comparing a custom id to the author id

#

that comparison will never work

pallid jungle
#
    collector.on('collect', async interactionCreate => {
        if(interactionCreate.customId === '1'){
            if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
            interactionCreate.reply({ embeds: [info], ephemeral: true})
            }
            if(interactionCreate.customId === '2'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [search], ephemeral: true})
            }
            if(interactionCreate.customId === '3'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Utl], ephemeral: true})
            }
            if(interactionCreate.customId === '4'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [moderator], ephemeral: true})
            }
            if(interactionCreate.customId === '5'){
                if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
                interactionCreate.reply({ embeds: [Fun], ephemeral: true})
        }
})
pallid jungle
quartz kindle
#

isnt it obvious?

#

if customId is 5, then customId is 5

#

it will never be equal to the author id

#

the author id will never be 5

pallid jungle
quartz kindle
#

thats not an error?

#

thats the buttonInteraction object

#

but did you understand what i said?

pallid jungle
#

yea

#

I understand

#

@quartz kindle that will work?

if (!interactionCreate.author.id) return interactionCreate.deferUpdate()
quartz kindle
#

interactions dont have .author

pallid jungle
#
if (!interactionCreate.member.id) return interactionCreate.deferUpdate()
quartz kindle
#

now you're checking if the member id doesnt exist

#

if the inteaction is sent in a guild, the member id will always exist, so your code will never defer

pallid jungle
#

worked finally it's replying but i don't know why it's logging the button object

quartz kindle
#

do you have a console.log somewhere?

pallid jungle
#

oh i forgot to delete this

    client.on('interactionCreate', interaction => {
        if (!interaction.isButton()) return;
        console.log(interaction);
    });
pallid jungle
quartz kindle
#

what do you want it to do?

pallid jungle
#

This will work ?

if (!interactionCreate.member.id == message.author.id) return interactionCreate.deferUpdate()
pallid jungle
#

If it's not the message author

quartz kindle
#

!==

#

not !interaction ==

pallid jungle
#

Done

quartz kindle
#

otherwise you're checking if the id exists, then then comparing the result of the existence check

pallid jungle
#

@quartz kindle You are the best support YeaBoi

quartz kindle
#

that will be a one time payment of 499 us dollars for 3 years free tech support from certified microsoft tech support technician 100% legit and not a scam

#

my name is john smith from california and i do not have an indian accent, you are imagining things, i speak perfect english

pallid jungle
boreal iron
quartz kindle
boreal iron
pallid jungle
#

Noo sad_dog np

🏦 499$ Come back to Joe paypal!

quartz kindle
#

btw we do not accept paypal we only accept amazon gift cards

boreal iron
#

Free lawyer service for only $199 (on time purchase). Here and now.

#

Limitted offer, no scam.

quartz kindle
#

btw you owe us taxes i am john smith from the IRS

quartz kindle
#

we are 100% not related to each other

boreal iron
#

Sir, I don't know You but thanks for suggesting our excellent service.

quartz kindle
#

i dont know you either but lets get a coffee at the bar next door once our shift is over

boreal iron
#

Regarding the cash we made we should switch over to lobster and champagne

quartz kindle
#

we cant, our bosses keep 90% of what we make

boreal iron
#

u wanna continue to delay your API joining me on Factorio?

quartz kindle
#

lmao

#

i dont remember how to play, i played it for like a few hours then never tried it again

boreal iron
#

playing like once per year, that's the ultimate offer

#

Tim doesn't know something... damn looks like the apocalypse isn't far anymore

quartz kindle
#

i going on a walk with my mom

#

lel

boreal iron
#

lol have fun tho, ask her for some money, tell her you had a raff month

quartz kindle
#

xD

sterile thicket
#

how do I await inside .map()?

harsh nova
#

.map(async (things) => {}) should work

clever agate
#

hey help me with spa?

cinder patio
#

using async in a map callback is pointless

heady crystal
#

@boreal iron

dusky light
#

Hey, I want to delete links, that had been fetched, how to do this?
Im stuck here right now, could someone pls help me?

        const messagecount = Number(args[0]) > 100
        ? 101
        : Number(args[0]);

        // System
        if(isNaN(messagecount)) return message.channel.send(usageEmbed);

        if(messagecount > 100) {
            message.channel.send(":x: Du kannst nur Nachrichten zwischen **2 und 100** löschen.");
            return;
            
        } else if(messagecount < 2) {
            message.channel.send(":x: Du kannst nur Nachrichten zwischen **2 und 100** löschen.");
            return;
        }

        bot.channels.cache.get("881206811083042816").messages.fetch({ limit: messagecount })
        .then(messages => {
            let urlPattern = /(https?:\/\/)?(www\.)?(discord\.(gg|io|me|li|club)|discordapp\.com\/invite|discord\.com\/invite)\/.+[a-z]/gi;
            let withLink = messages.filter(m => urlPattern.test(m.content));
            if(!withLink) {
                message.channel.send(noLinks);
                return;
            } else {
                message.channel.bulkDelete(withLink, true);
                message.channel.send("Erfolgreich alle Links gelöscht!");
            }
        });
    }
sterile thicket
#

how to get access to the variable declared inside a .then()

boreal iron
#

What's up?

sudden geyser
#

e.g.

Promise.resolve(5)
  .then((five) => console.log(five));

// or
let five = await Promise.resolve(5);
console.log(five);
// It would be a mistake to log it without awaiting it since it would be a promise.
heady crystal
#

@boreal iron

sudden geyser
#

Or maybe you want to return a local variable since it's just a function

quiet topaz
#

So I'm making a music bot in Node Js, how can I "store" (only in the process) playlists? how is the performance when i just would store it in an array?

sudden geyser
#

Use whatever you feel like

#

A map? An object?

boreal iron
sudden geyser
#
let playlist = {
  // 123 is a guild ID
  "123": [song1, song2]
}
boreal iron
#

You could also think about to add the avatar as thumbnail

#

And instead providing a link to the Steam profile

quiet topaz
heady crystal
#

i forgot about it

#

a sc

#

sec

sudden geyser
#

In my opinion, you shouldn't worry about performance, but it should be good.

sterile thicket
sudden geyser
#

returns a promise resolving to a user

#

So you can await it or use a .then where the first argument to the function you pass is the resolved user

sudden geyser
#

Would you like an example

heady crystal
#

@boreal iron

sterile thicket
sacred aurora
sudden geyser
#

In my example, Promise.resolve(5) represents the promise. So fetching the user is the promise. After that, .then((...) => {...}) doesn't change. But the ... does.

The first ... represents the user and the second represents what to do. So it could look like .then((user) => console.log(user.tag))

near stratus
sudden geyser
sterile thicket
boreal iron
#

Then that's what u need

boreal iron
#

if(!u) console.log(u.id)

sterile thicket
#

outside of .then()

near stratus
sterile thicket
boreal iron
#

still didn't get what u wanna do

near stratus
earnest phoenix
#

the disappointment when nodejs v16 wont install on your windows 7

sterile thicket
#

oh so I can't do this:js message.reply('hi').then(m=>{var mid = m.id}) mid
without await?

earnest phoenix
#

how do i use node now

sterile thicket
dusky light
#

Hey, how can I delete the whole entrys of a user?

        if(err) console.log(err);
        if(!data.length) {
            return message.channel.send(nowarns);
        } else {
            // delete every thing in the database from the user
        }
    });```
near stratus
sterile thicket
near stratus
dusky light
#

oh

earnest phoenix
#

ah yes my pc can totally handle more than one program running at a time

sterile thicket
near stratus
sterile thicket
near stratus
#

Just put the whole thing inside the function

sterile thicket
#

if that's the only way

near stratus
#

.then is better but anyway

boreal iron
#

Inside .then() is not available outside

#

if you mean that

earnest phoenix
#

ill just use replit with npm i node

near stratus
boreal iron
#

let shit = await fetch().then((yikes) => { if(yikes.ok) return yikes.child; });

#

to make things more complicated than needed

#

lmao

split hazel
#

const annoyance = require("discord.js")

heady crystal
#

@boreal iron

#

is this good ?

vivid fulcrum
#

way too verbose

heady crystal
vivid fulcrum
#

what

heady crystal
#

what?

split hazel
#

I would react the same to your feedback

boreal iron
#

hmm liked the list style a little more

#

but that's just my opinion

vivid fulcrum
#

the embed is way too verbose, the information should be shortened

#

sec

vivid fulcrum
#

i'll do a concept embed

#

my eval bot doesn't want to start up

#

fun

heady crystal
boreal iron
vivid fulcrum
#

good point

boreal iron
#

That somehow looks a little better tho

#

I would prefer this version

heady crystal
#

i am open for any suggestions

heady crystal
boreal iron
#

May highlight the hours in code tags

vivid fulcrum
#

oh nevermind it started up it just had to download packages lol

boreal iron
#

10 hours

heady crystal
#

a sec

boreal iron
#

Well need to go to the local store

#

brb in an hour

heady crystal
#

@vivid fulcrum @boreal iron

vivid fulcrum
#

a lot more readable

heady crystal
#

cool

#

should i put h instead hours?

vivid fulcrum
#

yup

heady crystal
#

ok

deep juniper
#

Help, how can I suit this?

heady crystal
#

@vivid fulcrum

deep juniper
#

I only but my bot there, bot it v
Was a test, but now I quit the bot on this web, but I can quit this Web on my bot!

boreal iron
#

It’s better yeah

heady crystal
#

@boreal iron i thought you are not here xD

pale vessel
#

Maybe h inside the `` too

#

Also, that 3 years ago, why don't you use <t:timestamp:R>?

vivid fulcrum
#

here's my spin on it @heady crystal

pale vessel
#

makes me want to cum

earnest phoenix
#

Flazepe what are you doing in detritus server

pale vessel
#

Lurk?

earnest phoenix
#

Spying on Erwin?

pale vessel
#

sure

earnest phoenix
#

Or betraying djs?

pale vessel
#

betraying rose

earnest phoenix
#

that's fine cuz I'm the one betraying djs

pale vessel
#

that's good

earnest phoenix
#

ty

#

but I can't find any good guides on how to use detritus

pale vessel
#

you have Erwin

earnest phoenix
#

offline

#

and not seen in topgg for a long time

pale vessel
#

he's very activtin other servers

#

I think he said this server made him lose so much braincells so he just stopped talking here

earnest phoenix
#

Erwin's last message was on July 10

pale vessel
#

go join his GenshinUtils server

heady crystal
#

?

#

who ping me

heady crystal
heady crystal
earnest phoenix
#

We loved erwin.
But
"When a wizard goes over to the (detritus) side there is no one and no body that matters to em anymore"

pallid jungle
#
    message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}, {
        type: 'GUILD_TEXT',
        permissionOverwrites: [
            {
                id: message.guild.id,
                deny: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
            },
            {
                id: message.author.id,
                allow: ['SEND_MESSAGES', 'VIEW_CHANNEL', 'READ_MESSAGES', 'ATTACH_FILES', 'CONNECT', 'ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
            },
        ],
    }).then(async (channel) => {
                    var ticketEmbed = new discord.MessageEmbed()
                    .setTitle(`Welcome in your ticket ${message.author.username}`)
                    channel.send({ content: `<@${message.author.id}>`, embeds: [ticketEmbed] })
                })

how to set the parent ?

earnest phoenix
#

set the what

pallid jungle
#

I mean send the channel to the category i want ;-;

quartz kindle
#

did you not see the example i showed before?

earnest phoenix
#

Send the channel

quartz kindle
pallid jungle
#

Ah i forgot again

#

sorry

boreal iron
pallid jungle
#

@quartz kindle Didn't work

parent: categoryID,
quartz kindle
#

show code

earnest phoenix
#

What is the categoryID

boreal iron
pallid jungle
#
    message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}, {
        type: 'GUILD_TEXT',
        parent: categoryID,
        permissionOverwrites: [
            {
                id: message.guild.id,
                deny: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
            },
            {
                id: message.author.id,
                allow: ['SEND_MESSAGES', 'VIEW_CHANNEL', 'READ_MESSAGES', 'ATTACH_FILES', 'CONNECT', 'ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
            },
        ],
    const categoryID = message.member.guild.channels.cache.find(c => c.name == "TICKETS")
quartz kindle
#

why do you have 2 objects

pallid jungle
#

idk

quartz kindle
#

then dont?

lament rock
#

Hey Tim, do you happen to know an alternative for mutating things without using Object.assign? I'm trying to keep memory references of say a string, but mutate it into a Map without having to redeclare a variable to update the reference

quartz kindle
#

(name here, { object here })

#

you are doing (name here, { something }, { something else? })

pallid jungle
#

ok ok

quartz kindle
#

its only 1 object, not 2

lyric mountain
#

Meaning you can't modify a string at all

lament rock
#

strings can be mutated iirc

pallid jungle
#

Worked again thanks @quartz kindle

earnest phoenix
#

aw no, my iframe in my bot page's description keeps disappeaaring after a while :(
why is that happening? ;-;

boreal iron
#

Might be a site issue even if i never saw a disappearing iFrame

lyric mountain
boreal iron
#

topgg site is trash anyways, not trying to be mean but it is how it is

#

Maybe once a beautiful day they will gonna fix their shit up

heady crystal
#

you are bot developer xd

boreal iron
#

Hmm?

#

Doesn’t mean you can’t have an option?!

heady crystal
#

i don't said that

boreal iron
#

Looking back into more than 10y of experience even if I’m a frontend nub, not because I’m too dumb to code just because my level of creativity is trash

earnest phoenix
#

Same

#

I am forced to use the beta version

#

Backend programmers fear CSS

#

I can't switch

earnest phoenix
#

lol

boreal iron
# earnest phoenix beta.top.gg

Doesn’t change the fact to fix existing issues
How damn complicated can it be to fix site issues even if they are temporarily

sudden geyser
lyric mountain
#

I do have creativity, but my sites end up looking like 4yo kid drawing mash-ups

boreal iron
earnest phoenix
#

Sometimes the ads keep looping or do not show

#

sometimes I dont see the bots when they exist

boreal iron
#

I like fucking do responsive designs and fight with their related issues

earnest phoenix
#

:D

lyric mountain
earnest phoenix
#

I use chakra ui for everything because I cannot make a good looking UI on my own

boreal iron
#

But other than the younger kids I rely on backwards compatibility mostly using CSS2

earnest phoenix
#

I use Angular

#

PS it gives me a 100 lighthouse accessibility score

#

cause I love myself

#

:p

sudden geyser
#

I've considered using Tailwind or plain CSS

boreal iron
#

Damn egoism, love me

sudden geyser
#

love sent

#

connection refused

boreal iron
#

Damn love

earnest phoenix
#

I use it a lot

sudden geyser
#

I discovered it yesterday.

#

I've been scared to develop for the web because of stuff like CSS

#

So a functional approach to CSS is exciting

earnest phoenix
#

I dont hate css it hates me

#

and I can't design worth a shit so

sudden geyser
#

don't worry CSS hates everyone

earnest phoenix
#

Anyone who can design with css is a god in my books

sudden geyser
#

except Jen Simmons maybe

boreal iron
#

Even after so many years I somethings freak out, too don’t worry

earnest phoenix
#

I am trying to get into frontend more since I am probably going to be doing my project idea solo lawl

#

Even though I hate it

sudden geyser
#

At the same time, I'm worried Tailwind will die out and everyone will move to another framework in a few years.

boreal iron
#

What’s tailwind? A CSS framework?

sudden geyser
#

Yeah

real helm
#

who knows the web to create docs

sudden geyser
#

Not sure if it's a "framework" but it is a tool nvm, it is

real helm
rose warren
real helm
#

Oh, okay

earnest phoenix
#

tailwind is so good

#

idoubt it will die any time soon

real helm
#

Is able to put in my domain?

rose warren
#

Yes

real helm
rose warren
#

Yup

sudden geyser
#

It lets you compose CSS through a bunch of CSS classes

real helm
#

Okya, ill try gitbook

boreal iron
real helm
#

tysm

rose warren
#

No problem! dog_Happy

lyric mountain
rose warren
earnest phoenix
#

I dont suppose there is a library for the top.gg api in go is there

boreal iron
#

There are even people out there calling HTML a program language and they are still alive, so you shouldn’t worry about the actual name too much

earnest phoenix
#

I will probably have to make my own post request

rose warren
#

There is a go lib

earnest phoenix
#

O sweet there is a lib

#

I dont gotta write messy code myself

#

:D

sudden geyser
lyric mountain
#

There's readthedocs

real helm
#

I have the page to do that

#

tysm to all < 3

boreal iron
#

Mac seems to post the docs link and run dbl commands all day long, aren’t you? 😅

earnest phoenix
#

Mac full mod when?

boreal iron
#

Shhh

rose warren
boreal iron
#

Yeah I already noticed oldEyes

#

A self bot might do your job as well

rose warren
earnest phoenix
#

Dang f

boreal iron
#

Let’s spread lies about Mac getting him demoted.
Just to prevent him from getting promoted, then fucking getting arrogant, keep forgetting us poor society, fuck with us and ban us.

#

Oh he’s still here

#

u saw nothing

lyric mountain
#

We need to get parm to change his nick to cheese when mac get promoted

#

So we can have Mac 'n Cheese duo

boreal iron
#

lmao

rose warren
#

Cheese is my alt

#

Also, this is probably a better discussion to have in #general

#

😅

boreal iron
#

There we go I told you!!!!1!!

#

It starts…

lament rock
# quartz kindle do you have an example?

https://github.com/AmandaDiscord/Heatsync/blob/master/src/index.ts#L48
This method works on Objects. Objects are able to be reloaded properly. The basic idea of hot reloading. However, I would like to extend support to other types like strings or booleans and such. The problem becomes changing the type of the thing without changing its reference. I tried to wrap it in an object, but changing object properties overwrites the reference of the Object property

GitHub

A module to watch and reload JS Modules on modification and sync results with objects - Heatsync/index.ts at master · AmandaDiscord/Heatsync

boreal iron
quartz kindle
lament rock
#

Sort of. The gist is that the user requires a file and the state of the Mod is stored and returned to the user. The user should be able to change the files and the lib will mutate the state of the mod and the user can continue to use the mod as if the process was restarted without having to re-declare anything or jump through any weird hoops

twin kettle
#

?

quartz kindle
quartz kindle
lament rock
#

yes, I have that down

twin kettle
lament rock
#

The problem is that only Objects can be synced effectively due to the fact that it uses Object.assign

twin kettle
lament rock
#

The lib can require modules which export something other than an Object, but it cannot muted the reference so that the user gets an up to date version

boreal iron
#

It’s no longer maintained

quartz kindle
twin kettle
lament rock
quartz kindle
#

primitives dont have references

lament rock
#

Okay. So. Let me throw you a scenario I'd like you to solve

boreal iron
lament rock
#

The user requires a module which only exports a string. This require is passed through the lib I just sent you, so the lib handles the require, the references to the require and it's exported members and such and returns the value back to the user. The user has the expectation that they don't have to re-declare anything at any point in time. The user updates the module and changes it so that it exports a boolean and would like their reference from their require which routed through the lib to point to the boolean without re-declaring their variable.

Currently, they will find that they don't get the boolean and are stuck with the string. How can this be fixed

quartz kindle
#

how do they access the string?