#development

1 messages · Page 17 of 1

ancient nova
#

is that JS or CSS?

civic scroll
#

check the settings menu

civic scroll
ancient nova
civic scroll
#

ye

lyric mountain
civic scroll
#

change the language, enable full intro, and reload the site

civic scroll
solemn latch
#

a cloudflare worker was taking the home path over 👀 stink

ancient nova
lyric mountain
ancient nova
#

I thought top.gg supported that?

lyric mountain
#

I cant print the warning message cuz it disappears when I printscreen

civic scroll
ancient nova
lyric mountain
#

managed to print

ancient nova
#

didn't know that was needed

lyric mountain
#

try adding it

civic scroll
#

no title

#

wah

lyric mountain
#

ah wait

#

maybe it doesn't allow http

#

yep, it works for mine

#

u might need to enable ssl on ur site

ancient nova
civic scroll
lyric mountain
#

it didn't work when I tried my http route

lyric mountain
ancient nova
#

what do you mean?

lyric mountain
#

...http>>s<<

#

u need a certificate to use it btw

ancient nova
#

I haven't done a ssl my website can't be secure I don't even have cloudflare

lyric mountain
#

cloudflare isn't needed, it's just an easy and free way to get an ssl cert

#

and using https doesn't mean it's secure, just means it's encrypted

ancient nova
lyric mountain
#

you don't change the website at all

#

all you need to do is add your site to cloudflare, download the public and private keys, add both to their respective folders and point your webserver to the PUBLIC certificate

#

then route http to https so people get redirected if they try to access with the missing "s"

#

easier done than said tbh

ancient nova
#

I'm so confused

ancient nova
#

I've got a subdomain (butler.only-fans.club) not a domain (only-fans.club)

#

only-fans.club isn't even a thing that is just a empty proxy

lyric mountain
#

?

#

that shouldn't matter at all

#

my api site is also a subdomain and has ssl enabled

boreal iron
#

Does the nodejs process somehow store the current package.json version of the app?

lyric mountain
#

on the runtime?

ancient nova
lyric mountain
#

do you own the main domain?

ancient nova
lyric mountain
#

...did u buy another domain or are u borrowing it from someone?

ancient nova
#

but it works so ig it's fine for now

lyric mountain
#

yk domains are dirt cheap right?

ancient nova
#

how is that cheap

lyric mountain
#

freenom is never yours

ancient nova
#

huh wdym

lyric mountain
#

freenom domains can only be borrowed (in a sense), the ownership is always of freenom

boreal iron
lyric mountain
#

if you look at the source code of the site, your site is ran inside a page-sized iframe

#

it also includes a bunch of trackers and wacky metadata that prevents it from working when embedded in 99% of sites

#

plus most services straight out blacklist it since it has a loooooooooong history of scam and phishing sites

sleek pewter
#

guys i cant find my bot token tf

#

i just made it

#

where can i even see it

lyric mountain
#

you cant "see" it, only reset

#

after u reset, it'll be shown one time

sleek pewter
#

then how am it supposed to code it lmao

lyric mountain
#

after u refresh the page it'll go hidden again

sleek pewter
lyric mountain
#

yes

sleek pewter
#

alright ty

lyric mountain
#

it's literally written in the line right below "Token"

sleek pewter
#

ye just wanted to make sure

lyric mountain
#

smh

ancient nova
#

how do you do modals again?

#

I heard u can only do a modal from an interaction?

lyric mountain
#

yep

ancient nova
#

damn ok anyway how do you do that then?

lyric mountain
#

check the docs (if ur lib already supports it)

boreal iron
#

You either respond with a modal to a command interaction, button interaction or other interactions

#

Not sure if you can respond with a modal to a modal interaction but in theory it should work
Not sure if discord restricts that

ancient nova
#

I think I'll do that without the modal actually..

#

I need a little help getting that set up though
if a text is like this
"hello this is a text"
can I just take it. Use .splice(" ").
and then join it like text.join("%20");
to be
"hello%20this%20is%20a%20text"

boreal iron
#

Replacing using a regex makes more sense

#

To let double spaces or other whitespaces be replaced by one space (URL encoded) only

#

Also you can simply URL encode the entire string

#

If you don’t need to replace special chars anyways

ancient nova
#
    const textToDisplay = await awaitResponse(
        message,
        "What mesage would you like to display?"
    ).catch((err) => {});
    if (!textToDisplay || textToDisplay.length >= 1024)) {
        return message.reply({
            content: `You have not written a valid text.\nRemember that the text limit is 1024 letters!`
        });
    }
``` basically I'm getting text like this, and I would want to replace it to work with an URL like you said
boreal iron
#

URL encoding

solemn latch
ancient nova
#

how does it work?

boreal iron
#

That’s a native thing in like any programming language I know

ancient nova
#

in every language too

#

bruhh 💀

frank ermine
#

anyone else make there bot in c#

#

?

lyric mountain
#

D# is the library ur looking for

lyric mountain
#

No respectable language would force u to write ur own urlencoder

sudden geyser
#

There's no guarantee the feature comes native to the language.

#

It could be provided by the host/underlying language used.

#

(if the language even allows you to interface with it)

lyric mountain
#

those aren't respectable languages mmLol

lament rock
#

encodeURIComponent("space: string");

quartz kindle
#

uri encoding is dumb af

#

but at least is not as dumb as html entities

sharp geyser
#

So if we are thinking of what a "collector" is, isn't it just a listen to a specific event and added x amount of what is collected to a "collection" and stopping once it reaches that amount?

civic scroll
#

collector is

#

"i collect"

#

it's like funnel with some filters

sharp geyser
#

So going through with the api on my own, how would I make grouped commands e.g /player setup (player being the parent and setup the child command)

#

I'd read the documentation but I won't lie I am too lazy today to read through discord's docs

lament rock
# sharp geyser So going through with the api on my own, how would I make grouped commands e.g `...
{
    name: "playlists",
    description: "Manage and play playlists",
    category: "audio",
    options: [
        {
            name: "meta",
            description: "Metadata commands",
            type: 1,
            required: false,
            options: [
                {
                    name: "show",
                    description: "Shows all playlists. True to only show yourself",
                    type: 5,
                    required: false
                },
                {
                    name: "info",
                    description: "Shows info for a playlist",
                    type: 3,
                    required: false
                },
                {
                    name: "create",
                    description: "Creates a playlist",
                    type: 3,
                    required: false
                },
                {
                    name: "delete",
                    description: "Deletes a playlist",
                    type: 3,
                    required: false
                }
            ]
        },
        ...
#

The category prop is arbitrary on my end. Does not apply

sharp geyser
#

I see

#

So the are treated as options?

lethal obsidian
#

This is in my pom.xml:

<dependency>
    <groupId>org.discordbots</groupId>
    <artifactId>DBL-Java-Library</artifactId>
    <version>2.1.1</version>
</dependency>

I get a Missing artifact error.
Yes, this is inside <dependencies></dependencies>

lethal obsidian
sharp saddle
#

guys, firebase > mongoose or mongoose < firebase?

or SQLite wins them all

#

I'm not going to follow anyone's opinion, it's just for asking.

rose warren
#

Postgres

spark flint
#

i tried postgres

#

it was confusing

#

problem was the database kept disconnecting kek

rose warren
#

Sounds like a- sorry

spark flint
#

i gave up because its confusing

rose warren
#

What is this? darkAYA

spark flint
#

postgres hosting

rose warren
#

Just self host

spark flint
#

i also gave up with that

#

i give up easily

rose warren
#

Switching to postgres from mysql was super easy. I self-hosted both

last tapir
#

better way to do this

#
let commands = [];
bot.commands.filter(command => {
    commands.push(command.config.name);
    commands.push(command.config.aliases);
});
console.log(commands);
#

kinda long

#

also, the aliases are arrays so is there a way to concatenate its content to the array above

spark flint
#

what are you trying to do

last tapir
#

put the list of commands and its aliases in an array

spark flint
#

ah ok

feral aspen
#
bot.commands.filter(command => commands.push(command.config.name, ...command.config.aliases));
#

You can do that.

spark flint
#
let commands = []
bot.commands.map(command => {
    commands.push(command.config.name, command.config.aliases)
});```
#

was gonna suggest that lmao

feral aspen
spark flint
#

what for

feral aspen
#

You don't want nested arrays.

spark flint
last tapir
#

ay it works

spark flint
#

that won;t make a nested array though will it?

#
let arr = ['a'];
arr = [...arr, 'b', 'c', 'd'];

console.log(arr); // 👉️ ['a', 'b', 'c', 'd']``` example
#

wait wrong example

feral aspen
#

Yes, but his aliases are arrays.

spark flint
#

ah yeah good point 🗿

feral aspen
#

If we do your example, it will be:

['a', 'b', ['c'], 'd', ['e'], 'f'];
#

Supposedly, c and e being aliases.

#

We use ... to spread the arguments and put them on the top array, instead.

sour oar
#

how can I make a bot test another bot's command

#

??

earnest phoenix
#

how i can delete global slash commands

#

in discord.js v12

cinder patio
boreal iron
#

v12 uuhh

#

By doing the REST request yourself then

#

Just send an empty array

#

And all application commands are gone

boreal iron
#

Also not possible with slash commands

#

At least not in a way without breaking the TOS

sour oar
prisma laurel
boreal iron
#

That does only remove ‘em from your guild

prisma laurel
#

Yes but it remvoes slash too

#

:/

boreal iron
#

Only from your guild

#

It has no effect on the registered commands

#

They will still be pushed to new guilds

prisma laurel
#

But why your responding

#

?

boreal iron
prisma laurel
#

if (toLower === "&&help") {
return message.chanel("HI")
}

boreal iron
#

tf has this to do with modals?

#

You’re drunk or on crack?

boreal iron
#

But the bot will most likely not respond

#

Most not to say all bots usually ignore if their commands being executed by another bot

sour oar
#

ok

frank ermine
#

is that true?

boreal iron
#

Depends on the bots code

#

Technically they can

#

If you don’t check and ignore your commands being executed by a bot then other bots can

#

(except application commands aka slash commands)

sour oar
#

and how could this be done

boreal iron
#

What exactly?

#

Executing commands of other bots or blocking bots from executing commands?

earnest phoenix
#

my bot can send text messages from shortcodes now like from "55461" imagine getting a message one day

"Moderna Labs LLC
You have been detected as Patient Zero for the Covid-19 pandemic virus
You are ordered to stay where you are
We are coming to collect you, do not leave your home"

#

lul

spark flint
#

like its possible to message others from your bot?

earnest phoenix
#

no

#

the bot just sends a code for verification, i was saying "as a funny example" 😛

earnest phoenix
urban quiver
#

uhm hi

sharp saddle
#

@rose warren can you say more about it?

#

or not

#

it's busy

urban quiver
#

@sharp saddle This exits?

sharp saddle
#

man

#

server.js exists?

#

🤷

pine nova
#

man using replit for hosting 🗿

sharp saddle
#

LOL

urban quiver
#

is have problem?

proven escarp
sharp saddle
#

man

#

I meant about mongodb

#

no mongoose

boreal iron
proven escarp
solemn latch
lament rock
#

why do you of in the cold food of out eat the hot food? Just doesn't make sense to me

#

I really think my ffmpeg code is broken

#

It's entirely possible I may be doing something horribly wrong. Should the concern come down to the Buffer being flushed because I'm "reading" the stream, removing the on("data"... does not change anything.

The voice library I use internally is able to spawn FFmpeg and it works as it should, should it need to transcode

For hahas, I removed any checks for waiting for the track to start to see if it would ever start and it doesn't

Relevant Code:

logger.info(toApply);
stream.on("data", () => logger.info("stream data"));
// Managing my own pipeline to avoid double ffmpeg spawns
// toApply equals the PCM arguments voice uses internally
return resolve(new Discord.AudioResource([], [stream, new prism.FFmpeg({ args: toApply }), new prism.VolumeTransformer({ type: "s16le" }), new prism.opus.Encoder({ rate: 48000, channels: 2, frameSize: 960 })], decoded, 5));

Output (duplicate frames have been omitted and replaced with ...):

2022-08-06 08:00:38.346 INFO 6260 --- [      main] index.ts:411:3  : "Got request to load for identifier "ytsearch:XT1zqRzH1AM""
2022-08-06 08:00:38.831 INFO 6260 --- [      main] index.ts:526:51  : "Loaded track C418 - axolotl ( Minecraft 1.13 music )"
2022-08-06 08:00:38.836 INFO 6260 --- [      main] index.ts:246:2  : {"track":"QAAAgQIAJ0M0MTggLSBheG9sb3RsICggTWluZWNyYWZ0IDEuMTMgbXVzaWMgKQAENTEwawAAAAAABJ+YAAtYVDF6cVJ6SDFBTQABACdodHRwczovL3lvdXR1YmUuY29tL3dhdGNoP3Y9WFQxenFSekgxQU0AB3lvdXR1YmUAAAAAAAAAAA==","op":"play","guildId":"497159726455455754"}
2022-08-06 08:00:50.588 INFO 6260 --- [      main] index.ts:246:2  : {"timescale":{"pitch":0.8908987181403393},"op":"filters","guildId":"497159726455455754"}
2022-08-06 08:00:51.225 INFO 6260 --- [      main] worker.ts:219:13  : ["-analyzeduration","0","-loglevel","0","-f","s16le","-ar","48000","-ac","2"]
2022-08-06 08:00:51.516 INFO 6260 --- [      main] worker.ts:220:37  : "stream data"
2022-08-06 08:00:51.548 INFO 6260 --- [      main] worker.ts:220:37  : "stream data"
2022-08-06 08:00:51.553 INFO 6260 --- [      main] worker.ts:220:37  : "stream data"
...
2022-08-06 08:01:01.265 WARN 6260 --- [      main] worker.ts:296:11  : "C418 - axolotl ( Minecraft 1.13 music ) got stuck! Threshold surpassed: 10000"
mortal river
#

what the codes for custom activity in python 😉

solemn latch
mortal river
#

can i have the links?

solemn latch
#

to the python docs?

boreal iron
#

I like that TLD

pale vessel
#

.io?

boreal iron
#

Yee

#

Of course together with the hostname

#

Hmm actually not the cheapest TLD

pale vessel
#

So domain

#

I c

boreal iron
#

As I said I like the TLD

#

And yeah the domain ain’t bad, too

solemn latch
mint mulch
#

the price can vary by hundreds of dollars

#

the funny thing is .io is actually a ccTLD (country code)

#

for the Indian Ocean Territory

#

but all the tech goblins register it for reasons unrelated to the country

spark flint
#

or ooo.ooo

#

but woo as subdomain

#

woo.ooo.ooo

mint mulch
#

nah, you want a subdomain off an emoji domain 😂

#

https://💩.la is valid

spark flint
#

i have 2 emoji domains

#

http://🐺🐠.ml/

mint mulch
#

that's beautiful

earnest phoenix
spark flint
#

Wdym

wheat mesa
#

Lmfao

#

With the way he phrased it I believe he’s talking about a certain adult site

spark flint
#

Oh

boreal iron
#

Waffle and his dirty mind…

pale vessel
#

The timing

boreal iron
#

lmao

wheat mesa
#

Lmfao

#

Not my dirty mind, I could think of no other possibilities for why else he would “censor” the last thing

boreal iron
sharp geyser
spark flint
#

yes but thats not the official domain kek

sharp geyser
#

ik

sharp geyser
#

I thought the same thing

boreal iron
#

dirty boys are all around

sharp geyser
#

Let alone what we just said you got thots out there on tiktok posting thirst traps

sharp geyser
#

Okay so I am messing around with decorators in typescript right now, and so far I got it to partially work. I can assign data to a class with it, but when going to access that data later it says Property 'x' does not exist on type 'x'

#
import {
    ApplicationCommandOptionData,
    ApplicationCommandType,
    Snowflake,
} from 'discord.js';

export function SlashCommand(options: SlashCommandOptions) {
    return function (constructor: Function) {
        constructor.prototype.name = options.name;
        constructor.prototype.description = options.description;
        constructor.prototype.options = options.options;
        constructor.prototype.name_localizations = options.name_localizations;
        constructor.prototype.description_localizations =
            options.description_localizations;
        constructor.prototype.type = options.type ?? 1;
        constructor.prototype.guildIds = options.guildIds;
    };
}

interface SlashCommandOptions {
    name: string;
    type?: ApplicationCommandType;
    name_localizations?: Array<string>;
    description: string;
    description_localizations?: Array<string>;
    options?: Array<ApplicationCommandOptionData>;
    guildIds?: Array<Snowflake>;
}

This is how I currently do my decorator (properly a bad way but idk any other way)

willow aspen
#

In rare circumstances you may need to use //@ts-ignore on the line above the logic checking for that property.

sharp geyser
#
import { Command } from '../extendables';
import { CommandInteraction, Interaction } from 'discord.js';
import { SlashCommand } from '../decorators/SlashCommand';

@SlashCommand({
    name: 'test',
    description: 'something to test',
    guildIds: ['957867801119449109'],
})
export default class TestCommand extends Command {
    constructor() {
        super();
    }

    async execute(ctx: CommandInteraction) {
        await ctx.reply({ content: 'Hello World!' });
    }
}

This is how I use it

sharp geyser
#

There has to be a way to let intellisense recognize it exists

willow aspen
#

Seeing as I don't see x anywhere, not sure where that's coming from, sorry.

sharp geyser
#

one thing I could probably do is outline them on the Command class but have the values be null by default

sharp geyser
#

For example if I were to make an instance of TestCommand and try and access .name

#

it would say it doesn't exist on type Command

#

Actually I might have a fix for it

#

Yea found one

#
import {
    ApplicationCommandOptionData,
    ApplicationCommandType,
    Snowflake,
} from 'discord.js';

export abstract class Command {
    declare name: string;
    declare type?: ApplicationCommandType;
    declare name_localizations?: Array<string>;
    declare description: string;
    declare description_localizations?: Array<string>;
    declare options?: Array<ApplicationCommandOptionData>;
    declare guildIds?: Array<Snowflake>;
}

Idk if this is the most proper fix but it works

earnest phoenix
#
[Error: ENOENT: no such file or directory, open '://cdn.discordapp.com/avatars/554553279003099146/51b5f150e4686c7ab.png'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '://cdn.discordapp.com/avatars/554553279003099146/51b5f150e4686c7ab.png',
  methodName: 'constructor'
}
#

Anyone know where the error is?

proven lantern
#

how long should i retry the discord api endpoint for deferred interactions? Sometimes the call to the token endpoint fails with a 404 error, but it will be successful after a few attempts. this is my current retry logic.

const retry = require('retry');
const sendWithRetry = axiosCall => new Promise((resolve, reject) => {
    const operation = retry.operation({
        retries: 5,
        factor: 3,
        minTimeout: 1000,
        maxTimeout: 10 * 1000,
        randomize: true,
    });
    operation.attempt(async (currentAttemptNumber) => {
        try {
            await axiosCall;
            resolve();
        } catch (e) {
            if (operation.retry(e)) {
                console.log(e)
                return;
            }
            resolve();
        }
    }, reject);
});
module.exports = sendWithRetry;
#

are there cases where discord just doesn't make the endpoint available?

proven lantern
earnest phoenix
proven lantern
#

i dont use discordjs so i cant help there. many they have some upgrade docs somewhere

earnest phoenix
#

Ok, ty

proven lantern
proven lantern
earnest phoenix
lyric mountain
#

.slice(5, -20)

#

you did

#

why are u doing those processings btw?

proven lantern
# lyric mountain careful with 404 errors

i use the npm lib retry with these configs.

{
    retries: 5,
    factor: 3,
    minTimeout: 1000,
    maxTimeout: 10 * 1000,
    randomize: true,
}```
so it'll only retry 5 times over 10 seconds
lyric mountain
#

and tf is getvalueof

earnest phoenix
lyric mountain
#

since they're elligible fro 1-day ratelimit from cloudflare

lyric mountain
#

what are u doing exactly?

#

if ur showing the avatar in an embed, discord does accept webp

proven lantern
lyric mountain
#

there are 3 statuses that are elligible for CF ratelimit

earnest phoenix
#

The code is for a friend of mine who was working with me on this project, but now it is separate and does not open the Internet

#

But let me tell you it's economy and now I'm trying to call up an avatar for the person in the profile picture

proven lantern
#

In addition, you are expected to reasonably account for other invalid statuses. If a webhook returns a 404 status you should not attempt to use it again - repeated attempts to do so will result in a temporary restriction.

lyric mountain
#

but if u must, the first argument in slice is starting character

#

so 5 will cut the first 5 characters in the url

#

making it invalid cuz it'll be https

earnest phoenix
lyric mountain
#

...why are u slicing it to begin with?

#

just use the full url

earnest phoenix
lyric mountain
#

...

#

just remove that line entirely

#

also I dont think it EVER worked

earnest phoenix
# lyric mountain just remove that line entirely
Error: Could not find MIME for Buffer <null>
    at Jimp.parseBitmap (/rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/@jimp/core/dist/utils/image-bitmap.js:187:15)
    at Jimp.parseBitmap (/rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/@jimp/core/dist/index.js:431:32)
    at /rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/@jimp/core/dist/index.js:373:15
    at /rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/@jimp/core/dist/index.js:115:14
    at /rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/@jimp/core/dist/request.js:48:9
    at IncomingMessage.<anonymous> (/rbd/pnpm-volume/7463f4f6-bceb-4163-9dd8-0f0318676fb5/node_modules/phin/lib/phin.compiled.js:1:2100)
    at IncomingMessage.emit (node:events:538:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  methodName: 'constructor'
}
#

Do you know about this?

lyric mountain
#

explain to me what ur doing

pale vessel
#

Your mother

boreal iron
lyric mountain
pale vessel
#

Thanks!!

boreal iron
#

HA! IP leaked, you're done

earnest phoenix
#

ava.getBuffer(jimp.MIME_PNG, async( err, buf) => {if (err) return console.log();

from this line

lyric mountain
#

explain to me WHAT ur doing, the actual goal

#

it makes zero sense from what I can see

earnest phoenix
lyric mountain
#

I want u to explain to me what is the goal of that command

#

or whatever is that line used for

earnest phoenix
earnest phoenix
solemn latch
#

I'm not sure how you expect us to help if you dont understand the goal.

boreal iron
earnest phoenix
lyric mountain
#

don't think you should be handling the code then, bad things can happen if you don't know what you're doing

earnest phoenix
lyric mountain
#

not really, but it's impossible to help if I don't know what I'm dealing with

lyric mountain
#

slice(5, -20) makes no sense tbh, I know js allows negative indexes but that'd solve nothing

#

IF it is what I think it is, your friend is trying to process the image in some way (like resizing), but idk

#

in such case you could just append ?size=XXX to the url and let discord handle it

earnest phoenix
# lyric mountain IF it is what I think it is, your friend is trying to process the image in some ...
let Image = Canvas.Image,canvas = Canvas.createCanvas(307, 300),ctx = canvas.getContext('2d');
const rg = ["./defaultBACKGROUND.png"];
fs.readFile(`${rg[Math.floor(Math.random() * rg.length)]}`, function (err, Background) {  
if (err) return console.log(err);let BG = Canvas.Image;let ground = new Image;ground.src = Background;ctx.drawImage(ground, 0, 0, 307, 300);})/// PHOTO SIZE
let url = getvalueof.displayAvatarURL().endsWith(".webp") ? getvalueof.displayAvatarURL().slice(0, -20)  + ".png" : getvalueof.displayAvatarURL();
jimp.read(url, (err, ava) => {if (err) return console.log(err);
ava.getBuffer(jimp.MIME_PNG, async( err, buf) => {if (err) return console.log();
solemn latch
#

how does slice with a positive start and negative end even work?
it would just remove the first characters right?

lyric mountain
#

if it is like arrays, it'd reverse everything

#

like https://google.com would become sptthmoc.elgoog

solemn latch
#

some string

lyric mountain
#

so it is adding some sort of overlay to the pfp

#

or I think

#

probably a profile command

solemn latch
#

removes everything before the start number and removes x off the end

#

thats so strange

lyric mountain
#

ye, negative indexes start from the end

#

just js things

earnest phoenix
#

I found the solution!!!

#

Not that I delete a line

#

The solution is that I have completely deleted the code

sharp geyser
#

Type mismatching is a bitch

#

😔

sharp geyser
#

so yea

solemn latch
#

I'm sure its useful in some weird way

lyric mountain
#

at least the ONLY reason I could think of

sharp geyser
#

https://paste.gg/p/anonymous/7b9af4c7ae84496b98608c0a7e92866b So I am working on making a slash cmd handler and I am running into some issues with type mismatching I am unclear of what the issues are as the type defined on the docs are exactly the types I am using. https://hastebin.com/hazomugedu.typescript here is how I am doing it, These type mismatch errors are annoying asf

boreal iron
#

tf

#

is wrong with that site

sharp geyser
#

No idea but other's make it not wrap

#

so

#
TS2345: Argument of type '{ type: ApplicationCommandType | undefined; description: string; descriptionLocalizations: Partial<Record<Locale, string>> | undefined; name: string; nameLocalizations: Partial<...> | undefined; options: ApplicationCommandOptionData[] | undefined; }[]' is not assignable to parameter of type 'ApplicationCommandDataResolvable[]'.   Type '{ type: ApplicationCommandType | undefined; description: string; descriptionLocalizations: Partial<Record<Locale, string>> | undefined; name: string; nameLocalizations: Partial<...> | undefined; options: ApplicationCommandOptionData[] | undefined; }' is not assignable to type 'ApplicationCommandDataResolvable'.     Type '{ type: ApplicationCommandType | undefined; description: string; descriptionLocalizations: Partial<Record<Locale, string>> | undefined; name: string; nameLocalizations: Partial<...> | undefined; options: ApplicationCommandOptionData[] | undefined; }' is not assignable to type 'ChatInputApplicationCommandData'.       Types of property 'type' are incompatible.         Type 'ApplicationCommandType | undefined' is not assignable to type 'ApplicationCommandType.ChatInput | undefined'.           Type 'ApplicationCommandType.User' is not assignable to type 'ApplicationCommandType.ChatInput'.
lyric mountain
#

that error message is as useful as c++'s

sharp geyser
#

Why you think I am struggling to fix it

#

it makes no fucking sense

sharp geyser
# lyric mountain that error message is as useful as c++'s

Do you have any idea what this means

Types of property 'type' are incompatible.         Type 'ApplicationCommandType | undefined' is not assignable to type 'ApplicationCommandType.ChatInput | undefined'.           Type 'ApplicationCommandType.User' is not assignable to type 'ApplicationCommandType.ChatInput'.
#

This is the actual important part

#

The stuff above is typically useless junk

lyric mountain
#

don't think undefined can have a type so...

sharp geyser
#

Well it is an optional prarm

#

so it will accept it being undefined

#

or at least that is what discord and djs docs say

lyric mountain
#

idk then

sharp geyser
#

actually you are right

#

djs for some reason is treating something that can be undefined as not being allowed to be undefined

lyric mountain
#

for optional params, doesn't it just use null?

sharp geyser
#

Mmmm maybe

ancient nova
#

how to hackban?

sharp geyser
#

ban with ID

earnest phoenix
#

Good evening, is there anyone here who knows a little bit about GitHub that can help me?

rustic nova
#

ask your question right away

sharp geyser
#

Okay so I got by far the worst slash cmd handler working

#

😎

boreal iron
#

lol

sharp geyser
#

You will LOVE it

earnest phoenix
boreal iron
earnest phoenix
proven escarp
#

What is a Github script?

#

And where do these emojis come from?

boreal iron
#

fontawesome

earnest phoenix
#

GitHub code

sharp geyser
#

have fun ;)

#

Do tell me if you notice anything bad

#

Except for all of it being bad

boreal iron
#

playing atm

sharp geyser
#

damn

#

lame

proven escarp
sharp geyser
#

you never available when I do need ya

#

😔

proven escarp
sharp geyser
#

can you even change the font in a readme?

proven escarp
#

But you could use images 🤷‍♂️

solemn latch
#

Its on github, you should be able to just read the readme.md and see what they are doing.

dry imp
#

typical fake

ancient nova
boreal iron
#

does that work even exists

pale vessel
#

Exist

earnest phoenix
boreal iron
ancient nova
#

I can never get that to work

boreal iron
#

or do you rely on doing that by hand?

ancient nova
#

:Sadge:

boreal iron
#

wdym

#

Use the ban() method of the guild member manager

#

To ban the user ID

winged linden
#

yoo how can i do something similar to arg.join("_") but for the string of a slash command?

boreal iron
#

for the string of a slash command

#

for which string?

#

a command option you provide?

#

it's a string, not an array, so join() won't work here

ancient nova
#

hackban is banning someone who IS NOT in ur guild

#

and guild manager isn't a thing then

lyric mountain
#

hmmm...but isn't hackban the same as banning by id?

#

guildmanager is required since to ban you need a guild

pale vessel
#

And guild always has guild member manager

sharp geyser
boreal iron
#

Always register them in the ready event?

sharp geyser
#

Also if I post again but with different description and or name will it auto update the same one or make a dupe?

sharp geyser
#

I always add and register on ready

boreal iron
#

Oh that’s bad

sharp geyser
#

How come?

boreal iron
#

That will cause bugs with doubled commands

#

Registration is a one time process

sharp geyser
#

Mmmm so it does create dupes

#

Wanna know what

boreal iron
#

Yes even if that shouldn’t happen it still does

sharp geyser
#

Ima make a function that check and uploads

#

if it already exists it won't upload those commands

#

but if it does exist and there is changes in the data it just updates it

#

tf am I talking about command

#

I meant function

boreal iron
#

I’m fetching the application commands once the client is ready then compare ‘em to my loaded ones and register/update/delete em to the API

sharp geyser
#

Mmmm

#

Alright let me write something up real quick

boreal iron
#

Hmm how can I share a private file on GitHub?

sharp geyser
#

You could invite me to the repo

#

Other than making it public or inviting to the repo there is no way as far as I know

pale vessel
#

Or a private gist

sharp geyser
#

oh yea gist is a thing

pale vessel
#

Yeah that's the gist of it

sharp geyser
#

nice

winged linden
#

any idea why? pretty sure i have the correct path

sharp geyser
#

👀

#

Yea no

winged linden
sharp geyser
#

that is not how you traverse files

boreal iron
winged linden
#

what should i do then

sharp geyser
#

I have never seen someone do it that way

#

ever

#

are you coming from the mywallet.js file?

winged linden
#

always worked like that, moved it a little far and boom

winged linden
sharp geyser
#

../../../channels/blah

winged linden
#

sounds good, thanks man

sharp geyser
#

you can't just do ..../channels/blah

#

every 2 dots separate with a / and onlyy do it however many times you need to go back a dir

winged linden
#

ah now ik my problem lol, max number i can go is 1 file with the dots

pale vessel
winged linden
#

understandable, thanks @sharp geyser

sharp geyser
#

no problem

boreal iron
#

An already existing one

pale vessel
#

You said a file so pasting it is quite simple bro

sharp geyser
#

He is on mobile

#

he can't paste you dingus

pale vessel
#

Click raw

#

Hold, select all, and copy

#

Hold the text area and select paste

#

Publish

#

???

#

Profit

#

Ya fucking disgus

ancient nova
#
    // First of all, let's try fetching our member 
    const hackBan = false, member = message.mentions.members.first()
    || message.guild.members.cache.get(args[0])
    || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || await client.users.fetch(args[0]).then(() => { hackBan = true }).catch((err) => { hackBan = false }); if (!member) {
        return message.reply({
            content: `I was unable to fetch the mentioned member.`
        });
    };
``` idk what I'm doing
#

is this even going to work?

sharp geyser
#

What

#

the

#

fuck

ancient nova
#

I'm adding a 5th option to fetch the user by the API in order o try hack banning

#

but should I be doing client.api.users.fetch?

sharp geyser
#

I don't see why hackbanning is an isseue tbh

ancient nova
#
 if (!member.bannable && !hackBan) {
        const unableToBanEmbed = new MessageEmbed();
        unableToBanEmbed.setColor(commandColor);
        unableToBanEmbed.setTitle("Unsuccessful Operation");
        unableToBanEmbed.addField(
            "Mentioned Member",
            `${member?.user.tag ?? `${member.username}#${member.discriminator}`} (${member.id})`
        ); unableToBanEmbed.addField(
            "Perpetrator",
            `${message.author.tag} (${message.author.id})`
        ); unableToBanEmbed.addField(
            "Reason",
            `You are not able to ban that person, because they're immune/ are the staff of this server.`
        ); return message.channel.send({ embeds: [unableToBanEmbed] });
    };
#

cause then bannable isn't a property

sharp geyser
#

Then just alert the user they can't be banned

#

😎

#

hack ban is a dumb concept to begin with

ancient nova
#

they can be banned

#

so that would be lazy

boreal iron
ancient nova
#

what if you know someone will raid? why not ban them before they even join ur server?

sharp geyser
#

Banning is really meant to be done in the server

ancient nova
#

dyno has that, mee6 has that

sharp geyser
#

so there not being a bannable prop is understandable

ancient nova
#

wick has that and every other slightly larger bot I know

sharp geyser
#

Either way you are being redundant with your checks.

ancient nova
#

and I changed my bot to advertise as a auto-mod anti-raid bot

#

rather than multipurpose

pale vessel
sharp geyser
#

You are checking cache but then you have to think about what if they aren't cached

ancient nova
#

I upgraded my entire moderation system

sharp geyser
#

You are checking cache for the user dingus

#

If they don't exist in cache you won't find em

#

So you will eventually run into a problem there

ancient nova
ancient nova
#

every bot I know has a hackban feature

sharp geyser
#

How do you know someone will raid your server until they do

#

smh

ancient nova
#

whether it's built into the command or they have 2 separate commands

lyric mountain
#

my bot doesn't

#

there, now NOT every bot you know does

ancient nova
#

then it's simply not a moderator bot

lyric mountain
#

it is

sharp geyser
ancient nova
sharp geyser
#

Okay

#

But who says your bot has to be like theirs

#

be creative

#

not a machine

lyric mountain
sharp geyser
#

Anyway, your code will end up running into a problem if they are not cached

#

so

pale vessel
#

Mm yes I can't implement this feature properly, but it makes my bot creative so I'll keep it at that

sharp geyser
#

yea gl

ancient nova
lyric mountain
#

you didn't say "mod"

#

you said "big"

ancient nova
#

okay let me repeat what I said

ancient nova
#

every big moderator bot has that command

sharp geyser
#

The point was, if you try and be like every other bot your bot will fail

ancient nova
#

and since I now advertise my bot as a moderator bot

#

I have to add that command

sharp geyser
#

you don't have to

lyric mountain
#

you want to

sharp geyser
#

yea

lyric mountain
#

hackban is supposed to be a blind ban, you CANT know for certain if the id is valid or who's it

pale vessel
#

I'd just create that command and make it send a message that says "use discord's moderation feature ya dingus"

#

That's quite creative if I do say so myself

lyric mountain
#

and at the end of the day, copying big bots is just a dumb decision

#

like trying to make a copy of coke

#

if you fight in their arena you WONT win

sharp geyser
#

It only works locally

#

😎

#

Idk

lyric mountain
#

they were there first, they already have their loyal users

sharp geyser
#

some of the store brand cokes around my area aren't bad

boreal iron
#

What’s the issue of banning an user by his ID?

lyric mountain
#

tbh, I rank coke at like 5th place regarding taste

ancient nova
#

I just did await client.api.users.fetch and my bot isn't responding at all

lyric mountain
#

many local colas are way better

ancient nova
#

😭

lyric mountain
#

but coke has brand so...

ancient nova
#

I'm just going to ask wick devs how they do it

sharp geyser
#

I already tried telling oyu

#

but you seem to ignore it

lyric mountain
#

you can only fetch users your bot knows, but hackban is supposed to work when your bot doesn't knows the user

pale vessel
#

Also that is not how you use it

#

It's supposed to resemble a path with an http method last

ancient nova
#

only username id and discim

sharp geyser
#

Here's the thing

#

you can't fetch a user

pale vessel
#

How are you getting the id

sharp geyser
#

you gotta fetch a member if you wanna ban them

pale vessel
#

You don't

ancient nova
pale vessel
#

You can just provide id

sharp geyser
#

What?

pale vessel
#

It's a user resolvable

sharp geyser
#

🤔

#

Wdym

lyric mountain
#

the issue with multipurpose bots isn't that they're multipurpose, but because people try to make them similar to big bots and get overshadowed hard at that

pale vessel
#

guild.members.ban(id)

sharp geyser
#

I see

ancient nova
#

bro I just want to add a feature every bot has before trying to add something that's "innovative"

sharp geyser
#

That makes sense

ancient nova
#

that's a feature that's needed, especially for mod bots

sharp geyser
#

I mean

#

not reallyy

#

but sure

#

tbh I feel hackban is rather useless

pale vessel
#

Idek what you guys are talking about

sharp geyser
#

He wants to be able to ban a user that isn't in the server

#

or has never joined the server

pale vessel
#

Yeah just give id

lyric mountain
#

hackban is by far not needed

#

it's a convenience

sharp geyser
#

Can you ban just anyone though?

pale vessel
#

Yes

#

Even discord system

boreal iron
#

I mean … either you ban the user ID on the guild UI or simply by using the command

lyric mountain
#

discord has an id?

sharp geyser
#

I thought they had to have been at least in the server piror

pale vessel
#

Yeah they have an id

boreal iron
#

I don’t see any difference

pale vessel
#

Ban!!

#

Oh, your bot doesn't have hackban? Unfortunate

boreal iron
#

I mean somebody being able to ban users actually don’t ban random IDs he got provided by anyone

#

At least I hope so

pale vessel
#

Unless they have some kind of a grudge against that person

sharp geyser
#

imagine you can just call .ban and it bans everyone on discord from your server

boreal iron
#

Well yeah but do you need a bot command for banning just an user ID or can this be done in the guild settings, too?

pale vessel
#

Could use your own user token and make a request yourself but maybe that's not a good idea

#

You can't ban a user, only members in the official client

#

As far as I know

ancient nova
#

I can tell you a good case of how hackban can be useful

pale vessel
#

_uses alt and a VPN _

ancient nova
#

a person joins your server, spams weird shit and then you ban them.
You know they have 6 alt accounts and you ask someone to give you their IDs
you get a bot like dyno and easily ban their alts, now they can't spam weird shit anymore
congrats

pale vessel
#

Nice hackban!!

boreal iron
#

you ask someone to give you theirs IDs

sharp geyser
#

This all assumes you have their IDs

boreal iron
#

Just adds your ID as one of em

sharp geyser
#

Without the ID hackban is useless

pale vessel
#

But they'd most likely create new accounts

sharp geyser
#

and a stupid concept

#

Just ban em as it happens

pale vessel
#

I'm starting to think people only look for the hackban feature to ban the discord system for the maymays

sharp geyser
pale vessel
#

And then proceeds to kick the mod bot after that

sharp geyser
#

I didn't even know you could ban the discord system

boreal iron
#

Didn’t even know that’s an user which is part of your server

lyric mountain
#

I dont think there's ANY realistic scenario where hackban is the only option

ancient nova
#

I already have an anti spam system

#

hackban is USEFUL

#

I used it like a lot

#

I had my server raided >6 times

#

it's useful for banning raiders alt accounts

pale vessel
#

I don't know why you're still messaging

ancient nova
#

and so on

sharp geyser
#

Okay

#

But again

pale vessel
#

Just ignore them

#

And add the feature and cope

boreal iron
#

Do you try to change other people’s opinion about it?

ancient nova
#

I banned over 100 people in my server with that command

pale vessel
#

We can't convince you

boreal iron
#

I mean if you like it then use it

pale vessel
#

Yeah that's all fine and dandy

ancient nova
#

I want to use it, but I also want to have that command in my own bot

sharp geyser
#

I just want to make sure he understands that if there is no ID to be used hackbanning will become useless

#

He can use it all he likes

boreal iron
#

Well then add it as command

sharp geyser
#

but as long as he knows that much

pale vessel
#

EXACTLY

sharp geyser
#

it is fine

ancient nova
#

okay but if you have the ID then it isn't useless wtf

pale vessel
#

Add it

#

Okok

#

Oh my gosh

sharp geyser
#

Ima go watch anime

boreal iron
#

Eww

ancient nova
#

why

sharp geyser
#

Cause I can

lyric mountain
pale vessel
#

Poor man

#

I dunno, I think they came here to get help on how to ban a user by id in a guild, not to be lectured

boreal iron
#

Isn’t that always the same result?

sharp geyser
#

I only lecture fake

boreal iron
#

I’m too old to learn new tricks, boy

sharp geyser
#

Then we will have to put you down

boreal iron
#

Go on… and I will reduce your daily TV time to 0

sharp geyser
#

For long you won't even have tv time

#

I will put you in a retirement home

boreal iron
#

Tbh I don’t even have time to watch TV

sharp geyser
#

Well I guess I should finish this thing

sharp geyser
#

I can easily get the already registered commands and the ones loaded in the collection

#

My first thought was to make a nested loop and compare ids and then compare the different fields and do the appropriate action

#

but that will likely end up leading to more code than needed

boreal iron
#

I compare the fetched command name, description and options with the loaded ones

#

Then react to that

#

Really dunno how to get this GitHub shit working

#

Not sure if that works tho

sharp geyser
#

Okay so you are doing it differently than how i was about to

sharp geyser
boreal iron
#

lol I don’t care

#

Haven’t touched that in a while anyways

sharp geyser
#

alright

#

I always get consent first

boreal iron
#

Could be a lot shorter nowadays

#

Can’t even think of what you would copy

sharp geyser
#

I am mainly just copying the parts where I check if there is any commands in the guild/globally and then if there is I compare the fields to make sure if they need to be updated or not

#

else I just create them

boreal iron
#

That guild check just utilizes my command module structure

boreal iron
#

where there’s an array of guilds storing the IDs or not

lyric mountain
#

make a middleman class that has that check ran before the main scope

#

then make all your commands inherit that class

sharp geyser
#

Wym

#

I was just making it a method on my CommandsManager class

boreal iron
#

Loading the commands shouldn’t really be different to yours

#

But instead of spreading the entire module handler in parts I let most of it be written inside the event listener

#

That copy / paste gist shit is cancer

sharp geyser
#

I am just making a method called checkAndUploadCommands that will check the differences of the registered and loaded commands and do the appropriate action

boreal iron
#

Yeah first trouble I had with that was comparing the possible options

#

Since they can be nested as fucked

#

So Ben actually helped me with that neat flat method

#

And the easiest sort of comparison then was to turn the entire flattened options into a JSON string then compare em with the fetched one

#

But that’s just needed for the command options of course

#

Name and description as well as localization can be compared easily

#

But I feel like the entire command initialization is obsolete now

#

Since bulk command updates to the API are actually instant

#

(now)

#

So checking for command to register or update them might be nonsense now

ancient nova
#

@sharp geyser

#

@boreal iron

boreal iron
#

Just bulk overwriting your commands on a startup might be enough

ancient nova
#

I created the working hackban command

#

you guys wanna go over my shitty code kek

#

I just merged the hackban with the ban command tho

boreal iron
#

Not really, I’m sure you made it 100% more complicated than it needs to be

ancient nova
#

that nullifies some checks such as member.bannable

boreal iron
ancient nova
#

should I send the snippets kek

#
    // First of all, let's try fetching our member 
    let memberHackBanned = true, member = message.mentions.members.first()
    || message.guild.members.cache.get(args[0])
    || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || await client.users.fetch(args[0]).catch((err) => { memberHackBanned = false }); if (!member) {
        return message.reply({
            content: `I was unable to fetch the mentioned member.`
        });
    }; const hackBannedMemberTag = memberHackBanned 
    ? `${member.username}#${member.discriminator}` 
    : member.user.tag;

``` this is how I fetch the user
boreal iron
#

Not like it’s complicated at all to call the guild member ban method and pass an ID

ancient nova
#

I also want to fetch the user details such as the username and discrim

#

had to nullify some checks, but I'm sure it's fine since hack ban only executes if the user is not in the guild

sharp geyser
#

WEll

#

Fuck

#

me sideways

#

It doesn't update

#

😎

boreal iron
ancient nova
#

then I just check for the hack ban variable to choose which way to ban

sharp geyser
#

This looks correct no?

boreal iron
#

Oh no… I’m on mobile

ancient nova
#

misty 👀 are you using hastebin

#

last time I checked u were hating on it

sharp geyser
#

I first fetch the registered commands and loop through the commands loaded in the collection. I then loop through the guild ids if there are any and update the commands in the guild and then I do the same with global commands

sharp geyser
boreal iron
#

Like I said I haven’t touched that code in a while but should have done it

ancient nova
#

saying it's bad after toptal bought it?

sharp geyser
#

Well just from looking at the code it looks correct

lyric mountain
#

I am the one who dislikes hastebin

ancient nova
#

was that not you?

sharp geyser
ancient nova
#

ohhh

lyric mountain
#

hatebin >>>

sharp geyser
#

hatebin is broken

#

tf you mean

lyric mountain
#

really?

sharp geyser
#

Half the time it doesn't even save the paste

lyric mountain
#

damn, gotta find a new bin now

boreal iron
#

Lines like if(!guild || !guild.available) can be shorter
if(!guild?.available) for example

ancient nova
#

pastebin is my second go to

sharp geyser
#

Just make your own

lyric mountain
#

pastebin is the worst of all worlds

ancient nova
#

🤨

sharp geyser
#

I dislike using ? if I can help it tho

ancient nova
boreal iron
lyric mountain
#

you made thing optional

sharp geyser
#

Cause sometimes it fucks intellisense up

#

you boomer man may not rely on intellisense with your notepad++ coding

#

but I myself do

#

Anyway I am bored from working on this

#

so Ima take a break today

lyric mountain
#

never had issues with intellisense at groovy

sharp geyser
#

TS optional chaining sometimes fucks intellisense

#

like watch

#

nvm can't take ss

boreal iron
#

Line 48 Misty

sharp geyser
#

but anyway if you do guild?.avail available won't pop up as a suggested property

lyric mountain
#

ik what u mean, ts inherits most js issues regarding intellisense

#

just not those related to types

sharp geyser
#

what about it

boreal iron
#

Errr Wut

#

Where did my message go

#

WTF

lyric mountain
#

dementia

boreal iron
#

I clicked send and it disappeared

sharp geyser
#

Damn his condition is worse than we thought

#

What is wrong line 48?

lyric mountain
#

the numbers Mason, what do they mean?

sharp geyser
#

I didn't think anyone still remembered blackops

boreal iron
#

Same for global commands

lyric mountain
#

such a brilliant storyline

sharp geyser
boreal iron
sharp geyser
#

damn

boreal iron
#

I clicked send right in the moment you mentioned me

#

And it disappeared

lyric mountain
#

the message, is it here in this room?

boreal iron
#

No I can’t see it

lyric mountain
#

the message is not real, it cannot hurt you

boreal iron
#

Wtf stop confusing me

sharp geyser
#

Kek

#

Also Fake

#

How would you even check for a localized name?

boreal iron
#

I feel like I should rewrite the entire command initialization

lyric mountain
sharp geyser
#

Well right now I am not really supporting localization in the bot yet

#

but I will in the future

lyric mountain
#

when you do, just do a reverse check

sharp geyser
#

so I am not really worried about checking for that et

#

but the issue right now is

lyric mountain
#

like, retrieve by value instead of key

sharp geyser
#

if anything changed like the name ,description or option

#

it doesn't update client side

boreal iron
#

Wow

#

You can keep the typos

sharp geyser
#

👀 ya see it would be smart

#

if I had it setup like that

#

I currently abide by discord's structure

#

and just have an object of name/description localizations

lyric mountain
#

oh btw

boreal iron
#

The entire thing is strongly written for utilizing my structure of course

sharp geyser
#

Well yea

lyric mountain
#

don't let localization for tomorrow, do it while the bot's still fresh

boreal iron
#

But shouldn’t be hard to adapt

sharp geyser
#

It isn't

lyric mountain
#

trust me, you DONT want to localize a finished project

sharp geyser
#

if I was not so rusty with coding and js in general

ancient nova
#
    // First of all, let's try fetching our member 
    let memberHackBanned = false, member = message.mentions.members.first()
    || message.guild.members.cache.get(args[0])
    || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase())
    || await client.users.fetch(args[0]).then((member) => { memberHackBanned = true }).catch((err) => { memberHackBanned = false }); if (!member) {
        return message.reply({
            content: `I was unable to fetch the mentioned member.`
        });
    }; const hackBannedMemberTag = memberHackBanned 
    ? `${member?.username}#${member?.discriminator}` 
    : member?.user.tag;

``` I changed it a little bit because it started hack banning on mention which made permission checks such as member.bannable not work
boreal iron
#

But like I said it really needs an update

ancient nova
#

it's fixed now

sharp geyser
#

;)

ancient nova
#

now it works properly

sharp geyser
ancient nova
#

hackban and normal ban in one command

sharp geyser
#

I just wanna get a working product first

#

:^)

boreal iron
#

What a mess

lyric mountain
#

I just let people define aliases themselves

boreal iron
#

Aliases wtf

lyric mountain
sharp geyser
boreal iron
#

I’m talking about app commands

sharp geyser
#

This is getting to be a headache

#

Matter of fact

#

fuck them people

#

just read the name in english and description in whatever

lyric mountain
#

guild slashes

boreal iron
#

While descriptions can of course be localized

sharp geyser
#

Yea and still not updating

#

Can you edit the name of a command?

boreal iron
#

But localizing the command name somehow is confusing as not everyone in guilds usually uses that set up language

sharp geyser
#

or does discord not allow you

boreal iron
#

I think that requires you to register that new command (name)

sharp geyser
#

Mmm

#

Well either way

#

even chaning the description of a command

boreal iron
#

You can also update commands by using its application command ID

sharp geyser
#

doesn't update it

#

so I think my code is broken

sharp geyser
boreal iron
#

Probably

lyric mountain
sharp geyser
#

too tired to do it now

boreal iron
#

Shall I send this thing again?

#

To compare the code?

sharp geyser
#

nah its good

#

I am tired

#

I got work tomorrow

#

:p

boreal iron
#

Because the shared link is already dead

#

Well ok

sharp geyser
#

We can do it another time

boreal iron
#

Ok

sharp geyser
#

@lyric mountain Oka so I have crowdin

#

and made a project

boreal iron
#

Maybe I’m going to improve it before that

sharp geyser
#

If you do let me know :p

#

Saves me from doing it

boreal iron
sharp geyser
#

Idk when I will be able to work on this next

#

I got work tomorrow and monday

#

😔

boreal iron
#

Poor boy, I’m just working every day

sharp geyser
#

I am only sad

#

cause they didn't give me more hours

#

mfs only gave me 20

#

still roughly 1-1.2k a month

boreal iron
#

Keep my mine in mind