#development

1 messages Β· Page 1851 of 1

earnest phoenix
#

Looks noice

solemn latch
#

@long crow please no ads

long crow
#

It not even ads? it a website

knotty steeple
#

ur advertising ur website πŸ™ƒ

long crow
#

ok then

earnest phoenix
#

I thought it was a nice example of what you can do with github pages but I see how it can be an ad

long crow
#

how am I going to ask what to improve on it then? Like the align so far left and the widget so messed up

knotty steeple
#

u didnt ask for that tho it was out of nowhere

wraith urchin
#

daaaaang boi πŸ˜” looks like jibakoma had too many bags of sugar last night πŸ˜” working to fix this

knotty steeple
#

@solemn latch

solemn latch
#

damn

long crow
#

Ok, how do I make it center?

#

or more specifically what are the css keyword on the alignment I need to look into?

solemn latch
#

flexbox

earnest phoenix
#

@quartz kindle morse code translator works

#

I also wont be handling spaces between dots and dashes to form letters properly

#

As its their fault if they don't do it properly

#

I got it working for numbers, and punctuation as well

#

:o

simple stump
#

I'm trying to get two user's nick/display name and change it, but getting the name's ends up throwing an error. On top of that, the first user is always undefined for some reason. I printed out the argument and it prints out correctly, and the bot is Admin which is strange.
Code:

var user = message.guild.members.cache.get(args[1]);
var user2 = message.guild.members.cache.get(args[2]);
            
message.reply("Display name of user1: " + user.displayName);
message.reply("Display name of user2: " + user2.displayName);

error: https://sourceb.in/AXhIyvbYYY

earnest phoenix
#

is args[1] and args[2] actual user ids

#

and if so do you have the GUILD_MEMBERS intent enabled cause it might be a caching issue

simple stump
pale vessel
#

if you're using IDs might as well use members.fetch(id)

#

also please call it member and member2

#

users are different than members

earnest phoenix
#

isn't there a partial you need to enable as well along with fetching

pale vessel
#

nay

#

fetch returns full member object

earnest phoenix
#

Mmm

#

I heard it is still good to enable it tho

simple stump
#

I'm trying to get two user's nick/display name and change it, but getting the names just return undefined.
Code:

var user = message.guild.members.fetch(args[1]);
var user2 = message.guild.members.fetch(args[2]);

message.reply("Display name of user1: " + user.displayName);
message.reply("Display name of user2: " + user2.displayName);
lyric mountain
#

Var

simple stump
#

i tried cache.get as well

#

it returns undefined as well

earnest phoenix
#

did you not read what I said

#

It returns a promise

#

So you have to resolve said promise

simple stump
#

ah alr

winged mulch
#

How do bots scan for nsfw images? nsfwjs?

#

nsfwjs might be too heavy to run, I don't know

lyric mountain
#

Well...imagem sampling maybe? There's not really a "lightweight" option when it comes to image-related stuff

winged mulch
#
Host: 80R9 Lenovo ideapad 100S-14IBR 
Kernel: 5.4.0-81-generic 
Uptime: 3 days, 7 hours, 8 mins 
Packages: 2061 (dpkg), 3 (snap) 
Shell: bash 5.0.17 
Resolution: 1366x768 
Terminal: /dev/pts/0 
CPU: Intel Celeron N3060 (2) @ 2.480GHz 
GPU: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx 
Memory: 1072MiB / 1835MiB 
#

With these specs

#

Top-notch, yes I know

lyric mountain
#

Not the worst I've seen

#

But why aren't you running your bot headless?

winged mulch
#

Headless?

lyric mountain
#

Ye like, CLI-only

winged mulch
#

Oh. For some reason, I can't get WI-FI to work with Ubuntu Server. It only works with the flavors of Ubuntu. I don't know why

long crow
#

Gah, finally fkin done with css

lyric mountain
#

Visual interface is entirely optional

#

And tbf, graphical rendering takes a HUGE chunk of the processing power

earnest phoenix
#

nsfwjs is not that heavy iirc

winged mulch
#

"Headless" means no GUI?

lyric mountain
#

Ye

winged mulch
#

I'd love to install an OS without a GUI so I can use all of the RAM

#

I tried purging lxqt (the desktop lubuntu uses) and that didn't go too well after a while

lyric mountain
#

The message before edit was valid too

knotty steeple
#

probably cuz u have to set it up

lyric mountain
knotty steeple
#

also use debian for ur server please

wind vault
#

Hi

earnest phoenix
#

bye

wind vault
#

WhatΒ΄s the error?

earnest phoenix
#

Who knows cant even see the error

winged mulch
earnest phoenix
#

text is so small

knotty steeple
#

yea sounds like a skill issue

winged mulch
#

Yeah ok

wind vault
#

I'm just starting, he's small, can you help me ???

#

@earnest phoenix

earnest phoenix
#

Can you not send a screenshot of shit

knotty steeple
#

@wind vault complete the if statement

earnest phoenix
#

and send the error in the chat along with the code

knotty steeple
#

at line 14

earnest phoenix
#

For me its extremely small

lyric mountain
knotty steeple
#

either remove it or make it an empty return

wind vault
#

Can you relax? I have done nothing to you @earnest phoenix

lyric mountain
#

Oh wait, got the wrong error

knotty steeple
#

I said the solution already

lyric mountain
#

And btw, message.author returns an user not a member

#

You don't want to mix types

earnest phoenix
#

that error occurs cause of the if statement not being complete I think

knotty steeple
#

complete the if statement at line 14 by making it an empty return

#

or doing something with it

wind vault
#

Thanks

#

I going to try

worn sonnet
#
def make_comments():
    #some code
    make_comments()```
#

is this what they call recursion?

knotty steeple
#

yep

worn sonnet
#

is it same for every language or just for python its easy?

knotty steeple
#

every

#

I stack overflowed rust like that easy

earnest phoenix
#

what should if do If I want to make a condition when someone uses a command and they don't have permission

#

so I want the bot to reply with : like you don't have permission

lethal trout
#

hey i am making a lockdown command.
how can i make it like instead of removing message perms from everyone role
i want it to remove from all roles

blissful coral
#

what lib

earnest phoenix
#

That sounds spammy

blissful coral
#

Actually yeah it would be a lil spammy

earnest phoenix
#

you could add a timer in between roles ig

blissful coral
#

yeah

bright thorn
#

how can i solve this in lavalink

wary flame
#

How are you looking up the track?

bright thorn
#

all track got stuck be like this

wary flame
#

How are you searching for the track

bright thorn
#

youtube

wary flame
#

did you suffix your search query with yt:

bright thorn
#

yeah

wary flame
#

Do other search providers work (like soundcloud)

bright thorn
#

no

wary flame
#

What version of lavalink are you using?

lethal trout
#

Code:

const guild = interaction.guild.id;
        const role = guild.roles.cache
        const perms = role.permissions.toArray();```

Error:

const role = guild.roles.cache
^

TypeError: Cannot read property 'cache' of undefined```

wary flame
#

guild is a string

#

not a Guild instance

#

you're assigning interaction.guild.id to the guild variable

#

remove the .id

earnest phoenix
tropic yacht
#

I'm trying to move a "large" amount of people spread across two voice channels into a common waiting room voice channel.

@bot.commands()
async def move_to_waiting(ctx, pair_number: int):
  # voice_channels is a list of a pair of voice channels
  # [ (vcA, vcB), (vcC, vcD), etc ]
  vc_list = voice_channels[pair_number]
  
  for vc in vc_list:
    # move all members in this vc to the waiting vc
    for member in vc.members:

      try:
        await member.move_to(waiting_room_vc)

      except discord.HTTPException:
        # if the bot couldn't move the person because they already left the vc
        print(f"Couldn't move {member.name}")

  print("Finished moving all members")

However, this only works if there are 10 or less members in the voice channels that I'm moving them from. I.e. if there are 12 members in the voice channels, then it only moves 10 members and leaves 2 behind.
Why?

rose warren
#

Are you getting rate limited maybe?

tropic yacht
#

how could i check?

rose warren
#

I don't know python unfortunately

blissful coral
#

voice channel rate limits are very hefty I will say

tropic yacht
#

i did try adding in asyncio.sleep() in between each member.move_to() attempt, but it still only moved 10 people

remote nest
#

how to make vote forced commands

earnest phoenix
#

you dont

remote nest
#

what?

earnest phoenix
#

You dont

#

vote commands suck

#

and are bad practice

pale vessel
#

no

#

use the API

remote nest
#

yes you can I am asking how

remote nest
pale vessel
remote nest
#

I mean the code

pale vessel
#

what programming lang are you using?

remote nest
pale vessel
#

use the topggpy module

remote nest
#

I am already

earnest phoenix
#

what is that

pale vessel
#

Provide a user ID and it'll give you a boolean

#

if it's True then the user has voted your bot the past 12 hours

slender thistle
#

DBLPY topggAngry

pale vessel
#

looks like a mirror

slender thistle
#

Nah not a mirror

#

I updated dblpy docs when migrating to topggpy

remote nest
#

Command raised an exception: AttributeError: 'Context' object has no attribute '_ensure_bot_user'
<class 'discord.ext.commands.errors.CommandInvokeError'>

#

I am getting this error

slender thistle
remote nest
# slender thistle Show code
@client.command()
async def get_user_vote(self, user_id: int) -> bool:
  await self._ensure_bot_user()
  data = await self.http.get_user_vote(self.bot_id, user_id)
  return bool(data['voted'])
#

I will upgrade it later

#

I just want to make a command like

#

!voted
bot responds: yes/no

slender thistle
#

You...

#

No...

#

Don't touch topggpy code

remote nest
#

what do you mean

#

what should I do

slender thistle
#
topgg_client - topgg.DBLClient(...)

@client.command()
async def your_command(ctx, user_id: int) -> bool:
    voted = await topgg_client.get_user_vote(user_id)
    ...
remote nest
#

thanks let me try it

remote nest
slender thistle
#

Just ask it

remote nest
#

how do I import topgg_client and topgg.DBLClient

slender thistle
#

wdym import topgg_client

#

It's a variable that's declared right there at the top

#

You import topgg and access it DBLClient member

remote nest
#

I have imported topgg

tropic yacht
#

shouldn't it be topgg_client = topgg.DBLClient(...)?

#

similar to client = discord.Bot(...)

remote nest
slender thistle
#

DBLClien

remote nest
#

OWWWWWWWWWWWW

#

that t

slender thistle
#

t

#

You had one job 😭

remote nest
#

why do I feel like making my second class math homework with my dad?

#

I am not crying

#

there is dust in my eyes

tropic yacht
#

so i figured out that discord py has a bot.is_ws_ratelimited() method xd. i don't have the people to check if i'm getting rate limited rn tho

errant flax
#

get ratelimited then/j e_lenny

remote nest
#

still not working

slender thistle
remote nest
#

😦

slender thistle
#

Other than guild members fetching I don't remember what's there to it KEKW

tropic yacht
#

not sure how to proceed with my issue then
if i am getting limited -> how do i change my code to not get limited
if i'm not getting limited -> wtf?

remote nest
#

my code

topgg_client = topgg.DBLClient
@client.command()
async def check(ctx, user_id: int) -> bool:
    voted = await topgg_client.get_user_vote(user_id)

my input: !check 778662114663071765

error:Command raised an exception: TypeError: get_user_vote() missing 1 required positional argument: 'user_id'

slender thistle
#

Please learn the basics of OOP

remote nest
slender thistle
#

The (...) in my example meant that you need to instantiate DBLClient with according parameters

#

You're trying to blindly glue crap together until it works, not learn how OOP works

tropic yacht
#

DBLClient(...) i'm assuming required some sort of key that you get from topgg website, similar to you needing a key for your discord bot. I think i remember from the DBL days that you also need to DBLClient().run() as well?

slender thistle
#

That was never a thing, you're probably confusing it with WebhookManager

earnest phoenix
#

hi shiv

slender thistle
#

who r u

earnest phoenix
#

dang

slender thistle
#

Hi

#

Yes

earnest phoenix
#

;c

slender thistle
#

I'm joking

#

:pat:

earnest phoenix
#

I got part of the morse code translator to work

#

I can translate letters, periods, commas, dashes, etc as well as numbers

slender thistle
#

pgeoy

#

pogey

#

good job

earnest phoenix
#

ye

#

Only issue is I have yet to figure out how to do the opposite

#

Translate english to morse code

tropic yacht
#

dictionary look up?

errant flax
earnest phoenix
#

Object Oriented Programming

errant flax
#

what does that mean?

earnest phoenix
#

Google it

#

im not google

errant flax
#

yes u r MistyyBoi

tropic yacht
#

It's the way you're supposed to code. it's like english: the way you're supposed to structure sentences

earnest phoenix
slender thistle
#

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods).

earnest phoenix
#

with go I have no idea how I would do that

echo jasper
#

-p αž’αž…αŸαžαž“αžΆ

acoustic reef
#

My discord.py bot is online but it doesn't respond to any of the commands, any solutions?

inner zealot
#

how do i make a command for only who voted to my bot using py and replit?

remote nest
remote nest
errant flax
#

and listen for a webhook from topgg and saved that to the db

#

then compare it if they recently voted the last 12 hours

inner zealot
inner zealot
errant flax
#

replit supports database wdym?

near stratus
#

Also you can use SQLite everywhere

near stratus
inner zealot
#

i need to set-up db and to set-up it i need to run this commands but i can't in replit

errant flax
#

just copy the code manually

errant flax
#

or that

remote nest
inner zealot
near stratus
#

np

delicate shore
#

Hey guys

#

what are some website I can use for Making Documentation for my API

delicate shore
#

I currently use gitbook
I want some website that can help me make these type of docs but with more options - https://docs.pgamerx.com

delicate shore
earnest phoenix
#

hello right text in big front on top.gg

pale vessel
#

Pardon?

#

You want to make the right text big font in your Top.gg bot description? Is that it?

earnest phoenix
#

ya

#

i need wright titile

#

for my command of bot

earnest phoenix
pale vessel
#

Use CSS

hexed sedge
#

Anyone know vue?

#

Specifically, one of its plugins called vue-router

earnest phoenix
clear marlin
#

yeah

#

@hexed sedge

hexed sedge
#

you know vue-router, right?

clear marlin
#

mhm

hexed sedge
#

I need to make a website that uses discord oauth2, and when I try to use the oauth link, everything works till the url, which looks something like this:
localhost:8080/?code=oauth2code#/login

#

And I realised that even when I go to the main page, the url changes to this: localhost:8080/#/

#

And I dont know about you, but I want the ?code thing at the end, near login and not in the middle of the url

clear marlin
#

What are you using for the oauth2 process?

#

Like what package/library

earnest phoenix
#

well, that structure just seems wrong to begin with

#

Usually you'd give it a callback url to redirect to

#

which then processes the code to get the access token to store in cookie or smth then redirect back to the home page

#

Thats how I do it at least,

clear marlin
#

that's what you set as a redirect from discord

earnest phoenix
#

Indeed

clear marlin
#

yes

earnest phoenix
#

Your login route would simply redirect to the oauth2 page and wait for them to authorize which would then redirect to the callback url to process the code given and save the access token and then redirect to the home page fully authed

hexed sedge
#

Then I should probably follow that

hexed sedge
earnest phoenix
#

Well

#

you don't have to

#

its completely fine doing everything yourself

#

but some people use passport

#

I typically do it myself

hexed sedge
#

Yeah, I was having a look at the discordjs.guide website

clear marlin
#

you don't really need to use a package.

earnest phoenix
#

djs example is pretty bad

clear marlin
#

lmao, yes.

earnest phoenix
#

I never liked it

clear marlin
#

if you do use a package

#

passport would be the best

earnest phoenix
#

well I wouldn't say the best

#

but its usable

#

Passport likes to withhold some stuff

#

I've noticed it doesn't give you a expiration of the access token which ig isn't that important really

clear marlin
#

actually completely depends on you, if you want to cache the token, or store it as a cookie or use jwt as a base

earnest phoenix
#

Yea

#

I like using jwt tokens sometimes

clear marlin
#

I prefer jwt too

earnest phoenix
#

they are easy to use

hexed sedge
#

I have no idea how to do any of that ngllll

earnest phoenix
#

lel

clear marlin
#

kek

earnest phoenix
#

It takes some learning indeed

clear marlin
#

Tbh I prefer react to vuejs

earnest phoenix
#

Just follow discords docs on oauth2

#

its rather straight forward after a while of reading

#

like title

#

how add text like this bot page

#

getting startes , advance like stuff

#

hi! ho to host my website on a vps ubuntu? can anyone send me the tutorial please?

earnest phoenix
#

ok

rose warren
earnest phoenix
#

Mac can you help me?

novel jetty
quartz kindle
#

for example nginx, apache, litespeed, node.js, flask, sanic, etc...

earnest phoenix
quartz kindle
#

google nginx tutorial

quartz kindle
#

roles require manage roles

earnest phoenix
rose warren
#

Try it and see

earnest phoenix
#

ok

#

ya it works

earnest phoenix
#

thats a thing?

earnest phoenix
novel jetty
earnest phoenix
#

and breath

rose warren
quartz kindle
earnest phoenix
#

oof

novel jetty
quartz kindle
#

console.log right before each api calls and see which one is throwing the error

slender thistle
#

GTTA G FAST

modest maple
#

Ill give you fast

cinder patio
#

Someone should give you a windows license

modest maple
#

ik

pale vessel
#

^

modest maple
#

someone donate πŸ‘Œ

pale vessel
#

This man deserves one for sure

delicate shore
#

What are best tools for API documentation

#

except Swagger and Gitbook

pale vessel
#

Apiary

modest maple
#

swagger hahayes

earnest phoenix
#

DOES SOMEONE

#

USE

#

DISLASH HERE

split hazel
#

PROBABLY NOT BUT WE CAN STILL TRY HELP YOU

#

sorry caps got stuck

quartz kindle
rose warren
#

@quartz kindle can i have the link for node v16.6 on replit for a friend please? They're getting into bot dev and want to run djs v13 on replit.

quartz kindle
rose warren
#

Thank you!

quartz kindle
#

if you get disk quota exceeded, reload the page and try again

#

because the nix script has to download the entire nix unstable repo lol, since the built-in repo only has node 16.4

modest maple
#

whats so special about .6

quartz kindle
#

djs v13 requires it

#

other than that not much

rose warren
#

It runs djs v13

#

Thanks for the tips Tim! Much appreciated!

solemn latch
#

This may be your best work yet tim

timber fractal
#

so i use this to get the user for my ban command, js let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]); but when i try to define userTag like this js const userTag = user.tag; it says cannot read property tag of undefined, can someone help?

rose warren
#

I don't know it's a toss up between that and djs-light dog_Joy

earnest phoenix
#

ALT+F4 Play

timber fractal
#

cannot read property user of undefined

#

i tried already too

rose warren
#

Your user variable is getting a member

timber fractal
#

thats right

rose warren
#

I'm pretty sure tag isn't a property on member iirc?

timber fractal
#

no ofc not but what you said also didnt work

#

and idk how i canfix

solemn latch
#

Are you mentioning the user in your test or using the id?

timber fractal
#

mention

solemn latch
#

The person you are mentioning is in the server?

timber fractal
#

yep

rose warren
#

Try logging the user to see what comes up

timber fractal
#

may i ask, what does that help

pale vessel
#

user of undefined

#

so it's undefined

rose warren
#

Yeah it is lol

timber fractal
#

yeah but how can it be undefined

pale vessel
#

ask the discord.js gods

rose warren
#

Are you sure you're not mentioning a role?

timber fractal
#

@vale kitejs-god

solemn latch
#

Well it can be if you use an ID, as you are using get not fetch

timber fractal
#

i didnt do that

#

wtf

timber fractal
#

huh

#

the user has been banned

pale vessel
#

lol

timber fractal
#

my client sucks

rose warren
#

App cache

solemn latch
#

Kek

timber fractal
#

lmfao

solemn latch
#

Because of those cases, I'd actually prefer getting the user rather than member, then "hack banning" them

timber fractal
#

works perfectly now while i didnt change it

timber fractal
solemn latch
#

Hmm, weird

burnt anchor
#

CODE

const { MessageEmbed, Client, Message } = require('discord.js');
module.exports = {
    name: 'showemojis',
    description: 'Shows the emojis in the guild.',
    async execute(msg, args, Discord, Client){
        console.log("Emoji")
        let Emojis="";
        let EmojisAnimated="";
        let EmojiCount = 0;
        let Animated = 0;
        let OverallEmojis = 0;
        function Emoji(id){
            return Client.emojis.cache.get(id).toString()
        }
        msg.guild.emojis.cache.forEach(emoji=>{
            OverallEmojis++;
            if(emoji.animated){
                Animated++;
                EmojisAnimated+=Emoji(emoji.id)
            }else{
                EmojiCount++;
                Emojis+=Emoji(emoji.id)
            }
        })
        let Embed = new MessageEmbed()
        .setColor('#FFFFFF')
        .setTitle(`Emojis in ${msg.guild.name}`)
        .setDescription(`**Animated [${Animated}]**:\n${EmojisAnimated}\n\n**Standart [${EmojiCount}]**:\n${Emojis}\n\n**Over all emojis [${OverallEmojis}]`)
        msg.channel.send(Embed)
  }
}
#

ERROR

C:\Users\Mustikk\Desktop\Projects\Lxyon\node_modules\discord.js\src\rest\RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (C:\Users\Mustikk\Desktop\Projects\Lxyon\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\Mustikk\Desktop\Projects\Lxyon\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async TextChannel.send (C:\Users\Mustikk\Desktop\Projects\Lxyon\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/878369729331462187/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}
#

what i need to do

#

;-;

lament rock
#

channel.send({ embeds: [Embed] })

novel jetty
#

My Bot shows the wrong number of serving users, how can i fix? The serving users should be 60k+ but it's showing 100 only
Code: https://starb.in/mMe4oU.js

quartz kindle
#

client.users.cache only contains cached users

#

which are users who are active after your bot starts

novel jetty
#

How can i make it show all users?

quartz kindle
#

to get a grand total of all users, including duplicates and bots, you can use guild.memberCount

#

you need to loop over all guilds and add their memberCounts together

quartz kindle
#

for example js let total = 0; client.guilds.cache.forEach(guild => total += guild.memberCount); or ```js
let total = client.guilds.cache.reduce((total, guild) => total + guild.memberCount , 0)

novel jetty
#

Like this here right?

quartz kindle
#

yes you can do that

novel jetty
quartz kindle
#

total

novel jetty
#

It works

#

Thanks!

crystal wigeon
#

is it possible to change embed background?

tulip ledge
#

How would I generate an array with {x: x, y: y} that when looped over generates a curve?

quartz kindle
#

what kind of curve?

tulip ledge
#

Basically my friend wants me to generate a 2d ocean and I have no clue how to start

#
    "maxDepth":  15, // It can’t go deeper than 15 blocks
    "minDepth": { // In this example, after 10 blocks into the biome, it should be at least 5 blocks deep
      "startAfterBlocks": 10,
      "minDepth": 5
    },

He provided me with this

novel jetty
#

Not sure why this error keeps on poping out of no where, and i don know what file is having issue

/app/node_modules/discord.js/src/util/Util.js:414
    if (!allowEmpty && data.length === 0) throw new error(errorMessage);
                                                ^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
    at Function.verifyString (/app/node_modules/discord.js/src/util/Util.js:414:49)
    at Function.normalizeField (/app/node_modules/discord.js/src/structures/MessageEmbed.js:443:19)
    at /app/node_modules/discord.js/src/structures/MessageEmbed.js:464:14
    at Array.map (<anonymous>)
    at Function.normalizeFields (/app/node_modules/discord.js/src/structures/MessageEmbed.js:463:8)
    at MessageEmbed.addFields (/app/node_modules/discord.js/src/structures/MessageEmbed.js:286:42)
    at MessageEmbed.addField (/app/node_modules/discord.js/src/structures/MessageEmbed.js:277:17)
    at Client.<anonymous> (/app/src/events/messageDelete.ts:16:14)
    at step (/app/src/events/messageDelete.ts:33:23)
    at Object.next (/app/src/events/messageDelete.ts:14:53)
    at fulfilled (/app/src/events/messageDelete.ts:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  [Symbol(code)]: 'EMBED_FIELD_VALUE'
}
[nodemon] app crashed - waiting for file changes before starting...
tulip ledge
#

src/events/messageDelete.ts:16:14

#

One of your embed's fields is an epty string

novel jetty
#

This?

tulip ledge
#

message.content is empty

#

You can say <string> message.content.length > 0 ? message.content : "No content found."

#

wait no

#

Nvm that won't work

novel jetty
#

Hmm

#

How can i fill it?

tulip ledge
#

wdym fill?

novel jetty
#

Its empty

tulip ledge
#

You can't fill it

#

You have to check if it's empty or not

#

and if it is empty put something in there like "No content found."

novel jetty
#
.addField("Content", message.content as string || "No content found")
#

Like this?

tulip ledge
#

I think that should work unless typescript does something weird with the as string

novel jetty
#

Hmm

split hazel
#

whats the point in as <type>

#

cant you just use normal casting (<type>)

tulip ledge
#

yeah I use that instead of as type but they both work

quartz kindle
#

yo regex masters

#

how to i reverse this?

#

it want to match all versions that are not 16.7.0

sacred aurora
quartz kindle
#

nop

sacred aurora
#

.node-v(?!16.7.0).*-linux-x64

#

that seems to work

timber fractal
#

why doesnt this code let people who have one of the two id's ban staff? js if(message.author.id !== '829257224181383179' || message.author.id !== '707512325740953690') { if(user.roles.cache.some(r => r.id === '831079814735200303') || user.roles.cache.some(r => r.id === '831079814735200302')) return message.channel.send(`You can't ban staff!`).then(message.delete()).then(console.log(`${message.author.tag} tried to ban a staff member!`)); }

sacred aurora
#

wut

timber fractal
#

it first checks if the user doesnt have one of the two ids if they dont it checks if the victim has a staff role if they have a staff role they say you cant ban staff

runic depot
#

ummm, i couldn't find apps docs, can someone send it here?

sacred aurora
quartz kindle
sacred aurora
#

hmm i thought it works dang

pale vessel
runic depot
#

thanks

azure lark
#

is it possible to use any other way to see who delete a message other then using the audit logs as they are not updating

quartz kindle
#

find -maxdepth 1 -type d -regex '.*node-.*-linux-x64.*' -not -regex '.*node-v16.7.0-linux-x64.*'

#

regex with -not regex lul

sacred aurora
#

bruh

sacred aurora
#

use and instead of or in the first if statement

near stratus
# timber fractal can someone help?

are you sure it should be !== and not ===
Because

if(id === "100"){
  //The guy with id 100 gets in
}
if(id !== "100"){
  //everyone except the guy with id 100 gets in
}
latent heron
#

The rarest of moments

#

Seeing Tim ask for help

quartz kindle
#

i suck at regex

#

fucking alien language

#

and even when i ask for help, i end up fixing it myself lel

earnest phoenix
#

Hello can i find a example code of mute, unmute etk

sudden geyser
#

Google is your best friend.

earnest phoenix
#

Its not my friend πŸ™‚

#

My ip in bot list what

sudden geyser
#

Then become friends with it.

latent heron
#

it is now

runic depot
#

so you're lonely

latent heron
#

i like making out with google

#

but google doesn't use tongue 😠

sudden geyser
#

Don't worry the giant G already knows everything about you

earnest phoenix
#

Oh shit

sudden geyser
#

In fact you're already friends at this point

earnest phoenix
#

0_0

crimson vapor
earnest phoenix
#

No no no

latent heron
earnest phoenix
#

github is my best friend

latent heron
#

google hot 😍

earnest phoenix
#

ye

sudden geyser
#

GDPR walks in

tulip ledge
earnest phoenix
#

because it is so necessary

latent heron
#

I like how PHP comes before Dpy and Djs

#

even google knows what's better for your health

earnest phoenix
#

ahaha

tulip ledge
#

Also, since when are Dpy and Djs languages? think_bold

misty sigil
#

whta

cinder patio
#

who uses php unironically

misty sigil
#

what

latent heron
#

what

misty sigil
latent heron
#

i would write it

#

haha jk..

earnest phoenix
latent heron
#

unless?

sudden geyser
latent heron
earnest phoenix
#

im not a dev but i think the path to /servers/new is blocked

earnest phoenix
#

i looked at the 500 error and found something

#

im learning html

tulip ledge
#

uhu

#

but what's the issue? I'm confused

earnest phoenix
#

something may be blocking it

tulip ledge
#

blockign what

earnest phoenix
tulip ledge
#

works fine for me

earnest phoenix
#

not for me

tulip ledge
earnest phoenix
#

yeah i tried that

#

How can you rewrite a command from cogs just to a regular command?

#

I need remove self ?

#

Or more?

feral aspen
#

Hey.. is it possible to remove the unused variable and switch it from:

const newInventory = new Inventory({
    userID: interaction.member.id,
    inventory: {
        ['upgrades']: (upgrade >= 1 && upgrade <= 10) ? 1 : 0,
        ['mysterybox']: received === true ? 1 : 0
    },
}).save().catch(err => console.log(err));
``` to..
```js
new Inventory({
    userID: interaction.member.id,
    inventory: {
        ['upgrades']: (upgrade >= 1 && upgrade <= 10) ? 1 : 0,
        ['mysterybox']: received === true ? 1 : 0
    },
}).save().catch(err => console.log(err));

.. since I am not using the variable anywhere but saving it.

earnest phoenix
#

discord py lib.

#

no js

feral aspen
sudden geyser
#

By the way, you could pass the condition of the ternary to Number to get 1 for true and 0 for false.

Number(upgrade >= 1 && upgrade <= 10)
feral aspen
#

To not define a variable when creating a new class instance just to use it to .save(), right?.

sudden geyser
#

Yeah, you don't need to assign it to a variable

feral aspen
#

Sweet. πŸ‘

earnest phoenix
#

How can i rewrite a command from cogs just to a regural

#

I have this:

#
 @commands.command(name='kick', pass_context=True)
    @commands.has_permissions(kick_members=True)
    async def kick(self, context, member: discord.Member, *, reason="Not specified"):
        """
        Kick a user out of the server.
        """
        if member.guild_permissions.administrator:
            embed = discord.Embed(
                title="Error!",
                description="User has Admin permissions.",
                color=0xE02B2B
            )
            await context.send(embed=embed)
        else:
            try:
                await member.kick(reason=reason)
                embed = discord.Embed(
                    title="User Kicked!",
                    description=f"**{member}** was kicked by **{context.message.author}**!",
                    color=0x42F56C
                )
                embed.add_field(
                    name="Reason:",
                    value=reason
                )
                await context.send(embed=embed)
                try:
                    await member.send(
                        f"You were kicked by **{context.message.author}**!\nReason: {reason}"
                    )
                except:
                    pass
            except:
                embed = discord.Embed(
                    title="Error!",
                    description="An error occurred while trying to kick the user. Make sure my role is above the role of the user you want to kick.",
                    color=0xE02B2B
                )
                await context.message.channel.send(embed=embed)
sudden geyser
earnest phoenix
#

i dont see not regular functions

slender thistle
#

Move it away from a cog

#

Apply a @<Client>.command(...) where <Client> is your client object

#

As opposed to @commands.command(...)

raw gust
#

Is there a way to compare input with data? For example I have: who am I it will give an answer, and who am I? It also gives the same answer as the one above

#

I'm coding like the chatbot API

near stratus
near stratus
#

np

feral aspen
#

I have a command which is !daily and every time you use it under the next 24 hours.. it increases the streak.. a streak system, but I'm having an issue whereas when it reaches 4.1, it suddenly stops increasing. πŸ‘€

#
let dCooldown = 172800000;

if (dCooldown - (Date.now() - data.dailyCooldown) > 0) {
    data.dailyStreak++;

    if (data.dailyMultiplier === 5) {
        data.dailyMultiplier = 5;
    } else {
        data.dailyMultiplier = Math.floor((data.dailyMultiplier + 0.1) * 10)/10;
    };

    var finalReward = Math.floor(reward * (data.multiplier * data.dailyMultiplier));
} else {
    data.dailyStreak = 0;
    data.dailyMultiplier = 1;

    var finalReward = Math.floor(reward * data.multiplier);
};
#

The if statement just checks if you performed it in the next 24 hours after the cooldown of the daily command is done.

cinder patio
#
    if (data.dailyMultiplier === 5) {
        data.dailyMultiplier = 5;

πŸ€”

feral aspen
#

This is to make it not go above 5.

#

I want 5x the max.

cinder patio
#

you can just do if (data.dailyMultiplier !== 5) data.dailyMultiplier = Math.floor((data.dailyMultiplier + 0.1) * 10)/10;

feral aspen
#

.. a multiplier basically each time you streak.

feral aspen
#

Oh.. nvm.. it increases then checks.

cinder patio
#

uuh no it doesn't? Also did you even try out the formula with 4.1... the result is 4.1

#

so it'll never go above that

feral aspen
#

How tf did it work all the way to 4.1 then? πŸ˜‚

cinder patio
#

The result should be 4.2 wtf

feral aspen
#

It's supposed to be 4.2

#

What the fuck.. it works for 3.1 but not 4.1??

#

.. wait, neither 5.1 or 6.1

#

Dude.. should I make a ternary operator that adds an extra 0.1 if it was at 4 and above?

cinder patio
#

4.1 + 0.1 probably equals something veeery close to 4.2 cause precision

#

and Math.floor rounds it to 4.1 again

feral aspen
cinder patio
feral aspen
#

Tf

cinder patio
#

What are you even doing anyways...

#

Your formula is exactly the same thing as Math.floor(level + 0.1)

#

literally

timber fractal
feral aspen
#

TF IS JS

timber fractal
feral aspen
#
console.log(1.1 + 0.1) // 1.2000000000000002
console.log(4.1 + 0.1) // 4.199999999999999
#

HOW DOES THAT MAKE SENSE

cinder patio
#

use Math.round

#

not floor

#

and also... like I said earlier, your formula boils down to Math.round(level + 0.1), *10 and /10 cancel out

sleek talon
#

300% click through rate

#

with a single impression

feral aspen
#

It is supposed to show the decimal.. without it, it won't show since I am using Math.Floor()

near stratus
sleek talon
sleek talon
cinder patio
sleek talon
feral aspen
#

.. thanks for it though. πŸ‘

timber fractal
#

Oh wait

#

Yeah good idea

#

Thx that should work

sacred aurora
#
if(message.author.id !== '829257224181383179' || message.author.id !== '707512325740953690')
``` here
boreal iron
#

NOT or NOT doesn’t make sense at all

#

If both && NOT

#

In other words if(NOT && NOT)

lyric mountain
#

if (!(!NOT || !NOT))

boreal iron
#

lmao

quartz kindle
#

can you not knot?

boreal iron
#

Kuuhuukwkwwowi Troll smirk

lyric mountain
wheat mesa
#

What..?

keen bobcat
#

I can't code so bye

wheat mesa
#

I mean

#

This server isn’t necessarily all about coding, that’s why there’s other channels than this

limpid sentinel
#

Can anyone say me how to make my BOT notify me when someone votes the bot?

earnest phoenix
sudden geyser
earnest phoenix
#

i dont

#

because it worked before

#

...

limpid sentinel
earnest phoenix
limpid sentinel
#

?

rose warren
#

That's not how webhooks work

near stratus
rose warren
limpid sentinel
near stratus
limpid sentinel
#

hidden chan weebhook. Will change the weebhook and pass later

rose warren
near stratus
earnest phoenix
#

oh and btw what happend lmao

#

im new to to this

#

i did

earnest phoenix
#

i dont

quartz kindle
#

why are you in the buildtools folder

limpid sentinel
#

w8 first lemme create a new weebhook. cause this weebhook url is leaked

near stratus
rose warren
#

Oh my bad

earnest phoenix
quartz kindle
#

go home mac'n'cheese you're drunk

rose warren
#

I'm tired

quartz kindle
limpid sentinel
#

@rose warren How can I upload a avatar here? No option for uploading files.

rose warren
limpid sentinel
#

Oh great idea

#

@rose warren Didn't send the weebhook avatar. Given link of imgur.

rose warren
#

Did you use the actual image URL?

#

https://i.imgur.com/XXXXXX.jpg

limpid sentinel
#

Okay got it.

#

working now

#

Okay now the copy url in weebhook url. and copy auth in suthorization

#

Am I right?

rose warren
#

Yes

rose warren
#

It explains literally just above those buttons if you click on the questions

limpid sentinel
#

yes. Seen it just now. Thanks btw

rose warren
#

No problem

quartz kindle
#

close everything and open vsc normally

earnest phoenix
#

omfg

#

i just realized

#

i didnt have vscode downloaded

#

idk when i uninstalled it

#

but i did

#

im a dumbass

wraith urchin
#

does anyone know how to fix this?

earnest phoenix
#

how do i do this 😭

solemn latch
solemn latch
wraith urchin
solemn latch
wraith urchin
solemn latch
#

looks like you have a different error going on then

#

whats on line 236 of index.js

wraith urchin
#

there isn't one

#

there's only 227 lines

charred wyvern
#

Not Found

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

#

I get this error on my flask server

earnest phoenix
wraith urchin
solemn latch
solemn latch
limpid sentinel
#

Try this

#

And then put

#

client.login(token);

earnest phoenix
solemn latch
#

0.1.0 is a good early beta number for new packages
but 1.0.0 works too

earnest phoenix
#

ok

#

thanks lmao

#

i touyght it would do it by it self

solemn latch
#

you can make it do so when you run npm init run npm init -y -y meaning yes to everything default

wraith urchin
limpid sentinel
wraith urchin
#

yeah

#

i placed both

rose warren
#

It has nothing to do with the token

eternal osprey
#

Does anyone know how I can send an sms using js?

#

Like, any packages that are free, methods etc

quartz kindle
earnest phoenix
rose warren
earnest phoenix
wraith urchin
rose warren
earnest phoenix
#

not sure lol

#

but i did install it today

#

so probably

rose warren
earnest phoenix
#

stilll dont understand

rose warren
earnest phoenix
#

ok'

earnest phoenix
rose warren
#

Use the guide it explains everything and shows examples

quartz kindle
#

or if you actually wrote it yourself

#

because there seem to be a lot of problems with it

wraith urchin
#

oh

#

it's sort of both

quartz kindle
#

that explains it

rose warren
#

There's no hiding from the God of djs πŸ‘€

#

Please don't ask me to explain the guide I just sent you.

quartz kindle
#

it literally shows you

wraith urchin
quartz kindle
#

wdym you clicked it

rose warren
#

Yeah it's one of the first pages in the guide

wraith urchin
#

it sent me here

quartz kindle
#

thats not something to click on

near stratus
#

you can click on terminal ?

#

oh it's replit

#

nvm

quartz kindle
#

in this case, the variable message does not exist

#

or you are trying to use it in the wrong place, where it is not accessible

earnest phoenix
# quartz kindle

sorry but im a noob so is any of this correct like im i suppoosed to but the bot id or whatπŸ˜…

quartz kindle
#

a bot id is not required

rose warren
#

I mean you could always read the guide...

earnest phoenix
#

so my id?

#

like

#

idk

quartz kindle
#

no id is required

#

you can delete that entire line, doesnt matter

earnest phoenix
#

ok

quartz kindle
#

the only requirement is token

#

everything else depends on what you wanna do

earnest phoenix
#

i still have an eror

quartz kindle
#

what error

rose warren
#

They weren't including intents in their djs v13 client

#

Which isn't optional in v13

rose warren
earnest phoenix
#

bruh

eternal osprey
#

how do i directly sends an sms with my phone number using js?

#

The only thing i get as results on google are twillio etc, but those are all paid

wraith urchin
#

now i clicked on this

earnest phoenix
wraith urchin
#

it lead me to the black line

quartz kindle
#

making a discord bot requires knowledge of programming/coding

#

if you have none, i suggest you learn some basic coding first

quartz kindle
quartz kindle
#

you likely have a missing brackets issue

#

for every ( or { you have in your code, you need an ) or } in the right place

#

you are missing them

thorny flume
#

I'm getting this from the discord oauth2 API:

{
  error: 'invalid_request',
  error_description: 'Missing "code" in request.'
}

how can I solve?

tulip ledge
wraith urchin
quartz kindle
#

or show you coder

#

otherwise we cant help

wraith urchin
#

should i send you an invite link?

solemn latch
#

Finding where you need to add closing brackets is something imo you need to learn how to do.
I've had my fair share of trying to find them and failing to for awhile, but over time it gets easier.

thorny flume
#
const express = require('express')
const fetch = require('node-fetch')
const btoa = require('btoa')

const app = express()

const sercret = 'client_secret'
const id = 'client_id'
const redirect = encodeURIComponent('url')

app.get('/', async (req, res) => {
    res.send(`THE BROZY CORPORATION`)
    const code = req.query.code
    const creds = btoa(`${id}:${sercret}`)
    const response = await fetch(`https://discordapp.com/api/oauth2/token?grant_type=authorization_code&code=${req.query.code}&redirect_uri=${redirect}`, {
        method: 'POST',
        headers: {
            Authorization: `Basic ${creds}`
        },
    })
    const responseJson = await response.json()
    console.log(responseJson.access_token)
})

app.get('/login', (req, res) => {
    res.redirect('https://discord.com/api/oauth2/authorize?client_id=${id}&redirect_uri=${redirect}&response_type=code&scope=identify%20guilds')
})

app.listen('2084', () => {
    console.log(`running`)
})

this is my code and i'm getting an error

error:

{
  error: 'invalid_request',
  error_description: 'Missing "code" in request.'
}
wraith urchin
#

it's way bigger than it appears on here

quartz kindle
#

you are missing a message event

wraith urchin
#

client.on("message", message => {

#

this?

quartz kindle
#

yes

wheat mesa
#

oh god

pale vessel
#

far from worst

#

Huh where was message defined

earnest phoenix
sudden geyser
#

no it's not

wraith urchin
sudden geyser
#

unless you're just downloading someone's git repo and submitting it as your homework

earnest phoenix
#

hoow am i supposed to add that

quartz kindle
#

for example ```js
client.on("message", message => {
if(...) { ... }
if(...) { ... }
if(...) { ... }
if(...) { ... }
if(...) { ... }
if(...) { ... }
...
})

quartz kindle
quartz kindle
#

client.on("message") should only be there once, like i showed

wraith urchin
#

oh

#

like this then?

#

@quartz kindle

rose warren
#

You didn't close that first if statement

wraith urchin
#

how do i do that

rose warren
#

Otherwise it looks ok

#

}

wraith urchin
#

like this?

rose warren
#

Sure

#

That'll work

earnest phoenix
#

\

earnest phoenix
quartz kindle
#

wut

#

did you not read the getting started part?

#

you have to create a js file and open it with a code editor (or any text editor)

#

and write on it

#

why do you have a bunch of files already? did you download a pre-made bot?

wraith urchin
#

am i doing it right

quartz kindle
#

well its not wrong

tulip ledge
#

How do u overwrite permission in a channel for a specific user in djs v13.1? Fixed

clever orchid
#

idk

proven lantern
#

is there a better way to do automation tests for discord bots than using something like nightwatchjs to login to discord through the browser and run tests? will my test account get banned if it keeps doing automated stuff?

proven lantern
vivid fulcrum
proven lantern
vivid fulcrum
#

there's a chance

#

however if the account doesn't do anything crazy (i.e. dm people)

#

i don't see how discord would detect an automation pattern

proven lantern
#

i'd need 4 test accounts to run some of my tests. they wouldn't dm, but they would be messaging a channel

#

just making 4 test accounts is going to be annoying

#

top.gg should offer feature testing services

sudden geyser
proven lantern
#

that would be tricky to do with automation tests

sudden geyser
#

I don't see how it would be.

wheat mesa
#

I think the best solution here is to purchase discord so that you can do whatever you want to their API

solemn latch
shadow sand
#

So i’m very noob with these things but I need help

#

I have a var that should add to its value 1 if something is said but I doesn’t sum up

#

I don’t have the pc now but it’s something like:
var int = 0
if message.content.includes (β€˜yep’) var int = int + 1

#

it doesn’t sum

solemn latch
#

you are redefining int every time

#

plus
you are missing ()

#

plus, just increment the variable

winged mulch
#

But forgot to back up my database

#

So yeah there's that

lyric mountain
#

you forgor

remote nest
#

how do we make vote forced command in python

rose warren
#

Same as any other language. Save data from the voting webhook in your database then when someone runs the command, check your db to see if they've voted in the last 12h. If so, proceed to give the response. Otherwise, give them a voting link.

remote nest
rose warren
#

To store the data of who voted and when

remote nest
#

hmmm

rose warren
#

You don't want to be making an api request to top.gg every time someone runs a command or you'll get rate limited. So that's the best way.

rose warren
#

To store user data?

remote nest
#

yeah

#

vote data

rose warren
#

That's definitely not recommended. Json files can get corrupt.

remote nest
#

uh

#

I dont know how to use database

sudden geyser
#

You could use a simple persistent data store rather than an SQL database.

sudden geyser
sudden geyser
#

It's like using a dictionary as a database

remote nest
#

hey I have tried my best but couldn't make it

lyric mountain
#

show the code you tried

azure lark
#

how do i get the avatar for a user that used a slash command as interaction.author.displayAvatarURL() is not working

pale vessel
#

You sure it's not called interaction.user?

#

Interactions aren't messages, they don't have the author object

azure lark
#

oh, it might be, ill check

pale vessel
#

Check in docs

azure lark
#

it was interaction.user, thanks

sturdy terrace
#

i have created the worst bot known to mankind

vivid fulcrum
#

oh to be jared, 19

sturdy terrace
#

lmao

#

i should change my name to jared

#

that would be funny i think

earnest phoenix
#

Anyone here help with bot coding a error accured in my bot
Language: python

wheat mesa
#

question.context is not defined

#

(Thanks Tim for that one)

sage bobcat
#

One message removed from a suspended account.

wheat mesa
#

You're missing a "

#

I also highly recommend not leaking your token in a public discord server

#

Might wanna regen that token now

coral trellis
#

@earnest phoenix please Regen your token and be careful sharing it

teal finch
#

Hi

earnest phoenix
#

i did before sending thsat

earnest phoenix
#

um tf

wheat mesa
#

After your string

#

You never ended your string

wheat mesa
#

Pretty sus

proud plover
lament rock
#

I'd rather recommend sql based solutions as a starter database since there are many which are really good like postgres. Even MariaDB is stronk

errant flax
#

why is it showing like this?
expected;
!help [command] - The command name/alias
![alias] [command] - The command name/alias
etc.

#
const {MessageEmbed} = require("discord.js")
module.exports = {
  name: "help",
  description: "Shows the help menu",
  category: "other",
  usage: "[command] - The command name/alias",
  alias: ["command","cmd","cmds"],
  run:async(msg,args,client,cache)=>{
    const settings = await cache.functions.get("getServerSet.js")(msg.guild.id)
    const categories = cache.functions.get("getCateg.js")(cache,settings.prefix)
    const colors = cache.jsonFiles.get("colors.json")
    const cmds = cache.collections.get("cmds.js")
    const emb = new MessageEmbed()
    emb.setColor(colors.default)
    if (!args[0]) {
      emb.setTitle(`Commands for ${client.user.username}`)
      for (const c of categories) {
        emb.addField(c.name,c.value.join("\n"))
      }
      msg.channel.send({
        embeds: [emb]
      })
    } else {
      const cmd = cmds.get(args.join(" ")) || cmds.find(c=>c.alias&&c.alias.includes(args.join(" ")))
      if (!cmd) return msg.reply(`It looks like this command doesn't exist!`)
      emb.setTitle(`Help Memu (${cmd.name})`)
      emb.setDescription(`${cmd.description||"None"}`)
      let usage = cmd.usage ? `prefixHere[cmd] `+cmd.usage : `prefixHere[cmd]`
      if (cmd.alias) {
        for (const a of cmd.alias) {
          usage=usage+`\n${settings.prefix}${a}${usage.slice("prefixHere[cmd]".length)}`
        }
      }
      usage.replace(/prefixHere/g,settings.prefix)
      usage.replace(/\[cmd\]/g,cmd.name)
      emb.addFields([{
        name: "Alias",
        value: cmd.alias?.join(" ") || "None"
      },{
        name: `Usage`,
        value: usage
      }])
      msg.channel.send({
        embeds: [emb]
      })
    }
  }
}
lament rock
#

the regex might not like special characters in the string like [ right next to matches
You'll possibly wanna use positive lookahead iirc

errant flax
#

i dont get what u mean

lament rock
#

Now I'm confused

#

your question was so vague

#

what's supposed to be the intended string?

errant flax
#

basically it will copy the string from the main command name and replace it with the alias.
like:
!help [command]

i want to replace help with cmds

the string should be like this:
!help [command]
!cmds [command]

lament rock
#

I still don't understand

errant flax
#

found the problem

earnest phoenix
#

Is it possible to reply to an interaction with embed without using the discord method .editReply ?

#

d.js uses this.webhook.edit()

novel jetty
#

How can i get the member who deleted the message and not who the message belongs to was deleted. Right now, when someone deletes a message it says A message from Angel was deleted by Angel in (channel)

const deleteMessage = new Discord.MessageEmbed()
            .setTimestamp()
            // .setFooter(message.member?.user.username as string, `${message.member?.user.avatarURL}`)
            .setAuthor(`<@${message.author}>`)
            .setColor("RED")
            .setDescription(`**A message from <@${message.author}> was deleted by <@${message.author}> in <#${message.channel}>**`)
            .addField("Content", message.content as string || "No content found... Either the message was a Sticker or a Picture")
            .setFooter(`ID: ${message.author?.id}`)

            var sChannel = message.guild?.channels.cache.get(channel) as Discord.TextBasedChannels
            if (!sChannel) return;
            sChannel.send({ embeds: [deleteMessage]})
vivid fulcrum
#

you need to poll audit logs

#

if there's an entry after a second or two in the audit logs - the person in the audit log deleted it

#

if not, the author deleted it

earnest phoenix
opaque sentinel
#

second?

hollow depot
#

@drowsy crag

quaint wasp
boreal iron
#

Deferring your interaction reply allows you to send multiple replies to your interaction or delayed replies

flat copper
#

What is 429?

pale vessel
#

A number?

flat copper
#

In debug console

pale vessel
flat copper
#

Ok thnx

worn sonnet
#

Hello

#

I'm working on a twitter bot

#

and I'm trying to get retweets of a tweet done by a user

#

more like the usernames of who retweeted the tweet
I'm using python

eternal osprey
#

where do i find my connect.ssid?

#

sid*

pale vessel
#

In cookies

opaque sentinel
#

How to get out of rate-limited ?

#

I cannot do anything

jovial nexus
#

When i listen to the interactionCreate event, i have this code: interaction.message.edit({ embeds: [ Embed ], components: [ Row ]}), the message and buttons edit normaly, but it says Interaction failed, why?

#

Its an embed with a dropdown menu, when you choose an option from the menu, the message edits itself, removes the menu and adds a button

hollow loom
#
client.on("messageCreate", message => { 
    if (message.content == `${prefix}ping`) {
        message.channel.send("pong")
    }
});

djs v13 why is this not working :/

rose warren
opaque sentinel
rose warren
#

Ok. If you ever need help always make sure to include logs or code. It helps people help you.

hollow loom
tired panther
#

Whats the best template for jsdocs?

#

With nice ui, I found clean-jsdoc